我在本地服务器上设计了一个带数据表的页面。它工作正常,但它不能在我们的客户端服务器上工作。即使在F12上它也没有在控制台中显示任何错误。我无法理解错误是什么。谁能帮我这个。如何找到有什么错误。
<script src="dist/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="dist/sweetalert.css">
<style>
html, body {
max-width: 100%;
overflow-x: hidden;
}
</style>
<?php
//include("../config/database.php");
include('../logic/manage_logic.php');
include "../header.php";
if($_GET['msg']==1)
{
}
?>
<?php
if(isset($_POST['Yes']) && !empty($_POST))
{
$state="";
$id=$_POST["subid"];
$sql_qury=$mysqli->prepare("DELETE FROM `recruitData` WHERE id=?");
$sql_qury->bind_param('i',$id);
if($sql_qury->execute()){
$m=1;
header('Location:manage_access.php?msg='.$m);
}
else {
echo "some thing went wrong";
}
$sql_qury->close();
}
if(isset($_POST['No']))
{
}
?>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.10/js/dataTables.bootstrap.min.js"></script>
<!--<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />-->
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.10/css/dataTables.bootstrap.min.css" />
<style>
h3, .h3 {
font-size: 24px;
font-weight : 700;
color : #3071A9;
}
</style>
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i> Manage Applicants</h3>
<span id="error" name="error"><?php echo $state; ?></span>
<!-- SIMPLE TO DO LIST -->
<!-- BASIC FORM ELELEMNTS -->
<div class="row mt">
<div class="col-lg-12">
<div class="form-panel">
<div class="pull-right" style="margin-left:850px;margin-top:0px"><a class="fa fa-lg btn btn-success btn-sm" name="excelbtn" id="excelbtn" href="add_user_excel.php" style="color:white">Get Excel</a> <a class="fa fa-plus-circle fa-lg btn btn-primary" href="add_user.php" style="color:white"> Add</a> <span></span></div>
<br/>
<br>
<table class="table table-striped table-bordered" id="datatable" >
<!--<thead style="background-color:#0E2CB0;color:white;">-->
<thead >
<tr>
<th style="font-size:13px;">Number</th>
<th style="font-size:13px;">Title</th>
<th style="font-size:13px;">Preliminary Program</th>
<th style="font-size:13px;">Program</th>
<th style="font-size:13px;">Market</th>
<th style="font-size:13px;">Status</th>
<th style="font-size:13px;">First Name</th>
<th style="font-size:13px;">Last Name</th>
<th style="font-size:13px;">Email Address</th>
<th style="font-size:13px;">Home Phone #</th>
<th style="font-size:13px;">Cell Phone #</th>
<th style="font-size:13px;"> Other Phone #</th>
<th style="font-size:13px;">Job Posting Site</th>
<th style="font-size:13px;">Employee Referral</th>
<th style="font-size:13px;">Date Applied</th>
<th style="font-size:13px;">Date Contacted</th>
<th style="font-size:13px;">Contacted By</th>
<th style="font-size:13px;">Contact Notes</th>
<th style="font-size:13px;width:200px">Comments</th>
<th style="font-size:13px;">Interview Scheduled</th>
<th style="font-size:13px;">Interviewing Manager</th>
<th style="font-size:13px;">Interview Date</th>
<th style="font-size:13px;">Interview Time</th>
<th style="font-size:13px;">Interview Outcome</th>
<th style="font-size:13px;">Rescheduled Date</th>
<th style="font-size:13px;">New Hire Link Sent</th>
<th style="font-size:13px;">Start Date</th>
<th style="font-size:13px;">End Date</th>
<th style="font-size:13px;">Production</th>
<th style="font-size:13px;">Uploaded Resume</th>
<th style="font-size:13px;">Action</th>
</tr>
</thead>
<tbody>
<?php
$details=$managedatafetch->manageSelect($mysqli);
print_r($details);
exit;
for($i=1;$i<=count($details);$i++){
if($details[$i]['date_applied']=="0000-00-00")
{
$dateapplied='N/A';
}
else{
$dateapplied=$details[$i]['date_applied'];
$dateapplied=date('m/d/Y',strtotime($dateapplied));
}
if($details[$i]['date_contacted']=="0000-00-00")
{
$date_contacted='N/A';
}
else{
$date_contacted=$details[$i]['date_contacted'];
$date_contacted=date('m/d/Y',strtotime($date_contacted));
}
if($details[$i]['interview_date']=="0000-00-00")
{
$interview_date='N/A';
}
else{
$interview_date=$details[$i]['interview_date'];
$interview_date=date('m/d/Y',strtotime($interview_date));
}
if($details[$i]['rescheduled_date']=="0000-00-00")
{
$rescheduled_date='N/A';
}
else{
$rescheduled_date=$details[$i]['rescheduled_date'];
$rescheduled_date=date('m/d/Y',strtotime($rescheduled_date));
}
//newHireLinkSent
if($details[$i]['newHireLinkSent']=="0000-00-00")
{
$newHireLinkSent='N/A';
}
else{
$newHireLinkSent=$details[$i]['newHireLinkSent'];
$newHireLinkSent=date('m/d/Y',strtotime($newHireLinkSent));
}
//startDate
if($details[$i]['startDate']=="0000-00-00")
{
$startDate='N/A';
}
else{
$startDate=$details[$i]['startDate'];
$startDate=date('m/d/Y',strtotime($startDate));
}
if($details[$i]['endDate']=="0000-00-00")
{
$endDate='N/A';
}
else{
$endDate=$details[$i]['endDate'];
$endDate=date('m/d/Y',strtotime($endDate));
}
if($details[$i]['production']=="")
{
$production='N/A';
}
else{
$production=$details[$i]['production'];
}
if($details[$i]['uploadresume']==""){
$uploadresume="N/A";
}
else{
$uploadresumearr=explode('/', $details[$i]['uploadresume']);
$uploadresumearr1=$uploadresumearr[1];
//$uploadresume='<a href="view_resume.php?id='.$details[$i]['id'].'" class="btn" rel="tooltip" title="View">'.$uploadresumearr1.'</a>';
$uploadresume='<a href="'.$details[$i]['uploadresume'].'" >'.$uploadresumearr1.'</a>';
}
echo '<tr>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['number'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['title'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['preliminary_program'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['program'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['market'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['status'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['firstname'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['lastname'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['email_address'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['homephone'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['cellphone'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['otherphone'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['jobPostingSite'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['employee_referral'].'</td>
<td style="font-size:13px;padding: 2px;">'.$dateapplied.'</td>
<td style="font-size:13px;padding: 2px;">'.$date_contacted.'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['contactedby'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['contactnotes'].'</td>
<td style="font-size:13px;padding: 2px;width:200px">'.$details[$i]['comments'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['interviewScheduled'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['interviewingManager'].'</td>
<td style="font-size:13px;padding: 2px;">'.$interview_date.'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['interview_time'].'</td>
<td style="font-size:13px;padding: 2px;">'.$details[$i]['interview_outcome'].'</td>
<td style="font-size:13px;padding: 2px;">'.$rescheduled_date.'</td>
<td style="font-size:13px;padding: 2px;">'.$newHireLinkSent.'</td>
<td style="font-size:13px;padding: 2px;">'.$startDate.'</td>
<td style="font-size:13px;padding: 2px;">'.$endDate.'</td>
<td style="font-size:13px;padding: 2px;">'.$production.'</td><td align="center" style="font-size:13px;padding: 2px;">'.$uploadresume.'</td>
<td style="font-size:13px;padding: 2px;"><a href="edit_user.php?id='.$details[$i]['id'].'" class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></a>
<button class="btn btn-danger btn-xs" onclick="del('.$details[$i]['id'].');"><i class="fa fa-trash-o "></i></button></td>
</tr>';
}
?>
</tbody>
</table>
</div>
</div><!-- col-lg-12-->
</div><!-- /row -->
<!-- SORTABLE TO DO LIST -->
</section><!--/wrapper -->
</section><!-- /MAIN CONTENT -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Are you want to Delete?</h4>
</div>
<div class="modal-body" id="del">
<script>
function del(data)
{
//alert(data);
// confirm("are you sure do you want to delete?");
//$('#del').load('delete.php?id='+id);
swal({ title: "Are you sure do you want to delete?",
text: "Click YES to Delete!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#8CD4F5",
confirmButtonText: "YES",
cancelButtonText: "NO",
closeOnConfirm: false },
function(){
$.ajax({
url: "delete.php",
type: "post",
data: "data="+data,
success:function(d){
//alert(d);
if(d==1){
swal("Deleted!", "Aplicant Deleted.", "success");
window.location.reload();
}
else{
swal("Oops..", "Something Went Wrong!", "Error");
}
}
/* cache: false,
contentType: false,
processData: false */
});
});
}
function deleteManage(){
}
</script>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#datatable').dataTable({"scrollY": 300,
"scrollX": true}
);
} );
//remove the inline-style 'width' from #myTable
</script>