-1 |
|
dit is m'n code voor de pagina die je op die link ziet
<?
if ($aSession['loggedIn'] != "true") {
echo "you need to be loggedIn to acces this page";
}
else {
if (isset($_POST['editSubmit']))
{
$editFile = stripslashes($_POST['editFile']);
$editFile = html_entity_decode($editFile);
if (!$handle = fopen($_POST['editFileName'], 'w')) {
}
if (fwrite($handle, $editFile ) === FALSE) {
}
?>
<meta http-equiv="refresh" content="0;url=?page=admin">
<?
}
else{
$filename = $_GET['edit'];
$handle = @fopen($filename, "r");
$contents = @fread($handle, filesize($filename));
fclose($handle);
?>
<form method="post" action="?page=edit">
<?
echo "<div align=\"center\"><textarea name=\"editFile\" rows=\"30\" cols=\"80\">".htmlentities($contents)."</textarea></div>";
?>
<div align="center">
<input type="hidden" name="editSubmit" value="submit"/>
<input type="hidden" name="editFileName" value="<?=$filename;?>"/>
<input type="image" name="editImage" src="images/change.jpg" /></div>
<?
}
}
?>
<? if ($aSession['loggedIn'] != "true") { echo "you need to be loggedIn to acces this page"; } else { if (isset($_POST['editSubmit'])) { if (!$handle = fopen($_POST['editFileName'], 'w')) { } if (fwrite($handle, $editFile ) === FALSE) { } ?> <meta http-equiv="refresh" content="0;url=?page=admin"> <? } else{ $filename = $_GET['edit']; $handle = @fopen($filename, "r"); ?> <form method="post" action="?page=edit"> <? echo "<div align=\"center\"><textarea name=\"editFile\" rows=\"30\" cols=\"80\">".htmlentities($contents)."</textarea></div>"; ?> <div align="center"> <input type="hidden" name="editSubmit" value="submit"/> <input type="hidden" name="editFileName" value="<?=$filename;?>"/> <input type="image" name="editImage" src="images/change.jpg" /></div> <? } } ?>
|