Файл: wcat/inc/fnc.php
Строк: 32
<?php
function my_error()
{
echo '<b>#</b>'.mysql_errno().': '.mysql_error().'<br /><br />';
exit;
}
function obr($var,$kol)
{
$var_obr = trim(htmlspecialchars($var));
if($kol!='0') $var_obr = substr($var_obr,0,$kol);
return $var_obr;
}
function day()
{
$month = date("M");
switch ($month) {
case "Jan": $month = "Января"; break;
case "Feb": $month = "Февраля"; break;
case "Mar": $month = "Марта"; break;
case "Apr": $month = "Апреля"; break;
case "May": $month = "Мая"; break;
case "Jun": $month = "Июня"; break;
case "Jul": $month = "Июля"; break;
case "Aug": $month = "Августа"; break;
case "Sep": $month = "Сентября"; break;
case "Oct": $month = "Октября"; break;
case "Nov": $month = "Ноября"; break;
case "Dec": $month = "Декабря"; break;
}
$day=date("d");
$y=date("Y");
$return="$day $month $y";
if($set==2) {$time_date="".date("H:i")." $day $month $y";return($time_date);}
if($set==1) {return($return);}
if($set==0){echo "$day $month $y г.";}
}
?>