View file config.php

File size: 3.06Kb
<?
$antihak="1tJw6WtgwP5Gg9J9";
$randlink=rand(111,999);
$time=date("H:i:s");
$date=date("d.m.y");
$sstr=array(
':-)',
':-(',
':-|',
':-0',
';-)',
'8-)',
':-D',
'хуй'
);
$simg=array(
'<img src="1.gif" alt=":-)"/>',
'<img src="2.gif" alt=":-("/>',
'<img src="3.gif" alt=":-|"/>',
'<img src="4.gif" alt=":-0"/>',
'<img src="5.gif" alt=";-)"/>',
'<img src="6.gif" alt="8-)"/>',
'<img src="7.gif" alt=":-D"/>',
'<img src="8.gif" alt="censored"/>'
);
function bbcode($text)
{
$text=str_replace("[b]","<b>", $text);
$text=str_replace("[/b]","</b>", $text);
$text=str_replace("[u]","<u>", $text);
$text=str_replace("[/u]","</u>", $text);
$text=str_replace("[i]","<i>", $text);
$text=str_replace("[/i]","</i>", $text);
$text=str_replace("[big]","<big>", $text);
$text=str_replace("[/big]","</big>", $text);
$text=str_replace("[color=red]","<font color=\"red\">", $text);
$text=str_replace("[color=yellow]","<font color=\"yellow\">", $text);
$text=str_replace("[color=green]","<font color=\"green\">", $text);
$text=str_replace("[color=blue]","<font color=\"blue\">", $text);
$text=str_replace("[/color]","</font>", $text);
$text=preg_replace("!(http://[\S]+)([\s]|$)!i","<a href=\"\\1\">\\1</a>",$text);
return $text;
}
function del($text)
{
$text=str_replace(">","&gt;", $text);
$text=str_replace("<","&lt;", $text);
$text=str_replace("
","", $text);
return $text;
}
function antimat($text)
{
$text=str_replace("сука","___", $text);
$text=str_replace("блядь","___", $text);
$text=str_replace("пед","___", $text);
$text=str_replace("гандон","___", $text);
$text=str_replace("урод","___", $text);
$text=str_replace("бля","___", $text);
$text=str_replace("гавн","___", $text);
$text=str_replace("пиздец","___", $text);
$text=str_replace("отсос","___", $text);
$text=str_replace("нарот","___", $text);return $text;
}

function nav_page($count,$num_page,$url)
{
$page_nav = 3;
 $begin_loop=1;
 $end_loop=$count;
 if ($num_page>$count or $num_page<1) $num_page=1; 
 if ($num_page>$page_nav) {
  echo "&nbsp;&nbsp;<a href=\"$url".($page_nav*(floor($num_page/$page_nav)-($num_page%$page_nav==0 ? 1: 0)))."\">(".($page_nav*(floor($num_page/$page_nav)-1-($num_page%$page_nav==0 ? 1: 0))+1)."-".($page_nav*(floor($num_page/$page_nav)-($num_page%$page_nav==0 ? 1: 0))).")</a> ...";
  $begin_loop=$page_nav*(floor($num_page/$page_nav)-($num_page%$page_nav==0 ? 1: 0))+1;
 }
 if ($count>$page_nav*(floor($num_page/$page_nav)-($num_page%$page_nav==0 ? 1: 0)+1)) { $end_loop=$page_nav*ceil($num_page/$page_nav); }
 for ($i = $begin_loop; $i <= $end_loop;  $i++) {
  if ($i==$num_page) echo "&nbsp; <b>$i</b>";
     else echo "&nbsp; <a href=\"$url$i\">$i</a>";
 }
 if ($count>$page_nav*(floor($num_page/$page_nav)-($num_page%$page_nav==0 ? 1: 0)+1)) {
  echo "&nbsp;&nbsp;... <a href=\"$url".($page_nav*ceil($num_page/$page_nav)+1)."\">(".($page_nav*ceil($num_page/$page_nav)+1);
  if ($page_nav*ceil($num_page/$page_nav)+1<$count) {
   echo "-".($count<=$page_nav*(ceil($num_page/$page_nav)+1) ? $count: $page_nav*(ceil($num_page/$page_nav)+1));
  }
  echo ")</a>";
 }
 echo "&nbsp;&nbsp;<br/>\n";
} 
?>