Файл: core/duel_ava.php
Строк: 7
<?
function duel_ava($id) {
@$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 = "60px" height = "60px"></a>';
   } else {
   $sex = mysql_result(mysql_query("SELECT `sex` FROM `users` WHERE `id` = '".$id."'"),0);
   echo '<img src= "ico/'.$sex.'.png" width = "60px" height = "60px">';
   }
}
?>