Location: PHPKode > scripts > Static Parser Engine,Parser-class > static-parser-engine/index.php
<?php
//   ---------------------------------
//    Static Parser Engine v1.0
//    (c) 2007 by Sergey V. Bogomolov
//    web: http://bogomolov.in.ua
//   ---------------------------------

include "core.php";

if($_GET['act']=='delpage'){
   delPage($_GET['path'], $_GET['fname']);
   header('Location: index.php?path='.$_GET['path']);
}elseif($_GET['act']=='renpage'){
   renPage($_GET['path'], $_GET['fname'], $_GET['new_fname']);
   header('Location: index.php?path='.$_GET['path']);
}

header("Cache-Control: no-cache, must-revalidate");?>
<html>

<head>
  <title>Static Parser Engine v1.01</title>
  <meta http-equiv="content-type" content="text/html; charset=<?=$codepage?>"/>
  <link href="style.css" rel="stylesheet" type="text/css">
  <script language='JavaScript'>
function renamePage(path, fname){
    new_fname=prompt("Enter new file name: ", fname);
    if(new_fname!=null){
       document.location.href="index.php?act=renpage&path="+path+"&new_fname="+new_fname+"&fname="+fname;
    }
}
function deletePage(path, fname){
   if(window.confirm("Are you sure you want to delete page "+fname+"?")) {
        document.location.href="index.php?act=delpage&path="+path+"&fname="+fname;
   }
}
  </script>
</head>

<body>
<b>Static Parser Engine v1.0</b><br /><br />

<?php

$flist=getList($_GET['path']);

?><select size="1" name="Name" onChange="document.location.href='index.php?path='+this.value">
  <option value="">all folders</option><?php
  foreach($dirs as $value){
     if($value==$_GET['path'])
        echo '<option selected value="'.$value.'">/'.trim(str_replace($document_root, '', $value), '/').'</option>';
     else
        echo '<option value="'.$value.'">/'.trim(str_replace($document_root, '', $value), '/').'</option>';
  }
?>
</select>
<?php
if($_GET['path']==''){ ?>
<a href="javascript:alert('Please select folder to create file in!')"><b>[+] add page</b></a>
<?php }else{  ?>
<a href="page_parsed.php?path=<?=$_GET['path']?>"><b>[+] add page</b></a>
<?php } ?>

<br /> <br />
<table border=0 cellspacing=2 cellpadding=5>
<?php

   echo '<tr bgcolor=#eeeeee style="font-weight: bold;"><td>file name';
   echo '<td>title';
   echo '<td>modify date';
   echo '<td>size';
   echo '<td>edit';
   echo '<td>rename';
   echo '<td>delete';

foreach($flist as $value){
   echo '<tr><td><a target=_blank href="/'.str_replace($document_root, '', $value['path'].$value['fname']).'">'.str_replace($document_root, '', $value['path'].$value['fname']).'</a>';
   echo '<td>'.$value['title'];
   echo '<td>'.date("d.m.Y", $value['modify_date_t']);
   echo '<td>'.ceil($value['file_size_bytes']/1024).'kb';
   echo '<td align=center>[<a href="page_parsed.php?path='.$value['path'].'&fname='.$value['fname'].'" style="color: red;">e</a>]';
   echo '<td align=center>[<a href="javascript:renamePage(\''.$value['path'].'\', \''.$value['fname'].'\')" style="color: red;">r</a>]';
   echo '<td align=center>[<a href="javascript:deletePage(\''.$value['path'].'\', \''.$value['fname'].'\')" style="color: red;">d</a>]';

   //<a target=_blank href="/'.str_replace($document_root, '', $value['path'].$value['fname']).'">'.$value['title'].'</a>';
   //echo '<tr><td><a target=_blank href="/'.str_replace($document_root, '', $value['path'].$value['fname']).'">'.$value['title'].'</a>';
  // echo ' <small> [<a href="#" style="color: red;">rename</a>]';
   //echo ' '.date("d.m.Y", $value['modify_date_t']).' / '.ceil($value['file_size_bytes']/1024).'kb</small>';
}

?>
<tr><td bgcolor=#c0c0c0 colspan=7>
<tr><td nowrap>
<small>&#169; 2007 coded&nbsp;by&nbsp;<a href="http://bogomolov.in.ua/" style="color: #c0c0c0">#Dialer</a>
<small>
<td colspan=6 align=right>
<small><a href="page_parsed.php?fname=template.html" style="color: #c0c0c0">edit template</a>
&#149;
<a href="page.php?fname=config.php" style="color: #c0c0c0">edit config</a>
&#149;
<a href="make_htaccess.php" style="color: #c0c0c0">set/change password</a>
</small>

</table>

<!--<a href="#"><b>[+] add page</b></a>-->
</body> </html>
Return current item: Static Parser Engine,Parser-class