"; if (isset($wrfname)) { $codename=urlencode($wrfname); // �������� ��� � ����������, ��� ��������� ���������� �������� ����� ����� GET-������. print "��� �������  ����� [$wrfname]";} else {print " �����������   ����";} if (is_file("$fskin/tiptop.html")) {include("$fskin/tiptop.html");} // ���������� ���������� � �������� print"�������: $date - $time"; return true;} // --�����������-- if (isset($_GET['image'])) { // ������� � ������� ������ $st="R0lGODlhCgAMAIABAFNTU////yH5BAEAAAEALAAAAAAKAAwAAAI"; // ����� ����� ��� ���� �������� function imgwr($st,$num){ if ($num=="0") {$len="63"; $number=$st."WjIFgi6e+QpMP0jin1bfv2nFaBlJaAQA7";} if ($num=="1") {$len="61"; $number=$st."UjA1wG8noXlJsUnlrXhE/+DXb0RUAOw==";} if ($num=="2") {$len="64"; $number=$st."XjIFgi6e+QpMPRlbjvFtnfFnchyVJUAAAOw==";} if ($num=="3") {$len="64"; $number=$st."XjIFgi6e+Qovs0RkTzXbj+3yTJnUlVgAAOw==";} if ($num=="4") {$len="64"; $number=$st."XjA9wG8mWFIty0amczbVJDVHg9oSlZxQAOw==";} if ($num=="5") {$len="63"; $number=$st."WTIAJdsuPHovSKGoprhs67mzaJypMAQA7";} if ($num=="6") {$len="63"; $number=$st."WjIFoB6vxmFw0pfpihI3jOW1at3FRAQA7";} if ($num=="7") {$len="61"; $number=$st."UDI4Xy6vtAIzTyPpg1ndu9oEdNxUAOw==";} if ($num=="8") {$len="63"; $number=$st."WjIFgi6e+QpMP2slSpJbn7mFeWDlYAQA7";} if ($num=="9") {$len="64"; $number=$st."XjIFgi6e+QpMP0jinvbT2FGGPxmlkohUAOw==";} header("Content-type: image/gif"); header("Content-length: $len"); echo base64_decode($number); } // ����� ����������� �� ����� (��� ���������� - ����� �� ������) if (array_key_exists("image", $_REQUEST)) { $num=$_REQUEST["image"]; for ($i=0; $i<10; $i++) {if (md5($i+$absrand)==$num) {imgwr($st,$i); die();}} } exit;} // ��������� - ���� ������: ��� 1 if ($_GET['event']=="repa") { if (!isset($_GET['name'])) {exit("��� ������ ���������� $name.");} if (!isset($_GET['who'])) {exit("��� ������ ���������� $who.");} ////!!!!!!!!!!! ���������� NAME �� ������!!!!!!!!!!!!! $name=$_GET['name']; $name=htmlspecialchars($name); $name=stripslashes($name); $name=str_replace("\r\n","
",$name); $userpn=$_GET['who']; if (!ctype_digit($userpn) or strlen($userpn)>2) {exit("$back. ������� ������. ������� ����� �� �����.");} print "��������� ��������� ���������: $name
������� ���������
��������� $name
-5 -2 -1 0 +1 +2 +5
"; exit; } // ��������� - ����������: ��� 2 if ($_GET['event']=="repasave") { if (!isset($_POST['userpn'])) {exit("��� ������ ���������� $userpn.");} if (!isset($_POST['repa'])) {exit("��� ������ ���������� $repa.");} $userpn=$_POST['userpn']; if (!ctype_digit($userpn) or strlen($userpn)>2) {exit("$back. ������� ������. ������� ����� �� �����.");} $repa=$_POST['repa']; if (!is_numeric($repa)) {exit("$back. ������� ������. �� ��������, ����!");} $today=mktime(); // ���� ��������� + � ��������� ����� //���_�����|���|���������|���������|�������������� �/5|����� ��������� ��� ������ ������� � UNIX �������||| $ufile="$datadir/userstat.dat"; $ulines=file("$ufile"); $ui=count($ulines)-1; $ulinenew=""; // ���� ����� �� ����� � ����� userstat.dat, ���� ������� ���������� �� ����, ���������. for ($i=0;$i<=$ui;$i++) {$udt=explode("|",$ulines[$i]); if ($i==$userpn) {$udt[3]=$udt[3]+$repa; if (strlen($udt[5])>5) {$next=$today-$udt[5]; sleep(1); if ($next<60) {$last=60-$next; exit("$back. ������� ����� ���������
��� ��� ������� ������ ���.
�������� $last ������.
");}} $ulines[$i]="$udt[0]|$udt[1]|$udt[2]|$udt[3]|$udt[4]|$today||||\r\n";} $ulinenew.="$ulines[$i]";} // ���������� ������ � ���� $fp=fopen("$ufile","w"); flock ($fp,LOCK_EX); fputs($fp,"$ulinenew"); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); print "



������� ������� ����������.


������� ����
"; exit; } // �������� ��������� ����� if ($_GET['event']=="mailto") { if ($sendmail!="1") {print"$back.
��������, �� ������� �������� ����� ������������� ���������������!


������� ����
"; exit;} if (!isset($_POST['email'])) {exit("��� ������ ���������� $email.");} if (!isset($_POST['name'])) {exit("��� ������ ���������� $name.");} ////!!!!!!!!!!! ���������� NAME �� ������!!!!!!!!!!!!! $uemail=$_GET['email']; $uname=$_GET['name']; $text="$uemail|$uname|"; $text=htmlspecialchars($text); $text=stripslashes($text); $text=str_replace("\r\n","
",$text); $dt=explode("|",$text); $uemail=$dt[0]; $uname=$dt[1]; if (isset($_GET['fid'])) {$fid=$_GET['fid'];} if (isset($_GET['id'])) {$id=$_GET['id'];} print "����������� ��������� ������ ����������
"; if (isset($_GET['id'])) {print"";} print"
�������� ��������� $uname
���� ���:*
��� E-mail:*
���������:*
"; exit; } // ��� 2 �������� ��������� ������������ if ($_GET['event']=="mailtogo") { $name=$_POST['name']; $email=$_POST['email']; $msg=$_POST['msg']; if (isset($_POST['fid'])) {$fid=$_POST['fid'];} if (isset($_POST['id'])) {$id=$_POST['id'];} $uname=$_POST['uname']; $uemail=$_POST['uemail']; if (!eregi("^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$", $email) and strlen($email) > 30 and $email != "") {print "$back � ������� ���������� E-mail �����!
"; exit;} if ($name=="") {print "$back �� �� ����� ��� ���!
"; exit;} if ($msg=="") {print "$back �� �� ����� ���������!
"; exit;} $text="$name|$msg|$uname|$email|"; $text=htmlspecialchars($text); $text=stripslashes($text); $text=str_replace("\r\n","
",$text); $exd=explode("|",$text); $name=$exd[0]; $msg=$exd[1]; $uname=$exd[2]; $email=$exd[3]; $headers=null; // ��������� ��� �������� ����� $headers.="Content-Type: text/html; charset=windows-1251\r\n"; $headers.="From: $name <".$email.">\r\n"; $headers.="X-Mailer: PHP/".phpversion()."\r\n"; // �������� ��� ���������� � ���� ������ $host=$_SERVER["HTTP_HOST"]; $self=$_SERVER["PHP_SELF"]; $furl="http://$host$self"; $furl=str_replace("tools.php", "", $furl); $allmsg="

