当前位置: 首页>>代码示例>>PHP>>正文


PHP AWS_APP::lang方法代码示例

本文整理汇总了PHP中AWS_APP::lang方法的典型用法代码示例。如果您正苦于以下问题:PHP AWS_APP::lang方法的具体用法?PHP AWS_APP::lang怎么用?PHP AWS_APP::lang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AWS_APP的用法示例。


在下文中一共展示了AWS_APP::lang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index_action

 public function index_action()
 {
     if ($_GET['tag']) {
         $this->crumb(AWS_APP::lang()->_t('标签') . ': ' . $_GET['tag'], '/favorite/tag-' . $_GET['tag']);
     }
     //边栏可能感兴趣的人或话题
     if (TPL::is_output('block/sidebar_recommend_users_topics.tpl.htm', 'favorite/index')) {
         $recommend_users_topics = $this->model('module')->recommend_users_topics($this->user_id);
         TPL::assign('sidebar_recommend_users_topics', $recommend_users_topics);
     }
     if ($action_list = $this->model('favorite')->get_item_list($_GET['tag'], $this->user_id, calc_page_limit($_GET['page'], get_setting('contents_per_page')))) {
         foreach ($action_list as $key => $val) {
             $item_ids[] = $val['item_id'];
         }
         TPL::assign('list', $action_list);
     } else {
         if (!$_GET['page'] or $_GET['page'] == 1) {
             $this->model('favorite')->remove_favorite_tag(null, null, $_GET['tag'], $this->user_id);
         }
     }
     if ($item_ids) {
         $favorite_items_tags = $this->model('favorite')->get_favorite_items_tags_by_item_id($this->user_id, $item_ids);
         TPL::assign('favorite_items_tags', $favorite_items_tags);
     }
     TPL::assign('favorite_tags', $this->model('favorite')->get_favorite_tags($this->user_id));
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/favorite/tag-' . $_GET['tag']), 'total_rows' => $this->model('favorite')->count_favorite_items($this->user_id, $_GET['tag']), 'per_page' => get_setting('contents_per_page')))->create_links());
     TPL::output('favorite/index');
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:28,代码来源:main.php

示例2: index_action

 public function index_action()
 {
     if (!$this->user_id) {
         HTTP::redirect('/explore/');
     }
     if (!$this->user_info['email']) {
         HTTP::redirect('/account/complete_profile/');
     }
     // 边栏可能感兴趣的人或话题
     if (TPL::is_output('block/sidebar_recommend_users_topics.tpl.htm', 'home/index')) {
         $recommend_users_topics = $this->model('module')->recommend_users_topics($this->user_id);
         TPL::assign('sidebar_recommend_users_topics', $recommend_users_topics);
     }
     // 边栏热门用户
     if (TPL::is_output('block/sidebar_hot_users.tpl.htm', 'home/index')) {
         $sidebar_hot_users = $this->model('module')->sidebar_hot_users($this->user_id);
         TPL::assign('sidebar_hot_users', $sidebar_hot_users);
     }
     $this->crumb(AWS_APP::lang()->_t('动态'), '/home/');
     TPL::import_js('js/app/index.js');
     if ($_GET['first_login']) {
         TPL::import_js('js/ajaxupload.js');
     }
     TPL::output('home/index');
 }
开发者ID:chenruixuan,项目名称:wecenter,代码行数:25,代码来源:main.php

示例3: remove_slide_action

 public function remove_slide_action()
 {
     if (!$this->model('slide')->remove_slide($_POST['id'])) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('删除幻灯片失败')));
     }
     H::ajax_json_output(AWS_APP::RSM(null, 1, null));
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:7,代码来源:slide.php

示例4: service_group_list_action

 public function service_group_list_action()
 {
     $this->crumb(AWS_APP::lang()->_t('客服组管理'), 'admin/ticket/service_group_list/');
     TPL::assign('groups_list', $this->model('account')->get_user_group_list(2, 2));
     TPL::assign('menu_list', $this->model('admin')->fetch_menu_list(403));
     TPL::output('admin/ticket/service_group_list');
 }
开发者ID:elelianghh,项目名称:wecenter,代码行数:7,代码来源:ticket.php

