Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //user session start from here that identify user
- session_start();
- if(!isset($_SESSION['user']) || !isset($_SESSION['password']) || !isset($_SESSION['id']) || ($_SESSION['id'])!=2){
- header("Location:loginpage.php");
- }
- ?>
- //HTML start
- <!DOCTYPE html>
- <html>
- <title>W3.CSS Template</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="w3style.css">
- <link rel="stylesheet" href="fontstyle.css">
- <style>
- body,h1,h2,h3,h4,h5 {font-family: "Poppins", sans-serif}
- body {font-size:16px;}
- .w3-half img{margin-bottom:-6px;margin-top:16px;opacity:0.8;cursor:pointer}
- .w3-half img:hover{opacity:1}
- .table-style-6{
- position:relative;
- top: 20%;
- transform: translateY(30%);
- font: 95% Arial, Helvetica, sans-serif;
- max-width:250px;
- margin: 10px auto;
- padding:16px;
- //background: #F7F7F7;
- }
- </style>
- <body>
- <!-- Sidebar/menu -->
- <nav class="w3-sidebar w3-red w3-collapse w3-top w3-large w3-padding" style="z-index:3;width:300px;font-weight:bold;" id="mySidebar"><br>
- <a href="javascript:void(0)" onclick="w3_close()" class="w3-button w3-hide-large w3-display-topleft" style="width:100%;font-size:22px">Close Menu</a>
- <div class="w3-container">
- <h3 class="w3-padding-64"><b>Islam Store</b></h3>
- </div>
- <div class="w3-bar-block">
- <a href="mainpage.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Home</a>
- <a href="cashin.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">bKash</a>
- <a href="easyload.php" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">FlexiLoad</a>
- <a href="#designers" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">History</a>
- <a href="#packages" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Packages</a>
- <a href="#contact" onclick="w3_close()" class="w3-bar-item w3-button w3-hover-white">Contact</a>
- </div>
- </nav>
- <!-- Top menu on small screens -->
- <header class="w3-container w3-top w3-hide-large w3-red w3-xlarge w3-padding">
- <a href="javascript:void(0)" class="w3-button w3-red w3-margin-right" onclick="w3_open()">☰</a>
- <span>Islam Store</span>
- </header>
- <!-- Overlay effect when opening sidebar on small screens -->
- <div class="w3-overlay w3-hide-large" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
- <!-- !PAGE CONTENT! -->
- <div class="w3-main" style="margin-left:100px; margin-right:150px">
- </div>
- <?php
- //connect with database b_kash is database name
- $connect=mysqli_connect("localhost","root","","b_kash");
- // if something is wrong to connect with database die.
- if(mysqli_connect_errno())
- {
- die('Could not connect: ' . mysqli_connect_error());
- }
- //select table from which we take data here saikot is table name.
- $result = mysqli_query($connect,"SELECT * FROM saikot WHERE Date>CURDATE()");
- //set timezone
- date_default_timezone_set('Asia/Dhaka');
- //displat tiday's date
- $today=date("d-m-Y");
- echo "<h2>"."Date: " .$today ."</h2>";
- echo "<div class='w3-container' id='contact' style='margin-top:0px'>";
- echo"<div class='table-style-6'>";
- //Table show start from here
- echo "<table style='width:30%' border='1'>
- <tr>
- <th>Time</th> <th>Mobile Number</th> <th>Amount</th> <th>Total</th>
- </tr>";
- $sum=0;
- while($row = mysqli_fetch_array($result))
- {
- echo "<tr>";
- echo "<td>".$row['Time']."</td>";
- echo "<td>" . $row['Number'] ."<div style="."float:right".">"."<font color=#807b7b>".$row['req']."</font>"."</div>"."</td>";
- echo "<td>" . $row['Amount'] . "</td>";
- $sum=$sum+$row['Amount'];
- echo "<td> $sum </td>";
- echo "</tr>";
- }
- echo "</table>"; echo "</br>"; echo "</br>";
- echo "</div>";
- echo "</div>";
- // here show balance
- echo"<div class='table-style-6'>";
- $result = mysqli_query($connect,"SELECT * FROM saikot_credit WHERE balance");
- $row=mysqli_fetch_array($result);
- echo "<h4>"."Your Current Balance: ".$row['balance']."</h4>";
- echo "</div>";
- mysqli_close($connect);
- ?>
- <script>
- // Script to open and close sidebar
- function w3_open() {
- document.getElementById("mySidebar").style.display = "block";
- document.getElementById("myOverlay").style.display = "block";
- }
- function w3_close() {
- document.getElementById("mySidebar").style.display = "none";
- document.getElementById("myOverlay").style.display = "none";
- }
- // Modal Image Gallery
- function onClick(element) {
- document.getElementById("img01").src = element.src;
- document.getElementById("modal01").style.display = "block";
- var captionText = document.getElementById("caption");
- captionText.innerHTML = element.alt;
- }
- </script>
- <div style="float:right">
- <h5>see your record by date</h5>
- <form float:"right" action="prevday.php" method="post">
- Date <input type="text" name="date" value="2017-01-01"/>
- <input name="subject" type="submit" value="submit"></input>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement