kainsk,
# Ноги
function show_footer() {
global $db, $mts, $uset, $config, $is_logged;
$str = '';
if (!defined('IS_INDEX')) {
if (!empty($config['back'])) $str .= $config['back'];
else {
$str .= '
';
}
}
if (!$is_logged) {
$str .= '
';
}
else {
$uset['users_newprivat'] = !empty($uset['users_newprivat']) ? num($uset['users_newprivat']) : 0;
if ($uset['users_newprivat'] > 0) {
$priv = ' + ' . $uset['users_newprivat'];
}
else $priv = '';
$str .= '
';
}
$str .= '
';
$str .= '
';
$str .= '
';
if ($config['show_ads'] == 1 && !defined('IS_ADMINKA')) {
$ads = $db->select("SELECT * FROM ?_ads WHERE (`ads_time` - UNIX_TIMESTAMP()) > 0 ORDER BY rand() LIMIT 0," . $config['ads_num']);
if (!empty($ads)) {
foreach( $ads as $ad ) {
if (!empty($ad['ads_color'])) $ad['ads_name'] = '
' . $ad['ads_name'] . '';
if (!empty($ad['ads_bold'])) $ad['ads_name'] = '
' . $ad['ads_name'] . '';
$str .= '
';
}
}
}
$str .= '
';
$str .= '
' . $config['site_copy'] . ' :: ' . date('Y');
if (!empty($config['allow_online'])) {
require_once( MODULES_PATH . 'online.inc.php' );
$on = $db->selectRow("SELECT COUNT(`online_id`) AS `users`,
(SELECT COUNT(`online_id`) FROM ?_users_online WHERE `online_user` = '') AS `guest`
FROM ?_users_online WHERE `online_user` != '';");
$on = array_map('intval', $on);
$str .= '
Онлайн: ' . $on['users'] . DS . $on['guest'] . ' ';
unset($on);
}
$str .= '
';
$str .= '