autoloader('Amazon'); $stuff->autoloader('CF'); $stuff->autoloader('lib'); $stuff->autoloader('RequestCore'); //AWS access info if (!defined('awsAccessKey')) define('awsAccessKey', 'AKIAIGXAAGLHAPXJGX2A'); if (!defined('awsSecretKey')) define('awsSecretKey', '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'); //instantiate the class $s3 = new AmazonS3(); //error_reporting(E_ALL); //ini_set('display_errors', '1'); include("db.php"); include("meta.php"); include("header.php"); include('thumbnailer/WideImage.php'); if($_REQUEST["did"] <> ""){ echo 'deleting'; unlink('pix/small/'.$_REQUEST["picname"]); unlink('pix/large/'.$_REQUEST["picname"]); unlink('pix/original/'.$_REQUEST["picname"]); $stmt = $pdodb->prepare("DELETE FROM pix WHERE ID=:did "); $stmt->bindParam(':did',$_REQUEST["did"]); $stmt->execute(); $stmt = $pdodb->prepare("SELECT ID,picis FROM pix WHERE approved=1 AND mid=:sessid LIMIT 1"); $stmt->bindParam(':sessid',$_SESSION["uid"]); $stmt->execute(); while($i3=$stmt->fetch()) { $npic = $i3["picis"]; } $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET mainpic=:mainpic WHERE ID=:sessid "); $stmt->bindParam(':sessid',$_SESSION["uid"]); $stmt->bindParam(':mainpic',$npic); $stmt->execute(); } if($_REQUEST["uplicense"] <> ""){ echo 'updating licencing price'; $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY pix SET price=:price WHERE ID=:picid AND mid=:mid"); $stmt->bindParam(':picid',$_REQUEST["uplicense"]); $stmt->bindParam(':mid',$_SESSION["uid"]); $stmt->bindParam(':price',$_REQUEST["price"]); $stmt->execute(); } if($_REQUEST["setmain"] <> ""){ $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET mainpic=:mainpic WHERE ID=:sessid "); $stmt->bindParam(':sessid',$_SESSION["uid"]); $stmt->bindParam(':mainpic',$_REQUEST["setmain"]); $stmt->execute(); #echo 'main photo now set'; } if(strstr(strtolower($_FILES['uploadfile']['name']),".jpg") || strstr(strtolower($_FILES['uploadfile']['name']),".jpeg") || strstr(strtolower($_FILES['uploadfile']['name']),".gif") || strstr(strtolower($_FILES['uploadfile']['name']),".png")){ $dinfo .= $_FILES['uploadfile']['name']; $stmt2 = $pdodb->prepare("INSERT INTO uploaddebug(mid,dinfo) VALUES(:mid,:dinfo) "); $stmt2->bindParam(':dinfo', $dinfo); $stmt2->bindParam(':mid', $_SESSION["uid"]); $stmt2->execute(); #$keywords = preg_replace("/[^A-Za-z0-9 ]/","",trim($_REQUEST["keywords"])); #$keywords = str_replace(" ","-",$keywords); $save_filename = $_SESSION["uid"].'_'.date('Ymdhis').".jpg"; $uploaddir = $_SERVER["DOCUMENT_ROOT"].'/data/tmpfolder/'; $uploadfiledir = $uploaddir . $save_filename; #echo "almost up"; if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfiledir)) { #echo $uploadfiledir; image_fix_orientation($uploadfiledir); $name = $_FILES["uploadfile"]["name"]; $ext = strtolower(end((explode(".", $name)))); # extra () to prevent notice if($ext == "jpg" || $ext == "jpeg"){ $cam = cameraUsed($uploadfiledir); #print_r($cam); } $le = getImageXMP($uploadfiledir); #print_r($le); if($cam["make"] <> ""){ $make = $cam["make"]; }else{ $make = ""; } if($cam["model"] <> ""){ $model = $cam["model"]; }else{ $model = ""; } if($cam["aperture"] <> ""){ $aperture = $cam["aperture"]; }else{ $aperture = ""; } if($cam["exposure"] <> ""){ $exposure = $cam["exposure"]; }else{ $exposure = ""; } if($cam["iso"] <> ""){ $iso = $cam["iso"]; }else{ $iso = ""; } if($cam["iso"] <> ""){ $iso = $cam["iso"]; }else{ $iso = ""; } if($cam["FocalLength"] <> ""){ $FocalLength = $cam["FocalLength"]; }else{ $FocalLength = ""; } if($cam["Flash"] <> ""){ $Flash = $cam["Flash"]; }else{ $Flash = ""; } if($cam["Software"] <> ""){ $Software =$cam["Software"]; }else{ $Software = ""; } if($cam["LensInfo"] <> ""){ $LensInfo =$cam["LensInfo"]; }else{ $LensInfo = ""; } if($LensInfo == ""){ if($cam["LensModel"] <> ""){ $LensInfo =$cam["LensModel"]; }else{ $LensInfo = ""; } } if($LensInfo == ""){ if($le["lens"] <> ""){ $LensInfo = $le["lens"]; }else{ $LensInfo = ""; } } if($cam["DateTimeOriginal"] <> ""){ $odate = convertExifToTimestamp($cam["DateTimeOriginal"],"Y-m-d H:i:s"); }else{ $odate = ""; } if($_REQUEST["shoplink"] <> ""){ $shoplink = $_REQUEST["shoplink"]; }else{ $shoplink = ""; } #echo "adding to amazon"; $cloud = addamazon($save_filename); if($cloud == 1){ #echo 'insert'; $stmt2 = $pdodb->prepare("INSERT INTO pix(picis,mid,whenadded,make,model,exposure,aperture,iso,odate, FocalLength,Flash,Software,LensInfo,shoplink) VALUES(:filesmall , :user_id,now(),:make,:model,:exposure,:aperture,:iso,:odate,:FocalLength,:Flash,:Software,:LensInfo,:shoplink) "); $stmt2->bindParam(':filesmall', $save_filename); $stmt2->bindParam(':make', $make); $stmt2->bindParam(':model', $model); $stmt2->bindParam(':aperture', $aperture); $stmt2->bindParam(':exposure', $exposure); $stmt2->bindParam(':iso', $iso); $stmt2->bindParam(':odate', $odate); $stmt2->bindParam(':FocalLength', $FocalLength); $stmt2->bindParam(':Flash', $Flash); $stmt2->bindParam(':Software', $Software); $stmt2->bindParam(':LensInfo', $LensInfo); $stmt2->bindParam(':shoplink', $shoplink); $stmt2->bindParam(':user_id',$_SESSION["uid"],PDO::PARAM_INT); $stmt2->execute(); $lastid = $pdodb->lastInsertId(); }else{ echo 'not insert'; } if($d_mainpic == ""){ $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET newphoto=1,mainpic=:mainpic WHERE ID=:did "); $stmt->bindParam(':did',$_SESSION["uid"]); $stmt->bindParam(':mainpic',$save_filename); $stmt->execute(); } $betreff = '***approve new photos PJOX***'; $message2 = ' http://www.pjox.com/'.$d_username.' http://www.pjox.com/c.php '; sendmail('',"daniel.eder@gmail.com", $betreff, $message2); /* if($_REQUEST["emailis"] <> ""){ $what="Your YoModel Contest Photo Link"; $notice='Congratulations. You just uploaded a photo to the YoModel contest. In case somebody else used your email addresses you can write to us by replying and we will block your email address from entering the contest in the future. To win the contest you need to send the following link to your friends: http://www.yomodel.com/contest/'.$lastid.''.$adq.' The Winner will be the model which ranks #1 on the deadline. Recommended: Like this Facebook page http://www.facebook.com/yomodel Follow us on Twitter http://www.twitter.com/yomodel you can write me anytime to danieltravolto or www.facebook.com/travolto www.yomodel.com/travolto if you have questions '; send_notification('',$what,$_REQUEST["emailis"],$notice); $stmt = $pdodb->prepare("SELECT ID FROM contestmailing2 WHERE emailis LIKE :emailis "); $stmt->execute(array(':emailis' => $_REQUEST["emailis"])); if($stmt->rowCount() == 0){ $stmt = $pdodb->prepare("INSERT INTO contestmailing2(emailis) VALUES(:emailis) "); $stmt->execute(array(':emailis' => $_REQUEST["emailis"])); } */ $message2 .= "success|".$thisdate; } else { //echo "error up"; $message2 .= "error"; } }elseif($_FILES['uploadfile']['name'] <> ""){ echo '

