include "../templates/header_session.php"; include "../templates/header.php"; $cafe_id = $_GET['cafe_id']; //includeing classes include "../classes/CafeActivation.php"; include "../classes/CafeDetails.php"; include "../classes/CafeTrac.php"; //creating objects $cafe_activate = new CafeActivation(); $cafe_details = new CafeDetails(); $cafe_trac = new CafeTrac(); //getting cafe UId by cafe id $cafe_user_id = $cafe_details->getCafeUIDByCafeId($cafe_id); //get cafeids and mac ids $result = $cafe_details->getMacIdsByCafeUID($cafe_user_id); //get live screen count $result_screens = $cafe_trac->getCafeTracDetails($cafe_user_id); $live_screens = mysql_num_rows($result_screens); $registered_screens = mysql_num_rows($result); ?> <body> <div id="topPan"><div id="ImgPan"><a href="index.html"><img src="../images/logo.gif" title="Coporate Profiles" alt="Coporate Profiles" width="201" height="52" border="0" /></a></div> <?php include "nav_bar.php"; ?> </div> <div id="bodyPan"> <p class="toptextpadding">No of Screens running :<span><?php echo $live_screens; ?>
<td>Cafe Owner</td> <td>Office Phone</td> <td>Address</td> <td>City</td> <td>State</td> <td>Terminals</td> <td>Terminals Activated</td> <td>Status</td> <td>View Details</td> </tr> <?php while ($rows = mysql_fetch_array($result)) { $flag = 0; $result_cafe = $cafe_details->getAllDetailsOfCafeByCafeUID($rows['cafe_id']); $act_screen = $cafe_details->getMacIdsByCafeUID($rows['cafe_id']); $registered_screens = mysql_num_rows($act_screen); while ($check_rows = mysql_fetch_array($act_screen)) { $check = $cafe_trac->checkMac($rows['cafe_id'], $check_rows['mac_id']); //checking the individual mac status if ($check == 0) { $flag = 1; } } //checking status //$check = checkStatus($rows['cafe_id']); if ($flag == 1) { $img_url = '../images/notok.JPG'; } else { $img_url = '../images/ok.JPG'; }