[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit-payment-details.php
<?php include('header.php');$cid=base64_decode($_REQUEST['cid']); ?> <!-- USER --> <div class="inner-banner"> <img src="images/user-bg.jpg" alt="banner"> </div> <!-- Social Media Links --> <div class="company-details"> <div class="container"> <h1>Update Payment Options</h1> <br> <div class="theme-box aos-init aos-animate" data-aos="fade-down" style="transition:all 1600ms ease-in-out;text-align: center;display: block;"> <form method="post" action="" enctype="multipart/form-data"> <h2>Payment Options</h2> <br> <?php $count=1; $sr='visit_card'; $stmt =$show->readwithdata('visit_card','card_id',$cid); $num = $stmt->rowCount(); while ($row1 = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row1); $id=$row1['id']; ?> <div class="form-left-to-w3l " id="b_name"> <input type="text" placeholder="Paytm Number" name="paytm" value="<?=$row1['paytm']?>" id="paytm"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Paytm QR CODE</sub></label> <?php if ($row1['paytm_img'] !=''){ ?> <img src="documents/<?=$row1['paytm_img']?>" width="80px"; height="90px"; > <input type="file" name="paytm_img" id="paytm_img" onchange="return fileValidation('logo')" > <?php }else{?> <input type="file" name="paytm_img" id="logo1" onchange="return fileValidation('logo1')" > <?php }?> </div> <div class="form-left-to-w3l " id="b_name"> <input type="text" placeholder="PhonePe Number" name="phonepe" id="phonepe" value="<?=$row1['phonepe']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>PhonePe QR CODE</sub></label> <?php if ($row1['phonepay_img'] !=''){ ?> <img src="documents/<?=$row1['phonepay_img']?>" width="80px"; height="90px"; > <input type="file" name="phonepay_img" id="logo" onchange="return fileValidation('logo')" > <?php }else{?> <input type="file" name="phonepay_img" id="logo1" onchange="return fileValidation('logo1')" > <?php }?> </div> <div class="form-left-to-w3l " id="b_name"> <label>Google Pay Number</label> <input type="text" placeholder="Google Pay Number" name="gpay" id="gpay" value="<?=$row1['gpay']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Gpay QR CODE</sub></label> <?php if ($row1['gpay_img'] !=''){ ?> <img src="documents/<?=$row1['gpay_img']?>" width="80px"; height="90px"; > <input type="file" name="gpay_img" id="logo" onchange="return fileValidation('logo')" > <?php }else{?> <input type="file" name="gpay_img" id="logo1" onchange="return fileValidation('logo1')" > <?php }?> </div> <h2>Bank Account Details *</h2> <div class="form-left-to-w3l " id="b_name"> <label>Bank Name</label> <input type="text" placeholder="Bank Name Ex. HDFC, SBI, etc" value="<?=$row1['bank_name']?>" name="bank_name" > </div> <div class="form-left-to-w3l " id="b_name"> <label>Account Holder Name</label> <input type="text" placeholder="Account Holder Name" name="ac_name" id="" value="<?=$row1['ac_name']?>" > </div> <div class="form-left-to-w3l " id="b_name"> <label>Bank account Number</label> <input type="text" placeholder="Bank account Number" name="ac_no" id="" value="<?=$row1['ac_no']?>" > </div> <div class="form-left-to-w3l " id="b_name"> <label>IFSC Code</label> <input type="text" placeholder="IFSC Code" name="ifsc_code" id="ifsc_code" value="<?=$row1['ifsc_code']?>" > </div> <div class="form-sub-acc"> <div class="form-sub"> <input type="submit" class="" name="sub" id="sub" value="Save & Next"> <a href="edit-product-services.php?cid=<?=base64_encode($cid)?>" class="btn btn-success">Skip</a> </div> </div> </form> <?php } ?> <?php if(isset($_POST['sub'])){ $table='visit_card'; $allowed = ["paytm","gpay","phonepe","bank_name","ac_name","ac_no","ifsc_code"]; $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['card_id'] =$cid; $show->table ='visit_card'; $show->cols =$setStr; $show->id_name ='card_id'; $show->params =$params; //print_r($params); if($show->update_all()){ if(isset($_FILES['phonepay_img']['name'])) { $img=$show->imageEdit($_FILES['phonepay_img']['name']); if(move_uploaded_file($_FILES['phonepay_img']['tmp_name'],"documents/".$img)){ //$path='../documents/'.$logo; // unlink($path); $sq="update visit_card set phonepay_img='".$img."' where card_id='".$cid."'"; $stmt=$con->prepare($sq); $r5=$stmt->execute(); } } if(isset($_FILES['gpay_img']['name'])) { $img=$show->imageEdit($_FILES['gpay_img']['name']); if(move_uploaded_file($_FILES['gpay_img']['tmp_name'],"documents/".$img)){ //$path='../documents/'.$logo; // unlink($path); $sq="update visit_card set gpay_img='".$img."' where card_id='".$cid."'"; $stmt=$con->prepare($sq); $r5=$stmt->execute(); } } if(isset($_FILES['paytm_img']['name'])) { $img=$show->imageEdit($_FILES['paytm_img']['name']); if(move_uploaded_file($_FILES['paytm_img']['tmp_name'],"documents/".$img)){ //$path='../documents/'.$logo; // unlink($path); $sq="update visit_card set paytm_img='".$img."' where card_id='".$cid."'"; $stmt=$con->prepare($sq); $r5=$stmt->execute(); } } echo '<script> setTimeout(function() { swal({ title: "Thank You ", text: " Payment details Update. ", type: "success" }, function() { window.location = "edit-product-services.php?cid='.base64_encode($cid).'"; }); }, 1000); </script>'; } else{ echo "ss"; } } ?> </div> </div> </div> <?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.01 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