• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_js_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_js_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_js_url函数的具体用法?PHP get_js_url怎么用?PHP get_js_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

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


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


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


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


示例5: list_action

 public function list_action()
 {
     $this->crumb(AWS_APP::lang()->_t('专题管理'), 'admin/feature/list/');
     $feature_list = $this->model('feature')->get_feature_list('id DESC', $_GET['page'], $this->per_page);
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/admin/feature/list/'), 'total_rows' => $this->model('feature')->found_rows(), 'per_page' => 20))->create_links());
     TPL::assign('list', $feature_list);
     TPL::output('admin/feature/list');
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:8,代码来源:feature.php


示例6: createSign

 public function createSign($out_trade_no, $subject, $total_fee, $extra_common_param = null)
 {
     $parameter = array("service" => "create_direct_pay_by_user", "payment_type" => "1", "partner" => trim(get_setting('alipay_partner')), "_input_charset" => 'utf-8', "seller_email" => trim(get_setting('alipay_seller_email')), "return_url" => get_js_url('/payment/callback/alipay/'), 'notify_url' => get_js_url('/payment/notify/alipay/'), "out_trade_no" => $out_trade_no, "subject" => $subject, "body" => '', "total_fee" => $total_fee, "paymethod" => '', "defaultbank" => '', "anti_phishing_key" => '', "exter_invoke_ip" => '', "show_url" => get_setting('base_url'), "extra_common_param" => $extra_common_param, "royalty_type" => '', "royalty_parameters" => '');
     //除去待签名参数数组中的空值和签名参数
     $parameter = $this->paraFilter($parameter);
     //对待签名参数数组排序
     $para_sort = $this->argSort($parameter);
     return $this->buildMysign($para_sort, get_setting('alipay_key'));
 }
开发者ID:elelianghh,项目名称:wecenter,代码行数:9,代码来源:alipay.php


示例7: format_js_users_output

 public function format_js_users_output($data)
 {
     if ($data) {
         foreach ($data as $key => $val) {
             $output .= '<div class="item"><dl class="inf"><dt><a href="' . get_js_url('/people/' . $val['url_token']) . '">' . $val['user_name'] . '</a></dt><dd>回复了 ' . $val['answer_count'] . ' 个问题</dd><dd>获得 ' . $val['agree_count'] . ' 个赞同</dd></dl><div class="avatar"><a href=""><img src="' . get_avatar_url($val['uid'], 'mid') . '" /></a></div></div><!-- .item -->';
         }
     }
     return "document.write('" . addcslashes($output, "'") . "');";
 }
开发者ID:avldya,项目名称:wecenter,代码行数:9,代码来源:aws_offical_external.php


示例8: new_find_password

 public function new_find_password($uid, $server = 'master')
 {
     if (!$uid) {
         return false;
     }
     $active_code_hash = $this->active_code_generate();
     $active_id = $this->model('active')->new_active_code($uid, time() + 60 * 60 * 24, $active_code_hash, 'FIND_PASSWORD');
     return $this->model('email')->action_email('FIND_PASSWORD', $uid, get_js_url('/account/find_password/modify/key-' . $active_code_hash), $server);
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:9,代码来源:active.php


示例9: list_action

 public function list_action()
 {
     if ($recommend_homepage_list = $this->model('recommend')->fetch_page('recommend_homepage', 'id > 0', ' add_time DESC', $_GET['page'], $this->per_page)) {
         $total_rows = $this->model('recommend')->found_rows();
         foreach ($recommend_homepage_list as $key => $val) {
             switch ($val['item_type']) {
                 case 'question':
                     $val['item_tag'] = '问题(精选)';
                     $val['item_link'] = 'question/' . $val['item_id'];
                     $question_info = $this->model('question')->get_question_info_by_id($val['item_id']);
                     if ($question_info) {
                         $val['item_title'] = $question_info['question_content'];
                     } else {
                         $val['item_title'] = '问题 #' . $val['item_id'];
                     }
                     break;
                 case 'article':
                     $val['item_tag'] = '文章(精选)';
                     $val['item_link'] = 'article/' . $val['item_id'];
                     $article_info = $this->model('article')->get_article_info_by_id($val['item_id']);
                     if ($article_info) {
                         $val['item_title'] = $article_info['title'];
                     } else {
                         $val['item_title'] = '文章 #' . $val['item_id'];
                     }
                     break;
                 case 'topic':
                     $val['item_tag'] = '专题(精选)';
                     $val['item_link'] = 'topic/' . $val['item_id'];
                     $topic_info = $this->model('topic')->get_topic_by_id($val['item_id']);
                     if ($topic_info) {
                         $val['item_title'] = $topic_info['topic_title'];
                     } else {
                         $val['item_title'] = '专题 #' . $val['item_id'];
                     }
                     break;
                 case 'top_question':
                     $val['item_tag'] = '问题(置顶)';
                     $val['item_link'] = 'question/' . $val['item_id'];
                     $question_info = $this->model('question')->get_question_info_by_id($val['item_id']);
                     if ($question_info) {
                         $val['item_title'] = $question_info['question_content'];
                     } else {
                         $val['item_title'] = '问题 #' . $val['item_id'];
                     }
                     break;
             }
             $recommend_homepage_list[$key] = $val;
         }
     }
     TPL::assign('recommend_homepage_list', $recommend_homepage_list);
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/admin/recommend/list/') . implode('__', $url_param), 'total_rows' => $total_rows, 'per_page' => $this->per_page))->create_links());
     $this->crumb(AWS_APP::lang()->_t('首页精选管理'), 'admin/recommend/list/');
     TPL::output('admin/recommend/list');
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:55,代码来源:recommend.php


示例10: parse_redirect_url

 public static function parse_redirect_url($url)
 {
     if (substr($url, 0, 1) == '?') {
         $url = base_url() . $url;
     } else {
         if (substr($url, 0, 1) == '/') {
             $url = get_js_url($url);
         }
     }
     return $url;
 }
开发者ID:bellorchid,项目名称:wecenter-1,代码行数:11,代码来源:cls_http.inc.php


示例11: index_action

 public function index_action()
 {
     if ($order_list = $this->model('project')->get_sponsored_order_list($_GET['id'], $this->user_id, $_GET['page'], get_setting('contents_per_page'))) {
         TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/project/sponsored/' . $_GET['id']), 'total_rows' => $this->model('project')->found_rows(), 'per_page' => get_setting('contents_per_page')))->create_links());
         foreach ($order_list as $key => $val) {
             $order_list[$key]['order_status'] = $this->model('project')->get_order_status($val);
         }
     }
     TPL::assign('order_list', $order_list);
     TPL::output('project/sponsored/index');
 }
开发者ID:elelianghh,项目名称:wecenter,代码行数:11,代码来源:sponsored.php


示例12: send_batch_invitations

 public function send_batch_invitations($email_list, $uid, $user_name)
 {
     foreach ($email_list as $key => $email) {
         if ($this->model('account')->check_email($email)) {
             continue;
         }
         $invitation_code = $this->get_unique_invitation_code();
         $this->model('invitation')->add_invitation($uid, $invitation_code, $email, time(), ip2long($_SERVER['REMOTE_ADDR']));
         $this->model('email')->action_email('INVITE_REG', $email, get_js_url('/account/register/email-' . urlencode($email) . '__icode-' . $invitation_code), array('user_name' => $user_name));
     }
     return true;
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:12,代码来源:invitation.php


示例13: list_action

 public function list_action()
 {
     $this->crumb(AWS_APP::lang()->_t('内容审核'), 'admin/approval/list/');
     TPL::assign('menu_list', $this->model('admin')->fetch_menu_list(300));
     if (!$_GET['type']) {
         $_GET['type'] = 'question';
     }
     switch ($_GET['type']) {
         case 'weibo_msg':
         case 'received_email':
             $approval_list = $this->model('admin')->fetch_page($_GET['type'], 'question_id IS NULL', 'id ASC', $_GET['page'], $this->per_page);
             $found_rows = $this->model('admin')->found_rows();
             break;
         case 'unverified_modify':
             $approval_list = $this->model('question')->fetch_page('question', 'unverified_modify_count <> 0', 'question_id ASC', $_GET['page'], $this->per_page);
             $found_rows = $this->model('question')->found_rows();
             break;
         default:
             $approval_list = $this->model('publish')->get_approval_list($_GET['type'], $_GET['page'], $this->per_page);
             $found_rows = $this->model('publish')->found_rows();
             break;
     }
     TPL::assign('answer_count', $this->model('publish')->count('approval', "type = 'answer'"));
     TPL::assign('question_count', $this->model('publish')->count('approval', "type = 'question'"));
     TPL::assign('article_count', $this->model('publish')->count('approval', "type = 'article'"));
     TPL::assign('article_comment_count', $this->model('publish')->count('approval', "type = 'article_comment'"));
     TPL::assign('weibo_msg_count', $this->model('openid_weibo_weibo')->count('weibo_msg', 'question_id IS NULL'));
     TPL::assign('received_email_count', $this->model('edm')->count('received_email', 'question_id IS NULL'));
     TPL::assign('unverified_modifies_count', $this->model('question')->count('question', 'unverified_modify_count <> 0'));
     if ($approval_list) {
         TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/admin/approval/list/type-' . $_GET['type']), 'total_rows' => $found_rows, 'per_page' => $this->per_page))->create_links());
         if ($_GET['type'] == 'unverified_modify') {
             foreach ($approval_list as $key => $approval_info) {
                 $approval_list[$key]['uid'] = $approval_info['published_uid'];
                 if (!$approval_uids[$approval_list[$key]['uid']]) {
                     $approval_uids[$approval_list[$key]['uid']] = $approval_list[$key]['uid'];
                 }
                 $approval_list[$key]['unverified_modify'] = @unserialize($approval_info['unverified_modify']);
             }
         } else {
             foreach ($approval_list as $approval_info) {
                 if (!$approval_uids[$approval_info['uid']]) {
                     $approval_uids[$approval_info['uid']] = $approval_info['uid'];
                 }
             }
         }
         TPL::assign('users_info', $this->model('account')->get_user_info_by_uids($approval_uids));
     }
     TPL::assign($_GET['type'] . '_count', $found_rows);
     TPL::assign('approval_list', $approval_list);
     TPL::output('admin/approval/list');
 }
开发者ID:Vizards,项目名称:HeavenSpree,代码行数:52,代码来源:approval.php


示例14: index_action

 public function index_action()
 {
     $this->model('account')->update_inbox_unread($this->user_id);
     if ($inbox_dialog = $this->model('message')->get_inbox_message($_GET['page'], get_setting('contents_per_page'), $this->user_id)) {
         $inbox_total_rows = $this->model('message')->found_rows();
         foreach ($inbox_dialog as $key => $val) {
             $dialog_ids[] = $val['id'];
             if ($this->user_id == $val['recipient_uid']) {
                 $inbox_dialog_uids[] = $val['sender_uid'];
             } else {
                 $inbox_dialog_uids[] = $val['recipient_uid'];
             }
         }
     }
     if ($inbox_dialog_uids) {
         if ($users_info_query = $this->model('account')->get_user_info_by_uids($inbox_dialog_uids)) {
             foreach ($users_info_query as $user) {
                 $users_info[$user['uid']] = $user;
             }
         }
     }
     if ($dialog_ids) {
         $last_message = $this->model('message')->get_last_messages($dialog_ids);
     }
     if ($inbox_dialog) {
         foreach ($inbox_dialog as $key => $value) {
             if ($value['recipient_uid'] == $this->user_id and $value['recipient_count']) {
                 $data[$key]['user_name'] = $users_info[$value['sender_uid']]['user_name'];
                 $data[$key]['url_token'] = $users_info[$value['sender_uid']]['url_token'];
                 $data[$key]['unread'] = $value['recipient_unread'];
                 $data[$key]['count'] = $value['recipient_count'];
                 $data[$key]['uid'] = $value['sender_uid'];
                 $data[$key]['profile_update_time'] = $users_info[$value['sender_uid']]['profile_update_time'];
             } else {
                 if ($value['sender_uid'] == $this->user_id and $value['sender_count']) {
                     $data[$key]['user_name'] = $users_info[$value['recipient_uid']]['user_name'];
                     $data[$key]['url_token'] = $users_info[$value['recipient_uid']]['url_token'];
                     $data[$key]['unread'] = $value['sender_unread'];
                     $data[$key]['count'] = $value['sender_count'];
                     $data[$key]['uid'] = $value['recipient_uid'];
                     $data[$key]['profile_update_time'] = $users_info[$value['recipient_uid']]['profile_update_time'];
                 }
             }
             $data[$key]['last_message'] = $last_message[$value['id']];
             $data[$key]['update_time'] = $value['update_time'];
             $data[$key]['id'] = $value['id'];
         }
     }
     TPL::assign('list', $data);
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/inbox/'), 'total_rows' => $inbox_total_rows, 'per_page' => get_setting('contents_per_page')))->create_links());
     TPL::output('inbox/index');
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:52,代码来源:main.php


示例15: index_actions_action

 public function index_actions_action()
 {
     //if ($_GET['filter'] == 'publish')
     if ($_GET['filter'] == 'focus') {
         if ($result = $this->model('question')->get_user_focus($this->user_id, intval($_GET['page']) * $this->per_page . ", {$this->per_page}")) {
             foreach ($result as $key => $val) {
                 $question_ids[] = $val['question_id'];
             }
             $topics_questions = $this->model('topic')->get_topics_by_item_ids($question_ids, 'question');
             foreach ($result as $key => $val) {
                 if (!$user_info_list[$val['published_uid']]) {
                     $user_info_list[$val['published_uid']] = $this->model('account')->get_user_info_by_uid($val['published_uid'], true);
                 }
                 $data[$key]['user_info'] = $user_info_list[$val['published_uid']];
                 $data[$key]['associate_type'] = 1;
                 $data[$key]['topics'] = $topics_questions[$val['question_id']];
                 $data[$key]['link'] = get_js_url('/question/' . $val['question_id']);
                 $data[$key]['title'] = $val['question_content'];
                 $data[$key]['question_info'] = $val;
             }
         }
     } else {
         if ($_GET['filter'] == 'public') {
             $data = $this->model('actions')->get_user_actions(null, intval($_GET['page']) * $this->per_page . ", {$this->per_page}", null, $this->user_id);
         } else {
             if ($_GET['filter'] == 'activity' and check_extension_package('project')) {
                 $project_like = $this->model('project')->fetch_all('project_like', 'uid = ' . $this->user_id);
                 foreach ($project_like as $project_info) {
                     $project_ids[] = $project_info['project_id'];
                 }
                 $this->model('project')->fetch_all('product_order', 'uid = ' . $this->user_id);
                 foreach ($product_order as $project_info) {
                     $project_ids[] = $project_info['project_id'];
                 }
                 $project_ids = array_unique($project_ids);
                 $data = $this->model('project')->get_project_info_by_ids($project_ids, intval($_GET['page']) * $this->per_page . ", {$this->per_page}");
             } else {
                 $data = $this->model('actions')->home_activity($this->user_id, intval($_GET['page']) * $this->per_page . ", {$this->per_page}");
             }
         }
     }
     if (!is_array($data)) {
         $data = array();
     }
     TPL::assign('list', $data);
     if (is_mobile()) {
         TPL::output('m/ajax/index_actions');
     } else {
         TPL::output('home/ajax/index_actions');
     }
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:51,代码来源:ajax.php


示例16: user_info_action

 public function user_info_action()
 {
     if ($this->user_id == $_GET['uid']) {
         $user_info = $this->user_info;
     } else {
         if (!($user_info = $this->model('account')->get_user_info_by_uid($_GET['uid'], ture))) {
             H::ajax_json_output(array('uid' => null));
         }
     }
     if ($this->user_id != $user_info['uid']) {
         $user_follow_check = $this->model('follow')->user_follow_check($this->user_id, $user_info['uid']);
     }
     H::ajax_json_output(array('reputation' => $user_info['reputation'], 'agree_count' => $user_info['agree_count'], 'thanks_count' => $user_info['thanks_count'], 'type' => 'people', 'uid' => $user_info['uid'], 'user_name' => $user_info['user_name'], 'avatar_file' => get_avatar_url($user_info['uid'], 'mid'), 'signature' => $user_info['signature'], 'focus' => $user_follow_check ? true : false, 'is_me' => $this->user_id == $user_info['uid'] ? true : false, 'url' => get_js_url('/people/' . $user_info['url_token']), 'category_enable' => get_setting('category_enable') == 'Y' ? 1 : 0, 'verified' => $user_info['verified'], 'fans_count' => $user_info['fans_count']));
 }
开发者ID:Vizards,项目名称:HeavenSpree,代码行数:14,代码来源:ajax.php


示例17: save_slide_action

 public function save_slide_action()
 {
     if (!$_POST['title']) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('请填写幻灯片标题')));
     }
     if (!$_POST['category']) {
         H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('请选择幻灯片分类')));
     }
     if ($_POST['id']) {
         $slide_info = $this->model('slide')->get_slide_by_id($_POST['id']);
         if (!$slide_info) {
             H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('指定幻灯片不存在')));
         }
     }
     if ($slide_info) {
         $this->model('slide')->save_slide($slide_info['id'], $_POST['title'], $_POST['description'], $_POST['link'], $_POST['category']);
         $id = $slide_info['id'];
     } else {
         $id = $this->model('slide')->save_slide(null, $_POST['title'], $_POST['description'], $_POST['link']);
         if (!$id) {
             H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('保存失败')));
         }
     }
     if ($_FILES['img']['name']) {
         AWS_APP::upload()->initialize(array('allowed_types' => 'jpg,jpeg,png,gif', 'upload_path' => get_setting('upload_dir') . '/slide', 'is_image' => TRUE))->do_upload('img');
         if (AWS_APP::upload()->get_error()) {
             switch (AWS_APP::upload()->get_error()) {
                 default:
                     H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('错误代码') . ': ' . AWS_APP::upload()->get_error()));
                     break;
                 case 'upload_invalid_filetype':
                     H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('文件类型无效')));
                     break;
             }
         }
         $upload_data = AWS_APP::upload()->data();
         if (!$upload_data) {
             H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('上传失败, 请与管理员联系')));
         }
         foreach (AWS_APP::config()->get('image')->slide_thumbnail as $key => $val) {
             $thumb_file[$key] = $upload_data['file_path'] . $id . "-" . $key . '.jpg';
             AWS_APP::image()->initialize(array('quality' => 90, 'source_image' => $upload_data['full_path'], 'new_image' => $thumb_file[$key], 'width' => $val['w'], 'height' => $val['h']))->resize();
         }
         @unlink($upload_data['full_path']);
     }
     H::ajax_json_output(AWS_APP::RSM(array('url' => get_js_url('/admin/slide/list/')), 1, null));
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:47,代码来源:slide.php


