prepare($FindCats); $stmt->execute(); $subcatphotos = mysqli_fetch_assoc($stmt->get_result()); if($subcatphotos){ $photoID = $subcatphotos['photoID']; $photoTitle = $subcatphotos['photoTitle']; $photoDescription = $subcatphotos['photoDescription']; $photoDescription = str_replace(" i "," I ",str_replace("& ","and ",str_replace("\n","",str_replace("\r","",str_replace("\r\n","",str_replace("\r\n\r\n","",str_replace("'","'",str_replace("|","",$photoDescription)))))))); if (!empty($photoTitle)) { $seoTitle = "Inspiring Photo: " . $photoTitle . " #" . $photoID; $seoMetaDescription = $photoTitle . " "; } else { $seoTitle = "Inspiring Photo at BetterPhoto: Untitled Photograph #" . $photoID; } if (strlen($seoTitle) > 65) { $seoTitle = left($seoTitle,62) . "..."; } if (!empty($photoDescription)) { $seoMetaDescription .= "- Photographer's Description: " . $photoDescription; } else { $seoMetaDescription .= "- See this inspiring, creative photo curated by the editors at BetterPhoto. Photo #" . $photoID; } } } else { header("Location: /gallery.php"); exit(); } } require '/var/www/html/betterphoto.fun/public_html/_mailerThatWorks.php'; require '../incHeadWithoutRequired.php'; // we use for nextPhoto button $justPhotoID=0; $mem4show = $_GET['mem4show'] ?? ''; // if they want to see photos in their fav categories $mem4gall = $_GET['mem4gall'] ?? ''; // if they only want to see their own photos $mem4Wins = $_GET['mem4Wins'] ?? ''; $contestCatID = $_GET['contestCatID'] ?? ''; $camID = $_GET['camID'] ?? ''; $catID = $_GET['catID'] ?? ''; if (empty($catID)) { $catID = $_GET['galleryID'] ?? ''; } $FavMemID = $_GET['FavMemID'] ?? ''; $Favpt = $_GET['Favpt'] ?? ''; $sortBye = $_GET['sortBye'] ?? ''; $cn = $_GET['cn'] ?? ''; $courseID = $_GET['courseID'] ?? ''; if (!empty($courseID)) { // do a double check on courseID $q="SELECT courseID FROM CoursesMemberCross WHERE memberID = " . $memAuth . " AND courseID = " . $courseID; $datacchk = mysqli_query($conn, $q); $tCountcchk=mysqli_num_rows($datacchk); if ($tCountcchk == 0) { // not a real course student $courseID = ''; } } $critiquePrefGrow1 = $_GET['critiquePrefGrow1'] ?? ''; if (empty($critiquePrefGrow1)) { // do a double check on critiquePref $q="SELECT critiquePrefGrow FROM Members WHERE memberID = " . $memAuth; $datacchkCQ = mysqli_query($conn, $q); $tCountcchkCQ=mysqli_num_rows($datacchkCQ); if ($tCountcchkCQ == 1) { // wants it straight $critiquePrefGrow1 = 'GROW'; } else { $critiquePrefGrow1 = 'LOVE'; } } // for going back to right page in category when they go back $start = $_GET['s'] ?? ''; // for finding prev and next $rowNumber = $_GET['rowNumber'] ?? ''; $rowsPerPage = $_GET['rowsPerPage'] ?? ''; //?? $memberGall = $_GET['memberGall'] ?? ''; if ($mem4gall == "" && $mem4Wins == "" && $mem4show == "" && $contestCatID == "" && $camID == "" && ($catID == "" || $catID == "FAV") && $Favpt == "" && $sortBye == "") { $justPhotoID=1; } //now that we've passed the JustOnePhoto gate, reset some things if ($sortBye == "") { $sortBye="New"; } //$sortBye=strtoupper($sortBye); WHY WAS THIS HERE // for prev and next photo buttons if ($sortBye == "Love") { // works only when photoScore is in the first part of the SQL SELECT $sqlOrderBy = "n.photoScore"; //} elseif $sortBye == "NEWPIX" && $mem4gall = "0") { same as above but NOT personal // NEWEST UPLOADS } elseif ($sortBye == "New") { $sqlOrderBy = "p.dateCreated";// same as by photoID // default to MOST RECENTLY CATEGORIZED } else { // sorting by new categorized, SAME AS $sortBye == "New" ??? // works only when photoScore is in the first part of the SQL SELECT $sqlOrderBy = "pcc.dateCreated"; } if ($mem4gall == "") { $mem4gall="0"; } if (!empty($catID) && is_numeric($catID) == false) { header("Location: /galleryTOCDynoSub.php?cat=541"); exit(); } $originURL=$_SERVER['SCRIPT_NAME']."?".$_SERVER['QUERY_STRING']; if (strpos($originURL,"/photocourses/") > 0) { $photoCatID=str_replace("https://www.BetterPhoto.com/photocourses/","",strtolower($originURL)); if (_instr(0,$photoCatID,"/",0) > 0) { $photoCatID=substr($photoCatID,0,(_instr(0,$photoCatID,"/",0)-1)); } /* if (is_numeric($photoCatID) == true) { header("Location: /photocourses/".$photoCatID."/gallDetail.php?photoID=".$photoID); exit(); } */ } // FUNCTIONS function sb_MemberFavoritePhotographer($conn, $memberID, $favPhotographerID) { // sp_CheckExistenceOfMemberFavPhotographerByMemberID member likes favPhotog $q="SELECT favID FROM PhotographerFavorites WHERE favPhotographerID = " . $favPhotographerID . " AND memberID = " . $memberID; $data = mysqli_query($conn, $q); $tCount=mysqli_num_rows($data); if ($tCount == 0) { // not a favorite photographer yet, show add link echo "
Follow this photographer  "; echo "Follow this photographer"; } else { // already a favorite, show remove link while($ImageSet = mysqli_fetch_assoc($data)) { $favID = $ImageSet['favID']; } echo "
Stop following this photographer  "; echo "Stop followin'"; } } function sb_link2SendPrivateMemberMessage($memberID) { echo "
Send message to member "; echo "Send a Message"; } ?> prepare($query); $stmt->bind_param("i", $memberID); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows > 0) { // Member is whitelisted, adjust the baseline score $baseline_score = 0.1; // or any value you deem appropriate for bypassing reCAPTCHA } else { // Proceed with the regular reCAPTCHA validation if ($recaptcha->score < 0.5 && $memberID <= 540331) { // The score is lower but the member is a long-time user (low memberID), accept $baseline_score = 0.3; } } // Continue with the rest of your logic $stmt->close(); } // Take action based on the score returned: if ($recaptcha->score >= $baseline_score) { // successful recaptcha // check for errors if (empty($input)) { $errors[] = "No discussion input."; // input too long } elseif (strlen($input) > 3000) { $errors[] = "Discussion input too long."; } } else { // What happens when the CAPTCHA failed // notify $toAddress = "jim.miotke@gmail.com"; $toName = "BetterPhoto Owner"; $subject = "Photo Detail RecapthaFailed score=".$recaptcha->score ." baseline=".$baseline_score; $str = "A reCAPTCHA failure occurred.\n"; $str .= "Member ID: " . $memberID . "\n"; $str .= "User IP: " . $_SERVER['REMOTE_ADDR'] . "\n"; $str .= "Date and Time: " . date("Y-m-d H:i:s") . "\n"; $str .= "Score: " . $recaptcha->score . "\n"; $str .= "Baseline Score: ".$baseline_score; mailerThatRocks($toAddress, $subject, $str, $toName); $errors[] = "
 
The reCAPTCHA failed. Rest assured, Team BetterPhoto has been notified. Error code: " . $baseline_score . " This sometimes happens when you're on the page for more than 2 minutes before posting. Other times, it has to do with privacy settings on your browser. One solution: next time, write your comment somewhere else (such as the URL field above), select & copy what you write, paste your comment into the discussion, and click 'Send' button. Then, if it fails, you can go back and try to paste it in again. Thanks for your patience. "; } } elseif (empty($courseID)) { // no posted recaptcha $errors[] = "No reCAPTCHA posted."; } if (empty($errors)) { //echo "

TEST"; // clean out the weird characters use html entities or similar??? $memberID = mysqli_real_escape_string($conn, $memberID); $threadID = mysqli_real_escape_string($conn, $threadID); $topic = mysqli_real_escape_string($conn, $topic); $input = mysqli_real_escape_string($conn, $input); $notifyMemberInTheFuture = mysqli_real_escape_string($conn, $notifyMemberInTheFuture); $photoID = mysqli_real_escape_string($conn, $photoID); if (strpos(strtolower($topic),"betterphoto.") === FALSE) { $topic = str_replace("http", "", str_replace("https", "", str_replace(">", "", str_replace("", "", str_replace("','>',str_replace('""','',str_replace(",","'",$topic))) Replace(Replace(Replace(""),vbCrLf,"
"),"|",""),"'","'")s input = Replace(Replace(input,"",""),"","") input = Replace(Replace(input,"http://lsqrd.blogspot.com/",""),"blogspot","") input = Replace(Replace(input,"",""),"
","") */ if (empty($courseID)) { // a regular discussion if ($inputType == "additionalComment") { // insert discussion response // sp_InsertDiscussionResponse memberID // The Judges 121519 $q="INSERT INTO DiscussionResponses (memberID, inputMemo, identityInfo, threadID, notifyMember) VALUES (" . $memberID . ", '" . $input . "', '" . $identityInfo . "', " . $threadID . ", '" . $notifyMemberInTheFuture . "')"; $dataI = mysqli_query($conn, $q); } else { // insert discussion $q="INSERT INTO Discussions (memberID, topic, inputMemo, identityInfo, hasPhotos, notifyMember, dateModified) VALUES (" . $memberID . ", '" . $topic . "', '" . $input . "', '" . $identityInfo . "', 'Yes', '" . $notifyMemberInTheFuture . "', '" . date('Y-m-d H:i:s') . "')"; $dataI = mysqli_query($conn, $q); } // Now get the threadID or inputID for the item just inserted, used to stamp photos if ($inputType == "additionalComment") { $SQLTHREADID="SELECT threadID FROM DiscussionResponses ORDER BY inputID DESC LIMIT 1"; } else { $SQLTHREADID="SELECT MAX(threadID) AS threadID FROM Discussions"; } if ($dataD = mysqli_query($conn, $SQLTHREADID)) { while($tid = mysqli_fetch_assoc($dataD)) { $newThreadInputID = $tid['threadID']; } } // if this photo is getting a 1st comment, stamp photo with threadID and put this discussion into NEW DISCS cat if (!empty($photoID) && $inputType == "comment") { $SQLUPDATEPHOTO ="UPDATE Photos SET discussThreadID = " . $newThreadInputID . " WHERE photoID = " . $photoID; $dataU = mysqli_query($conn, $SQLUPDATEPHOTO); $q1="INSERT INTO DiscCatsCross (catID, threadID) VALUES (100, " . $newThreadInputID . ")"; $dataInA = mysqli_query($conn, $q1); } // if an answer was inserted, stamp discuss thread with current date for dateModified and put disc into NEW RESPONSES cat $prevdiscCat = ""; // it's a comment not a start of a new discussion if ($inputType == "additionalComment") { $SQLUPDATEQ="UPDATE Discussions SET dateModified = '" . date('Y-m-d H:i:s') . "' WHERE threadID = " . $threadID; $dataU = mysqli_query($conn, $SQLUPDATEQ); // check if this thread has been categorized $q="SELECT catID FROM DiscCatsCross WHERE threadID = " . $threadID . ""; // if there is one, this thread has a cat so update it $dataU2 = mysqli_query($conn, $q); $tCountInCat = mysqli_num_rows($dataU2); // it has already been catted if ($tCountInCat > 0){ while($cid = mysqli_fetch_assoc($dataU2)) { $prevdiscCat = $cid['catID']; } // if it's previous cat is NEW DISC, make it NEW RESPONSE now if ($prevdiscCat == 100) { $q8="UPDATE DiscCatsCross SET catID=101 WHERE (threadID=" . $threadID . " AND catID=100)"; $dataIn8 = mysqli_query($conn, $q8); } elseif ($prevdiscCat == 101) { // $q9="UPDATE DiscCatsCross SET catID=101 WHERE (threadID=" . $threadID . " AND catID=101)"; // $dataIn8 = mysqli_query($conn, $q9); // it's already in 101 so maybe put it to a AdminCat Queue $q1="INSERT INTO DiscCatsCross (catID, threadID) VALUES (112, " . $threadID . ")"; $dataInA = mysqli_query($conn, $q1); } } else { $q1="INSERT INTO DiscCatsCross (catID, threadID) VALUES (101, " . $threadID . ")"; $dataInA = mysqli_query($conn, $q1); } } /* 103 How Did U?; 104 Digital Tech 102 Friendly Praise 111 Before and After 113 Where 114 Constructive 105 Trad Tech; 110 Trouble 115 Suggestions 116 Thoughtful Analysis */ //this newestThread is used for discussion categories page, to show newest image // if it's a new thread, use new threadID to update 100 in DiscCats $discCat = 101; $threadID4picStamp = $threadID; if ($inputType == "comment") { $threadID4picStamp = $newThreadInputID; $discCat = 100; } // after it's gone through 100 then 101 ... it will be put into another cat // if it's already been categorized... get lowest cat with this threadID $SQLpicStamp="SELECT catID FROM DiscCatsCross WHERE threadID = " . $threadID4picStamp . " ORDER BY catID LIMIT 1"; //echo "

