Файл: style/themes/default_web/userpage.php
Строк: 257
<?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 '</br><table cellspacing="0" cellpadding="0" width="100%"><tr>
<td style="vertical-align:top;" width="20%"><div class="border"><div class="white"><center>';
echo '' . avatar($page['user_id'],200,200) . '';
echo '<div class="white" style="margin-top:-3px;"><center>';
$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 '<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> ';
}
echo ''.icon('top.png').'' . (empty($page['rating']) ? '0' : $page['rating']) . '%';
echo '</center></div>';
echo '<div class="white">';
echo '<center>' . userLink($page['user_id']) . ' <span style="font-size:10px;color:#52A61D;">' . level($page['level']) . '</span></center>';
echo '<br/>';
echo '</center></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;
$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;
$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;
if ($page['user_id'] != $user['user_id']) {
echo '<div class="grey" style="font-size:12px;">';
}
if ($page['user_id'] != $user['user_id']) {
echo '- <a href="'.HOME.'/mail/'.$page['user_id'].'/">Habar jo`natish</a><br/>';
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>';
}
echo '</div>';
echo '</td>';
echo '<td width="2%" >';
echo '</td>';
echo '<td width="20%" style="vertical-align:top;">';
echo '<div class="border">';
$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="text-align: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="text-align:right;">'.icon('bubl.png').' <a href="'.HOME.'/status/'.$status['id'].'/comm/" style="color:#3B5998;font-size:12px;">'.$comm.'</a>
'.icon('cls.png',13,14).' <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;
}
echo '</div>';
echo '<br/>';
/* Yangi sovg`alar */
$all = DB::$dbs->querySingle("SELECT COUNT(*) FROM ".PRESENTS_LIST." WHERE `friend_id` = ?", array($page['user_id']));
if ($all) {
$all = DB::$dbs->querySingle("SELECT COUNT(*) FROM ".PRESENTS_LIST." WHERE `friend_id` = ?", array($page['user_id']));
echo '<div class="border"><div class="tepa"><a href="'.HOME.'/present/list/'.$page['user_id'].'/"><b>Sovg`alar</b> <span style="float:right;">'.$all.'</span></a></div>';
echo DIV_BLOCK, '';
$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;
}
echo '</div><br/>';
/* Guruhlar */
$all = DB::$dbs->querySingle("SELECT COUNT(`user_id`) FROM ".GROUPS_PEOPLES." WHERE `user_id` = ?", array($page['user_id']));
if ($all > 0) {
echo '<div class="border"><div class="tepa"><a href="'.HOME.'/comm/'.$page['user_id'].'/"><b>Guruhlar</b></a> <span style="float:right;">'.$all.'</span></div>';
$sql = DB::$dbs->query("SELECT * FROM ".GROUPS_PEOPLES." WHERE `user_id` = ? ", array($page['user_id']));
while($post = $sql -> fetch()) {
$group = DB::$dbs->queryFetch("SELECT * FROM ".GROUPS." WHERE `id` = ? ",array($post['group_id']));
$peoples = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".GROUPS_PEOPLES." WHERE `group_id` = ? ", array($group['id']));
echo '<table cellspacing="0" cellpadding="0" width="100%" ><tr>
<td class="lines" width="5%">';
echo '' . (empty($group['logo']) ? '<img src="' . HOME . '/style/img/img.png" style="border-radius:20px;width:45px;height:45px;"/>' : '<img src="' . HOME . '/files/groups/'.$group['logo'] . '" style="border-radius:20px;width:45px;height:45px;"/>') . '';
echo '</td>';
echo '<td class="lines" width="95%" >';
echo '<a href="'.HOME.'/groups/'.$group['id'].'/"><b>' . $group['name'] . '</b></a></br> '.$peoples.' ishtrokchilar<br />';
echo '</td></tr></table>';
}
}
echo '</div><br/>';
/* Do`stlar */
if ($page['user_id'] == $user['user_id']) {
$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 class="border"><div class="tepa"><a href="'.HOME.'/friends/"><b>Do`stlar</b> <span class="count"> '.$all.'</span></a></div>';
if ($all == 0) {
echo DIV_BLOCK . 'Do`stlar ro`yhati bo`sh.' . CLOSE_DIV;
} else {
$sql = DB::$dbs->query("SELECT `id`, `id_user`, `id_friend` FROM ".FRIENDS." WHERE (`id_user` = ? OR `id_friend` = ?) AND (`status` = ?) ", array($user['user_id'],$user['user_id'], 1));
while($friend = $sql -> fetch()){
if ($friend['id_friend'] == $user['user_id']) {
$a = $friend['id_user'];
} else {
$a = $friend['id_friend'];
}
echo DIV_LI . userLink($a) . ' <a href="'.HOME.'/friends/delete/'.$a.'/">[x]</a>' . CLOSE_DIV;
}
}
echo '</div>';
}
echo '</td>';
echo '<td width="2%" >';
echo '</td>';
echo '<td width="56%" style="vertical-align:top;">';
echo '<div class="border"><div class="tepa"><b>' . $page['surname'] . ' ' . $page['name'] . '</b></div>';
echo '<div class="white"><div class="lines"><div class="white"> ' . city($page['city']) .'';
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 {
echo ' <span style="font-size:10px;color:#919191;float:right;">' . vrem($page['last_time']) . '</span><br />';
}
echo '</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>' :
' ' . 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></div>';
echo '<table cellspacing="0" cellpadding="0" width="100%" ><tr>
<td class="lines" style="vertical-align:top;" width="25%">';
echo '</td>';
echo '<td class="lines" style="vertical-align:top;" width="50%" >';
if (empty($page['poznakom']) && empty($page['goal']) && empty($page['family_status']) && empty($page['childtren']) && empty($page['orientation'])) {
echo '';
} else {
echo (!empty($page['poznakom']) ? '<div class="white"><b>Tanishaman:</b> ' . poznakom($page['user_id']) . CLOSE_DIV : NULL);
echo (!empty($page['goal']) ? '<div class="white"><b>Tanishishdan maqsadi:</b> ' . goal($page['user_id']) . CLOSE_DIV : NULL);
echo (!empty($page['family_status']) ? '<div class="white"><b>Oilaviy ahvoli:</b> ' . family_status($page['user_id']) . CLOSE_DIV : NULL);
}
echo '</td>';
echo '<td class="lines" style="vertical-align:top;" width="25%" >';
echo '</td></tr></table>';
echo '</div><br/>';
echo '<div class="border"><div class="tepa"><b>Devor</b></div>';
include_once 'moduls/guest/web.php';
echo '</div><br/>';
echo '<div class="border"><div class="tepa"><b>Statistika</b></div>';
echo '<table cellspacing="0" cellpadding="0" width="100%" ><tr>
<td class="white" style="vertical-align:top;" width="5%">';
echo '</td>';
echo '<td class="white" style="vertical-align:top;font-size:13px;color:#757575;" width="30%" >';
echo '<br/>Chatdagi sharhlar: <b> ' . (empty($page['chat_post']) ? 0 : $page['chat_post']) . '</b><br/><br/>';
echo 'Viktorinadagi javoblar:<b> ' . (empty($page['victorina']) ? 0 : $page['victorina']) . '</b><br/><br/>';
$count2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `duel` WHERE (`user` = '".$page['user_id']."' OR `opponent` = '".$page['user_id']."') AND `finish` != '".$page['user_id']."' AND `act` = '2'"),0);
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `duel` WHERE (`user` = '".$page['user_id']."' OR `opponent` = '".$page['user_id']."') AND `finish` = '".$page['user_id']."' AND `act` = '2'"),0);
echo 'G`olib bo`lgan duellari:<b> ' . $count . ' </b><br/>';
echo '</td>';
echo '<td class="white" style="vertical-align:top;font-size:13px;color:#757575;" width="30%" >';
echo '<br/>Yutqazgan duellari:<b> ' . $count2 . '</b><br/><br/>';
echo 'Jonli efirdagi sharhlar:<b> ' . (empty($page['guestbook_post']) ? 0 : $page['guestbook_post']) . '</b><br/><br/>';
echo 'Chatdagi sharhlar: <b> ' . (empty($page['chat_post']) ? 0 : $page['chat_post']) . '</b><br/><br/>';
echo '</td>';
echo '<td class="white" style="vertical-align:top;font-size:13px;color:#757575;" width="30%" >';
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_POST." WHERE `user_id` = ?", array($page['user_id']));
echo '<br/><a href="'.HOME.'/posts/'.$page['user_id'].'/">Forumdagi sharhlar:<b></a> ' . $all . '</b><br/><br/>';
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_THEME." WHERE `user_id` = ?", array($page['user_id']));
echo '<a href="'.HOME.'/themes/'.$page['user_id'].'/">Forumdagi mavzular:<b></a> ' . $all . '</b><br/><br/>';
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".BLOG." WHERE `user_id` = ?", array($page['user_id']));
echo 'Kundaliklari:<b> ' . $all . '</b><br/>';
echo '</td>';
echo '<td class="white" style="vertical-align:top;" width="5%" >';
echo '</div></td></tr></table>';
echo '</td></tr></table>';
if (!empty($page['zver'])) {
echo '<div style="bottom: 5%;position:fixed;right:50px;"><img src="'.HOME.'/moduls/shop/zver/'.$page['zver'].'" /></div>';
}
?>