Merge branch 'storageareas' into zma_to_thread

This commit is contained in:
Isaac Connor 2017-12-11 13:51:32 -05:00
commit 49908c11da
22 changed files with 564 additions and 524 deletions

View File

@ -700,6 +700,7 @@ INSERT INTO `Controls` VALUES (NULL,'Netcat ONVIF','Ffmpeg','Netcat',0,0,1,1,0,0
INSERT INTO `Controls` VALUES (NULL,'Keekoon','Remote','Keekoon', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `Controls` VALUES (NULL,'HikVision','Local','',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,1,1,1,1,0,0,0,1,1,0,0,0,0,1,1,100,0,0,1,0,0,0,0,1,1,100,1,0,0,0);
INSERT INTO `Controls` VALUES (NULL,'Maginon Supra IPC','cURL','MaginonIPC',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO `Controls` VALUES (NULL,'Floureon 1080P','Ffmpeg','Floureon',0,0,0,1,0,0,0,1,1,18,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,8,0,0,1,0,0,0,0,1,1,8,0,0,0,0);
--
-- Add some monitor preset values

View File

@ -82,7 +82,6 @@ SET @s = (SELECT IF(
));
PREPARE stmt FROM @s;
EXECUTE stmt;
/*
SET @s = (SELECT IF(
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
AND table_name = 'Groups'
@ -93,4 +92,3 @@ SET @s = (SELECT IF(
));
PREPARE stmt FROM @s;
EXECUTE stmt;
*/

View File

@ -38,6 +38,10 @@ if [ "$1" = "configure" ]; then
zmupdate.pl --nointeractive
zmupdate.pl --nointeractive -f
# Add any new PTZ control configurations to the database (will not overwrite)
zmcamtool.pl --import >/dev/null 2>&1
else
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
fi

View File

@ -73,6 +73,9 @@ if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then
# Run the ZoneMinder update tool
zmupdate.pl --nointeractive
# Add any new PTZ control configurations to the database (will not overwrite)
zmcamtool.pl --import >/dev/null 2>&1
fi
#DEBHELPER#

View File

@ -40,6 +40,10 @@ if [ "$1" = "configure" ]; then
zmupdate.pl --nointeractive
zmupdate.pl --nointeractive -f
# Add any new PTZ control configurations to the database (will not overwrite)
zmcamtool.pl --import >/dev/null 2>&1
else
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
fi

View File

@ -21,7 +21,7 @@ class FilterComponent extends Component {
$query = array($attribute => $array);
array_push($conditions, $query);
} else {
array_push($conditions, array($attribute => $value));
$conditions[$attribute] = $value;
}
}

View File

@ -41,8 +41,9 @@ class EventsController extends AppController {
}
if ($this->request->params['named']) {
$this->FilterComponent = $this->Components->load('Filter');
$conditions = $this->FilterComponent->buildFilter($this->request->params['named']);
//$this->FilterComponent = $this->Components->load('Filter');
//$conditions = $this->FilterComponent->buildFilter($this->request->params['named']);
$conditions = $this->request->params['named'];
} else {
$conditions = array();
}
@ -60,7 +61,7 @@ class EventsController extends AppController {
'order' => array('StartTime'),
'paramType' => 'querystring',
);
//if ( $this->request->params['GroupId'] ) {
if ( isset( $conditions['GroupId'] ) ) {
$settings['joins'] = array(
array(
'table' => 'Groups_Monitors',
@ -71,7 +72,7 @@ class EventsController extends AppController {
),
);
$settings['contain'] = array('Group');
//}
}
$settings['conditions'] = array($conditions, $mon_options);
// How many events to return
@ -83,11 +84,10 @@ class EventsController extends AppController {
$this->Paginator->settings = $settings;
$events = $this->Paginator->paginate('Event');
// For each event, get its thumbnail data (path, width, height)
// For each event, get the frameID which has the largest score
foreach ($events as $key => $value) {
//$thumbData = $this->createThumbnail($value['Event']['Id']);
$thumbData = "";
$events[$key]['thumbData'] = $thumbData;
$maxScoreFrameId = $this->getMaxScoreAlarmFrameId($value['Event']['Id']);
$events[$key]['Event']['MaxScoreFrameId'] = $maxScoreFrameId;
}
$this->set(compact('events'));
@ -114,12 +114,9 @@ class EventsController extends AppController {
$allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY);
if (!empty($allowedMonitors))
{
if (!empty($allowedMonitors)) {
$mon_options = array('Event.MonitorId' => $allowedMonitors);
}
else
{
} else {
$mon_options='';
}
@ -156,8 +153,7 @@ class EventsController extends AppController {
*/
public function add() {
if ($this->Session->Read('eventPermission') != 'Edit')
{
if ($this->Session->Read('eventPermission') != 'Edit') {
throw new UnauthorizedException(__('Insufficient privileges'));
return;
}
@ -181,8 +177,7 @@ class EventsController extends AppController {
*/
public function edit($id = null) {
if ($this->Session->Read('eventPermission') != 'Edit')
{
if ($this->Session->Read('eventPermission') != 'Edit') {
throw new UnauthorizedException(__('Insufficient privileges'));
return;
}
@ -213,8 +208,7 @@ class EventsController extends AppController {
* @return void
*/
public function delete($id = null) {
if ($this->Session->Read('eventPermission') != 'Edit')
{
if ($this->Session->Read('eventPermission') != 'Edit') {
throw new UnauthorizedException(__('Insufficient privileges'));
return;
}
@ -230,7 +224,7 @@ class EventsController extends AppController {
} else {
return $this->flash(__('The event could not be deleted. Please, try again.'), array('action' => 'index'));
}
}
} // end public function delete
public function search() {
$this->Event->recursive = -1;
@ -254,9 +248,7 @@ class EventsController extends AppController {
'results' => $results,
'_serialize' => array('results')
));
}
} // end public function search
// format expected:
// you can changed AlarmFrames to any other named params
@ -320,7 +312,7 @@ class EventsController extends AppController {
'ZM_WEB_LIST_THUMB_HEIGHT',
'ZM_EVENT_IMAGE_DIGITS',
'ZM_DIR_IMAGES',
"$thumbs",
$thumbs,
'ZM_DIR_EVENTS'
)
)),
@ -334,13 +326,11 @@ class EventsController extends AppController {
$thumbWidth = $config['ZM_WEB_LIST_THUMB_WIDTH'];
$scale = (100 * $thumbWidth) / $event['Event']['Width'];
$thumbHeight = $this->Scaler->reScale( $event['Event']['Height'], $scale );
}
elseif ( $config['ZM_WEB_LIST_THUMB_HEIGHT'] ) {
} elseif ( $config['ZM_WEB_LIST_THUMB_HEIGHT'] ) {
$thumbHeight = $config['ZM_WEB_LIST_THUMB_HEIGHT'];
$scale = (100*$thumbHeight)/$event['Event']['Height'];
$thumbWidth = $this->Scaler->reScale( $event['Event']['Width'], $scale );
}
else {
} else {
throw new NotFoundException(__('No thumbnail width or height specified, please check in Options->Web'));
}
@ -350,7 +340,6 @@ class EventsController extends AppController {
$thumbData['Height'] = (int)$thumbHeight;
return( $thumbData );
}
public function archive($id = null) {
@ -377,4 +366,28 @@ class EventsController extends AppController {
));
}
}
public function getMaxScoreAlarmFrameId($id = null) {
$this->Event->recursive = -1;
if (!$this->Event->exists($id)) {
throw new NotFoundException(__('Invalid event'));
}
$event = $this->Event->find('first', array(
'conditions' => array('Id' => $id)
));
// Find the max Frame for this Event. Error out otherwise.
$this->loadModel('Frame');
if (! $frame = $this->Frame->find('first', array(
'conditions' => array(
'EventId' => $event['Event']['Id'],
'Score' => $event['Event']['MaxScore']
)
))) {
throw new NotFoundException(__("Can not find Frame for Event " . $event['Event']['Id']));
}
return $frame['Frame']['Id'];
}
} // end class EventsController

View File

@ -34,7 +34,8 @@ class MonitorsController extends AppController {
if ($this->request->params['named']) {
$this->FilterComponent = $this->Components->load('Filter');
$conditions = $this->FilterComponent->buildFilter($this->request->params['named']);
//$conditions = $this->FilterComponent->buildFilter($this->request->params['named']);
$conditions = $this->request->params['named'];
} else {
$conditions = array();
}
@ -45,7 +46,7 @@ class MonitorsController extends AppController {
}
$find_array = array('conditions'=>$conditions,'contain'=>array('Group'));
//if ( $this->request->params['GroupId'] ) {
if ( isset( $conditions['GroupId'] ) ) {
$find_array['joins'] = array(
array(
'table' => 'Groups_Monitors',
@ -63,7 +64,7 @@ class MonitorsController extends AppController {
//),
//)
);
//}
}
$monitors = $this->Monitor->find('all',$find_array);
$this->set(array(
'monitors' => $monitors,
@ -84,12 +85,9 @@ class MonitorsController extends AppController {
throw new NotFoundException(__('Invalid monitor'));
}
$allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY);
if (!empty($allowedMonitors))
{
if (!empty($allowedMonitors)) {
$restricted = array('Monitor.' . $this->Monitor->primaryKey => $allowedMonitors);
}
else
{
} else {
$restricted = '';
}

View File

@ -1,148 +0,0 @@
.ptzControls {
vertical-align: top;
margin: 10px auto 0;
width: 500px;
}
.ptzControls input.ptzTextBtn {
margin-top: 2px;
}
.ptzControls .controlsPanel {
margin: 0 auto;
}
.ptzControls input[type=image] {
border: 0px;
}
.ptzControls .controlsPanel .arrowControl {
width: 40px;
height: 180px;
margin: 0 4px;
}
.ptzControls .controlsPanel .arrowControl input {
display: block;
}
.ptzControls .controlsPanel .longArrowBtn {
width: 32px;
height: 48px;
margin: 0 auto;
cursor: pointer;
}
/*
* This is a bit of a hack as these lines should be in the above
* section but that messes up layout on IE6
*/
/*
.ptzControls .controlsPanel > div > div.longArrowBtn {
left: 50%;
margin-left: -16px;
}
*/
.ptzControls .controlsPanel .upBtn {
background: url("../../graphics/arrow-l-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .downBtn {
background: url("../../graphics/arrow-l-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .focusControls {
float: left;
}
.ptzControls .controlsPanel .zoomControls {
float: left;
}
.ptzControls .controlsPanel .irisControls {
float: right;
}
.ptzControls .controlsPanel .whiteControls {
float: right;
}
.ptzControls .controlsPanel .pantiltPanel {
margin: 0 auto;
height: 180px;
float: left;
width: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons {
margin: 5px auto;
border: 1px solid #006699;
text-align: center;
padding: 1px;
width: 100px;
height: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
width: 32px;
height: 32px;
cursor: pointer;
float: left;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn {
background: url("../../graphics/arrow-ul.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn {
background: url("../../graphics/arrow-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn {
background: url("../../graphics/arrow-ur.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn {
background: url("../../graphics/arrow-l.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn {
background: url("../../graphics/center.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn {
background: url("../../graphics/arrow-r.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn {
background: url("../../graphics/arrow-dl.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn {
background: url("../../graphics/arrow-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn {
background: url("../../graphics/arrow-dr.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .powerControls {
margin: 5px auto;
}
.ptzControls .presetControls {
margin: 5px auto;
}
.ptzControls .presetControls input {
margin: 1px;
}
.ptzControls .presetControls input.ptzNumBtn {
padding: 1px 2px;
width: 24px;
color: #ffffff;
text-align: center;
background-color: #016A9D;
}

View File

@ -1 +1,155 @@
@import url(../control.css);
.ptzControls {
vertical-align: top;
margin: 10px auto 0;
width: 500px;
}
.ptzControls::after {
visibility: hidden;
display: block;
content: "";
clear: both;
height: 0;
}
.ptzControls input.ptzTextBtn {
margin-top: 2px;
}
.ptzControls .controlsPanel {
margin: 0 auto;
}
.ptzControls input[type=image] {
border: 0px;
}
.ptzControls .controlsPanel .arrowControl {
width: 40px;
margin: 0 4px;
}
.ptzControls .controlsPanel .arrowControl input {
display: block;
}
.ptzControls .controlsPanel .longArrowBtn {
width: 32px;
height: 48px;
margin: 0 auto;
cursor: pointer;
}
/*
* This is a bit of a hack as these lines should be in the above
* section but that messes up layout on IE6
*/
/*
.ptzControls .controlsPanel > div > div.longArrowBtn {
left: 50%;
margin-left: -16px;
}
*/
.ptzControls .controlsPanel .upBtn {
background: url("../skins/classic/graphics/arrow-l-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .downBtn {
background: url("../skins/classic/graphics/arrow-l-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .focusControls {
float: left;
}
.ptzControls .controlsPanel .zoomControls {
float: left;
}
.ptzControls .controlsPanel .irisControls {
float: right;
}
.ptzControls .controlsPanel .whiteControls {
float: right;
}
.ptzControls .controlsPanel .pantiltPanel {
margin: 0 auto;
height: 180px;
float: left;
width: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons {
margin: 5px auto;
border: 1px solid #006699;
text-align: center;
padding: 1px;
width: 100px;
height: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
width: 32px;
height: 32px;
cursor: pointer;
float: left;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn {
background: url("../skins/classic/graphics/arrow-ul.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn {
background: url("../skins/classic/graphics/arrow-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn {
background: url("../skins/classic/graphics/arrow-ur.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn {
background: url("../skins/classic/graphics/arrow-l.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn {
background: url("../skins/classic/graphics/graphics/center.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn {
background: url("../skins/classic/graphics/arrow-r.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn {
background: url("../skins/classic/graphics/arrow-dl.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn {
background: url("../skins/classic/graphics/arrow-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn {
background: url("../skins/classic/graphics/arrow-dr.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .powerControls {
margin: 5px auto;
}
.ptzControls .presetControls {
margin: 5px auto;
}
.ptzControls .presetControls input {
margin: 1px;
}
.ptzControls .presetControls input.ptzNumBtn {
padding: 1px 2px;
width: 24px;
color: #ffffff;
text-align: center;
background-color: #016A9D;
}

View File

@ -1,5 +1,3 @@
@import url(../control.css);
#header {
display: flex;
justify-content: space-between;

View File

@ -1,148 +0,0 @@
.ptzControls {
vertical-align: top;
margin: 10px auto 0;
width: 500px;
}
.ptzControls input.ptzTextBtn {
margin-top: 2px;
}
.ptzControls .controlsPanel {
margin: 0 auto;
}
.ptzControls input[type=image] {
border: 0px;
}
.ptzControls .controlsPanel .arrowControl {
width: 40px;
height: 180px;
margin: 0 4px;
}
.ptzControls .controlsPanel .arrowControl input {
display: block;
}
.ptzControls .controlsPanel .longArrowBtn {
width: 32px;
height: 48px;
margin: 0 auto;
cursor: pointer;
}
/*
* This is a bit of a hack as these lines should be in the above
* section but that messes up layout on IE6
*/
/*
.ptzControls .controlsPanel > div > div.longArrowBtn {
left: 50%;
margin-left: -16px;
}
*/
.ptzControls .controlsPanel .upBtn {
background: url("../../graphics/arrow-l-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .downBtn {
background: url("../../graphics/arrow-l-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .focusControls {
float: left;
}
.ptzControls .controlsPanel .zoomControls {
float: left;
}
.ptzControls .controlsPanel .irisControls {
float: right;
}
.ptzControls .controlsPanel .whiteControls {
float: right;
}
.ptzControls .controlsPanel .pantiltPanel {
margin: 0 auto;
height: 180px;
float: left;
width: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons {
margin: 5px auto;
border: 1px solid #006699;
text-align: center;
padding: 1px;
width: 102px;
height: 102px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
width: 32px;
height: 32px;
cursor: pointer;
float: left;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn {
background: url("../../graphics/arrow-ul.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn {
background: url("../../graphics/arrow-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn {
background: url("../../graphics/arrow-ur.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn {
background: url("../../graphics/arrow-l.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn {
background: url("../../graphics/center.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn {
background: url("../../graphics/arrow-r.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn {
background: url("../../graphics/arrow-dl.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn {
background: url("../../graphics/arrow-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn {
background: url("../../graphics/arrow-dr.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .powerControls {
margin: 5px auto;
}
.ptzControls .presetControls {
margin: 5px auto;
}
.ptzControls .presetControls input {
margin: 1px;
}
.ptzControls .presetControls input.ptzNumBtn {
padding: 1px 2px;
width: 24px;
color: #ffffff;
text-align: center;
background-color: #016A9D;
}

View File

@ -1 +1,155 @@
@import url(../control.css);
.ptzControls {
vertical-align: top;
margin: 10px auto 0;
width: 500px;
}
.ptzControls::after {
visibility: hidden;
display: block;
content: "";
clear: both;
height: 0;
}
.ptzControls input.ptzTextBtn {
margin-top: 2px;
}
.ptzControls .controlsPanel {
margin: 0 auto;
}
.ptzControls input[type=image] {
border: 0px;
}
.ptzControls .controlsPanel .arrowControl {
width: 40px;
margin: 0 4px;
}
.ptzControls .controlsPanel .arrowControl input {
display: block;
}
.ptzControls .controlsPanel .longArrowBtn {
width: 32px;
height: 48px;
margin: 0 auto;
cursor: pointer;
}
/*
* This is a bit of a hack as these lines should be in the above
* section but that messes up layout on IE6
*/
/*
.ptzControls .controlsPanel > div > div.longArrowBtn {
left: 50%;
margin-left: -16px;
}
*/
.ptzControls .controlsPanel .upBtn {
background: url("../skins/classic/graphics/arrow-l-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .downBtn {
background: url("../skins/classic/graphics/arrow-l-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .focusControls {
float: left;
}
.ptzControls .controlsPanel .zoomControls {
float: left;
}
.ptzControls .controlsPanel .irisControls {
float: right;
}
.ptzControls .controlsPanel .whiteControls {
float: right;
}
.ptzControls .controlsPanel .pantiltPanel {
margin: 0 auto;
height: 180px;
float: left;
width: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons {
margin: 5px auto;
border: 1px solid #006699;
text-align: center;
padding: 1px;
width: 102px;
height: 102px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
width: 32px;
height: 32px;
cursor: pointer;
float: left;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn {
background: url("../skins/classic/graphics/arrow-ul.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn {
background: url("../skins/classic/graphics/arrow-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn {
background: url("../skins/classic/graphics/arrow-ur.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn {
background: url("../skins/classic/graphics/arrow-l.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn {
background: url("../skins/classic/graphics/graphics/center.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn {
background: url("../skins/classic/graphics/arrow-r.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn {
background: url("../skins/classic/graphics/arrow-dl.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn {
background: url("../skins/classic/graphics/arrow-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn {
background: url("../skins/classic/graphics/arrow-dr.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .powerControls {
margin: 5px auto;
}
.ptzControls .presetControls {
margin: 5px auto;
}
.ptzControls .presetControls input {
margin: 1px;
}
.ptzControls .presetControls input.ptzNumBtn {
padding: 1px 2px;
width: 24px;
color: #ffffff;
text-align: center;
background-color: #016A9D;
}

View File

@ -1,5 +1,3 @@
@import url(../control.css);
#header {
display: flex;
justify-content: space-between;

View File

@ -1,148 +0,0 @@
.ptzControls {
vertical-align: top;
margin: 10px auto 0;
width: 500px;
}
.ptzControls input.ptzTextBtn {
margin-top: 2px;
}
.ptzControls .controlsPanel {
margin: 0 auto;
}
.ptzControls input[type=image] {
border: 0px;
}
.ptzControls .controlsPanel .arrowControl {
width: 40px;
height: 180px;
margin: 0 4px;
}
.ptzControls .controlsPanel .arrowControl input {
display: block;
}
.ptzControls .controlsPanel .longArrowBtn {
width: 32px;
height: 48px;
margin: 0 auto;
cursor: pointer;
}
/*
* This is a bit of a hack as these lines should be in the above
* section but that messes up layout on IE6
*/
/*
.ptzControls .controlsPanel > div > div.longArrowBtn {
left: 50%;
margin-left: -16px;
}
*/
.ptzControls .controlsPanel .upBtn {
background: url("../../graphics/arrow-l-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .downBtn {
background: url("../../graphics/arrow-l-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .focusControls {
float: left;
}
.ptzControls .controlsPanel .zoomControls {
float: left;
}
.ptzControls .controlsPanel .irisControls {
float: right;
}
.ptzControls .controlsPanel .whiteControls {
float: right;
}
.ptzControls .controlsPanel .pantiltPanel {
margin: 0 auto;
height: 180px;
float: left;
width: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons {
margin: 5px auto;
border: 1px solid #006699;
text-align: center;
padding: 1px;
width: 102px;
height: 102px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
width: 32px;
height: 32px;
cursor: pointer;
float: left;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn {
background: url("../../graphics/arrow-ul.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn {
background: url("../../graphics/arrow-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn {
background: url("../../graphics/arrow-ur.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn {
background: url("../../graphics/arrow-l.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn {
background: url("../../graphics/center.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn {
background: url("../../graphics/arrow-r.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn {
background: url("../../graphics/arrow-dl.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn {
background: url("../../graphics/arrow-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn {
background: url("../../graphics/arrow-dr.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .powerControls {
margin: 5px auto;
}
.ptzControls .presetControls {
margin: 5px auto;
}
.ptzControls .presetControls input {
margin: 1px;
}
.ptzControls .presetControls input.ptzNumBtn {
padding: 1px 2px;
width: 24px;
color: #ffffff;
text-align: center;
background-color: #016A9D;
}

View File

@ -1 +1,155 @@
@import url(../control.css);
.ptzControls {
vertical-align: top;
margin: 10px auto 0;
width: 500px;
}
.ptzControls::after {
visibility: hidden;
display: block;
content: "";
clear: both;
height: 0;
}
.ptzControls input.ptzTextBtn {
margin-top: 2px;
}
.ptzControls .controlsPanel {
margin: 0 auto;
}
.ptzControls input[type=image] {
border: 0px;
}
.ptzControls .controlsPanel .arrowControl {
width: 40px;
margin: 0 4px;
}
.ptzControls .controlsPanel .arrowControl input {
display: block;
}
.ptzControls .controlsPanel .longArrowBtn {
width: 32px;
height: 48px;
margin: 0 auto;
cursor: pointer;
}
/*
* This is a bit of a hack as these lines should be in the above
* section but that messes up layout on IE6
*/
/*
.ptzControls .controlsPanel > div > div.longArrowBtn {
left: 50%;
margin-left: -16px;
}
*/
.ptzControls .controlsPanel .upBtn {
background: url("../skins/classic/graphics/arrow-l-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .downBtn {
background: url("../skins/classic/graphics/arrow-l-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .focusControls {
float: left;
}
.ptzControls .controlsPanel .zoomControls {
float: left;
}
.ptzControls .controlsPanel .irisControls {
float: right;
}
.ptzControls .controlsPanel .whiteControls {
float: right;
}
.ptzControls .controlsPanel .pantiltPanel {
margin: 0 auto;
height: 180px;
float: left;
width: 100px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons {
margin: 5px auto;
border: 1px solid #006699;
text-align: center;
padding: 1px;
width: 102px;
height: 102px;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
width: 32px;
height: 32px;
cursor: pointer;
float: left;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn {
background: url("../skins/classic/graphics/arrow-ul.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn {
background: url("../skins/classic/graphics/arrow-u.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn {
background: url("../skins/classic/graphics/arrow-ur.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn {
background: url("../skins/classic/graphics/arrow-l.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn {
background: url("../skins/classic/graphics/center.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn {
background: url("../skins/classic/graphics/arrow-r.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn {
background: url("../skins/classic/graphics/arrow-dl.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn {
background: url("../skins/classic/graphics/arrow-d.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn {
background: url("../skins/classic/graphics/arrow-dr.png") no-repeat 0 0;
}
.ptzControls .controlsPanel .powerControls {
margin: 5px auto;
}
.ptzControls .presetControls {
margin: 5px auto;
}
.ptzControls .presetControls input {
margin: 1px;
}
.ptzControls .presetControls input.ptzNumBtn {
padding: 1px 2px;
width: 24px;
color: #ffffff;
text-align: center;
background-color: #016A9D;
}

View File

@ -1,5 +1,3 @@
@import url(../control.css);
#header {
display: flex;
justify-content: space-between;

View File

@ -34,6 +34,9 @@ function xhtmlHeaders( $file, $title ) {
$basename = basename( $file, '.php' );
$viewCssFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css' );
if ($basename == 'watch') {
$viewCssFileExtra = getSkinFile( '/css/'.$css.'/views/control.css' );
}
$viewCssPhpFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css.php' );
$viewJsFile = getSkinFile( 'views/js/'.$basename.'.js' );
$viewJsPhpFile = getSkinFile( 'views/js/'.$basename.'.js.php' );
@ -67,6 +70,12 @@ if ( file_exists( "skins/$skin/css/$css/graphics/favicon.ico" ) ) {
if ( $viewCssFile ) {
?>
<link rel="stylesheet" href="<?php echo cache_bust($viewCssFile) ?>" type="text/css" media="screen"/>
<?php
}
if ( isset($viewCssFileExtra) ) {
?>
<link rel="stylesheet" href="<?php echo cache_bust($viewCssFileExtra) ?>" type="text/css" media="screen"/>
<?php
}
if ( $viewCssPhpFile ) {
@ -109,9 +118,12 @@ if ( file_exists( "skins/$skin/css/$css/graphics/favicon.ico" ) ) {
<script src="skins/<?php echo $skin ?>/js/video.js"></script>
<script src="./js/videojs.zoomrotate.js"></script>
<script src="skins/<?php echo $skin ?>/js/moment.min.js"></script>
<?php
} else if ( $title == 'Watch' ) {
?>
<link href="<?php echo cache_bust($viewCssFileExtra) ?>" rel="stylesheet">
<?php
}
if ( $skinJsPhpFile ) {
?>
<script type="text/javascript">

View File

@ -58,11 +58,13 @@ var popupSizes = {
'optionhelp': { 'width': 400, 'height': 320 },
'options': { 'width': 1000, 'height': 660 },
'preset': { 'width': 300, 'height': 120 },
'server': { 'width': 600, 'height': 405 },
'settings': { 'width': 220, 'height': 225 },
'state': { 'width': 370, 'height': 134 },
'stats': { 'width': 840, 'height': 200 },
'storage': { 'width': 600, 'height': 405 },
'timeline': { 'width': 760, 'height': 540 },
'user': { 'width': 360, 'height': 420 },
'user': { 'width': 360, 'height': 720 },
'version': { 'width': 360, 'height': 140 },
'video': { 'width': 420, 'height': 360 },
'videoview': { 'addWidth': 48, 'addHeight': 80 },

View File

@ -57,11 +57,13 @@ var popupSizes = {
'optionhelp': { 'width': 400, 'height': 320 },
'options': { 'width': 1000, 'height': 660 },
'preset': { 'width': 300, 'height': 120 },
'server': { 'width': 600, 'height': 405 },
'settings': { 'width': 220, 'height': 225 },
'state': { 'width': 370, 'height': 134 },
'stats': { 'width': 840, 'height': 200 },
'storage': { 'width': 600, 'height': 405 },
'timeline': { 'width': 760, 'height': 540 },
'user': { 'width': 360, 'height': 420 },
'user': { 'width': 360, 'height': 720 },
'version': { 'width': 360, 'height': 140 },
'video': { 'width': 420, 'height': 360 },
'videoview': { 'addWidth': 48, 'addHeight': 80 },

View File

@ -57,11 +57,13 @@ var popupSizes = {
'optionhelp': { 'width': 400, 'height': 320 },
'options': { 'width': 1000, 'height': 660 },
'preset': { 'width': 300, 'height': 120 },
'server': { 'width': 600, 'height': 405 },
'settings': { 'width': 220, 'height': 235 },
'state': { 'width': 400, 'height': 170 },
'stats': { 'width': 840, 'height': 200 },
'storage': { 'width': 600, 'height': 405 },
'timeline': { 'width': 760, 'height': 540 },
'user': { 'width': 360, 'height': 420 },
'user': { 'width': 360, 'height': 720 },
'version': { 'width': 360, 'height': 185 },
'video': { 'width': 420, 'height': 360 },
'videoview': { 'addWidth': 48, 'addHeight': 80 },

View File

@ -189,8 +189,8 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
</tbody>
</table>
<div id="contentButtons">
<input type="button" class="btn btn-primary btn-lg" value="<?php echo translate('AddNewUser') ?>" onclick="createPopup( '?view=user&amp;uid=0', 'zmUser', 'user' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/>
<input type="submit" class="btn btn-danger btn-lg" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/>
<button value="Add New User" onclick="createPopup('?view=user&amp;uid=0', 'zmUser', 'user');"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>><?php echo translate('AddNewUser') ?></button>
<button class="btn-danger" name="deleteBtn" value="Delete" disabled="disabled"><?php echo translate('Delete') ?></button>
</div>
</form>
<?php
@ -230,8 +230,8 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
</tbody>
</table>
<div id="contentButtons">
<input type="button" class="btn btn-primary btn-lg" value="<?php echo translate('AddNewServer') ?>" onclick="createPopup( '?view=server&amp;id=0', 'zmServer', 'server' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/>
<input type="submit" class="btn btn-danger btn-lg" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/>
<button value="Add New Server" onclick="createPopup('?view=server&amp;id=0','zmServer','server');"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>><?php echo translate('AddNewServer') ?></button>
<button class="btn-danger" name="deleteBtn" value="Delete" disabled="disabled"><?php echo translate('Delete') ?></button>
</div>
</form>
<?php
@ -264,9 +264,8 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
</tbody>
</table>
<div id="contentButtons">
<input type="button" value="<?php echo translate('AddNewStorage') ?>" onclick="createPopup( '?view=storage&amp;id=0', 'zmStorage', 'storage' );"<?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();"/>
<button value="Add New Storage" onclick="createPopup('?view=storage&amp;id=0','zmStorage','storage');"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>><?php echo translate('AddNewStorage') ?></button>
<button class="btn-danger" name="deleteBtn" value="Delete" disabled="disabled"><?php echo translate('Delete') ?></button>
</div>
</form>
<?php
@ -339,33 +338,23 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
}
?>
<?php
}
elseif ( $value['Type'] == "text" )
{
} else if ( $value['Type'] == 'text' ) {
?>
<textarea class="form-control" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" rows="5" cols="40"<?php echo $canEdit?'':' disabled="disabled"' ?>><?php echo validHtmlStr($value['Value']) ?></textarea>
<?php
}
elseif ( $value['Type'] == "integer" )
{
} else if ( $value['Type'] == 'integer' ) {
?>
<input type="number" class="form-control" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="small"<?php echo $canEdit?'':' disabled="disabled"' ?>/>
<?php
}
elseif ( $value['Type'] == "hexadecimal" )
{
} else if ( $value['Type'] == 'hexadecimal' ) {
?>
<input type="text" class="form-control" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="medium"<?php echo $canEdit?'':' disabled="disabled"' ?>/>
<?php
}
elseif ( $value['Type'] == "decimal" )
{
} else if ( $value['Type'] == 'decimal' ) {
?>
<input type="text" class="form-control" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="small"<?php echo $canEdit?'':' disabled="disabled"' ?>/>
<?php
}
else
{
} else {
?>
<input type="text" class="form-control" id="<?php echo $name ?>" name="newConfig[<?php echo $name ?>]" value="<?php echo validHtmlStr($value['Value']) ?>" class="large"<?php echo $canEdit?'':' disabled="disabled"' ?>/>
<?php
@ -378,7 +367,7 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
}
?>
<div id="contentButtons">
<input type="submit" class="btn btn-primary btn-lg" value="<?php echo translate('Save') ?>"<?php echo $canEdit?'':' disabled="disabled"' ?>/>
<button value="Save" <?php echo $canEdit?'':' disabled="disabled"' ?>><?php echo translate('Save') ?></button>
</div>
</form>
<?php
@ -389,6 +378,6 @@ foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
</div>
</div> <!-- end row -->
</div>
<?php include("skins/$skin/views/state.php") ?>
<?php include("skins/$skin/views/state.php") ?>
</body>
</html>