111

111

q2=" . $q; // if there is one, this thread has a cat so update newestThread if ($dataD = mysqli_query($conn, $SQLpicStamp)) { while($tid = mysqli_fetch_assoc($dataD)) { $discCat = $tid['catID']; } } $qC="UPDATE DiscCats SET newestThreadID = " . $threadID4picStamp . ", lastActivity = '" . date('Y-m-d H:i:s') . "' WHERE catID = " . $discCat; $dataUp2 = mysqli_query($conn, $qC); } else { // a course // put in course critiques here if ($inputType == "additionalComment") { // insert discussion response $q="INSERT INTO CourseCritiqueResponses (memberID, inputMemo, threadID, notifyMember) VALUES (" . $memberID . ", '" . $input . "', " . $threadID . ", '" . $notifyMemberInTheFuture . "')"; //echo "

TestoInA=".$q; $dataI = mysqli_query($conn, $q); } else { // insert discussion $q="INSERT INTO CourseCritiques (memberID, topic, inputMemo, hasPhotos, notifyMember, dateModified) VALUES (" . $memberID . ", '" . $topic . "', '" . $input . "', 'Yes', '" . $notifyMemberInTheFuture . "', '" . date('Y-m-d H:i:s') . "')"; //echo "

TestoInD=".$q; $dataI = mysqli_query($conn, $q); } // Now get the threadID or inputID for the item just inserted, used to stamp photos if ($inputType == "additionalComment") { $SQLTHREADID="SELECT threadID FROM CourseCritiqueResponses ORDER BY inputID DESC LIMIT 1"; } else { $SQLTHREADID="SELECT MAX(threadID) AS threadID FROM CourseCritiques"; } if ($dataD = mysqli_query($conn, $SQLTHREADID)) { while($tid = mysqli_fetch_assoc($dataD)) { $newThreadInputID = $tid['threadID']; } } // if this photo is getting a 1st comment, stamp photo with threadID and put this discussion into NEW DISCS cat if (!empty($photoID) && $inputType == "comment") { $SQLUPDATEPHOTO ="UPDATE Photos SET courseCritiqueThreadID = " . $newThreadInputID . " WHERE photoID = " . $photoID; $dataU = mysqli_query($conn, $SQLUPDATEPHOTO); $q1="INSERT INTO CourseCritiqueCatsCross (catID, threadID) VALUES (103, " . $newThreadInputID . ")"; //echo "

Testo1a=".$q1; $dataInA = mysqli_query($conn, $q1); } // if an answer was inserted, stamp discuss thread with current date for dateModified and put disc into NEW RESPONSES cat $prevdiscCat = ""; // it's a comment not a start of a new discussion if ($inputType == "additionalComment") { $q="UPDATE CourseCritiques SET dateModified = '" . date('Y-m-d H:i:s') . "' WHERE threadID = " . $threadID; //echo "

Testo=".$q; $dataU = mysqli_query($conn, $q); // check if this thread has been categorized $q="SELECT catID FROM CourseCritiqueCatsCross WHERE threadID = " . $threadID . ""; // if there is one, this thread has a cat so update it $dataU2 = mysqli_query($conn, $q); $tCountInCat = mysqli_num_rows($dataU2); // it has already been catted if ($tCountInCat > 0){ while($cid = mysqli_fetch_assoc($dataU2)) { $prevdiscCat = $cid['catID']; } // if it's previous cat is NEW DISC, make it NEW RESPONSE now if ($prevdiscCat == 103) { $q8="UPDATE CourseCritiqueCatsCross SET catID=104 WHERE (threadID=" . $threadID . " AND catID=103)"; //echo "

Testo8=".$q8; $dataIn8 = mysqli_query($conn, $q8); } elseif ($prevdiscCat == 104) { // it's already in 101 so maybe put it to a AdminCat Queue $q1="INSERT INTO CourseCritiqueCatsCross (catID, threadID) VALUES (112, " . $threadID . ")"; // $dataInA = mysqli_query($conn, $q1); } } else { $q1="INSERT INTO CourseCritiqueCatsCross (catID, threadID) VALUES (104, " . $threadID . ")"; //echo "

Testo1=".$q1; $dataInA = mysqli_query($conn, $q1); } } } $partThatDoesntChange = "To see it (and be inspired), visit BetterPhoto.com at:\n\n"; $partThatDoesntChange .= "https://www.BetterPhoto.com/gallery/dynoGallDetail.php?photoID=" . $photoID . "&courseID=" . $courseID . "\n\n"; $partThatDoesntChange .= "Thanks!\n\n"; $partThatDoesntChange .= Application("name_customerSupport") . "\n"; $partThatDoesntChange .= Application("email_customerSupport") . "\n\n" . Application("universalSignature") . "\n\n\n\n"; $partThatDoesntChange .= "P.S. Some email programs may display the following code better than the above link; if yours does, feel free to use it: Alternate link to BetterPhoto.com \n\n"; if ($photoID == 850) { // go to the video page } else { // when the original commenter indicated they wanted notification (so for Responses only) if ($notifyDiscOrig == "Yes" && !empty($emailOrig)) { // first is their email address any good? // sp_CheckEmailStatusByEmail" $q="SELECT emailStatus FROM Members WHERE email = '" . $emailDisc . "'"; if ($resultE = mysqli_query($conn, $q)) { while ($dataE = mysqli_fetch_assoc($resultE)) { $emailStatusQ = $dataE['emailStatus']; } if ($emailStatusQ != "BAD" && $emailStatusQ != "HRD" && $threadID != '1736976') { // create the object to send the email if (!empty($courseID) && !empty($memberNamePh)) { $subject = "Course Critique on Photo by " . $memberNamePh . ", at BetterPhoto.com - #" . $photoID; } elseif (!empty($memberNamePh)) { $subject = "Discussion on Photo by " . $memberNamePh . ", at BetterPhoto.com - #" . $threadID; } else { $subject = "Photo Discussion at BetterPhoto.com - #" . $threadID; } $responseForm = "Hi " . $firstNameOrig . "\n\n"; $responseForm .= "There has been recent activity on "; if (!empty($firstNamePh)) { $responseForm .= $firstNamePh . "'s "; } else { $responseForm .= "a "; } $responseForm .= "photo at BetterPhoto.com. \n\n"; $responseForm .= $partThatDoesntChange . "\n\n"; $responseForm .= "#" . $memberID . " - " . "-NoteOrig=Yes---"; $toAddress = $emailDisc; // respond to original commenter // during testing ++++++MAIL++++ go to me //$toAddress = "jimtestin@ProductiveAndHappy.com"; $toName = "BetterPhoto Original Photo Commenter"; $message = $responseForm; mailerThatRocks($toAddress, $subject, $message, $toName); } } } } // End if // video // when the photographer indicated they wanted notification //I am not receiving any notifications when I receive comments on my photos if ($notifyPh == "Yes") { // sp_CheckEmailStatusByEmail $q="SELECT emailStatus FROM Members WHERE email = '" . $emailPh . "'"; if ($dataP = mysqli_query($conn, $q)) { while ($rowP = mysqli_fetch_assoc($dataP)) { $emailStatusPh = $rowP['emailStatus']; } $threadID4email = $threadID; if ($inputType == "comment") { $threadID4email = $newThreadInputID; } if ($emailStatusPh != "BAD" && $emailStatusPh != "HRD" && $threadID4email != '1736976') { // during testing ++++++MAIL++++ go to me //$toAddress = "jimtestin@ProductiveAndHappy.com"; //echo "

subject1=" . $subject; //echo "

form1=" . $responseFormPh; // if this is not the questioner (who has already been dealt with) if ($emailPh != $emailOrig) { // create the object to send the email if (!empty($courseID) && !empty($memberNamePh)) { $subject = "Course Critique: Photo by " . $memberNamePh . ", at BetterPhoto.com - #" . $photoID; } elseif (!empty($memberNamePh)) { $subject = "Discussion on Photo by " . $memberNamePh . ", at BetterPhoto.com - #" . $threadID4email; } else { $subject = "Photo Discussion at BetterPhoto.com - #" . $threadID4email; } $responseFormPh = "Hi " . $firstNamePh . "\n\n"; $responseFormPh .= "There has been recent activity on your photo at BetterPhoto.com. \n\n"; $responseFormPh .= $partThatDoesntChange . "\n\n"; $responseFormPh .= "#" . $memberID . "-NotePH=Yes---"; $toAddress = $emailPh; //"eiKoae2uzXEsvy@dkimvalidator.com" // respond to photographer $toName = "BetterPhoto Photographer"; $message = $responseFormPh; mailerThatRocks($toAddress, $subject, $message, $toName); } } } } if ($photoID == 850) { // go to the video page } else { if ($inputType == "additionalComment") { // get all answerers on this thread with non-bad emails // only gets members with global "notify me" turned on // sp_FindDiscussersEmailsByThreadID" if (empty($courseID)) { $q="SELECT m.email, m.firstName, m.memberID FROM Members m INNER JOIN DiscussionResponses a ON a.memberID = m.memberID WHERE ((a.threadID = " . $threadID . " ) AND (a.status != 'ARC') AND (m.emailStatus != 'BAD') AND (a.notifyMember = 'Yes')) ORDER BY m.memberID"; } else { $q="SELECT m.email, m.firstName, m.memberID FROM Members m INNER JOIN CourseCritiqueResponses a ON a.memberID = m.memberID WHERE ((a.threadID = " . $threadID . " ) AND (a.status != 'ARC') AND (m.emailStatus != 'BAD') AND (a.notifyMember = 'Yes')) ORDER BY m.memberID"; } $dataA = mysqli_query($conn, $q); while($aid = mysqli_fetch_assoc($dataA)) { $AnswererEmail = $aid['email']; $AnswererFName = $aid['firstName']; $AnswererMemberID = $aid['memberID']; // response to answerers; exclude the most recent inputter; skip it when looping if ($AnswererMemberID != $memberID) { // only do it once for those who have many answers on the thread if ($AnswererMemberID != $laterpreviousAnswererMemberID) { //if this is not the questioner or photographer (who have already been dealt with) if ($AnswererEmail != $emailOrig && $AnswererEmail != $emailPh && $threadID != '1736976') { // create the object to send the email if (!empty($courseID) && !empty($memberNamePh)) { $subject = "Course Critique on Photo by " . $memberNamePh . ", at BetterPhoto.com - #" . $photoID; } elseif (!empty($memberNamePh)) { $subject = "Discussion on Photo by " . $memberNamePh . ", at BetterPhoto.com - #" . $threadID; } else { $subject = "Photo Discussion at BetterPhoto.com - #" . $threadID; } $responseForm = "Hi " . $AnswererFName . "\n\n"; $responseForm .= "There has been recent activity on "; if (!empty($firstNamePh)) { $responseForm .= $firstNamePh . "'s "; } else { $responseForm = $responseForm . "a "; } $responseForm .= "photo at BetterPhoto.com.\n\n" . $partThatDoesntChange; $responseForm .= "P.P.S. If you would like to stop being notified each time there is activity on this thread, visit:\n" . "https://www.BetterPhoto.com/notifyNoMore.php?pOrQ=p&t=" . $threadID . "&m=" . $AnswererMemberID . "\r\n\r\n\r\n\r\n"; $responseForm .= "#" . $memberID . "-Aid" . $AnswererMemberID . "-lpAid" . $laterpreviousAnswererMemberID; if (!empty($AnswererEmail)) { $toAddress = $AnswererEmail; } else { $toAddress = "jimError@ProductiveAndHappy.com"; } $toName = "BetterPhoto Photo Commenter"; $message = $responseForm; mailerThatRocks($toAddress, $subject, $message, $toName); } } } $laterpreviousAnswererMemberID = $AnswererMemberID; } // EmailRSA.movenext loop } // End if ' if an additional comment, go thru other additional comments } // End if // don't do if video $q="SELECT role, firstName, lastName FROM MemberVolunteers mv JOIN Members m ON m.memberID = mv.memberID WHERE mv.memberID = " . $memberID; $dataXV = mysqli_query($conn, $q); $tCountXV = mysqli_num_rows($dataXV); if ($tCountXV > 0){ while ($Sid = mysqli_fetch_assoc($dataXV)) { $roleBPV = $Sid['role']; $firstNameBPV = $Sid['firstName']; $lastNameBPV = $Sid['lastName']; } //if($memberID == "18159" || $memberID == "512652" || $memberID == "514903" || $memberID == "294243" || $memberID == "50267" || $memberID == "521275" || $memberID == "342009" || $memberID == "365554" || $memberID == "525882" || $memberID == "463726" || $memberID == "169334" || $memberID == "516663" || $memberID == "49948" || $memberID == "522088" || $memberID == "38076" || $memberID == "138988" || $memberID == "23144" || $memberID == "412484" || $memberID == "126389" || $memberID == "274303" || $memberID == "52305" || $memberID == "529909" || $memberID == "151641" || $memberID == "516876"){ // Notify me of team work $subject = "9x9 Discussion by " . $roleBPV . ": " . $firstNameBPV . " " . $lastNameBPV; $strN = "Nice 9 x 9 to " . $memberID . "\n\nTo see, go to:\n" . "https://www.BetterPhoto.com/gallery/dynoGallDetail.php?photoID=" . $photoID . "&courseID=" . $courseID . "\n\nEnjoy!\n\n"; $toAddress = "jim@ProductiveAndHappy.com"; $toName = "BetterPhoto Owner"; $message = $strN; //mailerThatRocks($toAddress, $subject, $message, $toName); } } else { // show the errors echo '

