function init_develop() { $content = is_develop(); if (!empty($content) && isset($content[2])) { class_loader($content[2], $content[3]); } }
/** * 框架启动 */ function bootstrap($code = 255) { $boots = array('1' => 'bootstrap_configuration', '2' => 'bootstrap_kernel', '4' => 'bootstrap_common', '8' => 'bootstrap_cache', '16' => 'bootstrap_database', '32' => 'bootstrap_variable', '64' => 'bootstrap_session', '128' => 'bootstrap_full'); class_loader(); foreach ($boots as $key => $func) { if ($code & $key) { $func(); } } }
/** * 注册应用 */ public function registerProject($project, $dir, $prefix = '') { class_loader()->registerNamespace($project, $dir); $files = file_scan($dir . '/' . $project, "|(\\w+)/\\1.php\$|is", array('fullpath' => true, 'minDepth' => 2)); foreach ($files as $f) { list($module, ) = explode('.', $f['basename']); $r = new ReflectionClass("{$project}\\{$module}\\{$module}"); foreach ($r->getMethods() as $method => $m) { if (!empty($m['comments']['route'])) { $routes = $this->mergePathPrefix($m['comments']['route'], $prefix); route_register($routes, "{$project}\\{$module}\\{$module}::{$method}"); } } } }
case 3: $rewrite_url = array('view' => 'view/%d', 'view_nohistory' => 'view/%d/nohistory', 'screenshot' => 'screenshot/%d', 'history' => 'history/%d', 'contact' => 'contact/%d', 'section' => 'section/%d', 'report' => 'report/%d', 'report_support' => 'report/%1$d/%2$d', 'more' => 'more/%d', 'more_offset' => 'more/%1$d/%2$d', 'misc' => 'misc'); break; case 1: case 2: default: $rewrite_url = array('view' => 'index.php?method=view&pid=%d', 'view_nohistory' => 'index.php?pid=%d&addr=nohistory', 'screenshot' => 'index.php?method=screenshot&pid=%d', 'history' => 'index.php?method=history&pid=%d', 'contact' => 'index.php?method=contact&pid=%d', 'section' => 'index.php?method=section&pid=%d', 'report' => 'index.php?method=report&pid=%d', 'report_support' => 'index.php?method=report&pid=%1$d&support=%2$d', 'more' => 'index.php?method=more&pid=%d', 'more_offset' => 'index.php?method=more&pid=%1$d&offset=%2$d', 'misc' => 'misc.php'); break; } function echo_rewrite_url($type, $variable1, $variable2 = '') { global $rewrite_url; echo SITE_URL; printf($rewrite_url[$type], $variable1, $variable2); } class_loader('Mobile_Detect'); $detect = new Mobile_Detect(); if (!$detect->isiOS()) { if (DCRM_PCINDEX == 2) { header("Location: " . SITE_URL . $rewrite_url['misc']); exit; } else { $isCydia = false; } } else { if (DCRM_MOBILE == 2) { if (!strpos($detect->getUserAgent(), 'Cydia')) { $isCydia = false; } else { $isCydia = true; }
/* Base Configuration File Check */ if (file_exists(ROOT . 'manage/include/connect.inc.php')) { define('CONF_PATH', ROOT . 'manage/include/'); } elseif (file_exists(SYSTEM_ROOT . 'config/connect.inc.php')) { define('CONF_PATH', SYSTEM_ROOT . 'config/'); } else { if (strstr($_SERVER['PHP_SELF'], '/manage/')) { $root = dirname(dirname($_SERVER['PHP_SELF'])) . '/'; } else { $root = dirname($_SERVER['PHP_SELF']) . '/'; } header('Location: ' . $root . 'install'); exit; } require_once CONF_PATH . 'connect.inc.php'; /* Load Localization System */ if (file_exists(CONF_PATH . 'config.inc.php')) { require_once CONF_PATH . 'config.inc.php'; } require_once SYSTEM_ROOT . 'languages/l10n.php'; $link_language = localization_load(); require_once SYSTEM_ROOT . 'class/locale.php'; class_loader('core'); class_loader('db'); class_loader('Updater'); require_once SYSTEM_ROOT . './function/core.php'; $system = new core(); if (isset($_customct) && $_customct === true) { $system->CCT = true; } $system->init();
* (at your option) any later version. * * WEIPDCRM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with WEIPDCRM. If not, see <http://www.gnu.org/licenses/>. */ session_start(); define("DCRM", true); $activeid = 'udid'; if (isset($_SESSION['connected']) && $_SESSION['connected'] === true) { require_once "header.php"; class_loader('CorePage'); // 生成表格 function show_table($list_query) { $level_option = get_option('udid_level'); ?> <style> .udid-packages { max-width: 11em; min-width: 11em; width: 11em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .udid-comments {
* WEIPDCRM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with WEIPDCRM. If not, see <http://www.gnu.org/licenses/>. */ /* DCRM Debian Read */ session_start(); define("DCRM", true); $localetype = 'manage'; define('MANAGE_ROOT', dirname(__FILE__) . '/'); define('ABSPATH', dirname(MANAGE_ROOT) . '/'); require_once ABSPATH . 'system/common.inc.php'; class_loader('tar'); $activeid = 'import'; $highactiveid = 'manage'; if (!isset($_SESSION['connected']) || $_SESSION['connected'] != true) { header("Location: login.php"); exit; } $diff = false; $replace = false; $success = true; if (empty($_GET['filename'])) { $alert = __('Invalid argument: `Filename`'); $success = false; goto endlabel; } $r_path = "../upload/" . str_replace("\\", "", str_replace("/", "", $_GET['filename']));
/** * 载入并注册自动加载Entity */ public function registerEntity($namespace, $dir, $regx = '', $options = array()) { class_loader()->registerNamespace($namespace, $dir); $options += array('fullpath' => true, 'minDepth' => 2); file_include($dir . '/' . $namespace, "|(\\w+)/\\1.php\$|is", $options); }
function __autoload($class_name) { class_loader($class_name); }