60) {print"������� ������ - ���� ������ �������"; exit;} $text=preg_replace( "/


"; print "

Powered by WR-Forum © 1.8M"; exit;} } // ����������� ��������! $gbc=$_COOKIE['wrforumm']; $gbc=explode("|", $gbc); $gbname=$gbc[0];$gbpass=$gbc[1];$gbtime=$gbc[2]; // ��������� ������������ if(isset($_GET['event'])) { if ($_GET['event']=="activate") { $key=$_GET['key']; $email=$_GET['email']; $upage=$_GET['upage']; // ������ �� ������ �� ����� � ������ 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); } 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'] =="revolushion") { $lines = file("$datadir/mainforum.dat"); $countmf=count($lines)-1; $i="-1";$u=$countmf-1;$k="0"; do {$i++; $dt=explode("|", $lines[$i]); if (!isset($dt[12])) {$dt[12]=""; $dt[11]="";} if ($dt[1]!="razdel") { $fid=$dt[0]; if ((is_file("$datadir/topic$fid.dat")) && (sizeof("$datadir/topic$fid.dat")>0)) { $fl=file("$datadir/topic$fid.dat"); $kolvotem=count($fl); $kolvomsg="0"; for ($itf=0; $itf<$kolvotem; $itf++) {$forumdt = explode("|", $fl[$itf]); $cd=$forumdt[7]; $msgfile=file("$datadir/$cd.dat"); $countmsg=count($msgfile); $kolvomsg=$kolvomsg+$countmsg;} if ($kolvotem=="0") {$dt[8]="";} $lines[$i]="$dt[0]|$dt[1]|$dt[2]|$dt[3]|$kolvotem|$kolvomsg|$dt[6]|$dt[7]|$dt[8]|$dt[9]|$dt[10]|$dt[11]|$dt[12]|\r\n"; } else {$kolvotem="0"; $kolvomsg="0"; $lines[$i]="$dt[0]|$dt[1]|$dt[2]|$dt[3]|$kolvotem|$kolvomsg|$dt[6]|$dt[7]|$dt[8]||$dt[10]|$dt[11]|$dt[12]|\r\n";} } else {$lines[$i]="$dt[0]|$dt[1]|$dt[2]|\r\n";} } while($i < $countmf); // ��������� ���������� ������ � ���-�� ��� � ��������� � ����� $file=file("$datadir/mainforum.dat"); $fp=fopen("$datadir/mainforum.dat","w"); flock ($fp,LOCK_EX); for ($i=0;$i< sizeof($file);$i++) {fputs($fp,$lines[$i]);} flock ($fp,LOCK_UN); fclose($fp); //@chmod("mainforum.dat",$chmodval); print "



�� ������� �����������.
"; exit; } } // ���� �������� ��������� ������ if(isset($_GET['udel'])) { if ($_GET['udel'] !="") { if (isset($_GET['upage'])) {$upage=$_GET['upage'];} else {$upage=1;} $udel=$_GET['udel']-1; $file=file("$datadir/usersdat.php"); $i=count($file); if ($i<3) {exit(" ���������� �������� ������ ������ ���������!");} $fp=fopen("$datadir/usersdat.php","w"); // ������� ������ � ���������� flock ($fp,LOCK_EX); for ($i=0;$i< sizeof($file);$i++) { if ($i==$udel) {unset($file[$i]);} } fputs($fp, implode("",$file)); flock ($fp,LOCK_UN); fclose($fp); //@chmod("usersdat.php",$chmodval); Header("Location: admin.php?event=userwho&upage=$upage"); exit; } } // ���� ��������� ������� ��������� if(isset($_GET['newstatus'])) { if ($_GET['newstatus'] !="") { $newstatus=$_GET['newstatus']-1; $status=$_POST['status']; if (strlen($status)<3) {exit(" ����� ������ ��������� < 3 �������� - ��� �� ��������!");} $status=htmlspecialchars($status); $status=stripslashes($status); $status=str_replace("|"," ",$status); $status=str_replace("\r\n","
",$status); $lines=file("$datadir/usersdat.php"); $i=count($lines); $dt=explode("|", $lines[$newstatus]); $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]|$status|"; $fp=fopen("$datadir/usersdat.php","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i<=(sizeof($lines)-1);$i++) {if ($i==$newstatus) {fputs($fp,"$txtdat\r\n");} else {fputs($fp,$lines[$i]);}} fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("usersdat.php",$chmodval); Header("Location: admin.php?event=userwho"); exit; } } // ���� ��������� �������� ��������� if(isset($_GET['newreiting'])) { if ($_GET['newreiting'] !="") { $newreiting=$_GET['newreiting']-1; $reiting=$_POST['reiting']; $reiting=htmlspecialchars($reiting); $reiting=stripslashes($reiting); $reiting=str_replace("|"," ",$reiting); $reiting=str_replace("\r\n","
",$reiting); $lines=file("$datadir/usersdat.php"); $i=count($lines); $dt=explode("|", $lines[$newreiting]); $txtdat="$dt[0]|$dt[1]|$reiting|$dt[3]|$dt[4]|$dt[5]|$dt[6]|$dt[7]|$dt[8]|$dt[9]|$dt[10]|$dt[11]|$dt[12]|$dt[13]|"; $fp=fopen("$datadir/usersdat.php","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i<=(sizeof($lines)-1);$i++) {if ($i==$newreiting) {fputs($fp,"$txtdat\r\n");} else {fputs($fp,$lines[$i]);}} fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("usersdat.php",$chmodval); Header("Location: admin.php?event=userwho"); exit; } } // ���� ����������� �����/���� ������� ��� ������ if(isset($_GET['movetopic'])) { if ($_GET['movetopic'] !="") { $move1=$_GET['movetopic']; $where=$_GET['where']; if ($where=="0") {$where="-1";} $move2=$move1-$where; $file=file("$datadir/mainforum.dat"); $imax=sizeof($file); if (($move2>=$imax) or ($move2<"0")) {exit(" ���� ���� �������!");} $data1=$file[$move1]; $data2=$file[$move2]; $fp=fopen("$datadir/mainforum.dat","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� // ������ ������� ��� �������� ������� for ($i=0; $i<$imax; $i++) {if ($move1==$i) {fputs($fp,$data2);} else {if ($move2==$i) {fputs($fp,$data1);} else {fputs($fp,$file[$i]);}}} fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("mainforum.dat",$chmodval); Header("Location: admin.php"); exit; }} // ���� �������� ���������� ������� ��� ������ if(isset($_GET['fxd'])) { if ($_GET['fxd'] !="") { $fxd=$_GET['fxd']; $file=file("$datadir/mainforum.dat"); // ������� ������, ��������������� ���� � ����� �� ����� ������ $fp=fopen("$datadir/mainforum.dat","w"); flock ($fp,LOCK_EX); for ($i=0;$i< sizeof($file);$i++) { if ($i==$fxd) {unset($file[$i]);} } fputs($fp, implode("",$file)); flock ($fp,LOCK_UN); fclose($fp); //@chmod("mainforum.dat",$chmodval); Header("Location: admin.php"); exit; } } // ���� �������� ��������� ���� if (isset($_GET['xd'])) { if ($_GET['xd'] !="") { if (isset($_GET['page'])) {$page=$_GET['page'];} else {$page="0";} $xd=$_GET['xd']; $fid=$_GET['fid']; $file=file("$datadir/topic$fid.dat"); // �������� ���� � ����� $dt = explode("|", $file[$xd]); $delf = str_replace("\r\n", "", $dt[7]); unlink ("$datadir/$delf.dat"); // ������� ������, ��������������� ���� � ����� � �������� ������ $fp=fopen("$datadir/topic$fid.dat","w"); flock ($fp,LOCK_EX); for ($i=0;$i< sizeof($file);$i++) { if ($i==$xd) {unset($file[$i]);} } fputs($fp, implode("",$file)); flock ($fp,LOCK_UN); fclose($fp); //@chmod("topic$fid.dat",$chmodval); Header("Location: admin.php?fid=$fid&page=$page"); exit; } } // ���� �������� ���������� ��������� if (isset($_GET['topicxd'])) { if ($_GET['topicxd'] !="") { $fid=$_GET['fid']; $id=$_GET['id']; $topicxd=$_GET['topicxd']-1; if (isset($_GET['page'])) {$page=$_GET['page'];} else {$page="0";} $file=file("$datadir/$id.dat"); if (count($file)==1) {exit(" � ���� ������ �������� ������ ���� ���������!");} $fp=fopen("$datadir/$id.dat","w"); flock ($fp,LOCK_EX); for ($i=0;$i< sizeof($file);$i++) { if ($i==$topicxd) {unset($file[$i]);} } fputs($fp, implode("",$file)); flock ($fp,LOCK_UN); fclose($fp); //@chmod("$id.dat",$chmodval); Header("Location: admin.php?fid=$fid&id=$id&page=$page"); exit; } } // ���������� ������ / ������� if(isset($_GET['event'])) { if ($_GET['event'] =="addmainforum") { $ftype=$_POST['ftype']; $zag=$_POST['zag']; $msg=$_POST['msg']; if ($zag == "") {exit(" ��������� ����� � ������� ���������!");} // ��������� �� ����� � �������� ��������/������� - ���� ���������� � ��������� +1 $nextnum="0"; if (is_file("$datadir/mainforum.dat")) { $lines=file("$datadir/mainforum.dat"); $imax = count($lines); $i=0; do {$dt = explode("|", $lines[$i]); if ($nextnum<$dt[0]) {$nextnum=$dt[0];} $i++; } while($i < $imax); $nextnum++;} $zag=str_replace("|","I",$zag); $msg=str_replace("|","I",$msg); if ($ftype == "") {$txtmf="$nextnum|$zag|$msg||0|0||$date|$time||||||";} else {$txtmf="$nextnum|$ftype|$zag|";} $txtmf=htmlspecialchars($txtmf); $txtmf=stripslashes($txtmf); $txtmf=str_replace("\r\n","
",$txtmf); // ������ ������ �� ������� �������� $fp=fopen("$datadir/mainforum.dat","a+"); flock ($fp,LOCK_EX); fputs($fp,"$txtmf\r\n"); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("mainforum.dat",$chmodval); Header("Location: admin.php"); exit; } // �������������� ������ / ������� if ($_GET['event'] =="frdmainforum") { $nextnum=$_POST['nextnum']; $frd=$_POST['frd']; $addmax=$_POST['addmax']; $zvezdmax=$_POST['zvezdmax']; $ftype=$_POST['ftype']; $zag=$_POST['zag']; if ($zag == "") { exit(" ��������� ����� � ������� ���������!");} $zag=str_replace("|","I",$zag); if ($ftype == "") {$msg=$_POST['msg'];$idtemka=$_POST['idtemka'];$kt=$_POST['kt'];$km=$_POST['km'];$namem=$_POST['namem'];$datem=$_POST['datem'];$timem=$_POST['timem'];$temka=$_POST['temka'];$timetk=$_POST['timetk']; $msg=str_replace("|","I",$msg); $msg=str_replace("\r\n", "
", $msg); $txtmf="$nextnum|$zag|$msg|$idtemka|$kt|$km|$namem|$datem|$timem|$timetk|$temka|$addmax|$zvezdmax||";} else {$txtmf="$nextnum|$ftype|$zag|";} $txtmf=htmlspecialchars($txtmf); $txtmf=stripslashes($txtmf); $txtmf=str_replace("\r\n","
",$txtmf); $file=file("$datadir/mainforum.dat"); $fp=fopen("$datadir/mainforum.dat","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i< sizeof($file);$i++) {if ($frd!=$i) {fputs($fp,$file[$i]);} else {fputs($fp,"$txtmf\r\n");}} fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("mainforum.dat",$chmodval); Header("Location: admin.php"); exit; } if ($_GET['event'] =="rdtema") { // ������� �������������� ���� $fid=$_GET['fid']; $rd=$_POST['rd']; // - ����� ������, ������� ���������� �������� if (isset($_GET['page'])) {$page=$_GET['page'];} else {$page="0";} $name=$_POST['name']; $who=$_POST['who']; $email=$_POST['email']; $zag=$_POST['zag']; $msg=$_POST['msg']; $datem=$_POST['datem']; $timem=$_POST['timem']; $id=$_POST['id']; $timetk=$_POST['timetk']; $status=$_POST['status']; if ($zag == "") {exit(" ��������� ����� � ������� ����!");} $txtmf="$name|$who|$email|$zag|$msg|$datem|$timem|$id|$status|$timetk|"; $txtmf=htmlspecialchars($txtmf); $txtmf=stripslashes($txtmf); $txtmf=str_replace("\r\n","
",$txtmf); $file=file("$datadir/topic$fid.dat"); $fp=fopen("$datadir/topic$fid.dat","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i������ ������� ��� ������� ������!");} if (isset($_POST['who'])) {$who=$_POST['who'];} else {$who="";} if (isset($_POST['email'])) {$email=$_POST['email'];} else {$email="";} if (isset($_POST['page'])) {$page=$_POST['page'];} if ($_GET['event']=="addanswer") {$id=$_POST['id'];} // �������� �� ���� �������� � ������� - ���� ������������� $mainlines = file("$datadir/mainforum.dat"); $i=count($mainlines); do {$i--; $dt = explode("|", $mainlines[$i]); if ($dt[0]==$fid) {$realfid=$i; if ($dt[1]=="razdel") {print"������� ������"; exit;}} // ����������� $realfid - � �/� ������ } while($i>0); $back="
��������� �����"; if (!isset($name) || strlen($name) > $maxname) {print "$back ���� ��� ������, ��� ��������� $maxname ��������!
"; exit;} if (!isset($msg) || strlen($msg) > $maxmsg) {print "$back ���� ��������� ������ ��� ��������� $maxmsg ��������."; exit;} {if (!isset($zag)) {print "$back � ������� ���������!"; exit;}} 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 $email != "") {print "$back � ������� ���������� E-mail �����!"; exit;} // ���������� ��� ����� � ����� if ($_GET['event'] =="addtopic") {$tt=explode(' ', microtime()); $ttt="$tt[1]"+"$tt[0]"; $ttf=str_replace(".", "", $ttt); $id = $ttf;} $tektime=time(); // �������� ������ ������� � ������ � ��������� $email=substr($email,0,30); $msg=str_replace("|","I",$msg); $msg=htmlspecialchars($msg); $text="$name|$who|$email|$zag|$msg|$date|$time|$id||$tektime|"; $text=stripslashes($text); $text=str_replace("\r\n", "
", $text); if(isset($_GET['topicrd'])) { // ������� �������������� ��������� $topicrd = $_GET['topicrd']; // ����� ������, ������� ���������� �������� $file=file("$datadir/$id.dat"); $fs=count($file)-1; $i="-1"; $fp=fopen("$datadir/$id.dat","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� do {$i++; if ($i==$topicrd) {fputs($fp,"$text\r\n");} else {fputs($fp,$file[$i]);} } while($i < $fs); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("$id.dat",$chmodval); Header("Location: admin.php?fid=$fid&id=$id&page=$page"); exit; } if (strlen($name)>18) {$name=substr($name,0,18); $name.="..";} if (strlen($zag)>24) {$zag=substr($zag,0,24); $zag.="..";} // ������ ������ �� ������� �������� $lines = file("$datadir/mainforum.dat"); $dt = explode("|", $lines[$realfid]); if ($_GET['event'] =="addtopic") {$dt[4]++;} $dt[5]++; $txtdat="$dt[0]|$dt[1]|$dt[2]|$id|$dt[4]|$dt[5]|$name|$date|$time|$tektime|$zag|$dt[11]|$dt[12]||"; $fp=fopen("$datadir/mainforum.dat","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� for ($i=0;$i<=(sizeof($lines)-1);$i++) {if ($i==$realfid) {fputs($fp,"$txtdat\r\n");} else {fputs($fp,$lines[$i]);}} fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("mainforum.dat",$chmodval); } if ($_GET['event'] =="addtopic") { // ���������� ���� // ������ ������ � ������� ����� $fp=fopen("$datadir/topic$fid.dat","a+"); flock ($fp,LOCK_EX); fputs($fp,"$text\r\n"); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("topic$fid.dat",$chmodval); // ������ ������ � ���� $fp=fopen("$datadir/$id.dat","a+"); flock ($fp,LOCK_EX); fputs($fp,"$text\r\n"); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("$id.dat",$chmodval); Header("Location: admin.php?fid=$fid"); exit; } if ($_GET['event'] =="addanswer") { //����� � ���� // ������ ������ $fp=fopen("$datadir/$id.dat","a+"); flock ($fp,LOCK_EX); fputs($fp,"$text\r\n"); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); //@chmod("$id.dat",$chmodval); Header("Location: admin.php?fid=$fid&id=$id&page=$page"); exit;} // ������� ����� �� if ($_GET['event']=="makecopy") { if (is_file("$datadir/mainforum.dat")) {$lines=file("$datadir/mainforum.dat");} if (!isset($lines)) {$datasize=0;} else {$datasize=sizeof($lines);} if ($datasize<=0) {exit("�������� � ����� ������ - ���� ����������. ������ = 0!");} if (copy("$datadir/mainforum.dat", "$datadir//copy.dat")) {print "

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

