本文整理汇总了PHP中vmc::router方法的典型用法代码示例。如果您正苦于以下问题:PHP vmc::router方法的具体用法?PHP vmc::router怎么用?PHP vmc::router使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vmc
的用法示例。
在下文中一共展示了vmc::router方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$auth = pam_auth::instance(pam_account::get_account_type($this->app->app_id));
$auth->set_appid($this->app->app_id);
$auth->set_redirect_url($_SESSION['passport_redirect_url']);
$this->pagedata['desktop_url'] = vmc::router()->app->base_url(1);
foreach (vmc::servicelist('passport') as $k => $passport) {
if ($auth->is_module_valid($k, $this->app->app_id)) {
$this->pagedata['passports'][] = array('name' => $auth->get_name($k) ? $auth->get_name($k) : $passport->get_name(), 'html' => $passport->get_login_form($auth, 'desktop', 'basic-login.html', $pagedata));
}
}
$this->display('login.html');
}
示例2: setdefault
function setdefault($lv_id)
{
$end_go = vmc::router()->gen_url(array('app' => 'b2c', 'ctl' => 'admin_member_lv', 'act' => 'index'));
$this->begin($end_go);
$objMemLv = $this->app->model('member_lv');
$difault_lv = $objMemLv->dump(array('default_lv' => 1), 'member_lv_id');
if ($difault_lv) {
$result1 = $objMemLv->update(array('default_lv' => 0), array('member_lv_id' => $difault_lv['member_lv_id']));
if ($result1) {
$result = $objMemLv->update(array('default_lv' => 1), array('member_lv_id' => $lv_id));
$msg = '默认会员等级设置成功';
} else {
$msg = '默认会员等级设置失败';
}
} else {
$result = $objMemLv->update(array('default_lv' => 1), array('member_lv_id' => $lv_id));
$msg = '默认会员等级设置成功';
}
$this->end($result, $msg);
}
示例3: read
public function read()
{
$this->begin(vmc::router()->gen_url(array('app' => 'desktop', 'ctl' => 'rpcnotify', 'act' => 'index')));
$id = $_POST['id'];
$is_selected_all = $_POST['isSelectedAll'];
if (!$id && !$is_selected_all) {
$this->end(false, '操作失败');
}
if ($id) {
foreach ((array) $id as $val) {
$data = array('status' => 'true', 'id' => $val);
$flag = app::get('base')->model('rpcnotify')->save($data);
if ($flag == false) {
break;
}
}
} else {
$data = array('status' => 'true');
$filter = array();
$flag = app::get('base')->model('rpcnotify')->update($data, $filter);
}
$this->end($flag, $flag ? '操作成功' : '操作失败');
}