0 ){ //Ya existe ese trabajo
$submit_error = 3;
}
else{
$cadena= "insert into submission (ID, Title, Lastname, Firstname, Presentation, Abstract, email, session1, session2, session3, session4, session5,
session6, session7, session8, session9, session10, session11, Authors, Date,AuthorInstitution) values ( NULL,
'".mysqli_real_escape_string($enlace,$title)."',
'".mysqli_real_escape_string($enlace,$lastname)."',
'".mysqli_real_escape_string($enlace,$firstname)."',
'".$presentation."',
'".mysqli_real_escape_string($enlace,$abstract)."',
'".$email."',
'".$session1."','".$session2."','".$session3."','".$session4."','".$session5."','".$session6."','".$session7."','".$session8."',
'".$session9."','".$session10."','".$session11."',
'".mysqli_real_escape_string($enlace,$authorlist)."',
NULL,'".mysqli_real_escape_string($enlace,$authorInstitution)."')";
if (!mysqli_query($enlace, $cadena)) {
$submit_error = 1;
}
}
echo "insert into submission (ID, Title, Lastname, Firstname, Presentation, Abstract, email, session1, session2, session3, session4, session5,
session6, session7, session8, session9, session10, session11, Authors, Date,AuthorInstitution) values ( NULL,
'".$title."',
'".$lastname."',
'".$firstname."',
'".$presentation."',
'".$abstract."',
'".$email."',
'".$session1."','".$session2."','".$session3."','".$session4."','".$session5."','".$session6."','".$session7."','".$session8."',
'".$session9."','".$session10."','".$session11."',
'".$authorlist."',
NULL,'".$authorInstitution."')";
mysqli_close($enlace);
if(!$submit_error){
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// //envio del mail
// //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
require('class.phpmailer.php');
require('class.smtp.php');
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->SetLanguage('es', './language/');
$mail->Mailer = "smtp";
$mail->IsSMTP();
// echo "Probando mail....
";
//Le indicamos que el servidor smtp requiere autenticaci�n
$mail->SMTPAuth = true;
$mail->Host = "smtp.iaa.csic.es";
$mail->Port = 587;
$mail->SMTPSecure="STARTTLS";
//Le decimos cual es nuestro nombre de usuario y password
$mail->Username = "hinode12";
$mail->Password = "he25ks";
$mail->From = "hinode12@iaa.es";
$mail->FromName = "Hinode-12 conference";
$mail->Subject = "Your submission to the Hinode-12 Workshop";
$mail->AddAddress($email);
$mail->AddReplyTo("hinode12@iaa.es");
$mail->IsHTML(true);
//presentation 1: Oral, 2 : Poster, 3: Invitated
if($presentation == 1){ //Oral
$body = "Dear ".$firstname." ".$lastname.",
";
$body .= "
Thank you for submitting your contribution entitled \"".$title."\" to the Hinode-12 meeting. Notification of acceptance of contributions will be sent by June 1, 2018.";
$body .= "
Please remember to register for the meeting here if you have not done it yet. June 15, 2018 is the deadline for the early-bird registration fee.";
$body .= "
Also, remember that Granada is a very touristic city. Therefore we recommend you to book your accommodation as soon as possible here.";
$body .= "
Looking forward to see you in Granada next September!";
$body .= "
Kind regards,";
$body .= "
Hinode-12 LOC";
$altbody = "Dear ".$firstname." ".$lastname.",\n";
$altbody .= "\nThank you for submitting your contribution entitled \"".$title."\" to the Hinode-12 meeting. Notification of acceptance of contributions will be sent by June 1, 2018.\n\n";
$altbody .= " Please remember to register for the meeting here (https://granada-en.congresoseci.com/hinode12/index) if you have not done it yet. June 15, 2018 is the deadline for the early-bird registration fee.\n\n";
$altbody .= "Also, remember that Granada is a very touristic city. Therefore we recommend you to book your accommodation as soon as possible here (https://granada-en.congresoseci.com/hinode12/accommodation).\n\n";
$altbody .= "Looking forward to see you in Granada next September!\n\n";
$altbody .= "Kind regards,\n";
$altbody .= "Hinode-12 LOC\n";
}
else if($presentation ==2){ //Poster
$body = "Dear ".$firstname." ".$lastname.",
";
$body .= "Thank you for submitting your contribution entitled \"".$title."\" to the Hinode-12 meeting. Your poster will be displayed during the whole duration of the conference. Remember that the maximum allowed dimensions are 0.95 x 1.95 m^2.";
$body .= "
Please remember to register for the meeting here if you have not done it yet. June 15, 2018 is the deadline for the early-bird registration fee.";
$body .= "
Also, remember that Granada is a very touristic city. Therefore we recommend you to book your accommodation as soon as possible here.";
$body .= "
Looking forward to see you in Granada next September!";
$body .= "
Kind regards,";
$body .= "
Hinode-12 LOC";
$altbody = "Dear ".$firstname." ".$lastname.",\n\n";
$altbody .= "Thank you for submitting your contribution entitled \"".$title."\" to the Hinode-12 meeting. Your poster will be displayed during the whole duration of the conference. Remember that the maximum allowed dimensions are 0.95 x 1.95 m^2.\n\n";
$altbody .= " Please remember to register for the meeting here (https://granada-en.congresoseci.com/hinode12/index) if you have not done it yet. June 15, 2018 is the deadline for the early-bird registration fee.\n\n";
$altbody .= "Also, remember that Granada is a very touristic city. Therefore we recommend you to book your accommodation as soon as possible here (https://granada-en.congresoseci.com/hinode12/accommodation).\n\n";
$altbody .= "Looking forward to see you in Granada next September!\n\n";
$altbody .= "Kind regards,\n";
$altbody .= "Hinode-12 LOC\n";
}
else{ //$presentation == 3 //Invited
}
$mail->Body = $body;
$mail->AltBody = $altbody;
$exito=$mail->Send();
if(!$exito)
{
$submit_error = 2;
}
else{
$send_successful = 1;
}
//Se envía un mail a la cuenta hinode12@iaa.es para anotar la contribución
$mail->From = "hinode12@iaa.es";
$mail->FromName = "auto: Hinode-12 conference";
$mail->Subject = "New contribution by ".$firstname." ".$lastname;
$mail->clearAddresses();
$mail->AddAddress("hinode12@iaa.es");
$mail->AddReplyTo("hinode12@iaa.es");
$body = "Dear Hinode-12 LOC,
";
$body .= "There is a new contribution entitled \"".$title."\" by ".$firstname." ".$lastname." from ".$authorInstitution;
$body .= "
Kind regards,";
$body .= "
auto mail from Hinode-12 submission website.";
$mail->Body = $body;
$mail->AltBody = $body;
$mail->IsHTML(true);
$exito=$mail->Send();
} //end if(!$field_error)
} //end if(!$submit_error)
} //end if
?>