'; } // End if no errors /* NO LONGER USING if ($photoID == 850) { // go to the video page if ($referrerURL == "video3") { $URL="/video4.php"; } elseif ($referrerURL == "video3") { $URL="/video3.php"; } elseif ($referrerURL == "video2") { $URL="/video2.php"; } else { $URL="/video.php"; } } */ } // show photo below, even if here for a 2nd time $courseCritiqueThreadID = ''; if (empty($catID)) { // sp_FindImageAndCatByPhotoID" $q="SELECT p.photoName, p.photoTitle, p.photoDescription, p.memberID, p.directory, p.post, p.threadID, p.InputID, p.DiscussThreadID, p.courseCritiqueThreadID, p.cameraID, p.contestWinner, DATE_FORMAT(p.dateCreated, '%M %d, %Y') as dateCreated, p.photoWidthLarge, p.photoHeightLarge, p.exifData, p.notifyMember, DATE_FORMAT(p.dateEnteredContest, '%M %d, %Y %H:%i:%s') AS dateEnteredContest, pcc.catID FROM Photos p LEFT OUTER JOIN PhotoCatsCross pcc ON p.photoID = pcc.photoID WHERE p.photoID = " . $photoID . " ORDER BY catID DESC LIMIT 1"; } else { // sp_FindImageByPhotoID $q="SELECT p.photoName, p.photoTitle, p.photoDescription, p.memberID, p.directory, p.post, p.threadID, p.InputID, p.DiscussThreadID, p.courseCritiqueThreadID, p.cameraID, p.contestWinner, DATE_FORMAT(p.dateCreated, '%M %d, %Y %H:%i:%s') as dateCreated, p.photoWidthLarge, p.photoHeightLarge, p.exifData, p.notifyMember, DATE_FORMAT(p.dateEnteredContest, '%M %d, %Y %H:%i:%s') AS dateEnteredContest FROM Photos p WHERE photoID = " . $photoID; } //echo "

