當前位置: 首頁>>代碼示例>>PHP>>正文


PHP H::redirect_msg方法代碼示例

本文整理匯總了PHP中H::redirect_msg方法的典型用法代碼示例。如果您正苦於以下問題:PHP H::redirect_msg方法的具體用法?PHP H::redirect_msg怎麽用?PHP H::redirect_msg使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在H的用法示例。


在下文中一共展示了H::redirect_msg方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index_action

 public function index_action()
 {
     if (is_digits($_GET['id'])) {
         $feature_info = $this->model('feature')->get_feature_by_id($_GET['id']);
     } else {
         $feature_info = $this->model('feature')->get_feature_by_url_token($_GET['id']);
     }
     if (!$feature_info) {
         header('HTTP/1.1 404 Not Found');
         H::redirect_msg(AWS_APP::lang()->_t('專題不存在'), '/');
     }
     if (!$feature_info['enabled']) {
         H::redirect_msg(AWS_APP::lang()->_t('專題未啟用'), '/');
     }
     if ($feature_info['url_token'] != $_GET['id'] and !$_GET['sort_type'] and !$_GET['is_recommend']) {
         HTTP::redirect('/feature/' . $feature_info['url_token']);
     }
     if (!($topic_list = $this->model('topic')->get_topics_by_ids($this->model('feature')->get_topics_by_feature_id($feature_info['id'])))) {
         H::redirect_msg(AWS_APP::lang()->_t('專題下必須包含一個以上話題'), '/');
     }
     if ($feature_info['seo_title']) {
         TPL::assign('page_title', $feature_info['seo_title']);
     } else {
         $this->crumb($feature_info['title'], '/feature/' . $feature_info['url_token']);
     }
     TPL::assign('sidebar_hot_topics', $topic_list);
     TPL::assign('feature_info', $feature_info);
     TPL::import_js('js/app/feature.js');
     TPL::output('feature/detail');
 }
開發者ID:Gradven,項目名稱:what3.1.7,代碼行數:30,代碼來源:main.php

示例2: setup

 public function setup()
 {
     if (!$this->user_info['permission']['is_administortar']) {
         H::redirect_msg(AWS_APP::lang()->_t('你沒有訪問權限, 請重新登錄'), '/');
     }
     TPL::assign('menu_list', $this->model('admin')->fetch_menu_list(304));
 }
開發者ID:egogg,項目名稱:wecenter-dev,代碼行數:7,代碼來源:feature.php

示例3: alipay_action

 public function alipay_action()
 {
     $result = $this->model('payment_alipay')->verifyReturn();
     $order = $this->model('payment')->get_order($_GET['out_trade_no']);
     if ($result and $_GET['total_fee'] == $order['amount']) {
         if ($_GET['extra_common_param']) {
             $params = json_decode(base64_decode(urldecode($_GET['extra_common_param'])), TRUE);
         } else {
             if ($order['extra_param']) {
                 $params = unserialize($order['extra_param']);
             }
         }
         if (!$order['terrace_id']) {
             $this->model('payment')->set_order_terrace_id($_GET['trade_no'], $order['order_id']);
             $this->model('payment')->set_payment_id('ALIPAY', $order['order_id']);
             if ($params['pay_to_project_order_id']) {
                 if (!$this->model('payment')->pay_to_project_order_id($order['order_id'], $params['pay_to_project_order_id'])) {
                     H::redirect_msg('訂單處理失敗,如有疑問請聯係客服人員,網站訂單編號:' . $params['pay_to_project_order_id']);
                 }
             }
         }
         if ($params['pay_to_project_order_id']) {
             $this->callback_url = '/project/sponsored/';
         }
         H::redirect_msg('支付成功, 交易金額: ' . $order['amount'], $this->callback_url);
     } else {
         H::redirect_msg('交易失敗,如有疑問請聯係客服人員,支付寶訂單編號:' . $_GET['out_trade_no']);
     }
 }
開發者ID:elelianghh,項目名稱:wecenter,代碼行數:29,代碼來源:callback.php

