First Name is required.'); $errors .= reqFieldCheck($last_name, '
  • Last Name is required.
  • '); $errors .= reqFieldCheck($email, '
  • E-mail Address is required.
  • '); if(strlen($email) > 0 && !filter_var($email, FILTER_VALIDATE_EMAIL)) { $errors .= '
  • E-mail Address is invalid.
  • '; } $errors .= reqFieldCheck($exhibit_name, '
  • Exhibit name is required.
  • '); $errors .= reqFieldCheck($exhibit_desc, '
  • Exhibit description is required.
  • '); if(strlen($phone_area) >0 || strlen($phone_pre) >0 || strlen($phone_suf) >0) { $ph_errors = ''; $ph_errors .= reqFieldCheck($phone_area, 'error', 3); $ph_errors .= reqFieldCheck($phone_pre, 'error', 3); $ph_errors .= reqFieldCheck($phone_suf, 'error', 4); if($ph_errors != '') { $errors .= '
  • Phone is invalid. [optional field]
  • '; } } $myvar = processImage("screen","/ip/cagcc/www/uploads/"); if ($myvar[0]) { echo $myvar[0]; // ERRORS!! $theUploadedImageName == ''; } else { $theUploadedImageName=$myvar[1]; } // No errors if($errors == '') { //Send E-mail $to = 'cagcc@iupui.edu'; $from = $email; $subject = 'Cultural Arts Gallery Submission Form: ' . $exhibit_name; $msg_content = 'CONTACT INFORMATION:' . "
    " . $first_name . ' ' . $last_name . "
    " . $phone . "
    " . $email . "
    " . $org . "

    " . 'EXHIBIT INFORMATION: ' . "
    " . 'Exhibit Name: ' . $exhibit_name . "
    " . 'Exhibit Description: ' . $exhibit_desc; $msg_content .= "

    " . 'Sample Image: http://www.iupui.edu/~cagcc/uploads/' . $theUploadedImageName; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'From: ' . $from . "\r\n" .'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to, $subject, $msg_content, $headers); } } else { $first_name = ''; $last_name = ''; $email = ''; $phone_area = ''; $phone_pre = ''; $phone_suf = ''; $org = ''; $exhibit_name = ''; $exhibit_desc = ''; } function processImage($screen,$targetDirectory) { // INCREASE THE MEMORY AVAILABLE TO THIS PHP SCRIPT // INCREASE THE AMOUNT OF TIME BEFORE THE SERVER TIMES OUT // because uploading and processing images can be hell on the server ini_set("memory_limit","2M"); ini_set("max_execution_time","120"); // INITIALIZING VARIABLES $errorOut=""; $name=""; // PHP GRABS THE TEMPORARY NAME OF THE UPLOADED FILE // THIS IS SOME RANDOM STRING - IT'S MEANINGLESS TO YOU. JUST UNDERSTAND // THAT, WHEN YOU UPLOAD A FILE TO THE SERVER, PHP NAMES IT SOMETHING WEIRD, // AND $tmp_name STORES THAT WEIRD NAME FOR US $tmp_name = $_FILES[$screen]["tmp_name"]; // PHP GRABS THE NAME OF THE UPLOADED FILE // SET THE NAME OF THE UPLOADED FILE TO LOWERCASE // THIS IS OPTIONAL - IT JUST DRIVES ME NUTS WHEN // FILENMAES ARE MIXED-CASE // IF YOU DON'T WANT THIS OPTION, DELETE THE LINE AND UNCOMMENT THE NEXT LINE $name = strtolower($_FILES[$screen]["name"]); // $name = $_FILES[$formFieldName]["name"]; // CHECKS TO SEE IF A FILE WAS UPLOADED if (strlen($name)>0) { // imageDetails STORES ALL KINDS OF INFO ABOUT THE IMAGE // check file mime type $imageDetails=getimagesize($tmp_name); $error=""; // is this an image?? if ($imageDetails===FALSE) { // ERROR MESSAGE! $error="Uploaded file (".$name.") is not a valid image"; } else { // CHECKS TO SEE IF THE FILE IS A GIF OR JPEG. // IF YOU DON'T NEED THIS FUNCTIONALITY, SIMPLY REMOVE THIS // ELSE STATEMENT ALTOGETHER if ($imageDetails[2]>2){ // ERROR MESSAGE! $error = "Uploaded image (".$name.") is not a GIF or JPG"; } } // ANY ERRORS? if (strlen($error)>0) { $errorOut.= "Error— Uploading image ".($i+1)." failed (".$error.")
    \n"; } else { // Check to see if file exists. If so, rename (add a zero!) and check again // note, if you will accept other file types, you must add those file types below) while (file_exists($targetDirectory.$name)) { $name=str_replace(".gif","0.gif",$name); $name=str_replace(".GIF","0.GIF",$name); $name=str_replace(".JPG","0.JPG",$name); $name=str_replace(".jpg","0.jpg",$name); } // move file out of temp to uploaded directory move_uploaded_file($tmp_name, $targetDirectory.$name); // SET FILE PERMISSIONS TO WORLD READABLE chmod($targetDirectory.$name, 0644); } } if (strlen($error)>0) $name=""; return(Array($errorOut,$name)); } ?> Submissions : Cultural Arts Gallery : IUPUI

    Submissions

    The Cultural Arts Gallery is always looking for artists to help us in our mission to raise awareness and appreciation for cultural diversity through the celebration of diverse visual art. If you are a local artist or student interested in defining and celebrating culture, please e-mail us! We are currently accepting submissions and look foward to receiving your resume and sample images.

    We are now accepting submissions for the January-December 2014 school year.

    Success!

    Thank you for your submission!

    Errors Found.

    Indicates required field.

    Contact Information

    Exhibit Information