[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit_card.php
<?php include('header.php'); $cid=base64_decode($_REQUEST['cid']); ?> <!-- USER --> <div class="inner-banner"> <img src="images/user-bg.jpg" alt="banner"> </div> <div class="company-details"> <div class="container"> <h1>Update Company Details</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"> <?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"> <label>Edit Business or Company Name</label> <input type="text" placeholder="Enter Edit Company Name" value="<?=$row1['company_name']?>" name="company_name" id="em"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Company Logo <sub>300KB max size</sub></label> <?php if ($row1['logo'] !=''){ ?> <img src="documents/<?=$row1['logo']?>" width="80px"; height="90px"; > <input type="file" name="logo" id="logo" onchange="return fileValidation('logo')" > <?php }else{?> <input type="file" name="logo" id="logo1" onchange="return fileValidation('logo1')" > <?php }?> </div> <div class="form-left-to-w3l " id="b_name"> <label>Website Sub Domain Name</label> <input type="text" placeholder="Enter Sub Domailn Name Without Space*" value="<?=$row1['directory_name']?>" name="directory_name" id="domain" readonly> </div> <div class="form-left-to-w3l " id="b_name"> <label>Google Direction</label> <textarea placeholder="Google Direction link"></textarea> </div> <h2>Personal Details</h2> <div class="form-left-to-w3l " id="b_name"> <label>Full Name</label> <input type="text" placeholder="Full Name" name="contact_person1" value="<?=$row1['contact_person1']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Position</label> <input type="text" placeholder="Position / Designation (Ex Manager etc.)" name="designation" value="<?=$row1['designation']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Phone no</label> <input type="text" placeholder="Phone no" name="phone1" value="<?=$row1['phone1']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Alternate Phone no</label> <input type="text" placeholder="Alternate Phone no" name="phone2" value="<?=$row1['phone2']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Whatsapp no</label> <input type="text" placeholder="Whatsapp no" name="watsapp" value="<?=$row1['watsapp']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Full Address</label> <textarea placeholder=" Full Address" name="address"><?=$row1['address']?></textarea> </div> <div class="form-left-to-w3l " id="b_name"> <label>Email</label> <input type="email" placeholder=" Email" name="email" value="<?=$row1['email']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Website</label> <input type="text" placeholder="Website" name="company_website" value="<?=$row1['company_website']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Business Location</label> <input type="text" placeholder="Business Location" name="location" value="<?=$row1['location']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Company Est Date</label> <input type="text" placeholder="Enter Company Est Date" name="business_date" value="<?=$row1['business_date']?>"> </div> <div class="form-left-to-w3l " id="b_name"> <label>About your Company</label> <textarea placeholder="Tell Us About your Company/Business" name="about"><?=$row1['about']?></textarea> </div> <div class="form-sub-acc"> <div class="form-sub"> <input type="submit" class="" name="sub" id="sub" value="Edit"> <a href="edit-social-links.php?cid=<?=$cid?>" class="btn btn-success">Skip</a> </div> </div> <?php } ?> </form> <?php if(isset($_POST['sub'])){ $table='visit_card'; $allowed = ["company_name","company_website","email","contact_person1","phone1","phone2","address","business_date","location","designation","watsapp"]; $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, ","); $setStr .= ",`about` = :about"; $params['about'] =$_POST['about']; $params['card_id'] =$cid; $show->table ='visit_card'; $show->cols =$setStr; $show->id_name ='card_id'; $show->params =$params; //print_r($setStr); if($show->update_all()){ if(file_exists($_FILES['logo']['tmp_name']) || is_uploaded_file($_FILES['logo']['tmp_name'])) { $img=$show->imageEdit($_FILES['logo']['name']); move_uploaded_file($_FILES['logo']['tmp_name'],"documents/".$img); $sq="update visit_card set logo='".$img."' where card_id='".$cid."'"; $stmt=$con->prepare($sq); $r5=$stmt->execute(); } echo "<script>swal('Card has been updated');window.location.href='edit-social-links.php?cid=$cid'</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: 692.23 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