本文整理汇总了PHP中filesystem::get_folders方法的典型用法代码示例。如果您正苦于以下问题:PHP filesystem::get_folders方法的具体用法?PHP filesystem::get_folders怎么用?PHP filesystem::get_folders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类filesystem
的用法示例。
在下文中一共展示了filesystem::get_folders方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: autoinstall
private function autoinstall()
{
$q = new mysql();
writelogs("FREEWEB: running autoinstall()", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
if (!$q->DATABASE_EXISTS($this->database)) {
writelogs("[{$this->servername}] DATABASE DOES NOT EXISTS Create e new one", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
$q->CREATE_DATABASE($this->database);
}
global $GO_LANGUAGE, $lang, $GO_EVENTS;
require "{$this->www_dir}/Group-Office.php";
require_once "{$this->www_dir}/classes/filesystem.class.inc";
require_once "{$this->www_dir}/install/gotest.php";
include_once "{$this->www_dir}/classes/base/events.class.inc.php";
require "{$this->www_dir}/language/languages.inc.php";
require "{$this->www_dir}/install/sql/updates.inc.php";
require_once "{$this->www_dir}/classes/base/users.class.inc.php";
require_once "{$this->www_dir}/classes/base/groups.class.inc.php";
require $GO_LANGUAGE->get_base_language_file('countries');
require_once "{$this->www_dir}/classes/base/theme.class.inc.php";
$GO_THEME = new GO_THEME();
$db = new db();
$GO_EVENTS = new GO_EVENTS();
$GO_CONFIG->save_setting('version', count($updates));
$GO_LANGUAGE->set_language($GO_CONFIG->language);
$GO_USERS = new GO_USERS();
$user['id'] = $GO_USERS->nextid("go_users");
echo "Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" userid \"{$user['id']}\"\n";
$GO_GROUPS = new GO_GROUPS();
$GO_GROUPS->query("DELETE FROM go_db_sequence WHERE seq_name='groups'");
$GO_GROUPS->query("DELETE FROM go_groups");
$admin_group_id = $GO_GROUPS->add_group(1, $lang['common']['group_admins']);
$everyone_group_id = $GO_GROUPS->add_group(1, $lang['common']['group_everyone']);
$internal_group_id = $GO_GROUPS->add_group(1, $lang['common']['group_internal']);
$GO_MODULES->load_modules();
require_once "{$this->www_dir}/install/upgrade.php";
$fs = new filesystem();
$module_folders = $fs->get_folders($GO_CONFIG->root_path . 'modules/');
$available_modules = array();
foreach ($module_folders as $folder) {
if (!file_exists($folder['path'] . '/install/noautoinstall')) {
echo "Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" checking module {$folder['name']}\n";
$available_modules[] = $folder['name'];
}
}
$priority_modules = array('summary', 'email', 'calendar', 'tasks', 'addressbook', 'files', 'notes', 'projects', 'ldapauth');
for ($i = 0; $i < count($priority_modules); $i++) {
if (in_array($priority_modules[$i], $available_modules)) {
echo "Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" add module \"{$priority_modules[$i]}\" [" . $i . "/" . count($priority_modules) . "]\n";
$GO_MODULES->add_module($priority_modules[$i]);
}
}
for ($i = 0; $i < count($available_modules); $i++) {
if (!in_array($available_modules[$i], $priority_modules)) {
if ($available_modules[$i] == "mailings") {
continue;
}
/*
if($available_modules[$i]=="blacklist"){continue;}
if($available_modules[$i]=="search"){continue;}
if($available_modules[$i]=="modules"){continue;}
//if($available_modules[$i]=="users"){continue;}
//if($available_modules[$i]=="comments"){continue;}
//if($available_modules[$i]=="sieve"){continue;}
//if($available_modules[$i]=="bookmarks"){continue;}
//if($available_modules[$i]=="links"){continue;}
*/
echo "Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" add module \"{$available_modules[$i]}\" [" . $i . "/" . count($available_modules) . "]\n";
try {
$GO_MODULES->add_module($available_modules[$i]);
} catch (Exception $e) {
echo "Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" failed adding \"{$available_modules[$i]}\" module\n";
}
}
}
writelogs("Adding LDAPAUTH Module GO_MODULES->add_module('ldapauth')", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
$GO_MODULES->add_module('ldapauth');
echo "Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" save_setting upgrade_mtime\n";
$GO_CONFIG->save_setting('upgrade_mtime', $GO_CONFIG->mtime);
if ($this->uid != null) {
$u = new user($this->uid);
$password = $u->password;
$mail = $u->mail;
$uid = $this->uid;
writelogs("Adding {$this->uid}/{$u->password}/{$mail} Module GO_USERS->add_user", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
} else {
$ldap = new clladp();
$uid = $ldap->ldap_admin;
$password = $ldap->ldap_password;
$mail = "root@localhost.local";
}
$GO_USERS->nextid('go_users');
writelogs("Starting......: " . date("H:i:s") . " Apache \"{$this->servername}\" adding \"{$uid}\" language {$GO_LANGUAGE->language} user {$mail}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
$user['id'] = 1;
$user['language'] = $GO_LANGUAGE->language;
$user['first_name'] = $GO_CONFIG->product_name;
$user['middle_name'] = '';
$user['last_name'] = "en";
$user['username'] = "{$uid}";
$user['password'] = "{$password}";
$user['email'] = "{$mail}";
//.........这里部分代码省略.........
示例2: or
Author: Merijn Schering <mschering@intermesh.nl>
Version: 1.0 Release date: 08 July 2003
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 2 of the License, or (at your
option) any later version.
*/
require "../../Group-Office.php";
$GO_SECURITY->authenticate(true);
require $GO_LANGUAGE->get_base_language_file('modules');
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$return_to = $GO_CONFIG->host . 'configuration/';
require_once $GO_CONFIG->class_path . 'filesystem.class.inc';
$fs = new filesystem();
$modules = $fs->get_folders($GO_CONFIG->module_path);
$existing_modules = array();
$selected_modules = isset($_POST['selected_modules']) ? $_POST['selected_modules'] : array();
$page_title = $menu_modules;
require $GO_THEME->theme_path . "header.inc";
switch ($task) {
case 'install':
$module_id = $_POST['module_id'];
$acl_read = $GO_SECURITY->get_new_acl('Module read: ' . $module_id, 0);
$acl_write = $GO_SECURITY->get_new_acl('Module write: ' . $module_id, 0);
if ($acl_read > 0 && $acl_write > 0) {
if ($GO_SECURITY->add_user_to_acl($GO_SECURITY->user_id, $acl_write) && $GO_SECURITY->add_user_to_acl($GO_SECURITY->user_id, $acl_read)) {
if (!$GO_MODULES->add_module($module_id, $_REQUEST['version'], $acl_read, $acl_write)) {
$feedback = '<p class="Error">' . $strSaveError . '</p>';
}
} else {