\n"; $adv.="\n"; $adv.="\n"; $bookmark =""; $bookmark.="
"; //echo $id; require("/usr/local/www/peoples.ru/req/utils_new.class"); $my=new class_utils; $my->sql_connect(); $gotid=$my->check_search_string(trim($id)); $txt=""; $i=0; $aSQL = "SELECT * FROM describe_ru_photo WHERE id='$gotid'"; $aQResult = mysql_query($aSQL); if (mysql_error()) { print(mysql_error()); } while ($row = mysql_fetch_array($aQResult)): $photoname=trim($row['photoname']) ; $idphoto=trim($row['id']) ; $visitors=trim($row['visitors']) ; $id_describe=trim($row['id_describe']) ; $photodescription=trim($row['photodescription']) ; $width=trim($row['width']) ; if ($width>450) { $width=450; }; $qSQL = "SELECT * FROM describe_ru WHERE id='$id_describe'"; $qQResult = mysql_query($qSQL); if (mysql_error()) { print(mysql_error()); } while ($qrow = mysql_fetch_array($qQResult)): $name=trim($qrow['name']) ; $idnum=trim($qrow['id']) ; $nameengl=trim($qrow['nameengl']); $field=trim($qrow['field']); $datepub=trim($qrow['datepub']); $path=trim($qrow['path']) ; $section=trim($qrow['section']) ; // $visitors=trim($row['visitors']) ; $description=nl2br(trim($qrow['description'])); $description_small=substr($description,0,200); endwhile; /* $qSQL = "SELECT * FROM describe_ru_section WHERE nameengl='$section' ORDER BY RAND() LIMIT 1"; $qQResult = mysql_query($qSQL); if (mysql_error()) { print(mysql_error()); } while ($qrow = mysql_fetch_array($qQResult)): $sectionname=$qrow['name']; endwhile; */ if ($field=='regular'): $txt="

$name

\n
Посетителей: $visitors
$bookmark

\n$photodescription
\n"; else: $txt="

$name

\n
Посетителей: $visitors
$bookmark

\n$photodescription
\n"; endif; $firstpicture="http://www.describe.ru/images/$photoname"; endwhile; $visitors++; $aSQL = "UPDATE describe_ru_photo SET visitors='$visitors' WHERE id='$idphoto'"; $aQResult = mysql_query($aSQL); if (mysql_error()) { print(mysql_error()); } $my->sql_close(); if (empty($txt)<>true): $my->sql_connect(); /////показатель куда переходить $aSQL = "SELECT id FROM describe_ru_photo ORDER BY id DESC LIMIT 1"; $aQResult = mysql_query($aSQL); if (mysql_error()) { print(mysql_error()); } while ($row = mysql_fetch_array($aQResult)): $i_all=$row['id']; endwhile; if ($id>$i_all) { $idt=$i_all; } else { $idt=$id; }; if ($id<1) { $idt=1; } else { $idt=$id; }; $before=$idt-1; $next=$idt+1; if ($idt >= $i_all): $next=" · =>|"; else: $next=" · >>> · ->|"; endif; if ($idt<=1): $before="|<= · "; else: $before="|<- · <<< · "; endif; $pages="$id"; $listpages="
".$before." · ||$idphoto|| · ".$next."
"; ///конец показателя куда переходить $my->sql_close(); //$description_small=substr($description,0,200); if (empty($photodescription)<>true) { $name=$photodescription; }; $page4="current"; ?> <? echo $name; ?>
".$adv.""; echo $listpages; require_once('/usr/local/www/describe.ru/www/ssi/foot-dynamic-page.shtml'); else: echo "Sorry"; endif; ?>