0) { $imageCount=1; } // memberLevelCA1 they can or cannot post more (classic limited to 1000, Silver 3000) // just turn Yes off the ADDING of displayed photos after 1000 pics $post = "Yes"; $sortByDisplay=$_POST["sortByDisplay"] ?? ''; $memberID=$_POST["memberID"] ?? 0; $start=$_POST["start"] ?? 0; $rowsPerPage=$_POST["rowsPerPage"] ?? 20; $pages=$_POST["pages"] ?? 1; //$courseCatID=$_POST["courseCatID"] ?? ''; // ']now loop through all the photos on the previous page; update db for ($xCount=1; $xCount <= $imageCount; $xCount++) { // get choices from prev page, for each photo $photoIDName = "photoID".$xCount.""; $photoID = $_POST[$photoIDName] ?? 0; //echo "

photoID =".$photoID; // make the unchecked non-favorites or make the checked favorites $catFreeName = "catFree".$xCount.""; $catFree = $_POST[$catFreeName] ?? 'No'; $notifyMemberName = "notifyMember".$xCount.""; $notifyMember = $_POST[$notifyMemberName] ?? ''; $photoTitleName = "photoTitle".$xCount.""; $photoTitle = $_POST[$photoTitleName] ?? ''; $photoTitle = str_replace('"','"', str_replace("'","'", $photoTitle)); $photoTitle = mysqli_real_escape_string($conn, $photoTitle); $photoDescriptionName = "photoDescription".$xCount.""; $photoDescription = str_replace('"','"', str_replace("'","'", $photoDescription)); $photoDescription = $_POST[$photoDescriptionName] ?? ''; $photoDescription = mysqli_real_escape_string($conn, $photoDescription); $courseCatIDName = "courseCatID".$xCount.""; $courseCatID = $_POST[$courseCatIDName] ?? 0; // 'alert us if user is entering a link if(strpos(strtolower($photoDescription),"", "", str_replace("", "", str_replace("deleteName dn=".$deleteName; //echo "
delete d=".$delete; if ($delete == 'delete') { $isAcontestwinner = 0; //don't let members remove contest winners $qCheck="SELECT contestwinner FROM Photos WHERE photoID = " . $photoID; $dataF = mysqli_query($conn, $qCheck); while($ImageSet = mysqli_fetch_assoc($dataF)) { $contestwinner = $ImageSet['contestwinner']; if (left($contestwinner,1) == "0" || left($contestwinner,1) == "1" || left($contestwinner,1) == "2") { $isAcontestwinner = 1; } } //echo "
isAcontestwinner =".$isAcontestwinner; // do a check to see if this is a Editor's Pick $isEC = sp_ValidateEditorsChoicePhoto($conn, $photoID); // do a check to see if this is a POTD photo $isPOTD = sp_ValidatePotdPhoto($conn, $photoID); //echo "
isPOTD =".$isPOTD; // do not delete if a contest winner or POTD or EC if ($isAcontestwinner == 0 && $isPOTD == 0) { // deal with deletes $q="UPDATE Photos SET post = 'No' WHERE photoID = " . $photoID . " AND memberID = " .$memberID; //echo "

dleteCheck sql=".$q; $data = mysqli_query($conn, $q); // remove from deluxe sites in case this is a deluxe owner's photo $qd="DELETE DeluxePhotoCatsCross WHERE photoID = " . $photoID; //echo "

delete1 sql=".$qd; $data = mysqli_query($conn, $qd); // remove from photocats cross $qdd="DELETE PhotoCatsCross WHERE photoID = " . $photoID; //echo "

delete2 sql=".$qdd; $data = mysqli_query($conn, $qdd); } } else { /* $photoDescription=str_replace(str_replace(str_replace(str_replace(str_replace(str_replace(str_replace($photoDescription," i "," I "),"& ","& "),'',"

