Файл: apahe/fnc/fnc.php
Строк: 56
<?
function data($time){
$month = array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
$month_rus = array('Января','Февраля','Марта','Апреля','Мая','Июня','Июля','Августа','Сентября','Октября','Нояюря','Декабря');
$timep = date("Сегодня j M Y <b>Время</b> H:i", $time);
$timep = str_replace($month,$month_rus,$timep);
return $timep;
}
function input($var){
return mysql_real_escape_string(trim($var));
}
function trans($str){
$tr = array(
"А"=>"a","Б"=>"b","В"=>"v","Г"=>"g",
"Д"=>"d","Е"=>"e","Ж"=>"j","З"=>"z","И"=>"i",
"Й"=>"y","К"=>"k","Л"=>"l","М"=>"m","Н"=>"n",
"О"=>"o","П"=>"p","Р"=>"r","С"=>"s","Т"=>"t",
"У"=>"u","Ф"=>"f","Х"=>"h","Ц"=>"ts","Ч"=>"ch",
"Ш"=>"sh","Щ"=>"sch","Ъ"=>"","Ы"=>"yi","Ь"=>"",
"Э"=>"e","Ю"=>"yu","Я"=>"ya","а"=>"a","б"=>"b",
"в"=>"v","г"=>"g","д"=>"d","е"=>"e","ж"=>"j",
"з"=>"z","и"=>"i","й"=>"y","к"=>"k","л"=>"l",
"м"=>"m","н"=>"n","о"=>"o","п"=>"p","р"=>"r",
"с"=>"s","т"=>"t","у"=>"u","ф"=>"f","х"=>"h",
"ц"=>"ts","ч"=>"ch","ш"=>"sh","щ"=>"sch","ъ"=>"y",
"ы"=>"yi","ь"=>"","э"=>"e","ю"=>"yu","я"=>"ya");
return strtr($str,$tr);
}
function size($size){
if($size >= 1073741824)
$size = round($size/1073741824*100) / 100 .' гб';
elseif($size >= 1048576)
$size = round($size/1048576*100) / 100 .' мб';
elseif($size >= 1024)
$size = round($size/1024*100) / 100 .' кб';
else $size = round($size).' б';
return $size;
}
function int($var){
return abs(intval($var));
}
function txt($text){
return trim(mysql_real_escape_string(htmlspecialchars($text, ENT_QUOTES, 'utf-8')));
}
function out($var){
return nl2br(code(smile($var)));
}
function encrypt($var){
return md5(base64_encode($var) .'info24');
}
function vtime($var){
if ($var == NULL) $var = time();
$full_time = date('d.m.Y', $var);
$date = date('d.m.Y', $var);
$time = date('H:i', $var);
if ($date == date('d.m.Y')) $full_time = date('H:i', $var);
return $full_time;
}
function error($var){
if (!empty($var)){
echo '<div class="error">'.$var.'</div>';
}}
function addod($var){
if (!empty($var)){
echo '<div class="addod">'.$var.'</div>';
}}
function home(){
echo '<div class="copy"><a href="http://2mas.ru/" title="Бесплатный wap движок">© 2mas.ru</a></div>';
}
?>