D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
epksuofuukz9
/
www
/
admin
/
Filename :
manage_leads.php
back
Copy
<?php include("includes/header.php"); ?> <body class="hold-transition sidebar-mini"> <div class="wrapper"> <!-- Navbar --> <?php include("includes/top_nav.php");?> <!-- /.navbar --> <!-- Main Sidebar Container --> <?php include("includes/side_nav.php");?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1>Manage Leads</h1> </div> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="dashboard.php" style="color:#111;">Dashboard</a></li> <li class="breadcrumb-item active"><?= isset($_GET['page']) ? ucfirst($_GET['page']):'Add';?> Course</li> </ol> </div> </div> </div><!-- /.container-fluid --> </section> <!-- Main content --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <?php if($_GET['page'] == 'demo_lead'){ ?> <div class="col-12"> <div class="card"> <div class="card-header"> <h3 class="card-title">Demo Leads</h3> </div> <!-- /.card-header --> <div class="card-body table-responsive table-wrapper-scroll-y my-custom-scrollbar"> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th>S.N.</th> <th>Name</th> <th>Email</th> <th>Mobile No</th> <th>Page URL</th> <th>Action</th> </tr> </thead> <tbody> <?php $i=1; $get_all="SELECT * FROM `leads` where type='demo_leads' ORDER BY id DESC"; $run_all=query($get_all); while($row=fetch($run_all)){?> <tr row-id="<?= $row['id'];?>"> <td><?= $i++; ?></td> <td><?= $row['name']; ?></td> <td><?= $row['email']; ?></td> <td><?= $row['mobile_no']; ?></td> <td><a href="<?= $row['url']; ?>">Click Here</a></td> <td><a href="javascript:void(0)" class="del">Delete</a></td> </tr> <?php } ?> </tbody> <tfoot> <tr> <th>S.N.</th> <th>Name</th> <th>Email</th> <th>Mobile No</th> <th>Page URL</th> <th>Action</th> </tr> </tfoot> </table> </div> </div> </div> <?php }else{ ?> <div class="col-12"> <div class="card"> <div class="card-header"> <h3 class="card-title">Enquiry Leads</h3> </div> <!-- /.card-header --> <div class="card-body table-responsive table-wrapper-scroll-y my-custom-scrollbar"> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th>S.N.</th> <th>Name</th> <th>Email</th> <th>Mobile No</th> <th>Course</th> <th>Training Mode</th> <th>Message</th> <th>Action</th> </tr> </thead> <tbody> <?php $i=1; $get_all="SELECT * FROM `leads` where type='enquiry' ORDER BY id DESC"; $run_all=query($get_all); while($row=fetch($run_all)){?> <tr row-id="<?= $row['id'];?>"> <td><?= $i++; ?></td> <td><?= $row['name']; ?></td> <td><?= $row['email']; ?></td> <td><?= $row['mobile_no']; ?></td> <td><?= $row['course_name']; ?></td> <td><?= $row['training']; ?></td> <td><?= $row['message']; ?></td> <td><a href="javascript:void(0)" class="del">Delete</a></td> </tr> <?php } ?> </tbody> <tfoot> <tr> <th>S.N.</th> <th>Name</th> <th>Email</th> <th>Mobile No</th> <th>Course</th> <th>Training Mode</th> <th>Message</th> <th>Action</th> </tr> </tfoot> </table> </div> </div> </div> <?php }?> <!--/.col (left) --> </div> <!-- /.row --> </div><!-- /.container-fluid --> </section> <!-- /.content --> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include("includes/footer.php");?> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> </div> <!-- ./wrapper --> <?php include("includes/scripts.php"); ?> <?php include("includes/scripts.php"); ?> <script src="https://cdn.tiny.cloud/1/504fazmsky7z6fs0vo2n3o3vss57qqti45243huu6yszba67/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.css" integrity="sha512-f8gN/IhfI+0E9Fc/LKtjVq4ywfhYAVeMGKsECzDUHcFJ5teVwvKTqizm+5a84FINhfrgdvjX8hEJbem2io1iTA==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.min.js" integrity="sha512-MqEDqB7me8klOYxXXQlB4LaNf9V9S0+sG1i8LtPOYmHqICuEZ9ZLbyV3qIfADg2UJcLyCm4fawNiFvnYbcBJ1w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script> $("#form").submit(function(event) { event.preventDefault(); formdata = new FormData($(this)[0]); $('.Err').text(''); $.ajax({ url: $(this).attr('action'), contentType: false, processData: false, dataType: "json", data: formdata, type: 'POST', success: function(response) { if(response.success == true){ swal("Success",response.message , "success"); $('#form')[0].reset(); }else if(response.success == false){ $.each(response.errors,function(key,value){ $('.Err'+key).css('color','red').text(value); }); } }, }); }); $(document).on('change','.select_menu',function(){ var value = $(this).val(); if(value == 'submenu'){ $('.submenuhide').show(); $('.menuhide').find('.menu').removeAttr('name'); $('.submenuhide').find('.sub_menu').attr('name','course_id'); $('.menuhide').hide(); }else if(value == 'menu'){ $('.menuhide').show(); $('.submenuhide').hide(); $('.submenuhide').find('.sub_menu').removeAttr('name'); $('.menuhide').find('.menu').attr('name','course_id'); } }); $(document).on('click','.del',function(){ var elm = $(this); var row_id = elm.closest('tr').attr('row-id'); if (confirm(" Are you sure You won't to Delete! ")) { $.ajax({ type:"GET", url: "php/function.php?action=leade&id="+row_id, dataType: "json", success: function (response) { if(response.success == true){ swal('Deleted!','Your file has been Deleted.', 'success'); // elm.closest('tr').find('td').fadeOut('fast', // function(here){ // elm.parents('tr:first').remove(); // }); elm.closest('tr').find('td').animate( {backgroundColor:'yellow'}, 1000).fadeOut(1000,function() { elm.parents('tr:first').remove(); }); } } }); } }); $(document).ready( function () { $('#example1').DataTable(); } ); </script> </body> </html>