All pastes #837455 Raw Edit

Someone

public php v1 · immutable
#837455 ·published 2007-12-29 18:07 UTC
rendered paste body
<?phpdate_default_timezone_set('UTC');// Text Editorif($_GET['source'] != ''){	$source = 'users'.$_GET['source'];	$name = basename($source);	$path = str_replace("$name","",$source);	$file = file_get_contents($source, r);} else {	$name = 'New File';	$path = '<span style="font-weight: bold; color: #F00;">UNSAVED</span>';	$dpath = '/guest/documents/';	$dname = md5(date(DATE_RFC822)).'.txt';	$file = '';}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>	<head>		<link rel="stylesheet" type="text/css" href="sys-app.css" />	</head>		<body><h1>Text Editor</h1>Path: <?php echo $path; ?><br />File: <?php echo $name; ?><br /><form method="post" action="process.php"><?phpif(!empty($_GET['source'])){ ?>	<input type="hidden" name="name" value="<?php echo $name; ?>" />	<input type="hidden" name="path" value="<?php echo $path; ?>" /><?php } else { ?>	Name: <input type="text" name="name" value="<?php echo $dname; ?>" />	Path: <input type="text" name="path" value="<?php echo $dpath; ?>" /><?php } ?>	<textarea rows="15" cols="80" name="file"><?php echo $file; ?>	</textarea><br />	<input type="submit" name="save" value="Submit" /></form></body></html><!-- date('d/m/y', time()); -->