示例#1
0
 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;
 }
示例#2
0
文件: lxlib.php 项目: zseand/kloxo
function check_for_debug($file)
{
    global $gbl, $sgbl, $login, $ghtml;
    if (file_exists(getreal($file))) {
        $sgbl->dbg = file_get_contents(getreal($file));
        if ($sgbl->dbg != "1" && $sgbl->dbg != "2" && $sgbl->dbg != "3" && $sgbl->dbg != "4" && $sgbl->dbg != "5") {
            $sgbl->dbg = -1;
        }
    } else {
        $sgbl->dbg = -1;
    }
    if ($sgbl->dbg > 0) {
        ini_set("error_reporting", E_ALL & ~E_STRICT);
        ini_set("display_errors", "On");
        ini_set("log_errors", "On");
    } else {
        ini_set("error_reporting", E_ERROR);
        ini_set("display_errors", "Off");
        ini_set("log_errors", "On");
    }
}
示例#3
0
 function createDriver()
 {
     $ob = new Driver($this->__masterserver, null, $this->nname);
     $ob->get();
     $os = $this->ostype;
     include "../file/driver/{$os}.inc";
     if (!$driver) {
         print "Error Reading Driver Config File...\n";
         exit;
     }
     $olddriver_b = $ob->driver_b;
     $ob->driver_b = new Driver_b(null, null, $this->nname);
     foreach ($driver as $k => $v) {
         if (is_array($v)) {
             $v = $v[0];
         }
         $var = "pg_" . $k;
         if (isset($olddriver_b->{$var})) {
             $ob->driver_b->{$var} = $olddriver_b->{$var};
         }
     }
     $this->addToDriverObject($ob, $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->addToDriverObject($ob, $dlist);
     }
     if ($ob->dbaction === 'clean') {
         $ob->dbaction = 'update';
     }
     $ob->parent_clname = $this->getClName();
     $ob->write();
 }
示例#4
0
    function print_include_jscript($header = NULL)
    {
        global $gbl, $sgbl, $login;
        ?>
	<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">

		<?php 
        $this->print_refresh_key();
        $this->print_jscript_source("/htmllib/js/lxa.js");
        $this->print_jscript_source("/htmllib/js/helptext.js");
        $this->print_jscript_source("/htmllib/js/preop.js");
        if (!$login->getSpecialObject('sp_specialplay')->isOn('enable_ajax') && $header !== 'left_panel') {
        } else {
            $this->print_jscript_source("/htmllib/extjs/adapter/yui/yui-utilities.js");
            $this->print_jscript_source("/htmllib/extjs/adapter/yui/ext-yui-adapter.js");
            $this->print_jscript_source("/htmllib/extjs/ext-all.js");
            $this->print_jscript_source("/htmllib/yui-dragdrop/dragdrop.js");
        }
        $this->print_jscript_source("/htmllib/js/drag.js");
        $func = null;
        if (!$header) {
            $func = "onLoad='lxLoadBody();'";
        }
        if (!$header) {
            $descr = $this->getActionDescr($_SERVER['PHP_SELF'], $this->__http_vars, $class, $var, $identity);
            $help = $this->get_full_help($descr[2]);
            $help = $this->get_action_or_display_help($help, "display");
            $this->print_defintion($help);
        }
        $skin = $login->getSkinDir();
        $css = "{$skin}/css.css";
        if (!lfile_exists(getreal($css))) {
            $css = "/htmllib/css/skin/base.css";
        }
        $this->print_css_source("/htmllib/css/common.css");
        $this->print_css_source($css);
        $this->print_css_source("/htmllib/css/ext-all.css");
        $l = @getdate();
        $hours = $l['hours'];
        $minutes = $l['minutes'];
        if ($header === 'left_panel') {
            ?>
		<script type="text/javascript">
			var gl_helpUrl;
			gl_tDate = new Date();
			var clockTimeZoneMinutes = <?php 
            echo $l['minutes'];
            ?>
 - gl_tDate.getMinutes();
			var clockTimeZoneHours =   <?php 
            echo $l['hours'];
            ?>
 - gl_tDate.getHours();

			function program_help()
			{
				window.open(top.mainframe.jsFindHelpUrl());
			}
			function lxCallEnd()
			{
			}

		</script>
		</head>
			<?php 
        }
        ?>
	<script>
		function jsFindFilterVar()
		{
			gl_filtervar = '<?php 
        echo $this->get_filter_var();
        ?>
';
			return gl_filtervar;
		}

		function jsFindHelpUrl()
		{
			if (document.all || document.getElementById) {
				gl_helpUrl = '<?php 
        echo $this->get_help_url();
        ?>
';
				return gl_helpUrl;
			}
		}
		function lxLoadBody()
		{
			if (top.topframe && typeof top.topframe.changeLogo == 'function') {
				top.topframe.changeLogo(0);
			}
			changeContent('help', 'helparea');
		}
	</script>
		<?php 
        ?>
	<script>
		var gl_skin_directory = '<?php 
        echo $login->getSkinDir();
        ?>
';
	</script>
		<?php 
        if ($header === 'left_panel') {
            echo "<script>lxCallEnd();</script>";
        }
        #[FIXME] This call a lxCallEnd a empty function
    }
示例#5
0
 function updatecollectModInfo()
 {
     $modlist = $this->getList('module');
     foreach ((array) $modlist as $m) {
         $m->delete();
         $m->metadbaction = 'writeonly';
     }
     $this->was();
     $list = lscandir_without_dot(getreal("/module/"));
     foreach ($list as $l) {
         if ($l === 'define.inc') {
             continue;
         }
         $m = new Module(null, null, $l);
         $m->dbaction = 'add';
         $m->parent_clname = $this->getClName();
         $m->write();
     }
     return null;
 }
