Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row">
- <!-- Left Box -->
- <div class="col-lg-6 col-sm-6" style="padding-right:15px; padding-left:0px">
- <div class="well" style="height: 300px;">
- <h2 style="text-align:center; font-size:8em;">
- <div id="SubmittedOrders"></div>
- </h2>
- <p style="text-align:center; font-size:1.5em;">Outstanding Orders</p>
- </div>
- </div>
- <!-- Right Box -->
- <div class="col-lg-6 col-sm-6" style="padding-left:15px; padding-right:0px">
- <div class="well" style="height: 300px;">
- <h2 style="text-align:center; font-size:8em;">
- <div id ="OrderFulfilled"></div>
- </h2>
- <p style="text-align:center; font-size:1.5em;">Orders fulfiled today</p>
- </div>
- </div>
- </div>
- function getOrderStatus() {
- ?>
- <script>
- // IE5/6 support
- function ajax_loop() {
- if (window.XMLHttpRequest) {
- xmlhttp=new XMLHttpRequest();
- } else {
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- // Create function for handling AJAX response
- // Set dashboard div's contents to the response for Submitted Orders
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readyState==4 && xmlhttp.status==200) {
- document.getElementById("SubmittedOrders").innerHTML = xmlhttp.responseText;
- setTimeout(ajax_loop, 1000);
- }
- }
- // Send AJAX request
- xmlhttp.open("POST","getOrderStatus.php");
- xmlhttp.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
- xmlhttp.send("action=update");
- }
- ajax_loop();
- </script>
- <?php
- }
- <?php
- // Query users table
- $sql = "SELECT COUNT(STATUS) from CE_TRANSACTIONS where STATUS = 0;";
- // Execute query
- $result = mysqli_query( $link, $sql );
- // Loop through rows and draw table
- while ( $row = mysqli_fetch_assoc($result) ) {
- foreach ( $row as $field ) {
- echo "$field";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement