Просмотр файла eforum25/ban.php

Размер файла: 1.65Kb
  1. <?php
  2. include "config.php";
  3. include "incl/pss.inc";
  4. include "incl/head.inc";
  5. $temp_var=0;
  6.  
  7. $file="$forum_data[0]/banned";
  8. $task_done="<title>...</title></head><body onload=\"pp=Math.round(99999*Math.random());window.location='ban.php?f=$f'+amp+'n='+pp\"></body></html>";
  9.  
  10. if(!is_file($file)){save_file($file,'',0);}
  11. save_file("$forum_data[0]/flood",'',0);
  12.  
  13. $fs=open_file($file);
  14. $fs=explode("\n",$fs);
  15.  
  16. if(isset($ban)&&strlen($ban)>6){
  17. for($i=0;$i<count($fs);$i++){
  18. if($ban==$fs[$i]){$temp_var=1;}}
  19. if($temp_var==0){
  20. $fs=implode("\n",$fs);
  21. $fs="$ban\n$fs";
  22. save_file($file,$fs,0);}
  23. die($task_done);}
  24.  
  25. elseif(isset($unban)&&strlen($unban)>6){
  26. for($i=0;$i<count($fs);$i++){
  27. if($unban==$fs[$i]){
  28. $fs[$i]='';$temp_var=1;}}
  29. if($temp_var!=0){
  30. $fs=implode("\n",$fs);
  31. save_file($file,$fs,0);}
  32. die($task_done);}
  33. ?>
  34. <title>...</title></head><body>
  35. <table align="center" width="200" border="0" cellpadding="0" cellspacing="0"><tr><td class="q">
  36. <table width="100%" border="0" cellspacing="1" cellpadding="5"><tr class="c"><td colspan="2"><b class="w"><?php print $lang[47];?></b></td></tr>
  37. <tr class="z"><td class="f" nowrap="nowrap">&nbsp;<?php print $lang[48];?></td><td class="f" nowrap="nowrap">&nbsp;<?php print $lang[33];?></td></tr>
  38. <?php
  39.  
  40. for($i=0;$i<count($fs);$i++){
  41. if(isset($fs[$i])&&strlen($fs[$i])>6){
  42. $range=explode(".",$fs[$i]);
  43. if(isset($range[3])&&$range[3]!=''){
  44. $range='';}else{$range='xxx';}
  45.  
  46. print "<tr class=\"$row_bg\"><td width=\"50%\" class=\"s\">$fs[$i]$range</td><td width=\"50%\" class=\"s\"><a href=\"ban.php?f=$f&amp;unban=$fs[$i]\">$lang[49]</a></td></tr>";
  47. switch_row_bg();}}?>
  48. </table></td></tr></table></body></html>