Файл: system/classes/Tmp.php
Строк: 126
<?
Class Tmp {
public function header($title)
{
global $db, $gens;
$gens = microtime(true);
$theme = User::settings('theme');
if (file_exists(R.'/design/styles/'.$theme.'/header.php')) {
require_once(R.'/design/styles/'.$theme.'/header.php');
} else {
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://www.w3.org/1999/XSL/Transform">
<head>
<title><? echo Language::config($title); ?></title>
<meta name="viewport" content="width=device-width" />
<? echo (Core::config('description') ? '<meta name="description" content="'.Core::config('description').'" />' : NULL); ?>
<? echo (Core::config('keywords') ? '<meta name="keywords" content="'.Core::config('keywords').'" />' : NULL); ?>
<link rel="stylesheet" href="/design/styles/<? echo User::settings('theme')?>/style.css" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600" rel="stylesheet">
<link rel="shortcut icon" href="/design/styles/<? echo User::settings('theme')?>/favicon.ico" type="image/x-icon" />
</head>
<body>
<div class="logo"><a href="/"><img src="/design/styles/<? echo User::settings('theme')?>/img/logo.png"/></a></div>
<?
$ads=$db->query("select * from `ads` where `time_end` > '".time()."' ");
while($a = $ads->fetch_assoc()){
if($a['local'] == 1) self::div('ds', '<a href="http://'.$a['link'].'">'.img('ds.png').' '.$a['name'].'</a>');
}
}
}
public static function div($name, $content)
{
echo '<div class="'.$name.'">'.$content.'</div>';
}
public static function title($name, $content)
{
echo '<div class="'.$name.'"><img src="/design/styles/'.User::settings('theme').'/img/title.png"/> '.$content.'</div>';
}
public static function friends_menu($uid, $a)
{
echo '<div class="friends_menu flex"><a '.(($a == 1) ? 'class="active"' : NULL).' href="/friends'.$uid.'">'.Language::config('friends').'</a> <a '.(($a == 2) ? 'class="active"' : NULL).' href="/friends/bid">'.Language::config('bid').'</a> <a '.(($a == 3) ? 'class="active"' : NULL).' href="/friends/online'.$uid.'">'.Language::config('friends_online').'</a></div>';
}
public static function del_sure($name, $link)
{
echo '<div class="main">Вы уверенны что хотите удалить "'.$name.'"?</div><div class="menu bm flex"><a href="?'.$link.'">'.img('delete.png').' Да, удалить!</a> <a style="cursor: pointer" onclick="history.go(-1)">'.img('link.png').' Отменить</a></div>';
}
public function footer()
{
global $gens, $db;
$theme = User::settings('theme');
if (file_exists(R.'/design/styles/'.$theme.'/footer.php')) {
require_once(R.'/design/styles/'.$theme.'/footer.php');
} else {
$o=$db->fass_c("SELECT COUNT(*) as count FROM `users` WHERE `date_last_entry` > '".(time() - 360)."'");
$g=$db->fass_c("SELECT COUNT(*) as count FROM `guests` WHERE `time` > '".(time() - 600)."'");
$ads=$db->query("select * from `ads` where `time_end` > '".time()."' ");
while($a=$ads->fetch_assoc()){
if($a['local'] == 0) self::div('ds', '<a href="http://'.$a['link'].'">'.img('ds.png').' '.$a['name'].'</a>');
}
self::div('footer', '<a href="/online">'. Language::config('online').': '.$o. ' </a> | '.$g.'<br>Gen: '.round(microtime(true) - $gens, 4));
}
echo '</body></html>';
}
}
?>