gde oshibka vobshe ne pokajet list
golosovix
<?php
define('_IN_JOHNCMS', 1);
header('Content-Type: text/html; charset=utf-8');
require_once ('../incfiles/core.php');
require_once ('../incfiles/head.php');
$rasm = ($_GET['rasm']);
echo '<div class="phdr">Zo`r deb bilganlar</div>';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_votes` WHERE `file_id` = '" . $rasm . "'"), 0);
if ($total) {
$req = mysql_query("SELECT * FROM `cms_album_votes` WHERE `file_id` = '" . $rasm . "'");
$res = mysql_fetch_assoc($req);
$us = mysql_query("SELECT * FROM `users` WHERE `id` = '".$res['user_id']."' ORDER BY `time` DESC LIMIT $start, $kmess");
//while (($user = mysql_fetch_assoc($us)) !== false) {
while ($foyda = mysql_fetch_array($us)) {
echo '<div class="div_chat">';
echo '<span style="float:right; color:gray;">' . date("d.m.y / H:i", $res['time']) . '</span><br/>';
echo '<table width="100%"><td class="menu5"><center>';
if (file_exists('files/users/photo/' . $foyda['id'] . '_small.jpg')){
echo '<img src="files/users/photo/' . $foyda['id'] . '_small.jpg" width="45" height="45" style="vertical-align:middle;" />';
}else{
echo '<img src="'.$home.'/files/users/photo/' . ($foyda['sex'] == 'm' ? 'm' : 'w') . ($foyda['datereg'] > time() - 86400000 ? '_new' : '') . '.png" width="45" height="45" style="vertical-align:middle;" alt="' . ($foyda['sex'] == 'm' ? 'М' : 'Ж') . '" /> ';
}
echo '</center></td><td class="menu4">';
if ($foyda['sex']){
echo (time() > $foyda['lastdate'] + 300 ? '<img src="'.$home.'/images/' . ($foyda['sex'] == 'm' ? 'man' : 'woman') . ($foyda['rights'] > 7 && $foyda['rights'] < 10 ? '_sv' : '') . ($foyda['rights'] > 6 && $foyda['rights'] < 9 ? '_adm' : '') . ($foyda['rights'] > 5 && $foyda['rights'] < 7 ? '_smod' : '') . ($foyda['rights'] > 4 && $foyda['rights'] < 6 ? '_lmod' : '') . ($foyda['rights'] > 3 && $foyda['rights'] < 5 ? '_dmod' : '') . ($foyda['rights'] > 2 && $foyda['rights'] < 4 ? '_fmod' : '') . '_off.gif" width="14" height="14" style="vertical-align: middle;" alt=""/> ' : '<img src="'.$home.'/images/' . ($foyda['sex'] == 'm' ? 'man' : 'woman') . ($foyda['rights'] > 7 && $foyda['rights'] < 10 ? '_sv' : '') . ($foyda['rights'] > 6 && $foyda['rights'] < 9 ? '_adm' : '') . ($foyda['rights'] > 5 && $foyda['rights'] < 7 ? '_smod' : '') . ($foyda['rights'] > 4 && $foyda['rights'] < 6 ? '_lmod' : '') . ($foyda['rights'] > 3 && $foyda['rights'] < 5 ? '_dmod' : '') . ($foyda['rights'] > 2 && $foyda['rights'] < 4 ? '_fmod' : '') . '_on.gif" width="14" height="14" style="vertical-align: middle;" alt=""/> ');
}else{
echo '<img src="' . $home . '/images/del.png" width="12" height="12" style="vertical-align:middle;" /> ';
}
echo '<span class="nik"><a href ="../users/profile.php?user='.$foyda['id'].'">' . $foyda['name']. '</a></span>';
echo (time() > $foyda['lastdate'] + 300 ? ' <img src="'.$home.'/images/statuses/10.ico" width="13" height="13" alt="offline" style="vertical-align:middle;" /> ' : ' <img src="'.$home.'/images/sts/'. $foyda['statusID'] . '.png" style="vertical-align:middle;" width="13" height="13" alt="'.$foyda['statusID'].'" /> ');
echo '<td class="menu5"><img src="images/'.$res['vote'].'.gif" alt="'.$res['vote'].'"/></td>';
echo '</td></tr></table></div>';
}
} else {
echo '<div class="menu"><p>Hech kim ushbu rasmni ajoyib deb hisoblamaydi</p></div>';
}
if ($total > $kmess) {
echo '<div class="topmenu">' . functions::display_pagination('vote.php?rasm='.$rasm.'&', $start, $total, $kmess) . '</div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
require_once ('../incfiles/end.php');
?>