File size: 1.92Kb
<?php
header("Content-type: text/html");;
?>
<html>
<head><title>хРТБЧМЕОЙЕ ЖПФЛБНЙ</title></head>
<body>
<?php
include '../wap/config.php';
if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
};
$res=pg_query($conn, "SET CLIENT_ENCODING TO 'KOI8';");
?>
<center><b>дПВБЧЙФШ ЖПФП</b></center>
<form action="photo_add.php" method=post>
<table bgcolor="f0f0f0">
<?php
print "<tr><td>оЙЛ: </td><td><input type=text name=\"login\" value=\"".$login."\" size=60></td></tr>\n";
print "<tr><td>ЙМЙ ID: </td><td><input type=text name=\"uid\" value=\"".$login."\" size=10></td></tr>\n";
print "<tr><td>рХФШ Л ЖБКМХ: </td><td><input type=text name=\"path\" value=\"".$path."\" size=60></td></tr>\n";
?>
</table>
<input type=submit value="дПВБЧЙФШ">
<input type=reset value="пЮЙУФЙФШ">
</form>
<center><b>уРЙУПЛ ЖПФПЛ Ч ВБЪЕ</b></center>
<table width="100%">
<tr align=center bgcolor="e0e0e0"><td>N</td><td>оЙЛ</td><td>рХФШ</td><td><a href="photos.php?sortby=8" title="уПТФЙТПЧЛБ">уЛБЮЙЧБОЙК</a></td></tr>
<?php
if ($sortby==8) {
$res=pg_query($conn, "select photos.id,users.login,photos.path,photos.dlcount from users,photos where photos.uid=users.id order by photos.dlcount desc;");
} else {
$res=pg_query($conn, "select photos.id,users.login,photos.path,photos.dlcount from users,photos where photos.uid=users.id order by photos.uid;");
}
$rows=pg_numrows($res);
for ($i=0; $i<$rows; $i++) {
$path=pg_result($res,$i,2);
if (stat('../WWW/'.$path)) {
$trcolor='c0c0ff';
} else {
$trcolor='ffc0c0';
}
print "<tr align=center bgcolor=\"".$trcolor."\">".
"<td><a title=\"тЕДБЛФЙТПЧБФШ ЙОЖПТНБГЙА ПВ ЬФПК НЕМПДЙЙ\" href=\"photo_edit.php?id=".pg_result($res,$i,0)."\">".$i."</a></td><td>".
pg_result($res,$i,1)."</td><td>".
$path."</td><td>".pg_result($res,$i,3).
"</td></tr>\n";
}
pg_close($conn);
?>
</table>
</body>
</html>