Code: Select all
Index: web/skins/classic/views/controlcap.php
===================================================================
--- web/skins/classic/views/controlcap.php (revision 2720)
+++ web/skins/classic/views/controlcap.php (working copy)
@@ -40,118 +40,122 @@
else
$tab = "main";
-if ( !empty($_REQUEST['cid']) )
+if ( isset( $_REQUEST['newControl'] ) )
{
- $control = dbFetchOne( "select * from Controls where Id = '".dbEscape($_REQUEST['cid'])."'" );
+ $newControl = $_REQUEST['newControl'];
}
else
{
- $control = array(
- 'Name' => $SLANG['New'],
- 'Type' => "Local",
- 'Protocol' => "",
- 'CanWake' => "",
- 'CanSleep' => "",
- 'CanReset' => "",
- 'CanMove' => "",
- 'CanMoveDiag' => "",
- 'CanMoveMap' => "",
- 'CanMoveAbs' => "",
- 'CanMoveRel' => "",
- 'CanMoveCon' => "",
- 'CanPan' => "",
- 'MinPanRange' => "",
- 'MaxPanRange' => "",
- 'MinPanStep' => "",
- 'MaxPanStep' => "",
- 'HasPanSpeed' => "",
- 'MinPanSpeed' => "",
- 'MaxPanSpeed' => "",
- 'HasTurboPan' => "",
- 'TurboPanSpeed' => "",
- 'CanTilt' => "",
- 'MinTiltRange' => "",
- 'MaxTiltRange' => "",
- 'MinTiltStep' => "",
- 'MaxTiltStep' => "",
- 'HasTiltSpeed' => "",
- 'MinTiltSpeed' => "",
- 'MaxTiltSpeed' => "",
- 'HasTurboTilt' => "",
- 'TurboTiltSpeed' => "",
- 'CanZoom' => "",
- 'CanZoomAbs' => "",
- 'CanZoomRel' => "",
- 'CanZoomCon' => "",
- 'MinZoomRange' => "",
- 'MaxZoomRange' => "",
- 'MinZoomStep' => "",
- 'MaxZoomStep' => "",
- 'HasZoomSpeed' => "",
- 'MinZoomSpeed' => "",
- 'MaxZoomSpeed' => "",
- 'CanFocus' => "",
- 'CanAutoFocus' => "",
- 'CanFocusAbs' => "",
- 'CanFocusRel' => "",
- 'CanFocusCon' => "",
- 'MinFocusRange' => "",
- 'MaxFocusRange' => "",
- 'MinFocusStep' => "",
- 'MaxFocusStep' => "",
- 'HasFocusSpeed' => "",
- 'MinFocusSpeed' => "",
- 'MaxFocusSpeed' => "",
- 'CanIris' => "",
- 'CanAutoIris' => "",
- 'CanIrisAbs' => "",
- 'CanIrisRel' => "",
- 'CanIrisCon' => "",
- 'MinIrisRange' => "",
- 'MaxIrisRange' => "",
- 'MinIrisStep' => "",
- 'MaxIrisStep' => "",
- 'HasIrisSpeed' => "",
- 'MinIrisSpeed' => "",
- 'MaxIrisSpeed' => "",
- 'CanGain' => "",
- 'CanAutoGain' => "",
- 'CanGainAbs' => "",
- 'CanGainRel' => "",
- 'CanGainCon' => "",
- 'MinGainRange' => "",
- 'MaxGainRange' => "",
- 'MinGainStep' => "",
- 'MaxGainStep' => "",
- 'HasGainSpeed' => "",
- 'MinGainSpeed' => "",
- 'MaxGainSpeed' => "",
- 'CanWhite' => "",
- 'CanAutoWhite' => "",
- 'CanWhiteAbs' => "",
- 'CanWhiteRel' => "",
- 'CanWhiteCon' => "",
- 'MinWhiteRange' => "",
- 'MaxWhiteRange' => "",
- 'MinWhiteStep' => "",
- 'MaxWhiteStep' => "",
- 'HasWhiteSpeed' => "",
- 'MinWhiteSpeed' => "",
- 'MaxWhiteSpeed' => "",
- 'HasPresets' => "",
- 'NumPresets' => "",
- 'HasHomePreset' => "",
- 'CanSetPresets' => "",
- );
-}
-if ( !isset( $newControl ) )
-{
+ if ( !empty($_REQUEST['cid']) )
+ {
+ $control = dbFetchOne( "select * from Controls where Id = '".dbEscape($_REQUEST['cid'])."'" );
+ }
+ else
+ {
+ $control = array(
+ 'Name' => $SLANG['New'],
+ 'Type' => "Local",
+ 'Protocol' => "",
+ 'CanWake' => "",
+ 'CanSleep' => "",
+ 'CanReset' => "",
+ 'CanMove' => "",
+ 'CanMoveDiag' => "",
+ 'CanMoveMap' => "",
+ 'CanMoveAbs' => "",
+ 'CanMoveRel' => "",
+ 'CanMoveCon' => "",
+ 'CanPan' => "",
+ 'MinPanRange' => "",
+ 'MaxPanRange' => "",
+ 'MinPanStep' => "",
+ 'MaxPanStep' => "",
+ 'HasPanSpeed' => "",
+ 'MinPanSpeed' => "",
+ 'MaxPanSpeed' => "",
+ 'HasTurboPan' => "",
+ 'TurboPanSpeed' => "",
+ 'CanTilt' => "",
+ 'MinTiltRange' => "",
+ 'MaxTiltRange' => "",
+ 'MinTiltStep' => "",
+ 'MaxTiltStep' => "",
+ 'HasTiltSpeed' => "",
+ 'MinTiltSpeed' => "",
+ 'MaxTiltSpeed' => "",
+ 'HasTurboTilt' => "",
+ 'TurboTiltSpeed' => "",
+ 'CanZoom' => "",
+ 'CanZoomAbs' => "",
+ 'CanZoomRel' => "",
+ 'CanZoomCon' => "",
+ 'MinZoomRange' => "",
+ 'MaxZoomRange' => "",
+ 'MinZoomStep' => "",
+ 'MaxZoomStep' => "",
+ 'HasZoomSpeed' => "",
+ 'MinZoomSpeed' => "",
+ 'MaxZoomSpeed' => "",
+ 'CanFocus' => "",
+ 'CanAutoFocus' => "",
+ 'CanFocusAbs' => "",
+ 'CanFocusRel' => "",
+ 'CanFocusCon' => "",
+ 'MinFocusRange' => "",
+ 'MaxFocusRange' => "",
+ 'MinFocusStep' => "",
+ 'MaxFocusStep' => "",
+ 'HasFocusSpeed' => "",
+ 'MinFocusSpeed' => "",
+ 'MaxFocusSpeed' => "",
+ 'CanIris' => "",
+ 'CanAutoIris' => "",
+ 'CanIrisAbs' => "",
+ 'CanIrisRel' => "",
+ 'CanIrisCon' => "",
+ 'MinIrisRange' => "",
+ 'MaxIrisRange' => "",
+ 'MinIrisStep' => "",
+ 'MaxIrisStep' => "",
+ 'HasIrisSpeed' => "",
+ 'MinIrisSpeed' => "",
+ 'MaxIrisSpeed' => "",
+ 'CanGain' => "",
+ 'CanAutoGain' => "",
+ 'CanGainAbs' => "",
+ 'CanGainRel' => "",
+ 'CanGainCon' => "",
+ 'MinGainRange' => "",
+ 'MaxGainRange' => "",
+ 'MinGainStep' => "",
+ 'MaxGainStep' => "",
+ 'HasGainSpeed' => "",
+ 'MinGainSpeed' => "",
+ 'MaxGainSpeed' => "",
+ 'CanWhite' => "",
+ 'CanAutoWhite' => "",
+ 'CanWhiteAbs' => "",
+ 'CanWhiteRel' => "",
+ 'CanWhiteCon' => "",
+ 'MinWhiteRange' => "",
+ 'MaxWhiteRange' => "",
+ 'MinWhiteStep' => "",
+ 'MaxWhiteStep' => "",
+ 'HasWhiteSpeed' => "",
+ 'MinWhiteSpeed' => "",
+ 'MaxWhiteSpeed' => "",
+ 'HasPresets' => "",
+ 'NumPresets' => "",
+ 'HasHomePreset' => "",
+ 'CanSetPresets' => "",
+ );
+ }
$newControl = $control;
}
$focusWindow = true;
-xhtmlHeaders(__FILE__, $SLANG['ControlCap']." - ".$control['Name'] );
+xhtmlHeaders(__FILE__, $SLANG['ControlCap']." - ".$newControl['Name'] );
?>
<body>
<div id="page">
@@ -172,7 +176,7 @@
else
{
?>
- <li><a href="?view=<?= $view ?>&cid=<?= requestVar( 'cid' ) ?>&tab=<?= $name ?>"><?= $value ?></a></li>
+ <li><a href="#" onclick="submitTab( '<?= $name ?>' ); return( false );"><?= $value ?></a></li>
<?php
}
}
It's really only the last changed line that is significant I think however.