MOON
Server: Apache
System: Linux ip-208-109-13-31.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els4.x86_64 #1 SMP Sat Aug 31 06:58:57 UTC 2024 x86_64
User: durgeshpandey215 (1013)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/admin/user-edit.php
<?php
require('../application_top.php');
require('protect-admin.php');
$id = (isset($_REQUEST['id']) && ($_REQUEST['id']))? decode($_REQUEST['id']) : 0;

$db->where("userid",$id);
$rowcust = $db->getOne('register');
?>
<? $pagename=($rowcust['isvendor'])? "manageseller":"managecust"; require "header.php";?>

	<h1>Edit <?=($rowcust['isvendor'])? "Seller":"Customer";?> Account</h1>

<div class="w3-card w3-white" style="margin:0 auto;">
	<h4 class="w3-blue w3-padding">Edit Account</h4>

	<form action="<?=HTTP_SERVER;?>admin/user-edit-handle.php" class="close_form w3-container w3-padding" method="post" id="commonform" enctype="multipart/form-data">		
	<div class="w3-row">	
		<div class="w3-col m5 s12 w3-container">
		<!--following 2 lines prevent chrome to autofil saved username n password -->
		<input style="display:none">
		<input type="password" style="display:none">
		
		<center>
		Your Display Pic 
			<br/>
			<script type="text/javascript">
				$(function(){
					<? for($i=1;$i<=1;$i++){?>
					$("#pic<?=$i;?>").on("change", function()
					{
						var files = !!this.files ? this.files : [];
						if (!files.length || !window.FileReader){ // no file selected, or no FileReader support
							//imgDiv1
						return; 
						}
						
						if (/^image/.test( files[0].type)){ // only image file
							var reader = new FileReader(); // instance of the FileReader
							reader.readAsDataURL(files[0]); // read the local file

							reader.onloadend = function(){ // set image data as background of div
								$("#imgpic<?=$i;?>").attr("src", this.result);
								$("#fileinputDiv<?=$i;?>").hide();
								$("#imgDiv<?=$i;?>").show();
							}
						}
					});
					<? } ?>
				});
				</script>
			
				<?
				for($i=1;$i<=1;$i++){
				if($rowcust['pic'.$i]){ $srurl = HTTP_SERVER."images/users/".$rowcust['pic'.$i]; }else{ $srurl = ""; }
				?>
				<div id="imgDiv<?=$i;?>" class="imguploderDiv" style="display:<?=($srurl)? "":"none";?>;">
					<img src="<?=$srurl;?>" id="imgpic<?=$i;?>"/>
					<span onclick="showhideDeleteDP('fileinputDiv<?=$i;?>','imgDiv<?=$i;?>','<?=$i;?>','<?=encode($rowcust['userid']);?>')">DELETE X</span>
				</div>
				<div id="fileinputDiv<?=$i;?>" class="imguploderDiv" style="background-image:url('<?=HTTP_SERVER;?>images/upload-photo.png');display:<?=($srurl)? "none":"";?>;">
				<input id="pic<?=$i;?>" name="pic<?=$i;?>" type="file" class="img" />
				<span>PHOTO <?=$i;?></span>
				</div>
				<? } ?>
		</center><br/>
		
		</div>
		<div class="w3-col m7 s12 w3-container">
			
Mobile No.* :
<input type="number" name="mobileno" value="<?=$rowcust['mobno'];?>" id="mobileno" class="w3-input number masterTooltip" title="Enter your 10 digits mobile number." placeholder="10 digits Mobile number" maxlength="10" autocomplete="off" required/><div id="mobnoDiv"></div>
<br/>
Password (Leave blank if do not want to change):<br/>
<input type="password" name="ipassword" value="" id="newpassword" maxlength="25" class="w3-input"/>
<br/>
Full Name* :<br/>
<input type="text" name="fullname" id="fullname" value="<?=$rowcust['fullname'];?>" placeholder="Full Name"  maxlength="40" class="w3-input" required/></td>
<br/>
Emailid :<br/>
<input type="text" name="emailid" value="<?=$rowcust['emailid'];?>" class="w3-input email" id="email" placeholder="Email id"/>
<br/>
<?
//form token below
$token = md5(uniqid(rand(), true));
$_SESSION['token'] = $token;
?>
<br/><center>
<input type="hidden" name="token" value="<?=$token?>"/>
<input type="hidden" name="id" value="<?=encode($id)?>"/>
<input type="submit" class="w3-btn w3-pink" id="submitbutton" value="Save"/>
</center>
		</div>		
	</div>
	</form>	
</div>

<? require "../footer.php";?>