Файл: modules/profile/info.php
Строк: 1047
<?php
include '../../system/core.php';
include '../../system/header.php';
if(!$user['id'])
{
header('Location: /index.php'); exit;
}
$id = TextGuard($_GET['id']);
if(empty($id) or !is_numeric($id))
{
header('Location: /index.php '); exit;
}
$us = mysql_fetch_array(mysql_query('select * from `user` where `id` = '.$id.''));
if($us == 0){
header('Location: /index.php'); exit;
}
switch($_GET['m']){
case 'status':
if($user['status'] != 4){
header('Location: /us'.$id.''); exit;
}
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Сменить статус</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
if(isset($_POST['submit'])){
$text = TextGuard($_POST['text']);
if(empty($text)) $err[] = 'Статус остался пустой...';
if(!$err){
mysql_query("UPDATE `user` SET `status2`='".$text."' WHERE `id` = '".$id."' limit 1");
header('Location: /us'.$id.''); exit;
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}
}
echo '<div class="mist">
<form action="" method="post">
Сменить статус:<br><input name="text" value=""/>
<input type="submit" value="Сохранить" name="submit"/>
</form></div>';
break;
///медальки
case 'medals':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Медали</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
if($user['status'] >= 4 && $id != $user['id']){
if(isset($_POST['medalka'])){
if($us['status'] > $user['status']) $err[] = 'У пользователя статус выше.';
$why = TextGuard($_POST['why']);
$type = TextGuard($_POST['type']);
if(empty($why)) $err[] = 'Текст награды пуст.';
if(!$err){
mysql_query("INSERT INTO `medals`(`who`,`type`,`why`,`time`,`ho`)VALUES('".$id."','".$type."','".$why."','".time()."','".$user['id']."')");
mysql_query("INSERT INTO `op`(`who`,`ho`,`text`,`time`,`read`,`sort`)VALUES('".$id."','".$user['id']."','наградил [url=/us".$id."?m=medals]вас[/url]!','".time()."','0','3')");
mysql_query("UPDATE `user` SET `rating`='".($us['rating']+0.10)."' WHERE `id` = '".$id."' limit 1");
echo '<div class="msg"><b>Пользователь '.ustatus($id).' <a href="/us'.$id.'">'.uname($id).'</a> '.uaccess($id).' успешно награжден.</b></div>';
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}
}
echo '<div class="post1">
<form action="/us'.$id.'?m=medals" method="post">
Номер медали:<br><textarea name="type" style="width:5%;" rows="1"></textarea><br>
Текст награды:<br><textarea name="why" style="width:98%;" rows="3"></textarea><br>
<input type="submit" value="Добавить" name="medalka"/>
</form></div>';
}
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `medals` where `who` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
if(isset($_GET['dn']) && $user['status'] >= 4){
$med = TextGuard($_GET['med']);
$medd = mysql_fetch_array(mysql_query('select * from `medals` where `id` = "'.$med.'"'));
if($medd == 0 or empty($id) or !is_numeric($id)){
header('Location: /us'.$id.'?m=medals'); exit;
}
mysql_query("DELETE FROM `medals` WHERE `id`='".$med."'");
header('Location: /us'.$id.'?m=medals'); exit;
}
$med = mysql_query("SELECT * FROM `medals` where `who` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($med2 = mysql_fetch_assoc($med)){
echo '<div class="post2"><b><img src="/modules/profile/medals/'.$med2['type'].'.png" alt="*"/> Вручил: </b>'.ustatus($med2['ho']).' <a href="/us'.$med2['ho'].'">'.uname($med2['ho']).'</a> '.uaccess($med2['ho']).' ('.times($med2['time']).')';
if($user['status'] >= 1) echo ' [<a href="/us'.$id.'?m=medals&dn&med='.$med2['id'].'">уд</a>]';
echo '<br><b>За что:</b> '.smiles(bbcode($med2['why'])).'</div>';
}
echo '</div><div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=medals&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=medals&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=medals&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=medals&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=medals&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=medals&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=medals&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=medals&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=medals&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=medals&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
///end
default:
echo '<a href="/us'.$us['id'].'">';
echo "<div class='logo'><img src='/images/cornerhat.png' class='snoww'><span style='font-family: drunkC; font-size:22px;'>";
echo''.ustatus($us['id']).''.uname($us['id']).'</a> '.uaccess($us['id']).'</span></div> </a>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Коупить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
echo '</div></div>';
include '../../system/nvg.php';
$ban = mysql_fetch_assoc(mysql_query("SELECT * FROM `ced` WHERE `login` = '".$us['id']."' LIMIT 1"));
if($ban != 0){
echo '<div class="post2"><font color="red"><b>Внимание!</br>Данный пользователь - мошенник!</br><a href="/ced/">Подробнее >></a></b></font></div>';
}
$reg = mysql_fetch_assoc(mysql_query("SELECT * FROM `reg` WHERE `who` = '".$us['id']."' LIMIT 1"));
if($reg != 0){
if($reg['ok'] == 1) echo '<div class="post1">Регистрацию подтвердил '.ustatus($reg['ho']).' <a href="/us'.$reg['ho'].'">'.uname($reg['ho']).'</a> '.uaccess($reg['ho']).'</div>';
elseif($reg['ok'] == 2) echo '<div class="post1">Регистрацию отклонил '.ustatus($reg['ho']).' <a href="/us'.$reg['ho'].'">'.uname($reg['ho']).'</a> '.uaccess($reg['ho']).'</div>';
}
echo '<div class="post2">
<font color="gray">» Зарегестрирован:</font> '.times($us['registration']).'<br>
<font color="gray">» Последняя активность:</font> '.times($us['online']).'<br>';
if($us['allonline'] != 0) echo '<font color="gray">» Провёл на сайте:</font> '.times2($us['allonline']).'<br>';
echo '<font color="gray">» Уровень:</font> <font color="red"><b>';
if($us['status'] == 0) echo 'Мастер';
elseif($us['status'] == 1) echo 'Модератор';
elseif($us['status'] == 2) echo 'Администратор';
elseif($us['status'] == 3) echo 'Ст. Администратор';
elseif($us['status'] == 4) echo 'Создатель';
echo '</b></font>';
if($us['jur'] == 1){
echo ' | <font color="green"><b>Журналист газеты</b></font>';
}else{
}
echo '</b></font>';
if($us['cedof'] == 1){
echo ' | <font color="blue"><b>Арбитр</b></font>';
}else{
}
echo '</div>';
if(!$us['wmid'] == 0){
echo '<div class="post2"><b>» WMID: <a href="http://passport.webmoney.ru/asp/certview.asp?wmid='.$us['wmid'].'">'.$us['wmid'].'</a>
</br>» BL: <img src="http://stats.wmtransfer.com/Levels/pWMIDLevel.aspx?wmid='.$us['wmid'].'&w=35&h=18&bg=0XDBE2E9">
</br>» WMR: '.$us['wmr'].'</b></div>';
}
$ban = mysql_fetch_assoc(mysql_query("SELECT * FROM `ban` WHERE `who` = '".$id."' and `end` > '".time()."' LIMIT 1"));
if($ban != 0){
echo '<div class="post2">
<font color="red"><b>Пользователь в бане!</b></font><br>
<b>Кто забанил:</b> '.ustatus($ban['ho']).' <a href="/us'.$ban['ho'].'">'.uname($ban['ho']).'</a> '.uaccess($ban['ho']).'<br>
<b>Причина:</b> '.smiles(bbcode($ban['why'])).'<br>
<b>Дата бана:</b> '.times($ban['time']).'<br>
<b>Дата освобождения:</b> '.date('d.m.Y в H:i', $ban['end']);
if($user['status'] >= 1)echo ' [<a href="/admin?m=bans§ion=unban">освободить</a>]';
echo '</div>';
}
////////
$banf = mysql_fetch_assoc(mysql_query("SELECT * FROM `ban_forum` WHERE `who` = '".$id."' and `end` > '".time()."' LIMIT 1"));
if($banf != 0){
echo '<div class="post2">
<font color="red"><b>Пользователь в бане по форуму!</b></font><br>
<b>Кто забанил:</b> '.ustatus($banf['ho']).' <a href="/us'.$banf['ho'].'">'.uname($banf['ho']).'</a> '.uaccess($banf['ho']).'<br>
<b>Причина:</b> '.smiles(bbcode($banf['why'])).'<br>
<b>Дата бана:</b> '.times($banf['time']).'<br>
<b>Дата освобождения:</b> '.date('d.m.Y в H:i', $banf['end']);
if($user['status'] >= 1)echo ' [<a href="/admin?m=banforum§ion=unban">освободить</a>]';
echo '</div>';
}
////////
echo '<div class="post1"><img src="/modules/profile/';
if(empty($us['ava'])) echo 'images/noava.png'; else echo 'ava/'.$us['ava'];
echo '" style="max-width:150px;"/>';
if(isset($_GET['ava_del']) && $user['status'] >= 1){
unlink('ava/'.$us['ava'].'');
mysql_query("UPDATE `user` SET `ava`='' WHERE `id`='".$us['id']."' limit 1");
header('Location: /us'.$id.''); exit;
}
if(!empty($us['ava']) && $user['status'] >= 1) echo '<br>[<a href="/us'.$id.'?ava_del">Удалить</a>]';
echo '</div>';
if($id != $user['id']){
if(isset($_GET['rss'])){
$user_rss = mysql_fetch_array(mysql_query('select * from `user_rss` where `user` = '.$id.' and `who` = "'.$user['id'].'"'));
if($user_rss == 0){
mysql_query("INSERT INTO `user_rss`(
`user`,
`who`,
`time`
)VALUES(
'".$id."',
'".$user['id']."',
'".time()."'
)");
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'[b]подписался[/b] на ваши новости!',
'".time()."',
'0','3'
)");
}else{
mysql_query("DELETE FROM `user_rss` WHERE `user` = '".$id."' and `who` = '".$user['id']."'");
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'[b]отписался[/b] от ваших новостей!',
'".time()."',
'0','3'
)");
}
header('Location: /us'.$id.''); exit;
}
echo '<div class="post2">
<img src="/modules/profile/images/004.png"/> <a href="/privat?m=dialog&id='.$id.'">Написать сообщение</a><br>';
$ignor = mysql_fetch_array(mysql_query('select * from `privat_contact` where `who` = "'.$user['id'].'" and `ho` = "'.$id.'" limit 1'));
if($ignor['ignor'] == 0) echo '<img src="/modules/profile/images/stop_2.png"/> <a href="/privat?m=dialog&id='.$id.'&ignor">В игнор</a>'; elseif($ignor['ignor'] == 1) echo '<img src="/modules/profile/images/yes.png"/> <a href="/privat?m=dialog&id='.$id.'&ignor">Убрать из игнора</a>';
$user_rss = mysql_fetch_array(mysql_query('select * from `user_rss` where `user` = '.$id.' and `who` = "'.$user['id'].'"'));
if($user_rss == 0) echo '<br><img src="/modules/profile/images/kontact_news.png"/> <a href="/us'.$id.'?rss">Подписаться на новости</a><br>'; else echo '<br><img src="/modules/profile/images/news_unsubscribe.png"/> <a href="/us'.$id.'?rss">Отписаться от новостей</a><br>';
echo '</div>';
}
echo '<div class="post1">
» ID: <font color="grey">'.$us['id'].'</font><br>
» Статус: <font color="green">';
if($user['status'] == 4) echo '<a href="/us'.$id.'?m=status" style="color:green;">';
if(empty($us['status2'])){
if($us['rating'] >= 0 && $us['rating'] <= 0.20 or empty($us['rating']) or $us['rating'] <= 0) echo 'Новичек';
elseif($us['rating'] > 0.21 && $us['rating'] <= 0.50) echo 'Продвинутый';
elseif($us['rating'] > 0.51 && $us['rating'] <= 3) echo 'Узнаваемый';
elseif($us['rating'] > 3.01 && $us['rating'] <= 10) echo 'Здешний';
elseif($us['rating'] > 10.01 && $us['ratings'] <= 50) echo 'Уважаемый';
elseif($us['rating'] > 50.01 && $us['rating'] <= 100) echo 'V.I.P';
}else{
echo $us['status2'];
}
if($user['status'] == 4) echo '</a>';
echo '</font>';
if($user['status'] == 4 && !empty($us['status2'])){
if(isset($_GET['s2d'])){
mysql_query("UPDATE `user` SET `status2`='' WHERE `id` = '".$id."' limit 1");
header('Location: /us'.$id.''); exit;
}
echo ' [<a href="/us'.$id.'?s2d">уд</a>]';
}
$medals = mysql_result(mysql_query('select count(`id`) from `medals` where `who` = "'.$id.'" limit 3'),0);
echo '<br>» Награды: <a href="/us'.$id.'?m=medals">'.$medals.'</a>';
if($medals != 0){
echo ' : ';
$u_medals = mysql_query("SELECT * FROM `medals` where `who` = '".$us['id']."'");
while($u_medals2 = mysql_fetch_assoc($u_medals)){
echo '<img src="/modules/profile/medals/'.$u_medals2['type'].'.png" alt="*"/> ';
}
}
echo '</div><div class="tegi"><font color="white">Личные данные</font></div>';
$nicks = mysql_result(mysql_query('select count(`id`) from `nicks` where `who` = "'.$id.'"'),0);
echo '<div class="post1"><img src="/modules/profile/images/order-1.png"/> <a href="?m=nicks">История ников</a> ('.$nicks.')</div>
<div class="post2"><img src="/modules/profile/images/activ.png"/> <a href="/us'.$id.'?ank">Данные</a></div>';
if(isset($_GET['ank'])){
echo '';
echo '<div class="post1">Имя: <font color="gray">'.$us['name'].'</font></div>
<div class="post2">Пол: <font color="gray">';
if($us['sex'] == 1) echo 'Мужской'; elseif($us['sex'] == 2) echo 'Женский';
echo '
</font></div><div class="post1">Дата рождения: <font color="gray">'.$us['day'].'.'.$us['m'].'.'.$us['birthday'].'</font></div>
<div class="post2">Страна: <font color="gray">'.$us['country'].'</font></div>
<div class="post1">Город: <font color="gray">'.$us['city'].'</font></div>
<div class="post2">О себе:<font color="gray">'.smiles(bbcode($us['about'])).'</font></div>
<div class="post1">ICQ: <font color="gray">'.$us['icq'].'</font></div>
';
if($user['status'] >1){
echo '<div class="post2">IP: '.$us['ip'].'</div>';
$ban = mysql_query("SELECT * FROM `ban` where `who` != '".$us['id']."'");
while($ban2 = mysql_fetch_assoc($ban)){
$ban_info = mysql_fetch_array(mysql_query('select * from `user` where `id` = "'.$ban2['who'].'"'));
if($ban_info['ip'] == $us['ip']) echo '<div class="post1">Внимание! Данные IP адреса этого пользователя совпадают с данными <font color="red"><b>забаненного</b></font> пользователя '.ustatus($ban_info['id']).' <a href="/us'.$ban_info['id'].'">'.uname($ban_info['id']).'</a> '.uaccess($ban_info['id']).'</div>';
}
$mult = mysql_query("SELECT * FROM `user` where `id` != '".$us['id']."'");
while($mult2 = mysql_fetch_assoc($mult)){
$ban_info = mysql_fetch_array(mysql_query('select * from `user` where `id` = "'.$mult2['id'].'"'));
if($ban_info == 0) if($mult2['ip'] == $us['ip']) echo '<div class="post2">Внимание! Данные IP адреса этого пользователя совпадают с данными пользователя '.ustatus($mult2['id']).' <a href="/us'.$mult2['id'].'">'.uname($mult2['id']).'</a> '.uaccess($mult2['id']).'</div>';
}
echo '<div class="post1">UA: '.$us['ua'].'</div>
<div class="post2">Сейчас в: '.$us['self'].'</div>';
}
}
echo '</div>
<div class="post1"><img src="/images/carta.png"/><a href="/m/shop'.$id.'">Магазин </a> ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `m_tovar` WHERE `us` = '".$us['id']."' "),0).')</div>';
echo '<div class="post1"><img src="/modules/profile/images/archives.png"/> <a href="?m=files">Файлы</a> ('.mysql_result(mysql_query('select count(`id`) from `zc_f` where `author` = "'.$id.'" and `status` = "0"'),0).')</div>';
/// echo '<div class="post2"><img src="/modules/profile/images/codes.png"/> <a href="?m=codes">Полезные коды</a> ('.mysql_result(mysql_query('select count(`id`) from `pc_code` where `author` = "'.$id.'" and `status` = "0"'),0).')</div>';
echo '<div class="tegi"><font color="white">Информация и активность</font></div><div class="submenu">
<div class="post1"> <img src="/modules/profile/images/theme.png"/> Тем в <a href="/us'.$id.'?m=f_t">форуме</a>: <font color="gray">'.mysql_result(mysql_query('select count(`id`) from `forum_t` where `author` = "'.$us['id'].'"'),0).'</font></div>
<div class="post2"><img src="/modules/profile/images/txt4.png"/> Постов в <a href="/us'.$id.'?m=f_m">форуме</a>: <font color="gray">'.mysql_result(mysql_query('select count(`id`) from `forum_m` where `author` = "'.$us['id'].'"'),0).'</font></div>
<div class="post1"> <img src="/modules/profile/images/sps.png"/> Сказали спасибо в <a href="/us'.$id.'?m=sps">форуме</a>: <font color="gray">'.mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_t_thnx` WHERE `ho` = '".$us['id']."'"),0).'</font></div>
<div class="post2"><img src="/modules/profile/images/comments.png"/> Комментариев: <font color="gray">'.mysql_result(mysql_query('select count(`id`) from `zc_fcom` where `who` = "'.$us['id'].'"'),0).'</font></div>
<div class="post1"><img src="/modules/porte/img/port.png"/> <a href="/porte/inf'.$id.'">Портфолио</a> ('.mysql_result(mysql_query('select count(`id`) from `porte_rab` where `who` = "'.$us['id'].'"'),0).')</div>
</div><div class="tegi"><font color="white">Репутация на сайте</font></div>
<div class="post2"><img src="/modules/profile/images/25052013_fn2248_kontact_news.png"/> <a href="/us'.$id.'?m=rss">Подписчики</a> ['.mysql_result(mysql_query('select count(`id`) from `user_rss` where `user` = "'.$id.'"'),0).']</div>
<div class="post1"><img src="modules/profile/images/clean.png"/> <a href="/us'.$id.'?m=senks">Поблагодарили</a> ['.mysql_result(mysql_query('select count(`id`) from `senk` where `ho` = "'.$us['id'].'"'),0).']</div>
<div class="post2"><img src="/images/plus.png"/> <a href="/us'.$id.'?m=arbitr">Арбитраж</a> [<b><font color="green">'.mysql_result(mysql_query("SELECT COUNT(*) FROM `arbitr` WHERE `ho` = '".$us['id']."' and `ver` = '1'"),0).'</font></b>/<b><font color="red">'.mysql_result(mysql_query("SELECT COUNT(*) FROM `arbitr` WHERE `ho` = '".$us['id']."' and `ver` = '2'"),0).'</font></b>]</div>
<div class="post1"><img src="modules/profile/images/rating.png"/> Рейтинг: <font color="green">'.$us['rating'].'</font></div>
<div class="post2"><img src="modules/profile/images/infr.png"> <a href="/us'.$id.'?m=nar">Нарушения</a> ['.mysql_result(mysql_query('select count(`id`) from `nar` where `who` = "'.$us['id'].'"'),0).']</div>
<div class="tegi"><font color="white">Новости:</font></div>';
if($id == $user['id']){
if(isset($_POST['submit'])){
$text = TextGuard($text);
if(empty($text)) $err[] = 'Сообщение осталось пустым...';
if(!$err){
mysql_query("INSERT INTO `feed`(
`who`,
`text`,
`time`
)VALUES(
'".$id."',
'".$text."',
'".time()."'
)");
$user_rss = mysql_query("SELECT * FROM `user_rss` WHERE `user`='".$id."'");
while($user_rss2 = mysql_fetch_assoc($user_rss)){
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,`sort`
)VALUES(
'".$user_rss2['who']."',
'".$user['id']."',
'обновил новости!',
'".time()."',
'0','3'
)");
}
header('Location: /us'.$id.''); exit;
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}}
echo '
<div class="glav">
<form action="" method="post">
<textarea name="text" style="width:98%;" rows="3"></textarea><br>
<input type="submit" value="Добавить" name="submit"/>
</form></div>
';
}
if(isset($_GET['fs'])){
$fid = TextGuard($_GET['fid']);
if(empty($fid) or !is_numeric($fid)){
header('Location: /us'.$id.''); exit;
}
$text = TextGuard($text);
$pmak = mysql_query("SELECT * FROM `feed_com` WHERE `who`='".$user['id']."' and `fid` = '".$fid."' ORDER BY `time` desc");
while($pmak2 = mysql_fetch_assoc($pmak)){
$pma_timeout = $pmak2['time'];
if((time()-$pma_timeout) < 60) $err[] = 'Писать можно только раз в 1минуту...';
}
if(empty($text)) $err[] = 'Сообщение осталось пустым...';
if(!$err){
mysql_query("INSERT INTO `feed_com`(
`fid`,
`who`,
`text`,
`time`
)VALUES(
'".$fid."',
'".$user['id']."',
'".$text."',
'".time()."'
)");
if($id != $user['id']){
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'добавил комментарий к вашей [url=/us".$id."?m=feed&fid=".$fid."]новости[/url]!',
'".time()."',
'0','3'
)");
}
header('Location: /us'.$id.''); exit;
}else{
echo '<div class="err">';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</div>';
}}
if(isset($_GET['fd'])){
$fid = TextGuard($_GET['fid']);
if($id != $user['id'] or $user['status'] < 1 or empty($fid) or !is_numeric($fid)){
header('Location: /us'.$id.''); exit;
}
$feed_com = mysql_query("SELECT * FROM `feed_com` where `fid` = '".$fid."' ORDER BY `id` DESC LIMIT $start,$cop");
while($feed_com2 = mysql_fetch_assoc($feed_com)){
mysql_query("DELETE FROM `feed_com` WHERE `id` = '".$feed_com2['id']."'");
}
mysql_query("DELETE FROM `feed` WHERE `who` = '".$id."' and `id` = '".$fid."'");
header('Location: /us'.$id.'');
}
if(isset($_GET['fdc'])){
if($id == $user['id'] or $user['status'] >= 1){
$cid = TextGuard($_GET['cid']);
//$feed_com = mysql_fetch_array(mysql_query('select * from `feed_com` where `id` = "'.$cid.'" limit 1'));
if(empty($cid) or !is_numeric($cid)){
header('Location: /us'.$id.''); exit;
}
mysql_query("DELETE FROM `feed_com` WHERE `id` = '".$cid."'");
header('Location: /us'.$id.'');
}else{
header('Location: /us'.$id.'');
}
}
$cop = 3;
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `feed` where `who` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
if($ca != 0){
$feed = mysql_query("SELECT * FROM `feed` where `who` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($feed2 = mysql_fetch_assoc($feed)){
$feed2_text = smiles(bbcode($feed2['text']));
echo '<div class="post2"><img src="/images/newsp.png"/> ';
if(strlen($feed2['text']) > 500) echo ''.mb_substr($feed2_text, 0, 1500).'... <a href="/us'.$id.'?m=feed&fid='.$feed2['id'].'">Читать далее...</a>'; else echo $feed2_text;
echo ' <font color="red">('.times($feed2['time']).')</font>';
if($id == $user['id'] or $user['status'] >= 1) echo ' [<a href="/us'.$id.'?fd&fid='.$feed2['id'].'">уд</a>]';
echo '</div>';
echo '<div class="glav"><form action="/us'.$id.'?fs&fid='.$feed2['id'].'" method="post">
Комментарий: <input name="text"/> <input type="submit" value="Написать"/>
</form>
</div>';
$feed_coms = mysql_result(mysql_query("SELECT COUNT(*) FROM `feed_com` where `fid` = '".$feed2['id']."'"),0);
if($feed_coms != 0){
$feed_com = mysql_query("SELECT * FROM `feed_com` where `fid` = '".$feed2['id']."' ORDER BY `id` DESC LIMIT 3");
while($feed_com2 = mysql_fetch_assoc($feed_com)){
echo '<div class="post2">'.ustatus($feed_com2['who']).' <a href="/us'.$feed_com2['who'].'">'.uname($feed_com2['who']).'</a> '.uaccess($feed_com2['who']).' <font color="gray">('.times($feed_com2['time']).')</font>';
if($id == $user['id'] or $user['status'] >= 1) echo ' [<a href="/us'.$id.'?fdc&cid='.$feed_com2['id'].'">уд</a>]';
echo '<br>'.smiles(bbcode($feed_com2['text'])).'</div>';
}
if($feed_coms > 3) echo '<div class="post1"><a href="/us'.$id.'?m=feed&fid='.$feed2['id'].'">Показать все комментарии</a> ('.$feed_coms.')</div>';
}
}
}else{
echo '<div class="err" align="center"><b>Новостей нет!</b></div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'feed':
$fid = TextGuard($_GET['fid']);
$feed = mysql_fetch_array(mysql_query('select * from `feed` where `id` = '.$fid.''));
if(empty($fid) or !is_numeric($fid) or $feed == 0){
header('Location: /us'.$id.'?m=feeds'); exit;
}
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Новости</b></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
echo '</div>';
include '../../system/nvg.php';
echo '<div class="post1">
'.smiles(bbcode($feed['text'])).' <font color="grey">('.times($feed['time']).')</font>
</div><div class="tegi"><font color="white">Комментарии:</font></div>
';
$pmak = mysql_query("SELECT * FROM `feed_com` WHERE `who`='".$user['id']."' and `fid` = '".$fid."' ORDER BY `time` desc");
while($pmak2 = mysql_fetch_assoc($pmak)){
$pma_timeout = $pmak2['time'];
if((time()-$pma_timeout) < 60) $err[] = 'Писать можно только раз в 1минуту...';
}
if(isset($_POST['submit'])){
$text = TextGuard($text);
if(empty($text)) $err[] = 'Сообщение осталось пустым...';
if(!$err){
mysql_query("INSERT INTO `feed_com`(
`fid`,
`who`,
`text`,
`time`
)VALUES(
'".$fid."',
'".$user['id']."',
'".$text."',
'".time()."'
)");
if($id != $user['id']){
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'ответил в вашей [url=/us".$id."?m=feed&fid=".$fid."]новости[/url]!',
'".time()."',
'0','3'
)");
}
header('Location: /us'.$id.'?m=feed&fid='.$fid.''); exit;
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}}
echo '<div class="glav">
<form action="" method="post">
<textarea name="text" style="width:98%;" rows="3"></textarea><br>
<input type="submit" value="Написать" name="submit"/>
</form>
</div>';
if(isset($_GET['fdc'])){
if($id == $user['id'] or $user['status'] >= 1){
$cid = TextGuard($_GET['cid']);
$feed_com = mysql_fetch_array(mysql_query('select * from `feed_com` where `id` = "'.$cid.'" limit 1'));
if(empty($cid) or !is_numeric($cid)){
header('Location: /us'.$id.''); exit;
}
mysql_query("DELETE FROM `feed_com` WHERE `id` = '".$cid."'");
header('Location: /us'.$id.'?m=feed&fid='.$fid.'');
}else{
header('Location: /us'.$id.'?m=feed&fid='.$fid.''); exit;
}
}
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `feed_com` where `fid` = '".$fid."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$feed_com = mysql_query("SELECT * FROM `feed_com` where `fid` = '".$fid."' ORDER BY `id` DESC LIMIT $start,$cop");
while($feed_com2 = mysql_fetch_assoc($feed_com)){
echo '<div class="post2">
'.ustatus($feed_com2['who']).' <a href="/us'.$feed_com2['who'].'">'.uname($feed_com2['who']).'</a> '.uaccess($feed_com2['who']).' <font color="grey">('.times($feed_com2['time']).')</font>';
if($id == $user['id'] or $user['status'] >= 1) echo ' [<a href="/us'.$id.'?m=feed&fid='.$fid.'&fdc&cid='.$feed_com2['id'].'">уд</a>]';
echo '<br>
'.smiles(bbcode($feed_com2['text'])).'
</div>';
}
echo '</div><div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=feed&fid='.$fid.'&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=feed&fid='.$fid.'&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'rss':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Подписчики</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
include '../../system/nvg.php';
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `user_rss` where `user` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
echo '';
$rss = mysql_query("SELECT * FROM `user_rss` where `user` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($rss2 = mysql_fetch_assoc($rss)){
echo '<div class="post2">'.ustatus($rss2['who']).' <a href="/us'.$rss2['who'].'">'.uname($rss2['who']).'</a> '.uaccess($rss2['who']).'</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=rss&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=rss&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=rss&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=rss&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=rss&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=rss&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=rss&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=rss&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=rss&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=rss&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'nar':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Нарушения</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
include '../../system/nvg.php';
if($user['status'] >= 1 && $id != $user['id']){
if(isset($_POST['submit'])){
if($us['status'] > $user['status']) $err[] = 'У пользователя статус выше...';
$why = TextGuard($_POST['why']);
if(empty($why)) $err[] = 'Причина осталась пустой...';
if(!$err){
mysql_query("INSERT INTO `nar`(
`who`,
`why`,
`ho`,
`time`
)VALUES(
'".$id."',
'".$why."',
'".$user['id']."',
'".time()."'
)");
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'записал вам [url=/us".$id."?m=nar]нарушение[/url]!',
'".time()."',
'0','3'
)");
mysql_query("UPDATE `user` SET `rating`='".($us['rating']-0.02)."' WHERE `id` = '".$id."' limit 1");
echo '<div class="msg"><b>'.ustatus($id).' <a href="/us'.$id.'">'.uname($id).'</a> '.uaccess($id).' успешно запиcано нарушение!</b></div>';
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}
}
echo '<div class="glav">
<form action="/us'.$id.'?m=nar" method="post">
Причина:<br><textarea name="why" style="width:98%;" rows="3"></textarea><br>
<input type="submit" value="Добавить" name="submit"/>
</form></div>';
}
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `nar` where `who` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
if(isset($_GET['dn']) && $user['status'] >= 1){
$nar = TextGuard($_GET['nar']);
$nars = mysql_fetch_array(mysql_query('select * from `nar` where `id` = "'.$nar.'"'));
if($nars == 0 or empty($id) or !is_numeric($id)){
header('Location: /us'.$id.'?m=nar'); exit;
}
mysql_query("DELETE FROM `nar` WHERE `id`='".$nar."'");
header('Location: /us'.$id.'?m=nar'); exit;
}
$nar = mysql_query("SELECT * FROM `nar` where `who` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($nar2 = mysql_fetch_assoc($nar)){
echo '<div class="post2">'.ustatus($nar2['ho']).' <a href="/us'.$nar2['ho'].'">'.uname($nar2['ho']).'</a> '.uaccess($nar2['ho']).' ('.times($nar2['time']).')';
if($user['status'] >= 1) echo ' [<a href="/us'.$id.'?m=nar&dn&nar='.$nar2['id'].'">уд</a>]';
echo '<br>Нарушение: '.smiles(bbcode($nar2['why'])).'</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=nar&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=nar&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=nar&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=nar&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=nar&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=nar&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=nar&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=nar&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=nar&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=nar&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'f_t':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Темы на форуме</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
include '../../system/nvg.php';
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_t` where `author` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$forum_t = mysql_query("SELECT * FROM `forum_t` where `author` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($forum_t2 = mysql_fetch_assoc($forum_t)){
$forum_r = mysql_fetch_array(mysql_query('select * from `forum_r` where `id` = '.$forum_t2['r'].''));
$forum_pr = mysql_fetch_array(mysql_query('select * from `forum_pr` where `id` = '.$forum_t2['pr'].''));
echo '<div class="post1"><a href="/forum/r'.$forum_r['id'].'" >'.$forum_r['name'].'</a> | <a href="/forum/pr'.$forum_pr['id'].'" >'.$forum_pr['name'].'</a></div><div class="post2">';
if($forum_t2['status'] == 0) echo '<img src="/modules/forum/images/the.png"/>'; elseif($forum_t2['status'] == 1) echo '<img src="/modules/forum/images/closed.png"/>';
echo ' <a href="/forum/t'.$forum_t2['id'].'">'.$forum_t2['name'].'</a> ('.mysql_result(mysql_query('select count(`id`) from `forum_m` where `t` = "'.$forum_t2['id'].'"'),0).') <a href="/forum/t'.$forum_t2['id'].'/p'.ceil(((mysql_result(mysql_query('select count(`id`) from `forum_m` where `t` = "'.$forum_t2['id'].'"'),0))+1)/10).'">></a><br>
'.ustatus($forum_t2['author']).' <a href="/us'.$forum_t2['author'].'">'.uname($forum_t2['author']).'</a>/'.ustatus($forum_t2['last']).' <a href="/us'.$forum_t2['last'].'">'.uname($forum_t2['last']).'</a> ('.times($forum_t2['ltime']).')';
echo '</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=f_t&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=f_t&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=f_t&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=f_t&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=f_t&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=f_t&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=f_t&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=f_t&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=f_t&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=f_t&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'sps':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Сказали спасибо</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
echo '</div></div>';
include '../../system/nvg.php';
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_t_thnx` where `ho` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$forum_t = mysql_query("SELECT * FROM `forum_t_thnx` where `ho` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($forum_t2 = mysql_fetch_assoc($forum_t)){
$forum_m2_t = mysql_fetch_array(mysql_query('select * from `forum_t` where `id` = "'.$forum_t2['t'].'"'));
echo '<div class="post2"><b>Тема:</b>
<a href="/forum/t'.$forum_m2_t['id'].'">'.$forum_m2_t['name'].'</a> ('.mysql_result(mysql_query('select count(`id`) from `forum_m` where `t` = "'.$forum_m2_t['id'].'"'),0).') <a href="/forum/t'.$forum_m2_t['id'].'/p'.ceil(((mysql_result(mysql_query('select count(`id`) from `forum_m` where `t` = "'.$forum_m2_t['id'].'"'),0))+1)/10).'">></a><br>
<b>Сказал спасибо:</b> '.ustatus($forum_t2['user']).' <a href="/us'.$forum_t2['user'].'">'.uname($forum_t2['user']).'</a> ('.times($forum_t2['time']).')
</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=sps&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=sps&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=sps&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=sps&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=sps&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=sps&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=sps&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=sps&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=sps&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=sps&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'f_m':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Посты на форуме</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
echo '</div></div>';
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_m` where `author` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$forum_m = mysql_query("SELECT * FROM `forum_m` where `author` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($forum_m2 = mysql_fetch_assoc($forum_m)){
$forum_m2_r = mysql_fetch_array(mysql_query('select * from `forum_r` where `id` = "'.$forum_m2['r'].'"'));
$forum_m2_pr = mysql_fetch_array(mysql_query('select * from `forum_pr` where `id` = "'.$forum_m2['pr'].'"'));
$forum_m2_t = mysql_fetch_array(mysql_query('select * from `forum_t` where `id` = "'.$forum_m2['t'].'"'));
echo '<div class="post1"><a href="/forum/r'.$forum_m2_r['id'].'" >'.$forum_m2_r['name'].'</a> | <a href="/forum/pr'.$forum_m2_pr['id'].'" >'.$forum_m2_pr['name'].'</a> | <a href="/forum/t'.$forum_m2_t['id'].'" >'.$forum_m2_t['name'].'</a></div><div class="post2">'.ustatus($forum_m2['author']).' <a href="/us'.$forum_m2['author'].'"><b>'.uname($forum_m2['author']).'</b></a> '.uaccess($forum_m2['author']).' ('.times($forum_m2['time']).')<br>';
if(!empty($forum_m2['cit'])){
$cit = mysql_fetch_array(mysql_query('select * from `forum_m` where `id` = "'.$forum_m2['cit'].'"'));
$cit_author = mysql_fetch_array(mysql_query('select * from `user` where `id` = "'.$cit['author'].'"'));
echo 'Цитата:<br><div class="cit"><b>'.$cit_author['login'].'</b>: '.smiles(bbcode($cit['text'])).'</div>';
}
echo ''.smiles(bbcode($forum_m2['text'])).'
</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=f_m&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=f_m&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=f_m&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=f_m&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=f_m&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=f_m&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=f_m&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=f_m&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=f_m&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=f_m&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'senks':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Благодарности</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
echo '</div></div>';
include '../../system/nvg.php';
if($id != $user['id']){
if(isset($_POST['submit'])){
$text = TextGuard($_POST['text']);
if(empty($text)) $err[] = 'Причина осталась пустой...';
$senks = mysql_query("SELECT * FROM `senk` where `who` = '".$user['id']."' and `ho` = '".$id."' ORDER BY `id` DESC limit 1");
while($senks2 = mysql_fetch_assoc($senks)){
if((time()-$senks2['time']) < ((60*60)*24)) $err[] = 'Благодарить можно только 1 раз в сутки!';
}
if(!$err){
mysql_query("INSERT INTO `senk`(
`who`,
`ho`,
`text`,
`time`
)VALUES(
'".$user['id']."',
'".$id."',
'".$text."',
'".time()."'
)");
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,
`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'[url=/us".$id."?m=senks]поблагодарил[/url] вас!',
'".time()."',
'0','3'
)");
header('Location: /us'.$id.'?m=senks'); exit;
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}
}
echo '<div class="glav">
<form action="" method="post">
За что:<br><textarea name="text" style="width:98%;" rows="3"></textarea><br>
<input type="submit" value="Поблагодарить" name="submit"/>
</form></div>';
}
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `senk` where `ho` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$senk = mysql_query("SELECT * FROM `senk` where `ho` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($senk2 = mysql_fetch_assoc($senk)){
echo '<div class="post2">'.ustatus($senk2['who']).'<a href="/us'.$senk2['who'].'">'.uname($senk2['who']).'</a> '.uaccess($senk2['who']).' ('.times($senk2['time']).')<br>
За что: '.smiles(bbcode($senk2['text'])).'</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=senks&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=senks&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=senks&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=senks&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=senks&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=senks&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=senks&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=senks&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=senks&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=senks&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
///////////////////////////////////////////////////////////////////////////////////////////////////////////
case 'arbitr':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Арбитраж</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
echo '</div></div>';
include '../../system/nvg.php';
if($id != $user['id']){
if(isset($_POST['submit'])){
$text = TextGuard($_POST['text']);
$ver = TextGuard($_POST['ver']);
if(empty($text)) $err[] = 'Поле отзыва/притензии не заролнено..';
$arno = mysql_query("SELECT * FROM `arbitr` where `who` = '".$user['id']."' and `ho` = '".$id."' ORDER BY `id` DESC limit 1");
while($arno2 = mysql_fetch_assoc($arno)){
if((time()-$arno2['time']) < ((60*60)*24)) $err[] = 'Оставлять Отзыв/Притензию можно только 1 раз в сутки!';
}
if(!$err){
mysql_query("INSERT INTO `arbitr`(
`who`,
`ho`,
`mode`,
`ver`,
`text`,
`time`
)VALUES(
'".$user['id']."',
'".$id."',
'0',
'".$ver."',
'".$text."',
'".time()."'
)");
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`,
`sort`
)VALUES(
'".$id."',
'".$user['id']."',
'[url=/us".$id."?m=arbitr]Зделал запрос[/url] к Вам в арбитраж !',
'".time()."',
'0','3'
)");
$ar = mysql_query("SELECT * FROM `user` WHERE `status` > '1'");
while($ar2 = mysql_fetch_assoc($ar)){
mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`
)VALUES(
'".$ar2['id']."',
'".$user['id']."',
'Подал [url=/admin?m=arbit]притензию[/url]',
'".time()."',
'0'
)");
}
header('Location: /us'.$id.'?m=arbitr'); exit;
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}
}
echo '<div class="glav">
<form action="" method="post">
*Выбрать:<select name="ver">
<option value="1">Отзыв</option>
<option value="2">Притензия</option>
</select><br> За что:<br><textarea name="text" style="width:98%;" rows="3"></textarea><br>';
echo '<input type="submit" value="Оставить" name="submit"/>
</form></div>';
}
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `arbitr` where `ho` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$arbv = mysql_query("SELECT * FROM `arbitr` where `ho` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($arbv2 = mysql_fetch_assoc($arbv)){
echo '<div class="post2">'.ustatus($arbv2['who']).' <a href="/us'.$arbv2['who'].'">'.uname($arbv2['who']).'</a> '.uaccess($arbv2['who']).' ('.times($arbv2['time']).') ';
if($arbv2['ver'] == 1){
echo '<font color="green"><b>[Отзыв]</b></font></br>';
}else{
echo '<font color="red"><b>[Притензия]</b></font></br>';
}
echo '<b>Причина:</b> '.smiles(bbcode($arbv2['text'])).'';
if($arbv2['mode'] == 0){
echo '</br><font color="red"><b>[На проверке в арбитраже]</b></font>';
}else{
echo '</br><font color="green"><b>[Подтверждено]</b></font>';
}
////////////////
echo '</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=arbitr&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=arbitr&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=arbitr&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=arbitr&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=arbitr&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=arbitr&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=arbitr&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=arbitr&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=arbitr&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=arbitr&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
/////////////////////////////////////////////
case 'nicks':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | История ников</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
include '../../system/nvg.php';
if($user['status'] >= 1){
if(isset($_POST['submit'])){
$nick = TextGuard($_POST['nick']);
if(empty($nick)) $err[] = 'Новый ник остался пустой...';
$dinfo = mysql_fetch_array(mysql_query("SELECT `login` FROM `user` WHERE `login` = '".$nick."' LIMIT 1"));
if(!empty($nick))if($dinfo!=0) $err[] = 'Логин занят';
$nicks = mysql_query("SELECT * FROM `nicks` where `who` = '".$id."' ORDER BY `id` DESC LIMIT 1");
while($nicks2 = mysql_fetch_assoc($nicks)){
$old = $nicks2['new'];
}
if(empty($old)) $old = $us['login'];
if(!$err){
mysql_query("INSERT INTO `nicks`(
`who`,
`ho`,
`old`,
`new`,
`time`
)VALUES(
'".$id."',
'".$user['id']."',
'".$old."',
'".$nick."',
'".time()."'
)");
mysql_query("UPDATE `user` SET `login`='".$nick."' WHERE `id` = '".$id."' limit 1");
mysql_query("INSERT INTO `op`(`who`,`ho`,`text`,`time`,`read`,`sort`)VALUES('".$id."','".$user['id']."','сменил вам [url=/us".$id."?m=nicks]ник[/url]!','".time()."','0','3')");
header('Location: /us'.$id.'?m=nicks'); exit;
}else{
echo '<div class="err"><b>';
foreach($err as $err_info){
echo $err_info.'<br>';
}
echo '</b></div>';
}
}
echo '<div class="glav">
<form action="" method="post">
Сменить ник:<br><input name="nick" value=""/>
<input type="submit" value="Сохранить" name="submit"/>
</form></div>';
}
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `nicks` where `who` = '".$id."'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$nicks = mysql_query("SELECT * FROM `nicks` where `who` = '".$id."' ORDER BY `id` DESC LIMIT $start,$cop");
while($nicks2 = mysql_fetch_assoc($nicks)){
echo '<div class="post2">'.$nicks2['old'].' > '.$nicks2['new'];
echo '<br>'.ustatus($nicks2['ho']).' <a href="/us'.$nicks2['ho'].'">'.uname($nicks2['ho']).'</a> '.uaccess($nicks2['ho']).' ('.times($nicks2['time']).')</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=nicks&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=nicks&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=nicks&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=nicks&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=nicks&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=nicks&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=nicks&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=nicks&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=nicks&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=nicks&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'files':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Загруженные файлы</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
include '../../system/nvg.php';
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `zc_f` where `author` = '".$id."' and `status` = '0'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$zc_f = mysql_query("SELECT * FROM `zc_f` where `author` = '".$id."' and `status` = '0' ORDER BY `id` DESC LIMIT $start,$cop");
while($zc_f2 = mysql_fetch_assoc($zc_f)){
$zc_r = mysql_fetch_array(mysql_query('select * from `zc_r` where `id` = "'.$zc_f2['r'].'"'));
$zc_pr = mysql_fetch_array(mysql_query('select * from `zc_pr` where `id` = "'.$zc_f2['pr'].'"'));
echo '<div class="post1"><a href="/zc/r'.$zc_r['id'].'">'.$zc_r['name'].'</a> | <a href="/zc/pr'.$zc_pr['id'].'" >'.$zc_pr['name'].'</a></div><div class="post2">
Файл: <a href="/zc/f'.$zc_f2['id'].'">'.$zc_f2['name'].'</a> ('.round(filesize('../zc/files/'.$zc_f2['file'].'')/1024).' кб)<br>
Загружен: '.times($zc_f2['time']).'
</div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=files&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=files&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=files&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=files&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=files&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=files&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=files&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=files&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=files&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=files&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
case 'codes':
echo '<div class="tegi"><b>'.ustatus($us['id']).' <a href="/us'.$us['id'].'">'.uname($us['id']).'</a> '.uaccess($us['id']).' | Полезные коды</b></div></div>';
/////////////////////////////////////////////////
$rek = mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo '<div class="rek"><div class="rekl"><img src="/images/r.png" alt="*"> <a href="/bl?bl=rek">Купить рекламу</a></br>';
while($rek2 = mysql_fetch_array($rek))
{
echo '<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}
echo '</div>';
echo '</div>';
include 'system/nvg.php';
if($user['id']) {
echo ' <div class="start">';
echo '<div class="s" style="border-bottom:none;">';
echo '<table style="width:100%" cellspacing="0" cellpadding="0">';
echo '<tbody><tr><td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center>';
echo '<a href="/privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo ' <b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '<td style="vertical-align:top;width:10%;">';
echo '<center><a href="/op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if($user['id']){
$c = mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if($c != 0) echo '<b> (+'.$c.')</b>';
}
echo '</center></td>';
echo '</tr></tbody></table>';
echo '</div>';
}
//////////////////////////////////////////////////////
include '../../system/nvg.php';
$cop = $user['on_page'];
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `pc_code` where `author` = '".$id."' and `status` = '0'"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p']) && $ca != 0){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$pc_code = mysql_query("SELECT * FROM `pc_code` where `author` = '".$id."' and `status` = '0' ORDER BY `id` DESC LIMIT $start,$cop");
while($pc_code2 = mysql_fetch_assoc($pc_code)){
$pc_r = mysql_fetch_array(mysql_query('select * from `pc_r` where `id` = "'.$pc_code2['r'].'"'));
echo '<div class="post2"><a href="/pc/code'.$pc_code2['id'].'">'.$pc_code2['name'].'</a> <font color="grey">('.times($pc_code2['time']).')</font><br>
Категория: <a href="/pc/r'.$pc_r['id'].'">'.$pc_r['name'].'</a></div>';
}
echo '<div class="spis">Стр. ';
if($p-2>0) echo '<a href="/us'.$id.'?m=codes&p=1"><<</a> ';
if($p-1>0) echo '<a href="/us'.$id.'?m=codes&p='.($p-1).'"><</a> ';
if($p-3>0) echo '<a href="/us'.$id.'?m=codes&p='.($p-3).'">'.($p-3).'</a> | ';
if($p-2>0) echo '<a href="/us'.$id.'?m=codes&p='.($p-2).'">'.($p-2).'</a> | ';
if($p-1>0) echo '<a href="/us'.$id.'?m=codes&p='.($p-1).'">'.($p-1).'</a> | ';
echo '<b>'.$p.'</b>';
if($p+1<=$cp) echo ' | <a href="/us'.$id.'?m=codes&p='.($p+1).'">'.($p+1).'</a>';
if($p+2<=$cp) echo ' | <a href="/us'.$id.'?m=codes&p='.($p+2).'">'.($p+2).'</a>';
if($p+3<=$cp) echo ' | <a href="/us'.$id.'?m=codes&p='.($p+3).'">'.($p+3).'</a>';
if($p+1<=$cp) echo ' <a href="/us'.$id.'?m=codes&p='.($p+1).'">></a>';
if($p+2<=$cp) echo ' <a href="/us'.$id.'?m=codes&p='.ceil($ca/$cop).'">>></a>';
echo '</div>';
break;
}
include '../../system/footer.php';
?>