"),'',"
"),"|",""),"'","'"),"""","""); $location=str_replace(str_replace(str_replace(str_replace(str_replace(str_replace(str_replace($location," i "," I "),"& ","& "),'',"

"),'',"
"),"|",""),"'","'"),"""","""); */ $soundsLike = ''; if (!empty($photoTitle)) { $soundsLike .= metaphone($photoTitle) . ' '; } if (!empty($photoDescription)) { // strip out html and other crap $photoDescriptionStripped = strip_tags($photoDescription); $soundsLike .= metaphone($photoDescriptionStripped) . ' '; } // 'set to display or not $cmdSetInMG = "UPDATE Photos SET favorite = '" . $catFree . "', post = 'Yes', photoTitle = '" . $photoTitle . "', photoDescription = '" . $photoDescription . "', soundsLike = '" . trim($soundsLike) . "', notifyMember = '" . $notifyMember . "', location = '" . $location . "' WHERE photoID = " . $photoID . " AND memberID = " . $memberID; //echo "

xyz=".$xCount." and sql=".$cmdSetInMG; // removed , aperture = '" . $aperture . "', shutterspeed = '" . $shutterspeed . "', iso = '" . $iso . "' $stmt = $conn->query($cmdSetInMG); if($photoID > 0 && !empty($courseCatID)){ $cmdSetInCategory = "INSERT INTO PhotoCatsCross (photoID, catID) VALUES (" . $photoID . ", " . $courseCatID . ")"; $stmt = $conn->query($cmdSetInCategory); // notify $toAddress = "jim@productiveandhappy.com"; $subject = "Uploaded Photo has been added to cID=".$courseCatID; $str = "It appears a previously uploaded PHOTO has being added and is ready for your critique."; $addheaders = 'From: BetterPhoto ';// . "\r\n" . 'Bcc: Jim.Miotke@gmail.com' $sendmail = mail($toAddress, $subject, $str, $addheaders, "-fBPsupport@BetterPhoto.fun"); // ++++ will this error check work? if($sendmail === 0){ echo "Mail send failure. Please email bpsupport@betterphoto.com to report the problem. Thanks!"; } } // if in a photo course } // if not a delete } $URL = "a_14Photos.php?s=" . $start . "&p=" . $pages . "&rowsPerPage=" . $rowsPerPage . "&z=".$sortByDisplay."&x=".$courseCatID."&success=1&xyz=".$cmdSetInMG; // must reload to get new changes... header("Location: " . $URL); } // from here down... not submitting form, front page shows here $currentBPdate = date('Y-m-d: H:i') . ' ' . "Pacific"; // date_default_timezone_get() $success = $_GET["success"] ?? 0; $cmdSetInMG = $_GET["success"] ?? '' ; $sortByDisplay = $_GET["f"] ?? 0; // if 1, show fav photos first $size4Display = $_GET["size4Display"] ?? ''; $rowsPerPage = (isset($_GET['rowsPerPage']) ? $_GET['rowsPerPage'] : 20); $conditionsFav = ''; $conditions = ''; // Show displayed photos first if ($sortByDisplay == 1) { $conditions = "WHERE memberID = ".$memAuth." AND post IN ('PVT','Yes') ORDER BY favorite DESC, photoID DESC"; } else { $conditions = "WHERE memberID = ".$memAuth." AND post IN ('PVT','Yes') ORDER BY photoID DESC"; } // for just getting count of displayed photos $conditionsFav = "WHERE memberID = ".$memAuth." AND favorite = 'Yes' AND post IN ('PVT','Yes') ORDER BY favorite DESC, photoID DESC"; $qCt = "SELECT COUNT(photoID) FROM Photos " . $conditions; $r = mysqli_query($conn, $qCt) or die("SQL Error: " . mysqli_error($conn)); $tCount = ($r) ? mysqli_num_rows($r) : 0; if (isset($_GET['p']) && is_numeric($_GET['p'])) { // if # of pages is already here, passed in via query $pages = $_GET['p']; } else { // get count of all this user's photos // Calc # of pages if ($tCount > $rowsPerPage) { // more than 1 page $pages = ceil ($tCount/$rowsPerPage); } else { $pages = 1; } } if (isset($_GET['s']) && is_numeric($_GET['s'])) { // we have a start page $start = $_GET['s']; } else { $start = 0; } // get count of displayed photos (set to Fav = Yes) $qF = "SELECT COUNT(photoID) FROM Photos " . $conditionsFav; $rF = mysqli_query($conn, $qF) or die("SQL Error: " . mysqli_error($conn)); $displayCount = ($rF) ? mysqli_num_rows($rF) : 0; // get all photos , courseCritiqueThreadID, courseCritiqueInputID, $q = "SELECT photoID, photoName, photoTitle, photoDescription, directory, threadID, inputID, discussThreadID, contestWinner, favorite, notifyMember, location, ExifData, DATE_FORMAT(dateCreated, '%Y-%m-%d %H:%i:%s') AS dateCreated FROM Photos $conditions LIMIT ?, ? "; //$q = "SELECT photoID, photoName, photoTitle, photoDescription, directory, threadID, inputID, discussThreadID, contestWinner, favorite, notifyMember, aperture, shutterspeed, iso, location FROM Photos $conditions LIMIT ".$start.", ".$rowsPerPage." "; //echo "

sql=".$q; //echo "

start=".$start; //echo "

rowsPerPage=".$rowsPerPage; /* $result=mysqli_query($conn,$q); REMOVED , aperture, shutterspeed, iso */ $stmt = $conn->prepare($q); $stmt->bind_param('ii', $start, $rowsPerPage); $stmt->execute(); $resultPics = $stmt->get_result(); // this function also in 01openers of alternate uploader // Use this EXIF function BEFORE resizing as GD and others strip EXIF data // This function is used to determine the camera details for a specific image. It returns an array with the parameters. function getExifDetails($imagePath) { // Check if the variable is set and if the file itself exists before continuing if (isset($imagePath) && file_exists($imagePath)) { // There are 2 arrays which contains the information we are after, so it's easier to state them both $exif_ifd0 = @read_exif_data($imagePath ,'IFD0' ,0); $exif_exif = @read_exif_data($imagePath ,'EXIF' ,0); //error control $notFound = ""; // Make if (@array_key_exists('Make', $exif_ifd0)) { $camMake = $exif_ifd0['Make']; } else { $camMake = $notFound; } // Model if (@array_key_exists('Model', $exif_ifd0)) { $camModel = $exif_ifd0['Model']; } else { $camModel = $notFound; } // Exposure if (@array_key_exists('ExposureTime', $exif_ifd0)) { $camExposure = $exif_ifd0['ExposureTime']; } else { $camExposure = $notFound; } // Aperture if (@array_key_exists('ApertureFNumber', $exif_ifd0['COMPUTED'])) { $camAperture = $exif_ifd0['COMPUTED']['ApertureFNumber']; } else { $camAperture = $notFound; } // Date if (@array_key_exists('DateTime', $exif_ifd0)) { $camDate = $exif_ifd0['DateTime']; } else { $camDate = $notFound; } // ISO if (@array_key_exists('ISOSpeedRatings',$exif_exif)) { $camIso = $exif_exif['ISOSpeedRatings']; } else { $camIso = $notFound; } // get orientation for potential iPhone rotation issue if (@array_key_exists('Orientation',$exif_exif)) { $orientation = $exif_exif['Orientation']; } else { $orientation = $notFound; } $return = array(); $return['make'] = $camMake; $return['model'] = $camModel; $return['exposure'] = $camExposure; $return['aperture'] = $camAperture; $return['date'] = $camDate; $return['iso'] = $camIso; $return['orientation'] = $orientation; return $return; } else { return false; } } // end function } // end first membAuth check ?>

if ($tCount > 0){ ?>

Manage/Enter    

You currently have photos displayed out of to choose from.

Success! Your photo(s) have been updated! "; } // posting limits ?> if($memberLevelCA1 < 2 && $displayCount >= 1000 || $memberLevelCA1 < 4 && $displayCount >= 3000) { echo ""; } // show as true warning before deleting ?>
Warning: Deleting will remove your photo from EVERYWHERE on the BetterPhoto site including: Classic Gallery, contests, discussions, your Deluxe or Pro Website, etc. Do with great care.

View larger"; } else { echo "smaller"; } ?> photos.

9) { $pageRangePrefix = left($pageID,(strlen(strval($pageID))-1)); } else { // page 1-9 $pageRangePrefix = 0; } // skipToPageNumber is what is displayed in the long list of numbers // for first iteration of skipToPageNumber, used when it it 10 or above (20, 30...) $skipToPageNumber = strval($pageRangePrefix) . "0"; // finalSkipToPage is shown before Prev and Next links $finalSkipToPage = ($tCount / $rowsPerPage); //i.e 55.9666 or 3 if (is_numeric($finalSkipToPage)) { if ($tCount % $rowsPerPage != 0) { //i.e. 55.966 make it 55.966 + 1 = 56 $finalSkipToPage = $finalSkipToPage + 1; } $finalSkipToPage = Round($finalSkipToPage) - 1; //make 56.966 = 56 ; make 3 = 3 } // where SKIP TO NEWEST STUFF WAS ?>

Current time:

= '" . $date8weeksAgo . "' AND cmc.memberID = " . $memAuth; //echo "

".$q; $stmt = $conn->prepare($q); $stmt->execute(); $resultsC = $stmt->get_result(); while($CatSet1 = mysqli_fetch_assoc($resultsC)) { $courseID = $CatSet1['courseID']; } $x = 1; //mysqli_data_seek($resultPics,0); while ($row=mysqli_fetch_array($resultPics)) { $exifData = ''; $photoDescriptionAlert = 0; $photoID = $row['photoID']; $photoName = $row['photoName']; $photoTitle = $row['photoTitle']; $photoDescription = $row['photoDescription']; $directory = $row['directory']; $threadID = $row['threadID']; $inputID = $row['inputID']; $discussThreadID = $row['discussThreadID']; $contestWinner = $row['contestWinner']; $favorite = $row['favorite']; //' to display in gallery $notifyMember = $row['notifyMember']; $aperture = $row['aperture']; if (strpos($aperture,"Unava") !== false) { $aperture = str_replace("Unava", "", $aperture); } $shutterspeed = $row['shutterspeed']; if (strpos($shutterspeed,"Unavailabl") !== false) { $shutterspeed = str_replace("Unavailabl", "", $shutterspeed); } $iso = $row['iso']; if (strpos($iso,"Unavailabl") !== false) { $iso = str_replace("Unavailabl", "", $iso); } $location = $row['location']; $exifData = $row['ExifData']; if (strpos($exifData,"Unavailable") !== false) { $exifData = str_replace("Unavailable;", "", str_replace("Unavailable Unavailable;", "", $exifData)); } $dateCreated = $row['dateCreated']; if (strpos(strtolower($photoDescription)," 0) { $photoDescriptionAlert = 1; } // do a check to see if this is a Editor's Pick $isEC = sp_ValidateEditorsChoicePhoto($conn, $photoID); // do a check to see if this is a POTD photo $isPOTD = sp_ValidatePotdPhoto($conn, $photoID); // do a check to see if this is a GEM photo $isGOTD = sp_ValidateGemPhoto($conn, $photoID); $exifText2 = ""; $imagePath = SITE_ROOT . "/public_html/uploads/processed/" . $directory . "/" . $photoName . "_src.jpg"; // or non src if it's ther //echo "

imagePath=".$imagePath; $exif2 = getExifDetails($imagePath); if ($exif2===false) { $exifText2 .= "No EXIF."; } else { $exifText2 .= "Camera: " . $exif2['make'] . " " . $exif2['model'] . "; "; $exifText2 .= "Shutter Speed: " . $exif2['exposure'] . "; "; $exifText2 .= "Aperture: " . $exif2['aperture'] . "; "; $exifText2 .= "ISO: " . $exif2['iso'] . "; "; // $exifText2 .= "Orientation: " . $exif2['orientation'] . "; "; $exifText2 .= "Date: " . $exif2['date'] . " "; //$orientation = $exif2['orientation']; if (empty($aperture)) { $aperture = $exif2['aperture']; } if (empty($shutterspeed)) { $shutterspeed = $exif2['exposure']; } if (empty($iso)) { $iso = $exif2['iso']; } } $exifText2 = left($exifText2,500); //$imageNumberThisPage = ((($pageID - 1) * 50) + $x); ?>

 
.   ".$photoTitle.""; echo "
PhotoID: ".$photoID . "
Date Uploaded: ".$dateCreated; ?>
Rotate
"; if (!empty($exifData)) { echo "ExifData=" . $exifData . "
"; // if not in db, get exif from file if possible } elseif (!empty($exifText2) && $exifText2 != 'No EXIF.') { echo "Exif=" . $exifText2 . "
"; } // fit exif into aperture ect fields $countOfPhotosTheyCanStillEnterToday = checkIfAlreadyEnteredToday($conn, $memAuth, $memberLevelCA1); // if already won gold, don't show reentry button $contestMark = right($contestWinner, 1); if ( empty($contestMark) || $isEC==1 || $contestMark == "F" || $contestMark == "S") { if ($countOfPhotosTheyCanStillEnterToday > 0) { ?> [Contest limit reached]"; } } $lastWeek = date("Y-m-d", strtotime("-7 days")); if ($dateCreated > $lastWeek) { //echo "

Share in Mini-Assignment"; } // where OLD courseCatID STUFF WAS $courseCatID = ''; // still using sessionID? NO /* $cmdGetCurrentSession = "SELECT MAX(sessionID) FROM CourseSessions WHERE post ='Yes'"; $stmt = $conn->query($cmdGetCurrentSession); while ($rsCurrentSession = $stmt->fetch_array()) { $currentSession = $rsCurrentSession['sessionID']; } // check to see if they are in a class $cmdGetCrsInfo = "SELECT c.photoCatID, cmc.hasFirst, c.vaultCatID FROM CoursesMemberCross cmc JOIN Courses c ON c.courseID = cmc.courseID WHERE cmc.memberID = ".$memAuth." AND c.sessionID = ".$currentSession." order by c.courseID DESC LIMIT 1"; $stmt = $conn->query($cmdGetCrsInfo); while ($crsInfo = $stmt->fetch_array()) { $courseCatID = $crsInfo['photoCatID']; $hasFirst =$crsInfo['hasFirst']; $firstCatID =$crsInfo['vaultCatID']; } */ if (!empty($courseID)) { ?>
Add to Your Course Gallery:


BetterPhoto.com All Time Best Photo Contest Editor's Pick
BetterPhoto.com All Time Best Photo Contest Staff Favorite
BetterPhoto.com All Time Best Photo Contest Finalist
BetterPhoto.com All Time Best Photo Contest Winner
BetterPhoto.com Photo Contest GRAND PRIZE Winner BetterPhoto.com Photo Contest FIRST PLACE WinnerBetterPhoto.com Photo Contest SECOND PLACE Winner BetterPhoto.com Photo Contest Finalist BetterPhoto.com Staff Favorite
BetterPhoto.com Editor's Pick BetterPhoto.com Photo of the Day BetterPhoto Photography Contest Gem of the Day "0" && $discussThreadID != "1736976") { echo '
Discussion
 '; } if ($threadID > "0") { echo 'Old Q&A
'; } elseif ($inputID > "0") { echo 'Old Q&A
'; } ?>

>    Display

>    Notify Me
Title:

Description:
Error: Links are not allowed in the description (per our Terms and Conditions). To have your description display below your photo, please remove any links in the text below.

Location:  
Copy and paste this code into a forum post:

Copy/paste this into the 'Insert Image > By URL' above Forum post:
 
Delete
 
 

Current server time:

You Have No Photos to Manage

To upload pictures, make sure you're logged in. Then click the My Photos > Upload Photos link in your Profile (via the three lines in the upper left corner of each page).

Not Signed In

It appears you are not logged in. It may be that your session timed out due to inactivity. Log in using the button above and try again.