ok
Direktori : /proc/self/root/home2/selectio/www/tnpsctestbatch.com/admin/ |
Current File : //proc/self/root/home2/selectio/www/tnpsctestbatch.com/admin/add-desription.php |
<?php include "header.php";?> <style> .btn-success.hover, .btn-success:active, .btn-success:hover{ background-color: darkred; border-color: darkred; } .btn-success { background-color: darkviolet; border-color: #9400d3; /*border-radius: 20px;*/ } .btn-primary { background-color: chocolate; border-color: #d2691e; } .btn-warning { background-color: tomato; border-color: #ff6347; } </style> <div class="content-wrapper" style="background:white;"> <div class="clearfix"></div> <section class="content"> <div class="row"> <div class="col-xs-12"> <div> <div class="box-header"> <h3 class="box-title"><b>Add New Description: </b></h3> </div> <div class="box-body"> <div class="col-lg-12"> <div id="loading-div" style="display: none;"> <img src="images/gif/successfull.gif" style="margin-left: 37%;width: 25%;padding-bottom: 5%;"> </div> <div id="content-div"> <form action="" id="add_description" enctype="multipart/form-data" method="post" accept-charset="utf-8"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="required" for="file">Description Content</label> <input type="text" name="content" id="content" value="" placeholder="Enter Content" class="form-control tip" required="required"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="file">Description Title</label> <input type="text" name="title" id="title" value="" placeholder="Enter Title" class="form-control tip" required="required"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="file">Description KeyWord</label> <input type="text" name="keyword" id="keyword" value="" placeholder="Enter Keyword" class="form-control tip" required="required"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="type">Type</label> <Select type="text" name="type" id="type" class="form-control tip" > <option value="">Select Type</option> <option value="1">Home page</option> <option value="2">Current affairs page</option> </Select> </div> </div> </div> <div class="col-md-12" style="display: flex;justify-content: center;margin-top: 3%;"> <div class="form-group"> <!--<label class="required" for="file">Action</label><br>--> <input type="submit" id="add_title" name="add_title" value="Add Description" class="btn btn-success" /> </div> </div> </form> </div> <div class="form-group" style="text-align:center;"> <a href="current_affairs_title-add.php"><button class="btn btn-primary" ><i class="fa fa-refresh"></i> Reset Form</button></a> <a href="description-details.php"><button class="btn btn-warning" ><i class="fa fa-chevron-left"></i> Back to List</button></a> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $('#add_description').on('submit', function(e){ console.log("Click And Form Working"); e.preventDefault(); $('#loading-div').show(); $('#content-div').hide(); var formData = new FormData(this); formData.append('type', 'add_description'); $.ajax({ url: 'add-api/add-question-form.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { if(response['status']==200){ alert(response['message']); $("#add_shifts .close").click(); $('#shift_add_form').trigger("reset"); emp_datas(); $('#loading-div').hide(); $('#content-div').show(); }else{ alert(response['message']); $('#loading-div').hide(); $('#content-div').show(); } } }); }); </script> <?php include "footer.php";?>