$back

";} else {print"������ �������� ����� ���� ������. ���������� ������� ������� ���� copy.dat � ����� $datadir � ��������� ��� ����� �� ������ - 666 ��� ������ ����� 777 � ��������� �������� �������� �����!";} exit; } // ������������ �� ����� �� if ($_GET['event']=="restore") { if (is_file("$datadir/copy.dat")) {$lines=file("$datadir/copy.dat");} if (!isset($lines)) {$datasize=0;} else {$datasize=sizeof($lines);} if ($datasize<=0) {exit("�������� � ������ ���� ������ - ��� ����������. �������������� ����������!");} if (copy("$datadir/copy.dat", "$datadir//mainforum.dat")) {print "

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

$back

";} else {print"������ �������������� �� ����� ���� ������. ���������� ������� ������ copy.dat � mainforum.dat � ����� $datadir ��������� ����� �� ������ - 666 ��� ������ ����� 777 � ��������� �������� ��������������!";} exit; } // ���������������� ������, ��� 2: ���������� ������ if ($_GET['event']=="config") { if (strlen($_POST['newpassword'])<1) {print"$back ����������� ����� ������ ������� 1 ������!";} if ($_POST['newpassword']!="�����") {$pass=trim($_POST['newpassword']); $_POST['password']=md5("$pass+$skey");} // ������ �� ������. ��������, ��� � ������� ������ ���������� �������... $fd=stripslashes($_POST['fdesription']); $fd=str_replace("\\","/",$fd); $fd=str_replace("?>","? >",$fd); $fd=str_replace("\"","'",$fd); $fdesription=str_replace("\r\n","
",$fd); mt_srand(time()+(double)microtime()*1000000); $absrand=mt_rand(1000,9999); // ���������� ��������� ����� ��� ����������� $configdata="
��������� �����\"; // ������� ������\r\n". "$"."s2=\"\"; // �������� ;-)\r\n". "$"."s1=\"\";\r\n". "$"."s3=\"\";\r\n". "$"."s4=\"\";\r\n". "$"."s5=\"\";\r\n". "$"."s6=\"\";\r\n". "$"."s7=\"\";\r\n". "$"."s8=\"\";\r\n". "$"."s9=\"\";\r\n". "$"."s10=\"\";\r\n". "$"."s11=\"\";\r\n". "$"."s12=\"\";\r\n". "$"."date=date(\"d.m.Y\"); // �����.�����.���\r\n". "$"."time=date(\"H:i:s\"); // ����:������:������� \r\n?>"; $file=file("config.php"); $fp=fopen("config.php","a+"); flock ($fp,LOCK_EX); ftruncate ($fp,0);//������� ���������� ����� fputs($fp,$configdata); fflush ($fp); flock ($fp,LOCK_UN); fclose($fp); Header("Location: admin.php?event=configure"); exit;} } // ����� if isset($event) // ����� ��� ���� ������� ������ if (isset($_COOKIE['wrfcookies'])) { $wrfc=$_COOKIE['wrfcookies']; $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); $wrfc=$_COOKIE['wrfcookies']; $wrfc = explode("|", $wrfc); $wrfname=$wrfc[0];$wrfpass=$wrfc[1];$wrftime1=$wrfc[2];$wrftime2=$wrfc[3]; } } // ���� ������� � ��������� ������: ���� -> ������ -> ����� if (isset($fid)) { $mainlines = file("$datadir/mainforum.dat"); $i=count($mainlines); if (!ctype_digit($fid)) {echo "

������!

"; exit;} do {$i--; $rdt = explode("|", $mainlines[$i]); // �������� �� ���� �������� � ������� - ���� ������������� $dt = explode("|", $mainlines[$i]); if ($dt[0]==$fid) {$i=0;} } while($i > "1"); $frname=$dt[1]; $frname.=" ->"; if (isset($id)) {if (is_file("$datadir/$id.dat")) {$lines = file("$datadir/$id.dat"); $dt = explode("|", $lines[0]); $frtname=$dt[3]; $frtname.=" ->";} else {$frtname=""; $frname="";}} else {$frtname="";} } else {$frname=""; $frtname="";} // �������� �������� ������ ���� ���� ���� ?> ������� :: <?print"$frtname $frname $fname";?> "> "> "; // ���������� ���: ����� ��� ��������� if ($dt[1]=="razdel") {print "";} else { if ($dt[7]==$date) {$dt[7]="�������";} $maxzvezd=""; if (isset($dt[12])) { if ($dt[12]>0) {$maxzvezd="* $dt[12] ������ �������";}} print " "; $itogotem=$itogotem+$dt[4]; $itogomsg=$itogomsg+$dt[5]; } } while($a1 < $u); print "
<br />
<b>Warning</b>:  Undefined variable $fname in <b>/home/r3i/forum/admin.php</b> on line <b>755</b><br />

�������
Warning: Undefined variable $fname in /home/r3i/forum/admin.php on line 756


Warning: Undefined variable $fdesription in /home/r3i/forum/admin.php on line 757


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

�������: $date - $time
"; // ������� ������� �������� ������ if (!isset($_GET['event'])) { if (!isset($_GET['fid'])) { print " "; // ������� qq ��������� �� ������� �������� $addform="
������ ��� ������� ����������
���������� ������� / ������
��� ������������ ������ ������    �����
���������
��������
"; if (!is_file("$datadir/mainforum.dat")) {print "

���� mainforum.dat ������������ - �������� ����� ��� ������.

$addform"; exit;} $lines = file("$datadir/mainforum.dat"); $datasize = sizeof($lines); if ($datasize==0) {print "

���� mainforum.dat ���� - �������� ����� ��� ������.

$addform"; exit;} $i=count($lines); $n="0"; $a1="-1"; $u=$i-1; $fid="0"; $itogotem="0"; $itogomsg="0"; do {$a1++; $dt = explode("|", $lines[$a1]); $fid=$dt[0]; print "
�� �� .P. .X.
$dt[2]
 
$dt[1] $maxzvezd
$dt[2]
$dt[4] / $dt[11] $dt[5] ����: $dt[10]
�����: $dt[6]
����: $dt[7] - $dt[8]

"; // ������� �������������� ������ if (isset($_GET['frd'])) { if ($_GET['frd'] !="") { $frd=$_GET['frd']; $lines = file("$datadir/mainforum.dat"); $dt = explode("|", $lines[$frd]); if (isset($dt[11])) { if ($dt[11]>0) {$addmax=$dt[11];} else {$addmax="100";}} if (isset($dt[12])) { if ($dt[12]<=0) {$dt[12]="0";}} $dt[2]=str_replace("
","\r\n",$dt[2]); print "
";} else {print " ����� ";} print"
�������������� ������� / ������
��� �������������� ������"; if ($dt[1]=="razdel") {print "������
���������
���������
��������
������������ ���-�� ��� � ������

"; } } // ����� �������������� ������ else { print "$addform"; } if ($statistika=="1") { print"
����������
���������: $itogomsg
���: $itogotem
����� ���������������� ����������: $ui
��������� �����������������: $tdt[0]
"; } } // ����� ������� �������� // ������� �������� � ������ ��������� ������� if (isset($_GET['fid']) and !isset($_GET['id'])) { $fid=$_GET['fid']; if (!isset($m1)) {print "
   $fname -> $frname
"; $m1="1";} print ""; // ���������� ���� �� ���������� � ����� � ������� if (is_file("$datadir/topic$fid.dat")) { $msglines=file("$datadir/topic$fid.dat"); if (count($msglines)>0) { // ������� qqmain ��������� �� ������� �������� $lines=file("$datadir/topic$fid.dat"); $i=count($lines); $n="0"; if (isset($_GET['page'])) {$page=$_GET['page'];} else {$page="0";} if ($page>=$i) {$page=$i-1;} // ��������� ������ ������ �������������� �������� if ($i-$page-$qqmain>=0) {$a1=$i-$page; $u=$a1-$qqmain;} else {$a1=$i-$page; $u=0;} do {$a1--; $dt=explode("|", $lines[$a1]); $filename=$dt[7]; if (is_file("$datadir/$filename.dat")) {$msgsize = sizeof(file("$datadir/$filename.dat"));} else {print "��� ������ �����!!!"; exit;} // ���������� ���-�� ��������� � ������� ���� //////////////// $datatek=file("$datadir/$filename.dat"); $pos=$msgsize-1; $dtt = explode("|", $datatek[$pos]); $foldicon="folder.gif"; // ���� ��������� ��������� � ������ ��������� ������ ��������� - ������ ������ ������ - ����� if (isset($wrfname)) {if (isset($dtt[9])) {if ($dtt[9]>$wrftime2) {$foldicon="foldernew.gif";}}} if (strlen($dt[8])>1 and $dt[8]=="closed") {if ($msgsize<"20") {$foldicon="close.gif";} else {$foldicon="closed.gif";}} ///////////////// print ""; } while($a1 > $u); // ������� ������ ��������� ������� $lines=file("$datadir/topic$fid.dat"); $a=count($lines); $i=0; print "
X/P ���� C�������� ����� ����������
.P.
.X.
$dt[3]"; if ($msgsize>$qq) { // ������� ������ ��������� ������� print "
     ��������:  "; for($zi=0; $zi<$msgsize;) {$zii=1+$zi/$qq; print "$zii  "; $zi=$zi+$qq;} } print"
$msgsize "; if ($dt[1]=="��") {print "$dt[0]
$users";} else {print "$dt[0]
$guest";} if ($msgsize>=2) {$linesdat=file("$datadir/$filename.dat"); $dtdat=explode("|", $linesdat[$msgsize-1]); $dt[0]=$dtdat[0]; $dt[1]=$dtdat[1]; $dt[2]=$dtdat[2]; $dt[5]=$dtdat[5]; $dt[6]=$dtdat[6];} if ($dt[5]==$date) {$dt[5]="�������";} print "
 �����: $dt[0]
 ����: $dt[5]
 �����: $dt[6]
  ��������:  "; for($i=0; $i<$a;) {$ii=1+$i/$qqmain; if ($page==$i) {print "$ii ";} else {print "$ii  ";} $i=$i+$qqmain;} print "

"; } else {print "
 

";} } // ------------ ������� �������������� ���� if (isset($_GET['rd'])) { if ($_GET['rd'] !="") { $rd=$_GET['rd']; $dt=explode("|", $lines[$rd]); if ($dt[8]=="closed") {$ct2="checked"; $ct1="";} else {$ct1="checked"; $ct2="";} $addbut=" �������   �������"; print "
�������������� ����
���� $addbut
"; } } else { print "
���������� ����
"; if (!isset($wrfname)) {print "��� � E-mail
";} print "��������� ����
���������
"; if (isset($wrfname)) {print "";} else {print "
";} print "



"; } // -------------- } } // ������� ��������� � ������� ���� if (isset($_GET['fid']) and isset($_GET['id'])) {$id=$_GET['id']; $fid=$_GET['fid']; // ��������� �������� �������� ������ $mainlines = file("$datadir/mainforum.dat"); $i=count($mainlines); do {$i--; $rdt = explode("|", $mainlines[$i]); // �������� �� ���� �������� � ������� - ���� ������������� $dt = explode("|", $mainlines[$i]); if ($dt[0]==$fid) {$i=0;} } while($i > "1"); $frname=$dt[1]; // ���������� ���� �� ���������� � ����� � ������� if (!is_file("$datadir/$id.dat")) {exit("

������ :-(

");} else //���� ���������� { $lines = file("$datadir/$id.dat"); if (count($lines)>0) { //��������� ���� � �������������� � ������ $userlines = file("$datadir/usersdat.php"); $usercount=count($userlines); // ������� qq ��������� �� ������� �������� $lines = file("$datadir/$id.dat"); $i=count($lines); $n="0"; if (isset($_GET['page'])) {$page=$_GET['page'];} else {$page="0";} if ($page>=$i) {$page=(round($i/$qq))*10;} // ��������� ������ ������ �������������� �������� if ($i<=$qq) {$page="0";} if ($page>=1) {$a1=$page;} else {$a1=0;} if (($a1+$qq)<$i) {$u=$a1+$qq;} else {$u=$i;} do {$dt = explode("|", $lines[$a1]); $dt[4]=str_replace("[b]","", $dt[4]); $dt[4]=str_replace("[/b]","", $dt[4]); $dt[4]=str_replace("[RB]","", $dt[4]); $dt[4]=str_replace("[/RB]","", $dt[4]); $dt[4]=str_replace("[Quote]","
������:", $dt[4]); $dt[4]=str_replace("[/Quote]","

", $dt[4]); $dt[4]=str_replace("[Code]","
���:", $dt[4]); $dt[4]=str_replace("[/Code]","

", $dt[4]); $dt[4]=str_replace(":-))",$s1,$dt[4]); $dt[4]=str_replace(":-)",$s2,$dt[4]); $dt[4]=str_replace(":-P",$s3,$dt[4]); $dt[4]=str_replace("8-)",$s4,$dt[4]); $dt[4]=str_replace(":-(",$s5,$dt[4]); $dt[4]=str_replace(":-O",$s6,$dt[4]); $dt[4]=str_replace(";-)",$s7,$dt[4]); $dt[4]=str_replace(":roll:",$s8,$dt[4]); $dt[4]=str_replace(":rf:",$s9,$dt[4]); $dt[4]=str_replace("8-(",$s10,$dt[4]); $dt[4]=str_replace("`-(",$s11,$dt[4]); $dt[4]=eregi_replace("((https?|ftp)://[[:alnum:]_=/-]+(\\.[[:alnum:]_=/-]+)*(/[[:alnum:]+&._=/~%]*(\\?[[:alnum:]?+&;_=/%]*)?)?)", "\\1", $dt[4]); $a1++; // ��������� � ������ ������ �� ������������ if ($dt[1]=="��") {$iu=$usercount; do {$iu--; $du = explode("|", $userlines[$iu]); if ($du[0]==$dt[0]) {if (isset($du[12])) {$status=$du[13]; $youavatar=$du[12];} $youwr=eregi_replace("((https?|ftp)://[[:alnum:]_=/-]+(\\.[[:alnum:]_=/-]+)*(/[[:alnum:]+&._=/%]*(\\?[[:alnum:]?+&_=/%]*)?)?)", "\\1", $du[11]);} } while($iu > "0"); } else {unset($youwr);} if (!isset($m1)) { // �������� ����� print "
   $fname -> $frname -> $dt[3]
"; $m1="1"; } print""; } while($a1 < $u); print "
����� ���������

"; if ($dt[1]=="��" & isset($youwr)) { print "$dt[0] ".chr(149)."

"; if (strlen($status)>1) {print "$status";} else {print"$users";} if (isset($youavatar)) {print "



";}} else {print "$dt[0] ".chr(149)."

$guest";} print "
$dt[4]"; if (isset($youwr)) {if (strlen($youwr)>3) {print "
--------------------------------------------------
$youwr";}} // �������� ������� ��������� print"
$a1.
.P..X.
����������: $dt[5] - $dt[6]
"; // ������� ������ ��������� ������� $lines = file("$datadir/$id.dat"); $a = count($lines); print "
��������:  "; for($i=0; $i<$a;) {$ii=1+$i/$qq; // ��������� ������ ������� �������� if ($page==$i) {print "$ii ";} else {print "$ii  ";} $i=$i+$qq;} print "
"; // ������� ����� .P. - �������������� ��������� if (isset($_GET['topicrd'])) // ������� ��������� � ����� { $topicrd=$_GET['topicrd']-1; $lines = file("$datadir/$id.dat"); $dt = explode("|", $lines[$topicrd]); $dt[4]=str_replace("
", "\r\n", $dt[4]); print "
���������
��� � E-mail   "; } else { print " "; print"
���������
��� "; if (!isset($wrfname)) {print "� E-mail
";} print "
"; if (!isset($wrfname)) {print " ";} else {print "$wrfname";} } print "
���������

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

��������:
$s1 $s2 $s3 $s4 $s5 $s6 $s7 $s8 $s9 $s10 $s11
"; if (isset($_GET['topicrd'])) { print "
       
   
"; } else { print "
    "; } } } } // else if event !="" if (isset($_GET['event'])) { // ���������������� ������ - ����� �������� if ($_GET['event']=="configure") { if ($sendmail=="1") {$s1="checked"; $s2="";} else {$s2="checked"; $s1="";} if ($sendadmin=="1") {$sa1="checked"; $sa2="";} else {$sa2="checked"; $sa1="";} if ($statistika=="1") {$st1="checked"; $st2="";} else {$st2="checked"; $st1="";} if ($antispam=="1") {$as1="checked"; $as2="";} else {$as2="checked"; $as1="";} if ($newmess=="1") {$n1="checked"; $n2="";} else {$n2="checked"; $n1="";} if ($cangutema=="1") {$ct1="checked"; $ct2="";} else {$ct2="checked"; $ct1="";} if ($cangumsg=="1") {$cm1="checked"; $cm2="";} else {$cm2="checked"; $cm1="";} if ($useactkey=="1") {$u1="checked"; $u2="";} else {$u2="checked"; $u1="";} print "
���������������� $path = '.'; // ���� �� �����. '.' - ������� ����� if ($handle = opendir($path)) { while (($file = readdir($handle)) !== false) if (is_dir($file)) { $stroka=stristr($file, "images"); if (strlen($stroka)>"6") {print "$stroka - str $file
"; $tskin=str_replace("images", "���� ", $file); if ($fskin==$file) {$marker="selected";} else {$marker="";} print"";} } closedir($handle); } else print '������!'; print "
�������� ��������
�������� ������
��������
�� ���������� ������������ HTML-����.
�-���� ��������������
������ ������ * (���������� � �����)
�������� �������� ���������? ��   ���
������ ������� ��������� � ����� ������������������ �������������? ��   ���
���������� ���������� �� ������� ��������? ��   ���
��������� ���� � ������ �����������? ��   ���
����. ����� �����
����. ����� ��������� ����
����. ����� ���������
������������� �������� / ����� ���� ��   ���    .:.    (�� 1 �� 9) ����
��� / C�������� / ���������� �� ��������   .:.     .:.  
��� �������� ���������� �� ��������� / ���������  /  
��������� ��������� ����� ����� ��� �����������? ��   ���
��������� ���� / ��������� ��������� ������ �����?�: ��   ��� .:. �: ��   ���
����� � ������� �����    �� ��������� - ./data
������������ ������ ������� � ������
���� ������
Chmod (����� �������) ��� ������ ������ ������ 0644


* ���� ������ �������� ������ - ������� ����� \"�����\" � ������� ����� ������.
���������� ������������ ������ ����� �/��� �����. "; } // �������� ���� ���������� ������ if ($_GET['event']=="userwho") { $t1="row1"; $t2="row2"; $userlines=file("$datadir/usersdat.php"); $ui=count($userlines)-1; print""; if (isset($_GET['upage'])) {$upage=$_GET['upage'];} else {$upage="1";} if ($upage=="0") {$upage="1";} else {$upage=abs($upage);} $maxupage=ceil(($ui+1)/$uq); if ($upage>$maxupage) {$upage=$maxupage;} $i=1+$uq*($upage-1); if ($i>$ui) {$i=$ui-$uq;} $lm=$i+$uq; if ($lm>$ui) {$lm=$ui+1;} do {$tdt=explode("|",$userlines[$i]); $i++; $npp=$i-1; if ($tdt[6]=="�������") {$tdt[6]="";} else {$tdt[6]="";} if (strlen($tdt[13])<2) {$tdt[13]=$users;} print""; if (strlen($tdt[13])=="6" and ctype_digit($tdt[13])) { print"";} $t3=$t2; $t2=$t1; $t1=$t3; } while ($i<$lm); // ������� ������ ������� print "
.X. ��� ������ ��� ���� ����������� ����� ������ / �������� �������
$npp
.X.
$tdt[0][������������]. ������� ������ �� ������������ � $tdt[4]. (�����: $tdt[3] ����: $tdt[13])"; } else { print" $tdt[1] $tdt[6]$tdt[4]$tdt[3]

��������:  "; for($i=0; $i<$ui;) {$ip=$i/$uq+1; if ($upage==$ip) {print "$ip  ";} else {print "$ip  ";} $i=$i+$uq;} print "����� ���������������� ���������� - $ui

"; } } //} else {print"$back. �������� �����... :-(";} //} // ����������� �� �������� ?>
Powered by WR-Forum © 1.8M