本文整理汇总了PHP中auth::get_module方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::get_module方法的具体用法?PHP auth::get_module怎么用?PHP auth::get_module使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth
的用法示例。
在下文中一共展示了auth::get_module方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: detail
public function detail()
{
$id = $this->input['id'];
if ($id) {
$info = $this->obj->get_db_first($id);
$db_relation = $this->obj->get_relation($id);
}
//获取支持全文检索的应用模块
include_once ROOT_PATH . 'lib/class/auth.class.php';
$auth = new auth();
$app = $auth->get_app('', '', '', 0, 1000, array('use_textsearch' => 1));
if ($app && is_array($app)) {
foreach ($app as $k => $v) {
$appid[] = $v['bundle'];
$module = $auth->get_module('', '', implode(',', $appid), '', 0, 1000);
}
}
$result['info'] = $info;
$result['app'] = $app;
$result['module'] = $module;
$result['db_relation'] = $db_relation;
// print_r($result);exit;
$this->addItem($result);
$this->output();
}
示例2: show
public function show()
{
$uniqueid = '';
$appname = $record = array();
$offset = $this->input['offset'] ? intval(urldecode($this->input['offset'])) : 0;
$count = $this->input['count'] ? intval(urldecode($this->input['count'])) : 1000;
include_once ROOT_PATH . 'lib/class/auth.class.php';
$auth = new auth();
$app = $auth->get_app('', '', '', 0, 1000, array('use_textsearch' => 1));
if ($app && is_array($app)) {
foreach ($app as $k => $v) {
$appid[] = $v['bundle'];
$module = $auth->get_module('', '', implode(',', $appid), '', 0, 1000);
}
}
if (is_array($module)) {
foreach ($module as $k => $v) {
$module_idarr[] = $v['mod_uniqueid'];
}
$all_relation = $this->obj->get_relation_by_m(implode("','", $module_idarr));
// print_r($all_relation);exit;
foreach ($module as $k => $v) {
$server_count[$v['app_uniqueid']][$v['mod_uniqueid']] = count($all_relation[$v['app_uniqueid']][$v['mod_uniqueid']]);
}
}
$result['app'] = $app;
$result['module'] = $module;
$result['server_count'] = $server_count;
$this->addItem($result);
$this->output();
}
示例3: show
public function show()
{
$uniqueid = '';
$data = $record = array();
$app_uniqueid = urldecode($this->input['_id']);
$module_uniqueid = urldecode($this->input['module_uniqueid']);
$douser_id = urldecode($this->input['douser_id']);
$stat_type = urldecode($this->input['stat_type']);
$start_time = urldecode($this->input['start_time']);
$end_time = urldecode($this->input['end_time']);
$offset = $this->input['offset'] ? intval(urldecode($this->input['offset'])) : 0;
$count = $this->input['count'] ? intval(urldecode($this->input['count'])) : 15;
$app = $this->obj->get_apps($this->get_condition());
if ($this->input['_id']) {
include_once ROOT_PATH . 'lib/class/auth.class.php';
$auth = new auth();
$module = $auth->get_module('', urldecode($this->input['_id']));
}
$user = $this->obj->get_user();
$record = $this->get_statlist($offset, $count, $app_uniqueid, $module_uniqueid, $douser_id, $stat_type, $start_time, $end_time);
$data['app_uniqueid'] = $app_uniqueid;
$data['module_uniqueid'] = $module_uniqueid;
$data['douser_id'] = $douser_id;
$data['stat_type'] = $stat_type;
$data['app'] = $app;
$data['user'] = $user;
$data['start_time'] = $start_time;
$data['end_time'] = $end_time;
$data['record'] = $record;
if ($record) {
$numdata = $this->getcount();
$data['num'] = $numdata['total'];
}
//print_r($data['app']);exit;
$this->addItem($data);
$this->output();
}
示例4: db_relation
public function db_relation($mo, $id, $index, $index_port, $search, $search_port)
{
foreach ($mo as $k => $v) {
$am = explode('/', $v);
$relation_data = array('bundle_id' => $am[0], 'module_id' => $am[1], 'db_id' => $id);
$bundle_id_arr[] = $am[0];
$module_id_arr[] = $am[1];
$this->obj->replace_relation('db_relation', $relation_data);
}
//获取支持全文检索的应用模块
include_once ROOT_PATH . 'lib/class/auth.class.php';
$auth = new auth();
$apps = $auth->get_app('', implode(',', $bundle_id_arr), '', 0, 1000, array('use_textsearch' => 1));
$modules = $auth->get_module('', '', '', '', 0, 1000, array('mod_uniqueid' => implode(',', $module_id_arr)));
foreach ($apps as $k => $v) {
$a[$v['bundle']] = $v;
}
foreach ($modules as $k => $v) {
$m[$v['mod_uniqueid']] = $v;
}
//获取各个系统配置文件
foreach ($bundle_id_arr as $k => $v) {
if ($m[$module_id_arr[$k]]['host']) {
//$m[$module_id_arr[$k]]['host'] = ltrim($m[$module_id_arr[$k]]['host'],'http://');
$m[$module_id_arr[$k]]['host'] = rtrim($m[$module_id_arr[$k]]['host'], '/');
$content = file_get_contents('http://' . $m[$module_id_arr[$k]]['host'] . '/' . $m[$module_id_arr[$k]]['dir'] . 'conf/' . $v . '_' . $module_id_arr[$k] . '.ini');
} else {
//$a[$module_id_arr[$k]]['host'] = ltrim($a[$module_id_arr[$k]]['host'],'http://');
$a[$module_id_arr[$k]]['host'] = rtrim($a[$module_id_arr[$k]]['host'], '/');
$content = file_get_contents('http://' . $a[$module_id_arr[$k]]['host'] . '/' . $a[$module_id_arr[$k]]['dir'] . 'conf/' . $v . '_' . $module_id_arr[$k] . '.ini');
}
//生成对应文件
if ($content) {
$this->mk_ini($v, $module_id_arr[$k], 'utf-8', $content, $index, $index_port, $search, $search_port);
}
}
}
示例5: get_module
public function get_module($application_id)
{
include_once ROOT_PATH . 'lib/class/auth.class.php';
$auth = new auth();
return $auth->get_module($application_id);
}