Bug 384 - Removed WML.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2169 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
7221b16ab4
commit
e730a3d9cf
|
@ -94,12 +94,6 @@ web_DATA = \
|
|||
zm_xhtml_view_state.php \
|
||||
zm_xhtml_view_video.php \
|
||||
zm_xhtml_view_watch.php \
|
||||
zm_wml.php \
|
||||
zm_wml_view_login.php \
|
||||
zm_wml_view_postlogin.php \
|
||||
zm_wml_view_console.php \
|
||||
zm_wml_view_feed.php \
|
||||
zm_wml_view_error.php \
|
||||
zm_lang.php \
|
||||
zm_lang_big5_big5.php \
|
||||
zm_lang_de_de.php \
|
||||
|
@ -203,12 +197,6 @@ EXTRA_DIST = \
|
|||
zm_xhtml_view_state.php \
|
||||
zm_xhtml_view_video.php \
|
||||
zm_xhtml_view_watch.php \
|
||||
zm_wml.php \
|
||||
zm_wml_view_login.php \
|
||||
zm_wml_view_postlogin.php \
|
||||
zm_wml_view_console.php \
|
||||
zm_wml_view_feed.php \
|
||||
zm_wml_view_error.php \
|
||||
zm_lang.php \
|
||||
zm_lang_big5_big5.php \
|
||||
zm_lang_de_de.php \
|
||||
|
|
26
web/zm.php
26
web/zm.php
|
@ -97,14 +97,6 @@ if ( empty($format) )
|
|||
$device['width'] = $wurfl->getDeviceCapability( 'resolution_width' );
|
||||
$device['height'] = $wurfl->getDeviceCapability( 'resolution_height' );
|
||||
}
|
||||
// Deprecated
|
||||
//elseif ( $wurfl->getDeviceCapability( 'wml_1_3' ) )
|
||||
//{
|
||||
//$format = "wml";
|
||||
//$cookies = false;
|
||||
//$device['width'] = $wurfl->getDeviceCapability( 'resolution_width' );
|
||||
//$device['height'] = $wurfl->getDeviceCapability( 'resolution_height' );
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -132,19 +124,10 @@ if ( empty($format) )
|
|||
if ( empty($format) )
|
||||
{
|
||||
unset( $device );
|
||||
$accepts_wml = preg_match( '/text\/vnd.wap.wml/i', $_SERVER['HTTP_ACCEPT'] );
|
||||
$accepts_html = preg_match( '/text\/html/i', $_SERVER['HTTP_ACCEPT'] );
|
||||
|
||||
if ( $accepts_wml && !$accepts_html )
|
||||
{
|
||||
$format = "wml";
|
||||
$cookies = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$format = "html";
|
||||
$cookies = true;
|
||||
}
|
||||
$format = "html";
|
||||
$cookies = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -167,11 +150,6 @@ else
|
|||
ini_set( "arg_separator.output", "&" );
|
||||
ini_set( "url_rewriter.tags", "a=href,area=href,frame=src,input=src,fieldset=" );
|
||||
}
|
||||
elseif ( $format == "wml" )
|
||||
{
|
||||
ini_set( "arg_separator.output", "&" );
|
||||
ini_set( "url_rewriter.tags", "a=href,area=href,frame=src,input=src,go=href,card=ontimer" );
|
||||
}
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
|
142
web/zm_wml.php
142
web/zm_wml.php
|
@ -1,142 +0,0 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder HTML interface file, $Date$, $Revision$
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
$bandwidth = "phone";
|
||||
|
||||
//ini_set( "magic_quotes_gpc", "Off" );
|
||||
|
||||
require_once( 'zm_config.php' );
|
||||
|
||||
if ( ZM_OPT_USE_AUTH )
|
||||
{
|
||||
session_start();
|
||||
if ( isset( $_SESSION['user'] ) )
|
||||
{
|
||||
$user = $_SESSION['user'];
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $user );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$user = array(
|
||||
"Username"=>"admin",
|
||||
"Password"=>"",
|
||||
"Language"=>"",
|
||||
"Enabled"=>1,
|
||||
"Stream"=>'View',
|
||||
"Events"=>'Edit',
|
||||
"Monitors"=>'Edit',
|
||||
"System"=>'Edit',
|
||||
);
|
||||
}
|
||||
|
||||
require_once( 'zm_lang.php' );
|
||||
require_once( 'zm_funcs.php' );
|
||||
require_once( 'zm_actions.php' );
|
||||
|
||||
noCacheHeaders();
|
||||
header("Content-type: text/vnd.wap.wml");
|
||||
|
||||
echo( '<?xml version="1.0" encoding="iso-8859-1"?>'."\n" );
|
||||
//echo( '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">'."\n" );
|
||||
echo( '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">'."\n" );
|
||||
|
||||
ob_start();
|
||||
|
||||
$rates = array(
|
||||
"10000" => "100x",
|
||||
"5000" => "50x",
|
||||
"2500" => "25x",
|
||||
"1000" => "10x",
|
||||
"400" => "4x",
|
||||
"200" => "2x",
|
||||
"100" => $zmSlangReal,
|
||||
"50" => "1/2x",
|
||||
"25" => "1/4x",
|
||||
);
|
||||
|
||||
$scales = array(
|
||||
"400" => "4x",
|
||||
"300" => "3x",
|
||||
"200" => "2x",
|
||||
"150" => "1.5x",
|
||||
"100" => $zmSlangActual,
|
||||
"75" => "3/4x",
|
||||
"50" => "1/2x",
|
||||
"33" => "1/3x",
|
||||
"25" => "1/4x",
|
||||
);
|
||||
|
||||
if ( !isset($user) )
|
||||
{
|
||||
$view = "login";
|
||||
}
|
||||
elseif ( !isset($view) )
|
||||
{
|
||||
$view = "console";
|
||||
}
|
||||
|
||||
switch( $view )
|
||||
{
|
||||
case "login" :
|
||||
case "postlogin" :
|
||||
case "logout" :
|
||||
case "console" :
|
||||
case "state" :
|
||||
case "cycle" :
|
||||
case "watch" :
|
||||
case "watchfeed" :
|
||||
case "watchstatus" :
|
||||
case "imagefetch" :
|
||||
case "settings" :
|
||||
case "events" :
|
||||
case "filter" :
|
||||
case "filtersave" :
|
||||
case "event" :
|
||||
case "frame" :
|
||||
case "frames" :
|
||||
case "monitor" :
|
||||
case "video" :
|
||||
case "function" :
|
||||
case "none" :
|
||||
{
|
||||
require_once( "zm_".$format."_view_".$view.".php" );
|
||||
break;
|
||||
}
|
||||
default :
|
||||
{
|
||||
$view = "error";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $view == "error" )
|
||||
{
|
||||
require_once( "zm_".$format."_view_".$view.".php" );
|
||||
}
|
||||
|
||||
$fp = fopen( "/tmp/output.html", "w" );
|
||||
fwrite( $fp, ob_get_contents() );
|
||||
fclose( $fp );
|
||||
ob_end_flush();
|
||||
|
||||
?>
|
|
@ -1,106 +0,0 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder web console view file, $Date$, $Revision$
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
$running = daemonCheck();
|
||||
$status = $running?$zmSlangRunning:$zmSlangStopped;
|
||||
|
||||
$db_now = strftime( STRF_FMT_DATETIME_DB );
|
||||
$sql = "select M.*, count(if(E.StartTime>'$db_now' - INTERVAL 1 HOUR && E.Archived = 0,1,NULL)) as HourEventCount, count(if((to_days(E.StartTime)=to_days('$db_now')) && E.Archived = 0,1,NULL)) as TodayEventCount from Monitors as M left join Events as E on E.MonitorId = M.Id group by M.Id order by M.Id";
|
||||
$result = mysql_query( $sql );
|
||||
if ( !$result )
|
||||
echo mysql_error();
|
||||
$monitors = array();
|
||||
$max_width = 0;
|
||||
$max_height = 0;
|
||||
$cycle_count = 0;
|
||||
while( $row = mysql_fetch_assoc( $result ) )
|
||||
{
|
||||
if ( !visibleMonitor( $row['Id'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$row['zmc'] = zmcCheck( $row );
|
||||
$row['zma'] = zmaCheck( $row );
|
||||
$sql = "select count(Id) as ZoneCount from Zones where MonitorId = '".$row['Id']."'";
|
||||
$result2 = mysql_query( $sql );
|
||||
if ( !$result2 )
|
||||
echo mysql_error();
|
||||
$row2 = mysql_fetch_assoc( $result2 );
|
||||
$monitors[] = array_merge( $row, $row2 );
|
||||
if ( $row['Function'] != 'None' )
|
||||
{
|
||||
$cycle_count++;
|
||||
if ( $max_width < $row['Width'] ) $max_width = $row['Width'];
|
||||
if ( $max_height < $row['Height'] ) $max_height = $row['Height'];
|
||||
}
|
||||
}
|
||||
mysql_free_result( $result );
|
||||
?>
|
||||
<wml>
|
||||
<card id="zmConsole" title="<?= ZM_WEB_TITLE_PREFIX ?> - <?= $zmSlangConsole ?>" ontimer="<?= $PHP_SELF ?>?view=<?= $view ?>">
|
||||
<timer value="<?= REFRESH_MAIN*10 ?>"/>
|
||||
<p align="center">
|
||||
<?= strftime( DATE_FMT_CONSOLE_SHORT ) ?> - <?= makeLink( "$PHP_SELF?view=state", $status, canEdit( 'System' ) ) ?> - <?= getLoad() ?> / <?= getDiskPercent() ?>%
|
||||
<table columns="4" align="LLRR">
|
||||
<?php
|
||||
if ( false )
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?= substr( $zmSlangName, 0, 5 ) ?></td>
|
||||
<td><?= substr( $zmSlangFunction, 0, 4 ) ?></td>
|
||||
<td><?= $zmSlangHour ?></td>
|
||||
<td><?= $zmSlangToday ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$monitor_count = 0;
|
||||
$hour_event_count = 0;
|
||||
$today_event_count = 0;
|
||||
foreach( $monitors as $monitor )
|
||||
{
|
||||
$monitor_count++;
|
||||
$hour_event_count += $monitor['HourEventCount'];
|
||||
$today_event_count += $monitor['TodayEventCount'];
|
||||
?>
|
||||
<tr>
|
||||
<td><?= makeLink( "$PHP_SELF?view=watch&mid=".$monitor['Id'], substr( $monitor['Name'], 0, 6 ), canView( 'Stream' ), 'accesskey="'.$monitor_count.'"' ) ?></td>
|
||||
<td><?= makeLink( "$PHP_SELF?view=function&mid=".$monitor['Id'], substr( $monitor['Function'], 0, 4 ), canEdit( 'Monitors' ) ) ?></td>
|
||||
<td><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+hour", $monitor['HourEventCount'], canView( 'Events' ) ) ?></td>
|
||||
<td><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=today", $monitor['TodayEventCount'], canView( 'Events' ) ) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><?= makeLink( "$PHP_SELF?view=cycle", count($monitors), ( canView( 'Stream' ) && $cycle_count > 1 ) ) ?></td>
|
||||
<td><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+hour", $hour_event_count, canView( 'Events' ) ) ?></td>
|
||||
<td><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=today", $today_event_count, canView( 'Events' ) ) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<do type="accept" name="Refresh" label="<?= $zmSlangRefresh ?>">
|
||||
<go href="<?= $PHP_SELF ?>" method="post">
|
||||
<postfield name="view" value="<?= $view ?>"/>
|
||||
</go>
|
||||
</do>
|
||||
</p>
|
||||
</card>
|
||||
</wml>
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder web error view file, $Date$, $Revision$
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
?>
|
||||
<wml>
|
||||
<card id="zmError" title="<?= ZM_WEB_TITLE_PREFIX ?> - <?= $zmSlangError ?>">
|
||||
<table columns="1" align="C">
|
||||
<tr><td>ZoneMinder <?= $zmSlangError ?></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td><strong><?= $zmSlangYouNoPerms ?></strong></td></tr>
|
||||
<tr><td><strong><?= $zmSlangContactAdmin ?></strong></td></tr>
|
||||
<tr><td> </td></tr>
|
||||
</table>
|
||||
</card>
|
||||
</wml>
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder web feed file, $Date$, $Revision$
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
$result = mysql_query( "select * from Monitors where Id = '$mid'" );
|
||||
if ( !$result )
|
||||
die( mysql_error() );
|
||||
$monitor = mysql_fetch_assoc( $result );
|
||||
mysql_free_result( $result );
|
||||
$browser = array();
|
||||
$browser['Width'] = 100;
|
||||
$browser['Height'] = 80;
|
||||
|
||||
// Generate an image
|
||||
chdir( ZM_DIR_IMAGES );
|
||||
$status = exec( escapeshellcmd( ZMU_PATH." -m $mid -i" ) );
|
||||
$monitor_image = $monitor['Name'].".jpg";
|
||||
$image_time = filemtime( $monitor_image );
|
||||
$browser_image = $monitor['Name']."-wap-$image_time.jpg";
|
||||
$command = ZM_PATH_NETPBM."/jpegtopnm -dct fast $monitor_image | ".ZM_PATH_NETPBM."/pnmscale -xysize ".$browser['Width']." ".$browser['Height']." | ".ZM_PATH_NETPBM."/ppmtojpeg > $browser_image";
|
||||
exec( $command );
|
||||
chdir( '..' );
|
||||
|
||||
?>
|
||||
<wml>
|
||||
<card id="zmFeed" title="<?= ZM_WEB_TITLE_PREFIX ?> - <?= $monitor['Name'] ?>" ontimer="<?= $PHP_SELF ?>?view=<?= $view ?>&mid=<?= $mid ?>">
|
||||
<timer value="<?= ZM_WEB_REFRESH_IMAGE*10 ?>"/>
|
||||
<p mode="nowrap" align="center"><strong><?= $monitor['Name'] ?></strong></p>
|
||||
<p mode="nowrap" align="center"><img src="<?= ZM_DIR_IMAGES.'/'.$browser_image ?>" alt="<?= $monitor['Name'] ?>" hspace="0" vspace="0" align="middle"/></p>
|
||||
</card>
|
||||
</wml>
|
||||
<?php
|
||||
flush();
|
||||
?>
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder web login view file, $Date$, $Revision$
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
?>
|
||||
<wml>
|
||||
<card id="zmLogin" title="<?= ZM_WEB_TITLE_PREFIX ?> - <?= $zmSlangLogin ?>">
|
||||
<p align="center">ZoneMinder <?= $zmSlangLogin ?></p>
|
||||
<p align="center">
|
||||
<input title="<?= $zmSlangUsername ?>" type="text" name="Username" value="<?= isset($username)?$username:"" ?>" size="12"/><br/>
|
||||
<input title="<?= $zmSlangPassword ?>" type="password" name="Password" value="" size="12"/><br/>
|
||||
<do type="accept" name="Login" label="<?= $zmSlangLogin ?>">
|
||||
<go href="<?= $PHP_SELF ?>" method="post">
|
||||
<postfield name="action" value="login"/>
|
||||
<postfield name="view" value="postlogin"/>
|
||||
<postfield name="username" value="$(Username)"/>
|
||||
<postfield name="password" value="$(Password)"/>
|
||||
</go>
|
||||
</do>
|
||||
</p>
|
||||
</card>
|
||||
</wml>
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
//
|
||||
// ZoneMinder web logging in view file, $Date$, $Revision$
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
?>
|
||||
<wml>
|
||||
<card id="zmLoggingIn" title="<?= ZM_WEB_TITLE_PREFIX ?> - <?= $zmSlangLoggingIn ?>" ontimer="<?= $PHP_SELF ?>?view=console">
|
||||
<timer value="25"/>
|
||||
<p align="center"><br/>ZoneMinder - <?= $zmSlangLogin ?></p>
|
||||
<p align="center"><br/><strong><?= $zmSlangLoggingIn ?></strong><br/><br/>
|
||||
<do type="accept" name="Continue" label="<?= $zmSlangContinue ?>">
|
||||
<go href="<?= $PHP_SELF ?>?view=console" />
|
||||
</do>
|
||||
</p>
|
||||
</card>
|
||||
</wml>
|
Loading…
Reference in New Issue