if($_POST) {
require_once("dompdf-0.5.1/dompdf_config.inc.php");
if ( isset( $_POST["abs_text"] ) ) {
if ( get_magic_quotes_gpc() ) {
$_POST["abs_text"] = stripslashes($_POST["abs_text"]);
$_POST["abs_title"] = stripslashes($_POST["abs_title"]);
}
//$old_limit = ini_set("memory_limit", "16M");
$abs_title = ucfirst($_POST["abs_title"]);
if(count($_POST["abs_author_lastname"])>1) {
foreach($_POST["abs_author_lastname"] as $key=>$author) {
$author = ucfirst($_POST["abs_author_firstname"][$key])." ".ucfirst($_POST["abs_author_lastname"][$key]);
if($_POST["abs_presenter"][$key]==1) {
$abs_authors[] = "".$author." (".($key+1).")";
} else {
$abs_authors[] = $author." (".($key+1).")";
}
}
$abs_authors = implode(', ',$abs_authors);
} else {
$author = ucfirst($_POST["abs_author_firstname"][0])." ".ucfirst($_POST["abs_author_lastname"][0]);
if($_POST["abs_presenter"][0]==1) {
$abs_authors = "".$author."";
} else {
$abs_authors = $author;
}
}
if(count($_POST["abs_author_lastname"])>1) {
foreach($_POST["abs_author_lastname"] as $key=>$author) {
$abs_affiliations[] = "(".($key+1).") ".ucfirst($_POST["abs_affiliation"][$key]);
}
$abs_affiliations = implode(', ',$abs_affiliations);
} else {
$abs_affiliations = ucfirst($_POST["abs_affiliation"][0]);
}
$html = '
'.stripslashes(get_option('abstracts_html_header')).'
'.$abs_title.'
'.$abs_authors.'
'.$abs_affiliations.'
'.nl2br($_POST["abs_text"]).'
';
$wpdb->show_errors();
$wpdb->query($wpdb->prepare("INSERT INTO ".$wpdb->prefix."submitted_abstracts (title,authors,author_affiliation,text,html,name,email,presentation_mode,data) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,NOW())",$abs_title,$abs_authors,$abs_affiliations,$_POST["abs_text"],$html,$_POST["your_firstname"].' '.$_POST["your_lastname"],$_POST["your_email"],$_POST["your_preference"]));
$abstract_id = $wpdb->insert_id;
require_once(ABSPATH."wp-includes/class-phpmailer.php");
require_once(ABSPATH."wp-includes/class-smtp.php");
$keys = array('[AUTHOR]','[ABSTRACT_TITLE]','[BLOGTITLE]');
$values = array($_POST["your_firstname"].' '.$_POST["your_lastname"], $abs_title, get_option('blogname'));
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->AddAddress($_POST["your_email"]);
$mail->Body = str_replace($keys, $values, get_option('abstracts_mail_template'));
$mail->From = get_option('admin_email');
$mail->FromName = get_option('blogname');
$mail->Subject = 'Abstract Submission - '.get_option('blogname');
$mail->Send();
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->AddAddress(get_option('admin_email'));
$mail->Body = 'You have a new abstract for \''.get_option('blogname').'\'0,'filename'=>$fileName,'filesize'=>$fileSize,'error'=>'File not supported');
} else {
$uploads[] = array('id'=>0,'filename'=>$fileName,'filesize'=>$fileSize,'error'=>'File too big');
}
}
}
}
}
?>
Review Your Abstract
=$html?>
Attachments
Here you can download a pdf version of your submitted abstract and verify your attachments.
foreach($uploads as $attachment) { ?>
if($attachment['id']!=0) { ?>
} else { ?>
=$attachment['filename']?> [=$attachment['error']?>]
} ?>
} ?>
Click the above link to complete the abstract submission process.
} else { ?>
} ?>