示例4: generate_sitemap_action

 public function generate_sitemap_action()
 {
     $return_url = '/admin/settings/category-sitemap';
     switch ($this->model('sitemap')->generate_sitemap_all($_GET['reset'])) {
         case sitemap_class::SITEMAP_SUCCESS:
             H::redirect_msg(AWS_APP::lang()->_t('sitemap生成成功,請等待係統自動返回...'), $return_url);
             break;
         case sitemap_class::SITEMAP_DIR_NOT_EXIST:
             H::redirect_msg(AWS_APP::lang()->_t('錯誤:sitemap根目錄不存在'), $return_url);
             break;
         case sitemap_class::SITEMAP_DIR_NOT_WRITABLE:
             H::redirect_msg(AWS_APP::lang()->_t('錯誤:目錄%s不可寫,請聯係後台管理員進行設置', $sitemap_dir), $return_url);
             break;
         case sitemap_class::SITEMAP_DIR_NOT_EXIST_M:
             H::redirect_msg(AWS_APP::lang()->_t('錯誤:sitemap根目錄(移動版)不存在'), $return_url);
             break;
         case sitemap_class::SITEMAP_DIR_NOT_WRITABLE_M:
             H::redirect_msg(AWS_APP::lang()->_t('錯誤:目錄%s不可寫,請聯係後台管理員進行設置', $sitemap_dir_m), $return_url);
             break;
         case sitemap_class::SITEMAP_BASE_URL_NULL:
             H::redirect_msg(AWS_APP::lang()->_t('錯誤:網站根鏈接不能為空'), $return_url);
             break;
         case sitemap_class::SITEMAP_BASE_URL_NULL_M:
             H::redirect_msg(AWS_APP::lang()->_t('錯誤:網站根鏈接(移動版)不能為空'), $return_url);
             break;
         default:
             break;
     }
 }
開發者ID:egogg,項目名稱:wecenter-dev,代碼行數:29,代碼來源:sitemap.php

示例5: read_action

 public function read_action()
 {
     if (!($dialog = $this->model('message')->get_dialog_by_id($_GET['id']))) {
         H::redirect_msg(AWS_APP::lang()->_t('指定的站內信不存在'), '/inbox/');
     }
     if ($dialog['recipient_uid'] != $this->user_id and $dialog['sender_uid'] != $this->user_id) {
         H::redirect_msg(AWS_APP::lang()->_t('指定的站內信不存在'), '/inbox/');
     }
     $this->model('message')->set_message_read($_GET['id'], $this->user_id);
     if ($list = $this->model('message')->get_message_by_dialog_id($_GET['id'])) {
         if ($dialog['sender_uid'] != $this->user_id) {
             $recipient_user = $this->model('account')->get_user_info_by_uid($dialog['sender_uid']);
         } else {
             $recipient_user = $this->model('account')->get_user_info_by_uid($dialog['recipient_uid']);
         }
         foreach ($list as $key => $val) {
             if ($dialog['sender_uid'] == $this->user_id and $val['sender_remove']) {
                 unset($list[$key]);
             } else {
                 if ($dialog['sender_uid'] != $this->user_id and $val['recipient_remove']) {
                     unset($list[$key]);
                 } else {
                     $list[$key]['message'] = FORMAT::parse_links($val['message']);
                     $list[$key]['user_name'] = $recipient_user['user_name'];
                     $list[$key]['url_token'] = $recipient_user['url_token'];
                     $list[$key]['profile_update_time'] = $recipient_user['profile_update_time'];
                 }
             }
         }
     }
     $this->crumb(AWS_APP::lang()->_t('私信對話') . ': ' . $recipient_user['user_name'], '/inbox/read/' . intval($_GET['id']));
     TPL::assign('list', $list);
     TPL::assign('recipient_user', $recipient_user);
     TPL::output('inbox/read');
 }
開發者ID:egogg,項目名稱:wecenter-dev,代碼行數:35,代碼來源:main.php

示例6: binding_callback_action

 function binding_callback_action()
 {
     $oauth = new Services_Weibo_WeiboOAuth(get_setting('sina_akey'), get_setting('sina_skey'));
     if ($_GET['uid'] and $this->user_info['permission']['is_administortar']) {
         $user_id = intval($_GET['uid']);
         $user_info = $this->model('account')->get_user_info_by_uid($user_id);
         if (empty($user_info)) {
             H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('本地用戶不存在,無法綁定')));
         }
         $sina_token = $oauth->getAccessToken('code', array('code' => $_GET['code'], 'redirect_uri' => get_js_url('/account/sina/binding_callback/uid-' . $user_id)));
     } else {
         $user_id = $this->user_id;
         AWS_APP::session()->sina_token = $oauth->getAccessToken('code', array('code' => $_GET['code'], 'redirect_uri' => get_js_url('/account/sina/binding_callback/')));
         $sina_token = AWS_APP::session()->sina_token;
         $redirect = get_js_url('/account/setting/openid/');
     }
     $client = new Services_Weibo_WeiboClient(get_setting('sina_akey'), get_setting('sina_skey'), $sina_token['access_token']);
     $uid_get = $client->get_uid();
     $sina_profile = $client->show_user_by_id($uid_get['uid']);
     if ($sina_profile['error']) {
         H::redirect_msg(AWS_APP::lang()->_t('與微博通信出錯, 錯誤代碼: %s', $sina_profile['error']), "/account/setting/openid/");
     }
     if (!$this->model('integral')->fetch_log($user_id, 'BIND_OPENID')) {
         $this->model('integral')->process($user_id, 'BIND_OPENID', round(get_setting('integral_system_config_profile') * 0.2), '綁定 OPEN ID');
     }
     //$this->model('openid_weibo')->bind_account($sina_profile, get_js_url('/account/setting/openid/'), $user_id, $last_key['oauth_token'], $last_key['oauth_token_secret'], $sina_token);
     $this->model('openid_weibo')->bind_account($sina_profile, $redirect, $user_id, $sina_token);
 }
