37 ? '…' : ''); } function do1line($frow) { global $_g; $lres=do_query( "select * from `callog` where `pagename`='". htmlspecialchars($frow['pagename'],ENT_QUOTES) . "' order by `datim` desc limit 1"); $lrow=mysql_fetch_array($lres); if ($lrow) { $reslink= $lrow['pagename'] . (strlen($lrow['params'])>0 ? '?' : '') . $lrow['params']; $pagna="". pntrunc($reslink) .""; # str_replace - validator for HTML5 objects to [ ] in URLs } else { $pagna=pntrunc($frow['pagename']); } $is_killer=false; foreach($_g['killers'] as $kw) { if (substr($frow['pagename'],1,strlen($kw))==$kw) $is_killer=true; } echo "". "". ($is_killer ? "" : "". ""). "{$pagna}\n". "{$frow['fixtype']}". "". ($is_killer ? "deleted: ". do_del($frow['pagename']) : htmlspecialchars($frow['newpath'])) . "\n"; } // main() -------------------------------------------------------------- require_once("../incl/rwhead5.php"); require_once("../incl/http_get.php"); # just for get_home_paths() require_once("../incl/photinc.php"); # just for do_query() require_once("../incl/sel_db.php"); $hompa=get_home_paths(); $my_cnf=parse_ini_file("{$hompa['coodir']}my.cnf"); rwhhead($titext,"","","/incl/yellbg.css"); ?>
$titext\n". "\"Forbidden\" messages are caused by certain page names.

\n"; sel_db('log'); if (isset($_POST['do_del'])) { $startick=microtime(true); echo "Deleted:
\n"; reset($_POST); $ea=each($_POST); while ($ea) { if (substr($ea['key'],0,3)=='pag') { $rj=substr($ea['key'],3); $pag=urldecode($ea['value']); } if ($ea['key']=="del{$rj}") { echo "• ". do_del($pag) ."
\n"; } $delct++; $ea=each($_POST); } $ms_per_del=round(1000*(microtime(true)-$startick)/$delct); echo "$delct items deleted taking $ms_per_del mS per deletion

\n"; } $plim = ($_REQUEST['lim']>0 ? $_REQUEST['lim'] : 99999); /* If I try to post deletions for a very long list, I get a message "Forbidden". This lim parameter enables us to create a shorter, postable list. In fact I don't think length was a problem at all. It was the "killer" directory names ... */ $_g['killers']=array ('"',"bin/","dev/","boot/","etc/","opt/","proc/","root/","sys/","tmp/","usr/",); /* If the post data contains one of these names at the start of a resource name, I get a prompt "Forbiddden" message. This only happens on my server at microlite. If I post to other servers, the data is accepted. All these are names of directories in the root directory of the server but there are other directories in there, eg. lost+found which do not cause the "Forbidden" message. */ $slim = 300; /* Assume safe below this level. Limit is probably a function of amount of bytes sent rather than number of items in the post. */ $sres=do_query("select * from `rh_com_fix` order by `pagename`"); echo "
\n". "\n"; if (!isset($_POST['req_del'])) { $_g['rj']= $rj0= 1000; while ($frow=mysql_fetch_array($sres)) { if ($_g['rj']>=$rj0+$plim) break; do1line($frow); $_g['rj']++; } } else { foreach($_POST as $k => $d) { if (substr($k,0,3)=='del') { $_g['rj']=substr($k,3); $row['pagename']=urldecode($_POST['pag'.$_g['rj']]); do1line($row); } } } if (!isset($_POST['req_del'])) { if ($frow) { echo "\n"; } echo "\n"; } else { echo "\n"; } echo "
delpagenamefixnewpath
Limit reached - more items not displayed
". " the checked items?". ($_g['rj']<=$rj0+$slim || $plim<99999 ? "" : "   Problems with deleting? Try this.") . "
". " deletion of the above or ". "
\n"; echo "
\n"; ?>  
Calls log ?  lim=  set=keywd  set=*    are specials   |