Public feed #528870

Mine

public text v1 · immutable
Raw Edit
·published 2007-06-01 18:30 UTC
rendered paste body
<html>
	<head>
		<title>GModAds</title>
	</head>
	<body>
<?
if(isset($_FILES['imagefile']))
{	if (isset($_POST['owner'])) {
		if ($_FILES['imagefile']['type'] == "image/png"){ 
		    if(move_uploaded_file($_FILES['imagefile']['tmp_name'], "pending/".$_POST['owner'].".png")) {
				echo "Thanks for your submission! Click <a href=\"index.php\">here</a> to return to the homepage!";
			} else {
				echo "There's some serious jiggery-pokery going on here, stop being a l33t h4xxor and <a href=\"newad.php\">try again</a>!";
		    }
		} else {
			echo "PNG files only please! Please <a href=\"newad.php\">try again</a>!";
		}
	} else {
		echo "No name provided. Please <a href=\"newad.php\">try again</a>!";
	}
} else {
 echo '
 		<form name="form" method="post" action="" enctype="multipart/form-data">
		Image file:<input type="file" name="imagefile"><br>
		Your name/alias:<input type="text" name="owner"><br>
		<br>
		Only press submit if you agree to the <a href="rules.php">rules</a>.
		<input type="submit" name="Submit" value="Submit">
 ';
}
?>
	</body>
</html>