当前位置: 首页>>代码示例>>PHP>>正文


PHP lfile_exists函数代码示例

本文整理汇总了PHP中lfile_exists函数的典型用法代码示例。如果您正苦于以下问题:PHP lfile_exists函数的具体用法?PHP lfile_exists怎么用?PHP lfile_exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lfile_exists函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_include_jscript

    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();
//.........这里部分代码省略.........
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:101,代码来源:htmllib.php

示例2: getDownloadServer

function getDownloadServer()
{
    global $gbl, $sgbl, $login, $ghtml;
    static $local;
    $progname = $sgbl->__var_program_name;
    $maj = $sgbl->__ver_major_minor;
    if (!$local) {
        if (lfile_exists("__path_program_etc/.local_download")) {
            $local = 'on';
        } else {
            $local = 'off';
        }
    }
    if (isOn($local)) {
        $server = "http://192.168.1.100/download/{$progname}/{$maj}";
    } else {
        $server = "http://download.lxcenter.org/download/{$progname}/{$maj}";
    }
    /*
    	if ($sgbl->dbg < 0) {
    		$server = "http://download.lxlabs.com/download/$progname/$maj";
    	}
    */
    return $server;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:25,代码来源:lib.php

示例3: checkOwnership

 static function checkOwnership($username, $path)
 {
     // When creating new files, must not check owner
     if (!lfile_exists($path)) {
         return true;
     }
     $owner = posix_getpwuid(fileowner(expand_real_root($path)));
     if ($owner['name'] !== $username) {
         log_log("fileacc_hacking", "{$username} tried to access {$owner['name']}'s file: {$path}");
         throw new lxexception('file_bad_owner_logged', '');
     }
     return true;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:13,代码来源:coreFfilelib.php

示例4: syncToSystemCommon

 function syncToSystemCommon()
 {
     global $gbl, $sgbl, $login, $ghtml;
     if ($login->isDemo()) {
         if ($this->get__table() !== 'ssession') {
             throw new lxexception('login_is_demo', '');
         }
     }
     // Don't sync if there is no subactiion for update..
     if ($this->dbaction === 'update' && !$this->subaction) {
         dprint("No subaction for update not syncing anymore {$this->get__table()}\n <br> ");
         return false;
     }
     if (lfile_exists("__path_program_etc/.writeonly")) {
         dprintr("Global Writonly Mode... Not syncing... <br> \n");
         return false;
     }
     if ($this->isDisabled('syncserver')) {
         dprint("syncserver disabled syncing anymore\n");
         return false;
     }
     return $this->isSync();
 }
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:23,代码来源:lxclass.php

示例5: lx_phpdebug

function lx_phpdebug()
{
    global $gbl, $sgbl;
    if ($sgbl->dbg <= 0) {
        return;
    }
    if (!lfile_exists("/tmp/.php_debug")) {
        return;
    }
    $fp = lfopen("/tmp/.php_debug", "r");
    $s = fgets($fp, 1024);
    fclose($fp);
    $s = preg_replace("/--noraise /i", "", $s);
    $arr = parse_url($s);
    parse_str($arr['query'], $out);
    $ghtml->print_input("hidden", "start_debug", "1");
    $ghtml->print_input("hidden", "debug_port", $out['debug_port']);
    $ghtml->print_input("hidden", "debug_text_mode", "1");
    $ghtml->print_input("hidden", "debug_no_cache", "1095197145");
}
开发者ID:zseand,项目名称:kloxo,代码行数:20,代码来源:lxlib.php

示例6: getFile

 static function getFile($stat, $file, $lines = null)
 {
     if (!lfile_exists($file)) {
         $stat['not_full_size'] = 'off';
         $stat['content'] = null;
         return $stat;
     }
     $size = lxfile_size($file);
     if ($size > 1000 * 1000) {
         $lines = 20;
     }
     if ($lines) {
         $getsize = $lines * 1000;
         $stat['not_full_size'] = 'on';
         $stat['content'] = lxfile_tail($file, $getsize);
         $stat['numlines'] = $lines;
     } else {
         $stat['not_full_size'] = 'off';
         $stat['content'] = lfile_get_contents($file);
     }
     return $stat;
 }
开发者ID:digideskio,项目名称:hypervm,代码行数:22,代码来源:coreFfilelib.php

示例7: install_main

function install_main()
{
    global $installcomp;
    global $argv;
    $comp = array("web", "mail", "dns", "database");
    $list = parse_opt($argv);
    if ($list['server-list']) {
        $serverlist = implode(",", $list['server-list']);
    } else {
        $serverlist = $comp;
    }
    foreach ($comp as $c) {
        flush();
        if (array_search($c, $serverlist) !== false) {
            print "Installing {$c} Components....";
            $req = $installcomp[$c];
            $func = "installcomp_{$c}";
            if (function_exists($func)) {
                $func();
            }
            install_general_mine($req);
            print "\n";
        }
    }
    $pattern = "Include /etc/httpd/conf/kloxo/kloxo.conf";
    $file = "/etc/httpd/conf/httpd.conf";
    $comment = "#Kloxo";
    addLineIfNotExist($file, $pattern, $comment);
    mkdir("/etc/httpd/conf/kloxo/");
    $dir_path = dirname(__FILE__);
    copy("{$dir_path}/kloxo.conf", "/etc/httpd/conf/kloxo/kloxo.conf");
    touch("/etc/httpd/conf/kloxo/virtualhost.conf");
    touch("/etc/httpd/conf/kloxo/webmail.conf");
    touch("/etc/httpd/conf/kloxo/init.conf");
    mkdir("/etc/httpd/conf/kloxo/forward/");
    touch("/etc/httpd/conf/kloxo/forward/forwardhost.conf");
    $options_file = "/var/named/chroot/etc/global.options.named.conf";
    $example_options = "acl \"lxcenter\" {\n";
    $example_options .= " localhost;\n";
    $example_options .= "};\n\n";
    $example_options .= "options {\n";
    $example_options .= " max-transfer-time-in 60;\n";
    $example_options .= " transfer-format many-answers;\n";
    $example_options .= " transfers-in 60;\n";
    $example_options .= " auth-nxdomain yes;\n";
    $example_options .= " allow-transfer { \"lxcenter\"; };\n";
    $example_options .= " allow-recursion { \"lxcenter\"; };\n";
    $example_options .= " recursion no;\n";
    $example_options .= " version \"LxCenter-1.0\";\n";
    $example_options .= "};\n\n";
    $example_options .= "# Remove # to see all DNS queries\n";
    $example_options .= "#logging {\n";
    $example_options .= "# channel query_logging {\n";
    $example_options .= "# file \"/var/log/named_query.log\";\n";
    $example_options .= "# versions 3 size 100M;\n";
    $example_options .= "# print-time yes;\n";
    $example_options .= "# };\n\n";
    $example_options .= "# category queries {\n";
    $example_options .= "# query_logging;\n";
    $example_options .= "# };\n";
    $example_options .= "#};\n";
    if (!lfile_exists($options_file)) {
        touch($options_file);
        chown($options_file, "named");
    }
    $cont = lfile_get_contents($options_file);
    $pattern = "options";
    if (!preg_match("+{$pattern}+i", $cont)) {
        file_put_contents($options_file, "{$example_options}\n");
    }
    $pattern = 'include "/etc/kloxo.named.conf";';
    $file = "/var/named/chroot/etc/named.conf";
    $comment = "//Kloxo";
    addLineIfNotExist($file, $pattern, $comment);
    touch("/var/named/chroot/etc/kloxo.named.conf");
    chown("/var/named/chroot/etc/kloxo.named.conf", "named");
}
开发者ID:zseand,项目名称:kloxo,代码行数:77,代码来源:installall.php

示例8: dbactionUpdate

 function dbactionUpdate($subaction)
 {
     // issue #571 - add httpd-worker and httpd-event for suphp
     // issue #566 - Mod_ruid2 on Kloxo
     // issue #567 - httpd-itk for kloxo
     //	lxshell_return("service", "httpd", "stop");
     // 	system("/etc/init.d/httpd stop");
     $ret = lxshell_return("service", "httpd", "stop");
     if ($ret) {
         throw new lxexception('httpd_stop_failed', 'parent');
     }
     //-- old structure
     system("rm -rf /etc/httpd/conf/kloxo");
     system("rm -rf /home/httpd/conf");
     //-- new structure
     lxfile_mkdir("/home/apache/conf");
     lxfile_mkdir("/home/apache/conf/defaults");
     lxfile_mkdir("/home/apache/conf/domains");
     lxfile_mkdir("/home/apache/conf/redirects");
     lxfile_mkdir("/home/apache/conf/webmails");
     lxfile_mkdir("/home/apache/conf/wildcards");
     lxfile_mkdir("/home/apache/conf/exclusive");
     //--- some vps include /etc/httpd/conf.d/swtune.conf
     system("rm -f /etc/httpd/conf.d/swtune.conf");
     if (!lfile_exists("/etc/httpd/conf.d/~lxcenter.conf")) {
         copy("/usr/local/lxlabs/kloxo/file/apache/~lxcenter.conf", "/etc/httpd/conf.d/~lxcenter.conf");
         copy("/usr/local/lxlabs/kloxo/file/centos-5/httpd.conf", "/etc/httpd/conf/httpd.conf");
     }
     lxfile_rm("/etc/sysconfig/httpd");
     $t = $this->main->php_type;
     $a = $this->main->apache_optimize;
     $m = $this->main->mysql_convert;
     $f = $this->main->fix_chownchmod;
     if ($f === 'fix-ownership') {
         system("lphp.exe /usr/local/lxlabs/kloxo/bin/fix/fix-chownchmod.php --select=chown");
         //	setFixChownChmod('chown');
     } else {
         if ($f === 'fix-permissions') {
             system("lphp.exe /usr/local/lxlabs/kloxo/bin/fix/fix-chownchmod.php --select=chmod");
             //	setFixChownChmod('chmod');
         } else {
             if ($f === 'fix-ALL') {
                 system("lphp.exe /usr/local/lxlabs/kloxo/bin/fix/fix-chownchmod.php --select=all");
                 //	setFixChownChmod('all');
             }
         }
     }
     if ($m === 'to-myisam') {
         system("lphp.exe /usr/local/lxlabs/kloxo/bin/fix/mysql-convert.php --engine=myisam");
         //	setMysqlConvert('myisam');
     } else {
         if ($m === 'to-innodb') {
             system("lphp.exe /usr/local/lxlabs/kloxo/bin/fix/mysql-convert.php --engine=innodb");
             //	setMysqlConvert('innodb');
         }
     }
     //--- don't use '=== true' but '!== false'
     if (strpos($t, 'mod_php') !== false) {
         lxfile_mv("/etc/httpd/conf.d/php.nonconf", "/etc/httpd/conf.d/php.conf");
         lxfile_mv("/etc/httpd/conf.d/fastcgi.conf", "/etc/httpd/conf.d/fastgi.nonconf");
         lxfile_mv("/etc/httpd/conf.d/fcgid.conf", "/etc/httpd/conf.d/fcgid.nonconf");
         lxfile_mv("/etc/httpd/conf.d/ruid2.conf", "/etc/httpd/conf.d/ruid2.nonconf");
         lxfile_mv("/etc/httpd/conf.d/suphp.conf", "/etc/httpd/conf.d/suphp.nonconf");
         //	lxfile_cp("../file/httpd.prefork", "/etc/sysconfig/httpd");
         //	lxfile_rm("/etc/sysconfig/httpd");
         // use > that equal to lxfile_rm + echo >>
         system("echo 'HTTPD=/usr/sbin/httpd' >/etc/sysconfig/httpd");
         if ($t === 'mod_php') {
             // nothing
         } else {
             if ($t === 'mod_php_ruid2') {
                 system("yum -y install mod_ruid2");
                 system("yum -y update mod_ruid2");
                 lxfile_mv("/etc/httpd/conf.d/ruid2.nonconf", "/etc/httpd/conf.d/ruid2.conf");
                 lxfile_cp("../file/ruid2.conf", "/etc/httpd/conf.d/ruid2.conf");
             } else {
                 if ($t === 'mod_php_itk') {
                     system("echo 'HTTPD=/usr/sbin/httpd.itk' >/etc/sysconfig/httpd");
                 }
             }
         }
     } else {
         if (strpos($t, 'suphp') !== false) {
             system("yum -y install mod_suphp");
             system("yum -y update mod_suphp");
             lxfile_mv("/etc/httpd/conf.d/php.conf", "/etc/httpd/conf.d/php.nonconf");
             lxfile_mv("/etc/httpd/conf.d/fastcgi.conf", "/etc/httpd/conf.d/fastgi.nonconf");
             lxfile_mv("/etc/httpd/conf.d/fcgid.conf", "/etc/httpd/conf.d/fcgid.nonconf");
             lxfile_mv("/etc/httpd/conf.d/ruid2.conf", "/etc/httpd/conf.d/ruid2.nonconf");
             lxfile_mv("/etc/httpd/conf.d/suphp.nonconf", "/etc/httpd/conf.d/suphp.conf");
             lxfile_cp("../file/suphp.conf", "/etc/httpd/conf.d/suphp.conf");
             lxfile_cp("../file/etc_suphp.conf", "/etc/suphp.conf");
             //		lxfile_rm("/etc/sysconfig/httpd");
             if ($t === 'suphp') {
                 system("echo 'HTTPD=/usr/sbin/httpd' >/etc/sysconfig/httpd");
             } else {
                 if ($t === 'suphp_worker') {
                     system("echo 'HTTPD=/usr/sbin/httpd.worker' >/etc/sysconfig/httpd");
                 } else {
                     if ($t === 'suphp_event') {
//.........这里部分代码省略.........
开发者ID:soar-team,项目名称:kloxo,代码行数:101,代码来源:serverweb__apachelib.php

示例9: getNewSerial

 function getNewSerial($fname, $ddate)
 {
     if (!lfile_exists($fname)) {
         return 0;
     }
     $fd = @fopen($fname, "r");
     if ($fd === false) {
         return 0;
     }
     while ($line = fgets($fd)) {
         if (preg_match("/(\\d*).*serial/", $line, $match)) {
             // If dates do not math, we reset serial
             $date = substr($match[1], 0, 8);
             if ($ddate == $date) {
                 // else we increment it
                 $ser = substr($match[1], 8, 2);
                 $ser += 1;
             } else {
                 $ser = 0;
             }
             fclose($fd);
             return $ser;
         }
     }
     fclose($fd);
     return -0;
 }
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:27,代码来源:reversedns__bindlib.php

示例10: lxfile_cp_rec

function lxfile_cp_rec($dirsource, $dirdest)
{
    dprint("<b> I am here </b> ");
    $obj = new COM("Scripting.FilesystemObject");
    $username = "__system__";
    $dirdest = expand_real_root($dirdest);
    $dirsource = expand_real_root($dirsource);
    if (lfile_exists($dirdest) && is_dir($dirdest)) {
        $dirdest = $dirdest . "/" . basename($dirsource);
    }
    if (is_dir($dirsource)) {
        log_filesys("copyFolder {$dirsource} {$dirdest}");
        $obj->CopyFolder($dirsource, $dirdest);
    } else {
        log_filesys("copyFile {$dirsource} {$dirdest}");
        $obj->CopyFile($dirsource, $dirdest);
    }
}
开发者ID:soar-team,项目名称:kloxo,代码行数:18,代码来源:windowsfslib.php

示例11: isExist

 function isExist($name)
 {
     if (lfile_exists($name)) {
         return true;
     }
     return false;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:7,代码来源:ffilelib.php

示例12: dbactionUpdate

 function dbactionUpdate($subaction)
 {
     if_demo_throw_exception('ffile');
     if ($this->main->isOn('readonly')) {
         throw new lxexception('file_manager_is_readonly', '');
     }
     switch ($subaction) {
         case "edit":
             lfile_put_contents($this->main->getFullPath(), $this->main->content);
             break;
         case "upload":
             $filename = $this->main->getFullPath() . "/{$this->main->upload_file_name}";
             dprintr($this->main->upload_overwrite_f);
             if (!$this->main->isOn('upload_overwrite_f')) {
                 if (lfile_exists($filename)) {
                     throw new lxexception('file_exists_upload', 'upload_name_f');
                 }
             }
             getFromFileserv($this->main->__var_upload_tmp_server, $this->main->__var_upload_filepass, $filename);
             break;
         case "rename":
             $directory = dirname($this->main->fullpath);
             $new = $directory . "/" . $this->main->newname;
             if (lfile_exists($new)) {
                 throw new lxexception('file_exists_rename', '');
             }
             lxfile_mv_rec($this->main->fullpath, $new);
             //lxfile_unix_chown($new, $this->main->__username_o);
             break;
         case "paste":
             if ($this->main->paste_list) {
                 // Hack... SPecifically checking for pasteaction. Should just use it directly in the command.
                 $arglist[] = $this->main->__username_o;
                 foreach ($this->main->paste_list as &$_tl) {
                     $_tl = $this->main->root . $_tl;
                 }
                 //$arglist = array_merge($arglist, $this->main->paste_list);
                 $arglist[] = $this->main->paste_list;
                 $arglist[] = $this->main->fullpath;
                 if ($this->main->pasteaction === 'copy') {
                     foreach ($this->main->paste_list as $p) {
                         lxfile_cp_rec($p, $this->main->fullpath);
                     }
                 } else {
                     foreach ($this->main->paste_list as $p) {
                         lxfile_mv_rec($p, $this->main->fullpath);
                     }
                 }
                 //lxfile_unix_chown_rec($this->main->fullpath, $this->main->__username_o);
             }
             break;
         case "perm":
             throw new lxexception('no_perm_setting', '');
             break;
         case "newdir":
             $i = 1;
             $rpath = $this->main->fullpath;
             $name = "/" . $this->main->newfolder_f;
             $path = $rpath . $name;
             if (lxfile_exists($path)) {
                 throw new lxexception('file_exists', '');
             }
             lxfile_mkdir($path);
             break;
         case "zip_file":
             foreach ($this->main->zip_file_list as &$_t_f) {
                 $_t_f = coreFfile::removeLeadingSlash($_t_f);
                 $_t_f = basename($_t_f);
                 $_t_f = "\"{$_t_f}\"";
             }
             $list = implode(" ", $this->main->zip_file_list);
             $oldir = getcwd();
             $fullpath = expand_real_root($this->main->fullpath);
             do_exec_system($this->main->__username_o, $fullpath, "c:/Progra~1/7-Zip/7z a NewArchive.zip {$list}", $out, $err, $ret, null);
             break;
         case "filedelete":
             foreach ($this->main->filedelete_list as $f) {
                 ffile__common::moveToTrash($this->main->root, $f);
             }
             break;
         case "restore_trash":
             foreach ($this->main->restore_trash_list as $f) {
                 ffile__common::restoreFromTrash($this->main->root, $f);
             }
             break;
         case "clear_trash":
             foreach ($this->main->clear_trash_list as $f) {
                 ffile__common::clearFromTrash($this->main->root, $f);
             }
             break;
         case "zipextract":
             $fulzippath = $this->main->root . $this->main->zip_extract_dir_f;
             if (!lxfile_exists(null, $fulzippath)) {
                 lxfile_mkdir($fulzippath);
             } else {
                 $zipdir = new Ffile("localhost", "localhost", $this->main->root, $this->main->zip_extract_dir_f, $this->main->__username_o);
                 $zipdir->get();
                 if (!$zipdir->is_dir()) {
                     throw new lxexception("file_exists_but_not_dir", 'unzippath', $this->main->zip_extract_dir_f);
                 }
//.........这里部分代码省略.........
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:101,代码来源:ffile__windowslib.php

示例13: print_meta_css

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);
    }
}
开发者ID:soar-team,项目名称:kloxo,代码行数:32,代码来源:lxlib.php

示例14: installinstallapp

function installinstallapp()
{
    global $gbl, $sgbl, $login, $ghtml;
    // Install/Update installapp if needed or remove installapp when installapp is disabled.
    // Added in Kloxo 6.1.4
    log_cleanup("Initialize InstallApp");
    //--- trick for no install on kloxo install process
    if (lxfile_exists("/var/cache/kloxo/kloxo-install-disableinstallapp.flg")) {
        log_cleanup("- InstallApp is disabled by InstallApp Flag");
        system("echo 1 > /usr/local/lxlabs/kloxo/etc/flag/disableinstallapp.flg");
        return;
    }
    /*
    	if ($sgbl->is_this_master()) {
    		$gen = $login->getObject('general')->generalmisc_b;
    		$diflag = $gen->isOn('disableinstallapp');
    		log_cleanup("- InstallApp is disabled by InstallApp Flag");
    		system("echo 1 > /usr/local/lxlabs/kloxo/etc/flag/disableinstallapp.flg");
    	} else {
    		$diflag = false;
    		log_cleanup("- InstallApp is not disabled by InstallApp Flag");
    		lxfile_rm("/usr/local/lxlabs/kloxo/etc/flag/disableinstallapp.flg");
    	}
    */
    if (lxfile_exists("/usr/local/lxlabs/kloxo/etc/flag/disableinstallapp.flg")) {
        log_cleanup("- InstallApp is disabled, removing InstallApp");
        lxfile_rm_rec("/home/kloxo/httpd/installapp/");
        lxfile_rm_rec("/home/kloxo/httpd/installappdata/");
        system("cd /var/cache/kloxo/ ; rm -f installapp*.tar.gz;");
        return;
    } else {
        if (!lxfile_exists("__path_kloxo_httpd_root/installappdata")) {
            log_cleanup("- Updating InstallApp data");
            installapp_data_update();
        }
        if (lfile_exists("../etc/remote_installapp")) {
            log_cleanup("- Remote InstallApp detected, removing InstallApp");
            lxfile_rm_rec("/home/kloxo/httpd/installapp/");
            system("cd /var/cache/kloxo/ ; rm -f installapp*.tar.gz;");
            return;
        }
        // Line below Removed in Kloxo 6.1.4
        return;
        /*
        	log_cleanup("- Creating installapp dir");
        	lxfile_mkdir("__path_kloxo_httpd_root/installapp");
        
        	if (!lxfile_exists("__path_kloxo_httpd_root/installapp/wordpress")) {
        		log_cleanup("- Installing/Updating InstallApp");
        		lxshell_php("../bin/installapp-update.phps");
        	}
        	return;
        */
    }
}
开发者ID:zseand,项目名称:kloxo,代码行数:55,代码来源:lib.php

示例15: syncPasswordCommon

 function syncPasswordCommon()
 {
     global $gbl, $sgbl, $login, $ghtml;
     $login->password = $this->password;
     if (!lfile_exists('__path_slave_db')) {
         return;
     }
     $rmt = unserialize(lfile_get_contents('__path_slave_db'));
     $rmt->password = $this->password;
     //$rmt->realpass = $this->realpass;
     lfile_put_contents('__path_slave_db', serialize($rmt));
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:12,代码来源:pservercorelib.php


注:本文中的lfile_exists函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。