本文整理汇总了PHP中url::route方法的典型用法代码示例。如果您正苦于以下问题:PHP url::route方法的具体用法?PHP url::route怎么用?PHP url::route使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类url
的用法示例。
在下文中一共展示了url::route方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: advertisement
function advertisement()
{
$conf = base_setup_config::deploy_info();
$pagedata['product_key'] = $conf['product_key'];
$pagedata['cross_call_url'] = base64_encode(url::route('shopadmin', array('ctl' => 'dashboard', 'act' => 'cross_call', 'app' => 'desktop')));
return view::make('desktop/advertisement.html', $pagedata);
}
示例2: active_top_html
public function active_top_html()
{
/** 获取证书,企业号的验证 **/
$active_url = url::route('shopadmin', ['app' => 'entermembercenter', 'ctl' => 'register']);
$pagedata['active_url'] = $active_url;
return view::make('entermembercenter/desktop_active_top.html', $pagedata)->render();
}
示例3: index
public function index()
{
//默认读取一下themes文件夹,获取文件夹内已有模板@lujy
kernel::single('site_theme_install')->check_install($this->platform);
$default_theme = kernel::single('site_theme_base')->get_default($this->platform);
$themeInfo = app::get('site')->model('themes')->getList('*', array('theme' => $default_theme));
$pagedata['site_url'] = url::route('topc');
$preview = 'preview.jpg';
if ($themeInfo) {
$pagedata['current_theme'] = $themeInfo[0];
/** 获取当前模版的信息 **/
$pagedata['current']['is_themme_bk'] = kernel::single('site_theme_file')->is_themme_bk($themeInfo[0]['theme'], 'theme_bak.xml');
$preview_prefix = kernel::single('site_theme_file')->preview_prefix($themeInfo[0]['theme']);
$pagedata['preview_prefix'] = $preview_prefix;
$src = kernel::single('site_theme_file')->get_src($themeInfo[0]['theme'], $preview);
$pagedata['current_theme_preview_img'] = $src;
//设置编辑默认页面
$defaultIndexFile = kernel::single('site_theme_tmpl')->get_default('index', $default_theme);
$nodefaultindex = $this->app->model('themes_tmpl')->getList('tmpl_path', array('theme' => $default_theme, 'tmpl_type' => 'index'));
$pagedata['current']['default_index_file'] = $defaultIndexFile ? $defaultIndexFile : $nodefaultindex[0]['tmpl_path'];
}
/** 获取所有已安装的模版 **/
$all_themes = app::get('site')->model('themes')->getList('*', array('is_used' => 0, 'platform' => $this->platform));
foreach ($all_themes as $k => $arr_theme) {
$all_themes[$k]['is_themme_bk'] = kernel::single('site_theme_file')->is_themme_bk($arr_theme['theme'], 'theme_bak.xml');
$preview_prefix = kernel::single('site_theme_file')->preview_prefix($arr_theme['theme']);
$src = kernel::single('site_theme_file')->get_src($arr_theme['theme'], $preview);
$all_themes[$k]['preview'] = $src;
$all_themes[$k]['preview_prefix'] = $preview_prefix;
}
$pagedata['all_themes'] = $all_themes;
$pagedata['platform'] = $this->platform;
return $this->page('site/admin/theme/manage/index.html', $pagedata);
}
示例4: editor
public function editor()
{
$theme = input::get('theme');
$file = input::get('file');
$urlType = input::get('platform');
header('Content-Type: text/html; charset=utf-8');
$this->path[] = array('text' => app::get('site')->_('模板可视化编辑'));
$pagedata['views'] = kernel::single('site_theme_base')->get_view($theme);
$pagedata['widgetsLib'] = kernel::single('site_theme_widget')->get_libs($theme);
$pagedata['list'] = kernel::single('site_theme_tmpl')->get_edit_list($theme);
$pagedata['types'] = kernel::single('site_theme_tmpl')->get_name($this->platform);
$pagedata['theme'] = $theme;
$pagedata['view'] = $file;
$pagedata['viewname'] = kernel::single('site_theme_tmpl')->get_list_name($this->platform, $file);
$pagedata['shopadmin'] = url::route('shopadmin');
$pagedata['site_url'] = url::route('topc');
$pagedata['pagehead_active'] = 'preview';
$pagedata['save_url'] = url::route('shopadmin', ['app' => 'site', 'ctl' => 'admin_theme_widget', 'act' => 'do_preview']);
// $pagedata['preview_url'] = url::route('topc');
if ($urlType == 'pc') {
$pagedata['preview_url'] = url::route('topc');
}
if ($urlType == 'wap') {
$pagedata['preview_url'] = url::route('topm');
}
//设置编辑默认页面
$defaultIndexFile = kernel::single('site_theme_tmpl')->get_default('index', $theme);
$nodefaultindex = $this->app->model('themes_tmpl')->getList('tmpl_path', array('theme' => $theme, 'tmpl_type' => 'index'));
$pagedata['current']['default_index_file'] = $defaultIndexFile ? $defaultIndexFile : $nodefaultindex[0]['tmpl_path'];
$pagedata['platform'] = $this->platform;
return $this->singlepage('site/admin/theme/widget/editor.html', $pagedata);
}
示例5: getJsonUrl
public function getJsonUrl()
{
$apiJson = $this->format();
foreach ($apiJson as $key => $value) {
$url[$key] = url::route('api/api.json', ['api' => $key]);
}
return $url;
}
示例6: column_edit
public function column_edit(&$colList, $list)
{
foreach ($list as $k => $row) {
$url = url::route('shopadmin', ['app' => 'syspromotion', 'act' => 'editActivity', 'ctl' => 'admin_activity', 'finder_id' => $_GET['_finder']['finder_id'], 'id' => $row['activity_id']]);
$target = '_blank';
$title = '编辑';
$colList[$k] = '<a href="' . $url . '" target="' . $target . '">' . $title . '</a>';
}
}
示例7: clean_data
function clean_data()
{
kernel::single('base_cleandata')->clean();
//退出登录
$this->begin('javascript:Cookie.dispose("basicloginform_password");Cookie.dispose("basicloginform_autologin");location="' . url::route('shopadmin') . '"');
$this->user->login();
$this->user->logout();
pamAccount::logout();
kernel::single('base_session')->destory();
$this->end('true', app::get('desktop')->_('已成功退出系统,正在转向...'));
}
示例8: saveApply
/**
* @brief 保存入驻申请信息
*
* @return
*/
public function saveApply()
{
try {
$url = url::route('topshop.home');
$post = input::get();
$this->__checkpost($post);
$result = app::get('topshop')->rpcCall('shop.create.enterapply', $post);
$msg = app::get('topshop')->_('申请入驻成功');
return $this->splash('success', $url, $msg, true);
} catch (\LogicException $e) {
return $this->splash('error', null, $e->getMessage(), true);
}
}
示例9: column_edit
public function column_edit(&$colList, $list)
{
$registerData = app::get('syspromotion')->model('activity');
foreach ($list as $k => $row) {
$url = url::route('shopadmin', ['app' => 'syspromotion', 'act' => 'index', 'ctl' => 'admin_activity_register', 'finder_id' => $_GET['_finder']['finder_id'], 'id' => $row['id'], 'finderview' => 'detail_basic', 'action' => 'detail', 'singlepage' => 'true']);
$data = $registerData->getRow('activity_id', array('activity_id' => $row['activity_id'], 'release_time|sthan' => time()));
if ($data) {
$colList[$k] = '无法审核';
} elseif ($row['verify_status'] == 'pending') {
$colList[$k] = '<a href="' . $url . '" target="_blank" title="审核">审核</a>';
}
if ($row['verify_status'] == 'agree') {
$colList[$k] = '审核通过';
}
if ($row['verify_status'] == 'refuse') {
$colList[$k] = '审核驳回';
}
}
}
示例10: __construct
public function __construct(&$app)
{
$setting['界面操作'][] = array('title' => '刷新主区域', 'type' => 'refresh', 'params' => array('control' => array('ctrl' => 'true'), 'keyword' => 'R'));
$setting['界面操作'][] = array('title' => '关闭对话框或列表明细', 'type' => 'close', 'params' => array('keyword' => 'F', 'control' => array('ctrl' => 'true')));
$setting['界面操作'][] = array('title' => '列表中下个条目明细', 'type' => 'detail', 'arg' => 'getNext', 'params' => array('keyword' => 'H'));
$setting['界面操作'][] = array('title' => '列表中上个条目明细', 'type' => 'detail', 'arg' => 'getPrevious', 'params' => array('keyword' => 'L'));
$setting['界面操作'][] = array('title' => '列表中下个条目明细中上个Tab', 'type' => 'tabs', 'arg' => 'getNext', 'params' => array('keyword' => 'J'));
$setting['界面操作'][] = array('title' => '列表中上个条目明细中上个Tab', 'type' => 'tabs', 'arg' => 'getPrevious', 'params' => array('keyword' => 'K'));
$setting['界面操作'][] = array('title' => '隐藏左侧导航栏', 'type' => 'event', 'arg' => '#leftToggler', 'params' => array('keyword' => 'Q'));
$setting['界面操作'][] = array('title' => '打开/隐藏高级筛选', 'type' => 'event', 'arg' => '.finder-filter-action-handle a', 'params' => array('keyword' => 'W'));
$url = url::route('shopadmin', array('app' => 'desktop', 'act' => 'index', 'ctl' => 'dashboard'));
$setting['全局操作'][] = array('title' => '查看桌面', 'params' => array('keyword' => 'D'), 'arg' => $url);
$url = url::route('shopadmin', array('app' => 'desktop', 'act' => 'index', 'ctl' => 'appmgr'));
$setting['全局操作'][] = array('title' => '打开应用中心', 'params' => array('keyword' => 'A'), 'arg' => $url);
$url = url::route('shopadmin', array('app' => 'desktop', 'act' => 'index', 'ctl' => 'adminpanel'));
$setting['全局操作'][] = array('title' => '打开控制面板', 'params' => array('keyword' => 'B'), 'arg' => $url);
$setting['全局操作'][] = array('title' => '打开帮助', 'type' => 'open', 'params' => array('keyword' => 'C'), 'arg' => 'http://www.shopex.cn/help/ecstore');
$url = url::route('shopadmin', array('app' => 'desktop', 'act' => 'maintenance', 'ctl' => 'appmgr'));
$setting['全局操作'][] = array('title' => '维护', 'type' => 'cmd', 'params' => array('keyword' => 'E'), 'arg' => $url, 'options' => array('title' => '维护'));
$this->setting = $setting;
}
示例11: active
function active()
{
if ($_GET['ent_id'] && $_GET['ent_ac'] && $_GET['ent_sign'] && $_GET['ent_email']) {
//判断数据是否是中心过来的
if (md5($_GET['ent_id'] . $_GET['ent_ac'] . 'ShopEXUser') == $_GET['ent_sign']) {
//检测企业帐号是否正确
base_enterprise::set_version();
base_enterprise::set_token();
if (!base_enterprise::is_valid('json', $_GET['ent_id'])) {
header("Content-type: text/html; charset=utf-8");
$active_url = url::route('shopadmin', array('app' => 'entermembercenter', 'ctl' => 'register'));
header('Location:' . $active_url);
exit;
} else {
$arr_enterprise = array('ent_id' => $_GET['ent_id'], 'ent_ac' => $_GET['ent_ac'], 'ent_email' => $_GET['ent_email']);
base_enterprise::set_enterprise_info($arr_enterprise);
if (!base_certificate::certi_id() || !base_certificate::token()) {
base_certificate::register();
}
if (!base_shopnode::node_id() && base_certificate::certi_id() && base_certificate::token()) {
$obj_buildin = kernel::single('base_shell_buildin');
$obj_buildin->command_active_node_id('ceti_node_id');
}
}
}
} else {
header("Content-type: text/html; charset=utf-8");
$active_url = url::route('shopadmin', ['app' => 'entermembercenter', 'ctl' => 'register']);
header('Location:' . $active_url);
exit;
}
$url = url::route('shopadmin');
$url = base64_encode($url);
$login_html = '?ctl=passport&act=index&url=' . $url;
header("Content-type: text/html; charset=utf-8");
header('Location:' . $login_html);
exit;
}
示例12: checkInstalled
static function checkInstalled()
{
if (!self::is_online()) {
if (file_exists(APP_DIR . '/setup/app.xml')) {
//todo:进入安装check
setcookie('LOCAL_SETUP_URL', url::route('setup'), 0, '/');
if (file_exists(PUBLIC_DIR . '/check.php')) {
header('Location: ' . kernel::base_url() . '/check.php');
} else {
header('Location: ' . url::route('setup'));
}
exit;
} else {
echo '<h1>System is Offline, install please.</h1>';
exit;
}
}
}
示例13: route
/**
* Generate a URL to a named route.
*
* @param string $route
* @param array $parameters
* @return string
*/
function route($route, $parameters = array())
{
return url::route($route, $parameters);
}
示例14: get_index_url
private function get_index_url()
{
return url::route('shopadmin', array('app' => 'site', 'ctl' => 'admin_errorpage', 'act' => 'index'));
}
示例15: route
/**
* URL路由处理
*/
private static function route()
{
url::route();
//URL路由处理
}