Data Requisition Form

By filling this form, you agree to the terms and conditions in the MAST Data Usage Policy.

There was a problem with your submission. Errors are displayed below in red.

Thank you for showing your interest in the data. We will send a link to download the data shortly.
You will be redirected to the main page now...

CAPTCHA Image [ Click here to load different image ]


$value) { if (!is_array($key)) { // sanitize the input data $value = strip_tags($value); $_POST[$key] = htmlspecialchars(stripslashes(trim($value))); } } $startdate = @$_POST['ct_startdate']; $enddate = @$_POST['ct_enddate']; $name = @$_POST['ct_name']; $org = @$_POST['ct_org']; $email = @$_POST['ct_email']; $captcha = @$_POST['csrftoken_captcha_code']; // the user's entry for the captcha code $errors = array(); // initialize empty error array if (strlen($name) < 3) { $errors['name_error'] = 'Your name is required'; } if (strlen($email) == 0) { $errors['email_error'] = 'Email address is required'; } else if ( !preg_match('/^(?:[\w\d-]+\.?)+@(?:(?:[\w\d]\-?)+\.)+\w{2,63}$/i', $email)) { $errors['email_error'] = 'Email address entered is invalid'; } if (strlen($org) < 3) { $errors['org_error'] = 'Organization name is required'; } if (strlen($startdate) != 8) { $errors['startdate_error'] = 'Start Date is required and must be of 12 digits'; } else if( !preg_match("/^[0-9]*$/", $startdate)) { $errors['startdate_error'] = 'Start date should contain numerics only.'; } if (strlen($enddate) != 8) { $errors['enddate_error'] = 'End Date is required and must be of 12 digits'; } else if( !preg_match("/^[0-9]*$/", $enddate)) { $errors['enddate_error'] = 'Start date should contain numerics only.'; } // Only try to validate the captcha if the form has no errors if (sizeof($errors) == 0) { $securimage = new Securimage(); if ($securimage->check($_POST['csrftoken_captcha_code']) == false) { // the code was incorrect $errors['captcha_error'] = 'Incorrect security code
'; } } if (sizeof($errors) == 0) { // no errors, send the form #date_default_timezone_set('Asia/Kolkatta'); $time = date('l, d M Y H:i:s'); $message = "Thank you for showing your interest in our data. We have received your following information via email. We will get back to you soon.

" . "Name: $name
" . "Email: $email
" . "Start Date: $startdate
" . "End Date: $enddate
" . "Organization: $org" . "

IP Address: {$_SERVER['REMOTE_ADDR']}
" # . "Time: $time
" . "Browser: " . htmlspecialchars($_SERVER['HTTP_USER_AGENT']) . "
"; $message = wordwrap($message, 70); $mail = new PHPMailer(true); try { $mail->SMTPDebug = 0; $mail->isSMTP(); //$mail->Host = 'ssl://prlmail.lan.prl.res.in'; $mail->Host = 'ssl://172.16.0.5'; $mail->SMTPAuth = true; $mail->Username = 'usodataarchive'; //Please change your username $mail->Password = 'VielSpass#10'; // Please change password $mail->Port = 465; $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); $mail->setFrom('[email protected]', 'USO Data Archive'); $mail->addAddress($email); $mail->addReplyTo('[email protected]'); $mail->addCC('[email protected]'); // $mail->addBCC('[email protected]'); $mail->addCC('[email protected]'); $mail->isHTML(true); $mail->Subject = 'Your request for MAST data'; # you can change-this $mail->Body = $message; $mail->AltBody = $message; $mail->send(); $_SESSION['ctform']['error'] = false; // no error with form $_SESSION['ctform']['success'] = true; // message sent $_SESSION['ctform']['ct_startdate'] = ""; $_SESSION['ctform']['ct_enddate'] = ""; $_SESSION['ctform']['ct_name'] = ""; $_SESSION['ctform']['ct_org'] = ""; $_SESSION['ctform']['ct_email'] = ""; } catch (Exception $e) { //echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; echo "Error : Message could not be sent. "; } } else { // save the entries, this is to re-populate the form $_SESSION['ctform']['ct_startdate'] = $startdate; $_SESSION['ctform']['ct_enddate'] = $enddate; $_SESSION['ctform']['ct_name'] = $name; $_SESSION['ctform']['ct_org'] = $org; $_SESSION['ctform']['ct_email'] = $email; foreach($errors as $key => $error) { // set up error messages to display with each field $_SESSION['ctform'][$key] = "$error"; } $_SESSION['ctform']['error'] = true; // set error floag } } // POST } $_SESSION['ctform']['success'] = false; // clear success value after running ?>