Размер файла: 3.58Kb
<?php
/**********************************************/
/* Автор скрипта: Александр Есин */
/* E-Mail: [email protected] ([email protected]) */
/* ICQ: 6464729 */
/* Site: http://ticlove.ru */
/**********************************************/
?>
<?php define ('SECURED', true); ?>
<?php require (dirname(__FILE__).'/_inc/sql.php'); ?>
<?php require (dirname(__FILE__).'/_inc/config.php'); ?>
<?php require (dirname(__FILE__).'/_inc/function.php'); ?>
<?php $title_page = 'Оценки моих фотографий'; ?>
<?php $description_page = 'Оценки моих фотографий'; ?>
<?php $keywords_page = 'Оценки моих фотографий'; ?>
<?php
if (!isset($_SESSION['auth_id']))
{
header('Location: /');
exit;
}
?>
<?php include (dirname(__FILE__).'/include/header.php'); ?>
<div id="block_left">
<?php include (dirname(__FILE__).'/include/lider.php'); ?>
</div>
<div id="block_center">
<h3>Оценки моих фотографий</h3>
<?php
$col = 5;
if (isset($_GET['start'])) $start = abs(intval($_GET['start']));
else $start = 0;
$count_p = mysql_result(mysql_query("SELECT COUNT(*) FROM `q_photo_vote` WHERE `uid_user` = '".$_SESSION['auth_id']."';"), 0);
if ($count_p > 0) {
if ($start >= $count_p) $start = 0;
$q = mysql_query("SELECT * FROM `q_photo_vote` INNER JOIN `q_users` ON `q_users`.`id_user` = `q_photo_vote`.`id_user` WHERE `q_photo_vote`.`uid_user` = '".$_SESSION['auth_id']."' ORDER BY `q_photo_vote`.`id_photo_vote` DESC LIMIT ".$start.", ".$col);
$i = 1;
while ($array = mysql_fetch_array($q)) {
?>
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td align="left" valign="top">
<a href="/user.php?id=<?php echo $array['id_user']; ?>" title="<?php echo htmlspecialchars($array['name'], ENT_QUOTES); ?>">
<?php if (!empty($array['avatar'])) { ?>
<img class="<?php echo ($array['vip_status'] == 1 ? 'photo_bor_vip' : 'photo_bor'); ?>" src="<?php echo DIR_PHOTOS; ?>/<?php echo $array['id_user']; ?>/<?php echo $array['avatar']; ?>" alt="" />
<?php } else { ?>
<img class="<?php echo ($array['vip_status'] == 1 ? 'photo_bor_vip' : 'photo_bor'); ?>" src="/images/no_photo_small.png" alt="" />
<?php } ?>
</a>
</td>
<td align="center">
<?php if ($array['new'] == 0) { ?>
<span style="color:#ff0000;">New!</span><br/>
<?php mysql_query("UPDATE `q_photo_vote` SET `new` = '1' WHERE `id_photo_vote` = '".$array['id_photo_vote']."';"); ?>
<?php } ?>
<img src="/images/b<?php echo $array['asses']; ?>.png" alt="" width="50" height="62" /><br/>
<?php echo function_vizit($array['time']); ?>
</td>
<td align="right">
<?php
$s = mysql_query("SELECT * FROM `q_photo` WHERE `id_photo` = '".$array['id_foto']."' LIMIT 1;");
$arr = mysql_fetch_array($s);
$name_foto = explode('.', $arr['name']);
$name_foto_p = str_replace($name_foto[0], $name_foto[0].'_p', $arr['name']);
?>
<a href="/album.php"><img class="photo_bor" src="<?php echo DIR_PHOTOS; ?>/<?php echo $arr['id_user']; ?>/<?php echo $name_foto_p; ?>" alt="" /></a>
</td>
</tr>
</table>
<?php if ($i <> $col) { ?>
<div style="margin: 10px 0; border-top: 5px dotted #eee; font-size: 16px; color: #ff6633; width: 100%;"></div>
<?php } ?>
<?php $i++; ?>
<?php } ?>
<?php function_page($_SERVER['PHP_SELF'].'?', $col, $start, $count_p); ?>
<?php } else echo 'У вас пока нет оценок фотографий'; ?>
</div>
<div id="block_right">
<?php include (dirname(__FILE__).'/include/chat.php'); ?>
</div>
<div class="clear"></div>
<?php include (dirname(__FILE__).'/include/footer.php'); ?>