| Server IP : 192.169.170.185 / Your IP : 216.73.216.97 Web Server : Apache System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64 User : akhilnew ( 1712764) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/akhilnew/public_html/reflectivejournals.com/inc/ |
Upload File : |
<?php
if($decrypt_focus === '[ARTICLE_SUBMISSION]'):
if(! isset($_POST['zipcode']) OR $_POST['zipcode'] !== '' OR strlen($_POST['zipcode']) > 0):
die(result(false, 'You are not authorized user.'));
endif;
$name = remexspace(escape($_POST['name']));
$name = str_replace('\"', '', strip_tags($name));
$name = preg_replace('/[!?,.](?![!?,.\s])/', '$0 ', $name);
$name = htmlentities($name, ENT_QUOTES);
$name = mb_convert_case($name, MB_CASE_TITLE, "UTF-8");
$name = stripslashes(stripcslashes($name));
$email = remspace(sanitize_email(escape($_POST['email'])));
$email = strtolower(strip_tags($email));
$phones = remexspace(sanitize(escape($_POST['phone'])));
$phones = preg_replace('/[^0-9+-,]/', '', strip_tags($phones));
$address = remexspace(sanitize(escape($_POST['address'])));
$address = str_replace(array('\"', '\r\n'), array('', PHP_EOL), strip_tags($address));
$address = preg_replace('/[!?,.](?![!?,.\s])/', '$0 ', $address);
$address = htmlentities($address, ENT_QUOTES);
$address = preg_replace_callback("/[a-zA-Z]+/", "change_case", $address);
$address = stripslashes(stripcslashes($address));
$title = remexspace(escape($_POST['title']));
$title = str_replace('\"', '', strip_tags($title));
$title = preg_replace('/[!?,.](?![!?,.\s])/', '$0 ', $title);
$title = htmlentities($title, ENT_QUOTES);
$title = preg_replace_callback("/[a-zA-Z]+/", "change_case", $title);
$title = stripslashes(stripcslashes($title));
$abstract = remexspace(escape($_POST['abstract']));
$abstract = str_replace(array('\"', '\r\n'), array('', PHP_EOL), strip_tags($abstract));
$abstract = preg_replace('/[!?,.](?![!?,.\s])/', '$0 ', $abstract);
$abstract = htmlentities($abstract, ENT_QUOTES);
$abstract = preg_replace_callback("/[a-zA-Z]+/", "change_case", $abstract);
$abstract = stripslashes(stripcslashes($abstract));
$reCAPTCHA = isset($_POST['g-recaptcha-response']) ? $_POST['g-recaptcha-response'] : '';
$responseData = gCAPTCHA($reCAPTCHA);
$val_exts = explode(',', $extensions);
$creation = date('Y-m-d H:i:s');
if(empty($name)):
die(result(false, "Please enter your name."));
elseif(empty($email)):
die(result(false, "Please enter your email address."));
elseif(!validate_email($email)):
die(result(false, "Please enter a valid email address."));
elseif((empty($phones) && strlen($phones) == 0)):
die(result(false, "Please enter your phone number."));
elseif(empty($address)):
die(result(false, "Please enter your institute address."));
elseif(empty($title)):
die(result(false, "Please enter your title of the submission."));
elseif(empty($abstract)):
die(result(false, "Please enter your abstract."));
elseif(!file_exists($_FILES['file']['tmp_name'][0])):
die(result(false, "Please choose your article file."));
elseif(!$reCAPTCHA):
die(result(false, 'Please click on the reCAPTCHA box.'));
elseif(!$responseData->success):
die(result(false, 'Robot verification failed, Please try again.'));
else:
$file = $_FILES['file']['name'];
$filetmp= $_FILES['file']['tmp_name'];
if(!is_dir(rtrim($articleuploadpath, '/'))):
@mkdir(rtrim($articleuploadpath, '/'));
endif;
$directory = date('ymdhis');
@mkdir($articleuploadpath . $directory);
$count = count($filetmp);
for($i = 0; $i < $count; $i++):
if(@is_uploaded_file($filetmp[$i])):
$fileext = strtolower(pathinfo($file[$i], PATHINFO_EXTENSION));
$newfile = str_pad($i + 1, 2, 0, STR_PAD_LEFT) . date('ymdhis') . '.' . $fileext;
if(!in_array($fileext, $val_exts)):
die(result(false, "Please choose a valid file."));
elseif(!move_uploaded_file($filetmp[$i], $articleuploadpath . $directory . '/' . $newfile)):
die(result(false, "File has not been uploaded."));
else:
$stat = true;
endif;
else:
die(result(false, "File has not been uploaded."));
endif;
endfor;
if($stat === true):
$stmt = $mysqli->prepare("INSERT INTO articles(fullname, address, email, phone, title, abstract, directory, creation) VALUES(?, ?, ?, ?, ?, ?, ?, ?)") or die(result(false, "An error occurred. Please try after some time."));
$stmt->bind_param('ssssssss', $name, $address, $email, $phones, $title, $abstract, $directory, $creation);
$e = $stmt->execute();
$insertid = $stmt->insert_id;
$stmt->close();
if($e):
$status = 'Pending';
$stmt = $mysqli->prepare("INSERT INTO articlestatus(email, title, status, creation) VALUES(?, ?, ?, ?)") or die(result(false, "An error occurred. Please try after some time."));
$stmt->bind_param('ssss', $email, $title, $status, $creation);
$stmt->execute();
$stmt->close();
insertemail($email);
$wsubject = 'New article submission. #' . $insertid;
$wbody = '<h4>Article Details:</h4>';
$wbody .= '<table border="0" cellpadding="5" cellspacing="0" width="700">';
$wbody .= '<tr bgcolor="#ccc"><td align="left" valign="top" width="180">Full Name</td><td align="left" valign="top">: ' . $name . '</td></tr>';
$wbody .= '<tr bgcolor="#fff"><td align="left" valign="top" width="180">Email</td><td align="left" valign="top">: ' . $email . '</td></tr>';
$wbody .= '<tr bgcolor="#ccc"><td align="left" valign="top" width="180">Phone</td><td align="left" valign="top">: ' . $phones . '</td></tr>';
$wbody .= '<tr bgcolor="#fff"><td align="left" valign="top" width="180">Institute Address</td><td align="left" valign="top">: ' . $address . '</td></tr>';
$wbody .= '<tr bgcolor="#ccc"><td align="left" valign="top" width="180">Title of submission</td><td align="left" valign="top">: ' . $title . '</td></tr>';
$wbody .= '</table>';
$csubject= 'New article submission by ' . $name . '. #' . $insertid;
$cbody = 'Dear ' . $name . ',<br><br>Thank you for submitting the manuscript to the <i>' . $websitename . '</i>.<br><br>';
$cbody .= '<h4>Article Details:</h4>';
$cbody .= '<table border="0" cellpadding="5" cellspacing="0" width="700">';
$cbody .= '<tr bgcolor="#ccc"><td align="left" valign="top" width="180">Full Name</td><td align="left" valign="top">: ' . $name . '</td></tr>';
$cbody .= '<tr bgcolor="#fff"><td align="left" valign="top" width="180">Email</td><td align="left" valign="top">: ' . $email . '</td></tr>';
$cbody .= '<tr bgcolor="#ccc"><td align="left" valign="top" width="180">Phone</td><td align="left" valign="top">: ' . $phones . '</td></tr>';
$cbody .= '<tr bgcolor="#fff"><td align="left" valign="top" width="180">Institute Address</td><td align="left" valign="top">: ' . $address . '</td></tr>';
$cbody .= '<tr bgcolor="#ccc"><td align="left" valign="top" width="180">Title of submission</td><td align="left" valign="top">: ' . $title . '</td></tr>';
$cbody .= '</table><br><br>';
$cbody .= '<div style="line-height:18px">--<br>Regards<br>' . str_replace(PHP_EOL, '<br>', $signature) . '</div><br><br>';
$cbody .= '<b style="color:#009933"><img src="' . $imageurl . 'tree.png" alt="Tree" /> Please consider the environment before you print this email.</b>';
$cc = '';$bcc = '';$attachments = glob($articleuploadpath . $directory . '/*');
@PHPMail($websiteemail, $cc, $bcc, $wsubject, $wbody, $attachments, $fromname, $fromemail, $name, $email);
@PHPMail($email, $cc, $bcc, $csubject, $cbody, array(), $fromname, $fromemail, $fromname, $fromemail);
die(result(true, "Thank you, Your article has been submitted!"));
else:
die(result(false, "An error occurred. Please try after some time."));
endif;
else:
die(result(false, "An error occurred. Please try after some time."));
endif;
endif;
else:
die(result(false, "Access Denied!"));
endif;
?>