Файл: style/themes/default/userpage.php
Строк: 196
<?php
/**
* @package Prime Social
* @link http://primesocial.ru
* @copyright Copyright (C) 2016 Prime Social
* @author BoB | http://primesocial.ru/about
*/
$bann = DB::$dbs->queryFetch("SELECT * FROM ".BANN." WHERE `user_id` = ? && `time_bann` > ?", array($page['user_id'], time()));
if ($bann['time_bann'] > time()) {
echo '<b>Foydalanuvchiga Ban berilgan!</b><br /><b>Sababi:</b> ' . text($bann['prich']) . '<br /><br />';
}
echo '<table cellspacing="0" cellpadding="0" width="100%" ><tr>';
echo '<td class="white" width="5%">';
echo '' . avatar($page['user_id'],100,100) . '';
$rating = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".PHOTO_RATING." WHERE `friend_id` = ?", array($page['user_id']));
$comm = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".PHOTO_COMM." WHERE `friend_id` = ?", array($page['user_id']));
if (!empty($page['photo'])) {
echo '<center><a href="'.HOME.'/avatar/comm/'.$page['user_id'].'/" style="color:#3B5998;font-size:12px;">'.icon('bubl.png').' '.$comm.'</a>
<a href="'.HOME.'/avatar/like/'.$page['user_id'].'/" style="color:#3B5998;font-size:12px;">'.icon('cls.png',13,15).' '.$rating.'</a></center>';
}
echo '</td>';
echo '<td class="white" width="95%">';
echo '' . userLink($page['user_id']) . ' ';
if ($page['last_time'] > (time() - 2000)) {
if ($page['is_mobile'] == 1) {
echo ' '.icon('pda.png').'';
} elseif ($page['is_mobile'] == 2) {
echo ' '.icon('pc.png').'';
}
} else {
}
if ($page['user_id'] != $user['user_id']) {
echo '<span style="float:right;margin-top:15px;"><a href="'.HOME.'/mail/'.$page['user_id'].'/"> '.icon('umail.png',30,30).' </a></span>';
}
echo '<br/>';
echo '<span style="font-size:11px;color:#4587BE;border: 1px solid #68AEE6;border-radius:4px;padding:3px;">
Reyting: ' . (empty($page['rating']) ? '0' : $page['rating']) . '%</span>';
echo ' <span style="font-size:11px;color:#5e9c76;border: 1px solid #5e9c76;border-radius:4px;padding:3px;">
' . (empty($page['balls']) ? '0' : $page['balls']) . '$</span>';
echo '<br/><span class="mini">' . level($page['level']) . '</span>';
if (!empty($page['zver'])) {
echo '<div style="float: right;margin-right:15px;margin-top: 25px;"><img src="'.HOME.'/moduls/shop/zver/'.$page['zver'].'" /></div>';
}
echo '</td></tr></table>';
$status = DB::$dbs->queryFetch("SELECT * FROM ".STATUS." WHERE `user_id` = ? ORDER BY `id` DESC LIMIT 1",array($page['user_id']));
$rating = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".STATUS_RATING." WHERE `status_id` = ?", array($status['id']));
$comm = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".STATUS_COMM." WHERE `status_id` = ?", array($status['id']));
if ($page['user_id'] != $user['user_id']) {
if (!empty($status)) {echo '<div class="sts">';
echo text($status['status']) . '</div><div class="white" style="float:right;">'.icon('bubl.png').' <a href="'.HOME.'/status/'.$status['id'].'/comm/" style="color:#3B5998;font-size:12px;">'.$comm.'</a> '.icon('cls.png',13,15).' <a href="'.HOME.'/status/'.$status['id'].'/like/" style="color:#3B5998;font-size:12px;">'.$rating.'</a> ';
$status = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".STATUS." WHERE `user_id` = ? ", array($page['user_id']));
echo '<a href="'.HOME.'/statush/'.$page['user_id'].'/" style="color:#3B5998;font-size:12x;">'.icon('notes.png',14,14).' </a> '.$status.'' . CLOSE_DIV;
}
} else {
echo '<div class="sts"><a href="'.HOME.'/menu/status?edit&ank">' . (!empty($status['status']) ? $status['status'] : 'Statusni o`zgartirish') . '</a></div>
<div class="white" style="float:right;">'.icon('bubl.png').' <a href="'.HOME.'/status/'.$status['id'].'/comm/" style="color:#3B5998;font-size:12px;">'.$comm.'</a>
'.icon('cls.png',13,15).' <a href="'.HOME.'/status/'.$status['id'].'/like/" style="color:#3B5998;font-size:12px;">'.$rating.'</a> '; $status = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".STATUS." WHERE `user_id` = ? ", array($page['user_id']));
echo '<a href="'.HOME.'/statush/'.$page['user_id'].'/" style="color:#3B5998;font-size:12px;">'.icon('notes.png',14,14).' '.$status.'</a> ' . CLOSE_DIV;
}
/* Yangi sovg`alar */
$all = DB::$dbs->querySingle("SELECT COUNT(*) FROM ".PRESENTS_LIST." WHERE `friend_id` = ?", array($page['user_id']));
if ($all) {
echo '<div class="white">';
$sql = DB::$dbs->query("SELECT * FROM ".PRESENTS_LIST." WHERE `friend_id` = ? ORDER BY `id` DESC LIMIT 5", array($page['user_id']));
while($list = $sql -> fetch()){
$present = DB::$dbs->queryFetch("SELECT * FROM ".PRESENTS." WHERE `id` = ? LIMIT 1",array($list['present_id']));
echo '<img src="'.HOME.'/files/presents/'.$present['url'].'" width=30 height=30> ';
}
echo CLOSE_DIV;
}
if ($user['user_id'] != $page['user_id']) {
$priceSumm = 50; // Boshlang`ich baxo
if (empty($page['harem_pokup_all'])) {
$price = $priceSumm;
} else {
$price = ($page['harem_pokup_all'] * $priceSumm) + $priceSumm;
}
if (!empty($page['harem_xoz'])) {
echo '<div class="white">
' . ($page['harem_xoz'] == $user['user_id'] ? 'Sizning garemingizda!
<a href="'.HOME.'/harem/otpusk/'.$page['user_id'].'/">[Chiqarish]</a></div>' : '
<div class="white">' . user_choice($page['harem_xoz'], 'link') . ' Garemida <br />
- <a href="'.HOME.'/harem/kup/'.$page['user_id'].'/">'.$price.' ballga o`g`irlash</a></div>');
} else {
echo '<div class="white"> <a href="'.HOME.'/harem/kup/'.$page['user_id'].'/">'.$price.' tangaga garemga o`g`irlash</a></div>';
}
} else {
if (!empty($page['harem_xoz'])) {
echo '<div class="white"> ' . user_choice($page['harem_xoz'], 'link') . ' Garemida</div>';
}
}
echo DIV_TOUCH . '<a href="'.HOME.'/anceta/'.$page['user_id'].'/">'.icon('a.png').' Anketa</a>' . CLOSE_DIV;
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FRIENDS." WHERE (`id_user` = ? OR `id_friend` = ?) AND (`status` = ?) ", array($user['user_id'],$user['user_id'], 1));
echo DIV_TOUCH . '<a href="'.HOME.'/friends/">'.icon('users.png').' Do`stlar <span class="count"> '.$all.'</span></a>' . CLOSE_DIV;
$guest = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".GUEST." WHERE `user_id` = ? ", array($page['user_id']));
echo DIV_TOUCH . '<a href="'.HOME.'/guest/'.$page['user_id'].'/">'.icon('chat.png').' Mehmonxona <span class="count"> '.$guest.'</span></a>' . CLOSE_DIV;
$files = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FILES." WHERE `user_id` = ? ", array($page['user_id']));
echo DIV_TOUCH . '<a href="'.HOME.'/files/'.$page['user_id'].'/">'.icon('yuklama.png').' Shahsiy fayllar <span class="count">'.$files.'</span></a>' . CLOSE_DIV;
$albums = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".ALBUMS." WHERE `user_id` = ?", array($page['user_id']));
$photos = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".ALBUMS_PHOTOS." WHERE `user_id` = ?", array($page['user_id']));
echo DIV_TOUCH . '<a href="'.HOME.'/album/user/'.$page['user_id'].'/">'.icon('foto.png').' Fotoalbom <span class="count"> '.$albums.'/'.$photos.'</span></a>' . CLOSE_DIV;
echo DIV_TOUCH . '<a href="'.HOME.'/comm/'.$page['user_id'].'/">'.icon('guruh.png').' Guruhlar</a>' . CLOSE_DIV;
$love = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".STENA_LOVE." WHERE `user_id` = ? ", array($page['user_id']));
echo DIV_TOUCH . '<a href="'.HOME.'/love/'.$page['user_id'].'/">'.icon('svd.png').' Sevgi devori <span class="count">'.$love.'</span></a>' . CLOSE_DIV;
$harem = DB::$dbs->querySingle("SELECT COUNT(`user_id`) FROM ".USERS." WHERE `harem_xoz` = ?", array($page['user_id']));
echo DIV_TOUCH . '<a href="'.HOME.'/harem/user/'.$page['user_id'].'/">'.icon('gul.png').' Garem <span class="count"> '.$harem.' kishi</span></a>' . CLOSE_DIV;
$all = DB::$dbs->querySingle("SELECT COUNT(*) FROM ".PRESENTS_LIST." WHERE `friend_id` = ?", array($page['user_id']));
echo DIV_TOUCH . '<a href="'.HOME.'/present/list/'.$page['user_id'].'/">'.icon('sovga.png').' Sovg`alar <span class="count">'.$all.'</span></a>' . CLOSE_DIV;
echo DIV_TOUCH . '<a href="'.HOME.'/stat/'.$page['user_id'].'/">'.icon('chart.png').' Statistika</a>' . CLOSE_DIV;
if ($page['user_id'] == $user['user_id']) {
echo DIV_TOUCH . '<a href="'.HOME.'/menu/">'.icon('plus.png').' Menu</a>' . CLOSE_DIV;
}
if ($page['user_id'] != $user['user_id']) {
echo '<div class="white" style="font-size:12px;">';
}
if ($page['user_id'] != $user['user_id']) {
echo '- <a href="'.HOME.'/present/'.$page['user_id'].'/">Sovg`a jo`natish</a><br/>';
}
if ($page['user_id'] != $user['user_id']) {
if (DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".GROUPS." WHERE `user_id` = ?", array($user['user_id'])) == TRUE) {
$group = DB::$dbs->queryFetch("SELECT * FROM ".GROUPS." WHERE `user_id` = ? LIMIT 1",array($user['user_id']));
if (DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".GROUPS_PEOPLES." WHERE `group_id` = ? && `user_id` = ?", array($group['id'], $page['user_id'])) == FALSE) {
echo '- <a href="'.HOME.'/soo/'.$page['user_id'].'/">Guruhga taklif qilish</a><br/>';
}
}
}
/* Do`stlar */
if ($page['user_id'] != $user['user_id']) {
$sql = DB::$dbs->queryFetch("SELECT `id`, `status`, `id_friend` FROM `friends` WHERE (`id_user` = ? AND `id_friend` = ?) LIMIT 1",array($user['user_id'], $page['user_id']));
if (empty($sql)) {
$sql2 = DB::$dbs->queryFetch("SELECT `id`, `status` FROM `friends` WHERE (`id_user` = ? AND `id_friend` = ?) LIMIT 1",array($page['user_id'], $user['user_id']));
if ($sql2['status'] == 0) {
if ($sql['id'] || $sql2['id'])
echo '- <a href="'.HOME.'/friends/add/'.$page['user_id'].'/">Do`stlik taklifini qabul qilish</a><br/>';
else
echo '- <a href="'.HOME.'/friends/add/'.$page['user_id'].'/">Do`stlarim orasiga qo`shish</a><br/>';
} else {
if (!empty($sql))
echo '- <a href="'.HOME.'/friends/add/'.$page['user_id'].'/">Do`stlarim orasiga qo`shish</a><br/>';
else {
echo '- <a href="'.HOME.'/friends/delete/'.$page['user_id'].'/?anceta">Do`stlarim orasidan o`chirish</a><br/>';
}
}
} elseif ($sql['id'] && $sql['status'] == 0) {
$ank = DB::$dbs->queryFetch("SELECT * FROM ".USERS." WHERE `user_id` = ?",array($sql['id_friend']));
echo '- Taklif qilingan ';
echo '<a href="'.HOME.'/friends/delete/'.$ank['user_id'].'/">[X]</a><br/>';
} else {
$ank = DB::$dbs->queryFetch("SELECT * FROM ".USERS." WHERE `user_id` = ?",array($sql['id_friend']));
echo '- <a href="'.HOME.'/friends/delete/'.$ank['user_id'].'/?anceta">Do`stlarim orasidan o`chirish</a><br/>';
}
}
if ($user['user_id'] != $page['user_id']) {
if (DB::$dbs->querySingle("SELECT COUNT(*) FROM ".BLACKUSERS." WHERE `user_id` = ? && `black_id` = ?", array($user['user_id'], $page['user_id'])) == FALSE) {
echo '- <a href="'.HOME.'/blacklist/go/'.$page['user_id'].'/">Qora ro`yhatga kiritish</a><br/>';
} else {
echo '- <a href="'.HOME.'/blacklist/go/'.$page['user_id'].'/">Qora ro`yhatdan o`chirish</a><br/>';
}
}
if ($user['user_id'] != $page['user_id'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `duel` WHERE `user` = '".$page['user_id']."' AND `opponent` = '".$page['user_id']."' AND `act` != '1'"), 0)==0) {
echo '- <a href="'.HOME.'/duel/add/'.$page['user_id'].'/">Duelga chaqirish</a><br/>';
}
if ($page['user_id'] != $user['user_id']) {
echo '- <a href="'.HOME.'/dey/go/'.$page['user_id'].'/">Amal bajarish</a><br/>';
}
if ($page['user_id'] != $user['user_id']) {
echo '</div>';
}
?>