[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit_client.php
<?php $id=$_REQUEST['id']; include('header.php'); $show=new Oops($db); ?> <div id="page-wrapper"> <div class="main-page"> <div class="tables"> <div id="col-md-12"> <div class="form-grids row widget-shadow" data-example-id="basic-forms"> <div class="form-title"> <h4>Show Client-></h4> </div> <div class="form-body"> <?php $count=1; $sr='client'; $stmt =$show->readAll($sr,'client_id',$_REQUEST['id']); $num = $stmt->rowCount(); if($num>0){ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ $name1=ucfirst($row['name']); $mob1=$row['phone']; $city1=$row['city']; $state1=$row['state']; $pin1=$row['pincode']; $email1=$row['email']; $add=$row['address']; } } ?> <form method="post" enctype="multipart/form-data" > <div class="form-group"> <div class="col-md-6"> <label>Client ID</label> <input type="hidden" class="form-control" value="<?=$_REQUEST['id']?>" name="id" size="30" /> <input type="text" class="form-control" placeholder="Full Name" name="cli" value="<?=$_REQUEST['id']?>" size="30" required> </div> <div class="col-md-6"> <label>Client Name</label> <input type="text" class="form-control" placeholder="Full Name" name="name" value="<?php echo $name1; ?>" size="30" required> </div> <div class="clearfix"></div> </div> <div class="form-group"> <div class="col-md-6"> <label>Client Email</label> <input type="text" class="form-control" placeholder="Full Name" name="email" value="<?php echo $email1; ?>" size="30" required> </div> <div class="col-md-6"> <label>Client Phone</label> <input type="text" class="form-control" placeholder="Full Name" name="phone" value="<?php echo $mob1; ?>" size="30" required> </div> <div class="clearfix"></div> </div> <div class="form-group has-feedback"> <div class="col-md-6"> <label>City</label> <input type="text" class="form-control" value="<?php echo $city1; ?>" name="city" size="30" required> </div> <div class="col-md-6"> <label>State</label> <select name="state" required class="form-control"> <option value="">Choose</option> <?php $stmt=$show->state('state_list'); $r=$stmt->rowCount(); if($r>0){ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row['state']."'";if($state1==$row['state']) echo "selected";echo ">".$row['state']."</option>"; } } ?> </select> </div> <div class="clearfix"></div> </div> <div class="form-group has-feedback"> <div class="col-md-6"> <label>Pincode</label> <input type="text" class="form-control" pattern="[0-9]+" value="<?php echo $pin1; ?>" name="pincode" required> </div> <div class="col-md-6"> <label>Address</label> <input type="text" class="form-control" value="<?php echo $add; ?>" name="address" required> </div> <div class="clearfix"></div> </div> <div class="form-group"> <div class="col-md-6"> <input type="submit" class="btn btn-info" name="sub" value="Submit"> </div> <div class="clearfix"></div> </div></div> </form> <?php if(isset($_POST['sub'])){ $table='client'; $allowed = ["name","email","phone","address","state","pincode","city"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "uid") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars(strip_tags($_POST[$key])); } } $setStr = rtrim($setStr, ","); $params['client_id'] =$_REQUEST['id']; $show->table ='client'; $show->cols =$setStr; $show->id_name ='client_id'; $show->params =$params; if($show->update_all()){ echo "<script>alert('client has been updated');window.location.href='".$_SERVER['request_uri']."'</script>"; } else{ echo "ss"; } }?> </div> <script src="js/bootstrap-datepicker.js"></script> <script type="text/javascript"> // When the document is ready $(document).ready(function(){ $("#date1").datepicker({ format: 'dd-mm-yyyy', }); $("#date2").datepicker({ format: 'dd-mm-yyyy', }); $("#date3").datepicker({ format: 'dd-mm-yyyy', }); $("#date4").datepicker({ format: 'dd-mm-yyyy', }); }); </script> </div></div> </div></div> <!--footer--> <?php include('footer.php'); ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.52 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619