Файл: Krimos/inc/template.php
Строк: 406
<?php
// Криме / Krime
function theader($title = NULL)
{
global $s_sitename, $s_siteurl;
if(getid() == NULL)
$tuid = 0;
else
$tuid = getid();
if($title == NULL)
setonline($tuid, '???');
else
setonline($tuid, $title);
if($title == NULL)
$title = $s_sitename;
else
$title = $s_sitename . ' - ' . $title;
$string = '<?xml version="1.0" encoding="utf-8"?>' . "rn";
$string .= '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">' . "rn";
$string .= '<html xmlns="http://www.w3.org/1999/xhtml">' . "rn";
$string .= '<head>' . "rn";
$string .= ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "rn";
$string .= ' <title>' . $title . '</title>' . "rn";
$string .= ' <link rel="stylesheet" href="' . $s_siteurl . '/style.css" type="text/css" />' . "rn";
$string .= '</head>' . "rn";
$string .= '<body>' . "rn";
$string .= ' <div class="header">' . $s_sitename . '</div>' . "rn";
$string .= ' <div class="content">' . "rn";
return $string;
}
function tfooter()
{
global $s_sitename, $s_siteurl, $language;
if($language == 'sr')
{
$srlink = 'Srpski';
$enlink = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
$enlink = strpos($enlink, 'lang=sr') ? $enlink : $enlink . '&lang=sr';
$enlink = str_replace('lang=sr', 'lang=en', $enlink);
$enlink = str_replace('&', '&', $enlink);
$enlink = str_replace('?&', '?', $enlink);
$enlink = '<a href="' . $s_siteurl . $enlink . '">English</a>';
$rulink = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
$rulink = strpos($rulink, 'lang=sr') ? $rulink : $rulink . '&lang=sr';
$rulink = str_replace('lang=sr', 'lang=ru', $rulink);
$rulink = str_replace('&', '&', $rulink);
$rulink = str_replace('?&', '?', $rulink);
$rulink = '<a href="' . $s_siteurl . $rulink . '">Русский</a>';
}
elseif($language == 'ru')
{
$rulink = 'Русский';
$enlink = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
$enlink = strpos($enlink, 'lang=ru') ? $enlink : $enlink . '&lang=ru';
$enlink = str_replace('lang=ru', 'lang=en', $enlink);
$enlink = str_replace('&', '&', $enlink);
$enlink = str_replace('?&', '?', $enlink);
$enlink = '<a href="' . $s_siteurl . $enlink . '">English</a>';
$srlink = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
$srlink = strpos($srlink, 'lang=ru') ? $srlink : $srlink . '&lang=ru';
$srlink = str_replace('lang=ru', 'lang=sr', $srlink);
$srlink = str_replace('&', '&', $srlink);
$srlink = str_replace('?&', '?', $srlink);
$srlink = '<a href="' . $s_siteurl . $srlink . '">Srpski</a>';
}
else
{
$enlink = 'English';
$srlink = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
$srlink = strpos($srlink, 'lang=en') ? $srlink : $srlink . '&lang=en';
$srlink = str_replace('lang=en', 'lang=sr', $srlink);
$srlink = str_replace('&', '&', $srlink);
$srlink = str_replace('?&', '?', $srlink);
$srlink = '<a href="' . $s_siteurl . $srlink . '">Srpski</a>';
$rulink = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
$rulink = strpos($rulink, 'lang=en') ? $rulink : $rulink . '&lang=en';
$rulink = str_replace('lang=en', 'lang=ru', $rulink);
$rulink = str_replace('&', '&', $rulink);
$rulink = str_replace('?&', '?', $rulink);
$rulink = '<a href="' . $s_siteurl . $rulink . '">Русский</a>';
}
$string = ' <span>' . $srlink . ' | ' . $rulink . ' | ' . $enlink . '</span><br />' . "rn";
$string .= ' </div>' . "rn";
$string .= ' <div class="footer">©' . date('Y', time()) . ' <a href="' . $s_siteurl . '/index.php?lang=' . $language . '">' . $s_sitename . '</a>.</div>' . "rn";
$string .= '</body>' . "rn";
$string .= '</html>' . "rn";
return $string;
}
function tloginbox()
{
global $s_siteurl, $lang, $language;
$string = ' <div class="box">' . "rn";
$string .= ' <form method="get" action="' . $s_siteurl . '/login.php">' . "rn";
$string .= ' <input type="hidden" name="lang" value="' . $language . '" />' . "rn";
$string .= ' <span>' . $lang['username'] . ': </span><br />' . "rn";
$string .= ' <input type="text" name="username" /><br />' . "rn";
$string .= ' <span>' . $lang['password'] . ': </span><br />' . "rn";
$string .= ' <input type="password" name="password" /><br />' . "rn";
$string .= ' <input type="submit" value="' . $lang['login'] . '" /> <input type="reset" value="' . $lang['reset'] . '" /><br /><br />' . "rn";
$string .= ' </form>' . "rn";
$string .= ' <small><a href="' . $s_siteurl . '/recover.php?lang=' . $language . '">' . $lang['lostpassword'] . '?</a></small>' . "rn";
$string .= ' </div>' . "rn";
return $string;
}
function tregisterbox($code)
{
global $s_siteurl, $lang, $language;
$string = ' <div class="box">' . "rn";
$string .= ' <form method="post" action="' . $s_siteurl . '/register.php?lang=' . $language . '">' . "rn";
$string .= ' <input type="hidden" name="code" value="' . $code . '" />' . "rn";
$string .= ' <span>' . $lang['username'] . ': </span><br />' . "rn";
$string .= ' <input type="text" name="username" /><br />' . "rn";
$string .= ' <span>' . $lang['password'] . ': </span><br />' . "rn";
$string .= ' <input type="password" name="password" /><br />' . "rn";
$string .= ' <span>' . $lang['email'] . ': </span><br />' . "rn";
$string .= ' <input type="text" name="email" /><br />' . "rn";
$string .= ' <input type="submit" value="' . $lang['register'] . '" /> <input type="reset" value="' . $lang['reset'] . '" />' . "rn";
$string .= ' </form>' . "rn";
$string .= ' </div>' . "rn";
return $string;
}
function tcodebox()
{
global $s_siteurl, $lang, $language;
$string = ' <div class="box">' . "rn";
$string .= ' <form method="get" action="' . $s_siteurl . '/register.php">' . "rn";
$string .= ' <input type="hidden" name="lang" value="' . $language . '" />' . "rn";
$string .= ' <span>' . $lang['invitecode'] . ': </span><br />' . "rn";
$string .= ' <input type="text" name="code" /><br />' . "rn";
$string .= ' <input type="submit" value="' . $lang['continue'] . '" /> <input type="reset" value="' . $lang['reset'] . '" />' . "rn";
$string .= ' </form>' . "rn";
$string .= ' </div>' . "rn";
return $string;
}
function trecoverbox()
{
global $s_siteurl, $lang, $language;
$string = ' <div class="box">' . "rn";
$string .= ' <form method="post" action="' . $s_siteurl . '/recover.php?lang=' . $language . '">' . "rn";
$string .= ' <span>' . $lang['email'] . ': </span><br />' . "rn";
$string .= ' <input type="text" name="email" /><br />' . "rn";
$string .= ' <input type="submit" value="' . $lang['recover'] . '" /> <input type="reset" value="' . $lang['reset'] . '" />' . "rn";
$string .= ' </form>' . "rn";
$string .= ' </div>' . "rn";
return $string;
}
?>