如何修复PHP页面不断加载?

时间:2019-01-23 06:09:13

标签: php css mysql

我正在为我的公司创建一个webapp,我的一个PHP页面一直在继续 当我向其中添加另一个header.php时加载,但是如果我添加此标头,则另一页加载良好。

我的代码:本节添加到下面的页面(view_enquiry.php)

head.php:

      <!DOCTYPE html>
      <html lang="en">

      <head>
          <meta charset="utf-8">
          <meta http-equiv="X-UA-Compatible" content="IE=edge">
          <!-- Tell the browser to be responsive to screen width -->
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <meta name="description" content="">
          <meta name="author" content="">
          <!-- Favicon icon -->
          <link rel="icon" type="image/png" sizes="16x16" href="images/logo.png">
           <?php
                   include('connect.php');
                   $sql_head_title = "select * from manage_website"; 
                   $result_head_title = $conn->query($sql_head_title);
                   $row_head_title = mysqli_fetch_array($result_head_title);
                   ?>
          <title><?php echo $row_head_title['title'];?></title>

          <link href="css/lib/chartist/chartist.min.css" rel="stylesheet">
        <link href="css/lib/owl.carousel.min.css" rel="stylesheet" />
          <link href="css/lib/owl.theme.default.min.css" rel="stylesheet" />
          <!-- Bootstrap Core CSS -->
          <link href="css/lib/bootstrap/bootstrap.min.css" rel="stylesheet">
          <!-- Custom CSS -->
          <link href="css/helper.css" rel="stylesheet">
            <link href="css/snackbar.css" rel="stylesheet">
            <link href="css/modal.css" rel="stylesheet">
          <link href="css/style.css" rel="stylesheet">
          <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
          <!-- WARNING: Respond.js doesn't work if you view the page via file:** -->
          <!--[if lt IE 9]>
          <script src="https:**oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https:**oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
       <link rel="stylesheet" href="css/lib/html5-editor/bootstrap-wysihtml5.css" />
       <link href="css/lib/calendar2/semantic.ui.min.css" rel="stylesheet">
          <link href="css/lib/calendar2/pignose.calendar.min.css" rel="stylesheet">
      </head>

      <body class="fix-header fix-sidebar">
          <!-- Preloader - style you can find in spinners.css -->
          <div class="preloader">
              <svg class="circular" viewBox="25 25 50 50">
            <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10" /> </svg>
          </div>
        </body>
        </html>

这是我的页面,该页面不断加载(view_enquiry.php)

        <?php include('head.php');?>
        <?php include('header.php');?>
        <?php include('sidebar.php');?>

        <?php
            include ('connect.php');
        ?>

        <div class="content-wrapper" style="padding-top: 48px;">
            <div class="container-fluid">
                <div class="status" style="color:red;position: relative;top:215px;positin: relative;left:565px;position:absolute;">
                    <h4>Status Updated Successfully</h4>
                </div>
                <div class="row" col-sm color: #031aaf" style="padding-top: 12px;">
                    <div class="col-sm-3">
                        <h3 style="color: #828282"><b>Enquiry Details</b></h3>
                    </div>
                    <div class="col-sm-3">
                        <form action="" method="get" " >
                            <input  name="search" type="text" placeholder="Search(Name/number)" size="20px">
                            <button type="submit" name="submit" value="search" class="button"><i class="fa fa-search"></i></button>
                        </form>
                    </div>
                    <div class="col-sm-5" style="text-align: left;">
                        <form action="between.php" method="GET" >
                            <input type="date" name="from" required> To
                            <input type="date" name="to" required>
                            <button type="submit" class="button"><i class="fa fa-search"></i></button>
                        </form>
                    </div>
                </div>
                <b><p style="text-align:right; color: #828282" > Yesterday's Enquiry Count :
                    <?php
                        $v="SELECT COUNT(id) FROM task WHERE (`date` = CURDATE() - INTERVAL 1 DAY)AND completed=0" ;
                        $s=mysqli_query($conn,$v);
                        $w=mysqli_fetch_assoc($s);
                        echo $w['COUNT(id)'] ; 
                    ?>
                </b>
                <br><br>
                <table border="1px;"  style="margin-top:-11px;color: #333333" bgcolor="#fcb983" >
                    <tr style="color: black">
                        <th></th>
                        <th>Name</th>
                        <th>Address</th>
                        <th>Enquiry Date</th>
                        <th>Category/Work</th>
                        <th>Followup Date</th>
                        <th>Mobile</th>
                        <th>Comment</th>
                        <th>Postponed To</th>
                        <th>Edit</th>
                        <th>Delete</th>
                        <th>Complete</th>
                    </tr>
                    <?php 
                        if(@$_GET['search'] && @$_GET['search']!=''){
                            $query=$_GET['search'];
                            $query = htmlspecialchars($query);
                            $vari = mysqli_query($conn,"SELECT * FROM task WHERE completed=0 AND ((`task_name` LIKE '%".$query."%') OR (`mobile` LIKE '%".$query."%') OR (`address` LIKE '%".$query."%') OR (`work` LIKE '%".$query."%') OR (`command` LIKE '%".$query."%'))") or die(mysqli_error($con));
                                            //$vari="SELECT * FROM task WHERE completed=0 AND (task_name='$s' OR mobile='$s')";
                                        }
                                    else{
                                            $vari = mysqli_query($conn,"SELECT * FROM task WHERE (`date` = CURDATE() - INTERVAL 1 DAY) AND completed=0")  or die(mysqli_error($conn));
                                            //$vari="SELECT * FROM task WHERE completed=0";
                                        }
                                            //$variable=mysqli_query($con,$vari);
                        while ($row = mysqli_fetch_array($vari)){ 
                    ?>
                    <tr>
                        <td><span class="glyphicon glyphicon-chevron-right"></span></td>
                        <td><?php echo $row["task_name"]; ?></td>
                        <td><?php echo $row["address"]; ?></td>
                        <td><?php echo date('d-m-Y',strtotime($row["date"])); ?></td>
                        <td><?php echo $row["work"];?></td>
                        <td><?php echo date('D - d-m-Y',strtotime($row["todo"])); ?></td>
                        <td><?php echo $row["mobile"] ;?></td>
                        <td><?php echo $row["command"];?></td>
                        <td><a href='postponed.php?postpo=<?php echo $row["id"]; ?>'><center><span class="fa fa-share"></span></center></a></td>
                        <td><a href='enqedit.php?edit=<?php echo $row["id"]; ?>'><center><span class="fa fa-pencil"></span></center></a></td>
                        <td><a href='enqdelete.php?delete=<?php echo $row["id"]; ?>' onclick="return confirm('Are you sure you want to delete this item?');"><center><span class="fa fa-trash"></span></center></a></td>
                        <td><a href="bill.php?id=<?php echo $row["id"]; ?>"><center><span class="fa fa-check-square"></span></center></a></td>
                    </tr>
                    <?php } ?>    
                </table>
            </div>
        </div>

请帮助我这个细节

0 个答案:

没有答案