Blue Ball Logo KieferArt
"; echo "Please fill in your first name. Thanks." . "
"; echo "
"; echo ""; $inputChecks = 'not okay'; } else { echo ""; //echo $_POST['fname'] . " is the value of fname in post." . "
"; $fname = str_replace("'", "", $_POST['fname']); $fname = filter_var($_POST['fname'], FILTER_SANITIZE_SPECIAL_CHARS); } if ((isset($_POST['lname'])) && (($_POST['lname'] == 'last name') || ($_POST['lname'] == "")))//IF NO LAST NAME { echo "
"; echo "Please fill in your last name. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $lname = str_replace("'", "", $_POST['lname']); $lname = filter_var($lname, FILTER_SANITIZE_SPECIAL_CHARS); $string = strtolower($lname);//PUTS LAST NAME IN LOWER CASE FOR USE IN GENERATING USERNAME ON process_custom_info PAGE //echo $lname . " is the value of the POST last name of the user sanitized." . "
"; } if (($_POST['street_apt_number'] == '') || ($_POST['street_apt_number'] == "street address/apt #"))//IF NO ADDRESS { echo "
"; echo "Please fill in your street address (include your apt or suite #). Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $address = filter_var($_POST['street_apt_number'], FILTER_SANITIZE_SPECIAL_CHARS); echo ""; //echo $address . " is the value of address." . "
"; } if (($_POST['city'] == '') || ($_POST['city'] == 'city'))//IF NO CITY { echo "
"; echo "Please fill in your city. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $city = filter_var($_POST['city'], FILTER_SANITIZE_SPECIAL_CHARS); echo ""; //echo $city . " is the value of city." . "
"; } if ((!isset($_POST['state'])) || ($_POST['state'] == ''))//IF NO STATE SELECTED { echo "
"; echo "Please and select your state. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $state = $_POST['state']; echo ""; //echo $_POST['state'] . " is the value of state." . "
"; } if (($_POST['zip_code'] == '') || ($_POST['zip_code'] == 'zip code'))//IF NO ZIP { echo "
"; echo "Please enter your zip code. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $zip = $_POST['zip_code']; echo ""; //echo $_POST['zip_code'] . " is the value of the zip code." . "
"; } if (!filter_has_var(INPUT_POST, "email"))//CHECKS FOR EMAIL INPUT { echo "
"; echo "Please enter your email address. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } elseif (!filter_input(INPUT_POST, "email", FILTER_VALIDATE_EMAIL)) { echo "
"; echo "Please go back and re-enter your email address. Must've been a typo. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $email = $_POST['email']; echo ""; //echo $_POST['email'] . " is the value of email." . "
"; } if (($_POST['emailConfirm'] == '') || ($_POST['emailConfirm'] == 'confirm email'))//IF NO EMAIL CONFIRM INPUT { echo "
"; echo "Please confirm your email address. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { $emailConfirm = $_POST['emailConfirm']; echo ""; //echo $emailConfirm . " is the value of email confirm." . "
"; } if ($_POST['email'] != $_POST['emailConfirm'])//IF EMAIL CONFIRMATION DOESN'T MATCH { echo "
"; echo "Your email confirmation did not match. Please re-enter. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } if (!isset($_POST['sketchOrPortrait']))//IF NO SKETCH OR PORTRAIT IS SELECTED { echo "
"; echo "Please indicate whether you are interested in an " . "" . "oil sketch" . "" . " or a " . "" . "full portrait" . "" . "
" . "(details can be found on the COMMISSION INFO page). Thanks."; echo "
"; $inputChecks = 'not okay'; } else { echo ""; //echo $_POST['sketchOrPortrait'] . " is the value of sketch or portrait." . "
"; } if (!isset($_POST['frame']))//IF FRAME IS NOT SELECTED { echo "
"; echo "A custom frame is an option for " . "" . "FULL PORTRAITS" . "" . " (details can be found on the " . "" . "COMMISSION INFO" . "" . " page.)" . "
"; echo "Please indicate whether or not you'd like me to include a frame for your painting." . "
" . "If you are requesting a " . "" . "'PORTRAIT SKETCH'" . "" . ", just click the 'NO' button. Thanks."; echo "
"; $inputChecks = 'not okay'; } else { $frame = $_POST['frame']; echo ""; //echo $_POST['frame'] . " is the value of frame." . "
"; } if ((isset($_POST['sketchOrPortrait'])) && ($_POST['sketchOrPortrait'] == 'SKETCH') && ($_POST['frame'] == 'YES'))//IF USER SELECTED SKETCH AND FRAME TOGETHER, MESSAGE THEY DON'T GET FRAME WITH JUST A SKETCH { echo "
"; echo "Unfortunately I would be unable to build a custom frame for you if you are requesting an " . "" . "OIL SKETCH" . "" . "
" . " (details can be found on the COMMISSION INFO page)." . "

" . "Please click the 'NO' button for frame requests."; echo "
"; $inputChecks = 'not okay'; } if (($_POST['num_photos'] == "") || (!isset($_POST['num_photos'])))//IF NO NUMBER OF PIC UPLOADS { echo "
"; echo "Please indicate how many photos you will be uploading today. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } else { echo ""; //echo $_POST['num_photos'] . " is the value of num photos." . "
"; } /* COUNTS EACH UPLOADED FILE AND CHECKS IF JPEG AND < 1 MB */ $fileCount = 0; $fileNameArray = array($_FILES['file1']['name'], $_FILES['file2']['name'], $_FILES['file3']['name'], $_FILES['file4']['name'], $_FILES['file5']['name'], $_FILES['file6']['name']); foreach ($fileNameArray as $value)//LOADS ALL FILE NAMES INTO ARRAY { if ($value != "") { $fileCount++;//INCREMENTS FILE COUNT VARIABLE IF NOT NULL } }//END FOREACH NAME $fileTypeArray = array($_FILES['file1']['type'], $_FILES['file2']['type'], $_FILES['file3']['type'], $_FILES['file4']['type'], $_FILES['file5']['type'], $_FILES['file6']['type']); foreach ($fileTypeArray as $value1)//LOADS ALL FILE TYPES INTO ARRAY { if (($value1 != 'image/pjpeg') && ($value1 != ""))//IF NOT NULL CHECKS IF JPEG (ONLY FORMAT ALLOWED) { //echo $_FILES['file1']['type'] . " is the value of the first file type." . "
"; echo "
"; echo "Sorry, I need your files to be in jpeg format. Please reformat and upload again. Thanks" . "
"; $inputChecks = 'not okay'; } }//END FOREACH TYPE $fileErrorArray = array ($_FILES['file1']['error'], $_FILES['file2']['error'], $_FILES['file3']['error'], $_FILES['file4']['error'], $_FILES['file5']['error'], $_FILES['file6']['error']); foreach ($fileErrorArray as $value2)//LOADS ALL FILE ERROR NUMBERS INTO ARRAY { if ($value2 == 2)//IF ERROR (INDICATES IN EXCESS OF SIZE LIMIT ESTABLISHED IN FORM INPUT BOX (1 MB) ON commission_form.html) { echo "
"; echo "Please limit each of your files to 1MB or less. Thanks." . "
"; $inputChecks = 'not okay'; } }//END FOREACH SIZE //echo $fileCount . " is the number of photos uploaded counting the non-null name values in the FILES array." . "
"; if ($fileCount != $_POST['num_photos'])//IF FILE COUNT (FROM ABOVE) DOES NOT EQUAL NUMBER OF PIC UPLOADS FROM USER INPUT { echo "
"; echo "You indicated that you'd be uploading " . $_POST['num_photos'] . " photos today. Please make the adjustment. Thanks." . "
"; echo "
"; $inputChecks = 'not okay'; } // //LOAD EACH FILE NAME INTO VARIABLE FOR UPLOADS BELOW // // $valueFile1 = $_FILES['file1']['name']; $valueFile1 = str_replace("'", "", $valueFile1); $valueFile2 = $_FILES['file2']['name']; $valueFile2 = str_replace("'", "", $valueFile2); $valueFile3 = $_FILES['file3']['name']; $valueFile3 = str_replace("'", "", $valueFile3); $valueFile4 = $_FILES['file4']['name']; $valueFile4 = str_replace("'", "", $valueFile4); $valueFile5 = $_FILES['file5']['name']; $valueFile5 = str_replace("'", "", $valueFile5); $valueFile6 = $_FILES['file6']['name']; $valueFile6 = str_replace("'", "", $valueFile6); // // //CHECKS EACH OF THE SIX FILE UPLOAD BOXES FOR FILE TYPE AND SIZE // // //IF OKAY, MOVES UPLOADED FILES FROM SERVER temp FOLDER INTO uploads/ FOLDER IN DIRECTORY // // //FILE ONE // if ($valueFile1)//IF A FILE NAME IS INPUT IN BOX ONE, IF NOT NULLS $fileOne VALUE { $fileOne = $valueFile1; $tempName = $_FILES['file1']['tmp_name']; $error = $_FILES['file1']['error']; $target = "uploads/";//ASSIGNS FOLDER NAME $target = $target . basename($valueFile1); $picOneURL = $target;//TO BE USED AT BOTTOM OF PROGRAM TO PRINT THUMBNAILS OF ANY FILES UPLOADED BY USER //echo $target . " is the URL of the file to be uploaded to the wamp upload folder." . "
"; $uploadFile = move_uploaded_file($tempName, $target);//MOVES FILE TO uploads/ FOLDER IN DIRECTORY if ($uploadFile) { //echo "The file " . $valueFile1 . " was successfully uploaded from the temp folder to the bluehost uploads folder." . "
"; $target = "";//NULLS CONCATONATED FOLDER/FILE NAME FOR NEXT UPLOAD BOX } else { //echo "Didn't move the file from the temp folder to wamp upload folder."; //echo $error . " is the contents of FILES " . $valueFile1 . " error string." . "
"; //echo "Either there was no file or something went wrong when trying to upload the file " . $valueFile1 . " to the server." . "
"; } } else { $fileOne = ""; $picOneURL = ""; } //echo $valueFile1 . " is the value of File One's name." . "
"; //FILE TWO // if ($valueFile2) { $fileTwo = $valueFile2; $tempName = $_FILES['file2']['tmp_name']; $error = $_FILES['file2']['error']; $target = "uploads/"; $target = $target . basename($valueFile2); $picTwoURL = $target; //echo $target . " is the URL of the file to be uploaded to the wamp upload folder." . "
"; $uploadFile = move_uploaded_file($tempName, $target); if ($uploadFile) { //echo "The file " . $valueFile2 . " was successfully uploaded from the temp folder to the wamp upload folder." . "
"; $target = ""; } else { //echo "Didn't move the file from the temp folder to wamp upload folder."; //echo $error . " is the contents of FILES " . $valueFile2 . " error string." . "
"; //echo "Either there was no file or something went wrong when trying to upload the file " . $valueFile2 . " to the server." . "
"; } } else { //echo "This is the error of file 2: " . $_FILES['file2']['error'] . "
"; $fileTwo = ""; $picTwoURL = ""; } //FILE THREE // if ($valueFile3) { $fileThree = $valueFile3; $tempName = $_FILES['file3']['tmp_name']; $error = $_FILES['file3']['error']; $target = "uploads/"; $target = $target . basename($valueFile3); $picThreeURL = $target; //echo $target . " is the URL of the file to be uploaded to the wamp upload folder." . "
"; $uploadFile = move_uploaded_file($tempName, $target); if ($uploadFile) { //echo "The file " . $valueFile3 . " was successfully uploaded from the temp folder to the wamp upload folder." . "
"; $target = ""; } else { //echo "Didn't move the file from the temp folder to wamp upload folder." . "
"; //echo $error . " is the contents of FILES " . $valueFile3 . " error string." . "
"; //echo "Either there was no file or something went wrong when trying to upload the file " . $valueFile3 . " to the server." . "
"; } } else { $fileThree = ""; $picThreeURL = ""; } //FILE FOUR // if ($valueFile4) { $fileFour = $valueFile4; $tempName = $_FILES['file4']['tmp_name']; $error = $_FILES['file4']['error']; $target = "uploads/"; $target = $target . basename($valueFile4); $picFourURL = $target; //echo $target . " is the URL of the file to be uploaded to the wamp upload folder." . "
"; $uploadFile = move_uploaded_file($tempName, $target); if ($uploadFile) { //echo "The file " . $valueFile4 . " was successfully uploaded from the temp folder to the wamp upload folder." . "
"; $target = ""; } else { //echo "Didn't move the file from the temp folder to wamp upload folder."; //echo $error . " is the contents of FILES " . $valueFile4 . " error string." . "
"; //echo "Either there was no file or something went wrong when trying to upload the file " . $valueFile4 . " to the server." . "
"; } } else { $fileFour = ""; $picFourURL = ""; } //FILE FIVE // if ($valueFile5) { $fileFive = $valueFile5; $tempName = $_FILES['file5']['tmp_name']; $error = $_FILES['file5']['error']; $target = "uploads/"; $target = $target . basename($valueFile5); $picFiveURL = $target; //echo $target . " is the URL of the file to be uploaded to the wamp upload folder." . "
"; $uploadFile = move_uploaded_file($tempName, $target); if ($uploadFile) { //echo "The file " . $valueFile5 . " was successfully uploaded from the temp folder to the wamp upload folder." . "
"; $target = ""; } else { //echo "Didn't move the file from the temp folder to wamp upload folder."; //echo $error . " is the contents of FILES " . $valueFile5 . " error string." . "
"; //echo "Either there was no file or something went wrong when trying to upload the file " . $valueFile5 . " to the server." . "
"; } } else { $fileFive = ""; $picFiveURL = ""; } //FILE SIX // if ($valueFile6) { $fileSix = $valueFile6; $tempName = $_FILES['file6']['tmp_name']; $error = $_FILES['file6']['error']; $target = "uploads/"; $target = $target . basename($valueFile6); $picSixURL = $target; //echo $target . " is the URL of the file to be uploaded to the wamp upload folder." . "
"; $uploadFile = move_uploaded_file($tempName, $target); if ($uploadFile) { //echo "The file " . $valueFile6 . " was successfully uploaded from the temp folder to the wamp upload folder." . "
"; $target = ""; } else { //echo "Didn't move the file from the temp folder to wamp upload folder."; //echo $error . " is the contents of FILES " . $valueFile6 . " error string." . "
"; //echo "Either there was no file or something went wrong when trying to upload the file " . $valueFile6 . " to the server." . "
"; } } else { $fileSix= ""; $picSixURL = ""; } // // //THESE VARIABLES CONTAIN ALL SIX FILE UPLOAD NAMES AND FILTERS OUT SPECIAL CHARACTERS (If any of the 6 upload boxes aren't filled in, the $_FILES array loads a value of null) // // $fileOne = $_FILES['file1']['name']; $fileOne = filter_var($fileOne, FILTER_SANITIZE_SPECIAL_CHARS); $fileTwo = $_FILES['file2']['name']; $fileTwo = filter_var($fileTwo, FILTER_SANITIZE_SPECIAL_CHARS); $fileThree = $_FILES['file3']['name']; $fileThree = filter_var($fileThree, FILTER_SANITIZE_SPECIAL_CHARS); $fileFour = $_FILES['file4']['name']; $fileFour = filter_var($fileFour, FILTER_SANITIZE_SPECIAL_CHARS); $fileFive = $_FILES['file5']['name']; $fileFive = filter_var($fileFive, FILTER_SANITIZE_SPECIAL_CHARS); $fileSix = $_FILES['file6']['name']; $fileSix = filter_var($fileSix, FILTER_SANITIZE_SPECIAL_CHARS); //echo $fileOne . "
"; }//END IF SUBMIT WAS CLICKED // // //ASSIGNS VALUES FOR INPUT BOXES IN FORM // // if (isset($_POST['fname'])) { $firstName = $_POST['fname']; } elseif (isset($_POST['edit'])) { $firstName = $_SESSION['fname']; } else { $firstName = "first name"; } //echo $firstName . ", "; if (isset($_POST['lname'])) { $lastName = $_POST['lname']; } elseif (isset($_POST['edit'])) { $lastName = $_SESSION['lname']; } else { $lastName = "last name"; } //echo $lastName . ", "; if (isset($_POST['street_apt_number'])) { $address = $_POST['street_apt_number']; } elseif (isset($_POST['edit'])) { $address = $_SESSION['address']; } else { $address = "address"; } //echo $address . ", "; if (isset($_POST['city'])) { $city = $_POST['city']; } elseif (isset($_POST['edit'])) { $city = $_SESSION['city']; } else { $city = "city"; } //echo $city . ", "; if (isset($_POST['state'])) { $state = $_POST['state']; } elseif (isset($_POST['edit'])) { $state = $_SESSION['state']; } else { $state = ''; } //echo $state . ", "; if (isset($_POST['zip_code'])) { $zip = $_POST['zip_code']; } elseif (isset($_POST['edit'])) { $zip = $_SESSION['zip']; } else { $zip = "zip code"; } //echo $zip . ", "; if (isset($_POST['email'])) { $email = $_POST['email']; } elseif (isset($_POST['edit'])) { $email = $_SESSION['email']; } else { $email = "email"; } //echo $email . " and "; if (isset($_POST['emailConfirm'])) { $emailConfirm = $_POST['emailConfirm']; $_SESSION['emailConfirm'] = $emailConfirm; } elseif (isset($_POST['edit'])) { $emailConfirm = $_SESSION['emailConfirm']; } else { $emailConfirm = "email confirm"; } echo $emailConfirm . "." . "
"; if (isset($_POST['sketchOrPortrait'])) { $sketchOrPortrait = $_POST['sketchOrPortrait']; } else { $sketchOrPortrait = ''; } if (isset($frame)) { $frame = $_POST['frame']; } else { $frame = ''; } ?>
COMMISSION FORM
(Press "CTRL +" to enlarge page, "CTRL - " to reduce)

Filling out this form does not obligate you to commission a painting, but it is the first step toward it. Please fill in your contact info (all fields required), upload your photos and describe specifically which elements of those photos you'd like to include in the painting.  Your information will be kept in the strictest confidence.
You can also use this form to upload any additional photos during our consultations.  If you haven't already, please read the
COMMISSION PROCESS page to get a full understanding of how this works.  Once I receive the info you provide here, I will email an assessment of the proposed project and possibly include content options for the painting that could effect the price up or down, depending on your needs.


max 40 chars

max 40 chars

max 40 chars

max 40 chars

please select your state



Are you interested in an OIL SKETCH or a FULL PORTRAIT?
SKETCH     PORTRAIT


(FULL PORTRAITS ONLY) Would you want a frame?
YES     NO


PHOTO UPLOAD
Please limit each of your photos to 1MB or less.
Photos must be in jpeg format.
Maximum 6 photo uploads per form.


IMPORTANT:  KieferArt reserves the right to decline a commission if (1)  the uploaded photographs provided by you are known to be copyright material (intellectual property) used without the author/photographer's written consent or (2)  the uploaded photographs provided by you depict obscenity, violence, hate based on race, gender, heritage, age, sexual orientation or religion or any other such image deemed to be offensive.

How many photos are you uploading?   

   
   
   



YOUR DESCRIPTION AND COMMENTS
In your comments, please refer to each of your photos by filename.
Tell me which of the photos are for reference and which you would like me to use for the actual painting.
Include any other comments or questions you might have as well.

You have 1000 characters remaining in your comments ...


Please wait while your photos upload
THANK YOU!
"; } else { //echo "Connected to db just fine, thank you." . "
"; } $selectDb = mysql_select_db("kieferar_greetingcard", $con); if (!$selectDb) { //echo "Did not select db." . "
"; } else { //echo "Selected greeting_card data base, too." . "
"; } /* SELECTS FIRST AND LAST NAMES FROM commission TABLE */ $checkUser = mysql_query("SELECT fname, lname FROM commission where fname = '$fname' and lname = '$lname'");//SELECTS FIRST AND LAST NAMES FROM commission TABLE IF MATCH $numRows = mysql_num_rows($checkUser); if (!$checkUser) { //echo "Did not query commission table for first and last names sorting by lname ascending." . "
"; } else { //echo "Queried commission table sorting by lname ascending just peachy." . "
"; } // // //CHECKS FOR fname AND lname MATCH IN ALL ROWS IN commission TABLE, IF A MATCH, PRINTS THIS // // $noMatch = 0;//INITIALIZING SWITCH TO INDICATE NEW OR RETURNING CUSTOMER (0 = NEW and 1 = RETURNING) if ($numRows != 0) { while ($row = mysql_fetch_array($checkUser)) { if (($row['fname'] == $fname) && ($row['lname'] == $lname))//IF THERE IS A ROW IN commission TABLE THAT MATCHES BOTH FIRST AND LAST NAMES { echo "
"; echo ""; echo "
"; echo "" . "Hi, " . $fname . "." . " I'll post my response to your new information" . "
" . " on the messageboard as soon as I can." . " Enjoy your day."; echo "
"; global $noMatch; $noMatch = 1;//SWITCH IS SET TO 1 IF THERE IS A MATCH IN commission TABLE break;//QUIT WHILE WHEN FINDING A MATCH }//END IF MATCH }//END WHILE }//END IF NUM ROWS DOES NOT EQUAL 0 if ($numRows == 0) { //echo "Did not find first and last name in commission table." . "
"; } // // //CHECKS FOR NO fname AND lname MATCH IN commission TABLE (new user) // //echo $noMatch . " is the value of the noMatch variable. If value is 1, there is a match in the commission table. If 0, new user." . "
"; // // //IF fname AND lname DOESN'T MATCH ANYTHING IN THE commission TABLE, ASSIGN NEW USER A USERNAME AND PASSWORD FOR MESSAGEBOARD // // //CREATES USERNAME AND PASSWORD FOR NEW CUSTOM PAINTING CUSTOMER if ($noMatch == 0)//IF NO MATCH IN commission TABLE { $lastNameLength = ""; if (strlen($string) < 4) { $lastNameLength = strlen($string); } if ($lastNameLength == 1) { $string = $string . "@" . "@" . "@"; } if ($lastNameLength == 2) { $string = $string . "@" . "@"; } if ($lastNameLength == 3) { $string = $string . "@"; } $lastNameTrunk = substr($string, 0, 4); $GenSuffix= rand(100, 999); $GenUserNm = $lastNameTrunk . $GenSuffix; $GenPassword = rand(100000, 999999); // // //PRINTS THIS FOR NEW USER WHICH INCLUDES THEIR NEWLY-GENERATED USERNAME AND PASSWORD // // echo "
"; echo ""; echo ""; echo "
"; echo "" . "Thank you" . "
" . "for submitting your custom painting ideas, " . $fname . "."; echo "
" . "I will study your photos and requests and then post my comments along with a project price estimate on the KieferArt MESSAGEBOARD (you will be notified by email when I post it.) Our consultations from that point on will take place on the MESSAGEBOARD. No need to sign up again there. Use the following username and password." . "

" . "USERNAME: " . "" . $GenUserNm; echo "
" . "PASSWORD: " . "" . $GenPassword; echo "

" . "Please make a note of these" . "." . "


" . "After our consultations, if you decide to commission the painting, we will formalize our mutual investment in the project on the " . "
" . "COMMITMENT FORM" . "" . " which will summarize our discussions. You are NOT obligated to commission this painting until you click the " . '"I AGREE"' . "button on that form." . "

"; echo "In the meantime, I look forward to seeing what you have in mind for your painting and will be in touch as soon as I can. Look for " . "" . "kiefer@kieferart.com" . "" . " in your inbox. Thanks again for your interest. " . "
"; }//END IF NO MATCH // // //IF A MATCH (RETURNING USER), ADDS NEW INFO FROM commission FORM INTO commission TABLE // // if (!isset($_POST['comments'])) { $_POST['comments'] = "";//NULLS comments FIELD IN POST IF NO USER INPUT (for inserting below) } else { $comments = $_POST['comments']; $comments = filter_var($comments, FILTER_SANITIZE_SPECIAL_CHARS); } if ($noMatch == 1)//RETURNING USER { $commissionTable = mysql_query("INSERT INTO commission (date, fname, lname, file1, file2, file3, file4, file5, file6, comments) values ('$date','$fname','$lname','$fileOne','$fileTwo','$fileThree','$fileFour','$fileFive','$fileSix','$comments')"); if (!$commissionTable) { //echo "Didn't insert user's NEW info from commission form. " . "Mysql error is: " . mysql_error() . "
"; } else { //echo "Inserted user's NEW info from commission form into commission table." . "
"; } }//END IF MATCH // // //IF NEW USER, THIS UPLOADS USER'S FILES AND THEN RECORDS INTO commission TABLE AND messageboard TABLE // // //$fileArrayContent = var_dump($_FILES); //echo "This is the contents of the FILE array." . "
" . $fileArrayContent . "

"; //echo "
" . "These are the values coming in from the POST array: " . "
" . var_dump($_POST) . "

"; // // //IF NEW USER, LOADS ALL commission_form.html INFO INTO commission TABLE // // if ($noMatch == 0)//NEW CUSTOM USER { $commissionTable = mysql_query("INSERT INTO commission (date, fname, lname, street_apt_number, city, state, zip_code, email, sketch_or_portrait, frame, numFiles, file1, file2, file3, file4, file5, file6, comments) values ('$date','$fname','$lname','$address','$city','$state','$zip','$email','$sketchOrPortrait','$frame','$_POST[num_photos]','$fileOne','$fileTwo','$fileThree','$fileFour','$fileFive','$fileSix','$comments')"); if (!$commissionTable) { //echo "Didn't insert user's info from commission form (new user)." . "
"; } else { //echo "Seemed to insert into the commission table." . "
"; } /* LOADS ALL OF COMMISSION FORM CONTENTS, ISSUED USERNAME AND PASSWORD INTO messageboard TABLE IF NEW CUSTOMER (noMatch = 0) */ $sql = mysql_query("INSERT INTO messageboard (date, fname, lname, street_apt_number, city, state, zip_code, email, username, password, comments) VALUES ('$date','$fname','$lname','$address','$city','$state','$zip','$email','$GenUserNm','$GenPassword','$comments')"); if (!$sql) { //echo "Did not insert user's info from commission_form.html into messageboard table (new user)."; } else { //echo "Inserted user's info from commission form into messageboard table just fine."; } }//END IF NO MATCH (NEW CUSTOMER) // // //SELECTS LAST ID NUMBER RECORDED IN messageboard TABLE FOR USE IN SELF EMAIL ALERTS // // $lastID = mysql_query("SELECT comid FROM messageboard ORDER BY comid DESC LIMIT 1"); if (!$lastID) { //echo "Did not query messageboard table to select the last comid number and put into lastMbId variable." . mysql_error() . "
"; } else { while ($anotherRow = mysql_fetch_array($lastID)) { global $lastMbId; $lastMbId = $anotherRow['comid']; //echo $lastMbId . " is the value of the last ID from the messageboard table." . "
"; break; } }//END ELSE // // //SELECTS LAST ID NUMBER RECORDED IN commission TABLE FOR USE IN SELF EMAIL ALERTS // // $otherLastID = mysql_query("SELECT comid FROM commission ORDER BY comid DESC LIMIT 1"); if (!$otherLastID) { //echo "Did not query commission table to select the last comid number and put into lastComId variable." . mysql_error() . "
"; } else { while ($rowz= mysql_fetch_array($otherLastID)) { global $lastComId; $lastComId = $rowz['comid']; //echo $lastComId . " is the value of the last ID number in commission table." . "
"; break; } }//END ELSE // // //SENDS NOTICE TO MY EMAIL THAT A NEW COMMISSION FORM HAS BEEN SUBMITTED ***********BE SURE TO UNCOMMENT FOR PRODUCTION************** // // $to = 'kiefer@kieferart.com'; $subject = 'New KieferArt Custom Painting Inquiry'; $message = "A commission form was submitted on" . " " . $date . " from " . $fname . " " . $lname . ", record number: " . $lastComId . "."; $headers = 'From: kiefer@kieferart.com'; mail($to, $subject, $message, $headers); // // //SENDS NOTICE TO MY EMAIL THAT AN ENTRY HAS BEEN MADE INTO messageboard TABLE // // $to = 'kiefer@kieferart.com'; $subject = 'New entry into messageboard table'; $message = "A messageboard entry was made on" . " " . $date . " from " . $fname . " " . $lname . ", record number: " . $lastMbId . "."; $headers = 'From: kiefer@kieferart.com'; mail($to, $subject, $message, $headers); // // //EXTRACTS UPLOADED FILES FROM THE uploads/ FOLDER // // if ((isset($fileCount)) && ($fileCount > 0))//IF AT LEAST ONE FILE IS UPLOADED BY USER { echo "
"; $picURL = array($picOneURL, $picTwoURL, $picThreeURL, $picFourURL, $picFiveURL, $picSixURL);//PUTS ALL UPLOADED FILE URLs, INCLUDING NULLS IF NO FILE, INTO ARRAY $i = 0; foreach ($picURL as $value) { if ($value != "")//IF A FILE URL EXISTS IN THE ARRAY { echo "";// PRINTS CAPTION, WHETHER WITH A BREAK OR NOT //echo "This is the contents of " . $picURL[$i] . " extracted from the uploads folder." . "
"; echo ""; }//END IF $i = $i + 1;//INCREMENTS ARRAY INDEX FOR REFERENCES IN CODE }//END FOREACH URL ARRAY ELEMENT echo "
"; $filename = $picURL[$i]; list($width, $height) = getimagesize($filename);//EXTRACTS WIDTH AND HEIGHT OF IMAGE if ($width > $height)//WIDTH IS GREATER THAN HEIGHT { $newWidth = 200;//THUMBNAIL SIZE OF WIDTH $multip = $width / 200; $roundedM = round($multip, 2);//PROPORTION OF NEW WIDTH TO OLD WIDTH $newHeight = round($height / $roundedM); $newHieght = round($newHeight);//NEW HEIGHT PROPORTIONED TO NEW WIDTH } if ($height > $width)//HEIGHT IS GREATER THAN WIDTH { $newHeight = 200;//THUMBNAIL SIZE OF HEIGHT $multip = $height / 200;//PROPORTION OF NEW HEIGHT TO OLD HEIGHT $roundedM = round($multip, 2); $newWidth = round($width / $roundedM); $newWidth = round($newWidth);//NEW WIDTH PROPORTIONED TO NEW HEIGHT }//END IF if ($height == $width)//DIMENSIONS ARE EQUAL { $newHeight = 200;//REDUCE TO THUMBNAIL SIZE $newWidth = 200;//" " " " } echo "" . "
"; $string = $picURL[$i];//PUT EACH URL VALUE IN A STRING //echo $string . "
" . " is the value of one of the URLs from the array." . "
"; $picCaption = substr($string, 8);//TAKES THE uploads/ AWAY FROM THE STRING, LEAVING JUST THE FILE NAME if (strlen($picCaption) > 50)//KEEPS THE FILE NAME STRING FROM BEING TOO WIDE. IF IT IS WIDER THAN THE MAX WIDTH OF THE THUMBNAIL, BREAKS { $cap1 = substr($picCaption, 0, 35);//LOADS THE FIRST 35 CHARACTERS INTO VARIABLE 1 $cap2 = substr($picCaption, 35);//LOADS THE SECOND PART OF THE FILE NAME INTO VARIABLE 2 $picCaption = $cap1 . "
" . $cap2;//LOADS BOTH WITH A BREAK INTO VARIABLE } echo ""; echo $picCaption . "
"; }//END IF FILE COUNT IS GREATER THAN 0 else { //echo "There were no files uploaded." . "
"; } if (isset($_SESSION['switch'])) { $secondTimeHit = mysql_query("select hitCounter from commission order by comid desc limit 1"); if (!$secondTimeHit) { //echo "No query to find last hit number." . "
"; } else { while ($row = mysql_fetch_array($secondTimeHit)) { global $secondHit; $secondHit = $row[0]; break; }//END WHILE //echo "Session switch for hit counter is SET. Value of new hit number is " . $secondHit . "
"; }//END IF QUERY WORKED } else { $firstTimeHit = mysql_query("select hitCounter from commission order by comid desc limit 1"); if (!$firstTimeHit) { //echo "No query to find last hit number." . "
"; } else { while ($row = mysql_fetch_array($firstTimeHit)) { global $firstHit; $firstHit = $row[0]; break; }//END WHILE //echo "Session switch for hit counter is NOT SET. Value of new hit number is " . $firstHit . "
"; }//END IF QUERY WORKED } }//END IF INPUT CHECKS OKAY ?>
HOME  |   INTRODUCTION  |   FINE ART GALLERY  |   PORTRAIT GALLERY   |   COMMISSION INFO & PRICING   |   CARDS/WRITING   |   LESSONS   |   WHAT'S NEW AT KIEFERART  |   KIEFER
 © 2011 - 2013 Oil Painting by Kiefer  All Rights Reserved.
Website developed by Karen Kiefer.   Inquire within.