Вход Регистрация
Файл: system/modules/guests.php
Строк: 38
<?php
/* 
    Appointment: Гости пользователя
    File: guests.php 
 
*/
if(!defined('MOZG'))
    die(
'Hacking attempt!');

if(
$ajax == 'yes')
    
NoAjaxQuery();

if(
$logged){
    
$act $_GET['act'];
    
$metatags['title'] = 'Гости';

    if(
$_GET['page'] > 0$page intval($_GET['page']); else $page 1;
    
$gcount 20;
    
$limit_page = ($page-1)*$gcount;
                

                
//################### Просмотр всех друзей ###################//
            
$get_user_id intval($_GET['user_id']);
                if(!
$get_user_id)
                    
$get_user_id intval($user_info['user_id']);
    
$sql_ $db->super_query("SELECT tb1.uid,  from_uid, date, tb2.user_search_pref, user_photo, user_id, user_status, user_last_visit FROM `".PREFIX."_guests` tb1, `".PREFIX."_users` tb2 WHERE tb1.from_uid = '{$get_user_id}' AND tb1.uid = tb2.user_id  ORDER by `date` DESC LIMIT {$limit_page}{$gcount}"1);

                        if(
$sql_){
                        
                            foreach(
$sql_ as $row){
                  
$tpl->load_template('guests/guests.tpl');
        
                         if(
date('Y-m-d'$row['date']) == date('Y-m-d'$server_time))
                    
$dateTell langdate('сегодняв H:i'$row['date']);
                elseif(
date('Y-m-d'$row['date']) == date('Y-m-d', ($server_time-84600)))
                    
$dateTell langdate('вчера в H:i'$row['date']);
                else
                    
$dateTell langdate('j F Y в H:i'$row['date']);
            
                    
$tpl->set('{data}'$dateTell);
$tpl->set('{user-id}'$row['user_id']);

                    
                                

                                
//Выводимстатус пользователя, если нету статус то выводим, место прожывания.
                                
if($row['user_status']){
                                    
$tpl->set('{guest_status}','<div style="background:#FFB33F;padding:3px;">'stripslashes(substr($row['user_status'], 013)).'...</div>');
                                } else {
                                    
                                    
$tpl->set('{guest_status}''<div style="margin-top:18px;"></div>');
                                }

                                
$tpl->set('{name}'$row['user_search_pref']);
                                    
                                if(
$row['user_photo'])
                                    
$tpl->set('{ava}'$config['home_url'].'/uploads/users/'.$row['user_id'].'/100_'.$row['user_photo']);
                                else
                                    
$tpl->set('{ava}''{theme}/images/100_no_ava.png');
                                
                                if(
$row['user_last_visit'] >= $online_time)
                                    
$tpl->set('{online}'$lang['online']);
                                else
                                    
$tpl->set('{online}''<div style="margin-top:10px;"></div>');
                                
                                

                                
$tpl->compile('content');
                            }
                    
                        } else{
            
            
           
$user_speedbar 'Информация';
    
msgbox('''Вашу страницу еще не посещали''info');
          
          }

                    

    
    
$db->free();
    
$tpl->clear();
    
} else {
    
$user_speedbar 'Информация';
    
msgbox(''$lang['not_logged'], 'info');
}
?>
Онлайн: 1
Реклама