$uname, ��� ��������� ���������� ��� �� ���������� ������
$fname

���$name
E-mail:$email
���������:
$msg
���� �������� ���������:$time - $date �.
������� �� ������� ��������:$furl


* ������ ������ ������������� � ���������� �������, �������� �� ���� �� �����. "; mail("$uemail", "��������� �� ���������� ������ ($fname) �� $name ", $allmsg, $headers); print "



���� ��������� ������� ����������.


������� ����
"; exit; } // �������� �����/������ � ���� �� ����� if(isset($_GET['event'])) { if ($_GET['event']=="regenter") // if ($event =="regenter") { if (!isset($_POST['name']) & !isset($_POST['pass'])) {print"$back ������� ��� � ������!"; exit;} $name=str_replace("|","I",$_POST['name']); $pass=str_replace("|","I",$_POST['pass']); $text="$name|$pass|"; $text=trim($text); // �������� ���������� ������� if (strlen($text)<4) {print"$back �� �� ����� ��� ��� ������!"; exit;} $text=str_replace(" ",' ',$text); $text=str_replace("&",'&',$text); $text=str_replace(">",'>',$text); $text=str_replace("<",'<',$text); $text=str_replace("\"",'"',$text); $text=preg_replace("/\n\n/",'

',$text); $text=preg_replace("/\n/",'
',$text); $text=preg_replace("/\\\$/",'$',$text); $text=preg_replace("/\r/",'',$text); $text=stripslashes($text); $text=preg_replace("/\\\/",'\',$text); $text=str_replace("\r\n","
",$text); $text=str_replace("\n\n",'

',$text); $text=str_replace("\n",'
',$text); $text=str_replace("\t",'',$text); $text=str_replace("\r",'',$text); $text=str_replace(' ',' ',$text); $exd=explode("|",$text); $name=strtolower($exd[0]); $pass=$exd[1]; // �������� �� ���� ������������� � ������� ������ $lines=file("$datadir/usersdat.php"); $i=count($lines); do {$i--; $rdt=explode("|",$lines[$i]); if (isset($rdt[1])) { // ���� ������� ���������� � ������� (������ ������) - �� ������ � �� ������� if ($name===strtolower($rdt[0]) & $pass===$rdt[1]) { if (strlen($rdt[13])>1 and ctype_digit($rdt[13])) {print"$back. ���� ������� ������ �� ������������."; exit;} $regenter="$i"; $tektime=time(); $wrfcookies="$rdt[0]|$rdt[1]|$tektime|$tektime|"; setcookie("wrfcookies", $wrfcookies, time()+1728000); }} // if-� } while($i > "1"); if (!isset($regenter)) {print "$back ��� ������ �� �����!"; exit;} Header("Location: index.php"); } } // ����������� ����� ��� 2!! �������� �� ��� ������������� � ���������� � �� if(isset($_GET['event'])) { if ($_GET['event']=="reg2") { if (!isset($_POST['name']) & !isset($_POST['pass'])) {print"$back ������� ��� � ������!"; exit;} $name=str_replace("|","I",$_POST['name']); $pass=str_replace("|","I",$_POST['pass']); $dayreg=$date; $name=trim($name); // �������� ���������� ������� if (isset($_POST['email'])) {$email=$_POST['email'];} else {$email="";} $email=strtolower($email); //--�-�-�-�-�-�-�-�--�������� ����-- if ($antispam!="0") { $bada="$back �������� ���� ��� �� �����!"; if (isset($_POST['usernum'])) {$usernum=$_POST['usernum'];} else {print"$bada"; exit;} if (isset($_POST['xkey'])) {$xkey=$_POST['xkey'];} else {print"$bada"; exit;} $userkey=md5("$usernum+$absrand"); if ($userkey!=$xkey) {print"$bada"; exit;}} //--�-�-�-�-�-�-�-�--�������� ����-- if ($name=="" or strlen($name)>$maxname) {print "$back ���� ��� ������, ��� ��������� $maxname ��������!"; exit;} if ($pass=="" or strlen($pass)<1 or strlen($pass)>$maxname) {print "$back �� �� ����� ������. ������ �� ������ ���� ������."; exit;} if(!preg_match("/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is", $email) or $email=="" or strlen($email)>40) {print "$back � ������� ���������� E-mail �����!"; exit;} if (isset($_POST['pol'])) {$pol=$_POST['pol'];} else {$pol="";} if ($pol!="�������") {$pol="�������";} $email=str_replace("|","I",$email); // ������� ��������� ��� ��������� $z=1; do {$key=mt_rand(100000,999999); if (strlen($key)==6) {$z++;} } while ($z<1); if ($useactkey!="1") {$key="";} $regdat="$name|$pass|0|$email|$dayreg||$pol||||||noavatar.gif|$key|"; $text=$regdat; $text=str_replace(" ",' ',$text); $text=str_replace("&",'&',$text); $text=str_replace(">",'>',$text); $text=str_replace("<",'<',$text); $text=str_replace("\"",'"',$text); $text=preg_replace("/\n\n/",'

',$text); $text=preg_replace("/\n/",'
',$text); $text=preg_replace("/\\\$/",'$',$text); $text=preg_replace("/\r/",'',$text); $text=stripslashes($text); $text=preg_replace("/\\\/",'\',$text); $text=str_replace("\r\n","
",$text); $text=str_replace("\n\n",'

',$text); $text=str_replace("\n",'
',$text); $text=str_replace("\t",'',$text); $text=str_replace("\r",'',$text); $text=str_replace(' ',' ',$text); $text=str_replace(' ','',$text); $regdat=$text; $exd=explode("|",$regdat); $name=$exd[0]; $pass=$exd[1]; $email=$exd[3]; if ($name===$pass) {print"$back. � ����� ����� ������������, ��������� ��������� ����� � ������!"; exit;} // ���� ����� � ����� ������� ��� ������� $loginsm=strtolower($name); $lines=file("$datadir/usersdat.php"); $i=count($lines); if ($i>"1") { do {$i--; $rdt=explode("|",$lines[$i]); $rdt[0]=strtolower($rdt[0]); if ($rdt[0]===$loginsm) {$bad="1"; $er="�������";} if ($rdt[3]===$email) {$bad="1"; $er="�������";} } while($i > 1); if (isset($bad)) {print "$back. �������� � ����� $er ��� ��������������� �� ������!"; exit;}} // �������� ������������ ���� ��������� $host=$_SERVER["HTTP_HOST"]; $self=$_SERVER["PHP_SELF"]; $furl="http://$host$self"; $headers=null; // ��������� ��� �������� ����� $headers.="Content-type: text/plain; charset=windows-1251\r\n"; $headers.="From: ".$name." <".$email.">\r\n"; $headers.="X-Mailer: PHP/".phpversion()."\r\n"; // �������� ��� ���������� � ���� ������ if ($useactkey=="1") { $allmsg=$fname.' (������������� �����������)'.chr(13).chr(10). '����������� ������������ �� ������, ��� ����� ��������� �� ������: '.$furl.'?event=reg3&email='.$email.'&key='.$key.chr(13).chr(10). '���� ���: '.$name.chr(13).chr(10). '��� ������: '.$pass.chr(13).chr(10). '��� E-mail: '.$email.chr(13).chr(10). '������������� ����: '.$key.chr(13).chr(10); } else { $allmsg=$fname.' (������ �����������)'.chr(13).chr(10). '�� ������� ���������������� �� ������: '.$furl.chr(13).chr(10). '���� ���: '.$name.chr(13).chr(10). '��� ������: '.$pass.chr(13).chr(10). '��� E-mail: '.$email.chr(13).chr(10); } // ���������� ������ ������� �� �������� ;-) mail("$email", "=?windows-1251?B?" . base64_encode("$fname (������������� �����������)") . "?=", $allmsg, $headers); if ($sendadmin=="1") {mail("$adminemail", "=?windows-1251?B?" . base64_encode("$fname (����� ��������)") . "?=", $allmsg, $headers);} $file=file("$datadir/usersdat.php"); $fp=fopen("$datadir/usersdat.php","a+"); flock ($fp,LOCK_EX); fputs($fp,"$regdat\r\n"); fflush ($fp);//�������� ��������� ������ flock ($fp,LOCK_UN); fclose($fp); // ���������� ������� � ������ � ���� �� ����������� $file=file("$datadir/userstat.dat"); $fp=fopen("$datadir/userstat.dat","a+"); flock ($fp,LOCK_EX); fputs($fp,"$name|0|0|||||\r\n"); fflush ($fp);//�������� ��������� ������ flock ($fp,LOCK_UN); fclose($fp); if ($useactkey!="1") { $tektime=time(); $wrfcookies="$name|$pass|$tektime|0|"; setcookie("wrfcookies", $wrfcookies, time()+1728000); print"
$name, �� ������� ����������������.

����� ��������� ������ �� ������ ������������� ���������� �� ������� �������� ������.

������� �����, ���� �� ������ ������ �����
"; exit;} print"
$name, �� ��������� ���� ����� ��� ������ ��� �������������. ��� ���� ����� ������������������ - ������� ��� �� ��������, ���� ��������� �� ������ - ��������� � ������.

����� ��������� ������ �� ������ ������������� ���������� �� �������� ������������� �����������.

������� �����, ���� �� ������ ������ �����
"; exit; } } // ����������� ��� 3 - ���� ����� ���� ������������� �� ������ if(isset($_GET['event'])) { if ($_GET['event']=="reg3") { if (isset($_GET['email']) and isset($_GET['key'])) {$key=$_GET['key']; $email=$_GET['email'];} else { $frname=""; $frtname=""; include("$fskin/top.html"); addtop(); // ���������� ����� ������ print"

������������� �����������

���� ������ � �������������� �����
����� e-mail:
������������� ����:
"; exit; } // ������ �� ������ �� ����� � ������ if (strlen($key)<6 or strlen($key)>6 or !ctype_digit($key)) {exit(" $back. �� �������� ��� ����� �����. ���� ����� ��������� ������ 6 ����.");} $email=stripslashes($email); $email=htmlspecialchars($email); $email=str_replace("|","I",$email); $email=str_replace("\r\n","
",$email); if (strlen($key)>30) {print"������ ��� ����� ������"; exit;} // ���� ����� � ����� ������� � ������. ���� ���� - ������ ������ �� ������ ����. $email=strtolower($email); unset($fnomer); unset($ok); $lines=file("$datadir/usersdat.php"); $ui=count($lines); $i=$ui; do {$i--; $rdt=explode("|",$lines[$i]); $rdt[3]=strtolower($rdt[3]); if ($rdt[3]===$email and $rdt[13]===$key) {$name=$rdt[0]; $pass=$rdt[1]; $fnomer=$i;} if ($rdt[3]===$email and $rdt[13]==="") {$ok="1";} } while($i > 1); if (isset($fnomer)) { // ���������� ������ ����� � �� $i=$ui; $dt=explode("|", $lines[$fnomer]); $txtdat="$dt[0]|$dt[1]|$dt[2]|$dt[3]|$dt[4]|$dt[5]|$dt[6]|$dt[7]|$dt[8]|$dt[9]|$dt[10]|$dt[11]|$dt[12]||"; $fp=fopen("$datadir/usersdat.php","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i<=(sizeof($lines)-1);$i++) {if ($i==$fnomer) {fputs($fp,"$txtdat\r\n");} else {fputs($fp,$lines[$i]);}} fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); // ������������� ���� $tektime=time(); $wrfcookies="$name|$pass|$tektime|0|"; setcookie("wrfcookies", $wrfcookies, time()+1728000); } if (!isset($fnomer) and !isset($ok)) {print "$back. �� �������� � ���� �������������� ����� ��� ������.
"; exit;} if (isset($ok)) {$add="���� ������ ��� ������������";} else {$add="$name, �� ������� ����������������";} print"
�������, $add.