示例#6
0
function show_help_file($hhelp_file)
{
    global $gbl, $login, $ghtml;
    $help_file = getreal($hhelp_file);
    if (!lfile_exists($help_file)) {
        dprint("Debug Message: File <h3> <font color=red> {$hhelp_file}  Doesn't Exist </font> </h3> . Showing default</h1> ");
        lfile_put_contents("missing.txt", $hhelp_file . "\n", FILE_APPEND);
        return 0;
    }
    dprint("  Debug Message: Showing <h3>  {$hhelp_file}  </h3> ");
    $fp = lfopen($help_file, "r");
    if (!$fp) {
        print "cannot open {$help_file} <br> ";
        return 0;
    }
    $last = "";
    $inblock = "out";
    while (!feof($fp)) {
        $buf = fgets($fp, 1024);
        $buf = trim($buf);
        if (preg_match("/<reseller>/", $buf)) {
            $inblock = "reseller";
            continue;
        }
        if (preg_match("/<notlogin>/", $buf)) {
            $inblock = "notlogin";
            continue;
        }
        if (preg_match("/<admin>/", $buf)) {
            $inblock = "admin";
            continue;
        }
        if (preg_match("/<lximg:\\s*([^>]*)>/", $buf, $matches)) {
            $img = $matches[1];
            $buf = preg_replace("/<lximg:\\s*([^>]*)>/", "<img src=/img/image/collage/\$1>", $buf);
            print $buf . "\n<br>";
            continue;
        }
        $buf = preg_replace("/<\\/link>/", "</a>", $buf);
        if (preg_match("/.*<link:\\s*([^>]*)>.*/", $buf, $matches)) {
            $url = $matches[1];
            $url = str_replace(".dart", "", $url);
            $buf = preg_replace("/<link:\\s*([^>]*)>/", "<a href=/htmllib/mibin/help.php?frm_action=show&frm_q={$url}>", $buf);
            print $buf . "<br> ";
            continue;
        }
        if (preg_match("/<\\/reseller>/", $buf) || preg_match("/<\\/admin>/", $buf)) {
            $inblock = "out";
            continue;
        }
        if (preg_match("/<\\/notlogin>/", $buf)) {
            $inblock = "out";
            continue;
        }
        if ($login->isGte('reseller') && $inblock === "admin") {
            continue;
        }
        if ($login->isLogin() && $inblock === 'notlogin') {
            continue;
        }
        if ($login->isGte('customer') && ($inblock === "reseller" || $inblock === "admin")) {
            continue;
        }
        $buf = preg_replace("/href=(\\S*).dart/i", "href=/htmllib/mibin/help.php?frm_q=/\$1", $buf);
        if (preg_match("/:\\[.*\\]:/", $buf)) {
            $buttonpath = get_image_path() . "/button/";
            $value = preg_replace("/.*:\\[(.*)\\]:.*/", "\$1", $buf);
            $rest = preg_replace("/.*:\\[.*\\]:/", "", $buf);
            $ghtml->get_post_from_get(trim($value), $path, $post);
            $descr = $ghtml->get_action_descr($path, $post, $class, $name);
            $image = $ghtml->get_image($buttonpath, $class, $name, ".gif");
            print "<img src={$image}> <b> {$descr['1']}: </b> {$rest} <br> <br>  ";
            continue;
        }
        if ($buf === '') {
            if ($last === "blank") {
                continue;
            }
            $last = "blank";
            $buf = "</p> <p> ";
        } else {
            if ($last === "blank") {
                $last = "";
            }
            $buf = $buf . "<br> \n";
        }
        print $buf;
    }
    return 1;
}
示例#7
0
 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;
     }
 }
示例#8
0
文件: lxlib.php 项目: soar-team/kloxo
function print_meta_css()
{
    global $gbl, $sgbl, $login, $ghtml;
    $skin = $login->getSkinDir();
    // Load theme CSS
    $cssTheme = $skin . "theme.css";
    $cssCommon = $skin . "common.css";
    $cssEXTjs = $skin . "ext-js.css";
    if (!lfile_exists(getreal($cssTheme))) {
        $cssTheme = "/htmllib/css/skin/default/missing-theme.css";
    }
    if (!lfile_exists(getreal($cssCommon))) {
        $cssCommon = "/htmllib/css/skin/default/missing-common.css";
    }
    if (!lfile_exists(getreal($cssEXTjs))) {
        $cssEXTjs = "/htmllib/css/skin/default/missing-ext-js.css";
    }
    // Load Common CSS
    $ghtml->print_css_source($cssCommon);
    // Load EXTJS CSS
    $ghtml->print_css_source($cssEXTjs);
    // Load Theme CSS
    $ghtml->print_css_source($cssTheme);
    if (!$login->isDefaultSkin()) {
        $cssThemeFeather = $skin . "feather.css";
        if (!lfile_exists(getreal($cssThemeFeather))) {
            $cssThemeFeather = "/htmllib/css/skin/feather/missing-feather.css";
        }
        // Load Theme CSS
        $ghtml->print_css_source($cssThemeFeather);
    }
}
示例#9
0
 function get_lpanel_file()
 {
     global $gbl, $sgbl, $login, $ghtml;
     $fpath = get_image_path() . "/";
     $path = getreal($fpath);
     $val = lscandir($path);
     return $val;
 }