Beispiel #1
0
    public static function content_header($icon, $title, $subtitle = '')
    {
        $serverload = implode(', ', sys_getloadavg());
        $pid = Service::ServiceData(SInfo::DATA_PID);
        if ($subtitle != '') {
            $title .= ' <span>&gt; ' . $subtitle . '</span>';
        }
        $buf = '<div class="row">
			<div class="col-xs-12 col-sm-7 col-md-7 col-lg-7">
				<h2 class="page-title txt-color-blueDark"><i class="fa-fw fa ' . $icon . '"></i> ' . $title . '</h2>
			</div>
			<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
				<ul id="sparks" class="">
					<li class="sparks-info">
						<h5>LSWS PID <span id="lst-pid" class="txt-color-blue"> ' . $pid . ' </span></h5>&nbsp;
						<a class="btn btn-success" title="' . DMsg::UIStr('menu_restart') . '" href="javascript:lst_restart()"><i class="fa fa-lg fa-repeat"></i></a>
					</li>
					<li class="sparks-info">
						<h5> ' . DMsg::UIStr('note_loadavg') . ' <span id="lst-load" class="txt-color-purple"> ' . $serverload . ' </span></h5>&nbsp;
						<a class="btn btn-info" title="' . DMsg::UIStr('menu_rtstats') . '" href="#view/realtimestats.php"><i class="fa fa-lg fa-bar-chart-o"></i></a>
					</li>

				</ul>
			</div>
		</div>
				';
        return $buf;
    }
Beispiel #2
0
    public function Render($blocked_version = 0)
    {
        $buf = '<a href="javascript:void(0);" rel="popover" data-placement="right"
				data-original-title="<i class=\'fa fa-fw fa-tag\'></i> <strong>' . $this->name . '</strong>" data-html="true" data-content=\'<div>';
        switch ($blocked_version) {
            case 0:
                break;
            case 1:
                // LSWS ENTERPRISE;
                $buf .= ' <i>' . DMsg::UIStr('note_entfeature') . '</i>';
                break;
            case 2:
                // LSWS 2CPU +
            // LSWS 2CPU +
            case 3:
                // LSLB 2CPU +
                $buf .= ' <i>' . DMsg::UIStr('note_multicpufeature') . '</i>';
                break;
        }
        $buf .= $this->desc . '<br><br>';
        if ($this->syntax) {
            $buf .= '<strong>' . DMsg::UIStr('note_syntax') . ':</strong> ' . $this->syntax . '<br><br>';
        }
        if ($this->example) {
            $buf .= '<strong>' . DMsg::UIStr('note_example') . ':</strong> ' . $this->example . '<br><br>';
        }
        if ($this->tips) {
            $buf .= '<strong>' . DMsg::UIStr('note_tips') . ':</strong><ul type=circle>';
            $tips = explode('<br/>', $this->tips);
            foreach ($tips as $ti) {
                $ti = trim($ti);
                if ($ti != '') {
                    $buf .= '<li>' . $ti . '</li>';
                }
            }
            $buf .= '</ul>';
        }
        $buf .= '</div>\'><i class="icon-prepend fa fa-question-circle text-muted"></i></a>';
        return $buf;
    }
 function Get($field)
 {
     switch ($field) {
         case self::FLD_LEVEL:
             return $this->_level;
         case self::FLD_LOGFILE:
             return $this->_logfile;
         case self::FLD_FROMPOS:
             return number_format($this->_frompos / 1024, 2);
         case self::FLD_FROMINPUT:
             return $this->_frominput;
         case self::FLD_BLKSIZE:
             return $this->_blksize;
         case self::FLD_OUTMESG:
             $repl = array('%%totallines%%' => number_format($this->_totallines), '%%outlines%%' => number_format($this->_outlines), '%%level%%' => $this->LEVEL_DESCR[$this->_level]);
             return DMsg::UIStr('service_logresnote', $repl) . ' ' . $this->_outmesg;
         case self::FLD_TOTALFOUND:
             return $this->_outlines;
         case self::FLD_FILE_SIZE:
             return number_format($this->_filesize / 1024, 2);
         default:
             die("Illegal entry! field = {$field}");
     }
 }
Beispiel #4
0
<?php

/*
 * type: parse  _minVal = pattern, _maxVal = pattern tips
 *
 */
define('ATTR_VAL_NOT_SET', DMsg::UIStr('o_notset'));
define('ATTR_VAL_BOOL_YES', DMsg::UIStr('o_yes'));
define('ATTR_VAL_BOOL_NO', DMsg::UIStr('o_no'));
define('ATTR_NOTE_NUM_RANGE', DMsg::UIStr('note_numvalidrange'));
define('ATTR_NOTE_NUMBER', DMsg::UIStr('note_number'));
class DAttrBase
{
    protected $_key;
    protected $_keyalias;
    public $_helpKey;
    public $_type;
    public $_minVal;
    public $_maxVal;
    public $_label;
    public $_href;
    public $_hrefLink;
    public $_multiInd;
    public $_note;
    public $_icon;
    protected $_inputType;
    protected $_inputAttr;
    protected $_glue;
    protected $_bitFlag = 0;
    const BM_NOTNULL = 1;
    const BM_NOEDIT = 2;
Beispiel #5
0
<?php

require_once 'inc/auth.php';
echo UI::content_header('fa-list', DMsg::UIStr('menu_tools'), DMsg::UIStr('menu_logviewer'));
?>

<div>

<article>
	<div class="well well-sm">
	<form class="form-horizontal" name="logform" id="logform">
		<fieldset>
			<legend>
			<!-- div class="btn-group">
							<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
								<i class="fa fa-file-text-o"></i> <span class="caret"> </span>
							</button>
							<ul class="dropdown-menu">
								<li>
									<a href="javascript:void(0);">Choose a different file</a>
								</li>
							</ul>
						</div-->
			<code id="cur_log_file"></code>
			<a href="javascript:download_log()" class="btn btn-xs btn-default"><i class="fa fa-download"></i></a>
			<span class="pull-right"><?php 
DMsg::EchoUIStr('service_size');
?>
: <code id="cur_log_size"></code>KB</span>
			</legend>
 protected function process_config()
 {
     //init here
     $this->_disp->InitConf();
     $this->loadConfig();
     $confdata = $this->getConfData($this->_disp);
     $needTrim = 0;
     $tblDef = DTblDef::GetInstance();
     $disp_act = $this->_disp->Get(DInfo::FLD_ACT);
     if ($disp_act == 's') {
         $validator = new ConfValidation();
         $extracted = $validator->ExtractPost($this->_disp);
         if ($extracted->HasErr()) {
             $this->_disp->Set(DInfo::FLD_ACT, 'S');
             $this->_disp->Set(DInfo::FLD_TopMsg, $extracted->Get(CNode::FLD_ERR));
             return $extracted;
         } else {
             $confdata->SavePost($extracted, $this->_disp);
             $this->setChanged(true);
             $needTrim = 2;
         }
     } elseif ($disp_act == 'a') {
         $added = new CNode(CNode::K_EXTRACTED, '');
         return $added;
     } elseif ($disp_act == 'c' || $disp_act == 'n') {
         // 'c': change, 'n': next
         $validator = new ConfValidation();
         $extracted = $validator->ExtractPost($this->_disp);
         if ($disp_act == 'n') {
             $this->_disp->SwitchToSubTid($extracted);
         }
         return $extracted;
     } elseif ($disp_act == 'D') {
         $confdata->DeleteEntry($this->_disp);
         $needTrim = 1;
     } elseif ($disp_act == 'I') {
         if ($this->instantiateTemplate()) {
             $needTrim = 1;
         }
     } elseif ($disp_act == 'd' || $disp_act == 'i') {
         if ($disp_act == 'd') {
             $actions = 'DC';
             $mesg = DMsg::UIStr('note_confirm_delete');
         } else {
             $actions = 'IC';
             $mesg = DMsg::UIStr('note_confirm_instantiate');
         }
         $adata = $this->_disp->GetActionData($actions);
         $mesg = '<p>' . $mesg . '</p>' . UI::GetActionButtons($adata, 'text');
         $this->_disp->Set(DInfo::FLD_TopMsg, $mesg);
     }
     $ctxseq = UIBase::GrabGoodInputWithReset('ANY', 'ctxseq', 'int');
     if ($ctxseq != 0) {
         if ($this->_curOne->ChangeContextSeq($ctxseq)) {
             $needTrim = 1;
         }
     }
     if ($needTrim) {
         $this->_disp->TrimLastId();
         // need reload
         $this->loadConfig();
         $confdata = $this->getConfData($this->_disp);
     }
     return $confdata;
 }
Beispiel #7
0
<?php

require_once 'inc/auth.php';
echo UI::content_header('fa-home', DMsg::UIStr('menu_dashboard'));
$servstatbottom = array(array(array(RealTimeStats::FLD_UPTIME, DMsg::UIStr('service_uptime'), 'success', ''), array(RealTimeStats::FLD_S_TOT_REQS, DMsg::UIStr('service_totalreq'), 'muted', ''), array(RealTimeStats::FLD_BLOCKEDIP_COUNT, DMsg::UIStr('service_blockedipcnt'), '', 'pinkDark')), array(array(RealTimeStats::FLD_AVAILCONN, DMsg::UIStr('service_availconn'), 'success', ''), array(RealTimeStats::FLD_PLAINCONN, DMsg::UIStr('service_plainconn'), 'orange', 'pinkDark'), array(RealTimeStats::FLD_MAXCONN, DMsg::UIStr('service_maxconn'), 'muted', '')), array(array(RealTimeStats::FLD_AVAILSSL, DMsg::UIStr('service_availssl'), 'success', ''), array(RealTimeStats::FLD_SSLCONN, DMsg::UIStr('service_sslconn'), 'orange', 'pinkDark'), array(RealTimeStats::FLD_MAXSSL_CONN, DMsg::UIStr('service_maxsslconn'), 'muted', '')), array(array(RealTimeStats::FLD_S_REQ_PROCESSING, DMsg::UIStr('service_reqprocessing'), 'success', 'pinkDark'), array(RealTimeStats::FLD_S_REQ_PER_SEC, DMsg::UIStr('service_reqpersec'), 'success', 'green')));
$servstatplot = array(array(RealTimeStats::FLD_BPS_IN, DMsg::UIStr('service_bpsin'), true), array(RealTimeStats::FLD_BPS_OUT, DMsg::UIStr('service_bpsout'), true), array(RealTimeStats::FLD_SSL_BPS_IN, DMsg::UIStr('service_sslbpsin'), false), array(RealTimeStats::FLD_SSL_BPS_OUT, DMsg::UIStr('service_sslbpsout'), false), array(RealTimeStats::FLD_PLAINCONN, DMsg::UIStr('service_plainconn'), true), array(RealTimeStats::FLD_IDLECONN, DMsg::UIStr('service_idleconn'), false), array(RealTimeStats::FLD_SSLCONN, DMsg::UIStr('service_sslconn'), true), array(RealTimeStats::FLD_S_REQ_PROCESSING, DMsg::UIStr('service_reqprocessing'), false), array(RealTimeStats::FLD_S_REQ_PER_SEC, DMsg::UIStr('service_reqpersec'), true));
?>

<!-- row -->
<div class="row">