示例18: follow_people_action

 public function follow_people_action()
 {
     if (!$_POST['uid'] or $_POST['uid'] == $this->user_id) {
         die;
     }
     // 首先判断是否存在关注
     if ($this->model('follow')->user_follow_check($this->user_id, $_POST['uid'])) {
         $action = 'remove';
         $this->model('follow')->user_follow_del($this->user_id, $_POST['uid']);
     } else {
         $action = 'add';
         $this->model('follow')->user_follow_add($this->user_id, $_POST['uid']);
         $this->model('notify')->send($this->user_id, $_POST['uid'], notify_class::TYPE_PEOPLE_FOCUS, notify_class::CATEGORY_PEOPLE, $this->user_id, array('from_uid' => $this->user_id));
         $this->model('email')->action_email('FOLLOW_ME', $_POST['uid'], get_js_url('/people/' . $this->user_info['url_token']), array('user_name' => $this->user_info['user_name']));
     }
     H::ajax_json_output(AWS_APP::RSM(array('type' => $action), 1, null));
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:17,代码来源:ajax.php


示例19: format_js_topics_ul_output

 public function format_js_topics_ul_output($ul_class, $data)
 {
     $output = '<ul class="' . $ul_class . '">';
     if ($data) {
         foreach ($data as $key => $val) {
             /***
             					话题图片调用:get_topic_pic_url($val['uid'], $val['topic_pic'])
             
             					$val['topic_description'] - 话题简介
             					$val['discuss_count'] - 讨论数量
             				***/
             $output .= '<li><a href="' . get_js_url('/topic/' . $val['url_token']) . '" target="_blank">' . $val['topic_title'] . '</a></li>';
         }
     }
     $output .= '</ul>';
     return "document.write('" . addcslashes($output, "'") . "');";
 }
开发者ID:avldya,项目名称:wecenter,代码行数:17,代码来源:aws_external.php


示例20: receiving_list_action

 public function receiving_list_action()
 {
     $this->crumb(AWS_APP::lang()->_t('邮件导入'), "admin/edm/receiving_list");
     $receiving_email_list = $this->model('edm')->fetch_page('receiving_email_config', null, null, $_GET['page'], $this->per_page);
     $total_rows = $this->model('edm')->found_rows();
     if ($receiving_email_list) {
         foreach ($receiving_email_list as $receiving_email_config) {
             $uids[] = $receiving_email_config['uid'];
         }
         $users_info = $this->model('account')->get_user_info_by_uids($uids);
         TPL::assign('users_info', $users_info);
     }
     TPL::assign('receiving_email_list', $receiving_email_list);
     TPL::assign('accounts_total', $total_rows);
     TPL::assign('pagination', AWS_APP::pagination()->initialize(array('base_url' => get_js_url('/admin/edm/receiving_list/'), 'total_rows' => $total_rows, 'per_page' => $this->per_page))->create_links());
     TPL::assign('menu_list', $this->model('admin')->fetch_menu_list(807));
     TPL::output('admin/edm/receiving_list');
 }
开发者ID:egogg,项目名称:wecenter-dev,代码行数:18,代码来源:edm.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_json函数代码示例发布时间:2022-05-15
下一篇:
PHP get_js_open_window函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap