rendered paste body<?php ob_start(); ?><html><head><title>~:: MadBananas ::~</title></head><body><?php include('../main_2007header.php'); ?> <?phpif(isset($_COOKIE['username']) && isset($_COOKIE['sapwad'])){check_user_id($_COOKIE['username'], $_COOKIE['sapwad']);if(!is_uploaded_file($_FILES['file']['tmp_name'])){ header("Location: /art/");}else{$uname = $_COOKIE['username'];$uname = mysql_real_escape_string($uname);$um = find_uid($uname);if($level_is != 1){$date_now = date('Y-m-d');$get_number = mysql_query("SELECT * FROM art WHERE author='$um' && date_submitted LIKE '$date_now%'");$count_it = mysql_num_rows($get_number);if($count_it >= 2){echo "It looks like you have already submitted 2 submissions today. Why don't you lay off the submission submitting and wait 'til tomorrow.";include("../main_2007footer.php");exit;}}$uploaddir = $_SERVER['DOCUMENT_ROOT'] . '/art/view'; $allowed_ext = "jpg,jpeg,gif,pjpeg,png"; $max_size = "2097152"; /// in Bytes$max_height = "2000"; $max_width = "2000"; $this_file = $_FILES['file']['tmp_name'];$name = htmlentities($_POST['name'], ENT_QUOTES);$check = mysql_num_rows(mysql_query("SELECT * FROM art WHERE name = '$name'"));$extension = pathinfo($_FILES['file']['name']);$extension = $extension[extension];$allowed_paths = explode(",", $allowed_ext);for($i = 0; $i < count($allowed_paths); $i++) { if ($allowed_paths[$i] == "$extension") { $ok = "1"; }}if ($ok == "1") {// Do stuff}else{echo "Incorrect file extension! You must use either .gif, .jpg, .jpeg, .pjpeg, or .png <br><br>".$extension1;}}}else{ echo 'You need to <a href="/mad/login.php">login</a> first before you can upload content!';}include('../main_2007footer.php');?>