ob_start();
include("http://www.mopla.org/participate/galleries/db_conn.php");
session_start();
if(isset($_POST['Submit'])){
////////////// IMAGES ///////////////////////
if(!empty($_FILES[images][name][0]))
{
while(list($key,$value) = each($_FILES[images][name]))
{
if(!empty($value))
{
$NewName = time()."_".CleanFileName($value);
$ext = strtolower(substr($NewName, strrpos($NewName, '.') + 1));
if ($ext == "jpg" || $ext == "gif" || $ext == "png" || $ext == "jpeg")
{
copy($_FILES[images][tmp_name][$key], $upload_dir.$NewName);
$MyImages[] = $NewName;
}else { $error[] = "File $value is not in correct format"; }
}
}//wend
$ImageStr = implode("|", $MyImages);
}
if(count($error) < 1){
if(isset($_POST['title'])) { foreach($_POST['title'] as $t) $titleArr[] = htmlspecialchars("$t", ENT_QUOTES); } $title = implode($titleArr ,"|");
$query = sprintf("INSERT INTO gallery SET name = '%s', address = '%s', city = '%s', state = '%s', zip = '%s',phone = '%s',opt = '%s',exdate = '%s',gtitle = '%s',opday = '%s',gdesc = '%s',images = '%s', title = '%s', regDate = '%s' "
, mysql_real_escape_string($_POST[name]), mysql_real_escape_string($_POST[address]), mysql_real_escape_string($_POST[city]), mysql_real_escape_string($_POST[state]),mysql_real_escape_string($_POST[zip]),mysql_real_escape_string($_POST[phone]),mysql_real_escape_string($_POST[opt]),mysql_real_escape_string($_POST[exdate]),mysql_real_escape_string($_POST[gtitle]),mysql_real_escape_string($_POST[opday]),mysql_real_escape_string($_POST[desc]),$ImageStr,$title,$today);
if(mysql_query($query)) { $uid = mysql_insert_id(); $_SESSION['id'] = $uid; $disMSG = true; sent_mail($_POST[email]); } else {$disMSG = false;}
}else {$disMSG = false; $errorMSG = implode(" ", $error); }
}
?>
PARTICIPATE
Galleries
Get involved with Month of Photography Los Angeles by:
• Listing your exhibition in the EXHIBITIONS section of the Month of Photo LA website by filling out the form below and BE IN ASSOCIATION with us.
• Becoming a FEATURED exhibition or event by emailing us here here .
if($_POST['Submit']) { if($disMSG) { ?>Hi =$_POST[name]?>
Thank you so much for submitting your gallery exhibition for our calendar listing. Please feel free to contact us if you have any questions regarding MOPLA. We look forward to sharing your event listing with our followers and constituents.
} else {?>
Error with your submitted data: =$errorMSG?>
} }?>