echo=".$q; $dataPic = mysqli_query($conn, $q); if ($ImageSet = mysqli_fetch_assoc($dataPic)) { $photoName = $ImageSet['photoName']; $photoTitle = $ImageSet['photoTitle']; if (empty($photoTitle)) $photoTitle = "Untitled"; $photoDescription = $ImageSet['photoDescription']; $phMemberID = $ImageSet['memberID']; $photoDirectory = $ImageSet['directory']; $post = $ImageSet['post']; $threadID = $ImageSet['threadID']; $inputID = $ImageSet['InputID']; $discussThreadID = $ImageSet['DiscussThreadID']; $courseCritiqueThreadID = $ImageSet['courseCritiqueThreadID']; $cameraID = $ImageSet['cameraID']; $contestWinner = $ImageSet['contestWinner']; $dateCreated = $ImageSet['dateCreated']; $photoWidthLarge = $ImageSet['photoWidthLarge']; $photoHeightLarge = $ImageSet['photoHeightLarge']; $exifData = $ImageSet['exifData']; $notifyPh = $ImageSet['notifyMember']; $dateEnteredContest = $ImageSet['dateEnteredContest']; if (empty($catID)) $catID = $ImageSet['catID']; // clear photoDescription if it contains a link JIM 3/2016 if (strpos(strtolower($photoDescription)," 0) { if (strpos(strtolower($photoDescription),"betterphoto.") > 0) { // and it's not a good internal link $photoDescription = str_replace("http:", "https:", $photoDescription); } else { $photoDescription = ""; } } // USE SITE URL here instead +++++++++++ AmazonDirectoryFlag = 0 ' isAmazonDirectory(photoDirectory) // get keywords if there are any // sp_GetMatchingKeywordsByPhotoIDOnly photoID $photoKeywords = ''; $q="SELECT keyword, count(photoKeywordCrossID) FROM KeywordsCross kc JOIN Keywords k ON kc.keywordID = k.keywordID WHERE photoID = " . $photoID . " GROUP BY keyword HAVING count(photoKeywordCrossID) > 0 ORDER BY count(photoKeywordCrossID) DESC"; // SHUT OFF JUNE 2020 $dataKW = mysqli_query($conn, $q); //while($kSet = mysqli_fetch_assoc($dataKW)) { //$photoKeywords .= strtolower($kSet['keyword']) . ', '; //} // trim final comma if (right($photoKeywords, 2) == ', ') { $photoKeywords = rtrim($photoKeywords,', '); } // 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); //echo "

post=".$post; if ($post == "Yes") { // if public or an example from a photo course lesson ?>

"; //updaterAccess WAS HERE ?>

Description

"; } if (!empty($photoDescription)) { echo $photoDescription . "

"; } if (!empty($exifDataClean)) { echo "Exif: " . $exifDataClean . "

"; } if (!empty($photoDescription) || !empty($exifDataClean)) { echo "

"; } ?>
Made With

Camera: " . $brandName . " " . $cameraName . "

"; } } ?>

Course Comments & Critiques

'; //if (!empty($courseCritiqueThreadID)) { } $inputType = "comment"; $notifyDiscOrig = ''; // COURSE CRITIQUES if (!empty($courseCritiqueThreadID) && $courseCritiqueThreadID != "-1") { //echo "

dt=".$courseCritiqueThreadID; $inputType = "additionalComment"; if (!empty($courseCritiqueThreadID)) { $q="SELECT topic, inputMemo, DATE_FORMAT(dateCreated, '%M %d, %Y') as dateCreated, memberID, notifyMember, threadID FROM CourseCritiques WHERE threadID = " . $courseCritiqueThreadID . " AND status != 'ARC'"; } elseif (!empty($inputID)) { $q="SELECT d.topic, d.inputMemo, DATE_FORMAT(d.dateCreated, '%M %d, %Y') as dateCreated, d.memberID, d.notifyMember, d.threadID FROM CourseCritiques d JOIN CourseCritiqueResponses r ON d.threadID = r.threadID WHERE r.inputID = " . $inputID . " AND d.status != 'ARC'"; } //echo "

testo=sql=".$q.""; if ($resultsCS = mysqli_query($conn, $q)) { while ($dataCS = mysqli_fetch_assoc($resultsCS)) { $inputMemo = $dataCS['inputMemo']; $dateCreatedOrig = $dataCS['dateCreated']; $memberIDQ = $dataCS['memberID']; $notifyDiscOrig = $dataCS['notifyMember']; $courseCritiqueThreadID = $dataCS['threadID']; // sp_GetMemberInfoByMemberID memberIDQ $q="SELECT email, firstName, MiniPicPath FROM Members WHERE memberID = " . $memberIDQ; //echo "

testo=sql=".$q.""; if ($resultsM = mysqli_query($conn, $q)) { while ($dataM = mysqli_fetch_assoc($resultsM)) { $emailDiscOrig = $dataM['email']; $firstNameOrig = $dataM['firstName']; $MiniPicPathOrig = $dataM['MiniPicPath']; if (!empty($MiniPicPathOrig)) { //$MiniPicPathOrig = str_replace("\","/",$MiniPicPathOrig); } } } $memberNameOrig = get_full_member_name($conn, $memberIDQ); $fanaticStyleOrig = false; $paidMemberOrig = false; //sp_FindMemberPaidGallery $paidMemberOrig = check_paidGalleryOwner($conn, $memberIDQ); // go find all Deluxe BetterPholios associated with this memberID // sp_GetDeluxeSiteByMemberID $postDeluxeOrig = ''; $q="SELECT post, dateImageSalesPaid FROM DeluxeSites WHERE memberID = ".$memberIDQ." AND dateExpiration is not null ORDER BY post desc, siteID DESC"; //echo "

testo=sql=".$q.""; $stmt = $conn->query($q); while ($rsWebC = $stmt->fetch_array()) { $postDeluxeOrig = $rsWebC['post']; // they gave a paid website $dlxdateProPaidOrig = $rsWebC['dateImageSalesPaid']; } if ($postDeluxeOrig == "Yes" && is_null($dlxdateProPaidOrig) == false) { // PRO site $levelIconOrig = "level-addict"; } elseif ($postDeluxeOrig == "Yes" && is_null($dlxdateProPaidOrig) == True) { // DLX site $levelIconOrig = "level-deluxe"; } elseif ($paidMemberOrig == True && $fanaticStyleOrig == True) { $levelIconOrig = "level-fanatic"; } elseif ($paidMemberOrig == True) { $levelIconOrig = "level-classic"; } else { $levelIconOrig = ""; } ?>

)">

' . $levelIconOrig . ''; } ?> "; } } echo sb_FavoriteCourseCritiqueCount($conn, $courseCritiqueThreadID); echo ''; if ($notYetFavedDisc == 1) { echo 'love it'; } ?>

#
testo=sql=".$q.""; if ($resultsCA = mysqli_query($conn, $q)) { while ($dataCA = mysqli_fetch_assoc($resultsCA)) { $inputIDA = $dataCA['inputID']; $inputMemoA = $dataCA['inputMemo']; $dateCreatedA = $dataCA['dateCreated']; $memberIDA = $dataCA['memberID']; $notifyDiscLoved = $dataCA['notifyMember']; // for if this comment gets loved if (!empty($memAuth) && is_null($memberIDA) == false) { if ($memAuth == $memberIDA) { // the comment is by logged-in user $notifyAdditionalCommenter = $dataCA['notifyMember']; } } // sp_GetMemberInfoByMemberID $q="SELECT email, MiniPicPath FROM Members WHERE memberID = " . $memberIDA; if ($resultMA = mysqli_query($conn, $q)) { //$emailDiscA = $dataMA['email']; while ($dataMA = mysqli_fetch_assoc($resultMA)) { $MiniPicPathDiscA = $dataMA['MiniPicPath']; } if (!empty($MiniPicPathDiscA)) { //$MiniPicPathDiscA = str_replace("\","/",$MiniPicPathDiscA); } } $memberNameDiscA = ""; $fanaticStyleA = false; $paidMemberA = false; //sp_FindMemberPaidGallery $paidMemberA = check_paidGalleryOwner($conn, $memberIDA); $memberNameDiscA = get_full_member_name($conn, $memberIDA); // go find all Deluxe memberIDA $postDeluxeA = ''; $q="SELECT post, dateImageSalesPaid FROM DeluxeSites WHERE memberID = ".$memberIDA." AND dateExpiration is not null ORDER BY post desc, siteID DESC"; $stmt = $conn->query($q); while ($rsWebCA = $stmt->fetch_array()) { $postDeluxeA = $rsWebCA['post']; // they gave a paid website $dlxdateProPaidA = $rsWebCA['dateImageSalesPaid']; } if ($postDeluxeA == "Yes" && is_null($dlxdateProPaidA) == false) { // PRO site $levelIconDiscA = "level-addict"; } elseif ($postDeluxeA == "Yes" && is_null($dlxdateProPaidA) == True) { // DLX site $levelIconDiscA = "level-deluxe"; } elseif ($paidMemberA == True && $fanaticStyleA == True) { $levelIconDiscA = "level-fanatic"; } elseif ($paidMemberA == True) { $levelIconDiscA = "level-classic"; } else { $levelIconDiscA = ""; } ?>
)">

