rendered paste body<?php
error_reporting(0);
$result = isset($_REQUEST['result']) ? $_REQUEST['result'] : false;
$filename = date('H:i:s');
if(isset($_POST['mkfile'])):
if(fopen(dirname(__FILE__).'/'.$filename, 'w')) header('Location: '.basename(__FILE__).'?result=success');
else header('Location: '.basename(__FILE__).'?result=failure');
endif;
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
print '<html xmlns="http://www.w3.org/1999/xhtml">';
print '<head>';
print '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
print '<title>Datei anlegen</title>';
print '</head>';
print '<body>';
print '<form id="frmMkfile" name="frmMkfile" method="post" action="">';
print '<input type="submit" name="mkfile" id="mkfile" value="Datei anlegen" />';
print '</form>';
print '<br /><br />';
if($result == 'success') print 'Datei »'.$filename.'« erfolgreich angelegt.';
if($result == 'failure') print 'Datei »'.$filename.'« <b>nicht</b> erfolgreich angelegt.';
print '</body>';
print '</html>';
?>