|
Server IP : 145.79.210.100 / Your IP : 216.73.216.101 Web Server : LiteSpeed System : Linux in-mum-web1954.main-hosting.eu 5.14.0-570.26.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 16 09:12:04 EDT 2025 x86_64 User : u474798400 ( 474798400) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u474798400/domains/excentia.in/public_html/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php include('config.php');
include('checksession.php');
include('include/header.php');
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card card-primary">
<div class="card-header">
<h4 class="card-title">Work With Us</h4>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
<i class="fas fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="card-body p-0">
<table class="table table-striped projects" id="example4">
<thead>
<tr>
<th style="width: 1%">
Sl No
</th>
<th style="width: 15%">
First Name
</th>
<th style="width: 15%">
Last Name
</th>
<th style="width: 20%">
Phone No
</th>
<th style="width: 20%">
Email
</th>
<th style="width: 20%">
Message
</th>
<th style="width: 8%">
File
</th>
<th style="width: 7%">
Action
</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$query=mysqli_query($conn,"select * from tbl_work_with_us");
while($row=mysqli_fetch_array($query)){
?>
<tr id="tr_<?=$row['id'];?>">
<td>
<?=$i;?>
</td>
<td>
<?=$row['fname'];?>
</td>
<td>
<?=$row['lname'];?>
</td>
<td>
<?=$row['phone_no'];?>
</td>
<td>
<?=$row['email'];?>
</td>
<td>
<?=$row['message'];?>
</td>
<td>
<?php
$file_extension = pathinfo($row['file'], PATHINFO_EXTENSION);
if (strtolower($file_extension) == 'pdf') {
echo '<a href="document/' . $row['file'] . '" target="_blank"><i class="far fa-file-pdf fa-2x" style="color: red;"></i></a>';
} elseif (strtolower($file_extension) == 'doc') {
echo '<a href="document/' . $row['file'] . '" target="_blank"><i class="far fa-file-word fa-2x" style="color: blue;"></i></a>';
} else {
echo 'Unsupported file type';
}
?>
</td>
<td class="project-actions text-right">
<a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delete_news(<?=$row['id'];?>)">
<i class="fas fa-trash">
</i>
Delete
</a>
</td>
</tr>
<?php
$i++;
} ?>
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</section>
<!-- Main content -->
</div>
<!-- /.content-wrapper -->
<?php include('include/footer.php'); ?>
<script>
// $(function () {
// $("#example1").DataTable({
// "responsive": true, "lengthChange": false, "autoWidth": false,
// "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
// }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
// $('#example4').DataTable({
// "paging": true,
// "lengthChange": false,
// "searching": false,
// "ordering": true,
// "info": true,
// "autoWidth": false,
// "responsive": true,
// });
// });
function delete_news(id){
var result = confirm("Want to delete this information?");
if (result) {
$.ajax({
url: 'allajax.php',
type:'POST',
data: ({
action: 'delete_work_with_us',
'id' :id
}),
success:function(result){
console.log(result);
$("#tr_"+id).hide();
if(result==1){
alert('Amenities deleted successfully.');
}
}
});
}else{
return false;
}
}
// function change_position(id,pos) {
// var position=$("#position_change_"+id).val();
// //alert(position);
// if(position==''){
// alert('Please chose a position first.');
// $("#position_change_"+id).val(pos);
// }else{
// $.ajax({
// url: 'allajax.php',
// type:'POST',
// data: ({
// action: 'change_position',
// 'pro_id' :id,
// 'position':position
// }),
// success:function(result){
// console.log(result);
// if(result==1){
// alert('Position changed successfully.');
// //window.location.href='allproject.php';
// }
// }
// });
// }
// }
// function change_status(id){
// var stat=$("#stat"+id).val();
// var result = confirm("Want to change the project status?");
// if (result) {
// $.ajax({
// url: 'allajax.php',
// type:'POST',
// data: ({
// action: 'change_project_status',
// 'id' :id,
// 'stat':stat
// }),
// success:function(result){
// console.log(result);
// if(result==1){
// alert('Project status changed successfully.');
// window.location.reload();
// }
// }
// });
// }else{
// return false;
// }
// }
</script>
</body>
</html>