����� ��������� ������ �� ������ ������������� ���������� �� ������� �������� ������.

������� �����, ���� �� ������ ������ �����
"; exit; } } // ��������� ������ ����������� - ���������� ������ if(isset($_GET['event'])) { if ($_GET['event']=="reregist") // if ($event =="reregist") { if (!isset($_POST['name'])) {print"$back ������� ���� ���!"; exit;} $name=str_replace("|","I",$_POST['name']); if ($name=="" or strlen($name)>$maxname) {print "$back ���� ��� ������, ��� ��������� $maxname ��������!"; exit;} $name=trim($name); // �������� ���������� ������� if (!isset($_POST['pass'])) {print"$back �� �� ����� ������!"; exit;} $pass=str_replace("|","I",$_POST['pass']); $oldpass=$_POST['oldpass']; // ������ ������ if (strlen($pass)<1 or strlen($pass)>20) {print "$back �� �� ����� ������. ������ �� ������ ���� ������."; exit;} if (isset($_POST['email'])) {$email=$_POST['email'];} else {$email="";} $email=strtolower($email); if(!preg_match("/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is", $email) or $email=="" or strlen($email)>40) {print "$back � ������� ���������� E-mail �����!"; exit;} if (isset($_POST['dayx'])) {$dayx=$_POST['dayx'];} else {$dayx="";} if (isset($_POST['pol'])) {$pol=$_POST['pol'];} else {$pol="";} if ($pol!="�������") {$pol="�������";} if (isset($_POST['icq'])) {$icq=$_POST['icq'];} else {$icq="";} if (isset($_POST['www'])) {$www=$_POST['www'];} else {$www="";} if (isset($_POST['about'])) {$about=$_POST['about'];} else {$about="";} if (isset($_POST['work'])) {$work=$_POST['work'];} else {$work="";} if (isset($_POST['write'])) {$write=$_POST['write'];} else {$write="";} if (isset($_POST['avatar'])) {$avatar=$_POST['avatar'];} else {$avatar="";} $notgood="$back ������� ������� �������� ���������� "; if (strlen($dayx)>20) {$notgood.="���� ��������!"; print"$notgood"; exit;} if (strlen($icq)>10) {$notgood.="ICQ!"; print"$notgood"; exit;} if (strlen($www)>40) {$notgood.="URL �����!"; print"$notgood"; exit;} if (strlen($about)>100) {$notgood.="������!"; print"$notgood"; exit;} if (strlen($work)>40) {$notgood.="��������!"; print"$notgood"; exit;} if (strlen($write)>80) {$notgood.="�������!"; print"$notgood"; exit;} $email=str_replace("|","I",$email); $dayx=str_replace("|","I",$dayx); $icq=str_replace("|","I",$icq); $www=str_replace("|","I",$www); $about=str_replace("|","I",$about); $work=str_replace("|","I",$work); $write=str_replace("|","I",$write); $avatar=str_replace("|","I",$avatar); // �������� ������/������� ������ $lines=file("$datadir/usersdat.php"); $i=count($lines); do {$i--; $rdt=explode("|", $lines[$i]); if (strtolower($name)===strtolower($rdt[0]) & $oldpass===$rdt[1]) {$ok="$i";} // ���� ����� �����/������ else { if ($email===$rdt[3]) {$bademail="1"; } } // ����� � ������ ��� ���� ����� �����? } while($i > "1"); if (isset($bademail)) {print "$back. �������� � ������� $email ��� ��������������� �� ������!"; exit;} if (!isset($ok)) {setcookie("wrfcookies","",time()); print "$back ��� ����� ����� /������ / ����� �� ��������� �� � ����� �� ��.

