2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web options view file, $Date$, $Revision$
|
2008-07-25 17:48:16 +08:00
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
if ( !canView( 'System' ) )
|
|
|
|
{
|
2008-09-26 17:47:20 +08:00
|
|
|
$view = "error";
|
2008-07-14 21:54:50 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-10-09 17:15:53 +08:00
|
|
|
$canEdit = canEdit( 'System' );
|
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
$tabs = array();
|
2015-05-22 01:23:31 +08:00
|
|
|
$tabs['skins'] = translate('Display');
|
2015-05-10 21:10:30 +08:00
|
|
|
$tabs['system'] = translate('System');
|
|
|
|
$tabs['config'] = translate('Config');
|
2015-07-09 23:41:46 +08:00
|
|
|
$tabs['servers'] = translate('Servers');
|
2015-05-10 21:10:30 +08:00
|
|
|
$tabs['paths'] = translate('Paths');
|
|
|
|
$tabs['web'] = translate('Web');
|
|
|
|
$tabs['images'] = translate('Images');
|
|
|
|
$tabs['logging'] = translate('Logging');
|
|
|
|
$tabs['network'] = translate('Network');
|
|
|
|
$tabs['mail'] = translate('Email');
|
|
|
|
$tabs['upload'] = translate('Upload');
|
|
|
|
$tabs['x10'] = translate('X10');
|
|
|
|
$tabs['highband'] = translate('HighBW');
|
|
|
|
$tabs['medband'] = translate('MediumBW');
|
|
|
|
$tabs['lowband'] = translate('LowBW');
|
|
|
|
$tabs['phoneband'] = translate('PhoneBW');
|
2011-02-20 04:25:54 +08:00
|
|
|
$tabs['eyeZm'] = "eyeZm";
|
2015-05-10 21:10:30 +08:00
|
|
|
$tabs['users'] = translate('Users');
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2008-09-26 17:47:20 +08:00
|
|
|
if ( isset($_REQUEST['tab']) )
|
|
|
|
$tab = validHtmlStr($_REQUEST['tab']);
|
|
|
|
else
|
|
|
|
$tab = "system";
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
$focusWindow = true;
|
|
|
|
|
2015-05-10 21:10:30 +08:00
|
|
|
xhtmlHeaders( __FILE__, translate('Options') );
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
2015-05-10 21:10:30 +08:00
|
|
|
<h2><?php echo translate('Options') ?></h2>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<ul class="tabList">
|
|
|
|
<?php
|
|
|
|
foreach ( $tabs as $name=>$value )
|
|
|
|
{
|
2008-09-26 17:47:20 +08:00
|
|
|
if ( $tab == $name )
|
2008-07-14 21:54:50 +08:00
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<li class="active"><?php echo $value ?></li>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<li><a href="?view=<?php echo $view ?>&tab=<?php echo $name ?>"><?php echo $value ?></a></li>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
2008-07-18 22:53:44 +08:00
|
|
|
<div class="clear"></div>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2014-12-18 22:44:04 +08:00
|
|
|
$skin_options = array_map( 'basename', glob('skins/*',GLOB_ONLYDIR) );
|
2010-11-24 09:35:12 +08:00
|
|
|
if($tab == 'skins') {
|
|
|
|
$current_skin = $_COOKIE['zmSkin'];
|
2014-11-27 00:55:53 +08:00
|
|
|
$reload = false;
|
|
|
|
if ( isset($_GET['skin-choice']) && ( $_GET['skin-choice'] != $current_skin ) ) {
|
2014-05-01 15:53:45 +08:00
|
|
|
setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 );
|
2010-11-24 09:35:12 +08:00
|
|
|
//header("Location: index.php?view=options&tab=skins&reset_parent=1");
|
2014-11-27 00:55:53 +08:00
|
|
|
$reload = true;
|
|
|
|
}
|
|
|
|
$current_css = $_COOKIE['zmCSS'];
|
|
|
|
if ( isset($_GET['css-choice']) and ( $_GET['css-choice'] != $current_css ) ) {
|
|
|
|
setcookie('zmCSS',$_GET['css-choice'], time()+3600*24*30*12*10 );
|
|
|
|
//header("Location: index.php?view=options&tab=skins&reset_parent=1");
|
|
|
|
$reload = true;
|
2010-11-24 09:35:12 +08:00
|
|
|
}
|
2014-12-18 22:34:14 +08:00
|
|
|
|
2014-11-27 00:55:53 +08:00
|
|
|
if ( $reload )
|
|
|
|
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
|
2010-11-24 09:35:12 +08:00
|
|
|
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<form name="optionsForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
|
|
|
<input type="hidden" name="tab" value="<?php echo $tab ?>"/>
|
2010-11-24 09:35:12 +08:00
|
|
|
<table class="contentTable major optionTable" cellspacing="0">
|
2015-05-10 21:10:30 +08:00
|
|
|
<thead><tr><th><?php echo translate('Name') ?></th><th><?php echo translate('Description') ?></th> <th><?php echo translate('Value') ?></th></tr></thead>
|
2010-11-24 09:35:12 +08:00
|
|
|
<tbody>
|
2014-11-27 00:55:53 +08:00
|
|
|
<tr>
|
|
|
|
<td>ZM_SKIN</td>
|
2015-05-10 21:10:30 +08:00
|
|
|
<td><?php echo translate('SkinDescription'); ?></td>
|
2014-11-27 00:55:53 +08:00
|
|
|
<td><select name="skin-choice">
|
|
|
|
<?php
|
2014-12-18 22:34:14 +08:00
|
|
|
foreach($skin_options as $dir) {
|
2014-12-02 04:58:00 +08:00
|
|
|
echo '<option value="'.$dir.'" '.($current_skin==$dir ? 'SELECTED="SELECTED"' : '').'>'.$dir.'</option>';
|
2014-11-27 00:55:53 +08:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ZM_CSS</td>
|
2015-05-10 21:10:30 +08:00
|
|
|
<td><?php echo translate('CSSDescription'); ?></td>
|
2014-11-27 00:55:53 +08:00
|
|
|
<td><select name="css-choice">
|
|
|
|
<?php
|
2014-12-18 22:44:04 +08:00
|
|
|
foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDIR) ) as $dir) {
|
2014-12-02 04:58:00 +08:00
|
|
|
echo '<option value="'.$dir.'" '.($current_css==$dir ? 'SELECTED="SELECTED"' : '').'>'.$dir.'</option>';
|
2014-11-27 00:55:53 +08:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
2010-11-24 09:35:12 +08:00
|
|
|
</table>
|
|
|
|
<div id="contentButtons">
|
2015-05-10 21:10:30 +08:00
|
|
|
<input type="submit" value="<?php echo translate('Save') ?>"<?php echo $canEdit?'':' disabled="disabled"' ?>/>
|
|
|
|
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
|
2010-11-24 09:35:12 +08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( $tab == "users" )
|
2008-07-14 21:54:50 +08:00
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<form name="userForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
|
|
|
<input type="hidden" name="tab" value="<?php echo $tab ?>"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<input type="hidden" name="action" value="delete"/>
|
|
|
|
<table id="contentTable" class="major userTable" cellspacing="0">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th class="colUsername"><?php echo translate('Username') ?></th>
|
|
|
|
<th class="colLanguage"><?php echo translate('Language') ?></th>
|
|
|
|
<th class="colEnabled"><?php echo translate('Enabled') ?></th>
|
|
|
|
<th class="colStream"><?php echo translate('Stream') ?></th>
|
|
|
|
<th class="colEvents"><?php echo translate('Events') ?></th>
|
|
|
|
<th class="colControl"><?php echo translate('Control') ?></th>
|
|
|
|
<th class="colMonitors"><?php echo translate('Monitors') ?></th>
|
2015-08-16 01:24:48 +08:00
|
|
|
<th class="colGroups"><?php echo translate('Groups') ?></th>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th class="colSystem"><?php echo translate('System') ?></th>
|
|
|
|
<th class="colBandwidth"><?php echo translate('Bandwidth') ?></th>
|
|
|
|
<th class="colMonitor"><?php echo translate('Monitor') ?></th>
|
|
|
|
<th class="colMark"><?php echo translate('Mark') ?></th>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
$sql = "select * from Monitors order by Sequence asc";
|
|
|
|
$monitors = array();
|
|
|
|
foreach( dbFetchAll( $sql ) as $monitor )
|
|
|
|
{
|
|
|
|
$monitors[$monitor['Id']] = $monitor;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sql = "select * from Users";
|
|
|
|
foreach( dbFetchAll( $sql ) as $row )
|
|
|
|
{
|
|
|
|
$userMonitors = array();
|
|
|
|
if ( !empty($row['MonitorIds']) )
|
|
|
|
{
|
2010-02-16 01:11:37 +08:00
|
|
|
foreach ( explode( ",", $row['MonitorIds'] ) as $monitorId )
|
2008-07-14 21:54:50 +08:00
|
|
|
{
|
|
|
|
$userMonitors[] = $monitors[$monitorId]['Name'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<tr>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td class="colUsername"><?php echo makePopupLink( '?view=user&uid='.$row['Id'], 'zmUser', 'user', validHtmlStr($row['Username']).($user['Username']==$row['Username']?"*":""), $canEdit ) ?></td>
|
|
|
|
<td class="colLanguage"><?php echo $row['Language']?validHtmlStr($row['Language']):'default' ?></td>
|
2015-05-10 21:10:30 +08:00
|
|
|
<td class="colEnabled"><?php echo $row['Enabled']?translate('Yes'):translate('No') ?></td>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td class="colStream"><?php echo validHtmlStr($row['Stream']) ?></td>
|
|
|
|
<td class="colEvents"><?php echo validHtmlStr($row['Events']) ?></td>
|
|
|
|
<td class="colControl"><?php echo validHtmlStr($row['Control']) ?></td>
|
|
|
|
<td class="colMonitors"><?php echo validHtmlStr($row['Monitors']) ?></td>
|
2015-08-16 01:37:25 +08:00
|
|
|
<td class="colGroups"><?php echo validHtmlStr($row['Groups']) ?></td>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td class="colSystem"><?php echo validHtmlStr($row['System']) ?></td>
|
|
|
|
<td class="colBandwidth"><?php echo $row['MaxBandwidth']?$bwArray[$row['MaxBandwidth']]:' ' ?></td>
|
|
|
|
<td class="colMonitor"><?php echo $row['MonitorIds']?(join( ", ", $userMonitors )):" " ?></td>
|
|
|
|
<td class="colMark"><input type="checkbox" name="markUids[]" value="<?php echo $row['Id'] ?>" onclick="configureDeleteButton( this );"<?php if ( !$canEdit ) { ?> disabled="disabled"<?php } ?>/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div id="contentButtons">
|
2015-05-10 21:10:30 +08:00
|
|
|
<input type="button" value="<?php echo translate('AddNewUser') ?>" onclick="createPopup( '?view=user&uid=0', 'zmUser', 'user' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/><input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<?php
|
2015-07-09 23:41:46 +08:00
|
|
|
} else if ( $tab == "servers" ) { ?>
|
|
|
|
<form name="serversForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
|
|
|
<input type="hidden" name="tab" value="<?php echo $tab ?>"/>
|
|
|
|
<input type="hidden" name="action" value="delete"/>
|
|
|
|
<input type="hidden" name="object" value="server"/>
|
|
|
|
<table id="contentTable" class="major serversTable" cellspacing="0">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="colName"><?php echo translate('name') ?></th>
|
|
|
|
<th class="colMark"><?php echo translate('Mark') ?></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach( dbFetchAll( 'SELECT * FROM Servers' ) as $row ) { ?>
|
|
|
|
<tr>
|
2015-08-17 00:22:31 +08:00
|
|
|
<td class="colName"><?php echo makePopupLink( '?view=server&id='.$row['Id'], 'zmServer', 'server', validHtmlStr($row['Name']), $canEdit ) ?></td>
|
2015-07-09 23:41:46 +08:00
|
|
|
<td class="colMark"><input type="checkbox" name="markIds[]" value="<?php echo $row['Id'] ?>" onclick="configureDeleteButton( this );"<?php if ( !$canEdit ) { ?> disabled="disabled"<?php } ?>/></td>
|
|
|
|
</tr>
|
|
|
|
<?php } #end foreach Server ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div id="contentButtons">
|
|
|
|
<input type="button" value="<?php echo translate('AddNewServer') ?>" onclick="createPopup( '?view=server&id=0', 'zmServer', 'server' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/><input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php
|
2014-12-18 22:34:14 +08:00
|
|
|
} else {
|
|
|
|
if ( $tab == "system" ) {
|
2008-09-26 17:47:20 +08:00
|
|
|
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
2014-12-18 22:34:14 +08:00
|
|
|
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join( '|', $skin_options );
|
2014-12-18 22:44:04 +08:00
|
|
|
$configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = join( '|', array_map ( 'basename', glob('skins/'.ZM_SKIN_DEFAULT.'/css/*',GLOB_ONLYDIR) ) );
|
2014-12-18 22:34:14 +08:00
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<form name="optionsForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
|
|
|
<input type="hidden" name="tab" value="<?php echo $tab ?>"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<input type="hidden" name="action" value="options"/>
|
|
|
|
<table id="contentTable" class="major optionTable" cellspacing="0">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th><?php echo translate('Name') ?></th>
|
|
|
|
<th><?php echo translate('Description') ?></th>
|
|
|
|
<th><?php echo translate('Value') ?></th>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
2008-07-18 00:59:25 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2008-09-26 17:47:20 +08:00
|
|
|
$configCat = $configCats[$tab];
|
2008-07-14 21:54:50 +08:00
|
|
|
foreach ( $configCat as $name=>$value )
|
|
|
|
{
|
2009-02-19 22:17:33 +08:00
|
|
|
$shortName = preg_replace( '/^ZM_/', '', $name );
|
2014-05-17 10:33:33 +08:00
|
|
|
$optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]['Prompt']:$value['Prompt'];
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<tr>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><?php echo $shortName ?></td>
|
|
|
|
<td><?php echo validHtmlStr($optionPromptText) ?> (<?php echo makePopupLink( '?view=optionhelp&option='.$name, 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
if ( $value['Type'] == "boolean" )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><input type="checkbox" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="1"<?php if ( $value['Value'] ) { ?> checked="checked"<?php } ?><?php echo $canEdit?'':' disabled="disabled"' ?>/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( preg_match( "/\|/", $value['Hint'] ) )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<td class="nowrap">
|
|
|
|
<?php
|
2010-02-16 01:11:37 +08:00
|
|
|
$options = explode( '|', $value['Hint'] );
|
2008-07-14 21:54:50 +08:00
|
|
|
if ( count( $options ) > 3 )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<select name="newConfig[<?php echo $name ?>]"<?php echo $canEdit?'':' disabled="disabled"' ?>>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
foreach ( $options as $option )
|
|
|
|
{
|
2011-06-21 17:19:10 +08:00
|
|
|
if ( preg_match( '/^([^=]+)=(.+)$/', $option, $matches ) )
|
|
|
|
{
|
|
|
|
$optionLabel = $matches[1];
|
|
|
|
$optionValue = $matches[2];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$optionLabel = $optionValue = $option;
|
|
|
|
}
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<option value="<?php echo $optionValue ?>"<?php if ( $value['Value'] == $optionValue ) { echo ' selected="selected"'; } ?>><?php echo htmlspecialchars($optionLabel) ?></option>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
foreach ( $options as $option )
|
|
|
|
{
|
2011-06-21 17:19:10 +08:00
|
|
|
if ( preg_match( '/^([^=]+)=(.+)$/', $option ) )
|
|
|
|
{
|
|
|
|
$optionLabel = $matches[1];
|
|
|
|
$optionValue = $matches[2];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$optionLabel = $optionValue = $option;
|
|
|
|
}
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<span><input type="radio" id="<?php echo $name.'_'.preg_replace( '/[^a-zA-Z0-9]/', '', $optionValue ) ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo $optionValue ?>"<?php if ( $value['Value'] == $optionValue ) { ?> checked="checked"<?php } ?><?php echo $canEdit?'':' disabled="disabled"' ?>/> <?php echo htmlspecialchars($optionLabel) ?></span>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( $value['Type'] == "text" )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><textarea id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" rows="5" cols="40"<?php echo $canEdit?'':' disabled="disabled"' ?>><?php echo validHtmlStr($value['Value']) ?></textarea></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( $value['Type'] == "integer" )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><input type="text" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="small"<?php echo $canEdit?'':' disabled="disabled"' ?>/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( $value['Type'] == "hexadecimal" )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><input type="text" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="medium"<?php echo $canEdit?'':' disabled="disabled"' ?>/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( $value['Type'] == "decimal" )
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><input type="text" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="small"<?php echo $canEdit?'':' disabled="disabled"' ?>/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td><input type="text" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="large"<?php echo $canEdit?'':' disabled="disabled"' ?>/></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div id="contentButtons">
|
2015-05-10 21:10:30 +08:00
|
|
|
<input type="submit" value="<?php echo translate('Save') ?>"<?php echo $canEdit?'':' disabled="disabled"' ?>/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|