Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* include 'session.php'; */ include 'mysql-con.php'; ?>
- <!DOCTYPE html><html lang="en"><head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Home | Galaxy Technology</title>
- <link href="css/tree.css" rel="stylesheet">
- <?php /* include 'header.php'; */ ?>
- <meta name="author" content="Muhammad Arsalan Siddiqui">
- <meta http-equiv="pragma" content="NO-CACHE"/>
- <meta http-equiv="expires" content="0"/>
- <meta name="keywords" content=""/>
- <meta name="description" content=""/>
- <link href="" rel="canonical"/>
- <link rel="icon" href="">
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <link href="css/font-awesome.min.css" rel="stylesheet">
- <!--<link rel="stylesheet" href="css/simplePagination.css" type="text/css"/>-->
- <link rel="stylesheet" href="css/style.css" type="text/css"/>
- <!--<link rel="stylesheet" type="text/css" href="css/jquery.dataTables.css">-->
- <link rel="stylesheet" href="js/jquery-ui-1.11.4.css">
- <!--<link rel="stylesheet" type="text/css" href="css/bootstrap-datepicker.css">-->
- <link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">
- <!--[if lt IE 9]>
- <script src="html5shiv.min.js"></script>
- <script src="respond.min.js"></script>
- <![endif]-->
- </head>
- <body>
- <div class="orange-line"></div>
- <nav class="navbar navbar-inverse navbar-default navbar-static-top">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="index.php"><div class="nav-logo"></div></a>
- </div>
- <div id="navbar" class="navbar-collapse collapse">
- <ul class="nav navbar-nav navbar-right">
- <li><a href="index.php"><strong><i class="fa fa-home" aria-hidden="true"></i> Home</strong></a></li>
- <li><a href="dashboard.php"><strong><i class="fa fa-star" aria-hidden="true"></i> Dashboard</strong></a></li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- <strong><i class="fa fa-user-circle-o" aria-hidden="true"></i> Profile</strong></a>
- <ul class="dropdown-menu">
- <li>
- <div class="navbar-login">
- <div class="row">
- <div class="col-lg-4">
- <p class="text-center">
- <i class="fa fa-user-circle icon-size" aria-hidden="true"></i>
- </p>
- </div>
- <div class="col-lg-8">
- <p class="text-center"><strong>Administrator</strong></p>
- <p class="text-center small">syslog@galaxy.net.pk</p>
- <p class="text-center"><a href="profile.php" class="btn btn-default btn-block btn-sm">View Profile</a></p>
- </div>
- </div>
- </div>
- </li>
- <li class="divider"></li>
- <li>
- <div class="navbar-login navbar-login-session">
- <div class="row">
- <div class="col-lg-12">
- <p>
- <a href="logout.php?destroy" class="btn btn-danger btn-block"><strong><i class="fa fa-user-circle-o" aria-hidden="true"></i> Log Out</strong></a>
- </p>
- </div>
- </div>
- </div>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </nav>
- <!---->
- <div class="container">
- <div class="tree">
- <ul>
- <li>
- <span><i class="fa fa-home"></i> Home</span></a>
- <ul>
- <li><a href="live-log.php"><span><i class="fa fa-bar-chart"></i> Live Log</span></a></li>
- <li><a href="one-day-record.php"><span><i class="fa fa-calendar"></i> Single Day Record</span></a></li>
- <li><a href="index.php"><span><i class="fa fa-cubes"></i> All Records</span></a></li>
- <li><a href="date-2-date-search.php"><span><i class="fa fa-calendar"></i> Date to Date Search</span></a></li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <!---->
- <div class="container">
- <form method="get" class="form-inline">
- <div class="form-group">
- <label>Date </label>
- <input type="date" class="form-control" name="date01" required />
- </div>
- <div class="form-group">
- <label>Records Per Page</label>
- <select class="form-control span2 search-query" name="recordpp">
- <option>50</option>
- <option>100</option>
- <option>250</option>
- <option>500</option>
- <option>750</option>
- <option>1000</option>
- </select>
- </div>
- <button type="submit" name="oneday" class="btn btn-default">Submit</button>
- </form>
- </div>
- <br>
- <div class="container">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>SEQ</th>
- <th>MSG</th>
- <th>DATE TIME</th>
- <th>HOST</th>
- <th>PROGRAM</th>
- </tr>
- </thead>
- <tbody>
- <?php
- if(isset($_GET['oneday'])){
- $date01 = mysqli_real_escape_string($dbcon,$_GET['date01']);
- $recordpp = $_GET['recordpp'];
- //$sql = "SELECT seq, msg, datetime, host, program FROM logs WHERE datetime BETWEEN DATE('$date01') AND '$date01 "." 23:59:59' LIMIT $recordpp ";
- //$rs_result = mysqli_query($dbcon, $sql);
- $query=mysqli_query($dbcon,"select count(seq) from logs");
- $row = mysqli_fetch_row($query);
- $rows = $row[0];
- //$page_rows = 10;
- $page_rows = $recordpp;
- $last = ceil($rows/$page_rows);
- if($last < 1){
- $last = 1;
- }
- $pagenum = 1;
- if(isset($_GET['pn'])){
- $pagenum = preg_replace('#[^0-9]#', '', $_GET['pn']);
- }
- if ($pagenum < 1){
- $pagenum = 1;
- }
- else if ($pagenum > $last) {
- $pagenum = $last;
- }
- $limit = 'LIMIT ' .($pagenum - 1) * $page_rows .',' .$page_rows;
- //$nquery=mysqli_query($dbcon,"SELECT seq, msg, datetime, host, program FROM logs $limit");
- $nquery=mysqli_query($dbcon,"SELECT seq, msg, datetime, host, program FROM logs WHERE datetime BETWEEN DATE('$date01') AND '$date01 "." 23:59:59' $limit");
- /* put your function here */
- function page($page_num) {
- $query = $_GET;
- $query['pn'] = $page_num;
- $query_result = http_build_query($query);
- return "<a href='{$_SERVER['PHP_SELF']}?{$query_result}'>{$page_num}</a>";
- }
- $paginationCtrls = '';
- if($last > 1){
- for($i = 1; $i <= $last; $i++){
- $paginationCtrls .= page($i) .' ';
- }
- }
- //include 'curPageURL.func.php';
- ?>
- <?php
- while($crow = mysqli_fetch_array($nquery)){
- ?>
- <tr>
- <td><?php echo $crow["seq"]; ?></td>
- <td><?php echo $crow["msg"]; ?></td>
- <td><?php echo $crow["datetime"]; ?></td>
- <td><?php echo $crow["host"]; ?></td>
- <td><?php echo $crow["program"]; ?></td>
- </tr>
- <?php
- }
- };
- ?>
- </tbody>
- </table>
- <div id="pagination_controls" class="center-block"><?php echo $paginationCtrls; ?></div>
- <!-- -->
- </div>
- <?php /* include 'footer.php'; */ ?>
- <div class="container"><hr><footer><p>© 2017 Galaxy Technology ~ <strong>Designed</strong> & <strong>Developed</strong> by <strong><a href="#">Muhammad Arsalan Siddiqui</a></strong></a></p></footer></div>
- <script src="js/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/jquery.min.js')</script>
- <script src="js/bootstrap.min.js"></script>
- <!--<script src="js/jquery-ui-v1.10.3.js"></script>-->
- <!--<script type="text/javascript" src="js/jquery.simplePagination.js"></script>-->
- <!--<script type="text/javascript" charset="utf8" src="js/jquery.dataTables.js"></script>-->
- <!--<script type="text/javascript" src="js/datatables.js"></script>-->
- <!--<script type="text/javascript" src="js/bootstrap-datepicker.js"></script>-->
- <script type="text/javascript" src="js/script.js">
- </script><script src="js/ie10-viewport-bug-workaround.js"></script></body></html>
- <?php mysqli_close($dbcon); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement