Applied patches to correct diagnostic image naming problems and to display them.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1273 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-02-01 23:05:19 +00:00
parent 0e8912d439
commit b7a4a25437
2 changed files with 11 additions and 1 deletions

View File

@ -89,7 +89,7 @@ protected:
bulk_frame_interval = (int)config.Item( ZM_BULK_FRAME_INTERVAL ); bulk_frame_interval = (int)config.Item( ZM_BULK_FRAME_INTERVAL );
snprintf( capture_file_format, sizeof(capture_file_format), "%%s/%%0%dd-capture.jpg", (int)config.Item( ZM_EVENT_IMAGE_DIGITS ) ); snprintf( capture_file_format, sizeof(capture_file_format), "%%s/%%0%dd-capture.jpg", (int)config.Item( ZM_EVENT_IMAGE_DIGITS ) );
snprintf( analyse_file_format, sizeof(analyse_file_format), "%%s/%%0%dd-analyse.jpg", (int)config.Item( ZM_EVENT_IMAGE_DIGITS ) ); snprintf( analyse_file_format, sizeof(analyse_file_format), "%%s/%%0%dd-analyse.jpg", (int)config.Item( ZM_EVENT_IMAGE_DIGITS ) );
snprintf( general_file_format, sizeof(general_file_format), "%%s/%%0%dd-%%s.jpg", (int)config.Item( ZM_EVENT_IMAGE_DIGITS ) ); snprintf( general_file_format, sizeof(general_file_format), "%%s/%%0%dd-%%s", (int)config.Item( ZM_EVENT_IMAGE_DIGITS ) );
} }
public: public:

View File

@ -53,6 +53,8 @@ $last_fid = $max_fid;
$event_path = ZM_DIR_EVENTS.'/'.$event['MonitorId'].'/'.$event['Id']; $event_path = ZM_DIR_EVENTS.'/'.$event['MonitorId'].'/'.$event['Id'];
$image_path = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $event_path, $fid ); $image_path = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $event_path, $fid );
$d_image_path = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-diag-d.jpg", $event_path, $fid );
$r_image_path = sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-diag-r.jpg", $event_path, $fid );
$anal_image = preg_replace( "/capture/", "analyse", $image_path ); $anal_image = preg_replace( "/capture/", "analyse", $image_path );
if ( file_exists( $anal_image ) ) if ( file_exists( $anal_image ) )
{ {
@ -114,6 +116,14 @@ function deleteEvent()
<td align="center" width="25%" class="text">&nbsp;</td> <td align="center" width="25%" class="text">&nbsp;</td>
<?php } ?> <?php } ?>
</tr> </tr>
<?php if (file_exists ($d_image_path)) { ?>
<tr><td colspan="4"><?= $d_image_path ?></tr>
<tr><td colspan="4"><img src="<?= $d_image_path ?>" width="<?= $event['Width'] ?>" height="<?= $event['Height'] ?>" class="<?= $img_class ?>"></td></tr>
<?php } ?>
<?php if (file_exists ($r_image_path)) { ?>
<tr><td colspan="4"><?= $r_image_path ?></tr>
<tr><td colspan="4"><img src="<?= $r_image_path ?>" width="<?= $event['Width'] ?>" height="<?= $event['Height'] ?>" class="<?= $img_class ?>"></td></tr>
<?php } ?>
</table> </table>
</body> </body>
</html> </html>