Файл: system/modules/recommendation.php
Строк: 27
<?php
/*
Appointment: Настройки
File: settings.php
*/
if(!defined('MOZG'))
die('Hacking attempt!');
if($ajax == 'yes')
NoAjaxQuery();
$user_speedbar = 'Рекомендации';
$metatags['title'] = 'Рекомендации';
$tpl->load_template('recommendation.tpl');
$sql_query = "SELECT SQL_CALC_FOUND_ROWS id, real_communities, badpublic, title, photo, traf, adres FROM `".PREFIX."_communities` WHERE title LIKE '%{$query}%' ORDER by `traf` DESC, `photo` DESC LIMIT {$limit_page}, {$gcount}";
$sql_count = "SELECT COUNT(*) AS cnt FROM `".PREFIX."_communities` WHERE title LIKE '%{$query}%'";
foreach($sql_ as $row){
if($row['photo'])
$tpl->set('{ava}', '/uploads/groups/'.$row['id'].'/100_'.$row['photo']);
else
$tpl->set('{ava}', '{theme}/images/no_ava_groups_100.gif');
if($row['real_communities']){ $tpl->set('{real}', ' <div class="search_verified" title="Подтверждённая страница"></div>');}else{$tpl->set('{real}', '');}
if($row['badpublic']==1){ $tpl->set('{url}', '<a href="#" onClick="groups.warning('.$row['id'].'); return false">');}else{$tpl->set('{url}', '<a href="/{adres}" onClick="Page.Go(this.href); return false">');}
if($row['badpublic']==1){ $tpl->set('{status}', 'Публичная страница "{name}" находится в реестре черных страниц.');}else{$tpl->set('{status}', '');}
$tpl->set('{public-id}', $row['id']);
$tpl->set('{name}', stripslashes($row['title']));
$tpl->set('{note-id}', $row['id']);
$tpl->set('{traf}', $row['traf'].' '.gram_record($row['traf'], 'groups_users'));
if($row['adres']) $tpl->set('{adres}', $row['adres']);
else $tpl->set('{adres}', 'public'.$row['id']);
$tpl->compile('content');
}
$tpl->clear();
$db->free();
?>