View file includes/head.php

File size: 4.44Kb
<?php
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// Sitchi CMS - Mobile Content Management System //
// The author:  Nikoloz Sitchinava [sitchi]      //
// Link:        http://sitchicms.num.ge          //
// Skype:       SitchiCMS                        //
// License:     LICENSE.txt (see attached file)  //
// Version:     VERSION.txt (see attached file)  //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
function head($title=NULL) 
{
global $set,$root_path;
$lng = load_lng();
if ($title==NULL)$title=$set['title'];
echo'<?xml version="1.0" encoding="utf-8"?>' . "\n" .
"\n" . '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">' .
"\n" . '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">' .
"\n" . '<head>' .
"\n" . '<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>' .
"\n" . '<meta http-equiv="Content-Style-Type" content="text/css" />' .
"\n" . '<meta name="Generator" content="Powered by SitchiCMS, http://sitchicms.num.ge" />' . // ყურადღებით!!! თქვენ არ გაქვთ საავტორო უფლების წაშლა
(!empty($set['meta_key']) ? "\n" . '<meta name="keywords" content="' . $set['meta_key'] . '" />' : '') .
(!empty($set['meta_desc']) ? "\n" . '<meta name="description" content="' . $set['meta_desc'] . '" />' : '') .
"\n" . '<link rel="stylesheet" href="/themes/'.$set['set_them'].'/style.css" type="text/css" />' .
"\n" . '<link rel="shortcut icon" href="'.$root_path.'/themes/'.$set['set_them'].'/favicon.ico" />' .
"\n" . '<title>'.$title.'</title>' .
"\n" . '</head><body>';
/*ლოგო და ენის შეცვლის ჩვენება*/
global $user;
echo'<div class="header"><table style="width: 100%;"><tr>' .
'<td valign="bottom"><a href="'.$root_path.'"><img src="/themes/'.$set['set_them'].'/images/logo.png" alt=""/></a></td>
<td align="right">';
if (isset($_SESSION['lang'])){
$lngs = $_SESSION['lang'];}
if (!isset($_SESSION['lang'])){
$lngs = $set['set_lang'];}
if (isset($user)){
$lngs = $user['set_lang'];}
echo'<a href="'.$root_path.'pages/lang.php"><img src="'.$root_path.'images/flags/'.$lngs.'.gif" alt=""/> '.$lngs.'</a>';
echo'</tr></table></div>';
/*მისალმების ჩვენება*/
echo'<div class="efmenu">';
global $time;
if(intval(date("H", $time  + $user['timing'] * 3600)) >= 0 AND intval(date("H", $time  + $user['timing'] * 3600)) < 6) $stri = '' . $lng['1_15'] . '';
if(intval(date("H", $time  + $user['timing'] * 3600)) >= 6 AND intval(date("H", $time)) < 12) $stri = '' . $lng['1_16'] . '';
if(intval(date("H", $time  + $user['timing'] * 3600)) >= 12 AND intval(date("H", $time  + $user['timing'] * 3600)) < 17) $stri = '' . $lng['1_17'] . '';
if(intval(date("H", $time  + $user['timing'] * 3600)) >= 17) $stri = '' . $lng['1_18'] . '';
echo'<span class="gray">' . $stri . ' ' . ($user['id'] ? '<b><a href="/pages/info.php?id='.$user['id'].'">'.$user['login'].'</a></b>' : '' . $lng['1_19'] . '') . ' !</span><br/>';
$monthArray = array(
1=>'' . $lng['1_20'] . '',
2=>'' . $lng['1_21'] . '',
3=>'' . $lng['1_22'] . '',
4=>'' . $lng['1_23'] . '',
5=>'' . $lng['1_24'] . '',
6=>'' . $lng['1_25'] . '',
7=>'' . $lng['1_26'] . '',
8=>'' . $lng['1_27'] . '',
9=>'' . $lng['1_28'] . '',
10=>'' . $lng['1_29'] . '',
11=>'' . $lng['1_30'] . '',
12=>'' . $lng['1_31'] . '');
echo'' . $lng['1_32'] . ': '.date
('d', $time  + $user['timing'] * 3600).'&nbsp;'.$monthArray[date
('n', $time  + $user['timing'] * 3600)].'&nbsp;'.date('Y', $time  + $user['timing'] * 3600);
echo'<br/>'.date('H:i:s', $time  + $user['timing'] * 3600);
echo'</div>';
global $user,$set,$root_path;
if (isset($user))
{
echo'<div class="tmn"><a href="/pages/info.php?id='.$user['id'].'">'.$user['login'].'</a> | <a href="/pages/profile.php">'.$lng['1_4'].'</a></div>';
if ($_SERVER['PHP_SELF']=='/index.php')
{
ads(1);
}
echo'<div class="maintxt">';
$k_mail=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `id_user`='$user[id]' AND `read`= '0'"),0);
if($k_mail>0)echo'<div class="errmenu"><a href="/pages/mail.php">'.$lng['1_3'].'</a>&#160;<span style="color:red;">[+'.$k_mail.']</span></div>';
}else{
echo'<div class="tmn">
<a href="/pages/login.php">'.$lng['1_1'].'</a> |
<a href="/pages/registration.php">'.$lng['1_2'].'</a></div>';
if ($_SERVER['PHP_SELF']=='/index.php')
{
ads(1);}
echo'<div class="maintxt">';
}}
?>