require_once("i-bittorrent.php"); dbconn(); loggedinorreturn(); if(get_user_class() < UC_UPLOADER) stderr("Error","Uploaders only."); if($_POST["no"]) header("Location: ".$BASEURL."/viewmy"); $uid = $CURUSER["id"]; $id = 0 + $_GET["id"]; if($_POST["yes"]) $id = 0 + $_POST["id"]; $exists = get_row_count("iexigo.images", "WHERE id=".$id); if($exists == 1) { $owner = get_row_count("iexigo.images","WHERE id=".$id." AND userid=".$uid); if(($owner == 0 || !$owner) && get_user_class() < UC_MODERATOR) { stderr("Error","You don't own that image!"); } } else { stderr("Error","Image doesn't exist!"); } if($_POST["yes"]) { mysql_query("DELETE FROM iexigo.images WHERE id=".$id); header("Location: ".$BASEURL."/viewmy"); } $image_type = mysql_fetch_row(mysql_query("SELECT type FROM iexigo.images WHERE id=".$id)); $suffix = ".jpg"; if($image_type == "image/png") $suffix = ".png"; if($image_type == "image/jpeg") $suffix = ".jpg"; if($image_type == "image/gif") $suffix = ".gif"; stdhead(); begin_main_frame(); echo "
"; end_frame(); end_main_frame(); ?>