Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once '../includes/etdb.php';
- $camName = $_POST['revCamName'];
- $entryId = $_POST['id'];
- $tmp = explode("-", $entryId);
- $entryId = $tmp[0];
- $reconcileId = $tmp[1];
- $entryPlate = $_POST['plate'];
- $entryDatetime = $_POST['datetime'];
- $displayEntryDatetime = $entryDatetime;
- $custId = $_SESSION['customerID'];
- $conn = &newEtConn($custId);
- $sql = "select camera_id,image from $camName where id=$entryId";
- $result = $conn->Execute($sql);
- if (!$result) {
- print $conn->ErrorMsg();
- }
- $rows = $result->fields;
- $imageData = $rows['image'];
- $camId = $rows['camera_id'];
- $displayName = etCommonCamNameById($camId);
- print " <div id="entryImage">n";
- if($rows != "") {
- $rows = $result->fields;
- if ($imageData == "") {
- print "<img src="images/noImageAvailable.jpg" />n";
- }
- else {
- $_SESSION['imageData'] = $imageData;
- print "<h2>$displayName</h2>";
- print "<iframe height="265" width="330" src="actions/image1.html"><img height="240" width="320" src="actions/showImage.php?id=$entryId" /></iframe><br />n";
- }
- }
- print " </div id="entryImage">n";
- print " <form name="reviewEntryForm" action="javascript:YAHOO.inteliviz.eyeTraffic.search.updatePlate();">";
- print " <div id="entryPlate">n";
- print " <div class="entrySummary">Plate: <input type="text" name="entryPlate" size="20" value="$entryPlate" /></div>n";
- print " </div id="entryPlate">n";
- print " <div id="entryTime">n";
- print " <div class="entrySummary">Date and Time: $displayEntryDatetime</div>n";
- print " </div id="entryTime">n";
- print " <input type="hidden" name="id" value="$entryId-$reconcileId" />";
- print " <input type="hidden" name="camName" value="$camName" />";
- print " <br />";
- print " <table>n";
- print " <tr>n";
- print " <td>n";
- print " <input type="button" value=" Update " onClick="YAHOO.inteliviz.eyeTraffic.search.updatePlate()" />";
- print " </td>n";
- print " <td width="20%"></td>n";
- print " <td>n";
- print " <input type="button" value=" Swap Lane " onClick="YAHOO.inteliviz.eyeTraffic.search.swapLane()" onDblClick=""/>";
- print " </td>n";
- print " <td width="20%"></td>n";
- print " <td>";
- print " <td>n";
- print " <input type="button" value=" Discard " onClick="YAHOO.inteliviz.eyeTraffic.search.discardPlate()" />";
- print " </td>n";
- print " </table>n";
- print " </form>";
- $num_cameras = 15;
- $damage_topdir = "/ids_images/drsIN1/";
- $damage_topdirs = "/ids_images/drsIN2/";
- $tmp = split(" ", $displayEntryDatetime);
- $date = $tmp[0];
- $time = $tmp[1];
- $tmp = split("/", $date);
- $day = $tmp[0];
- $month = $tmp[1];
- $year = $tmp[2];
- $displayEntryDatetime = $year."-".$month."-".$day." ".$time;
- $cam_list = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
- if ($cam = 'DRHdrsIN1') {
- $conn = &newEtConn($custId);
- foreach ($cam_list as $cam) {
- $timestamp = strtotime($displayEntryDatetime);
- $cam_delta =6;
- $timestamp = $timestamp - $cam_delta;
- for ($i = 0; $i < $cam_delta+20; $i++) {
- $cdate = date("d_m_Y* H_i_s", $timestamp);
- $image_name = "/xampp/htdocs" . $damage_topdir. $cam . "/Cam*" . $cam . "*-" .$cdate . "*";
- foreach (glob($image_name) as $filename) {
- if (file_exists($filename)) {
- $fs_image = str_replace("/xampp/htdocs", "", $filename);
- print "<h3>Camera $cam</h3>";
- print "<a href="$fs_image" target="_new"><img src="$fs_image" height=240 width=320 /></a>n";
- }
- }
- $timestamp++;
- }
- }
- else {
- foreach ($cam_list as $cam) {
- $timestamp = strtotime($displayEntryDatetime);
- $cam_delta = 6;
- $timestamp = $timestamp - $cam_delta;
- for ($i = 0; $i < $cam_delta+20; $i++) {
- $cdate = date("d_m_Y* H_i_s", $timestamp);
- $image_name = "/xampp/htdocs" . $damage_topdirs. $cam . "/Cam*" . $cam . "*-" .$cdate . "*";
- foreach (glob($image_name) as $filename) {
- if (file_exists($filename)) {
- $fs_image = str_replace("/xampp/htdocs", "", $filename);
- print "<h3>Camera $cam</h3>";
- print "<a href="$fs_image" target="_new"><img src="$fs_image" height=240 width=320 /></a>n";
- }
- }
- $timestamp++;
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement