XML Plugin: vframe action checks if file exists and outputs image if not

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3179 e3e1d417-86f3-4887-817a-d78f3d33393f
pull/27/merge
jaidhar 2010-11-07 01:23:08 +00:00
parent dd337affdc
commit 2fc3936ec5
4 changed files with 7 additions and 2 deletions

View File

@ -7,4 +7,5 @@ webdir = @WEB_PREFIX@/skins/xml/views
dist_web_DATA = \ dist_web_DATA = \
console.php \ console.php \
actions.php \ actions.php \
none.php none.php \
notfound.png

View File

@ -247,7 +247,8 @@ webdir = @WEB_PREFIX@/skins/xml/views
dist_web_DATA = \ dist_web_DATA = \
console.php \ console.php \
actions.php \ actions.php \
none.php none.php \
notfound.png
all: all-recursive all: all-recursive

View File

@ -111,6 +111,9 @@ if (isset($_GET['action'])) {
/* Suffix based on 'analyze' */ /* Suffix based on 'analyze' */
$fname = sprintf("%03d-%s.jpg", $frame, $suffix); $fname = sprintf("%03d-%s.jpg", $frame, $suffix);
$url = "./".ZM_DIR_EVENTS."/".getEventPath($event)."/".$fname; $url = "./".ZM_DIR_EVENTS."/".getEventPath($event)."/".$fname;
if (!file_exists($url)) {
$url = "./skins/xml/views/notfound.png";
}
header("Location: ".$url); header("Location: ".$url);
exit; exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB