Esempio n. 1
0
function show_all_other_minutes_with_same_time($time, $file_path, $file_begining, $camera_name, $real_path, $camera, $period, $hour, $minute, $date, $time_m)
{
    $orginal_fil = $real_path . $file_begining;
    $pic = explode("_TIMING.jpg", $file_begining);
    $last5 = substr($pic[0], -5);
    $slice = explode($last5, $pic[0]);
    $file_top = $slice[0];
    $de = $real_path;
    $ss = glob("{$de}*{$file_top}*");
    for ($i = 0; $i < count($ss); $i++) {
        if ($ss[$i] == $original_fil) {
            continue;
        } else {
            echo "<tr><td colspan='3'><br/><img src='{$ss[$i]}'></td> <br/></tr>";
            view_single_img_footer($camera, $camera_name, $period, $hour, $minute, $date, $file_path, $time_m);
        }
    }
}
Esempio n. 2
0
function view_single_img($camera, $cam_name, $period, $hour, $minute, $date, $file_path)
{
    $peices = explode("-", $date);
    $real_date = $peices[0] . $peices[1] . $peices[2];
    $time_m = $hour . $minute;
    $real_path = $file_path . $cam_name . "/" . $real_date . "/";
    $images_array = array_diff(scandir($real_path, 1), array('..', '.'));
    $full_img_name = "sss.jpg";
    view_single_img_footer($camera, $cam_name, $period, $hour, $minute, $date, $file_path, $time_m);
    for ($i = 0; $i < count($images_array); $i++) {
        $p = explode("_", $images_array[$i]);
        $time = $p[2][8] . $p[2][9] . $p[2][10] . $p[2][11];
        if ($time == $time_m) {
            $full_img_name = $images_array[$i];
            break;
        }
    }
    if (file_exists($real_path . $full_img_name)) {
        echo "<div class='container'><img style='width: 100%;' src='{$real_path}{$full_img_name}'></div>";
        show_all_other_minutes_with_same_time($time, $file_path, $full_img_name, $cam_name, $real_path, $camera, $period, $hour, $minute, $date, $time_m);
    } else {
        echo "<div class='container content-center center-align'>\n<img src='images/notfound.png'>\n</div>";
        echo "";
    }
}