"; $table = "talk"; $title = $h1 = "Интервью с клиентом"; $id= (int)$id = (int)$_GET[id]; if (!$id){ $from = ( isset( $Cfrom ) ? $Cfrom : 0 ); $lmt = ( isset( $Clmt ) ? $Clmt : 10 ); $sqln = "select count(id) from $table"; $sthn = my_exec($sqln); $num_count = mysql_result($sthn,0); $sql = "select $table.* from $table where eclient='2' order by id desc limit ".$from*$lmt.",".$lmt; $sth = my_exec($sql); while ($row = mysql_fetch_array($sth)) { $body .="

"; if (file_exists("upload/pic_talk/picture_".$row[id]."_70".$row[ext])) { $body .= "\"".$row[name]."\""; } $body .="".$row[name].", ".$row[company]." "; $body .="
".$row[descr]; $body .="

Подробнее >
"; $body .="

"; } $body .=local_page_navigation( $from, $lmt, $num_count, "" ); } else { $sql = "select $table.* from $table where id='$id'"; $sth = my_exec($sql); $row = mysql_fetch_array($sth); $title = $h1 = $row[name]; $body .="

".$row[name].", ".$row[company]."

"; $body .= "

<< назад

"; } $body .= ""; } elseif ($cgi[pid]==7){ $body = "
"; $table = "public_opt"; if (!$id){ $body .= "

Статьи о подарках

"; $title = "Статьи о подарках"; if($Cfrom || $cgi[Cfrom]) $Cfrom= (int)$Cfrom =(int)$cgi[Cfrom]; if($Clmt || $cgi[Clmt]) $Clmt= (int)$Clmt =(int)$cgi[Clmt]; $from = ( isset( $Cfrom ) ? $Cfrom : 0 ); $lmt = ( isset( $Clmt ) ? $Clmt : 10 ); $sqln = "select count(id) from $table"; $sthn = my_exec($sqln); $num_count = mysql_result($sthn,0); $sql = "select $table.* from $table order by id desc limit ".$from*$lmt.",".$lmt; $sth = my_exec($sql); while ($row = mysql_fetch_array($sth)) { //$body .="

".$row[name]."

"; $body .="".$row[name].""; $body .="

".$row[descr]."


"; //$body .="Подробнее >"; } $body .=local_page_navigation( $from, $lmt, $num_count, "" ); } else { $sql = "select $table.* from $table where id='$id'"; $sth = my_exec($sql); $row = mysql_fetch_array($sth); $title = $row[title]; $h1 = $row[name]; $body .= "

$h1

"; $body .= $row[text] ; $body .= "

<< назад

"; } $body .= "
"; } else { $table="gclients"; $sql = "select $table.* from $table order by up asc"; $sth = my_exec($sql); $row = mysql_fetch_array($sth); if(!$pid) $pid=$row[id]; $title=$row[title]; $body = ""; } include_once($root."/template.php"); ?>