' . $levelIconDiscA . ''; } ?> "; } } echo sb_FavoriteCourseCritiqueResponseCount($conn, $inputIDA) ?>love it'; } echo '

' . $inputMemoA . ' #' . $inputIDA; ?>
Be the first... critique below. '; ?>
">

To critique, first log in.

Comments

dt=".$discussThreadID; $inputType = "additionalComment"; if (!empty($discussThreadID)) { // sp_FindDiscussionByThreadID $q="SELECT topic, inputMemo, DATE_FORMAT(dateCreated, '%M %d, %Y') as dateCreated, memberID, notifyMember, threadID FROM Discussions WHERE threadID = " . $discussThreadID . " AND status != 'ARC'"; } elseif (!empty($inputID)) { // sp_FindDiscussionByInputID $q="SELECT d.topic, d.inputMemo, DATE_FORMAT(d.dateCreated, '%M %d, %Y') as dateCreated, d.memberID, d.notifyMember, d.threadID FROM Discussions d JOIN DiscussionResponses r ON d.threadID = r.threadID WHERE r.inputID = " . $inputID . " AND d.status != 'ARC'"; } if ($resultsS = mysqli_query($conn, $q)) { while ($dataS = mysqli_fetch_assoc($resultsS)) { $inputMemo = $dataS['inputMemo']; /* inputMemo = Replace(Replace(inputMemo,"",""),"","") inputMemo = Replace(Replace(inputMemo,"http://lsqrd.blogspot.com/",""),"blogspot","") inputMemo = Replace(Replace(inputMemo,"",""),"
","") */ $dateCreatedOrig = $dataS['dateCreated']; $memberIDQ = $dataS['memberID']; $notifyDiscOrig = $dataS['notifyMember']; $discussThreadID = $dataS['threadID']; // sp_GetMemberInfoByMemberID memberIDQ $emailDiscOrig = ''; $q="SELECT email, firstName, MiniPicPath FROM Members WHERE memberID = " . $memberIDQ; if ($resultsM = mysqli_query($conn, $q)) { while ($dataM = mysqli_fetch_assoc($resultsM)) { $emailDiscOrig = $dataM['email']; $firstNameOrig = $dataM['firstName']; $MiniPicPathOrig = $dataM['MiniPicPath']; if (!empty($MiniPicPathOrig)) { //$MiniPicPathOrig = str_replace("\","/",$MiniPicPathOrig); } } } $memberNameOrig = get_full_member_name($conn, $memberIDQ); $fanaticStyleOrig = false; $paidMemberOrig = false; //sp_FindMemberPaidGallery $paidMemberOrig = check_paidGalleryOwner($conn, $memberIDQ); // go find all Deluxe BetterPholios associated with this memberID // sp_GetDeluxeSiteByMemberID $postDeluxeOrig = ''; $q="SELECT post, dateImageSalesPaid FROM DeluxeSites WHERE memberID = ".$memberIDQ." AND dateExpiration is not null ORDER BY post desc, siteID DESC"; $stmt = $conn->query($q); while ($rsWeb = $stmt->fetch_array()) { $postDeluxeOrig = $rsWeb['post']; // they gave a paid website $dlxdateProPaidOrig = $rsWeb['dateImageSalesPaid']; } if ($postDeluxeOrig == "Yes" && is_null($dlxdateProPaidOrig) == false) { // PRO site $levelIconOrig = "level-addict"; } elseif ($postDeluxeOrig == "Yes" && is_null($dlxdateProPaidOrig) == True) { // DLX site $levelIconOrig = "level-deluxe"; } elseif ($paidMemberOrig == True && $fanaticStyleOrig == True) { $levelIconOrig = "level-fanatic"; } elseif ($paidMemberOrig == True) { $levelIconOrig = "level-classic"; } else { $levelIconOrig = ""; } ?>
)">

' . $levelIconOrig . ' My Courses'; } elseif (!empty($levelIconOrig)) { echo '' . $levelIconOrig . ''; } ?> "; } } echo sb_FavoriteDiscussionCount($conn, $discussThreadID); echo ''; if ($notYetFavedDisc == 1) { echo 'love it'; } ?>

