⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plugin.php

📁 Java项目开发全程实录-源代码Java项目开发全程实录-源代码
💻 PHP
字号:
<?php

/*
	[UCenter] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: plugin.php 840 2008-12-05 07:24:24Z zhaoxiongfei $
*/

!defined('IN_UC') && exit('Access Denied');

class pluginbase extends adminbase {

	var $plugin = array();
	var $plugins = array();

	function __construct() {
		$this->control();
	}

	function pluginbase() {
		parent::__construct();
		$this->check_priv();
		if(!$this->user['isfounder']) {
			$this->message('no_permission_for_this_module');
		}
		$a = getgpc('a');
		$this->load('plugin');
		$this->plugin = $_ENV['plugin']->get_plugin($a);
		$this->plugins = $_ENV['plugin']->get_plugins();
		if(empty($this->plugin)) {
			$this->message('read_plugin_invalid');
		}
		$this->view->assign('plugin', $this->plugin);
		$this->view->assign('plugins', $this->plugins);
		$this->view->languages = $this->plugin['lang'];
		$this->view->tpldir = UC_ROOT.'./plugin/'.$a;
		$this->view->objdir = UC_DATADIR.'./view';
	}

	function _call($a, $arg) {
		$do = getgpc('do');
		$do = empty($do) ? 'onindex' : 'on'.$do;
		if(method_exists($this, $do) && $do{0} != '_') {
			$this->$do();
		} else {
			exit('Plugin method does not exists');
		}
	}
}

$a = getgpc('a');
$do = getgpc('do');
if(!preg_match("/^[\w]{1,64}$/", $a)) {
	exit('Argument Invalid');
}
if(!@require_once UC_ROOT."./plugin/$a/plugin.php") {
	exit('Plugin does not exists!');
}

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -