[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: home_page.php
<?php include('header.php'); $sq=$show->readAll('profile'); while($row = $sq->fetch(PDO::FETCH_ASSOC)){ $hid=$row['id']; $title1=$row['title1']==''?'NOT ADDED':$row['title1']; $content1=$row['content1']==NULL?'NOT ADDED':$row['content1']; $image1=$row['image1']==NULL?"http://".$_SERVER['HTTP_HOST']."$dir1/product_img/noimg.png":"http://" . $_SERVER['SERVER_NAME']."$dir1/product_img/".$row['image1'].""; $banner=$row['banner']==NULL?"http://".$_SERVER['HTTP_HOST']."$dir1/product_img/noimg.png":"http://" . $_SERVER['SERVER_NAME']."$dir1/product_img/".$row['banner'].""; $content2=$row['content2']==NULL?'NOT ADDED':$row['content2']; $image2=$row['image2']==NULL?"http://".$_SERVER['HTTP_HOST']."$dir1/product_img/noimg.png":"http://" . $_SERVER['SERVER_NAME']."$dir1/product_img/".$row['image2'].""; $image3=$row['image3']==NULL?"http://".$_SERVER['HTTP_HOST']."$dir1/product_img/noimg.png":"http://" . $_SERVER['SERVER_NAME']."$dir1/product_img/".$row['image3'].""; } ?> <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">Home Page Edit</div> </div> <form method="post" id="exampleValidation" data-toggle="validator" enctype="multipart/form-data" > <input type="hidden" name="tablename" value="user"> <div class="card-body"> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Banner Image/Video<span class="required-label"></span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <?php if($banner!=''){?> <iframe src="<?=$banner?>" allow="autoplay" allowfullscreen="" frameborder="0"></iframe> <?php }else{?> <img class="img-upload-preview img-circle" width="100" height="100" src="<?=$banner?>" alt="preview"> <?php } ?> <input type="file" class="form-control form-control-file" id="banner" onchange="" name="banner" accept="image/*" > <label for="banner" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Video</label> </div> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 text-right"> First Title<span class="required-label"></span></label> <div class="col-lg-10 col-md-9 col-sm-8"> <input type="text" class="form-control" id="name" value="<?=$title1?>" name="title1" placeholder="First Title( Left Sided)" > </div> </div> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 text-right">First Content <span class="required-label"></span></label> <div class="col-lg-10 col-md-9 col-sm-8"> <textarea class="form-control" name="content1" placeholder="First Content (Left Sided )"><?=$content1?></textarea> </div> </div> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 text-right">Image 1<span class="required-label"></span></label> <div class="col-lg-2 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="<?=$image1?>" alt=""> <input type="file" class="form-control form-control-file" id="image1" onchange="return fileValidation('icon1','500')" name="image1" accept="image/*" > <label for="image1" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> <label for="email" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 text-right">Image 2<span class="required-label"></span></label> <div class="col-lg-2 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="<?=$image2?>" alt=""> <input type="file" class="form-control form-control-file" id="image2" onchange="return fileValidation('image2','500')" name="image2" accept="image/*" > <label for="image2" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> <label for="email" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 text-right">Image 3<span class="required-label"></span></label> <div class="col-lg-2 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="<?=$image3?>" alt=""> <input type="file" class="form-control form-control-file" id="image3" onchange="return fileValidation('image3','500')" name="image3" accept="image/*" > <label for="image3" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> <!--- <div class="form-group form-show-validation row"> <label for="email" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 text-right">SELLER'S WISDOM PLAN<span class="required-label"></span></label> <div class="col-lg-10 col-md-9 col-sm-8"> <input type="text" class="form-control" id="phn" value="<?=$content2?>" name="content2" placeholder="CONTENT" > </div> </div> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Image <span class="required-label"></span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="<?=$image2?>" alt="preview"> <input type="file" class="form-control form-control-file" id="image2" onchange="return fileValidation('image2','200')" name="image2" accept="image/*" > <label for="image2" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">CUSTOMISE YOUR HOME SEARCH<span class="required-label"></span></label> <div class="col-lg-9 col-md-9 col-sm-8"> <input type="text" class="form-control" id="phn" value="<?=$content3?>" name="content3" placeholder="CONTENT" > </div> </div> <div class="form-group form-show-validation row"> <label for="email" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 text-right">Image <span class="required-label"></span></label> <div class="col-lg-4 col-md-9 col-sm-8"> <div class="input-file input-file-image"> <img class="img-upload-preview img-circle" width="100" height="100" src="<?=$image3?>" alt="preview"> <input type="file" class="form-control form-control-file" id="image3" onchange="return fileValidation('image3','200')" name="image3" accept="image/*" > <label for="image3" class=" label-input-file btn btn-icon btn-primary btn-round btn-lg"><i class="la la-file-image-o"></i> Upload a Image</label> </div> </div> </div> --> </div> <div class="card-action"> <div class="row"> <div class="col-md-12"> <input class="btn btn-success" type="submit" name="sub" value="Submit"> <button class="btn btn-danger">Cancel</button> </div> </div> </div> </form> </div> </div> <?php if(isset($_POST['sub'])){ $allowed = ["title1","content1"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "id") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars($_POST[$key]); } } if(file_exists($_FILES['banner']['tmp_name']) || is_uploaded_file($_FILES['banner']['tmp_name'])) { $setStr .= "`banner` = :banner,"; $img=$show->imageEdit($_FILES['banner']['name']); move_uploaded_file($_FILES['banner']['tmp_name'],"../product_img/".$img); $params['banner'] =$img; } if(file_exists($_FILES['image1']['tmp_name']) || is_uploaded_file($_FILES['image1']['tmp_name'])) { $setStr .= "`image1` = :image1,"; $img=$show->imageEdit($_FILES['image1']['name']); move_uploaded_file($_FILES['image1']['tmp_name'],"../product_img/".$img); $params['image1'] =$img; } if(file_exists($_FILES['image2']['tmp_name']) || is_uploaded_file($_FILES['image2']['tmp_name'])) { $setStr .= "`image2` = :image2,"; $img=$show->imageEdit($_FILES['image2']['name']); move_uploaded_file($_FILES['image2']['tmp_name'],"../product_img/".$img); $params['image2'] =$img; } if(file_exists($_FILES['image3']['tmp_name']) || is_uploaded_file($_FILES['image3']['tmp_name'])) { $setStr .= "`image3` = :image3,"; $img=$show->imageEdit($_FILES['image3']['name']); move_uploaded_file($_FILES['image3']['tmp_name'],"../product_img/".$img); $params['image3'] =$img; } $setStr = rtrim($setStr, ","); $params['id'] =$hid; $show->table ='profile'; $show->cols =$setStr; $show->id_name ='id'; $show->params =$params; if($show->update_all()){ echo "<script>sweetAlert('Ok', 'Home Page has been updated','success');window.location.href='".$_SERVER['request_uri']."';</script>"; }else{ echo "<script>alert('Something went wrong');</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: 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