#
",""),"","") inputMemo = Replace(Replace(inputMemo,"http://lsqrd.blogspot.com/",""),"blogspot","") inputMemo = Replace(Replace(inputMemo,"",""),"
","") */ $dateCreatedA = $dataA['dateCreated']; $memberIDA = $dataA['memberID']; $notifyDiscLoved = $dataA['notifyMember']; // for if this comment gets loved if (!empty($memAuth) && is_null($memberIDA) == false) { if ($memAuth == $memberIDA) { // the comment is by logged-in user $notifyAdditionalCommenter = $dataA['notifyMember']; } } // sp_GetMemberInfoByMemberID $q="SELECT email, MiniPicPath FROM Members WHERE memberID = " . $memberIDA; if ($resultMA = mysqli_query($conn, $q)) { //$emailDiscA = $dataMA['email']; while ($dataMA = mysqli_fetch_assoc($resultMA)) { $MiniPicPathDiscA = $dataMA['MiniPicPath']; } if (!empty($MiniPicPathDiscA)) { //$MiniPicPathDiscA = str_replace("\","/",$MiniPicPathDiscA); } } $memberNameDiscA = ""; $fanaticStyleA = false; $paidMemberA = false; //sp_FindMemberPaidGallery $paidMemberA = check_paidGalleryOwner($conn, $memberIDA); $memberNameDiscA = get_full_member_name($conn, $memberIDA); // go find all Deluxe memberIDA $postDeluxeA = ''; $q="SELECT post, dateImageSalesPaid FROM DeluxeSites WHERE memberID = ".$memberIDA." AND dateExpiration is not null ORDER BY post desc, siteID DESC"; $stmt = $conn->query($q); while ($rsWebA = $stmt->fetch_array()) { $postDeluxeA = $rsWebA['post']; // they gave a paid website $dlxdateProPaidA = $rsWebA['dateImageSalesPaid']; } if ($postDeluxeA == "Yes" && is_null($dlxdateProPaidA) == false) { // PRO site $levelIconDiscA = "level-addict"; } elseif ($postDeluxeA == "Yes" && is_null($dlxdateProPaidA) == True) { // DLX site $levelIconDiscA = "level-deluxe"; } elseif ($paidMemberA == True && $fanaticStyleA == True) { $levelIconDiscA = "level-fanatic"; } elseif ($paidMemberA == True) { $levelIconDiscA = "level-classic"; } else { $levelIconDiscA = ""; } ?>
)">

' . $levelIconOrig . ' My Courses'; } elseif (!empty($levelIconDiscA)) { echo '' . $levelIconDiscA . ''; } ?> "; } } echo sb_FavoriteDiscussionResponseCount($conn, $inputIDA) ?>love it'; } echo '

' . $inputMemoA . ' #' . $inputIDA; ?>
Be the first... comment below.
">

To discuss, first log in or sign up (buttons are at top center of page).
Get Constructive Critiques"; echo "

Sign up for an interactive online photography course to get critiques on your photos.

"; } ?>  
"; echo "

Did You Know?

"; // echo "

TITLE:

"; /* We do not allow photos or links that are clearly business ads (aka spam). "

Social Bar Hiding: If it's blocking items on the page that you'd like to see, you can hide the social media bar on the left by clicking the small x at the bottom. Using the buttons on this bar to help share BetterPhoto with others helps us thrive.

"; echo "

Title Your Photo: Giving your photo a title will help identify it for the future. To help people find your photo when they are searching, give it a unique title perhaps including a specific place, name, or descriptive phrase.

"; echo "

Photo of the Day by Member: You can view POTD's by a particular member by checking out the POTD leaderboards.

"; echo "

Camera Settings: Giving data on your camera settings helps others to learn and practice. Google how to view EXIF data and add this on the Manage/Enter page in your Profile.

"; */ echo "

Discussions by Category: You can view photo discussions on various themes in the Community > Photo Discussions section of the site.

"; echo "

BetterPhoto Websites: If you see an orange website link directly under the photographer's name, it's totally okay. It's not spam. The reason: BetterPhoto is the one that offers these personal photography websites. We are supporting our clients with those links.

"; echo "

Unavailable EXIF: If there is no other information but 'Unavailable' in the EXIF (meaning no EXIF data exists with the photo), the 'Unavailable' blurb is not displayed. If there is any info, it shows. Many photos have the EXIF stripped out when people modify the image and resave it, before uploading.

"; echo "
 

The following truth is one of the core philosophies of BetterPhoto:

"; echo "

I hear, I forget.
I see, I remember.
I do, I understand.

"; echo "

You learn by doing. Take your next online photography class.

"; ?>
= $rowsPerPage && $justPhotoID == 0) { $nextPhotoID = 1; // this will send then to next dynoGallPage } else { $nextPhotoID = $photos4PNarr[$nextRow]; } // last image of last page ? if (!empty($memAuth)) { // sp_CheckExistenceOfMemberFavPhotoByMemberID $q="SELECT favID FROM PhotoFavorites WHERE favPhotoID = " . $photoID . " AND memberID = " . $memAuth; $resultFct=mysqli_query($conn,$q); $tCountFct=mysqli_num_rows($resultFct); if ($tCountFct == 0) { // not a favorite photo yet, show add link echo ""; } } else { echo ""; } ?>
"; } else { echo "
"; } } if (!empty($nextPhotoID)) { if ($nextPhotoID == 1) { // at the end of the set echo "
"; } else { echo "
"; } } } // End If prev next ?>
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 Winner BetterPhoto.com Photo Contest SECOND PLACE Winner BetterPhoto.com Photo Contest FinalistBetterPhoto.com Staff Favorite
BetterPhoto.com Editor's Pick Photography Contest Photo of the Day Photography Contest Gem of the Day query($q); while ($rsMembV = $stmt->fetch_array()) { $crewRole = $rsMembV['role']; } if (!empty($crewRole)) { echo 'BetterPhoto Crew: ' . $crewRole . ''; } ?>


Copyright for this photo belongs solely to .
Images may not be copied, downloaded, or used in any way without the expressed, written permission of the photographer.
Report this photo
Log in to follow or message this photographer or report this photo.



 

 

 

 

Nothing to See Here...

This photo has been removed, or set to private. The website owner likely is only wants to publish it on his or her BetterPholio Website.

Either way, the photo you have requested is not set to publically display here. Return.

 

 

 

 

 

 

 

 



Photo Not Found

Sorry - the photo you have requested is not available. Return.'; } ?>