Пример #1
0
            <th scope="col">Date of Installation</th>
            <th scope="col">Status</th>
            
        </tr>
    </thead>
    <tbody>
    	<?php 
while ($rows = mysql_fetch_array($result)) {
    $hits = $cafe_trac->getCafeHits($rows['cafe_id'], $rows['mac_id']);
    //checking whether the hits are null or not
    if ($hits) {
        $hits_count = $hits;
    } else {
        $hits_count = '0';
    }
    $hits_trac = $cafe_trac->checkMac($rows['cafe_id'], $rows['mac_id']);
    //checking whether the cafe macs are working for three days or not
    if ($hits_trac == 1) {
        $img_url = '../images/ok.JPG';
    } else {
        $img_url = '../images/notok.JPG';
    }
    echo '<tr>';
    echo '<td>' . $rows['cafe_id'] . '</td>';
    echo '<td>' . $rows['mac_id'] . '</td>';
    echo '<td>' . $hits_count . '</td>';
    echo '<td>' . $cafe_activate->getMacInstTime($rows['mac_id']) . '</td>';
    echo '<td>';
    ?>
<img src="<?php 
    echo $img_url;
Пример #2
0
    <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';
    }
    while ($row = mysql_fetch_array($result_cafe)) {
        echo '<tr>';
        echo '<td>' . $row['cafe_name'] . '</td>';