    <!-- NEW WIDGET START -->
    <article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="jarviswidget">
            <header>
                <span class="widget-icon"><i class="fa fa-bar-chart-o fa-lg"></i></span>
                <h2><?php 
DMsg::EchoUIStr('service_livefeeds');
?>
</h2>
                <div class="widget-toolbar" role="menu">
                    <span class="onoffswitch-title"><?php 
DMsg::EchoUIStr('service_realtime');
?>
</span>
                    <span class="onoffswitch">
                        <input type="checkbox" name="live_feed" class="onoffswitch-checkbox" checked="checked" id="live_feed">
                        <label class="onoffswitch-label" for="live_feed"> <span class="onoffswitch-inner" data-swchon-text="YES" data-swchoff-text="NO"></span> <span class="onoffswitch-switch"></span> </label> </span>
                </div>
            </header>
Beispiel #8
0
    function print_step_4()
    {
        $manual_script = $this->check->pass_val['manual_script'];
        if ($manual_script == NULL) {
            // illegal entry
            return;
        }
        $buf = $this->form_start();
        $ver = $this->check->pass_val['php_version'];
        $binname = 'lsphp-' . $ver;
        $repl = array('%%server_root%%' => SERVER_ROOT, '%%binname%%' => $binname, '%%phpver%%' => $ver[0]);
        $notes = '<ul><li>' . DMsg::UIStr('buildphp_binarylocnote', $repl) . '</li>';
        if ($this->check->pass_val['extentions'] != '') {
            $notes1 = BuildTool::getExtensionNotes($this->check->pass_val['extentions']);
            $notes .= "\n" . $notes1 . '</ul>';
        }
        $buf .= UIBase::info_divmesg($notes);
        $echo_cmd = 'echo "For security reason, please log in and manually run the pre-generated script to continue."';
        exec($echo_cmd . ' > ' . $this->check->pass_val['log_file']);
        exec($echo_cmd . ' > ' . $this->check->pass_val['progress_file']);
        $repl = array('%%manual_script%%' => $manual_script);
        $buf .= UIBase::warn_divmesg(DMsg::UIStr('buildphp_manualrunnotice', $repl));
        $buf .= '
				<h5>' . DMsg::ALbl('buildphp_mainstatus') . ': <span id="statusgraphzone"><i class="txt-color-teal fa fa-gear fa-spin"></i></span></h5>
				<div>
				<pre class="lst-statuszone" id="statuszone"></pre>
				</div>
				<h5>' . DMsg::ALbl('buildphp_detaillog') . ': </h5>
				<div >
				<pre class="lst-logzone" id="logzone">' . $cmd . '</pre>
						</div>';
        $buf .= $this->form_end();
        echo $buf;
    }
Beispiel #9
0
        });
    }

    function lst_toggledebug() {
        $.SmartMessageBox({
            title: "<i class='fa fa-lg fa-bug txt-color-red'></i> <span class='text-warning'><strong><?php 
DMsg::EchoUIStr('service_toggledebug');
?>
</strong></span>",
            content: "<?php 
DMsg::EchoUIStr('service_toggledebugmsg');
?>
",
            buttons: '<?php 
echo '[' . DMsg::UIStr('btn_cancel') . '][' . DMsg::UIStr('btn_yes') . ']';
?>
'
        }, function (ButtonPressed) {
            if (ButtonPressed === "<?php 
DMsg::EchoUIStr('btn_yes');
?>
") {

                $.ajax({
                    type: "POST",
                    url: "view/serviceMgr.php",
                    data: {"act": "toggledebug"},
                    beforeSend: function () {
                        $.smallBox({
                            title: "<?php 
Beispiel #10
0
//array("Display Name" => "URL");
$breadcrumbs = array();
/*navigation array config

ex:
"dashboard" => array(
	"title" => "Display Title",
	"url" => "http://yoururl.com",
	"url_target" => "_self",
	"icon" => "fa-home",
	"label_htm" => "<span>Add your custom label/badge html here</span>",
	"sub" => array() //contains array of sub items with the same format as the parent
)

*/
$page_nav = array('dashboard' => array('title' => DMsg::UIStr('menu_dashboard'), 'url' => 'view/dashboard.php', 'icon' => 'fa-home'), 'serv' => array('title' => DMsg::UIStr('menu_serv'), 'icon' => 'fa-globe', 'url' => 'view/confMgr.php?m=serv'), 'sl' => array('title' => DMsg::UIStr('menu_sl'), 'icon' => 'fa-chain', 'url' => 'view/confMgr.php?m=sl'), 'vh' => array('title' => DMsg::UIStr('menu_vh'), 'icon' => 'fa-cubes', 'url' => 'view/confMgr.php?m=vh'), 'tp' => array('title' => DMsg::UIStr('menu_tp'), 'url' => 'view/confMgr.php?m=tp', 'icon' => 'fa-files-o'), 'tools' => array('title' => DMsg::UIStr('menu_tools'), 'icon' => 'fa-th', 'sub' => array('buildphp' => array('title' => DMsg::UIStr('menu_compilephp'), 'url' => 'view/compilePHP.php'), 'logviewer' => array('title' => DMsg::UIStr('menu_logviewer'), 'url' => 'view/logviewer.php'), 'stats' => array('title' => DMsg::UIStr('menu_rtstats'), 'url' => 'view/realtimestats.php'))), 'webadmin' => array('title' => DMsg::UIStr('menu_webadmin'), 'icon' => 'fa-gear', 'sub' => array('lg' => array('title' => DMsg::UIStr('menu_general'), 'url' => 'view/confMgr.php?m=admin'), 'al' => array('title' => DMsg::UIStr('menu_sl'), 'url' => 'view/confMgr.php?m=al'))), 'help' => array('title' => DMsg::UIStr('menu_help'), 'icon' => 'fa-book', 'sub' => array('docs' => array('title' => DMsg::UIStr('menu_docs'), 'url_target' => '_blank', 'url' => '/docs'), 'guides' => array('title' => DMsg::UIStr('menu_guides'), 'url' => 'http://open.litespeedtech.com/mediawiki/?utm_source=Open&utm_medium=WebAdmin', 'url_target' => '_blank'), 'community' => array('title' => DMsg::UIStr('menu_community'), 'url' => 'https://groups.google.com/forum/#!forum/openlitespeed-development', 'url_target' => '_blank'))));
//configuration variables
$page_title = "";
$no_main_header = false;
//set true for lock.php and login.php
$footer_lic_info = '
		Open LiteSpeed is an open source HTTP server.
				Copyright (C) 2013-2015  Lite Speed Technologies, Inc.

				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 3 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
Beispiel #11
0
 public function GetDerivedSelOptions($tid, $loc, $node)
 {
     $o = array();
     if (substr($loc, 0, 13) == 'extprocessor:') {
         $type = substr($loc, 13);
         if ($type == '$$type') {
             if ($node != NULL) {
                 $type = $node->GetChildVal('type');
             } else {
                 $type = 'fcgi';
             }
         }
         if ($type == 'cgi') {
             $o['cgi'] = 'CGI Daemon';
             return $o;
         }
         if ($type == 'module') {
             $modules = $this->_servData->GetChildrenValues('module');
             if ($modules != NULL) {
                 foreach ($modules as $mn) {
                     $o[$mn] = $mn;
                 }
             }
             return $o;
         }
         $exps = array();
         if (($servexps = $this->_servData->GetRootNode()->GetChildren('extprocessor')) != NULL) {
             if (is_array($servexps)) {
                 foreach ($servexps as $exname => $ex) {
                     if ($ex->GetChildVal('type') == $type) {
                         $exps[] = $exname;
                     }
                 }
             } elseif ($servexps->GetChildVal('type') == $type) {
                 $exps[] = $servexps->Get(CNode::FLD_VAL);
             }
         }
         if ($this->_view == DInfo::CT_SERV) {
             foreach ($exps as $exname) {
                 $o[$exname] = $exname;
             }
             return $o;
         }
         foreach ($exps as $exname) {
             $o[$exname] = '[' . DMsg::UIStr('note_serv_level') . "]: {$exname}";
         }
         $loc = $this->_view == DInfo::CT_TP ? 'virtualHostConfig:extprocessor' : 'extprocessor';
         if (($vhexps = $this->_confData->GetRootNode()->GetChildren($loc)) != NULL) {
             if (is_array($vhexps)) {
                 foreach ($vhexps as $exname => $ex) {
                     if ($ex->GetChildVal('type') == $type) {
                         $o[$exname] = "[VHost Level]: {$exname}";
                     }
                 }
             } else {
                 if ($vhexps->GetChildVal('type') == $type) {
                     $exname = $vhexps->Get(CNode::FLD_VAL);
                     $o[$exname] = '[' . DMsg::UIStr('note_vh_level') . "]: {$exname}";
                 }
             }
         }
         return $o;
     }
     if (in_array($loc, array('virtualhost', 'listener', 'module'))) {
         $names = $this->_servData->GetChildrenValues($loc);
     } elseif ($loc == 'realm') {
         if ($this->_view == DInfo::CT_TP) {
             $loc = "virtualHostConfig:{$loc}";
         }
         $names = $this->_confData->GetChildrenValues($loc);
     }
     sort($names);
     foreach ($names as $name) {
         $o[$name] = $name;
     }
     return $o;
 }
Beispiel #12
0
    public static function getExtensionNotes($extensions)
    {
        $ocname = array();
        if (strpos($extensions, 'APC') !== FALSE) {
            $ocname[] = 'APC';
        }
        if (strpos($extensions, 'XCache') !== FALSE) {
            $ocname[] = 'XCache';
        }
        if (strpos($extensions, 'OPcache') !== FALSE) {
            $ocname[] = 'OPcache';
        }
        if (strpos($extensions, 'Suhosin') !== FALSE) {
            $ocname[] = 'Suhosin';
        }
        if (count($ocname) == 0) {
            return '';
        }
        $notes = '<li>' . DMsg::UIStr('buildphp_enableextnote') . '<br />';
        $notes1 = '';
        foreach ($ocname as $ocn) {
            if ($ocn == 'Suhosin') {
                $notes1 .= '
;				=================
;				Suhosin
;				=================
extension=suhosin.so

';
            }
            if ($ocn == 'APC') {
                $notes1 .= '
;				=================
;				APC
;				=================
				extension=apc.so

				';
            }
            if ($ocn == 'XCache') {
                $notes1 .= '
;				=================
;				XCache
;				=================
				extension=xcache.so

				';
            }
            if ($ocn == 'OPcache') {
                $notes1 .= '
;				=================
;				Zend OPcache
;				=================
				zend_extension=opcache.so

opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

				';
            }
        }
        $notes .= nl2br($notes1);
        $notes .= '</li>';
        return $notes;
    }
Beispiel #13
0
 protected function defineAll()
 {
     $id = 'g';
     $page = new DPage($id, DMsg::UIStr('tab_g'), new DTblMap('', array('S_PROCESS', 'S_GENERAL', 'S_INDEX', new DTblMap('expires', 'A_EXPIRES'), 'S_FILEUPLOAD', new DTblMap('*geoipdb$geoipDBFile', 'S_GEOIP_TOP', 'S_GEOIP')), new DTblMap('*index', array('S_MIME_TOP', 'S_MIME'))));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'log';
     $page = new DPage($id, DMsg::UIStr('tab_log'), new DTblMap('', array(new DTblMap('errorlog$fileName', 'S_LOG'), new DTblMap('accesslog$fileName', 'S_ACLOG'))));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'tuning';
     $page = new DPage($id, DMsg::UIStr('tab_tuning'), new DTblMap('tuning', array('S_TUNING_OS', 'S_TUNING_CONN', 'S_TUNING_REQ', 'S_TUNING_STATIC', 'S_TUNING_GZIP', 'S_TUNING_SSL')));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'sec';
     $page = new DPage($id, DMsg::UIStr('tab_sec'), new DTblMap('', array(new DTblMap('fileAccessControl', 'S_SEC_FILE'), new DTblMap('perClientConnLimit', 'S_SEC_CONN'), new DTblMap('CGIRLimit', 'S_SEC_CGI'), new DTblMap('accessDenyDir', 'S_SEC_DENY'), new DTblMap('accessControl', 'A_SEC_AC'))));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'ext';
     $page = new DPage($id, DMsg::UIStr('tab_ext'), new DTblMap('*extprocessor$name', 'A_EXT_TOP', array('A_EXT_SEL', 'A_EXT_FCGI', 'A_EXT_FCGIAUTH', 'A_EXT_LSAPI', 'A_EXT_SERVLET', 'A_EXT_PROXY', 'A_EXT_LOGGER', 'A_EXT_LOADBALANCER')));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'sh';
     $page = new DPage($id, DMsg::UIStr('tab_sh'), new DTblMap('scripthandler:*addsuffix$suffix', 'A_SCRIPT_TOP', 'A_SCRIPT'));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'rails';
     $page = new DPage($id, DMsg::UIStr('tab_rails'), new DTblMap('railsDefaults', 'S_RAILS'));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'mod';
     $page = new DPage($id, DMsg::UIStr('tab_mod'), new DTblMap('*module$name', 'S_MOD_TOP', 'S_MOD'));
     $this->_pageDef['serv'][$id] = $page;
     $id = 'top';
     $page = new DPage($id, DMsg::UIStr('tab_top'), new DTblMap('*listener$name', 'L_TOP', 'L_GENERAL'));
     $this->_pageDef['sl'][$id] = $page;
     $id = 'lg';
     $page = new DPage($id, DMsg::UIStr('tab_g'), new DTblMap('*listener$name', array('L_GENERAL', new DTblMap('*vhmap$vhost', 'L_VHMAP_TOP', 'L_VHMAP'))));
     $this->_pageDef['sl_'][$id] = $page;
     $id = 'lsec';
     $page = new DPage($id, DMsg::UIStr('tab_ssl'), new DTblMap('*listener$name', array('LVT_SSL_CERT', 'LVT_SSL', 'L_SSL_FEATURE', 'LVT_SSL_OCSP', 'LVT_SSL_CLVERIFY')));
     $this->_pageDef['sl_'][$id] = $page;
     $id = 'lmod';
     $page = new DPage($id, DMsg::UIStr('tab_mod'), new DTblMap('*listener$name', new DTblMap('*module$name', 'L_MOD_TOP', 'L_MOD')));
     $this->_pageDef['sl_'][$id] = $page;
     $id = 'top';
     $page = new DPage($id, DMsg::UIStr('tab_top'), new DTblMap('*virtualhost$name', 'V_TOP', 'V_TOPD'));
     $this->_pageDef['vh'][$id] = $page;
     //$id = 'top';
     $page = new DPage($id, DMsg::UIStr('tab_top'), new DTblMap('*vhTemplate$name', 'T_TOP', 'T_TOPD'));
     $this->_pageDef['tp'][$id] = $page;
     $id = 'mbr';
     $page = new DPage($id, DMsg::UIStr('tab_tp'), new DTblMap('*vhTemplate$name', array('T_TOPD', new DTblMap('*member$vhName', 'T_MEMBER_TOP', 'T_MEMBER'))));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'base';
     $page = new DPage($id, DMsg::UIStr('tab_base'), new DTblMap('*virtualhost$name', array('V_BASE', 'V_BASE_CONN', 'V_BASE_SEC', 'V_BASE_THROTTLE')));
     $this->_pageDef['vh_'][$id] = $page;
     $id = 'g';
     $page = new DPage($id, DMsg::UIStr('tab_g'), new DTblMap('', array('V_GENERAL', new DTblMap('index', 'VT_INDXF'), new DTblMap('*errorpage$errCode', 'VT_ERRPG_TOP', 'VT_ERRPG'), new DTblMap('expires', 'A_EXPIRES'), 'VT_FILEUPLOAD')));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_g'), new DTblMap('', array('T_GENERAL1', new DTblMap('virtualHostConfig', array('T_GENERAL2', new DTblMap('index', 'VT_INDXF'), new DTblMap('*errorpage$errCode', 'VT_ERRPG_TOP', 'VT_ERRPG'), new DTblMap('scripthandler', new DTblMap(array('*scriptHandler', '*addsuffix$suffix'), 'A_SCRIPT')), new DTblMap('expires', 'A_EXPIRES'), 'VT_FILEUPLOAD')))));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'log';
     $page = new DPage($id, DMsg::UIStr('tab_log'), new DTblMap('', array(new DTblMap('errorlog$fileName', 'V_LOG'), new DTblMap('accesslog$fileName', 'V_ACLOG'))));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_log'), new DTblMap('virtualHostConfig', array(new DTblMap('errorlog$fileName', 'T_LOG'), new DTblMap('accesslog$fileName', 'T_ACLOG'))));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'sec';
     $page = new DPage($id, DMsg::UIStr('tab_sec'), new DTblMap('', array(new DTblMap('accessControl', 'A_SEC_AC'), new DTblMap('*realm$name', 'V_REALM_TOP', 'V_REALM_FILE')), new DTblMap('*index', array('V_UDB_TOP', 'V_UDB', 'V_GDB_TOP', 'V_GDB'))));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_sec'), new DTblMap('', array('T_SEC_FILE', 'T_SEC_CONN', 'T_SEC_CGI', new DTblMap('virtualHostConfig', array(new DTblMap('accessControl', 'A_SEC_AC'), new DTblMap('*realm$name', 'T_REALM_TOP', 'T_REALM_FILE'))))));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'ext';
     $page = new DPage($id, DMsg::UIStr('tab_ext'), new DTblMap('*extprocessor$name', 'A_EXT_TOP', array('A_EXT_SEL', 'A_EXT_FCGI', 'A_EXT_FCGIAUTH', 'A_EXT_LSAPI', 'A_EXT_SERVLET', 'A_EXT_PROXY', 'A_EXT_LOGGER', 'A_EXT_LOADBALANCER')));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_ext'), new DTblMap('virtualHostConfig:*extprocessor$name', 'T_EXT_TOP', array('T_EXT_SEL', 'T_EXT_FCGI', 'T_EXT_FCGIAUTH', 'T_EXT_LSAPI', 'T_EXT_SERVLET', 'T_EXT_PROXY', 'T_EXT_LOGGER', 'T_EXT_LOADBALANCER')));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'sh';
     $page = new DPage($id, DMsg::UIStr('tab_sh'), new DTblMap('scripthandler:*addsuffix$suffix', 'A_SCRIPT_TOP', 'A_SCRIPT'));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_sh'), new DTblMap('virtualHostConfig:scripthandler:*addsuffix$suffix', 'A_SCRIPT_TOP', 'A_SCRIPT'));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'rw';
     $page = new DPage($id, DMsg::UIStr('tab_rewrite'), new DTblMap('rewrite', array('VT_REWRITE_CTRL', new DTblMap('*map$name', 'VT_REWRITE_MAP_TOP', 'VT_REWRITE_MAP'), 'VT_REWRITE_RULE')));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_rewrite'), new DTblMap('virtualHostConfig:rewrite', array('VT_REWRITE_CTRL', new DTblMap('*map$name', 'VT_REWRITE_MAP_TOP', 'VT_REWRITE_MAP'), 'VT_REWRITE_RULE')));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'ctx';
     $page = new DPage($id, DMsg::UIStr('tab_ctx'), new DTblMap('*context$uri', 'VT_CTX_TOP', array('VT_CTX_SEL', 'VT_CTXG', 'VT_CTXJ', 'VT_CTXS', 'VT_CTXF', 'VT_CTXL', 'VT_CTXP', 'VT_CTXC', 'VT_CTXB', 'VT_CTXR', 'VT_CTXRL', 'VT_CTXMD')));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_ctx'), new DTblMap('virtualHostConfig:*context$uri', 'VT_CTX_TOP', array('VT_CTX_SEL', 'VT_CTXG', 'VT_CTXJ', 'VT_CTXS', 'VT_CTXF', 'VT_CTXL', 'VT_CTXP', 'VT_CTXC', 'VT_CTXB', 'VT_CTXR', 'VT_CTXRL')));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'vhssl';
     $page = new DPage($id, DMsg::UIStr('tab_ssl'), new DTblMap('vhssl', array('LVT_SSL_CERT', 'LVT_SSL', 'VT_SSL_FEATURE', 'LVT_SSL_OCSP', 'LVT_SSL_CLVERIFY')));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_ssl'), new DTblMap('virtualHostConfig:vhssl', array('LVT_SSL_CERT', 'LVT_SSL', 'VT_SSL_FEATURE', 'LVT_SSL_OCSP', 'LVT_SSL_CLVERIFY')));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'wsp';
     $page = new DPage($id, DMsg::UIStr('tab_wsp'), new DTblMap('*websocket$uri', 'VT_WBSOCK_TOP', 'VT_WBSOCK'));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_wsp'), new DTblMap('virtualHostConfig:*websocket$uri', 'VT_WBSOCK_TOP', 'VT_WBSOCK'));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'mod';
     $page = new DPage($id, DMsg::UIStr('tab_mod'), new DTblMap('*module$name', array('VT_MOD_TOP', new DTblMap('*urlFilter$uri', NULL, array('VT_MOD_FILTERTOP', 'VT_MOD_FILTER'))), 'VT_MOD'));
     $this->_pageDef['vh_'][$id] = $page;
     $page = new DPage($id, DMsg::UIStr('tab_mod'), new DTblMap('virtualHostConfig:*module$name', array('VT_MOD_TOP', new DTblMap('*urlFilter$uri', NULL, array('VT_MOD_FILTERTOP', 'VT_MOD_FILTER'))), 'VT_MOD'));
     $this->_pageDef['tp_'][$id] = $page;
     $id = 'g';
     $page = new DPage($id, DMsg::UIStr('tab_g'), new DTblMap('', array('ADM_PHP', new DTblMap('errorlog$fileName', 'V_LOG'), new DTblMap('accesslog$fileName', 'ADM_ACLOG'), new DTblMap('accessControl', 'A_SEC_AC'))));
     $this->_pageDef['admin'][$id] = $page;
     $id = 'usr';
     $page = new DPage($id, DMsg::UIStr('tab_user'), new DTblMap('*index', 'ADM_USR_TOP', array('ADM_USR', 'ADM_USR_NEW')));
     $this->_pageDef['admin'][$id] = $page;
     $id = 'top';
     $page = new DPage($id, DMsg::UIStr('tab_top'), new DTblMap('*listener$name', 'ADM_L_TOP', 'ADM_L_GENERAL'));
     $this->_pageDef['al'][$id] = $page;
     $id = 'lg';
     $page = new DPage($id, DMsg::UIStr('tab_g'), new DTblMap('*listener$name', 'ADM_L_GENERAL'));
     $this->_pageDef['al_'][$id] = $page;
     $id = 'lsec';
     $page = new DPage($id, DMsg::UIStr('tab_ssl'), new DTblMap('*listener$name', array('LVT_SSL_CERT', 'LVT_SSL', 'L_SSL_FEATURE', 'LVT_SSL_CLVERIFY')));
     $this->_pageDef['al_'][$id] = $page;
 }
Beispiel #14
0
 protected function add_V_BASE_SEC($id)
 {
     $attrs = array($this->_attrs['vh_allowSymbolLink'], $this->_attrs['vh_enableScript'], $this->_attrs['vh_restrained'], $this->_attrs['vh_setUIDMode']);
     $this->_tblDef[$id] = DTbl::NewIndexed($id, DMsg::UIStr('tab_sec'), $attrs, 'name');
 }
Beispiel #15
0
		<!-- SHORTCUT AREA : With large tiles (activated via clicking user name tag) -->
		<div id="shortcut">
			<ul>
				<li>
					<a href="javascript:lst_restart()" class="jarvismetro-tile big-cubes bg-color-greenLight"> <span class="iconbox"> <i class="fa fa-repeat fa-4x"></i> <span><?php 
echo DMsg::UIStr('menu_restart');
?>
 </span> </span> </a>
				</li>
				<li>
					<a href="#view/realtimestats.php" class="jarvismetro-tile big-cubes bg-color-blue"> <span class="iconbox"> <i class="fa fa-bar-chart-o fa-4x"></i> <span><?php 
echo DMsg::UIStr('menu_rtstats');
?>
</span> </span> </a>
				</li>
				<li>
					<a href="#view/logviewer.php" class="jarvismetro-tile big-cubes bg-color-orange"> <span class="iconbox"> <i class="fa fa-list fa-4x"></i> <span><?php 
echo DMsg::UIStr('menu_logviewer');
?>
</span> </span> </a>
				</li>
				<li>
					<a href="javascript:lst_toggledebug()" class="jarvismetro-tile big-cubes bg-color-purple"> <span class="iconbox"> <i class="fa fa-bug fa-4x"></i> <span><?php 
echo DMsg::UIStr('menu_toggledebug');
?>
</span> </span> </a>
				</li>
			</ul>
		</div>
		<!-- END SHORTCUT AREA -->
 protected function add_ADM_PHP($id)
 {
     $attrs = array(DTblDefBase::NewBoolAttr('enableCoreDump', DMsg::ALbl('l_enablecoredump'), false), DTblDefBase::NewIntAttr('sessionTimeout', DMsg::ALbl('l_sessiontimeout'), true, 60, NULL, 'consoleSessionTimeout'));
     $this->_tblDef[$id] = DTbl::NewRegular($id, DMsg::UIStr('tab_g'), $attrs);
 }
Beispiel #17
0
 public static function EchoUIStr($tag, $repl = '')
 {
     echo DMsg::UIStr($tag, $repl);
 }
Beispiel #18
0
					<thead><tr><th class="lst-iconcol"></th><th class="lst-vhnames">
					<?php 
echo $label_name . $th . $label_reqprocessing . $th . $label_reqpersec . $th . $label_totalreq . $th . $label_eapcount . $th . $label_eapinuse . $th . $label_eapidle . $th . $label_eapwaitq . $th . $label_eapreqpersec;
?>
					</th>
					</tr></thead>
					<tbody id="vh_body">
					</tbody>
				</table>
			</div>
			<div class="tab-pane fade" id="expstab">
		        <table id="dt_expstatus" class="table table-condensed table-hover" width="100%">
					<thead><tr>
							<th data-class="expand">
							<?php 
echo DMsg::UIStr('service_scope') . $th . DMsg::UIStr('l_type') . $th . $label_name . $th . $label_maxconn . $th . DMsg::UIStr('service_effmax') . $th . DMsg::UIStr('service_pool') . $th . DMsg::UIStr('service_inuse') . $th . DMsg::UIStr('service_idle') . $th . DMsg::UIStr('service_waitq') . $th . $label_reqpersec . $th . $label_totalreq;
?>
							</th>
					</tr></thead>
					<tbody id="exp_body">
					</tbody>
				</table>
			</div>
		</div>
		</div>
</article>


<script type="text/javascript">
	/* DO NOT REMOVE : GLOBAL FUNCTIONS!
	 *
 private function emailFailedLogin($authUser)
 {
     $ip = $_SERVER['REMOTE_ADDR'];
     $url = UIBase::GrabGoodInput('server', 'SCRIPT_URI');
     error_log("[WebAdmin Console] Failed Login Attempt - username:{$authUser} ip:{$ip} url:{$url}\n");
     $emails = Service::ServiceData(SInfo::DATA_ADMIN_EMAIL);
     if ($emails != NULL) {
         $hostname = gethostbyaddr($ip);
         $date = date("F j, Y, g:i a");
         $repl = array('%%date%%' => $date, '%%authUser%%' => $authUser, '%%ip%%' => $ip, '%%hostname%%' => $hostname, '%%url%%' => $url);
         $subject = DMsg::UIStr('mail_failedlogin');
         $contents = DMsg::UIStr('mail_failedlogin_c', $repl);
         mail($emails, $subject, $contents);
     }
 }