incorrect image format. only JPEG or GIF

'; } ?>
""){ ?>
prepare("SELECT ID FROM pix WHERE mid=:sessid"); $stmt->bindParam(':sessid',$_SESSION["uid"]); $stmt->execute(); $totalphotos = $stmt->rowCount(); if(strstr(strtolower($_FILES['uploadfile']['name']),".jpg") || strstr(strtolower($_FILES['uploadfile']['name']),".jpeg") || strstr(strtolower($_FILES['uploadfile']['name']),".gif") || strstr(strtolower($_FILES['uploadfile']['name']),".png")){ if($_SESSION["tphotos"] == $totalphotos){ $betreff = '*** ERROR PJOX UPLOAD *** '; $message2 = ' '.$_FILES['uploadfile']['name'].' '; sendmail('','info@budu.com', $betreff, $message2); } if ($totalphotos % 5 == 0 && $d_premium == 0) { $betreff = 'Support New Features on PJOX'; $message2 = ' Lots of new features are planned on http://www.pjox.com Support us by getting PRO Account & we will be adding all of these features: http://www.pjox.com/upgrade.php '; if(strstr($d_emailis,"@")){ sendmail('', $d_emailis, $betreff, $message2); } } } $_SESSION["tphotos"] = $totalphotos; echo 'Upload your Images for free
'; echo '
'.$totalphotos.' total photos uploaded
'; $stmt = $pdodb->prepare("SELECT ID,picis FROM pix WHERE mid=:sessid AND whenadded > DATE_ADD(NOW(), INTERVAL -6 HOUR)"); $stmt->bindParam(':sessid',$_SESSION["uid"]); $stmt->execute(); $lastsix = $stmt->rowCount(); echo $lastsix.' photo uploaded in last 6 hours
'; ?> Should you have technical problems with uploads feel free to contact us.
6 && $lastsix > 0 && $d_premium != 1){ echo '
Attention:
We need your help. To grow fast we need to earn money with PJOX. Please get a Pro Account to support us develop new features.
You can upload 1 photo every six hours now. to get 100% Unlimited photo uploads upgrade to Pro Account'; }else{ ?>
Select Photo:
Link your Photo to a website (optional): Get Pro to enable';}?>
>


Your last 6 uploads:
prepare("SELECT ID,picis FROM pix WHERE mid=:sessid ORDER BY ID desc LIMIT 6"); $stmt->bindParam(':sessid',$_SESSION["uid"]); $stmt->execute(); while($i3=$stmt->fetch()) { $mainpic2 = str_replace("s","",$mainpic2); echo '
'; echo '
'; } ?>