400) { $errormessage[]="the width of the screenshot must not be greater than 400 pixels"; } if($fileinfo[1]>300) { $errormessage[]="the height of the screenshot must not be greater than 300 pixels"; } if(filesize($sshotfile)>65536) { $errormessage[]="the size of the screenshot must not be greater than 64Kb"; } // check if there is already a sshot for this prod if(file_exists("screenshots/".$which.".gif")||file_exists("screenshots/".$which.".jpg")||file_exists("screenshots/".$which.".png")) { if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') { unlink("screenshots/".$which.".jpg"); unlink("screenshots/".$which.".gif"); unlink("screenshots/".$which.".png"); copy($sshotfile,"screenshots/".$which.$mytype); unlink($sshotfile); $errormessage[]="there was already a screenshot for this prod but since you're so leet and sexy i allowed you to lick my claw and replace it."; } else { $errormessage[]="there is already a screenshot for this prod"; } } // if everything is ok if(!$errormessage) $submitok=true; } // move the submitted sshot to the appropriate location if(!$submitok&&file_exists($sshotfile)){ unlink($sshotfile); // move_uploaded_file($sshotfile,"screenshots/".$which.$mytype); // copy($sshotfile, "screenshots/".$which.$mytype); // unlink($sshotfile); } if($submitok) { copy($sshotfile,"screenshots/".$which.$mytype); unlink($sshotfile); // reward the user $query ="INSERT INTO screenshots SET "; $query.="prod=".$which.","; $query.="user=".$_SESSION["SCENEID_ID"].","; $query.="added=NOW()"; mysql_query($query); } ?>
the screenshot has been added
feel free to add another one
see what you've done
errors found
 -
 -
prod information
prod: select the prod you want
to upload a screenshot for:
screenshot:
.gif .jpg or .png width and height limit are 400x300