����� ������������ ������ ���������

������ ������� ��� ������� ������ - ���������� � ��������������!"; exit;} $udt=explode("|",$lines[$ok]); $dayreg=$udt[4]; $kolvomsg=$udt[2]; $status=$udt[13]; // ���� �������� ������� if ($_FILES['file']['name']!="") { $fotoname = $_FILES['file']['name']; // ���������� ��� ����� $avatar=$fotoname; $fotosize=$_FILES['file']['size']; // ���������� ������ ����� // ��������� ���������� $ext = strtolower(substr($fotoname, 1 + strrpos($fotoname, "."))); if (!in_array($ext, $valid_types)) {echo '���� �� ��������. ��������� �������:
- ��������� �������� ������ ������ � ������ ������������: gif, jpg, jpeg, png
- �� ��������� ��������� �� ����������� ����;
- ������� ����� ����� ��� ������ ����;
'; exit;} } $regdat="$name|$pass|$kolvomsg|$email|$dayreg|$dayx|$pol|$icq|$www|$about|$work|$write|$avatar|$status|"; $text=$regdat; $text=str_replace(" ",' ',$text); $text=str_replace("&",'&',$text); $text=str_replace(">",'>',$text); $text=str_replace("<",'<',$text); $text=str_replace("\"",'"',$text); $text=preg_replace("/\n\n/",'

',$text); $text=preg_replace("/\n/",'
',$text); $text=preg_replace("/\\\$/",'$',$text); $text=preg_replace("/\r/",'',$text); $text=stripslashes($text); $text=preg_replace("/\\\/",'\',$text); $text=str_replace("\r\n","
",$text); $text=str_replace("\n\n",'

',$text); $text=str_replace("\n",'
',$text); $text=str_replace("\t",'',$text); $text=str_replace("\r",'',$text); $text=str_replace(' ',' ',$text); $regdat=$text; $exd=explode("|",$regdat); $name=$exd[0]; $pass=$exd[1]; $email=$exd[3]; // ������ ���� ����� $tektime=time(); $wrfcookies="$name|$pass|$tektime|$tektime|"; setcookie("wrfcookies", $wrfcookies, time()+1728000); if ($_FILES['file']['name']!="") { // ������ �� ������ // 1. ������� ���-�� ����� � ��������� - ���� ������� ����� - ��������! $findtchka=substr_count($fotoname, "."); if ($findtchka>1) {echo "����� ����������� � ����� ����� $findtchka ���(�). ��� ���������!
\r\n"; exit;} // 2. ���� � ����� ���� .php, .html, .htm - ��������! $bago="��������. � ����� ����� ��������� ������������ .php, .html, .htm"; if (preg_match("/\.php/i",$fotoname)) {echo "��������� \".php\" �������. $bago"; exit;} if (preg_match("/\.html/i",$fotoname)) {echo "��������� \".html\" �������. $bago"; exit;} if (preg_match("/\.htm/i",$fotoname)) {echo "��������� \".htm\" �������. $bago"; exit;} // 3. �������� �� ������� ���� � ����� ����� � ��������� ���������� ����� if (!preg_match("/^[a-z0-9\.\-_]+\.(jpg|gif|png|jpeg)+$/is",$fotoname)) {print "��������� ������������ ������� ����� � ����� �����!"; exit;} // 4. ���������, ����� ���� ���� � ����� ������ ��� ���� �� ������� if (file_exists("$avatardir/$fotoname")) {print "���� � ����� ������ ��� ���������� �� �������! �������� ��� �� ������!"; exit;} // ����� ����� �� ����� ����� // 5. ������ � ��. < ����������� $fotoksize=round($fotosize/10.24)/100; // ������ ������������ ���� � ��. $fotomax=round($max_file_size/10.24)/100; // ������������ ������ ���� � ��. if ($fotoksize>$fotomax) {print"�� ��������� ���������� ������ ����!
����������� ���������� ������ ����: $fotomax ��.
�� ��������� ��������� �����������: $fotoksize ��!"; exit;} // 6. "��������" ������� > 150 � 150 - �� ��������! :-) $size=getimagesize($_FILES['file']['tmp_name']); if ($size[0]>150 or $size[1]>150) {print "�� ���������� �������� �������. ��������� ���� 150 � 150 px!"; exit;} if ($fotosize>"0" and $fotosize<$max_file_size) { copy($_FILES['file']['tmp_name'], $avatardir."/".$fotoname); print "

