} if ($total > 0) { $file = file(DATADIR . 'dataforum/' . $fid . '-' . $id . '.dat'); if ($start < 0 || $start >= $total) { $start = 0; } if ($total < $start + $config['forumpost']) { $end = $total; } else { $end = $start + $config['forumpost']; } for ($i = $start; $i < $end; $i++) { $data = explode("|", $file[$i]); echo '<div class="b">'; echo user_avatars($data[2]) . ' <b><a href="/pages/anketa.php?uz=' . $data[2] . '&' . SID . '">' . nickname($data[2]) . '</a></b> '; echo user_title($data[2]) . user_online($data[2]); echo ' <small>(' . date_fixed($data[5]) . ')</small></div>'; echo '<div>' . bb_code($data[3]) . '<br />'; echo '<span class="data">(' . $data[4] . ')</span>'; echo '</div>'; } page_strnavigation('topic.php?fid=' . $fid . '&id=' . $id . '&', $config['forumpost'], $start, $total); } else { show_error('Тема пустая! Сообщений еще нет!'); } // Форма для добавления сообщений if (empty($topic[6])) { if (is_user()) { echo '<div class="form" id="form">'; echo '<form action="topic.php?act=add&fid=' . $fid . '&id=' . $id . '&uid=' . $_SESSION['token'] . '&' . SID . '" method="post">'; echo 'Сообщение:<br />';
} ############################################################################################ ## Ответ ## ############################################################################################ if ($action == "otvet") { if (isset($_GET['id'])) { $id = (int) $_GET['id']; } else { $id = ""; } if ($id !== "") { $file = file(DATADIR . "book.dat"); if (isset($file[$id])) { $data = explode("|", $file[$id]); echo '<b><big>Добавление ответа</big></b><br /><br />'; echo '<div class="b"><img src="../images/img/edit.gif" alt="image" /> <b><a href="../pages/anketa.php?uz=' . $data[1] . '&' . SID . '">' . nickname($data[1]) . '</a></b> ' . user_title($data[1]) . user_online($data[1]) . ' <small>(' . date_fixed($data[3]) . ')</small></div>'; echo '<div>Сообщение: ' . bb_code($data[0]) . '</div><hr />'; echo '<form action="book.php?id=' . $id . '&action=addotvet&start=' . $start . '&uid=' . $_SESSION['token'] . '&' . SID . '" method="post">'; echo 'Cообщение:<br />'; echo '<textarea cols="25" rows="3" name="otvet">' . nosmiles($data[6]) . '</textarea>'; echo '<br /><input type="submit" value="Ответить" /></form><hr />'; } else { echo '<img src="../images/img/error.gif" alt="image" /> <b>Ошибка! Сообщения для ответа не существует!</b><br />'; } } else { echo '<img src="../images/img/error.gif" alt="image" /> <b>Ошибка! Не выбрано сообщение для ответа!</b><br />'; } echo '<br /><img src="../images/img/back.gif" alt="image" /> <a href="book.php?start=' . $start . '&' . SID . '">Вернуться</a>'; } ############################################################################################ ## Добавление ответа ##
$useronline = '<img src="/images/img/on.gif" alt="image">'; $anketa = 'Вундер-киндер'; } if ($data[1] == 'Настюха') { $useravatars = '<img src="/chat/img/bot.gif" alt="image" /> '; $useronline = '<img src="/images/img/on.gif" alt="image">'; $anketa = 'Настюха'; } if ($data[1] == 'Весельчак') { $useravatars = '<img src="/chat/img/shut.gif" alt="image" /> '; $useronline = '<img src="/images/img/on.gif" alt="image">'; $anketa = 'Весельчак'; } echo '<div class="b">'; echo $useravatars; echo '<b>' . $anketa . '</b> ' . user_title($data[1]) . ' ' . $useronline . ' <small> (' . date_fixed($data[3]) . ')</small><br />'; echo '<input type="checkbox" name="del[]" value="' . $num . '" /> '; echo '<a href="minichat.php?act=edit&id=' . $num . '&start=' . $start . '">Редактировать</a>'; echo '</div><div>' . bb_code($data[0]) . '<br />'; echo '<span style="color:#cc00cc"><small>(' . $data[4] . ', ' . $data[5] . ')</small></span></div>'; } echo '<br /><input type="submit" value="Удалить выбранное" /></form><br />'; page_strnavigation('minichat.php?', $config['chatpost'], $start, $total); echo '<p>Всего сообщений: <b>' . (int) $total . '</b></p>'; if (is_admin(array(101))) { echo '<img src="/images/img/error.gif" alt="image" /> <a href="minichat.php?act=prodel">Очистить</a><br />'; } } else { show_error('Сообщений еще нет!'); } }
if ($start >= $total) { $start = last_page($total, $config['postgallery']); } $is_admin = is_admin(); if ($is_admin) { echo '<form action="index.php?act=delcomm&gid=' . $gid . '&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; } $querycomm = DB::run()->query("SELECT * FROM `commphoto` WHERE `commphoto_gid`=? ORDER BY `commphoto_time` ASC LIMIT " . $start . ", " . $config['postgallery'] . ";", array($gid)); while ($data = $querycomm->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['commphoto_user']) . '</div>'; if ($is_admin) { echo '<span class="imgright"><input type="checkbox" name="del[]" value="' . $data['commphoto_id'] . '" /></span>'; } echo '<b>' . profile($data['commphoto_user']) . '</b> <small>(' . date_fixed($data['commphoto_time']) . ')</small><br />'; echo user_title($data['commphoto_user']) . ' ' . user_online($data['commphoto_user']) . '</div>'; if ($log == $data['commphoto_user'] && $data['commphoto_time'] + 600 > SITETIME) { echo '<div class="right"><a href="index.php?act=editcomm&gid=' . $gid . '&cid=' . $data['commphoto_id'] . '&start=' . $start . '">Редактировать</a></div>'; } echo '<div>' . bb_code($data['commphoto_text']) . '<br />'; if (is_admin() || empty($config['anonymity'])) { echo '<span class="data">(' . $data['commphoto_brow'] . ', ' . $data['commphoto_ip'] . ')</span>'; } echo '</div>'; } if ($is_admin) { echo '<span class="imgright"><input type="submit" value="Удалить выбранное" /></span></form>'; } page_strnavigation('index.php?act=comments&gid=' . $gid . '&', $config['postgallery'], $start, $total); } if (empty($photo['photo_closed'])) {
############################################################################################ ## Главная страница ## ############################################################################################ case 'index': $total = DB::run()->querySingle("SELECT count(*) FROM `contact` WHERE `contact_user`=?;", array($log)); if ($total > 0) { if ($start >= $total) { $start = last_page($total, $config['contactlist']); } $querycontact = DB::run()->query("SELECT * FROM `contact` WHERE `contact_user`=? ORDER BY `contact_time` DESC LIMIT " . $start . ", " . $config['contactlist'] . ";", array($log)); echo '<form action="contact.php?act=del&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; while ($data = $querycontact->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['contact_name']) . '</div>'; echo '<b>' . profile($data['contact_name']) . '</b> <small>(' . date_fixed($data['contact_time']) . ')</small><br />'; echo user_title($data['contact_name']) . ' ' . user_online($data['contact_name']) . '</div>'; echo '<div>'; if (!empty($data['contact_text'])) { echo 'Заметка: ' . $data['contact_text'] . '<br />'; } echo '<input type="checkbox" name="del[]" value="' . $data['contact_id'] . '" /> '; echo '<a href="/pages/private.php?act=submit&uz=' . $data['contact_name'] . '">Написать</a> | '; echo '<a href="/pages/perevod.php?uz=' . $data['contact_name'] . '">Перевод</a> | '; echo '<a href="/pages/contact.php?act=note&id=' . $data['contact_id'] . '">Заметка</a>'; echo '</div>'; } echo '<br /><input type="submit" value="Удалить выбранное" /></form>'; page_strnavigation('contact.php?', $config['contactlist'], $start, $total); echo 'Всего в контактах: <b>' . (int) $total . '</b><br />'; } else { show_error('Контакт-лист пуст!');
<?php #---------------------------------------------# # ********* RotorCMS ********* # # Author : Vantuz # # Email : visavi.net@mail.ru # # Site : http://visavi.net # # ICQ : 36-44-66 # # Skype : vantuzilla # #---------------------------------------------# require_once '../includes/start.php'; require_once '../includes/functions.php'; require_once '../includes/header.php'; header('Content-type: application/json'); header('Content-Disposition: inline; filename="user.json";'); $key = !empty($_REQUEST['key']) ? check($_REQUEST['key']) : null; if (!empty($key)) { $user = DB::run()->queryFetch("SELECT * FROM `users` WHERE `users_apikey`=? LIMIT 1;", array($key)); if (!empty($user)) { echo json_encode(array('login' => $user['users_login'], 'email' => $user['users_email'], 'nickname' => $user['users_nickname'], 'name' => $user['users_name'], 'country' => $user['users_country'], 'city' => $user['users_city'], 'site' => $user['users_site'], 'icq' => $user['users_icq'], 'skype' => $user['users_skype'], 'gender' => $user['users_gender'], 'birthday' => $user['users_birthday'], 'newwall' => $user['users_newwall'], 'point' => $user['users_point'], 'money' => $user['users_money'], 'ban' => $user['users_ban'], 'allprivat' => user_mail($user['users_login']), 'newprivat' => $user['users_newprivat'], 'status' => user_title($user['users_login']), 'avatar' => $config['home'] . '/' . $user['users_avatar'], 'picture' => $user['users_picture'], 'rating' => $user['users_rating'], 'lastlogin' => $user['users_timelastlogin'])); } else { echo json_encode(array('error' => 'nouser')); } } else { echo json_encode(array('error' => 'nokey')); }
$total = DB::run()->querySingle("SELECT count(*) FROM `trash` WHERE `trash_user`=?;", array($log)); $intotal = DB::run()->query("SELECT count(*) FROM `inbox` WHERE `inbox_user`=? UNION ALL SELECT count(*) FROM `outbox` WHERE `outbox_author`=?;", array($log, $log)); $intotal = $intotal->fetchAll(PDO::FETCH_COLUMN); echo '<img src="/images/img/mail.gif" alt="image" /> <a href="private.php">Входящие (' . $intotal[0] . ')</a> / '; echo '<a href="private.php?act=output">Отправленные (' . $intotal[1] . ')</a> / '; echo '<b>Корзина (' . $total . ')</b><hr />'; if ($total > 0) { if ($start >= $total) { $start = last_page($total, $config['privatpost']); } $querypriv = DB::run()->query("SELECT * FROM `trash` WHERE `trash_user`=? ORDER BY `trash_time` DESC LIMIT " . $start . ", " . $config['privatpost'] . ";", array($log)); while ($data = $querypriv->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['trash_author']) . '</div>'; echo '<b>' . profile($data['trash_author']) . '</b> (' . date_fixed($data['trash_time']) . ')<br />'; echo user_title($data['trash_author']) . ' ' . user_online($data['trash_author']) . '</div>'; echo '<div>' . bb_code($data['trash_text']) . '<br />'; echo '<a href="private.php?act=submit&uz=' . $data['trash_author'] . '">Ответить</a> / '; echo '<a href="contact.php?act=add&uz=' . $data['trash_author'] . '&uid=' . $_SESSION['token'] . '">В контакт</a> / '; echo '<a href="ignore.php?act=add&uz=' . $data['trash_author'] . '&uid=' . $_SESSION['token'] . '">Игнор</a></div>'; } page_strnavigation('private.php?act=trash&', $config['privatpost'], $start, $total); echo 'Всего писем: <b>' . (int) $total . '</b><br />'; echo 'Срок хранения: <b>' . $config['expiresmail'] . '</b><br /><br />'; echo '<img src="/images/img/error.gif" alt="image" /> <a href="private.php?act=alltrashdel&uid=' . $_SESSION['token'] . '">Очистить ящик</a><br />'; } else { show_error('Удаленных писем еще нет!'); } break; ############################################################################################ ## Отправка привата ##
} echo '<img src="/images/img/back.gif" alt="image" /> <a href="down.php?act=comments&id=' . $id . '&start=' . $start . '">Вернуться</a><br />'; break; ############################################################################################ ## Ответ на сообщение ## ############################################################################################ ############################################################################################ ## Ответ на сообщение ## ############################################################################################ case 'reply': $pid = abs(intval($_GET['pid'])); echo '<b><big>Ответ на сообщение</big></b><br /><br />'; if (is_user()) { $post = DB::run()->queryFetch("SELECT * FROM `commload` WHERE `commload_id`=? LIMIT 1;", array($pid)); if (!empty($post)) { echo '<div class="b"><img src="/images/img/edit.gif" alt="image" /> <b>' . profile($post['commload_author']) . '</b> ' . user_title($post['commload_author']) . ' ' . user_online($post['commload_author']) . ' <small>(' . date_fixed($post['commload_time']) . ')</small></div>'; echo '<div>Сообщение: ' . bb_code($post['commload_text']) . '</div><hr />'; echo '<div class="form">'; echo '<form action="down.php?act=add&id=' . $id . '&uid=' . $_SESSION['token'] . '" method="post">'; echo 'Сообщение:<br />'; echo '<textarea cols="25" rows="5" name="msg" id="msg">[b]' . nickname($post['commload_author']) . '[/b], </textarea><br />'; echo '<input type="submit" value="Ответить" /></form></div><br />'; } else { show_error('Ошибка! Выбранное вами сообщение для ответа не существует!'); } } else { show_login('Вы не авторизованы, чтобы отвечать на сообщения, необходимо'); } echo '<img src="/images/img/back.gif" alt="image" /> <a href="down.php?act=comments&id=' . $id . '&start=' . $start . '">Вернуться</a><br />'; break; ############################################################################################
foreach ($files as $file) { $forumfiles[$file['file_posts_id']][] = $file; } } // ------------------------------------- // echo '<form action="forum.php?act=delposts&tid=' . $tid . '&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; echo '<div align="right" class="form">'; echo '<b><label for="all">Отметить все</label></b> <input type="checkbox" id="all" onchange="var o=this.form.elements;for(var i=0;i<o.length;i++)o[i].checked=this.checked" /> '; echo '</div>'; foreach ($posts as $key => $data) { $num = $start + $key + 1; echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['posts_user']) . '</div>'; echo '<span class="imgright"><a href="forum.php?act=editpost&tid=' . $tid . '&pid=' . $data['posts_id'] . '&start=' . $start . '">Ред.</a> <input type="checkbox" name="del[]" value="' . $data['posts_id'] . '" /></span>'; echo $num . '. <b>' . profile($data['posts_user']) . '</b> <small>(' . date_fixed($data['posts_time']) . ')</small><br />'; echo user_title($data['posts_user']) . ' ' . user_online($data['posts_user']) . '</div>'; echo '<div>' . bb_code($data['posts_text']) . '<br />'; // -- Прикрепленные файлы -- // if (!empty($forumfiles)) { if (isset($forumfiles[$data['posts_id']])) { echo '<div class="hiding"><i class="fa fa-paperclip"></i> <b>Прикрепленные файлы:</b><br />'; foreach ($forumfiles[$data['posts_id']] as $file) { $ext = getExtension($file['file_hash']); echo '<img src="/images/icons/' . icons($ext) . '" alt="image" /> '; echo '<a href="/upload/forum/' . $file['file_topics_id'] . '/' . $file['file_hash'] . '" target="_blank">' . $file['file_name'] . '</a> (' . formatsize($file['file_size']) . ')<br />'; } echo '</div>'; } } // --------------------------// if (!empty($data['posts_edit'])) {
<b><big>Ответ на сообщение</big></b><br /><br /> <div class="b"> <img src="/images/img/edit.gif" alt="image" /> <b><?php echo profile($post['commblog_author']); ?> </b> <?php echo user_title($post['commblog_author']); ?> <?php echo user_online($post['commblog_author']); ?> <small>(<?php echo date_fixed($post['commblog_time']); ?> )</small> </div> <div> Сообщение: <?php echo bb_code($post['commblog_text']); ?> </div><hr /> <div class="form"> <form action="blog.php?act=add&id=<?php echo $id; ?> &uid=<?php echo $_SESSION['token']; ?> " method="post">
############################################################################################ ## Главная страница ## ############################################################################################ case 'index': $total = DB::run()->querySingle("SELECT count(*) FROM `ignore` WHERE `ignore_user`=?;", array($log)); if ($total > 0) { if ($start >= $total) { $start = last_page($total, $config['ignorlist']); } $queryignor = DB::run()->query("SELECT * FROM `ignore` WHERE `ignore_user`=? ORDER BY `ignore_time` DESC LIMIT " . $start . ", " . $config['ignorlist'] . ";", array($log)); echo '<form action="ignore.php?act=del&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; while ($data = $queryignor->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['ignore_name']) . '</div>'; echo '<b>' . profile($data['ignore_name']) . '</b> <small>(' . date_fixed($data['ignore_time']) . ')</small><br />'; echo user_title($data['ignore_name']) . ' ' . user_online($data['ignore_name']) . '</div>'; echo '<div>'; if (!empty($data['ignore_text'])) { echo 'Заметка: ' . $data['ignore_text'] . '<br />'; } echo '<input type="checkbox" name="del[]" value="' . $data['ignore_id'] . '" /> '; echo '<a href="private.php?act=submit&uz=' . $data['ignore_name'] . '">Написать</a> | '; echo '<a href="ignore.php?act=note&id=' . $data['ignore_id'] . '">Заметка</a>'; echo '</div>'; } echo '<br /><input type="submit" value="Удалить выбранное" /></form>'; page_strnavigation('ignore.php?', $config['ignorlist'], $start, $total); echo 'Всего в игноре: <b>' . (int) $total . '</b><br />'; } else { show_error('Игнор-лист пуст!'); }
if ($start >= $total) { $start = 0; } $queryusers = DB::run()->query("SELECT * FROM `users` ORDER BY `users_point` DESC, `users_login` ASC LIMIT " . $start . ", " . $config['userlist'] . ";"); $i = 0; while ($data = $queryusers->fetch()) { ++$i; echo '<div class="b"> '; echo '<div class="img">' . user_avatars($data['users_login']) . '</div>'; if ($uz == $data['users_login']) { echo $start + $i . '. <b><big>' . profile($data['users_login'], '#ff0000') . '</big></b> '; } else { echo $start + $i . '. <b>' . profile($data['users_login']) . '</b> '; } echo '(' . points($data['users_point']) . ')<br />'; echo user_title($data['users_login']) . ' ' . user_online($data['users_login']); echo '</div>'; echo '<div>'; echo 'Форум: ' . $data['users_allforum'] . ' | Гостевая: ' . $data['users_allguest'] . ' | Коммент: ' . $data['users_allcomments'] . '<br />'; echo 'Посещений: ' . $data['users_visits'] . '<br />'; echo 'Деньги: ' . user_money($data['users_login']) . '<br />'; echo 'Дата регистрации: ' . date_fixed($data['users_joined'], 'j F Y') . '</div>'; } page_strnavigation('userlist.php?', $config['userlist'], $start, $total); echo '<div class="form">'; echo '<b>Поиск пользователя:</b><br />'; echo '<form action="userlist.php?act=search&start=' . $start . '" method="post">'; echo '<input type="text" name="uz" value="' . $log . '" />'; echo '<input type="submit" value="Искать" /></form></div><br />'; echo 'Всего пользователей: <b>' . $total . '</b><br /><br />'; } else {
$start = last_page($total, $config['postnews']); } $is_admin = is_admin(); if ($is_admin) { echo '<form action="index.php?act=del&id=' . $id . '&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; } $querycomm = DB::run()->query("SELECT * FROM `commnews` WHERE `commnews_news_id`=? ORDER BY `commnews_time` ASC LIMIT " . $start . ", " . $config['postnews'] . ";", array($id)); while ($data = $querycomm->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['commnews_author']) . '</div>'; if ($is_admin) { echo '<span class="imgright"><input type="checkbox" name="del[]" value="' . $data['commnews_id'] . '" /></span>'; } echo '<b>' . profile($data['commnews_author']) . '</b>'; echo '<small> (' . date_fixed($data['commnews_time']) . ')</small><br />'; echo user_title($data['commnews_author']) . ' ' . user_online($data['commnews_author']) . '</div>'; echo '<div>' . bb_code($data['commnews_text']) . '<br />'; if (is_admin() || empty($config['anonymity'])) { echo '<span class="data">(' . $data['commnews_brow'] . ', ' . $data['commnews_ip'] . ')</span>'; } echo '</div>'; } if ($is_admin) { echo '<span class="imgright"><input type="submit" value="Удалить выбранное" /></span></form>'; } page_strnavigation('index.php?act=comments&id=' . $id . '&', $config['postnews'], $start, $total); } if (empty($datanews['news_closed'])) { if ($total) { show_error('Комментариев еще нет!'); }
</b> <small>(<?php echo date_fixed($data['guest_time']); ?> )</small> <?php } else { ?> <b><?php echo profile($data['guest_user']); ?> </b> <small>(<?php echo date_fixed($data['guest_time']); ?> )</small><br /> <?php echo user_title($data['guest_user']); ?> <?php echo user_online($data['guest_user']); ?> <?php } ?> </div> <div class="message"><?php echo bb_code($data['guest_text']); ?> </div> <?php
<?php } ?> <?php echo $num; ?> . <b><?php echo profile($data['posts_user']); ?> </b> <small>(<?php echo date_fixed($data['posts_time']); ?> )</small><br /> <?php echo user_title($data['posts_user']); ?> <?php echo user_online($data['posts_user']); ?> </div> <div class="message"><?php echo bb_code($data['posts_text']); ?> </div> <?php if (!empty($topics['posts_files'])) { ?>
if ($data[1] == 'Вундер-киндер') { $useravatars = '<img src="img/mag.gif" alt="image" /> '; $useronline = '<img src="/images/img/on.gif" alt="image">'; } if ($data[1] == 'Настюха') { $useravatars = '<img src="img/bot.gif" alt="image" /> '; $useronline = '<img src="/images/img/on.gif" alt="image">'; } if ($data[1] == 'Весельчак') { $useravatars = '<img src="img/shut.gif" alt="image" /> '; $useronline = '<img src="/images/img/on.gif" alt="image">'; } echo '<div class="b">'; echo '<div class="img">' . $useravatars . '</div>'; echo '<b><a href="index.php?name=' . nickname($data[1]) . '#form">' . nickname($data[1]) . '</a></b> <small>(' . date_fixed($data[3]) . ')</small><br />'; echo user_title($data[1]) . ' ' . $useronline . '</div>'; echo '<div>' . bb_code($data[0]) . '<br />'; if (is_admin() || empty($config['anonymity'])) { echo '<span class="data">(' . $data[4] . ', ' . $data[5] . ')</span></div>'; } } page_strnavigation('index.php?', $config['chatpost'], $start, $total); } else { show_error('Сообщений нет, будь первым!'); } if (is_user()) { echo '<div class="form" id="form">'; echo '<form action="index.php?act=add" method="post">'; echo '<b>Сообщение:</b><br />'; echo '<textarea id="markItUp" cols="25" rows="5" name="msg">' . $name . '</textarea><br />'; echo '<input type="submit" value="Добавить" /></form></div>';
#-----------------------------------------------------# require_once "../includes/start.php"; require_once "../includes/functions.php"; require_once "../includes/header.php"; include_once "../themes/" . $config['themes'] . "/index.php"; if (isset($_GET['uz']) && $_GET['uz'] != "") { $uz = check($_GET['uz']); } else { $uz = check($log); } if (isset($_GET['menu'])) { $menu = (int) $_GET['menu']; } else { $menu = ""; } echo '<div class="b"><img src="../images/img/partners.gif" alt="image" /> <b>Анкета ' . nickname($uz) . ' </b> ' . user_title($uz) . user_visit($uz) . '</div><br />'; if (preg_match('|^[a-z0-9\\-]+$|i', $uz)) { if (file_exists(DATADIR . "profil/{$uz}.prof")) { $text = file_get_contents(DATADIR . "profil/{$uz}.prof"); $uzdata = explode(":||:", $text); if ($uzdata[46] == 1) { echo '<b><span style="color:#ff0000">Внимание, аккаунт требует подтверждение регистрации!</span></b><br />'; } if ($uzdata[37] == 1 && $uzdata[38] > SITETIME) { echo '<b><span style="color:#ff0000">Внимание, юзер находится в бане!</span></b><br />'; echo 'До окончания бана осталось ' . formattime($uzdata[38] - SITETIME) . '<br />'; echo 'Причина: ' . $uzdata[39] . '<br />'; } echo 'Аватар: ' . user_avatars($uz) . '<br />'; if ($uzdata[72] !== "" && file_exists(DATADIR . "datagallery/{$uzdata['72']}")) { echo 'Фото: <a href="../gallery/index.php?action=showimg&gid=' . $uzdata[72] . '&' . SID . '">';
echo '<a href="/pages/smiles.php">Смайлы</a> / '; echo '<a href="/pages/tags.php">Теги</a><hr />'; $total = DB::run()->querySingle("SELECT count(*) FROM `chat`;"); if ($udata['users_newchat'] != stats_newchat()) { DB::run()->query("UPDATE `users` SET `users_newchat`=? WHERE `users_login`=? LIMIT 1;", array(stats_newchat(), $log)); } if ($total > 0) { if ($start >= $total) { $start = last_page($total, $config['chatpost']); } $querychat = DB::run()->query("SELECT * FROM `chat` ORDER BY `chat_time` DESC LIMIT " . $start . ", " . $config['chatpost'] . ";"); while ($data = $querychat->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['chat_user']) . '</div>'; echo '<b>' . profile($data['chat_user']) . '</b> <small>(' . date_fixed($data['chat_time']) . ')</small><br />'; echo user_title($data['chat_user']) . ' ' . user_online($data['chat_user']) . '</div>'; if ($log != $data['chat_user']) { echo '<div class="right">'; echo '<a href="chat.php?act=reply&id=' . $data['chat_id'] . '&start=' . $start . '">Отв</a> / '; echo '<a href="chat.php?act=quote&id=' . $data['chat_id'] . '&start=' . $start . '">Цит</a></div>'; } if ($log == $data['chat_user'] && $data['chat_time'] + 600 > SITETIME) { echo '<div class="right"><a href="chat.php?act=edit&id=' . $data['chat_id'] . '&start=' . $start . '">Редактировать</a></div>'; } echo '<div>' . bb_code($data['chat_text']) . '<br />'; if (!empty($data['chat_edit'])) { echo '<img src="/images/img/exclamation_small.gif" alt="image" /> <small>Отредактировано: ' . nickname($data['chat_edit']) . ' (' . date_fixed($data['chat_edit_time']) . ')</small><br />'; } echo '<span class="data">(' . $data['chat_brow'] . ', ' . $data['chat_ip'] . ')</span>'; echo '</div>'; }
echo $data['commblog_id']; ?> " /></span> <?php } ?> <b><?php echo profile($data['commblog_author']); ?> </b> <small>(<?php echo date_fixed($data['commblog_time']); ?> )</small><br /> <?php echo user_title($data['commblog_author']); ?> <?php echo user_online($data['commblog_author']); ?> </div> <?php if (!empty($log) && $log != $data['commblog_author']) { ?> <div class="right"> <a href="blog.php?act=reply&id=<?php echo $blogs['blogs_id']; ?> &pid=<?php echo $data['commblog_id'];
if ($data['users_ban'] == 1 && $data['users_timeban'] > SITETIME) { echo '<div class="form">'; echo '<b><span style="color:#ff0000">Внимание, юзер находится в бане!</span></b><br />'; echo 'До окончания бана осталось ' . formattime($data['users_timeban'] - SITETIME) . '<br />'; echo 'Причина: ' . bb_code($data['users_reasonban']) . '</div>'; } if ($data['users_level'] >= 101 && $data['users_level'] <= 105) { echo '<div class="info">Должность: <b>' . user_status($data['users_level']) . '</b></div>'; } if (!empty($data['users_picture']) && file_exists(BASEDIR . '/upload/photos/' . $data['users_picture'])) { echo '<a class="pull-right" href="/upload/photos/' . $data['users_picture'] . '">'; echo resize_image('upload/photos/', $data['users_picture'], $config['previewsize'], array('alt' => nickname($data['users_login']), 'class' => 'img-responsive img-rounded')) . '</a>'; } else { echo '<img src="/images/img/photo.jpg" alt="Фото" class="pull-right img-responsive img-rounded" />'; } echo 'Cтатус: <b><a href="statusfaq.php">' . user_title($data['users_login']) . '</a></b><br />'; echo user_gender($data['users_login']) . 'Пол: '; echo $data['users_gender'] == 1 ? 'Мужской <br />' : 'Женский<br />'; echo 'Логин: <b>' . $data['users_login'] . '</b><br />'; if (!empty($data['users_nickname'])) { echo 'Ник: <b>' . $data['users_nickname'] . '</b><br />'; } if (!empty($data['users_name'])) { echo 'Имя: <b>' . $data['users_name'] . '<br /></b>'; } if (!empty($data['users_country'])) { echo 'Страна: <b>' . $data['users_country'] . '<br /></b>'; } if (!empty($data['users_city'])) { echo 'Откуда: ' . $data['users_city'] . '<br />'; }
} if ($total < $start + $config['postgallery']) { $end = $total; } else { $end = $start + $config['postgallery']; } for ($i = $start; $i < $end; $i++) { $data = explode("|", $file[$i]); $num = $total - $i - 1; $data[0] = bb_code($data[0]); echo '<div class="b"> '; if ($is_admin) { echo '<input type="checkbox" name="del[]" value="' . $num . '" /> '; } echo user_avatars($data[3]); echo '<b><a href="../pages/anketa.php?uz=' . $data[3] . '&' . SID . '"> ' . nickname($data[3]) . ' </a></b> ' . user_title($data[3]) . user_online($data[3]); echo '<small> (' . date_fixed($data[2]) . ')</small></div>'; echo '<div>' . $data[0] . '</div>'; } if ($is_admin) { echo '<br /><input type="submit" value="Удалить выбранное" /></form>'; } page_jumpnavigation('index.php?action=komm&gid=' . $gid . '&', $config['postgallery'], $start, $total); page_strnavigation('index.php?action=komm&gid=' . $gid . '&', $config['postgallery'], $start, $total); } else { show_error('Комментариев еще нет, будь первым!'); } } else { show_error('Комментариев еще нет, будь первым!'); } } else {
$useravatars = user_avatars($data[1]); if ($data[1] == 'Вундер-киндер') { $useravatars = '<img src="../images/img/mag.gif" alt="image" /> '; $useronline = '<span style="color:#00ff00">[On]</span>'; } if ($data[1] == 'Настюха') { $useravatars = '<img src="../images/img/bot.gif" alt="image" /> '; $useronline = '<span style="color:#00ff00">[On]</span>'; } if ($data[1] == 'Весельчак') { $useravatars = '<img src="../images/img/shut.gif" alt="image" /> '; $useronline = '<span style="color:#00ff00">[On]</span>'; } echo '<div class="b">'; echo $useravatars; echo '<b><a href="index.php?imja=' . safe_encode(nickname($data[1])) . '&' . SID . '#form">' . nickname($data[1]) . '</a></b> ' . user_title($data[1]) . $useronline . ' <small>(' . date_fixed($data[3]) . ')</small></div>'; echo '<div>' . bb_code($data[0]) . '<br />'; echo '<span class="data">(' . $data[4] . ', ' . $data[5] . ')</span></div>'; } page_jumpnavigation('index.php?', $config['chatpost'], $start, $total); page_strnavigation('index.php?', $config['chatpost'], $start, $total); } else { show_error('Сообщений нет, будь первым!'); } if (is_user()) { echo '<br /><div class="form" id="form">'; echo '<form action="add.php?' . SID . '" method="post">'; echo '<b>Сообщение:</b><br />'; echo '<textarea cols="20" rows="3" name="msg">' . $imja . '</textarea><br />'; echo '<input type="submit" value="Добавить" /></form></div>'; } else {
} $is_admin = is_admin(); if ($is_admin) { echo '<form action="wall.php?act=del&uz=' . $uz . '&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; } elseif ($uz == $log) { echo '<form action="wall.php?act=delete&uz=' . $uz . '&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; } $querywall = DB::run()->query("SELECT * FROM `wall` WHERE `wall_user`=? ORDER BY `wall_time` DESC LIMIT " . $start . ", " . $config['wallpost'] . ";", array($uz)); while ($data = $querywall->fetch()) { echo '<div class="b">'; echo '<div class="img">' . user_avatars($data['wall_login']) . '</div>'; if ($is_admin || $uz == $log) { echo '<span class="imgright"><input type="checkbox" name="del[]" value="' . $data['wall_id'] . '" /></span>'; } echo '<b>' . profile($data['wall_login']) . '</b> <small>(' . date_fixed($data['wall_time']) . ')</small><br />'; echo user_title($data['wall_login']) . ' ' . user_online($data['wall_login']) . '</div>'; if ($uz == $log && $log != $data['wall_login']) { echo '<div class="right">'; echo '<a href="private.php?act=submit&uz=' . $data['wall_login'] . '">Приват</a> / '; echo '<a href="wall.php?uz=' . $data['wall_login'] . '">Стена</a> / '; echo '<noindex><a href="wall.php?act=spam&id=' . $data['wall_id'] . '&start=' . $start . '&uid=' . $_SESSION['token'] . '" onclick="return confirm(\'Вы подтверждаете факт спама?\')" rel="nofollow">Спам</a></noindex></div>'; } echo '<div>' . bb_code($data['wall_text']) . '</div>'; } if ($is_admin || $uz == $log) { echo '<span class="imgright"><input type="submit" value="Удалить выбранное" /></span></form>'; } page_strnavigation('wall.php?uz=' . $uz . '&', $config['wallpost'], $start, $total); } else { show_error('Записок еще нет!'); }
} } else { show_error('Сообщений еще нет!'); } break; ############################################################################################ ## Ответ ## ############################################################################################ ############################################################################################ ## Ответ ## ############################################################################################ case 'reply': $data = DB::run()->queryFetch("SELECT * FROM guest WHERE guest_id=? LIMIT 1;", array($id)); if (!empty($data)) { echo '<b><big>Добавление ответа</big></b><br /><br />'; echo '<div class="b"><img src="/images/img/edit.gif" alt="image" /> <b>' . profile($data['guest_user']) . '</b> ' . user_title($data['guest_user']) . user_online($data['guest_user']) . ' <small>(' . date_fixed($data['guest_time']) . ')</small></div>'; echo '<div>Сообщение: ' . bb_code($data['guest_text']) . '</div><hr />'; echo '<div class="form">'; echo '<form action="book.php?id=' . $id . '&act=addreply&start=' . $start . '&uid=' . $_SESSION['token'] . '" method="post">'; echo 'Cообщение:<br />'; echo '<textarea cols="25" rows="5" name="reply">' . $data['guest_reply'] . '</textarea>'; echo '<br /><input type="submit" value="Ответить" /></form></div><br />'; } else { show_error('Ошибка! Сообщения для ответа не существует!'); } echo '<img src="/images/img/back.gif" alt="image" /> <a href="book.php?start=' . $start . '">Вернуться</a><br />'; break; ############################################################################################ ## Добавление ответа ## ############################################################################################ ############################################################################################
$useravatars = user_avatars($data[1]); if ($data[1] == 'Вундер-киндер') { $useravatars = '<img src="../images/img/mag.gif" alt="image" /> '; $useronline = '<span style="color:#00ff00">[On]</span>'; } if ($data[1] == 'Настюха') { $useravatars = '<img src="../images/img/bot.gif" alt="image" /> '; $useronline = '<span style="color:#00ff00">[On]</span>'; } if ($data[1] == 'Весальчак') { $useravatars = '<img src="../images/img/shut.gif" alt="image" /> '; $useronline = '<span style="color:#00ff00">[On]</span>'; } echo '<div class="b">'; echo $useravatars; echo '<b><a href="../pages/anketa.php?uz=' . $data[1] . '&' . SID . '"> ' . nickname($data[1]) . '</a></b> ' . user_title($data[1]) . $useronline . ' <small> (' . date_fixed($data[3]) . ')</small><br />'; echo '<input type="checkbox" name="del[]" value="' . $num . '" /> '; echo '<a href="chat.php?action=edit&id=' . $num . '&start=' . $start . '&' . SID . '">Редактировать</a>'; echo '</div><div>' . bb_code($data[0]) . '<br />'; echo '<span style="color:#cc00cc"><small>(' . $data[4] . ', ' . $data[5] . ')</small></span></div>'; } echo '<br /><input type="submit" value="Удалить выбранное" /></form>'; page_jumpnavigation('chat.php?', $config['chatpost'], $start, $total); page_strnavigation('chat.php?', $config['chatpost'], $start, $total); echo '<br /><br />Всего сообщений: <b>' . (int) $total . '</b><br />'; if (is_admin(array(101))) { echo '<br /><img src="../images/img/error.gif" alt="image" /> <a href="chat.php?action=prodel&' . SID . '">Очистить</a><br />'; echo '<img src="../images/img/reload.gif" alt="image" /> <a href="chat.php?action=restatement&uid=' . $_SESSION['token'] . '&' . SID . '">Пересчитать</a>'; } } else { echo '<img src="../images/img/reload.gif" alt="image" /> <b>Сообщений еще нет!</b><br />';
function custom_users($matches = array()) { global $db, $_TIME, $config, $lang, $user_group, $user_conf, $news_date, $member_id, $nav; if (!count($matches)) { return ""; } $yes_no_map = array("yes" => "1", "no" => "0"); $param_str = trim($matches[1]); $thisdate = strtotime(date("Y-m-d H:i:s", $_TIME)); $where = array(); if (preg_match("#template=['\"](.+?)['\"]#i", $param_str, $match)) { $comm_tpl = trim($match[1]); } else { return ""; } if (preg_match("#id=['\"](.+?)['\"]#i", $param_str, $match)) { $temp_array = array(); $where_id = array(); $match[1] = explode(',', trim($match[1])); foreach ($match[1] as $value) { if (count(explode('-', $value)) == 2) { $value = explode('-', $value); $where_id[] = "u.user_id >= '" . intval($value[0]) . "' AND u.user_id <= '" . intval($value[1]) . "'"; } else { $temp_array[] = intval($value); } } if (count($temp_array)) { $where_id[] = "u.user_id IN ('" . implode("','", $temp_array) . "')"; } if (count($where_id)) { $custom_id = implode(' OR ', $where_id); $where[] = $custom_id; } } if (preg_match("#group=['\"](.+?)['\"]#i", $param_str, $match)) { $temp_array = array(); $where_id = array(); $match[1] = explode(',', trim($match[1])); foreach ($match[1] as $value) { if (count(explode('-', $value)) == 2) { $value = explode('-', $value); $where_id[] = "u.user_group >= '" . intval($value[0]) . "' AND u.user_group <= '" . intval($value[1]) . "'"; } else { $temp_array[] = intval($value); } } if (count($temp_array)) { $where_id[] = "u.user_group IN ('" . implode("','", $temp_array) . "')"; } if (count($where_id)) { $custom_id = implode(' OR ', $where_id); $where[] = $custom_id; } } if (preg_match("#online=['\"](.+?)['\"]#i", $param_str, $match)) { if ($match[1] == "yes") { $where[] = "u.lastdate+1200 > {$_TIME} "; } else { $where[] = "u.lastdate+1200 <= {$_TIME} "; } } if (preg_match("#from=['\"](.+?)['\"]#i", $param_str, $match)) { $user_from = intval($match[1]); $custom_all = $custom_from; } else { $user_from = 0; $custom_all = 0; } if (preg_match("#limit=['\"](.+?)['\"]#i", $param_str, $match)) { $user_limit = intval($match[1]); } else { $user_limit = $config['comm_nummers']; } if (preg_match("#order=['\"](.+?)['\"]#i", $param_str, $match)) { $allowed_order = array('news' => 'news_num', 'comment' => 'comm_num', 'group' => 'user_group', 'lastdate' => 'lastdate', 'regdate' => 'reg_date', 'nick' => 'name', 'rand' => 'RAND()'); if ($allowed_order[$match[1]]) { $user_order = $allowed_order[$match[1]]; } } if (!$user_order) { $user_order = "reg_date"; } if (preg_match("#sort=['\"](.+?)['\"]#i", $param_str, $match)) { $allowed_sort = array('asc' => 'ASC', 'desc' => 'DESC'); if ($allowed_sort[$match[1]]) { $user_sort = $allowed_sort[$match[1]]; } } if (!$user_sort) { $user_order = "ASC"; } if (preg_match("#cache=['\"](.+?)['\"]#i", $param_str, $match)) { $user_cache = $yes_no_map[$match[1]]; } else { $user_cache = "0"; } if (preg_match("#not=['\"](.+?)['\"]#i", $param_str, $match)) { $not_found = $db->safesql($match[1]); } else { $not_found = ""; } if (preg_match("#friends=['\"](.+?)['\"]#i", $param_str, $match)) { $fids = array(); if ($match[1] == "current") { $friend_que = $db->query("SELECT friend_id FROM " . PREFIX . "_users_friends WHERE user_id = '{$member_id['user_id']}' AND approve = '1'"); while ($row = $db->get_row($friend_que)) { $fids[] = $row['friend_id']; } } else { if ($match[1] == "profile") { $friend_que = $db->query("SELECT f.friend_id FROM " . PREFIX . "_users_friends f LEFT JOIN " . PREFIX . "_users u ON ( u.user_id = f.user_id ) WHERE u.name = '{$_REQUEST['user']}' AND f.approve = '1'"); while ($row = $db->get_row($friend_que)) { $fids[] = $row['friend_id']; } } } if (count($fids) > 0) { $where[] = "u.user_id IN ('" . implode("','", $fids) . "')"; } else { $where[] = "u.user_id = '0'"; } } else { $user_friends = false; } if (preg_match("#xfield=['\"](.+?)['\"]#i", $param_str, $match)) { $_temp = explode(",", $match[1]); $_rules = array(); foreach ($_temp as $_temp2) { if (strpos($_temp2, "this.") !== False && isset($member_id)) { $_temp3 = explode(":", $_temp2); $_temp4 = trim(str_replace("this.", "", $_temp3[1])); unset($_temp3); $_thisxf = xfieldsdataload($member_id['xfields']); if (array_key_exists($_temp4, $_thisxf)) { $_rules[] = "u.xfields LIKE '%" . $_temp4 . "|" . $_thisxf[$_temp4] . "%'"; } } else { $_rules[] = "u.xfields LIKE '%" . str_replace(":", "|", $_temp2) . "%'"; } } if (count($_rules) > 0) { $where[] = "( " . implode(" AND ", $_rules) . " )"; $use_xfield = True; } } else { $use_xfield = False; } $user_yes = false; $user_cols = array("email", "name", "user_id", "news_num", "comm_num", "user_group", "lastdate", "reg_date", "signature", "foto", "fullname", "land", "logged_ip"); if ($user_conf['sel_xfields']) { $user_cols[] = "xfields"; } $_WHERE = count($where) > 0 ? " WHERE " . implode(' AND ', $where) : ""; $build_navigation = false; if (isset($_GET['cstart'])) { $cstart = intval($_GET['cstart']); } else { $cstart = 0; } if (preg_match("#navigation=['\"](.+?)['\"]#i", $param_str, $match)) { if ($match[1] == "yes" and $url_page !== false) { $build_navigation = true; $custom_limit = $user_limit; //if ( $cstart > 10 ) $config['allow_cache'] = false; if ($cstart) { $cstart = $cstart - 1; $cstart = $cstart * $custom_limit + $user_from; $user_from = $cstart; } $count_que = $db->super_query("SELECT COUNT(u.name) as total FROM " . PREFIX . "_users u{$_WHERE} ORDER BY {$user_order} {$user_sort}"); $count_all = $count_que['total']; } else { $build_navigation = false; } } else { $build_navigation = false; } $user_sql = "SELECT u." . implode(", u.", $user_cols) . " FROM " . PREFIX . "_users u{$_WHERE} ORDER BY {$user_order} {$user_sort} LIMIT {$user_from},{$user_limit}"; $user_que = $db->query($user_sql); if ($user_cache) { $user_cacheid = $param_str . $user_sql . $member_id['user_group'] . $build_navigation . $cstart . implode("|", $user_conf); $cache_content = dle_cache("news_ucustom", $user_cacheid, true); } else { $cache_content = false; } if (!$cache_content) { $tpl = new dle_template(); $tpl->dir = TEMPLATE_DIR; // Build navigation - start $url_page =& $nav['url_page']; $user_query =& $nav['user_query']; if ($build_navigation and $count_all) { $tpl->load_template('navigation.tpl'); $no_prev = false; $no_next = false; if (isset($_GET['cstart'])) { $cstart = intval($_GET['cstart']); } else { $cstart = 1; } if (isset($cstart) and $cstart != "" and $cstart > 1) { $prev = $cstart - 1; if ($config['allow_alt_url']) { $prev_page = $prev == 1 ? $url_page . "/" : $url_page . "/page/" . $prev . "/"; $tpl->set_block("'\\[prev-link\\](.*?)\\[/prev-link\\]'si", "<a href=\"" . $prev_page . "\">\\1</a>"); } else { $prev_page = $prev == 1 ? $PHP_SELF . "?" . $user_query : $PHP_SELF . "?cstart=" . $prev . "&" . $user_query; $tpl->set_block("'\\[prev-link\\](.*?)\\[/prev-link\\]'si", "<a href=\"" . $prev_page . "\">\\1</a>"); } } else { $tpl->set_block("'\\[prev-link\\](.*?)\\[/prev-link\\]'si", "<span>\\1</span>"); $no_prev = TRUE; } if ($custom_limit) { $pages = ""; if ($count_all > $custom_limit) { $enpages_count = @ceil($count_all / $custom_limit); if ($enpages_count <= 10) { for ($j = 1; $j <= $enpages_count; $j++) { if ($j != $cstart) { if ($config['allow_alt_url']) { $pages .= $j == 1 ? "<a href=\"" . $url_page . "/\">{$j}</a> " : "<a href=\"" . $url_page . "/page/" . $j . "/\">{$j}</a>"; } else { $pages .= $j == 1 ? "<a href=\"{$PHP_SELF}?{$user_query}\">{$j}</a> " : "<a href=\"{$PHP_SELF}?{$user_query}&cstart={$j}\">{$j}</a>"; } } else { $pages .= "<span>{$j}</span> "; } } } else { $start = 1; $end = 10; $nav_prefix = "<span class=\"nav_ext\">{$lang['nav_trennen']}</span> "; if ($cstart > 0) { if ($cstart > 6) { $start = $cstart - 4; $end = $start + 8; if ($end >= $enpages_count) { $start = $enpages_count - 9; $end = $enpages_count - 1; $nav_prefix = ""; } else { $nav_prefix = "<span class=\"nav_ext\">{$lang['nav_trennen']}</span> "; } } } if ($start >= 2) { $pages .= $config['allow_alt_url'] ? "<a href=\"" . $url_page . "/\">1</a> <span class=\"nav_ext\">{$lang['nav_trennen']}</span> " : "<a href=\"{$PHP_SELF}?{$user_query}\">1</a> <span class=\"nav_ext\">{$lang['nav_trennen']}</span> "; } for ($j = $start; $j <= $end; $j++) { if ($j != $cstart) { if ($config['allow_alt_url']) { $pages .= $j == 1 ? "<a href=\"" . $url_page . "/\">{$j}</a> " : "<a href=\"" . $url_page . "/page/" . $j . "/\">{$j}</a> "; } else { $pages .= $j == 1 ? "<a href=\"{$PHP_SELF}?{$user_query}\">{$j}</a> " : "<a href=\"{$PHP_SELF}?{$user_query}&cstart={$j}\">{$j}</a> "; } } else { $pages .= "<span>{$j}</span> "; } } if ($cstart != $enpages_count) { $pages .= $config['allow_alt_url'] ? $nav_prefix . "<a href=\"" . $url_page . "/page/{$enpages_count}/\">{$enpages_count}</a>" : $nav_prefix . "<a href=\"{$PHP_SELF}?{$user_query}&cstart={$enpages_count}\">{$enpages_count}</a>"; } else { $pages .= "<span>{$enpages_count}</span> "; } } } $tpl->set('{pages}', $pages); } if ($custom_limit and $custom_limit < $count_all and $cstart < $enpages_count) { $next_page = $cstart + 1; $next = $config['allow_alt_url'] ? $url_page . '/page/' . $next_page . '/' : $PHP_SELF . "?" . $user_query . "&cstart=" . $next_page; $tpl->set_block("'\\[next-link\\](.*?)\\[/next-link\\]'si", "<a href=\"" . $next . "\">\\1</a>"); } else { $tpl->set_block("'\\[next-link\\](.*?)\\[/next-link\\]'si", "<span>\\1</span>"); $no_next = TRUE; } if (!$no_prev or !$no_next) { $tpl->compile('navi'); } $tpl->clear(); } // Build navigation - end $tpl->load_template($comm_tpl . '.tpl'); while ($user_row = $db->get_row($user_que)) { $user_yes = true; $news_row = false; if ($user_conf['sel_news_info']) { $news_row = $db->super_query("SELECT id, title, category, alt_name, date FROM " . PREFIX . "_post WHERE autor = '{$user_row['name']}' ORDER BY date DESC LIMIT 0,1"); if ($news_row) { if (preg_match("#\\{news-title limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { $count = intval($matches[1]); $tpl->set($matches[0], user_title($count, $news_row['title'])); } else { $tpl->set('{news-title}', strip_tags(stripslashes($news_row['title']))); } $tpl->set('{news-link}', user_fulllink($news_row['post_id'], $news_row['category'], $news_row['alt_name'], $news_row['pdate'])); $tpl->set('{news-cat}', get_categories($news_row['category'])); $news_date = strtotime($news_row['date']); $tpl->copy_template = preg_replace_callback("#\\{news-date=(.+?)\\}#i", "user_formdate", $tpl->copy_template); $tpl->set('{news-date}', $news_row['date']); $tpl->set('{news-id}', $news_row['id']); } } if ($user_row['lastdate'] + 1200 > $_TIME) { $tpl->set('[online]', ""); $tpl->set('[/online]', ""); $tpl->set_block("'\\[offline\\](.*?)\\[/offline\\]'si", ""); } else { $tpl->set('[offline]', ""); $tpl->set('[/offline]', ""); $tpl->set_block("'\\[online\\](.*?)\\[/online\\]'si", ""); } $news_date = $user_row['reg_date']; $tpl->copy_template = preg_replace_callback("#\\{reg-date=(.+?)\\}#i", "user_formdate", $tpl->copy_template); $tpl->set('{reg-date}', date("d.m.Y H:i:s", $news_date)); $news_date = $user_row['lastdate']; $tpl->copy_template = preg_replace_callback("#\\{last-date=(.+?)\\}#i", "user_formdate", $tpl->copy_template); $tpl->set('{last-date}', date("d.m.Y H:i:s", $news_date)); if (count(explode("@", $user_row['foto'])) == 2) { $tpl->set('{foto}', 'http://www.gravatar.com/avatar/' . md5(trim($user_row['foto'])) . '?s=' . intval($user_group[$user_row['user_group']]['max_foto'])); } else { if ($user_row['foto'] && $config['version_id'] < "10.5") { if (file_exists(ROOT_DIR . "/uploads/fotos/" . $user_row['foto'])) { $tpl->set('{foto}', $config['http_home_url'] . "uploads/fotos/" . $comm_row['foto']); } else { $tpl->set('{foto}', "{THEME}/dleimages/noavatar.png"); } } else { if ($user_row['foto'] && $config['version_id'] >= "10.5") { $tpl->set('{foto}', $user_row['foto']); } else { $tpl->set('{foto}', "{THEME}/dleimages/noavatar.png"); } } } if ($user_conf['sel_xfields']) { $xf = xfieldsdataload($user_row['xfields']); foreach ($xf as $xf_key => $xf_val) { $xf_key = preg_quote($xf_key, "'"); $tpl->set("{xfield-" . $xf_key . "}", $xf_val); } } else { $tpl->set_block("'{xfield-(.*?)}'si", ""); } $tpl->set("{name}", $user_row['name']); $tpl->set("{name-colored}", $user_group[$user_row['user_group']]['group_prefix'] . $user_row['name'] . $user_group[$user_row['user_group']]['group_suffix']); $tpl->set("{name-url}", $config['allow_alt_url'] ? $config['http_home_url'] . "user/" . urlencode($user_row['name']) : $config['http_home_url'] . "index.php?subaction=userinfo&user="******"{name-popup}", $config['allow_alt_url'] ? "ShowProfile('" . urlencode($user_row['name']) . "', '" . $config['http_home_url'] . "user/" . urlencode($user_row['name']) . "/', '1'); return false;" : "ShowProfile('" . urlencode($user_row['name']) . "', '" . $config['http_home_url'] . "index.php?subaction=userinfo&user="******"', '0'); return false;"); $tpl->set("{allnews-url}", $config['allow_alt_url'] ? $config['http_home_url'] . "user/" . urlencode($user_row['name']) . "/news/" : $config['http_home_url'] . "index.php?subaction=allnews&user="******"{allcomm-url}", $config['http_home_url'] . "index.php?do=lastcomments&userid=" . urlencode($user_row['user_id'])); $tpl->set("{pm-url}", $config['http_home_url'] . "index.php?do=pm&doaction=newpm&user="******"{email-url}", $config['http_home_url'] . "index.php?do=feedback&user="******"{news-num}", intval($user_row['news_num'])); $tpl->set("{comm-num}", intval($user_row['comm_num'])); $tpl->set("{email}", $user_row['email']); $tpl->set("{ip}", $user_row['logged_ip']); $tpl->set("{id}", $user_row['user_id']); $tpl->set("{land}", $user_row['land']); $tpl->set('{info}', $user_row['info']); $tpl->set('{sign}', $user_row['signature']); $tpl->set("{full-name}", $user_row['fullname']); $tpl->set("{group}", $user_group[$user_row['user_group']]['group_name']); $tpl->set("{group-id}", $user_group[$user_row['user_group']]['id']); $tpl->set("{group-colored}", $user_group[$user_row['user_group']]['group_prefix'] . $user_group[$user_row['user_group']]['group_name'] . $user_group[$user_row['user_group']]['group_suffix']); $tpl->set("{group-icon}", $user_group[$user_row['user_group']]['icon']); $tpl->compile("content"); $tpl->result['content'] = preg_replace("#\\{xfield-(.*?)\\}#is", "", $tpl->result['content']); $tpl->result['content'] = preg_replace("#\\[user-group=" . $user_row['user_group'] . "\\](.*?)\\[/user-group\\]#is", "\\1", $tpl->result['content']); $tpl->result['content'] = preg_replace("#\\[user-group=([0-9])\\](.*?)\\[/user-group\\]#is", "", $tpl->result['content']); $tpl->result['content'] = preg_replace("#\\[news\\](.*?)\\[/news\\]#is", $news_row != false ? "\\1" : "", $tpl->result['content']); } if (!$user_yes) { $tpl->result['content'] = $not_found; } if ($build_navigation) { $tpl->result['content'] = $tpl->result['content'] . $tpl->result['navi']; } $tpl->result['content'] = str_replace("{THEME}", $config['http_home_url'] . "templates/" . $config['skin'] . "/", $tpl->result['content']); if ($user_cache) { create_cache("news_ucustom", $tpl->result['content'], $user_cacheid, true); } return $tpl->result['content']; } else { return $cache_content; } }