Файл: core/page_ava.php
Строк: 7
<?php
function page_ava($id,$max) {
$req = mysql_query("SELECT * FROM `users_photo` WHERE `user`='".$id."' and `page` = '1' LIMIT 1");
if (mysql_num_rows($req) != 0) {
$p = mysql_fetch_assoc($req);
$arhiv = intval(($id/1000)+1);
echo '<a href = "photo.php?act=view&id='.$p['id'].'"><img src= "base/'.$arhiv.'/'.$id.'/photo_small/'.$p['id'].'.jpg" width = "'.$max.'"></a>';
} else {
$sex = mysql_result(mysql_query("SELECT `sex` FROM `users` WHERE `id` = '".$id."'"),0);
echo '<img src= "ico/'.$sex.'.png" width = "'.$max.'">';
}
}
?>