���� ������� ���������: $fotoname (������: $fotosize ����)";} else { print "���� �� �������� - ������ �������! ���������� � ��������������!"; exit;} } // ����� ����� �������� ������� $file=file("$datadir/usersdat.php"); $fp=fopen("$datadir/usersdat.php","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i< sizeof($file);$i++) {if ($ok!=$i) {fputs($fp,$file[$i]);} else {fputs($fp,"$regdat\r\n");}} fflush ($fp);//�������� ��������� ������ flock ($fp,LOCK_UN); fclose($fp); //@chmod("usersdat.php",$chmodval); print"
�������, $name, ���� ������ ������� ��������.

����� ��������� ������ �� ������ ������������� ���������� �� ������� �������� ������.

������� �����, ���� �� ������ ������ �����
"; exit; } if ($_GET['event'] =="givmepassword") { // �������� �������� ������ �� ���� // ��������������� ����� � ������ ������� $myemail=strtolower($_POST['myemail']); $lines=file("$datadir/usersdat.php"); $i=count($lines); $regenter=""; $myname=""; // �������� �� ���� ������������� � ������� ������ do {$i--; $rdt=explode("|", $lines[$i]); if (isset($rdt[1])) { // ���� ������� ���������� � ������� (������ ������) - �� ������ � �� ������� $rdt[3]=strtolower($rdt[3]); if ($myemail==$rdt[3]) {$myname=$rdt[0]; $mypassword=$rdt[1];} } //if } while($i > "1"); // �������� ������������ ��� ����� � ������ �� ���� if ($myname!="") { $headers=null; // ��������� ��� �������� ����� $headers.="Content-Type: text/plain; charset=windows-1251\r\n"; $headers.="From: <".$adminemail.">\r\n"; $headers.="X-Mailer: PHP/".phpversion()."\r\n"; $host=$_SERVER["HTTP_HOST"]; $self=$_SERVER["PHP_SELF"]; $furl="http://$host$self"; $furl=str_replace("tools.php", "index.php", $furl); // �������� ��� ���������� � ���� ������ $allmsg=$fname.' (������ �����������)'.chr(13).chr(10). '�� ��������� ��� � ������ ������� � ������ �� ������: '.$furl.chr(13).chr(10).chr(13).chr(10). '���� ���: '.$myname.chr(13).chr(10). '��� ������: '.$mypassword.chr(13).chr(10).chr(13).chr(10).chr(13).chr(10). '* ��� ������ ������������� �������, �������� �� ���� �� �����.'.chr(13).chr(10); // ���������� ������ ������� �� �������� ;-) mail("$myemail", "=?windows-1251?B?" . base64_encode("$fname (��������������� ������)") . "?=", $allmsg, $headers); // ���� ���� �������� � �������� ������� $msgtoopr="$myname, �� ��� ����������� ����� ������� ��������� � ������ � ������� ������� � ������."; } // ���� ��� ������ ������ � �� else {$msgtoopr="��������� � ����� �������
�� ������ �� ����������������!";} print "


$msgtoopr ����� ��������� ������ �� ������ ������������� ���������� �� ������� ��������. ���� ����� �� ����������, ������� �����.



"; exit; } } if (isset($_GET['event'])) { if ($_GET['event']=="moresmiles") { // ���������� ���� ������� �� ���������� SMILE if (!is_dir("smile/")) {print"����� smile �� ����������."; exit;} $i=0; if ($handle = opendir("smile/")) { while (($file = readdir($handle)) !== false) if (!is_dir($file)) {$lines[$i]=$file; $i++;} closedir($handle); } if (!isset($lines)) {print '� ����� smile ��� �������! ���������� � ������ - ����� ������.'; exit;} $itogo=count($lines); $k=0; $text=null; $host=$_SERVER["HTTP_HOST"]; $self=$_SERVER["PHP_SELF"]; $forurl="http://$host$self"; $forurl=str_replace("/tools.php", "", $forurl); print"

�������������� ������

"; do { $rdt=explode(".",$lines[$k]); if ($rdt[1]=="jpg" or $rdt[1]=="gif") {print"  ";} $k++; } while ($k<$itogo); print"
������� ����
"; exit; } // ----- ����� ��� ���� ������� ������ if (isset($_COOKIE['wrfcookies'])) { $wrfc=$_COOKIE['wrfcookies']; $wrfc=htmlspecialchars($wrfc); $wrfc=stripslashes($wrfc); $wrfc = explode("|", $wrfc); $wrfname=$wrfc[0];$wrfpass=$wrfc[1];$wrftime1=$wrfc[2];$wrftime2=$wrfc[3]; if (time()>($wrftime1+50)) {$tektime=time();$wrfcookies="$wrfc[0]|$wrfc[1]|$tektime|$wrftime1";setcookie("wrfcookies", $wrfcookies, time()+1728000);}} else {unset($wrfname); unset($wrfpass);} // ----- $frname=""; $frtname=""; include("$fskin/top.html"); addtop(); // ���������� ����� ������ // ��������� ��� ���������� ��������������������� $userlines=file("$datadir/usersdat.php"); $ui=count($userlines)-1; $tdt=explode("|", $userlines[$ui]); if ($_GET['event']=="who") { // �������� ���� ���������� ������ $t1="row1"; $lines=file("$datadir/usersdat.php"); $maxi=count($lines)-1; print""; if ($ui=="0") {print""; } else { // ��������� ������ ������ �������������� �������� if (!isset($_GET['page'])) {$page=1;} else {$page=$_GET['page']; if (!ctype_digit($page)) {$page=1;} if ($page<1) $page=1;} $maxpage=ceil(($maxi+1)/$uq); if ($page>$maxpage) {$page=$maxpage;} $fm=$uq*($page-1); if ($fm>$maxi) {$fm=$maxi-$uq;} $lm=$fm+$uq; if ($lm>$maxi) {$lm=$maxi+1;} do {$dt=explode("|", $lines[$fm]); $fm++; $num=$fm-1; if (isset($dt[1])) { // ���� ������� ���������� � ������� (������ ������) - �� ������ � �� ������� $codename=urlencode($dt[0]); // �������� ��� � ����������, ��� ��������� ���������� �������� ����� ����� GET-������. if (isset($wrfname)) {$wfn="$dt[0]";} else {$wfn="$dt[0]";} if (strlen($dt[13])=="6" and ctype_digit($dt[13])) {$dt[13]="�������� ���������";} if (strlen($dt[13])<2) {$dt[13]=$users;} if ($dt[6]=="�������") {$add="polm.gif";} else {$add="polg.gif";} print""; if ($t1=="row1") {$t1="row2";} else {$t1="row1";} } // ���� ������� ���������� } while($fm < $lm); } // ����� ���� ���� userdat.php ���� print "
��� ������ �� �� �-���� ��������������� ���� �������� ���� ������
���������� �� ����������������
$num $wfn $dt[13] $dt[4] $dt[5] $dt[8] $dt[9]

