Короче я запарился с кодом мне нужно вставить этот код:
<div class="menu_title">Рекомендуем</div>
После этого: раздела "пользователи"
Вот сайт:
http://zonfa.ru
Путь такой: /www/zonfa.ru/system/modules/index
Вот весь код:
<?php
$tracks = array();
$q = $DB -> query ("SELECT * FROM `track_list` WHERE `count` > 0 ORDER BY `count` DESC LIMIT 5"
;
while ($p = $q -> fetch_assoc()) {
$tracks[] = array('href' => '/music-track?id='.$p['id'], 'title' => output_txt($p['name']), 'info' => $p['count']);
}
$new_tracks = array();
$q = $DB -> query ("SELECT * FROM `track_list` WHERE `create` > '".(TIME-3600*24*7)."' AND `count` > 0 ORDER BY `create` DESC LIMIT 5"
;
while ($p = $q -> fetch_assoc()) {
$new_tracks[] = array('href' => '/music-track?id='.$p['id'], 'title' => output_txt($p['name']), 'info' => $p['count']);
}
$media[] = array('href' => '/music-list', 'title' => 'MP3 треки', 'info'=> false);
$media[] = array('href' => '/music-artists', 'title' => 'Исполнители', 'info'=> false);
$media[] = array('href' => '/music-abc', 'title' => 'Рубрикатор', 'info' => false);
$media[] = array('href' => '/music-comms', 'title' => 'Люди обсуждают', 'info' => '('.$DB -> query("SELECT * FROM `track_comm` "
-> num_rows.')');
$q = $DB -> query ("SELECT `time` FROM `news` ORDER BY `time` DESC LIMIT 1"
-> fetch_array();
$menu[] = array('href' => '/news', 'title' => 'Новости', 'info' => date('d.m.Y',$q['time']));
$q = $DB -> query ('SELECT* FROM `video` WHERE `create` > '.(TIME-3600*24).' ') -> num_rows;
$menu[] = array('href' => '/video', 'title' => 'Видео', 'info' => ($q > 0 ? '<span style="color:red;">+'.$q.'</span>' : null));
$q = $DB -> query("SELECT * FROM `zakazy` WHERE `status` = '1' "
-> num_rows;
$menu[] = array('href' => '/zakazy', 'title' => 'Стол заказов', 'info' => ($q > 0 ? '<span class="red">+'.$q.'</span>' : null));
$menu[] = array('href' => '/minichat', 'title' => 'Мини чат', 'info' => '('.$DB -> query ('SELECT* FROM `minichat` ') -> num_rows.')');
$menu[] = array('href' => '/users', 'title' => 'Пользователи', 'info' => '('.$DB -> query ('SELECT* FROM `users` ') -> num_rows.')');
$menu[] = array('href' => '/users?order=online', 'title' => 'Сейчас на сайте '.$DB -> query ('SELECT* FROM `users` WHERE `date_last` > '.(TIME-600).' ') -> num_rows, 'info' => 'и '.$DB -> query ('SELECT* FROM `guests` WHERE `date_last` > '.(TIME-600).' ') -> num_rows.' гостей');
$q = $DB -> query ("SELECT `time` FROM `news` ORDER BY `time` DESC LIMIT 1"
-> fetch_array();
$media[] = array('href' => '/music-list', 'title' => 'MP3 треки', 'info'=> false);
$q = $DB -> query ("SELECT * FROM `ads_manager` WHERE `area` = 'home' AND `time` > ".TIME." ORDER BY `position` ASC "
;
$reclama = array();
while ($p = $q -> fetch_assoc()) {
$p['names'] = explode(',', $p['names']);
$reclama[] = array('id' => $p['id'], 'go' => $p['go'], 'url' => output_txt($p['url']), 'img' => ($p['img'] ? output_txt($p['img']) : null), 'name' => ($p['names'] ? output_txt($p['names'][array_rand($p['names'], 1)]) : 'Рекламная ссылка'));
}
?>
-------------------------------
А главная zonfa.ru/index.php
Такой код:
<?php
ini_set('register_globals', 0);
ini_set('session.cookie_domain', $_SERVER['HTTP_HOST']);
//ini_set('session.save_path', ROOT .'temp/sess');
define ('TIME_START', microtime(1));
define ('MEMORY_START', memory_get_usage());
define ('ROOT', $_SERVER['DOCUMENT_ROOT'].'/');
define ('TIME', $_SERVER['REQUEST_TIME']);
$_DATA = include(ROOT.'system/config/settings.php');
if (isset ($_GET['module']) && preg_match("|^[a-zA-Z0-9_]*$|", $_GET['module']))
$_DATA['area'] = $_GET['module'];
else
$_DATA['area'] = 'index';
if (isset ($_GET['page']) && preg_match("|^[a-zA-Z0-9_]*$|", $_GET['page']))
$_DATA['area'] .= '/'.$_GET['page'];
else
$_DATA['area'] .= '/index';
session_name('sky');
if (!preg_match('~^[A-Za-z0-9]{32}$~', session_id()))
session_regenerate_id();
session_start();
include (ROOT.'system/kernel/mysqli.php');
include (ROOT.'system/kernel/functions.php');
if (isset($_SESSION['userid'])) {
include (ROOT.'system/kernel/session_aut.php');
}
elseif (isset($_COOKIE['userid']) && isset($_COOKIE['pass'])) {
include (ROOT.'system/kernel/cookie_aut.php');
}
else {
include (ROOT.'system/kernel/guests_aut.php');
}
if ($_DATA['errors'] == 'on' && IS_ADMIN)
error_reporting (E_ALL);
else
error_reporting (0);
$error = null;
$sysmsg = null;
if (file_exists (ROOT.'system/modules/'.$_DATA['area'].'.php')) {
include (ROOT.'system/modules/'.$_DATA['area'].'.php');
}
else {
// header('Location: /error.html');exit;
}
include (ROOT.'system/views/_main/header.tmpl');
if ($_DATA['ads'] == 'on')
ads_out('top');
if ($error != null || $sysmsg != null) {
include (ROOT.'system/views/_main/err_msg.tmpl');
}
include (ROOT.'system/views/'.$_DATA['area'].'.tmpl');
include (ROOT.'system/views/_main/footer.tmpl');
?>
Добавлено 12.06.15 в 00:48:52:
Ну кто знает?
Добавлено 12.06.15 в 00:59:05:
Ну же народ?