開發者ID:chenruixuan,項目名稱:wecenter,代碼行數:28,代碼來源:sina.php

示例7: mail_action

 public function mail_action()
 {
     if ($task = $this->model('edm')->get_task_info($_GET['id'])) {
         echo str_replace('[EMAIL]', 'email@address.com', $task['message']);
     } else {
         H::redirect_msg(AWS_APP::lang()->_t('您所訪問的資源不存在'));
     }
 }
開發者ID:chenruixuan,項目名稱:wecenter,代碼行數:8,代碼來源:edm.php

示例8: index_action

 public function index_action()
 {
     if (!$this->user_info['email']) {
         H::redirect_msg(AWS_APP::lang()->_t('當前帳號沒有提供 Email, 此功能不可用'));
     }
     $this->crumb(AWS_APP::lang()->_t('邀請好友'), '/invitation/');
     TPL::output('invitation/index');
 }
開發者ID:egogg,項目名稱:wecenter-dev,代碼行數:8,代碼來源:main.php

示例9: setup

 public function setup()
 {
     $this->crumb(AWS_APP::lang()->_t('首頁精選管理'), "admin/recommend/list/");
     if (!$this->user_info['permission']['is_administortar']) {
         H::redirect_msg(AWS_APP::lang()->_t('你沒有訪問權限, 請重新登錄'), '/');
     }
     TPL::assign('menu_list', $this->model('admin')->fetch_menu_list(603));
 }
開發者ID:egogg,項目名稱:wecenter-dev,代碼行數:8,代碼來源:recommend.php

示例10: rule_action

 public function rule_action()
 {
     $this->crumb(AWS_APP::lang()->_t('%s 積分規則', get_setting('site_name')));
     if (get_setting('integral_system_enabled') != 'Y') {
         H::redirect_msg(AWS_APP::lang()->_t('本站未啟用積分係統'), '/');
     }
     TPL::output('integral/rule');
 }
開發者ID:Vizards,項目名稱:HeavenSpree,代碼行數:8,代碼來源:main.php

示例11: __construct

 function __construct($message)
 {
     if ($_POST['_post_type'] == 'ajax') {
         H::ajax_json_output(AWS_APP::RSM(null, -1, 'SDK 異常: ' . $message));
     } else {
         H::redirect_msg('SDK 異常: ' . $message);
     }
 }
開發者ID:chenruixuan,項目名稱:wecenter,代碼行數:8,代碼來源:WeiboOAuth.php

