convert enoperm function to php file
This commit is contained in:
parent
416de4a068
commit
6e6b9a464b
|
@ -5,14 +5,10 @@ if ( empty($_REQUEST['modal']) ) {
|
|||
return;
|
||||
}
|
||||
|
||||
//global $OLANG;
|
||||
$modal = validJsStr($_REQUEST['modal']);
|
||||
$data = array();
|
||||
|
||||
switch ( $modal ) {
|
||||
case 'enoperm' :
|
||||
$data['html'] = getENoPermHTML();
|
||||
break;
|
||||
case 'delconfirm' :
|
||||
$data['html'] = getDelConfirmHTML();
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
// Return an Error No Permissions Modal
|
||||
|
||||
?>
|
||||
<div id="ENoPerm" class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ZoneMinder <?php echo translate('Error') ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php echo translate('YouNoPerms') ?></p>
|
||||
<p><?php echo translate('ContactAdmin') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="enpCloseBtn" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -754,33 +754,6 @@ function runtimeStatus($running=null) {
|
|||
return $running ? ($state ? $state : translate('Running')) : translate('Stopped');
|
||||
}
|
||||
|
||||
// Return an Error No Permissions Modal
|
||||
function getENoPermHTML() {
|
||||
$result = '';
|
||||
|
||||
$result .= '<div id="ENoPerm" class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">'.PHP_EOL;
|
||||
$result .= '<div class="modal-dialog">'.PHP_EOL;
|
||||
$result .= '<div class="modal-content">'.PHP_EOL;
|
||||
$result .= '<div class="modal-header">'.PHP_EOL;
|
||||
$result .= '<h5 class="modal-title">ZoneMinder ' .translate('Error'). '</h5>'.PHP_EOL;
|
||||
$result .= '<button type="button" class="close" data-dismiss="modal" aria-label="Close">'.PHP_EOL;
|
||||
$result .= '<span aria-hidden="true">×</span>'.PHP_EOL;
|
||||
$result .= '</button>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '<div class="modal-body">'.PHP_EOL;
|
||||
$result .= '<p>' .translate('YouNoPerms'). '</p>'.PHP_EOL;
|
||||
$result .= '<p>' .translate('ContactAdmin'). '</p>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '<div class="modal-footer">'.PHP_EOL;
|
||||
$result .= '<button type="button" id="enpCloseBtn" class="btn btn-secondary" data-dismiss="modal">Close</button>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getStatsTableHTML($eid, $fid, $row='') {
|
||||
if ( !canView('Events') ) return;
|
||||
$result = '';
|
||||
|
|
Loading…
Reference in New Issue