��������:  "; // ������� ������ ������� ����� if ($page>=4 and $maxpage>5) print "1 ... "; $f1=$page+2; $f2=$page-2; if ($page==1) { $f1=$page+4; $f2=$page; } if ($page==2) { $f1=$page+3; $f2=$page-1; } if ($page==$maxpage) { $f1=$page; $f2=$page-4; } if ($page==$maxpage-1) { $f1=$page+1; $f2=$page-3; } if ($maxpage<4) {$f1=$maxpage; $f2=1;} for($i=$f2; $i<=$f1; $i++) {if ($page==$i) {print "$i  ";} else {print "$i  ";}} if ($page<=$maxpage-3 and $maxpage>5) print "... $maxpage"; print "����� ���������������� ���������� - $ui

";} if ($_GET['event'] =="profile") { if (!isset($_GET['pname'])) {exit(" ������� ������.");} $pname=urldecode($_GET['pname']); // ����������� ��� ������������, ��������� �� GET-�������. $lines=file("$datadir/usersdat.php"); $i = count($lines); $use="0"; do {$i--; $rdt=explode("|", $lines[$i]); if (isset($rdt[1])) { // ���� ������� ���������� � ������� (������ ������) - �� ������ � �� ������� if (strlen($rdt[13])=="6" and ctype_digit($rdt[13])) {$rdt[13]="�������� ���������";} if ($pname===$rdt[0]) { if (isset($wrfname) & isset($wrfpass)) { if ($wrfname===$rdt[0] & $wrfpass===$rdt[1]) { print "
��������������� ������

"; print "
��������������� ����������
���� ���������� * ����������� � ����������, ���� �� ������� ��������
��� ���������: *
������� ���� ���������
$rdt[0]
��� ������: *
����� e-mail: *
������� ������������ ����������� �����! ����� ������� �� �������-��������.
 
