Файл: vkollektive2014/core/ava_min.php
Строк: 7
<?php 
function ava_k($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 = "/page.php?id='.$id.'"><img src= "base/'.$arhiv.'/'.$id.'/photo_small/'.$p['id'].'.jpg" height = "'.$max.'" width = "'.$max.'"></a>';
   } else {
   $sex = mysql_result(mysql_query("SELECT `sex` FROM `users` WHERE `id` = '".$id."'"),0);
   echo '<a href = "/page.php?id='.$id.'"><img src= "ico/'.$sex.'.png" width = "'.$max.'" height = "'.$max.'" ></a>';
   }
}
?>