500){ exit('you are using too many characters, use the back button to try again'); } if (strlen($tags)>500){ exit('you are using too many characters, use the back button to try again'); } if (strlen($photographername)>500){ exit('you are using too many characters, use the back button to try again'); } if (strlen($photographerurl)>200){ exit('you are using too many characters, use the back button to try again'); } if (strlen($caption)>700){ exit('you are using too many characters, use the back button to try again'); } // shorten the media description if (strlen($description)>100){ $description = substr($description,0,90); } $id = idclean($description); $s = getrandom(6); $id = $id.'-BPX'.$s; if ($dfile) { @unlink($dfile); } $prefs = file('prefs.php'); $filesizepref = $prefs[8]; $filesizeprefKB = $filesizepref / 1024; $filesizeprefKB = round($filesizeprefKB, 1); $file_size = $_FILES['userfile']['size']; $filek = $file_size / 1024; $filek = round($filek, 1); //exit($_FILES['userfile'][size]." is the name"); if ($filek>4615){ exit ('FILESIZE WARNING - Your file size = '.$filek.' K
File size limit = 4615 k use the back button to select a new file.
If you need to reduce your image size, you can use a free service like pixlr'); } if ($filek<20){ exit ('FILESIZE WARNING - Your file size = '.$filek.' K
file is too small.
'); } if (basename($_FILES['userfile']['name'])==''){ exit ('You seem to have forgotten to attach a file.'); } $filek = round($filek, 1); $filek_r = $filek.' kb'; $photosize = $filek_r; $timestamp = date('Y-m-d--').date('H-i-s'); $v9 = $timestamp; $nameoffile = basename($_FILES['userfile']['name']); $nameoffile = safepants($nameoffile); $nameoffile = idclean($nameoffile); $nameoffile = strtolower($nameoffile); if (!preg_match('/(\.jpg|\.jpeg|\.jpe)/ism',$nameoffile)){ echo 'File does not seem to be of the correct type, use the back button and try another file.
If you need to reduce your image size, you can use a free service like pixlr'; exit; } $extension = substr($nameoffile, strrpos($nameoffile,'.'), strlen($nameoffile)); $rawname = str_replace($extension,'',$nameoffile); $nameoffile = $id.$extension; $newname = $nameoffile; $uploaddir = './'; $uploadfile = $uploaddir . $newname; $target_path = './publicuploads54/' . $newname; $photo = $newname; //chmod($target_path, 0640); $domain = 'baltophoto.org'; $filepath = $_SERVER['SCRIPT_NAME']; $lastslash = strrpos($filepath,"/"); $path = substr($filepath, 0, $lastslash); $dirurl = "http://".$domain . $path."/"; if(basename($_FILES['userfile']['name'])!="") { // this draws the photo in if they uploaded one $displayphoto = $dirurl.$photo; $v8 = $dirurl.'uploads/'.$newname; $photourl = $dirurl.'uploads/'.$newname; $displaycode = ''.$photoalt.''; $formfill = '


'; } move_uploaded_file($_FILES['userfile']['tmp_name'], $target_path); chmod($target_path, 0644); list($width, $height, $type, $attr) = getimagesize($target_path); if ($width>4500 || $height>4500 ){ unlink($target_path); exit('Error: Photo can not exceed 4000 pixels in either dimension and must be under 2MB. Use the back button to select a new file.
If you need to reduce your image size, you can use a free service like pixlr'); } $thumbnailurl = str_replace('uploads/','thumbnails/',$photourl); function jclean ($_){ $_ = stripslashes($_); $_ = trim($_); return $_; } $slvrpay = array( 'description' => jclean($description), 'tags' => jclean($tags), 'photographername' => jclean($photographername), 'photographerurl' => jclean($photographerurl), 'photographername' => jclean($photographername), 'photographeremail' => jclean($photographeremail), 'photourl' => jclean($photourl), 'photosize' => jclean($photosize), 'origname' => jclean($origname), 'id' => jclean($id), 'timestamp' => jclean($timestamp), 'thumbnailurl' => jclean($thumbnailurl), 'caption' => jclean($caption) ); $dataset = json_encode($slvrpay); $dataset = str_replace('"','"',$dataset); file_put_contents('publicuploads54/'.$id.'.json', $dataset); // now we will generate/update the thumbnails //$_ = file_get_contents('http://baltophoto.org/thumbnails/make.php'); //$hello = file_get_contents('http://baltophoto.org/400/make.php'); //header('Location: ./'.$id); $cmessage = "Thanks! Your file will be reviewed and added to the collection when approved!"; } ?> Free Baltimore Photographs

Baltimore Photographs

Photo Upload

View available photos

Photo to upload:
MB LIMIT ( KB)
Required
Filetype must be jpeg (.jpg), Not greater than 4000 pixels in either dimension, and under 4 MB.
If you need to reduce your image size, you can use a free service like pixlr
description:
tags:
Optional
photographername:
Optional
photographeremail:
Optional
photographerurl:
Optional
Caption or additional notes:
Optional

By using this service you understand that these images are made available to the general public for limited free use and that you waive royalty fees for that use

Powered by formsaber.com