]]jkjjgdjffksdkdxmnvbcbcvbvcbbbbbbbbbvcbcbvcbmnmbnwqeqwewqskfgj
במ12[cvbnvbnvcvbcvbcvbvvvccccccccccccccvbcvbcvbnmnmqewv;'
/
home
/
u729855735
/
domains
/
stylebyou.com
/
public_html
/
admin
/
Upload FileeE
HOME
<?php require('inc/header.php'); ?> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"/> <section> <style> .btn{ outline:none !important; } .btn:hover{ color:#FFF; } .mdc-drawer-link{ font-size:14px !important; } .cat{ border: 1px solid #d9d6d6; padding: 20px 20px; margin-top: 83px; border-radius: 5px; } .cat_field{ height: 35px; padding-left: 10px; width: 220px; border-radius: 3px; border: 1px solid #d1cece; } .cat-btn{ font-size:14px !important; height:35px; } .import{ color:#00b67a; border:1px solid #00b67a; padding: 6px 20px; font-size: 15px; font-weight: 600; border-radius: 3px; } .import:hover{ color:#00b67a; text-decoration:none; border:1px solid #00b67a; } </style> <div class="container"> <div class="row"> <div class="col-sm-8"> <h4 class="text-left mt-5 mb-5"><strong>Add new coupon</strong> <a class="import" href="view_coupon.php">View Coupon</a></h4> <div style="display:flex;gap:0.5rem"><i style="display:none;color:red" class="fa-solid fa-triangle-exclamation"></i><p id="error-msg" style="color:red;font-size:14px"></p></div> <form method="POST" enctype="multipart/form-data" id="myForm" action="insert_coupon.php"> <div class="row"> <div class="form-group col-sm-6"> <input type="text" class="form-control" id="prdct_nm" name="coupon_nm" placeholder="Enter Coupon name.."> </div> <div class="form-group col-sm-6"> <input type="number" class="form-control" id="brand" name="coupon_amt" placeholder="Enter coupon amount in percentage.."/> </div> <div class="form-group col-sm-12"> <label>Coupon Expiry date:</label> <input type="date" class="form-control" id="date" name="coupon_expire" placeholder="Enter expiry date.."/> </div> <div class="form-group col-sm-12"> <input type="submit" id="create_product" class="mdc-button mdc-button--raised mdc-ripple-upgraded btn btn-md" name="create_coupon" value="Add coupon"> </div> </div> </form> </div> </div> </div> </section> <script> $(document).ready(function() { $("#myForm").submit(function (event) { var coupon_nm = $('input[name="coupon_nm"]').val(); var coupon_amt = $('input[name="coupon_amt"]').val(); //var prdct_id = $('input[name="prdct_id"]').val(); var coupon_expire = $('input[name="coupon_expire"]').val(); if(coupon_nm === ''){ $("#error-msg").text("Coupon name is required.").show(); $('.fa-triangle-exclamation').css('display', 'block'); event.preventDefault(); setTimeout(function() { $('#error-msg').fadeOut(); $('.fa-triangle-exclamation').fadeOut(); }, 3000); return false; } if(coupon_amt === "" || coupon_amt < 5){ $("#error-msg").text("Coupon amount cannot be blank or smaller than 5.").show(); $('.fa-triangle-exclamation').css('display', 'block'); event.preventDefault(); setTimeout(function() { $('#error-msg').fadeOut(); $('.fa-triangle-exclamation').fadeOut(); }, 3000); return false; } if(coupon_expire === ""){ $("#error-msg").text("Expiry date cannot be blank.").show(); $('.fa-triangle-exclamation').css('display', 'block'); event.preventDefault(); setTimeout(function() { $('#error-msg').fadeOut(); $('.fa-triangle-exclamation').fadeOut(); }, 3000); return false; } else{ return true; } }); }); </script> <?php require('inc/footer.php'); ?>