������� � ����
��� ���������� �������������
���� �����������:$rdt[4]
��� ���:
$rdt[6]
���� �������:
������� ���� �������� � �������: ��.��.�����, ���� �� ������.
����� � ICQ:
������� ����� ICQ, ���� �� � ��� ����.
�������� ���������:
���� � ��� ���� �������� ��� ������� ��������� � ���������, ������� URL ���� ���������.
������:
������� ����� ���������� (������, �������, �����).
��������:
�� ������ �������� � ����� ���������
�������:
������� ���� �������, �� ����������� HTML
������:
�������� ������� (��������), ������� ����� ������������ ����� � ����� ������.
"; if (!is_file("avatars/$rdt[12]")) {$rdt[12]="noavatar.gif";} $root = str_replace( '\\', '/', getcwd() ) . '/'; $dirtoopen = $root.'avatars'; if ( !($images = get_dir($dirtoopen,'*.{gif,png,jpeg,jpg}',GLOB_BRACE)) ) { $images=array(); $handle=opendir($dirtoopen); while ( false !== ($file = readdir($handle)) ) if (strstr($file,'.gif') || strstr($file,'.jpg')) $images[]=$file; closedir($handle); } $selecthtml =""; foreach ($images as $file) { if ($file == $rdt[12]) {$selecthtml .= '\n"; $currentface = $rdt[12];} else {$selecthtml .= '\n";} } print "
��������� ���� ������:
������� ��������� ���� � ������ �������.
����������� ������������ ��������:
- ���������� �� ����� 120 � 120,
- ����������� ������ gif, png, jpg ��� jpeg,
- �������� ����� $maxfsize ��.
"; $use="1"; } if ($use!="1") { if (strlen($rdt[13])<2) {$rdt[13]=$users;} if (is_file("avatars/$rdt[12]")) {$avpr="$rdt[12]";} else {$avpr="noavatar.gif";} print "
������� ���������

��������������� ����������
��� ���������:$rdt[0]
����� e-mail:
$rdt[3]
���� �����������:$rdt[4]
������:$rdt[13]
���:$rdt[6]
���� �������:
$rdt[5]
����� � ICQ:
$rdt[7]
�������� ���������:$rdt[8]
������ (����� ����������, �����, ������.):$rdt[9]
��������:$rdt[10]
�������:$rdt[11]
������:

"; $use="1";} } } } // if } while($i > "1"); if (!isset($wrfname)) {print"

������ ������������������ ��������� ������ ����� ������������� ������ �������!"; exit;} // �� ������ ����� ��� - ��� ����� ������ if ($use!="1") { print"



��������� ����������!

��������, �� �������� � ����� - ������� �� ������ �� ���������������.

������ �����, ��� ������ �������������.

������� �� ������� �������� ������ ����� �� ���� ������












"; } } if(isset($_GET['event'])) { if ($_GET['event'] =="reg") { if (!isset($_POST['rules'])) { print"
������� � ������� �����������

������� ������ � �������
������������� ������ ��������� �� ����� ����� ������� ������ � ������ ������ ������������, � ����� ������� ��� ��������� ��� �������������� � ���������� ������. ������ �����, ������ �����, �� ����������, ���� �� ������ �������������� ��������� ������:

1. �� ����������� ���������� ��� ��������, ������������ ����������, �������, ������������, ������� ��� ����������� ��������� � ������. ����������� ���������� �����������, ��������, �������������, ��������, ������������ ��� ��������� �������������.
2. ����������� ���������� ��������� ���������, � ����� ��������� ���� � �������� � ������ ������������� ��� ���������� ������������� . ������������� ��������� �� ����� ����� ������� ��������� ���������/������ ��� ����������� ������������ � ����� � ���������� (����� � ��� �������� � ��� �����).
3. ����������� �������� �������� ������� � ��������.
4. �� ����������� ���������� ������ ������/��������� � ���������� ��������� �������, � ����� ���������� ����� ��������� ������������� �������/���������.
5. ����������� ������������� ����������� ��������� � ����������� (�� ����� ����� � � ����� ���������), ������������ ����������� ������������� ������ ������ ��������, � ����� ����� ��������� - ���������, ������, ������� � ��. ����������� ������������ ��� ������� ������ ���� ����� ������� *.
6. ����������� �������� \"�������� ���������\" ��� ��������� ���������, ������������ ���������� �������������. �� ����������� ���� - ���������� ���������, �� ��������������� ���� ������ �/��� �� ������� ���������� ��������� ��������.
7. ����������� ���������� ���������, ��������� ���������������� �/��� ��������� ��������� ��� ����� ������ ���� ������ ���� (������������ ��� �����������). �� ����������� ����������� ������ ������ � ������������� ��� �� ��������.
8. ����������� ���������� ��������� ����������� � ��������������� ������. ����� ���������� � ������������ � ���������������� ������ �������� ������������ � ����������� ������� (���� ���������� ��������������).
9. ����������� ���������� ��� � ���������� ���������, �������������� ���������������� �� ��� ����������� � ��� ���������.
10. ����������� �������� ������� � ������� ��� ����� �� ����� ������ �������������.
11. ���������� � ���, ����� ���������� ��������� �� ��������� ���������� ��� ���������. ��������� ������������. ���������, ����������� � ���������� ����, ��� Windows-1251, � ����� � ��������� �������� �������������� �������� (����������� � ��������� �������������� ��������� �� ��������� ������), ������������ �������������� ����� ����������� ��� ���������������� ������ ����� ���� ������� ������������ ������. ������������� ����������� ��������� �����������.
12. ������ �������� ������ ����� ������ ���������������� ��������������� �� ����������� �� �� ������ ����������.
13. ������������� ����������� ������ ��������� ��� � ����������� ���������������� ��������, �������� ����� ����������. �������� ������ �������� ����� � ��� ���������� ������.
14. ������ ������� ������������� ��� ���� �������� ������ ������ ��������. �������� ��������, ��� �� ���� ������� ��������� �������������� �������. ���������� � ��� ����� �������� � \"���������� � ������\" ���� � ����������� ������ ������.
15. ������������� �� ����� ��������������� �� ���������� �����-���� ������� �/��� ��������� ���������, �� ����������� ���������, ����������� ��������������.
16.����������� (�� �������������� ��� ������ �� �� ������) ����� ����� ������ ������ �� ������ ��� ������ IP-������. ���, ��� ��� ����� ����� ������ - ���������� ������� ������������� ������ ������, ��� ������� ���, ������� ���������� ��������. ���������� ����� ������������� \"������\" - ��� \"������/���������/�������\" ������ �������� �����������. ������� ���������� ������� � ������ IP ����� �����, ���� � ���������� �� ����� ������� ����� ������ ��������. (���� �� ��������������� ��������� ����� �����, ��� ��� ����������� �������� �� ����� ���� ����� ���� �������, �� ������ ����� ���� ������� ��� �������������� ���������������� ������).
17.���� ���������� �� ���� ��� ����� ������� �������� ����������� � ������� ��� �������� (���� � ����� ������� �� ��������� ��������). ����� �� ����� ���� ������� �� �������, �������� �� �������� ������� ��� �� ������������.

����������� ������� �������� �������������� ��������������� �������� ������� ������ ������.

� ����������� � ��������� � ���������, � �������� ��.
"; } else { print"
����������� �� ������

"; //-�-�-�-�-�-�-�-�- if ($antispam!="0") { // ����� ����������� �� ����� (��� ���������� - ����� �� ������) if (array_key_exists("image", $_REQUEST)) { $num=$_REQUEST["image"]; for ($i=0; $i<10; $i++) {if (md5($i+$absrand)==$num) {imgwr($st,$i); die();}} } $xkey=""; mt_srand(time()+(double)microtime()*1000000); print"
��������������� ����������
��� ���������:
������� ���� ���������
��� ������:
����� e-mail:
������� ������������ ����������� �����! �� ��� ����� ����� ���������� ��������� � ����� ���������.
��� ���:
�������   �������
�������� ���:
"; for ($i=0; $i<$maxkey; $i++) { $snum[$i]=mt_rand(0,9); $psnum=md5($snum[$i]+$absrand); $phpself=$_SERVER["PHP_SELF"]; echo "\n"; $xkey=$xkey.$snum[$i]; } $xkey=md5("$xkey+$absrand"); print" (������� �����, ��������� �� ��������) "; } // if $antispam!="0" //-�-�-�-�-�--�-�-�-�-�-�-�-�-�- print"
* ��� ���� ����������� � ����������
** ��� ������ ����� ����� ��������� �� ����� ����������� �����, ������� �� ����������
"; } } if ($_GET['event']=="find") { // ����� $minfindme="3"; //����������� ���-�� �������� � ����� ��� ������ print"
�����
������: ���: � ������ ��������
���� ��������:
  • "�" - ������ �������������� ��� �����;

  • "���" - ���� ���� �� ���� �� ����;

  • "��� ����� �������" - � ������� ��������� ����� ����� �� 100% ��������������� ������ �������;


  • "� ������ ��������" - ����� ������ � ������ ��������� ���� ��������;


������ ���� ��� ������, ������� ���������� � ��������� ���� ������. ��������, ��� ������� "�����" ����� ������� ����� "�����", "������", "�������" � ������ ������.


"; print "����������� �� �����:
- ����������� ���-�� ��������: $minfindme"; }} if (isset($_GET['find'])) { $minfindme="3"; //����������� ���-�� �������� � ����� ��� ������ $time=explode(' ', microtime()); $start_time=$time[1]+$time[0]; // ��������� ��������� ����� ������� ������ $gdefinder="1"; $ftype=$_POST['ftype']; if (!ctype_digit($ftype) or strlen($ftype)>2) {exit("$back. ������� ������. ������� ����� �� �����.");} if (!isset($_POST['withregistr'])) {$withregistr="0";} else {$withregistr="1";} // ��������� $findme �� ����� $findme=$_POST['findme']; $findme=stripslashes($findme); $findmeword=explode(" ",$findme); $wordsitogo=count($findmeword); $findme=trim($findme); // �������� ���������� ������� if ($findme == "" || strlen($findme) < $minfindme) {print "$back ��� ������ ����, ��� ����� $minfindme ��������!
"; exit;} // ��������� ���� � ������ ������� � ���������� ����� ������ � ����������� // ������ ���� - ������� ���-�� ������� (���������� � ���������� $itogofid) $mainlines = file("$datadir/mainforum.dat");$i=count($mainlines); $itogofid="0";$number="0"; $oldid="0"; $nump="0"; do {$i--; $dt = explode("|", $mainlines[$i]); if ($dt[1]!="razdel") {$itogofid++; $fids[$itogofid]=$dt[0];} // $itogofid - ����� ���-�� ������� } while($i > "0"); do { $fid=$fids[$itogofid]; // ������ ���� - ��������� ���� � ������� (���� �� ����������) � ��������� � ���������� $topicsid ��� ����� ��� if (is_file("$datadir/topic$fid.dat")) { $msglines=file("$datadir/topic$fid.dat"); if (count($msglines)>0) { $lines = file("$datadir/topic$fid.dat"); $i=count($lines); do {$i--; $dt = explode("|", $lines[$i]); $topicsid[$i]=$dt[7];} while($i > "0"); } // ������ ���� - ��������������� ��������� ������ ���� if (isset($topicsid)) { $ii=count($topicsid); do {$ii--; $id = str_replace("\r\n","",$topicsid[$ii]); $file=file("$datadir/$id.dat"); $iii=count($file); // ���¨���� ���� - ��������������� ���� � ������ ���� ������� ��������� do {$iii--; $lines = file("$datadir/$id.dat"); $dt = explode("|", $lines[$iii]); if ($gdefinder=="0") {$msgmass=array($dt[2],$dt[3],$dt[4]); $gi="3"; $add="�� �����, �����, ��������� ";} if ($gdefinder=="1") {$msgmass=array($dt[4]); $gi="1"; $add="� ����� ";} if ($gdefinder=="2") {$msgmass=array($dt[3],$dt[4]); $gi="2"; $add="�� ����� � ��������� ";} if ($gdefinder=="3") {$msgmass=array($dt[2]); $gi="1"; $add="� ����� ";} if ($gdefinder=="4") {$msgmass=array($dt[3]); $gi="1"; $add="� ��������� ";} // ���� �� ������ ������ (0,1,2,3,4) do {$gi--; $msg=$dt[4]; $msdat=$msgmass[$gi]; $stroka="0"; $wi=$wordsitogo; // ���� �� ������� ����� ������� ! do {$wi--; // ���� ������� ������ if ($withregistr!="1") // ������������������� ����� - c����� "i" ����� ������������ ������������ ������� - / { if ($ftype=="2") { if (stristr($msdat,$findme)) // ����� �� "���� ����� �������" ��� ����� �������� { $stroka++; $msg=eregi_replace($findme," $findme ",$msg); } } else { $str1=strtolower($msdat); $str2=strtolower($findmeword[$wi]); if ($str2!="" and strlen($str2) >= $minfindme) { if (stristr($str1,$str2)) // ����� ��� ����� �������� ��� ������ ������ �������� { $stroka++; $msg=eregi_replace($findmeword[$wi]," $findmeword[$wi] ",$msg); } } } } else // if ($withregistr!="1") { if ($ftype=="2") { if (strstr($msdat,$findme)) // ����� �� "���� ����� �������" C ����� �������� { $stroka++; $msg=eregi_replace($findme," $findme ",$msg); } } else { if ($msdat!="" and strlen($findmeword[$wi]) >= $minfindme) { if (strstr($msdat,$findmeword[$wi])) // ����� � ������ �������� ��� ������ ������ �������� { $stroka++; $msg=eregi_replace($findmeword[$wi]," $findmeword[$wi] ",$msg); } } } } // if ($withregistr!="1") } while($wi > "0"); // ����� ����� �� ������� ����� ������� // �������������� �������������� ���������, � ���� ��������� ������������� �������� - ������� ��� if ($ftype=="0") { if ($stroka==$wordsitogo) {$printflag="1";} } if ($ftype=="1") { if ($stroka>"0") {$printflag="1";} } if ($ftype=="2") { if ($stroka==$wordsitogo) {$printflag="1";} } if (!isset($printflag)) {$printflag="0";} if ($printflag=="1") {$msg=str_replace("
", "   ", $msg); // �������� � ���������
�� ���� �������� if (strlen($msg)>150) { $ma=strpos($msg,""); if ($ma > 50) {$ma=$ma-50;} else {$ma=0;} $mb=strrpos($msg,">b/<"); if (($mb+50) > strlen($msg)) {$mb=strlen($msg);} else {$mb=$mb+50;} $msgtowrite="..."; $msgtowrite.=substr($msg,$ma,$mb); $msgtowrite.="..."; $msgtowrite=substr($msg,0,400); } else {$msgtowrite=$msg;} if (!isset($m)) {print "
�� ������� '$findme' � ���$add �������:
"; $m="1"; } if ($iii>$qq) {$page=floor($iii/$qq); $page=$page*$qq;} else {$page="0";} if ($oldid!=$id and $number<50) {$number++; $msgnumber=$iii; if ($nump>1) {$anp="$nump";} else {$anp=" ";} print ""; $printflag="0"; $nump="0";} else {$nump++;} $oldid=$id; } } while($gi > "0"); // ����� ����� �� ����� ������ } while($iii > "0"); } while($ii > "0"); } // if isset($topicsid) } // if ���� topic$fid.dat �� ���� $itogofid--; } while($itogofid > "0"); if (!isset($m)) {print "
�������������� �������������������
� ����
$anp
$number $dt[3] $msgtowrite
�� ������ ������� ������ �� �������.
";} $time=explode(' ',microtime()); $seconds=($time[1]+$time[0]-$start_time); echo "

".str_replace("%1", sprintf("%01.3f", $seconds), "����� ������: %1 ������.")."

"; } print "
Powered by WR-Forum © 1.8M
"; } // if isset($event) else { // ������� ��� ������ ���� � ��������� if (is_file("$datadir/news.dat")) { $newmessfile="$datadir/news.dat"; $lines = file($newmessfile); $i=count($lines); if ($i>1) { print""; print"

    "; $a1=$i-1;$u="-1"; // ������� ������ �� ����������� ��� �������� do { $dt = explode("|", $lines[$a1]); $dt[6]=str_replace("[b] "," ",$dt[6]); $dt[6]=str_replace("[/b]"," ",$dt[6]); $dt[6]=str_replace("[RB] "," ",$dt[6]); $dt[6]=str_replace("[/RB]"," ",$dt[6]); $dt[6]=str_replace("[Code] "," ",$dt[6]); $dt[6]=str_replace("[/Code]"," ",$dt[6]); $dt[6]=str_replace("[Quote] "," ",$dt[6]); $dt[6]=str_replace("[/Quote]"," ",$dt[6]); $dt[6]=str_replace("
    ","\r\n", $dt[6]); $dt[2]=str_replace(".200",".0", $dt[2]); $a1--; if ($dt[8]>0) {$dt[8]--;} print" "; $a11=$u; $u11=$a1; } while($a11 < $u11); print"
    ��������������������
    $dt[5] $dt[4] $dt[8]
    ";} } } // ������� ������������ ��� ����������� �������� function get_dir($path = './', $mask = '*.php', $mode = GLOB_NOSORT) { if ( version_compare( phpversion(), '4.3.0', '>=' ) ) {if ( chdir($path) ) {$temp = glob($mask,$mode); return $temp;}} return false;} ?>