Размер файла: 4.85Kb
<?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 include (dirname(__FILE__).'/include/header.php'); ?>
<div id="block_left">
<?php include (dirname(__FILE__).'/include/lider.php'); ?>
</div>
<div id="content_page">
<div class="tit_zag">Сейчас на сайте</div>
<div class="clear"></div>
<div class="tit_zag_hr"></div>
<?php
$col = USERS_ALL_PAGE;
if (isset($_GET['start'])) $start = abs(intval($_GET['start']));
else $start = 0;
$count_p = mysql_result(mysql_query("SELECT COUNT(*) FROM `q_users` WHERE `online` > '".time()."';"), 0);
if ($count_p > 0) {
if ($start >= $count_p) $start = 0;
$q = mysql_query("SELECT * FROM `q_anketa` INNER JOIN `q_users` ON `q_users`.`id_user` = `q_anketa`.`id_user` WHERE `q_users`.`online` > '".time()."' ORDER BY `q_users`.`top_search` DESC LIMIT ".$start.", ".$col);
?>
<?php $i = 1; ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<?php while ($array = mysql_fetch_array($q)) { ?>
<td width="50%" valign="top" style="padding-top: 10px; padding-left: 15px; padding-right: 15px; <?php echo ($i == 1 ? 'border-right: 1px solid #ccc;' : ''); ?>">
<!-- info user -->
<table width="100%" cellspacing="0" cellpadding="0" style="<?php echo ($array['vip_status'] == 1 ? 'background: url(../images/user-vip-bg.gif); border: 1px solid #ff8800;' : 'background: url(../images/user-bg.jpg); border: 1px solid #ccc;'); ?> padding: 6px 10px; border-radius: 10px;">
<tr>
<td width="125" valign="top" align="left">
<a href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/id<?php echo $array['id_user']; ?>">
<div style="<?php echo (!empty($array['avatar']) ? "background: url('http://".$_SERVER['HTTP_HOST']."/".DIR_PHOTOS."/".$array['id_user']."/".str_replace('_s', '_p', $array['avatar'])."') no-repeat; width: 110px; height: 146px; ".($array['vip_status'] == 1 ? 'border: 3px solid #ff8800;' : 'border: 3px solid #ccc;') : "background: url('http://".$_SERVER['HTTP_HOST']."/images/no_photo_norm.png'); width: 110px; height: 146px; ".($array['vip_status'] == 1 ? 'border: 3px solid #ff8800;' : 'border: 3px solid #ccc;')); ?>">
<div style="margin-top: -25px; margin-left: -15px; position: absolute;">
<?php if ($array['vip_status'] == 1) { ?><img class="title_help" src="/images/vip.png" alt="" width="52" height="52" title="VIP-пользователь" /> <?php } ?>
<?php if (function_online($array['online']) == TRUE) { ?>
<div style="left: 20px; top: 155px; position: absolute;">
<img class="title_help" src="/images/on.gif" alt="Сейчас на сайте" title="Сейчас на сайте" />
</div>
<?php } ?>
</div>
</div>
</a>
</td>
<td valign="top" align="left">
<a class="<?php echo ($array['pol'] == 1 ? 'm_color' : 'zh_color'); ?>" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/id<?php echo $array['id_user']; ?>"><?php echo htmlspecialchars($array['name'], ENT_QUOTES); ?></a><br/>
<span class="vozrast">Возраст: <?php echo function_vozrast_n($array['god'].'-'.$array['mes'].'-'.$array['day']); ?></span><br/>
<span class="city"><?php echo htmlspecialchars($array['city'], ENT_QUOTES); ?>, <?php echo htmlspecialchars($array['country'], ENT_QUOTES); ?></span><br/>
<?php if (!empty($array['photo'])) { ?>
<div style="padding-top: 75px;">
<span class="photos"><span class="photos_ico"></span> <?php echo $array['photo']; ?></span>
</div>
<?php } ?>
</td>
<td valign="top" align="right">
<?php if (!empty($array['top_up'])) { ?>
<img class="title_help" src="/images/up_small.png" alt="" width="16" height="16" title="Поднимал<?php echo ($array['pol'] == 1 ? '' : 'а'); ?> анкету «наверх» <?php echo function_vizit($array['top_up']); ?>" />
<?php } ?>
</td>
</tr>
</table>
<!-- /info user -->
<div class="hr"></div>
<?php if ($i == 1) { ?>
</td>
<?php } else { ?>
</td></tr><tr>
<?php $i = 0; ?>
<?php } ?>
<?php $i++; ?>
<?php } ?>
</tr>
</table>
<div class="clear"></div>
<?php page('/online/page', $col, $start, $count_p, $end_url = ''); ?>
<?php } else { ?>
<div style="text-align: center;">В данный момент на сайте нет авторизированных пользователей</div>
<?php } ?>
</div>
<div class="clear"></div>
<?php include (dirname(__FILE__).'/include/footer.php'); ?>