Şuanki Dizin: /home/wwwdreamtechnolo/public_html/balajimall.com/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/balajimall.com/admin/advertise-report.php |
<?php require_once("../lib/functions.php"); $db = new login_function(); $flag = 0; $success_msg = 0; $title=""; $category = ""; if(!isset($_SESSION['current_login_admin'])) { header("Location:/admin/index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } if(isset($_GET['delete_id']) And isset($_GET['image'])) { $del_id = $_GET['delete_id']; $image = $_GET['image']; unlink("../advertise-images/".$image); $db->delete_advertise_info($del_id); header("Location:advertise-report.php"); $success_msg = 2; } ?> <?php require_once('header.php'); ?> <script src="/js/jquery.min.js"></script> <script src="/src/jquery.table2excel.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#excel_btn").click(function(){ $("#table2excel").table2excel({ exclude: ".noExl", name: "Worksheet Name", filename: "Advertise Report" //do not include extension }); }); }); </script> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"> Advertise Report</h1> <?php if($success_msg == 2) {?> <div class="alert alert-danger"> Advertise Deleted Successfully. </div> <?php } ?> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> Advertise Report </div> <div class="panel-body"> <div class="row"> <?php if(isset($_POST['add_btn'])) { $title = $_POST['title']; $category = $_POST['category']; } ?> <form role="form" method="post" enctype="multipart/form-data"> <div class="col-lg-3"> <select name="category" class="form-control"> <?php if($category != "") { ?> <option value="<?php echo $category; ?>"><?php echo $category; ?></option> <?php } ?> <option value="Select Category">Select Category</option> <option value="Big Banner Ad1">Big Banner Ad1</option> <option value="Big Banner Ad2">Big Banner Ad2</option> <option value="Dual First Ad1">Dual First Ad1</option> <option value="Dual First Ad2">Dual First Ad2</option> <option value="Dual First Ad3">Dual First Ad3</option> <option value="Dual First Ad4">Dual First Ad4</option> <option value="Details Page Ad1">Details Page Ad1</option> <option value="Details Page Ad2">Details Page Ad2</option> </select> </div> <div class="col-lg-3"> <input class="form-control" placeholder="Enter Title" name="title" type="text" value="<?php echo $title; ?>" > </div> <div class="col-lg-3"> <button type="submit" class="btn btn-success" name="add_btn">search</button> </div> <button id="excel_btn" class="btn btn-success" style="float:right;margin-top:0px;">Export Report</button> </div> </div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="table2excel"> <thead> <tr> <th colspan="11"> Advertise Report</th> </tr> <tr class="noExl"> <th width="20">Sr. No</th> <th>Category</th> <th>Title</th> <th>Advertise Image</th> <th>Start Date</th> <th>Expire Date</th> <th width="20">Paid Amount</th> <th>Reference Name</th> <th width="20">Referral Commission</th> <th>Action</th> <th>Action</th> </tr> </thead> <tbody> <?php $c_amount = 0; $p_total = 0; $report_details = $db->get_all_advertise_info($category,$title); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $category = $report_details[$counter][1]; $advertise_image = $report_details[$counter][2]; $start_date = $report_details[$counter][3]; $expire_date = $report_details[$counter][4]; $paid_amount = $report_details[$counter][5]; $reference_name = $report_details[$counter][6]; $referral_commission= $report_details[$counter][7]; $title = $report_details[$counter][8]; ?> <tr> <td><?php echo $counter+1; ?></td> <td><?php echo $category; ?></td> <td><?php echo $title; ?></td> <td><a href="/advertise-images/<?php echo $advertise_image; ?>" target="_blank"><img src="/advertise-images/<?php echo $advertise_image; ?>" width="60" height="60"></a></td> <td><?php echo $start_date = Date("d-m-Y",strtotime($start_date)); ?></td> <td><?php echo $expire_date = Date("d-m-Y",strtotime($expire_date));; ?></td> <td><?php echo $paid_amount; ?></td> <td><?php echo $reference_name; ?></td> <td><?php echo $referral_commission; ?></td> <td><a href="edit-advertise-section.php?up_id=<?php echo $id;?>">Edit</a></td> <td><a href="advertise-report.php?delete_id=<?php echo $id;?>&image=<?php echo $advertise_image; ?>" onclick="return confirm('Are you sure?');">Delete</a></td> </tr> <?php $p_total = $p_total +$paid_amount; $c_amount = $c_amount + $referral_commission; $counter ++; } ?> <tr> <td colspan="6"><b>Total</b></td> <td><b><?php echo $p_total; ?></b></td> <td></td> <td><b><?php echo $c_amount; ?></b></td> <td colspan="2"></td> </tr> <?php }else { ?> <td colspan="11">No Data Found...</td> <?php } ?> </tbody> </table> </div> <!-- /.table-responsive --> </div> </div> </div> </div> </div> </div> </div> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4