本文整理汇总了PHP中lx_array_merge函数的典型用法代码示例。如果您正苦于以下问题:PHP lx_array_merge函数的具体用法?PHP lx_array_merge怎么用?PHP lx_array_merge使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lx_array_merge函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: createExtraVariables
function createExtraVariables()
{
// Not here. Two different extra variables are needed, so they are created in synctosystem.
// Brought back here, since the secondary server concept has been abolished in favor of multiple primary servers.
global $gbl, $sgbl, $login, $ghtml;
if ($sgbl->isHyperVm()) {
$this->createExtraVariablesHyperVM();
return;
}
$db = new Sqlite($this->__masterserver, "dns");
$gen = $login->getObject('general')->generalmisc_b;
$serverlist = explode(",", $this->syncserver);
$list = null;
foreach ($serverlist as $server) {
$string = "syncserver LIKE '%{$server}%'";
$nlist = $db->getRowsWhere($string, array('nname'));
$dlistv = "__var_domainlist_{$server}";
$this->{$dlistv} = $nlist;
}
//FIXME: We should only get the addon domains for the domains configured on that particular server. IN the case of single server system, it is not a problem, since that means we will have to get all the domains. but in the case of distributed setup, we need to properly get only the add domains under the domains loaded above.
$dbaddon = new Sqlite(null, "addondomain");
$addr = $dbaddon->getTable(array('nname'));
foreach ($serverlist as $server) {
$dlistv = "__var_domainlist_{$server}";
$this->{$dlistv} = lx_array_merge(array($this->{$dlistv}, $addr));
}
$this->fixDateSerial();
$this->__var_addonlist = $this->getParentO()->getList('addondomain');
$mydb = new Sqlite(null, "ipaddress");
$string = "syncserver = '{$this->syncserver}'";
$this->__var_ipssllist = $mydb->getRowsWhere($string, array('ipaddr', 'nname'));
}
开发者ID:soar-team,项目名称:kloxo,代码行数:32,代码来源:dnslib.php
示例2: getServiceList
static function getServiceList()
{
global $gbl, $sgbl, $login, $ghtml;
$val = lscandir_without_dot("__path_real_etc_root/init.d");
$val = array_remove($val, $sgbl->__var_programname_web);
$val = array_remove($val, $sgbl->__var_programname_dns);
$val = array_remove($val, $sgbl->__var_programname_imap);
$val = array_remove($val, $sgbl->__var_programname_mmail);
$nval = self::getMainServiceList();
$nval = lx_array_merge(array($nval, $val));
return $nval;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:12,代码来源:service__linuxlib.php
示例3: addform
static function addform($parent, $class, $typetd = null)
{
global $gbl, $sgbl, $login, $ghtml;
$list = array("client");
if ($sgbl->isHyperVm()) {
$list = lx_array_merge(array($list, array("vps")));
}
$vlist['nname'] = null;
$vlist['description'] = null;
$vlist['class'] = array('s', $list);
$vlist['url'] = array('m', "http://");
$ret['action'] = 'add';
$ret['variable'] = $vlist;
return $ret;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:15,代码来源:custombuttonlib.php
示例4: __cmd_desc_add
function __cmd_desc_add($p, $parent = null)
{
global $gbl, $sgbl, $login, $ghtml;
if (!$parent) {
if (isset($p['parent-class']) && isset($p['parent-name'])) {
$parent = new $p['parent-class'](null, 'localhost', $p['parent-name']);
dprint("{$parent->nname}\n");
$parent->get();
if ($parent->dbaction === 'add') {
throw new lxException("parent_doesnt_exist", "nname", $p['parent-name']);
}
if (!$parent->checkIfSomeParent($login->getClName())) {
throw new lxException("you_are_not_the_owner_of_parent", "", $p['parent-name']);
}
} else {
$parent = $login;
}
}
copy_nname_to_name($p);
$class = $p['class'];
$var = get_variable($p);
if (isset($p['count'])) {
$oldname = $p['name'];
for ($i = 0; $i < $p['count']; $i++) {
if ($class === 'domain') {
$p['name'] = "{$oldname}{$i}.com";
} else {
$p['name'] = "{$oldname}{$i}";
}
$param = exec_class_method($class, "addCommand", $parent, $class, $p);
unset($var['template-name']);
$param = lx_array_merge(array($param, $var));
do_desc_add($parent, $class, $param);
}
$parent->was();
exit;
}
$param = exec_class_method($class, "addCommand", $parent, $class, $p);
unset($var['template-name']);
$param = lx_array_merge(array($param, $var));
do_desc_add($parent, $class, $param);
$parent->was();
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:43,代码来源:commandlinelib.php
示例5: getListVersion
static function getListVersion($syncserver, $list)
{
$list[]['componentname'] = 'mysql';
$list[]['componentname'] = 'perl';
//$list[]['componentname'] = 'postgresql';
$list[]['componentname'] = 'httpd';
$list[]['componentname'] = 'qmail';
$list[]['componentname'] = 'courier-imap-toaster';
$list[]['componentname'] = 'php';
$list[]['componentname'] = 'lighttpd';
$list[]['componentname'] = 'djbdns';
$list[]['componentname'] = 'bind';
$list[]['componentname'] = 'spamassassin';
$list[]['componentname'] = 'pure-ftpd';
foreach ($list as $l) {
$nlist[] = $l['componentname'];
}
$complist = implode(" ", $nlist);
$file = fix_nname_to_be_variable("rpm -q {$complist}");
$file = "__path_program_root/cache/{$file}";
$cmdlist = lx_array_merge(array(array("rpm", "-q"), $nlist));
$val = get_with_cache($file, $cmdlist);
$res = explode("\n", $val);
$ret = null;
foreach ($list as $k => $l) {
$name = $list[$k]['componentname'];
$sing['nname'] = $name . "___" . $syncserver;
$sing['componentname'] = $name;
$sing['version'] = self::getVersion($res, $name);
$status = strstr($sing['version'], "not installed");
$sing['status'] = $status ? 'off' : 'on';
/*
if (isOn($sing['status'])) {
$sing['full_version'] = `rpm -qi $name`;
} else {
$sing['full_version'] = $sing['version'];
}
*/
$ret[] = $sing;
}
return $ret;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:42,代码来源:component__rpmlib.php
示例6: addform
static function addform($parent, $class, $typetd = null)
{
global $gbl, $sgbl, $login, $ghtml;
if ($login->isAdmin()) {
$vlist['__m_message_pre'] = "ftpuser_admin";
}
$char = "@";
$dlist = get_namelist_from_objectlist($parent->getList('domain'));
if ($login->isAdmin()) {
$dlist = lx_array_merge(array(array("--direct--"), $dlist));
}
$vv = array('var' => 'complete_name_f', 'val' => array('s', $dlist));
$vlist['nname'] = array('m', array('posttext' => "{$char}", 'postvar' => $vv));
$vlist['password'] = "";
$vlist['directory'] = array('L', array('pretext' => "/home/{$parent->nname}/"));
$vlist['ftp_disk_usage'] = null;
$ret['variable'] = $vlist;
$ret['action'] = "add";
return $ret;
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:20,代码来源:ftpuserlib.php
示例7: updateform
function updateform($subaction, $param)
{
global $gbl, $sgbl, $login, $ghtml;
$os = $this->getParentO()->ostype;
include "../file/driver/{$os}.inc";
$vlist = null;
$this->createVlistDriver($vlist, $driver);
$list = module::getModuleList();
$driver = null;
foreach ((array) $list as $l) {
$mod = getreal("/module/") . "/{$l}";
include_once "{$mod}/lib/driver.inc";
$dlist = $driver[$os];
if (isset($driver['all'])) {
$dlist = lx_array_merge(array($dlist, $driver['all']));
}
$this->createVlistDriver($vlist, $dlist);
}
return $vlist;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:20,代码来源:driverlib.php
示例8: monitor_child
function monitor_child()
{
global $gbl, $sgbl, $login, $ghtml;
global $global_reminder;
initProgram('admin');
$login->loadAllObjects('client');
$login->loadAllObjects('vps');
$cllist = $login->getList('client');
$vpslist = $login->getList('vps');
$clist = lx_array_merge(array($cllist, $vpslist));
foreach ($clist as $c) {
$downlist = null;
$mlist = $c->getList('monitorserver');
if (!$mlist) {
continue;
}
foreach ($mlist as $ml) {
$plist = $ml->getList('monitorport');
$eidlist = $ml->getList('emailalert');
$nidlist = $c->getList('emailalert');
$rlist = lx_array_merge(array($nidlist, $eidlist));
$portlist = process_port($rlist, $plist);
if ($portlist) {
$text = file_get_contents("../file/mailalert.txt");
$text = str_replace("%port%", implode(" ", $portlist), $text);
$text = str_replace("%server%", $ml->servername, $text);
foreach ($rlist as $eid) {
if (time() - $eid->last_sent > $eid->period * 60) {
log_message("Sending mail to {$eid->emailid} about {$ml->servername} at " . time());
$global_reminder[$eid->emailid][] = array("s", $text);
$eid->last_sent = time();
$eid->setUpdateSubaction();
$eid->write();
}
}
}
}
}
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:39,代码来源:mailalert.php
示例9: getTotalUsage
function getTotalUsage($class, $list)
{
global $gbl, $sgbl, $login, $ghtml;
$var = null;
foreach ($list as $k => $d) {
$needlist = null;
foreach ($d as $dp) {
$nlist = null;
$nlist = $dp->getQuotaNeedVar();
$needlist[$dp->getClName()] = $nlist;
}
//$userlist = get_namelist_from_objectlist($d, 'nname', 'username');
$driver = $gbl->getSyncClass(null, $k, $class);
try {
$tvar = rl_exec_get(null, $k, array($class, 'findTotalUsage'), array($driver, $needlist));
if ($class === 'client') {
dprintr("{$k}: \n");
dprintr($tvar);
}
} catch (Exception $e) {
print "Could not get Remote Disk Usage {$k}\n";
}
$var = lx_array_merge(array($var, $tvar));
}
return $var;
}
开发者ID:soar-team,项目名称:kloxo,代码行数:26,代码来源:collectquota.php
示例10: updateform
function updateform($subaction, $param)
{
global $gbl, $sgbl, $login, $ghtml;
$progname = $sgbl->__var_program_name;
switch ($subaction) {
case "skin":
// ACtually the skin_color list should be dependent on the skin_name,
// but currently just reading the current skin directory itself.
// So all the skins should have the same color sets, which is not very practical,
// so this should be changed in the future.
if (!$this->getParentO()->isLogin() || $this->isClass('sp_childspecialplay')) {
$vlist['specialplay_b-dont_show_disabled_permission'] = null;
}
$vlist['specialplay_b-enable_ajax'] = null;
$vlist['specialplay_b-simple_skin'] = null;
if ($this->specialplay_b->skin_name === 'feather') {
$vlist['specialplay_b-show_thin_header'] = null;
}
$vlist['specialplay_b-close_add_form'] = null;
if (!$this->isAdmin()) {
$list = get_namelist_from_objectlist($login->getList('interface_template'));
$list = lx_array_merge(array(array("--{$progname}-default--"), $list));
}
//$vlist['specialplay_b-interface_template'] = array('s', $list);
$vlist['specialplay_b-skin_name'] = array('s', lscandir_without_dot(getreal("/img/skin/{$progname}")));
$vlist['specialplay_b-skin_color'] = array('s', lscandir_without_dot(getreal("/img/skin/{$progname}/" . $this->specialplay_b->skin_name)));
// DT #799 - Scan also the dir for new iconsets.
$vlist['specialplay_b-icon_name'] = array('s', lscandir_without_dot(getreal("/img/image")));
$vlist['specialplay_b-language'] = array('A', $this->getLanguage());
//$vlist['specialplay_b-login_page'] =array('s', $this->getParentO()->getLoginTo());
//$vlist['specialplay_b-split_frame'] = null;
//$vlist['specialplay_b-show_help'] =null;
if ($this->getParentO()->isLte('reseller') && $sgbl->isKloxo()) {
$vlist['specialplay_b-customermode_flag'] = null;
}
//$vlist['specialplay_b-disable_quickaction'] = null;
if (!$this->getParentO()->isLogin()) {
$vlist['specialplay_b-logo_image'] = null;
$vlist['specialplay_b-logo_image_loading'] = null;
}
/*
if ($sgbl->isKloxo()) {
if (!$this->getParentO()->isLogin()) {
$vlist['specialplay_b-disable_docroot'] = null;
}
}
*/
//$vlist['specialplay_b_s_show_add_buttons'] =null;
//$vlist['specialplay_b-lpanel_scrollbar'] = null;
//$vlist['specialplay_b-resource_bottom'] =null;
//$vlist['specialplay_b_s_show_brethren_list'] = array('s', array('off', 'top', 'left'));
//$vlist['specialplay_b_s_lpanel_group_resource'] =null;
//$vlist['specialplay_b_s_ultra_navig'] =null;
//$vlist['specialplay_b-lpanel_depth'] = null;
$vlist['__v_updateall_button'] = array();
//$vlist['specialplay_b_s_per_page'] = null;
return $vlist;
case "upload_logo":
if ($login->priv->isOn('logo_manage_flag')) {
// $vlist['specialplay_b-logo_image'] =array('I', array("width" => 20, "height" => 20, "value" => $this->specialplay_b->logo_image));
// trick use 'null' for guarantee 100% size of img (not 100% size div container)
$vlist['specialplay_b-logo_image'] = array('I', array("width" => "null", "height" => "null", "value" => "/img/user-logo.png"));
$vlist['logo_image_f'] = null;
// $vlist['specialplay_b-logo_image_loading'] =array('I', array("width" => 20, "height" => 20, "value" => $this->specialplay_b->logo_image_loading));
// $vlist['logo_image_loading_f'] = null;
}
return $vlist;
case "login_options":
if ($login->isAdmin()) {
$gen = $login->getObject('general')->generalmisc_b;
$this->specialplay_b->disableipcheck = $gen->disableipcheck;
$vlist['specialplay_b-disableipcheck'] = null;
}
$vlist['specialplay_b-ssession_timeout'] = null;
return $vlist;
case "demo_status":
$vlist['specialplay_b-demo_status'] = null;
return $vlist;
}
}
开发者ID:soar-team,项目名称:kloxo,代码行数:80,代码来源:appearancelib.php
示例11: addform
static function addform($parent, $class, $typetd = null)
{
$res = domain::getDnsTemplateList($parent);
$vlist['nname'] = null;
$vlist['description'] = null;
$iplist = $parent->getIpaddress(array('localhost'));
if (!$iplist) {
$iplist = getAllIpaddress();
}
$vlist['ipaddress'] = array('s', $iplist);
//$vlist['dbtype_list'] = null;
$vlist['dnstemplate'] = array('s', $res);
//$vlist['share_status'] = null;
$vlist['__c_subtitle_quota'] = "Quota";
$qvlist = getQuotaListForClass('domain', array());
$vlist = lx_array_merge(array($vlist, $qvlist));
$vlist['__c_subtitle_mail'] = "Mail";
$vlist['catchall'] = array('s', array('--bounce--', 'postmaster', 'Delete'));
$ret['action'] = "add";
$ret['variable'] = $vlist;
return $ret;
}
开发者ID:soar-team,项目名称:kloxo,代码行数:22,代码来源:domaintemplatelib.php
示例12: updateform
function updateform($subaction, $param)
{
global $gbl, $sgbl, $login, $ghtml;
$driverapp = $gbl->getSyncClass(null, $this->__readserver, 'web');
switch ($subaction) {
case "run_stats":
$vlist['confirm_f'] = array('M', "");
$vlist['__v_updateall_button'] = array();
return $vlist;
case "sesubmit":
include "sesubmit/engines.php";
$selist = array_keys($enginelist);
$selist = implode("\n", $selist);
$selist = "\n{$selist}";
$vlist['nname'] = array('M', $this->nname);
$vlist['email'] = null;
$vlist['selist'] = array('M', $selist);
return $vlist;
case "docroot":
$vlist['docroot'] = null;
return $vlist;
case "blockip":
$vlist['text_blockip'] = null;
$vlist['__v_updateall_button'] = array();
return $vlist;
case "fcgi_config":
$vlist['fcgi_children'] = null;
$vlist['__v_updateall_button'] = array();
return $vlist;
case "statsconfig":
$vlist['remove_processed_stats'] = null;
$vlist['__v_updateall_button'] = array();
return $vlist;
case "hotlink_protection":
$vlist['hotlink_flag'] = null;
$vlist['text_hotlink_allowed'] = array("t", null);
$vlist['hotlink_redirect'] = array("L", "/");
$vlist['__v_updateall_button'] = array();
return $vlist;
case "permalink":
$list = lscandir_without_dot_or_underscore("../file/prettyurl/");
$vlist['lighty_pretty_app_f'] = array('s', $list);
$vlist['lighty_pretty_path_f'] = null;
return $vlist;
case "lighty_rewrite":
$vlist['text_lighty_rewrite'] = null;
$vlist['__v_updateall_button'] = array();
return $vlist;
case "stats_protect":
if ($this->stats_username === $this->nname) {
$vlist['stats_username'] = array('M', $this->stats_username);
} else {
$vlist['stats_username'] = null;
}
$vlist['stats_password'] = null;
$vlist['__v_updateall_button'] = array();
return $vlist;
case "cron_mailto":
$vlist['cron_mailto'] = null;
return $vlist;
case "configure_misc":
$vlist['force_www_redirect'] = null;
if ($driverapp === 'apache') {
$vlist['webmisc_b-execcgi'] = null;
if ($login->isAdmin()) {
$vlist['webmisc_b-disable_openbasedir'] = null;
}
}
$vlist['__v_updateall_button'] = array();
return $vlist;
case "dirindex":
$vlist['webmisc_b-dirindex'] = null;
if (!$this->indexfile_list) {
//$this->indexfile_list = get_web_index_list();
}
$ol = array("index.php", "index.html", "index.shtml", "index.htm", "default.htm", "Default.aspx", "Default.asp", "index.pl");
$dirin = $login->getObject('genlist')->dirindexlist_a;
$list = get_namelist_from_objectlist($dirin);
$index = lx_array_merge(array($list, $ol));
$vlist['indexfile_list'] = array('U', $index);
$vlist['__v_updateall_button'] = array();
return $vlist;
case "extra_tag":
$vlist['text_extra_tag'] = null;
return $vlist;
case "custom_error":
if ($driverapp !== 'lighttpd') {
$vlist['customerror_b_s_url_400'] = array("L", "/");
$vlist['customerror_b_s_url_401'] = array("L", "/");
$vlist['customerror_b_s_url_403'] = array("L", "/");
$vlist['customerror_b_s_url_500'] = array("L", "/");
}
$vlist['customerror_b_s_url_404'] = array("L", "/");
$vlist['__v_updateall_button'] = array();
return $vlist;
case "ssl_upload":
$vlist['ssl_key_file_f'] = null;
$vlist['ssl_crt_file_f'] = null;
return $vlist;
case "ipaddress":
//.........这里部分代码省略.........
开发者ID:zseand,项目名称:kloxo,代码行数:101,代码来源:weblib.php
示例13: EnableDotNet
function EnableDotNet()
{
$iis = new lxCOM("IIS://localhost/W3SVC/{$this->main->iisid}");
$list[] = "";
$aspiDllPath = $this->getAspNetDllPath();
$list[] = ".asax," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".ascx," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".ashx," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".asmx," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".aspx," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".axd," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".vsdisco," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".rem," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".soap," . $aspiDllPath . ",1,GET,HEAD,POST,DEBUG";
$list[] = ".config," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".cs," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".csproj," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".vb," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".vbproj," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".webinfo," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".licx," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".resx," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$list[] = ".resources," . $aspiDllPath . ",5,GET,HEAD,POST,DEBUG";
$iis = new lxCOM("IIS://LocalHost/w3svc/{$this->main->iisid}/root");
$ScriptMaps = convertCOMarray($iis->Scriptmaps);
$newmap = lx_array_merge(array($ScriptMaps, $list));
$iis->ScriptMaps = $newmap;
$iis->SetInfo();
}
开发者ID:soar-team,项目名称:kloxo,代码行数:29,代码来源:web__iislib.php
示例14: updateform
//.........这里部分代码省略.........
$vlist['cttype'] = array('M', $this->cttype);
} else {
$parent = $this->getParentO();
$res = null;
if (check_if_many_server()) {
$ctlist = array('reseller', 'customer', 'wholesale');
} else {
$ctlist = array('reseller', 'customer');
}
foreach ($ctlist as $v) {
if ($parent->isGte($v)) {
continue;
}
$res[] = $v;
}
if ($res) {
$vlist['cttype'] = array('s', $res);
} else {
$vlist['cttype'] = array('M', $this->cttype);
}
}
$vlist['ddate'] = array('M', @date('d-m-Y', $this->ddate));
if (!$this->isAdmin()) {
$vlist['parent_name_f'] = array('M', $this->getParentName());
}
$vlist['contactemail'] = "";
if (!$this->isLogin()) {
$vlist['text_comment'] = null;
}
return $vlist;
case "license":
$lic = $login->getObject('license')->licensecom_b;
if ($login->isAdmin()) {
$vlist['lic_pserver_num_f'] = array('M', $lic->lic_pserver_num);
$vlist['lic_client_num_f'] = array('M', $lic->lic_client_num);
$vlist['lic_maindomain_num_f'] = array('M', $lic->lic_maindomain_num);
} else {
$vlist['lic_node_num_f'] = array('M', $lic->node_num);
}
$vlist['lic_live_support_f'] = array('M', $lic->lic_live_support);
//$vlist['lic_ipaddress_f'] = array('M', $lic->lic_ipaddress);
$vlist['lic_client_f'] = array('M', $lic->lic_client);
//$vlist['lic_current_f'] = array('t', lfile_get_contents('__path_program_etc/license.txt'));
$vlist['license_upload_f'] = null;
return $vlist;
case "ipaddress":
$parent = $this->getParentO();
if ($this->isLogin() || !$this->isRightParent()) {
$vlist['ipaddress_list'] = array('M', $this->getIpaddress($this->listpriv->webpserver_list));
$vlist['__v_button'] = array();
} else {
if (check_if_many_server()) {
dprintr($this->listpriv->webpserver_list);
$iplist = $parent->getIpaddress($this->listpriv->webpserver_list);
} else {
$iplist = $parent->getIpaddress(array('localhost'));
}
dprintr($iplist);
$vlist['ipaddress_list'] = array('Q', $iplist);
}
return $vlist;
case "pserver_s":
$parent = $this->getParentO();
$list = null;
$serverlist = client::getPserverListPriv();
if ($this->isLogin() || !$this->isRightParent()) {
foreach ($serverlist as $s) {
$slist = "{$s}_list";
$vlist["{$s}_list"] = array('M', $this->listpriv->{$slist});
}
$vlist['__v_button'] = array();
//$vlist['dbtype_list'] = array('M', $this->listpriv->dbtype_list);
return $vlist;
} else {
$vlist['server_detail_f'] = null;
foreach ($serverlist as $s) {
$slist = "{$s}_list";
// Hack.. Actually, admin's listpriv should be empty so that the __get inside the listpriv will get automatically called.
if ($parent->isAdmin()) {
unset($parent->listpriv->{$slist});
}
$vlist["{$s}_list"] = null;
$list = lx_array_merge(array($list, $parent->getServerList(strtilfirst($s, "pserver"))));
}
$sinfo = pservercore::createServerInfo($list);
$sinfo = get_warning_for_server_info($parent, $sinfo);
$vlist['server_detail_f'] = array('M', $sinfo);
//$vlist['dbtype_list'] = null;
return $vlist;
}
case "description":
$vlist['description'] = null;
//$vlist['share_status'] = null;
if (!$this->isRightParent()) {
$this->convertToUnmodifiable($vlist);
}
return $vlist;
}
return parent::updateform($subaction, $param);
}
开发者ID:soar-team,项目名称:kloxo,代码行数:101,代码来源:clientcorelib.php
示例15: lxguard_main
function lxguard_main($clearflag = false)
{
include_once "htmllib/lib/lxguardincludelib.php";
lxfile_mkdir("__path_home_root/lxguard");
$lxgpath = "__path_home_root/lxguard";
$file = "/var/log/secure";
$fp = fopen($file, "r");
$fsize = filesize($file);
$newtime = time();
$oldtime = time() - 60 * 10;
$rmt = lfile_get_unserialize("{$lxgpath}/hitlist.info");
if ($rmt) {
$oldtime = max((int) $oldtime, (int) $rmt->ddate);
}
$ret = FindRightPosition($fp, $fsize, $oldtime, $newtime, "getTimeFromSysLogString");
$list = lfile_get_unserialize("{$lxgpath}/access.info");
if ($ret) {
parse_sshd_and_ftpd($fp, $list);
lfile_put_serialize("{$lxgpath}/access.info", $list);
}
get_total($list, $total);
//dprintr($list['192.168.1.11']);
dprintr($total);
$deny = get_deny_list($total);
$hdn = lfile_get_unserialize("{$lxgpath}/hostdeny.info");
$deny = lx_array_merge(array($deny, $hdn));
$string = null;
foreach ($deny as $k => $v) {
if (csb($k, "127")) {
continue;
}
$string .= "ALL : {$k}\n";
}
dprint($string);
$stlist[] = "###Start Program Hostdeny config Area";
$stlist[] = "###Start Lxdmin Area";
$stlist[] = "###Start Kloxo Area";
$stlist[] = "###Start Lxadmin Area";
$endlist[] = "###End Program HostDeny config Area";
$endlist[] = "###End Kloxo Area";
$endlist[] = "###End Lxadmin Area";
$startstring = $stlist[0];
$endstring = $endlist[0];
file_put_between_comments($stlist, $endlist, $startstring, $endstring, "/etc/hosts.deny", $string);
if ($clearflag) {
lxfile_rm("{$lxgpath}/access.info");
$rmt = new Remote();
$rmt->hl = $total;
$rmt->ddate = time();
lfile_put_serialize("{$lxgpath}/hitlist.info", $rmt);
}
return $list;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:53,代码来源:lib.php
示例16: mydbactionUpdate
function mydbactionUpdate()
{
$totalres = null;
if (is_array($this->main->subaction)) {
foreach ($this->main->subaction as $sub) {
if (csb($sub, "top_level_")) {
$res = $this->{$sub}();
} else {
$res = $this->dbactionUpdate($sub);
}
$totalres = lx_array_merge(array($totalres, $res));
}
} else {
$sub = $this->main->subaction;
if (csb($sub, "top_level_")) {
$res = $this->{$sub}();
} else {
$res = $this->dbactionUpdate($sub);
}
$totalres = $res;
}
return $totalres;
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:23,代码来源:lxclass.php
示例17: createIniFile
function createIniFile()
{
$pclass = $this->main->getParentClass();
$ver = find_php_version();
$this->initString($ver);
$header = lfile_get_contents("../file/phpini/php.ini.template-{$ver}");
$cont = lfile_get_contents("../file/phpini/php.ini.temp");
$htcont = lfile_get_contents("../file/phpini/htaccesstemp");
$vlist = array("enable_zend_val", "enable_ioncube_val", "enable_xcache_val");
$l1 = $this->main->getInheritedList();
$l2 = $this->main->getLocalList();
$l3 = $this->main->getExtraList();
$ll = lx_array_merge(array($l1, $l2, $l3));
$list = array_unique($ll);
foreach ($list as $l) {
$vl = strtil($l, "_flag") . "_val";
if (array_search_bool($vl, $vlist)) {
continue;
}
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), $l);
}
foreach ($vlist as $vl) {
list($cont) = $this->replacestr(array($cont), $vl);
}
$stlist[] = "###Start Kloxo PHP config Area";
$stlist[] = "###Start Lxdmin Area";
$stlist[] = "###Start Kloxo Area";
$stlist[] = "###Start Lxadmin PHP config Area";
$endlist[] = "###End Kloxo PHP config Area";
$endlist[] = "###End Kloxo Area";
$endlist[] = "###End Lxadmin PHP config Area";
$endstring = $endlist[0];
$startstring = $stlist[0];
if ($pclass === 'pserver') {
$file = "/etc/php.ini";
if (!lxfile_exists("__path_kloxo_back_phpini")) {
lxfile_cp("/etc/php.ini", "__path_kloxo_back_phpini");
}
$this->enableDisableModule("enable_xcache_flag", "xcache");
$htfile = null;
$extrafile = "/etc/custom.php.ini";
if (lxfile_exists($extrafile)) {
$extrastring = lfile_get_contents($extrafile);
$cont = "{$extrastring}\n{$cont}";
} else {
$cont = "{$cont}";
}
} else {
$dname = $this->main->getParentName();
$elogfile = "/home/{$this->main->__var_customer_name}/__processed_stats/{$this->main->getParentName()}.phplog";
$file = "__path_httpd_root/{$this->main->getParentName()}/php.ini";
$extrafile = "__path_httpd_root/{$this->main->getParentName()}/custom.php.ini";
if (lxfile_exists($extrafile)) {
$extrastring = lfile_get_contents($extrafile);
} else {
$extrastring = "";
}
// ToDo #590 - disable appear on .htaccess
// REVERT - back to enable because mod_php tend to share-based php.ini
// and some parameters of domain specific must be declare inside .htaccess
$htfile = "{$this->main->__var_docrootpath}/.htaccess";
$ht1file = "/home/{$this->main->__var_customer_name}/kloxoscript/.htaccess";
$htcont = "php_value error_log \"{$elogfile}\"\n{$htcont}";
$htcont = str_replace("\n", "\n\t", $htcont);
$htcont = str_replace($htcont, "\t" . $htcont, $htcont);
$htcont = "\n<Ifmodule mod_php4.c>\n{$htcont}\n</Ifmodule>\n\n<Ifmodule mod_php5.c>\n{$htcont}\n</Ifmodule>\n";
file_put_between_comments("{$this->main->__var_web_user}:apache", $stlist, $endlist, $startstring, $endstring, $htfile, $htcont);
file_put_between_comments("{$this->main->__var_web_user}:apache", $stlist, $endlist, $startstring, $endstring, $ht1file, $htcont);
lxfile_unix_chown($htfile, "{$this->main->__var_web_user}:apache");
// MR --- set the same like AddOpenBaseDir() on web__apachelib.php
$clname = $this->main->__var_customer_name;
$adminbasedir = trim($this->main->__var_extrabasedir);
if ($adminbasedir) {
$adminbasedir .= ":";
}
if (!$this->main->isOn('__var_disable_openbasedir')) {
$path = "{$adminbasedir}";
$path .= "/home/{$clname}:";
$path .= "/home/{$clname}/kloxoscript:";
$path .= "/home/httpd/{$dname}:";
$path .= "/home/httpd/{$dname}/httpdocs:";
$path .= "/tmp:";
$path .= "/usr/share/pear:";
$path .= "/var/lib/php/session:";
$path .= "/home/kloxo/httpd/script";
$cont = "open_basedir = \"{$path}\"\n\n{$cont}";
}
$cont = "error_log = \"{$elogfile}\"\n{$cont}";
$cont = "{$extrastring}\n{$cont}";
}
lxfile_rm($file);
lfile_put_contents($file, "{$header}\n{$cont}\n");
createRestartFile($this->main->__var_webdriver);
}
开发者ID:zseand,项目名称:kloxo,代码行数:94,代码来源:phpini__synclib.php
示例18: baseinitThisList
static function baseinitThisList($parent, $class, $type)
{
global $gbl, $sgbl, $login, $ghtml;
$rlist = $parent->createShowRlist("");
$class = $parent->get__table();
$resourceout = null;
if ($rlist) {
$j = 0;
foreach ($rlist as $k => $v) {
if ($k === 'priv') {
$vlist = $parent->getQuotaVariableList();
$vlist = lx_array_merge(array($vlist, $parent->getDeadQuotaVariableList()));
foreach ($vlist as $nk => $nv) {
// Why am I skipping hardquota?. OK it screws up vps graph
if ($parent->isHardQuota($nk)) {
continue;
}
if ($type === 'permission') {
if (!cse($nk, "_flag")) {
continue;
}
if ($login->getSpecialObject('sp_specialplay')->isOn('dont_show_disabled_permission')) {
if (!$parent->priv->isOn($nk)) {
continue;
}
}
} else {
if (cse($nk, "_flag")) {
continue;
}
}
$desc = get_classvar_description($class, $nk);
if (is_array($parent->priv->{$nk})) {
foreach ($parent->priv->{$nk} as $nnk => $nnv) {
$resourceout[$j]['vv'] = $nk;
$resourceout[$j]['nname'] = $j;
$resourceout[$j]['shortdescr'] = getNthToken($desc[2], 0);
$sh = getNthToken($desc[2], 0);
$ln = getNthToken($desc[2], 1);
$resourceout[$j]['descr'] = "_lxspan:{$sh}:{$ln}:";
$resourceout[$j]['resourceused'] = $parent->used->{$nk}[$nnk];
$resourceout[$j]['resourcepriv'] = $parent->priv->{$nk}[$nnk];
$j++;
}
continue;
}
if (isset($parent->used)) {
$vresourceused = $parent->used->{$nk};
} else {
$vresourceused = '-';
}
if (cse($nk, "_flag")) {
$vresourcepriv = $parent->priv->{$nk};
} else {
if ($parent->priv->{$nk} === "0") {
continue;
}
if ($parent->showPrivInResource()) {
$vresourcepriv = $parent->priv->{$nk};
} else {
$vresourcepriv = '-';
}
}
if (cse($nk, 'last_usage')) {
$vresourcepriv = '-';
}
if ($parent->isDeadQuotaVariable($nk)) {
$vresourcepriv = "-";
}
$resourceout[$j]['vv'] = $
|
请发表评论