here"; } elseif($_POST['saveedit']) { //delete old staticfile... $ds=mysql_fetch_array(safe_query("SELECT name FROM `".PREFIX."static` WHERE staticID='".$_POST['staticID']."'")); unlink('../'.$ds[name]); //...to write a new, updated one $file = ("../html/".$_POST['name']); $fp = fopen ($file, "w"); fwrite ($fp, stripslashes($_POST['content'])); fclose($fp); safe_query("UPDATE `".PREFIX."static` SET name='".$_POST['name']."', accesslevel='".$_POST['accesslevel']."' WHERE staticID='".$_POST['staticID']."'"); } elseif($_GET['delete']) { $ds=mysql_fetch_array(safe_query("SELECT name FROM `".PREFIX."static` WHERE staticID='".$_GET['staticID']."'")); @unlink('../html/'.$ds[name]); safe_query("DELETE FROM `".PREFIX."static` WHERE staticID='".$_GET['staticID']."'"); } echo'
filename: | Actions: | |
'.$ds[name].' |