示例5: sign_in_action

 public function sign_in_action()
 {
     if ($_GET['uid'] != $this->user_id) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('签到失败!')));
     }
     if ($this->model('sign')->is_signed_today($_GET['uid'])) {
         H::ajax_json_output(AWS_APP::RSM(array('is_signed' => true)), 1, null);
     }
     $continous = $this->model('sign')->sign_in($_GET['uid']);
     $integral_every_day = get_setting('sign_integral_every_day');
     $integral_seventh_day = get_setting('sign_integral_seventh_day');
     // 积分操作
     $is_seventh_day = false;
     if ($continous < 0) {
         H::ajax_json_output(AWS_APP::RSM(array('is_signed' => true)), 1, null);
     } else {
         if ($continous == 6) {
             $integral = $integral_seventh_day;
             $integral_message = '连续7天签到积分';
             $is_seventh_day = true;
         } else {
             $integral = $integral_every_day;
             $integral_message = '每日签到积分';
         }
     }
     $this->model('integral')->process($_GET['uid'], 'SIGN_IN', $integral, $integral_message, $_GET['uid']);
     H::ajax_json_output(AWS_APP::RSM(array('is_signed' => false, 'continous' => $continous, 'integral_every_day' => $integral_every_day, 'integral_seventh_day' => $integral_seventh_day, 'user_integral' => $this->user_info['integral'] + $integral)), 1, null);
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:28,代码来源:ajax.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: setup

 public function setup()
 {
     //HTTP::no_cache_header();
     if (!$this->model('myapi')->verify_signature(get_class(), $_GET['mobile_sign'])) {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('验签失败')));
     }
 }
开发者ID:androiddream,项目名称:WeCenterMobile-Api,代码行数:7,代码来源:explore.php

示例8: send_action

 public function send_action()
 {
     if (trim($_POST['message']) == '') {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('请输入私信内容')));
     }
     if (!($recipient_user = $this->model('account')->get_user_info_by_username($_POST['recipient']))) {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('接收私信的用户不存在')));
     }
     if ($recipient_user['uid'] == $this->user_id) {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('不能给自己发私信')));
     }
     if ($recipient_user['inbox_recv']) {
         if (!$this->model('message')->check_permission($recipient_user['uid'], $this->user_id)) {
             H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('对方设置了只有 Ta 关注的人才能给 Ta 发送私信')));
         }
     }
     // !注: 来路检测后面不能再放报错提示
     if (!valid_post_hash($_POST['post_hash'])) {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('页面停留时间过长,或内容已提交,请刷新页面')));
     }
     $this->model('message')->send_message($this->user_id, $recipient_user['uid'], $_POST['message']);
     if ($_POST['return_url']) {
         $rsm = array('url' => get_js_url(strip_tags($_POST['return_url'])));
     } else {
         $rsm = array('url' => get_js_url('/inbox/'));
     }
     H::ajax_json_output(AWS_APP::RSM($rsm, 1, null));
 }
开发者ID:wenyinos,项目名称:wecenter,代码行数:28,代码来源:ajax.php

示例9: list_action

 public function list_action()
 {
     if ($this->is_post()) {
         foreach ($_POST as $key => $val) {
             if ($key == 'start_date' or $key == 'end_date') {
                 $val = base64_encode($val);
             }
             if ($key == 'keyword' or $key == 'user_name') {
                 $val = rawurlencode($val);
             }
             $param[] = $key . '-' . $val;
         }
         H::ajax_json_output(AWS_APP::RSM(array('url' => get_js_url('/admin/article/list/' . implode('__', $param))), 1, null));
     }
     $where = array();
     if ($_GET['keyword']) {
         $where[] = "(`title` LIKE '%" . $this->model('article')->quote($_GET['keyword']) . "%')";
     }
     if ($_GET['start_date']) {
         $where[] = 'add_time >= ' . strtotime(base64_decode($_GET['start_date']));
     }
     if ($_GET['end_date']) {
         $where[] = 'add_time <= ' . strtotime('+1 day', strtotime(base64_decode($_GET['end_date'])));
     }
     if ($_GET['user_name']) {
         $user_info = $this->model('account')->get_user_info_by_username($_GET['user_name']);
         $where[] = 'uid = ' . intval($user_info['uid']);
     }
     if ($_GET['comment_count_min']) {
         $where[] = 'comments >= ' . intval($_GET['comment_count_min']);
     }
     if ($_GET['answer_count_max']) {
         $where[] = 'comments <= ' . intval($_GET['comment_count_max']);
     }
     if ($articles_list = $this->model('article')->fetch_page('article', implode(' AND ', $where), 'id DESC', $_GET['page'], $this->per_page)) {
         $search_articles_total = $this->model('article')->found_rows();
     }
     if ($articles_list) {
         foreach ($articles_list as $key => $val) {
             $articles_list_uids[$val['uid']] = $val['uid'];
         }
         if ($articles_list_uids) {
             $articles_list_user_infos = $this->model('account')->get_user_info_by_uids($articles_list_uids);
         }
         foreach ($articles_list as $key => $val) {
             $articles_list[$key]['user_info'] = $articles_list_user_infos[$val['uid']];
         }
     }
     $url_param = array();
     foreach ($_GET as $key => $val) {
         if (!in_array($key, array('app', 'c', 'act', 'page'))) {
             $url_param[] = $key . '-' . $val;
         }
     }
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/admin/article/list/') . implode('__', $url_param), 'total_rows' => $search_articles_total, 'per_page' => $this->per_page))->create_links());
     $this->crumb(AWS_APP::lang()->_t('文章管理'), 'admin/article/list/');
     TPL::assign('articles_count', $search_articles_total);
     TPL::assign('list', $articles_list);
     TPL::output('admin/article/list');
 }
开发者ID:wenyinos,项目名称:wecenter,代码行数:60,代码来源:article.php

示例10: apply_action

 public function apply_action()
 {
     $site_name = $_POST['site_name'];
     $site_url = $_POST['site_url'];
     //此处就是控制器(C)指派模型(M)的过程,表示调用models\link.php中的is_exist_url()
     //用于判断该网站地址是否已经存在
     //对提交的参数进行简单的判断
     if ($this->model('link')->is_exist_url1($site_name, $site_url)) {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('邮件已发送,请勿重复发送!')));
     }
     if (trim($site_name) == '') {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('请输入客户邮箱!')));
     }
     if (!$this->model('link')->checkEmail($site_name)) {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('请输入正确的邮箱!')));
     }
     if (trim($site_url) == '') {
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('请输入邮件内容!')));
     }
     //表示调用models\link.php中的apply(),将申请数据插入数据库中
     if (!$this->model('link')->apply($site_name, $site_url)) {
         $this->model('link')->sendEmail($site_name, $site_url);
     }
     H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('发送成功,请关闭对话框!')));
 }
开发者ID:andeydong,项目名称:test,代码行数:25,代码来源:ajax.php

示例11: remove_data_action

 public function remove_data_action()
 {
     if (!$_POST['type'] or !$_POST['item_id']) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('错误的请求')));
     }
     switch ($_POST['type']) {
         case 'question':
             $question_info = $this->model('question')->get_question_info_by_id($_POST['item_id']);
             if (!$question_info) {
                 H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('指定问题不存在')));
             }
             if (!$question_info['chapter_id']) {
                 H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('指定问题不在帮助中心中')));
             }
             $this->model('help')->remove_data('question', $question_info['question_id']);
             break;
         case 'article':
             $article_info = $this->model('article')->get_article_info_by_id($_POST['item_id']);
             if (!$article_info) {
                 H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('指定文章不存在')));
             }
             if (!$article_info['chapter_id']) {
                 H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('指定文章不在帮助中心中')));
             }
             $this->model('help')->remove_data('article', $article_info['id']);
             break;
         default:
             H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('错误的请求')));
             break;
     }
     H::ajax_json_output(AWS_APP::RSM(null, 1, null));
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:32,代码来源:ajax.php

示例12: 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

示例13: 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

示例14: index_action

 public function index_action()
 {
     if ($_POST['mobile_app_secret']) {
         $this->model('myapi')->save_mobile_app_secret(trim($_POST['mobile_app_secret']));
         H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('保存设置成功')));
     }
     TPL::output('admin/mobile_app_config');
 }
开发者ID:androiddream,项目名称:WeCenterMobile-Api,代码行数:8,代码来源:mobile_app_config.php

示例15: save_order_action

 public function save_order_action()
 {
     if (!$_POST['id']) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('请选择订单')));
     }
     $this->model('project')->update_order($_POST['id'], $_POST);
     H::ajax_json_output(AWS_APP::RSM(null, 1, null));
 }
开发者ID:elelianghh,项目名称:wecenter,代码行数:8,代码来源:project.php


注:本文中的AWS_APP::lang方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。