示例12: index_action

 public function index_action()
 {
     if (isset($_GET['notification_id'])) {
         $this->model('notify')->read_notification($_GET['notification_id'], $this->user_id);
     }
     if (is_mobile()) {
         HTTP::redirect('/m/people/' . $_GET['id']);
     }
     if (is_digits($_GET['id'])) {
         if (!($user = $this->model('account')->get_user_info_by_uid($_GET['id'], TRUE))) {
             $user = $this->model('account')->get_user_info_by_username($_GET['id'], TRUE);
         }
     } else {
         if ($user = $this->model('account')->get_user_info_by_username($_GET['id'], TRUE)) {
         } else {
             $user = $this->model('account')->get_user_info_by_url_token($_GET['id'], TRUE);
         }
     }
     if (!$user) {
         header('HTTP/1.1 404 Not Found');
         H::redirect_msg(AWS_APP::lang()->_t('用戶不存在'), '/');
     }
     if ($user['forbidden'] and !$this->user_info['permission']['is_administortar'] and !$this->user_info['permission']['is_moderator']) {
         header('HTTP/1.1 404 Not Found');
         H::redirect_msg(AWS_APP::lang()->_t('該用戶已被封禁'), '/');
     }
     if (urldecode($user['url_token']) != $_GET['id']) {
         HTTP::redirect('/people/' . $user['url_token']);
     }
     $this->model('people')->update_views($user['uid']);
     TPL::assign('user', $user);
     $job_info = $this->model('account')->get_jobs_by_id($user['job_id']);
     TPL::assign('job_name', $job_info['job_name']);
     if ($user['weibo_visit']) {
         if ($users_sina = $this->model('openid_weibo_oauth')->get_weibo_user_by_uid($user['uid'])) {
             TPL::assign('sina_weibo_url', 'http://www.weibo.com/' . $users_sina['id']);
         }
     }
     TPL::assign('education_experience_list', $this->model('education')->get_education_experience_list($user['uid']));
     $jobs_list = $this->model('work')->get_jobs_list();
     if ($work_experience_list = $this->model('work')->get_work_experience_list($user['uid'])) {
         foreach ($work_experience_list as $key => $val) {
             $work_experience_list[$key]['job_name'] = $jobs_list[$val['job_id']];
         }
     }
     TPL::assign('work_experience_list', $work_experience_list);
     TPL::assign('user_follow_check', $this->model('follow')->user_follow_check($this->user_id, $user['uid']));
     $this->crumb(AWS_APP::lang()->_t('%s 的個人主頁', $user['user_name']), 'people/' . $user['url_token']);
     TPL::import_css('css/user.css');
     TPL::assign('reputation_topics', $this->model('people')->get_user_reputation_topic($user['uid'], $user['reputation'], 12));
     TPL::assign('fans_list', $this->model('follow')->get_user_fans($user['uid'], 5));
     TPL::assign('friends_list', $this->model('follow')->get_user_friends($user['uid'], 5));
     TPL::assign('focus_topics', $this->model('topic')->get_focus_topic_list($user['uid'], 10));
     TPL::assign('user_actions_questions', $this->model('actions')->get_user_actions($user['uid'], 5, ACTION_LOG::ADD_QUESTION, $this->user_id));
     TPL::assign('user_actions_answers', $this->model('actions')->get_user_actions($user['uid'], 5, ACTION_LOG::ANSWER_QUESTION, $this->user_id));
     TPL::assign('user_actions', $this->model('actions')->get_user_actions($user['uid'], 5, implode(',', array(ACTION_LOG::ADD_QUESTION, ACTION_LOG::ANSWER_QUESTION, ACTION_LOG::ADD_REQUESTION_FOCUS, ACTION_LOG::ADD_AGREE, ACTION_LOG::ADD_TOPIC, ACTION_LOG::ADD_TOPIC_FOCUS, ACTION_LOG::ADD_ARTICLE)), $this->user_id));
     TPL::output('people/index');
 }
開發者ID:tenstone,項目名稱:wecenter,代碼行數:58,代碼來源:main.php

示例13: setup

 public function setup()
 {
     if (get_setting('project_enabled') != 'Y') {
         H::redirect_msg(AWS_APP::lang()->_t('活動係統未啟用'), '/');
     }
     $this->crumb(AWS_APP::lang()->_t('活動'), '/project/');
     $this->crumb(AWS_APP::lang()->_t('我支持的活動'), '/project/sponsored/');
     TPL::import_css('css/project.css');
 }
開發者ID:elelianghh,項目名稱:wecenter,代碼行數:9,代碼來源:sponsored.php

示例14: edit_action

 public function edit_action()
 {
     $this->crumb(AWS_APP::lang()->_t('編輯頁麵'), "admin/page/edit/");
     if (!($page_info = $this->model('page')->get_page_by_url_id($_GET['id']))) {
         H::redirect_msg(AWS_APP::lang()->_t('頁麵不存在'), '/admin/page/');
     }
     TPL::assign('page_info', $page_info);
     TPL::output('admin/page/publish');
 }
開發者ID:Vizards,項目名稱:HeavenSpree,代碼行數:9,代碼來源:page.php

示例15: edit_action

 public function edit_action()
 {
     if (!($category_info = $this->model('system')->get_category_info($_GET['category_id']))) {
         H::redirect_msg(AWS_APP::lang()->_t('指定分類不存在'), '/admin/category/list/');
     }
     TPL::assign('category', $category_info);
     TPL::assign('category_option', $this->model('system')->build_category_html($category_info['type'], 0, $category['parent_id'], null, false));
     TPL::output('admin/category/edit');
 }
開發者ID:chenruixuan,項目名稱:wecenter,代碼行數:9,代碼來源:category.php


注:本文中的H::redirect_msg方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。