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

PHP fHeader函数代码示例

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

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



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

示例1: unBind

 public function unBind()
 {
     global $_FANWE;
     if ($_FANWE['uid'] > 0) {
         FDB::delete('user_bind', "uid = " . $_FANWE['uid'] . " AND type = 'sina'");
     }
     fHeader("location: " . FU('settings/bind'));
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:8,代码来源:sina.php


示例2: cate

 public function cate()
 {
     global $_FANWE;
     $category = urldecode($_FANWE['request']['cate']);
     if (!isset($_FANWE['cache']['goods_category']['cate_code'][$category])) {
         fHeader('location: ' . FU('book/shopping'));
     }
     BookModule::getList();
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:9,代码来源:book.module.php


示例3: jumpUserBindReg

 public function jumpUserBindReg($data, $user_name)
 {
     do {
         $max_count = FDB::resultFirst('SELECT COUNT(*) FROM ' . FDB::table("user") . " WHERE user_name = '" . $user_name . "'");
         if ($max_count > 0) {
             $user_name = $user_name . '_' . random(3);
         }
     } while ($max_count > 0);
     $data['user_name'] = $user_name;
     $data = serialize($data);
     fSetCookie('bind_user_info', authcode($data, 'ENCODE'));
     fHeader("location:" . FU('user/bind'));
 }
开发者ID:yakrsa,项目名称:football,代码行数:13,代码来源:userbase.class.php


示例4: all

 public function all()
 {
     define("ACTION_NAME", "all");
     require fimport('function/user');
     require fimport("function/share");
     if (intval($GLOBALS['fanwe']->var['uid']) == 0) {
         fHeader("location: " . FU('user/login'));
     }
     global $_FANWE;
     $list_html = getAllList();
     include template('page/home');
     display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:13,代码来源:home.module.php


示例5: unBind

 public function unBind()
 {
     global $_FANWE;
     if ($_FANWE['uid'] > 0) {
         FDB::delete('user_bind', "uid = " . $_FANWE['uid'] . " AND type = 'taobao'");
         $update = array();
         $update['buyer_level'] = 0;
         $update['seller_level'] = 0;
         $update['is_buyer'] = 0;
         FDB::update('user', $update, 'uid = ' . $_FANWE['uid']);
     }
     $redirect_uri = urlencode($_FANWE['site_url'] . substr(FU('settings/bind'), 1));
     $url = "https://oauth.taobao.com/logoff?client_id=" . $this->config['app_key'] . "&redirect_uri=" . $redirect_uri;
     fHeader("location: " . $url);
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:15,代码来源:taobao.php


示例6: show

 public function show()
 {
     global $_FANWE;
     $adv_id = intval($_FANWE['request']['id']);
     $adv = FDB::fetchFirst('SELECT url FROM ' . FDB::table('adv') . ' WHERE id = ' . $adv_id . ' AND status = 1');
     if ($adv) {
         if (!empty($adv['url'])) {
             fHeader('Location:' . $adv['url']);
         } else {
             fHeader('Location:./');
         }
     } else {
         fHeader('Location:./');
     }
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:15,代码来源:adv.module.php


示例7: show

    public function show()
    {
        global $_FANWE;
        $id = (int) $_FANWE['request']['id'];
        if (!$id) {
            exit;
        }
        $shop = FDB::fetchFirst('SELECT * FROM ' . FDB::table('shop') . ' WHERE shop_id = ' . $id);
        if (!$shop) {
            fHeader("location: " . FU('shop/index'));
        }
        $_FANWE['nav_title'] = $shop['shop_name'] . ' - ' . $_FANWE['nav_title'];
        $cache_data = fStripslashes(unserialize($shop['data']));
        $shop['tags'] = $cache_data['tags'];
        if (empty($shop['taoke_url'])) {
            $shop['to_url'] = FU('tgo', array('url' => $shop['shop_url']));
        } else {
            $shop['to_url'] = FU('tgo', array('url' => $shop['taoke_url']));
        }
        $page_args['id'] = $id;
        $sql = 'SELECT COUNT(DISTINCT sg.share_id) FROM ' . FDB::table('share_goods') . ' AS sg 
			INNER JOIN ' . FDB::table('share') . ' AS s ON s.share_id = sg.share_id 
			WHERE s.status = 1 AND sg.shop_id = ' . $id;
        $share_count = FDB::resultFirst($sql);
        $page_size = 20;
        $pager = buildPage('shop/show', $page_args, $share_count, $_FANWE['page'], $page_size);
        $share_ids = array();
        $sql = 'SELECT DISTINCT sg.share_id FROM ' . FDB::table('share_goods') . ' AS sg 
			INNER JOIN ' . FDB::table('share') . ' AS s ON s.share_id = sg.share_id 
			WHERE s.status = 1 AND sg.shop_id = ' . $id . ' ORDER BY sg.share_id DESC LIMIT ' . $pager['limit'];
        $res = FDB::query($sql);
        while ($data = FDB::fetch($res)) {
            $share_ids[] = $data['share_id'];
        }
        $share_list = array();
        if (count($share_ids) > 0) {
            $share_ids = implode(',', $share_ids);
            $sql = 'SELECT * FROM ' . FDB::table('share') . ' WHERE share_id IN (' . $share_ids . ') ORDER BY share_id DESC';
            $share_list = FDB::fetchAll($sql);
            $share_list = FS('Share')->getShareDetailList($share_list, false, true, true, false, 0, 10);
        }
        $shops_tags = FS('Shop')->getUserOtherShopAndTags($id);
        include template('page/shop/shop_show');
        display();
    }
开发者ID:dalinhuang,项目名称:concourse,代码行数:45,代码来源:shop.module.php


示例8: u

 public function u()
 {
     global $_FANWE;
     $_FANWE['nav_title'] = lang('common', 'user_medal');
     $medal_uid = (int) $_FANWE['request']['uid'];
     if ($medal_uid > 0) {
         $medal_names = FS('User')->getUserShowName($medal_uid);
     } else {
         fHeader("location: " . FU('medal/index'));
     }
     $medal_list = array();
     $award_list = FS('Medal')->getAwardsByUid($medal_uid);
     foreach ($award_list as $mid => $award) {
         $medal_list[] = $_FANWE['cache']['medals']['all'][$mid];
     }
     if ($_FANWE['uid'] > 0 && count($medal_list) > 0) {
         FS('Medal')->medalFormat($_FANWE['uid'], $medal_list);
     }
     include template('page/medal/medal_index');
     display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:21,代码来源:medal.module.php


示例9: index

 public function index()
 {
     global $_FANWE;
     if ($_FANWE['uid'] == 0) {
         fHeader("location: " . FU('user/login', array('refer' => FU('invite/index'))));
     }
     FanweService::instance()->cache->loadCache('medals');
     $medal_list = array();
     foreach ($_FANWE['cache']['medals']['referrals'] as $id) {
         $medal = $_FANWE['cache']['medals']['all'][$id];
         $medal_list[] = $medal;
     }
     $invite_title = $_FANWE['setting']['site_title'];
     $invite_content = lang('invite', 'invite_content');
     $invite_content = sprintf($invite_content, $_FANWE['setting']['site_name']);
     $invite_url = $_FANWE['site_url'] . '?invite=' . $_FANWE['uid'];
     $invite_types = array('kaixin', 'renren', 'sina', 'tqq', 'douban', 'qzone', 'baidu');
     $invite_pic = $_FANWE['site_url'] . $_FANWE['setting']['site_logo'];
     $sns_links = getSnsLink($invite_types, $invite_title, $invite_url, $invite_content, $invite_pic);
     include template('page/invite/invite_index');
     display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:22,代码来源:invite.module.php


示例10: show

    private function show($current_type = '')
    {
        global $_FANWE;
        $share_id = intval($_FANWE['request']['sid']);
        $id = intval($_FANWE['request']['id']);
        $share_detail = FS('Share')->getShareDetail($share_id);
        include fimport('dynamic/u');
        if ($share_detail === false) {
            fHeader("location: " . FU('index'));
        }
        $page_title = preg_replace("/\\[[^\\]]+\\]/i", "", $share_detail['content']);
        $_FANWE['nav_title'] = $page_title . ' - ' . lang('common', 'share');
        $_FANWE['seo_description'] = $page_title;
        $_FANWE['setting']['site_description'] = '';
        $current_img = FDB::resultFirst("select img from " . FDB::table("share_photo") . " where share_id = " . $share_id . " and img <> '' ");
        if ($current_img['img_width'] > 468) {
            $current_img['img_width'] = 468;
        }
        $current_img_arr = FDB::fetchFirst("select * from " . FDB::table("share_photo") . " where share_id = " . $share_id . " and img <> '' ");
        //var_dump($current_img_arr);
        FDB::query('UPDATE ' . FDB::table('share') . ' SET click_count = click_count + 1 WHERE share_id = ' . $share_id);
        //上一个,下一个分享
        $pns = FS('Share')->getSameAlbumNextShares($share_detail['uid'], $share_id);
        $other_album_share = FS('share')->getSameAlbumShares($share_id);
        $current_location = $other_album_share['location'];
        unset($other_album_share['location']);
        $same_album_count = $other_album_share['count'];
        unset($other_album_share['count']);
        $aid = FDB::resultFirst("select album_id from " . FDB::table('album_share') . " where share_id = " . $share_id);
        $album_sql = 'select al.id as id,al.title as title from ' . FDB::table('album') . ' as al 
					 left join ' . FDB::table('album_share') . ' as als on al.id = als.album_id 
					 where als.share_id = ' . $share_id;
        $album_data = FDB::fetchFirst($album_sql);
        $is_follow_album = FS('album')->getIsFollow($aid, $_FANWE['uid']);
        //发布分享的会员
        $share_user = FS('User')->getUserById($share_detail['uid']);
        //喜欢分享的会员
        $share_detail['collects'] = FS('Share')->getShareCollectUser($share_id);
        if (!isset($share_detail['collects'][$_FANWE['uid']])) {
            if (FS('Share')->getIsCollectByUid($share_id, $_FANWE['uid'])) {
                $share_detail['collects'][$_FANWE['uid']] = $_FANWE['uid'];
            }
        }
        //会员显示名称
        $user_show_name = FS('User')->getUserShowName($share_detail['uid']);
        //会员勋章
        $user_medals = FS('User')->getUserMedal($share_detail['uid']);
        //分享标签
        $share_tags = $share_detail['cache_data']['tags']['user'];
        FS('Share')->tagsFormat($share_tags);
        foreach ($share_tags as $seo_tag) {
            $_FANWE['seo_keywords'] .= $seo_tag['tag_name'] . ',';
        }
        //是否可编辑标签
        $is_eidt_tag = FS('Share')->getIsEditTag($share_detail);
        //喜欢分享的会员还喜欢
        $fav_user_fav_share = FS('Share')->getCollectShareByShare($share_id);
        //发布分享的会员喜欢的分享
        $user_collect_share = FS('Share')->getCollectShareByUser($share_user['uid']);
        //是否可删除标签
        $is_remove_comment = FS('Share')->getIsRemoveComment($share_detail);
        //分享评论
        $share_detail['comments'] = FS('Share')->getShareCommentList($share_id, '0,10');
        //分享评论分页
        $pager = buildPage('', array(), $share_detail['comment_count'], $_FANWE['page'], 10);
        unset($share_detail['cache_data']);
        $current_obj = NULL;
        if ($current_type == '' || $id == 0) {
            if (!empty($share_detail['imgs'])) {
                $current_obj = current($share_detail['imgs']);
                if ($current_obj['type'] == 'g') {
                    $current_type = 'bao';
                } else {
                    $current_type = 'photo';
                }
            }
        } else {
            switch ($current_type) {
                case 'bao':
                    foreach ($share_detail['imgs'] as $img) {
                        $current_obj = $img;
                        if ($img['type'] == 'g' && $img['id'] == $id) {
                            break;
                        }
                    }
                    break;
                case 'photo':
                    foreach ($share_detail['imgs'] as $img) {
                        $current_obj = $img;
                        if ($img['type'] == 'm' && $img['id'] == $id) {
                            break;
                        }
                    }
                    break;
            }
        }
        if (!empty($current_obj['name'])) {
            $_FANWE['nav_title'] = $current_obj['name'] . ' - ' . lang('common', 'share');
        }
        $current_img_id = FDB::resultFirst("select photo_id from " . FDB::table("share_photo") . " where share_id = " . $share_id);
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:101,代码来源:note.module.php


示例11: getQqAccessToken

<?php

include "base.php";
require_once FANWE_ROOT . "sdks/qq/qq.func.php";
$appid = $_FANWE['cache']['logins']['qq']['app_key'];
$appkey = $_FANWE['cache']['logins']['qq']['app_secret'];
$access_token = getQqAccessToken($appid, $appkey);
$openid = getQqOpenid($access_token);
require_once FANWE_ROOT . "core/class/user/qq.class.php";
$qq = new QqUser();
switch ($callback_type) {
    case 'login':
        $qq->loginHandler($access_token, $openid);
        $url = FU('u/index');
        break;
    case 'bind':
        $qq->bindHandler($access_token, $openid);
        $url = FU('settings/bind');
        break;
}
fSetCookie('callback_type', '');
fHeader("location:" . $url);
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:22,代码来源:qq.php


示例12: unBuyerverifier

 public function unBuyerverifier()
 {
     global $_FANWE;
     $uid = $_FANWE['uid'];
     $data['is_buyer'] = -1;
     FDB::update('user', $data, "uid = {$uid}");
     fHeader("location: " . FU('settings/buyerverifier'));
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:8,代码来源:settings.module.php


示例13: elseif

} elseif (in_array($action, array('exchange'))) {
    if ($home_uid != $_FANWE['uid']) {
        fHeader("location: " . FU('u/exchange', array('uid' => $_FANWE['uid'])));
    }
} elseif (in_array($action, array('atme'))) {
    if ($home_uid != $_FANWE['uid']) {
        fHeader("location: " . FU('u/atme', array('uid' => $_FANWE['uid'])));
    }
} elseif (in_array($action, array('message', 'sendmsg', 'msgview', 'exchange'))) {
    if ($home_uid != $_FANWE['uid']) {
        fHeader("location: " . FU('u/message', array('uid' => $_FANWE['uid'])));
    }
}
$_FANWE['home_uid'] = $home_uid;
$_FANWE['home_user_names'] = FS('User')->getUserShowName($home_uid);
$home_user = FS('User')->getUserById($home_uid);
if (empty($home_user)) {
    fHeader("location: " . FU('index/index'));
}
$_FANWE['nav_title'] = $home_user['user_name'] . lang('common', 'space');
require fimport('module/u');
if (class_exists("UModule")) {
    $module = new UModule();
    if (method_exists($module, $action)) {
        call_user_method($action, $module);
    } else {
        die("error access");
    }
} else {
    die("error access");
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:31,代码来源:u.php


示例14: logout

 public function logout()
 {
     global $_FANWE;
     $_FANWE['nav_title'] = lang('common', 'user_logout');
     FS('User')->clearSession();
     //====add by chenfq 2011-10-14=========
     $syslogout_js = FS("Integrate")->synLogout();
     //js 需要在前台执行
     //echo $syslogout_js; exit;
     if (!empty($syslogout_js)) {
         fSetCookie("dynamic_script", $syslogout_js);
     }
     fHeader("location: " . FU('index/index'));
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:14,代码来源:user.module.php


示例15: show

 private function show($current_type = '')
 {
     global $_FANWE;
     $share_id = intval($_FANWE['request']['sid']);
     $id = intval($_FANWE['request']['id']);
     $share_detail = FS('Share')->getShareDetail($share_id);
     include fimport('dynamic/u');
     if ($share_detail === false) {
         fHeader("location: " . FU('index'));
     }
     $page_title = preg_replace("/\\[[^\\]]+\\]/i", "", $share_detail['content']);
     $_FANWE['nav_title'] = $page_title . ' - ' . lang('common', 'share');
     $_FANWE['seo_description'] = $page_title;
     $_FANWE['setting']['site_description'] = '';
     FDB::query('UPDATE ' . FDB::table('share') . ' SET click_count = click_count + 1 WHERE share_id = ' . $share_id);
     //上一个,下一个分享
     //$pns = FS('Share')->getPrevNextShares($share_detail['uid'],$share_id);
     //发布分享的会员
     $share_user = FS('User')->getUserById($share_detail['uid']);
     //喜欢分享的会员
     $share_detail['collects'] = FS('Share')->getShareCollectUser($share_id);
     if (!isset($share_detail['collects'][$_FANWE['uid']])) {
         if (FS('Share')->getIsCollectByUid($share_id, $_FANWE['uid'])) {
             $share_detail['collects'][$_FANWE['uid']] = $_FANWE['uid'];
         }
     }
     //会员显示名称
     $user_show_name = FS('User')->getUserShowName($share_detail['uid']);
     //会员勋章
     $user_medals = FS('User')->getUserMedal($share_detail['uid']);
     //分享标签
     $share_tags = $share_detail['cache_data']['tags']['user'];
     FS('Share')->tagsFormat($share_tags);
     foreach ($share_tags as $seo_tag) {
         $_FANWE['seo_keywords'] .= $seo_tag['tag_name'] . ',';
     }
     //是否可编辑标签
     $is_eidt_tag = FS('Share')->getIsEditTag($share_detail);
     //喜欢分享的会员还喜欢
     $fav_user_fav_share = FS('Share')->getCollectShareByShare($share_id);
     //发布分享的会员喜欢的分享
     $user_collect_share = FS('Share')->getCollectShareByUser($share_user['uid']);
     //是否可删除标签
     $is_remove_comment = FS('Share')->getIsRemoveComment($share_detail);
     //分享评论
     $share_detail['comments'] = FS('Share')->getShareCommentList($share_id, '0,10');
     //分享评论分页
     $pager = buildPage('', array(), $share_detail['comment_count'], $_FANWE['page'], 10);
     unset($share_detail['cache_data']);
     $current_obj = NULL;
     if ($current_type == '' || $id == 0) {
         if (!empty($share_detail['imgs'])) {
             $current_obj = current($share_detail['imgs']);
             if ($current_obj['type'] == 'g') {
                 $current_type = 'bao';
             } else {
                 $current_type = 'photo';
             }
         }
     } else {
         switch ($current_type) {
             case 'bao':
                 foreach ($share_detail['imgs'] as $img) {
                     $current_obj = $img;
                     if ($img['type'] == 'g' && $img['id'] == $id) {
                         break;
                     }
                 }
                 break;
             case 'photo':
                 foreach ($share_detail['imgs'] as $img) {
                     $current_obj = $img;
                     if ($img['type'] == 'm' && $img['id'] == $id) {
                         break;
                     }
                 }
                 break;
         }
     }
     if (!empty($current_obj['name'])) {
         $_FANWE['nav_title'] = $current_obj['name'] . ' - ' . lang('common', 'share');
     }
     switch ($current_type) {
         case 'bao':
             //会员最被喜欢的宝贝
             $best_goods_share = FS('Share')->getBestCollectGoodsShareByUser($share_user['uid']);
             //会员分享店铺信息
             $shop_percent_html = FS('Shop')->getUserShareShopHtml($share_user['uid']);
             break;
         case 'photo':
             //会员最被喜欢的照片
             $best_photo_share = FS('Share')->getBestCollectPhotoShareByUser($share_user['uid']);
             //会员喜欢的照片
             $user_fav_photo = FS('Share')->getUserFavPhotoShare($share_user['uid']);
             break;
         default:
             //获取原文分享
             $share_detail['is_relay'] = false;
             $share_detail['is_rec'] = false;
             if ($share_detail['parent_id'] > 0 && $share_detail['base_id'] > 0) {
//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:concourse,代码行数:101,代码来源:note.module.php


示例16: save

    public function save()
    {
        global $_FANWE;
        if ($_FANWE['uid'] == 0) {
            fHeader("location: " . FU('user/login'));
        }
        if ($_FANWE['setting']['second_status'] == 0) {
            fHeader("location: " . FU('index'));
        }
        if (!isset($_FANWE['request']['pics']) || !is_array($_FANWE['request']['pics']) || count($_FANWE['request']['pics']) == 0) {
            exit;
        }
        $data = array('name' => trim($_FANWE['request']['title']), 'content' => trim($_FANWE['request']['content']), 'sid' => (int) $_FANWE['request']['sid'], 'num' => (int) $_FANWE['request']['num'], 'price' => (double) $_FANWE['request']['price'], 'transport_fee' => (double) $_FANWE['request']['fare'], 'valid_time' => (int) $_FANWE['request']['valid_time']);
        $vservice = FS('Validate');
        $validate = array(array('name', 'required', lang('second', 'name_require')), array('name', 'max_length', lang('second', 'name_max'), 40), array('content', 'required', lang('second', 'content_require')), array('content', 'max_length', lang('second', 'content_max'), 1000), array('sid', 'min', lang('second', 'sid_min'), 1), array('num', 'range', lang('second', 'num_range'), 1, 3), array('price', 'min', lang('second', 'price_min'), 0.01), array('transport_fee', 'min', lang('second', 'fee_min'), 0), array('valid_time', 'range', lang('second', 'valid_time_range'), 2, 30));
        if (!$vservice->validation($validate, $data)) {
            exit;
        }
        if (!isset($_FANWE['cache']['seconds'][$data['sid']])) {
            exit;
        }
        if (!checkIpOperation("add_share", SHARE_INTERVAL_TIME)) {
            showError('提交失败', lang('share', 'interval_tips'), -1);
        }
        $check_result = FS('Share')->checkWord($_FANWE['request']['content'], 'content');
        if ($check_result['error_code'] == 1) {
            showError('提交失败', $check_result['error_msg'], -1);
        }
        $check_result = FS('Share')->checkWord($_FANWE['request']['title'], 'title');
        if ($check_result['error_code'] == 1) {
            showError('提交失败', $check_result['error_msg'], -1);
        }
        $_FANWE['request']['uid'] = $_FANWE['uid'];
        $_FANWE['request']['type'] = 'ershou';
        $share = FS('Share')->submit($_FANWE['request']);
        if ($share['status']) {
            $data['name'] = htmlspecialchars($_FANWE['request']['title']);
            $data['content'] = htmlspecialchars($_FANWE['request']['content']);
            $data['uid'] = $_FANWE['uid'];
            $data['share_id'] = $share['share_id'];
            $data['city_id'] = $_FANWE['user']['reside_province'];
            $data['valid_time'] = getTodayTime() + 86400 * $data['valid_time'];
            $data['create_time'] = TIME_UTC;
            $data['status'] = 0;
            $gid = FDB::insert('second_goods', $data, true);
            $sign = md5($gid . $_FANWE['setting']['second_taobao_sign']);
            FDB::query('UPDATE ' . FDB::table('second_goods') . ' SET sign = \'' . $sign . '\' WHERE gid = ' . $gid);
            FDB::query('UPDATE ' . FDB::table('share') . ' SET rec_id = ' . $gid . ' 
				WHERE share_id = ' . $share['share_id']);
            FDB::query("update " . FDB::table("user_count") . " set seconds = seconds + 1 where uid = " . $_FANWE['uid']);
            FS('Medal')->runAuto($_FANWE['uid'], 'seconds');
            $url = "http://communityweb.alipay.com/dispatch.htm?type=exGuarantee&forumId=" . $_FANWE['setting']['second_taobao_forumid'] . "&exId=" . $gid . "&userIP=" . $_FANWE['client_ip'] . "&userIPSign=" . md5($_FANWE['client_ip'] . $_FANWE['setting']['second_taobao_sign']);
            fHeader('location: ' . $url);
        } else {
            showError('提交失败', '添加数据失败', -1);
        }
    }
开发者ID:dalinhuang,项目名称:concourse,代码行数:57,代码来源:second.module.php


示例17: msgview

 public function msgview()
 {
     global $_FANWE;
     $home_uid = $_FANWE['uid'];
     $home_user = FS('User')->getUserById($home_uid);
     $current_menu = 'message';
     $mlid = intval($_FANWE['request']['lid']);
     $mid = intval($_FANWE['request']['mid']);
     if ($mlid == 0 && $mid == 0) {
         fHeader("location: " . FU('u/message', array('uid' => $_FANWE['uid'])));
     }
     $pageargs = array();
     if ($mlid > 0) {
         $pageargs['lid'] = $mlid;
         $mlist = FS('Message')->getListByMlid($mlid, $_FANWE['uid']);
         if (empty($mlist)) {
             fHeader("location: " . FU('u/message', array('uid' => $_FANWE['uid'])));
         }
         $pager = buildPage('u/' . ACTION_NAME, $pageargs, $mlist['num'], $_FANWE['page'], 10);
         $msg_list = FS('Message')->getMsgsByMlid($mlid, $_FANWE['uid'], $pager['limit']);
         include template('page/u/u_msgview');
     } elseif ($mid) {
         $msg = FS('Message')->getSysMsgByMid($_FANWE['uid'], $mid);
         include template('page/u/u_smsgview');
     }
     display();
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:27,代码来源:u.module.php


示例18: save

    public function save()
    {
        global $_FANWE;
        if ($_FANWE['uid'] == 0) {
            fHeader("location: " . FU('user/login'));
        }
        $id = (int) $_FANWE['request']['id'];
        if ($id > 0) {
            $album = FS("Album")->getAlbumById($id);
            if (empty($album) || $album['uid'] != $_FANWE['uid']) {
                fHeader("location: " . FU('album'));
            }
        }
        $data = array('title' => trim($_FANWE['request']['title']), 'content' => trim($_FANWE['request']['content']), 'cid' => (int) $_FANWE['request']['cid'], 'show_type' => (int) $_FANWE['request']['show_type'], 'tags' => trim($_FANWE['request']['tags']));
        $vservice = FS('Validate');
        $validate = array(array('title', 'required', lang('album', 'name_require')), array('title', 'max_length', lang('album', 'name_max'), 60), array('content', 'max_length', lang('album', 'content_max'), 1000), array('cid', 'min', lang('album', 'cid_min'), 1), array('show_type', 'min', lang('album', 'show_type_min'), 1));
        if (!$vservice->validation($validate, $data)) {
            exit($vservice->getError());
        }
        if (!isset($_FANWE['cache']['albums']['category'][$data['cid']])) {
            exit;
        }
        if (!checkIpOperation("add_share", SHARE_INTERVAL_TIME)) {
            showError('提交失败', lang('share', 'interval_tips'), -1);
        }
        $check_result = FS('Share')->checkWord($_FANWE['request']['title'], 'title');
        if ($check_result['error_code'] == 1) {
            showError('提交失败', $check_result['error_msg'], -1);
        }
        $check_result = FS('Share')->checkWord($_FANWE['request']['content'], 'content');
        if ($check_result['error_code'] == 1) {
            showError('提交失败', $check_result['error_msg'], -1);
        }
        $check_result = FS('Share')->checkWord($_FANWE['request']['tags'], 'tag');
        if ($check_result['error_code'] == 1) {
            showError('提交失败', $check_result['error_msg'], -1);
        }
        $tags = str_replace('***', '', $_FANWE['request']['tags']);
        $tags = str_replace(' ', ' ', $tags);
        $tags = explode(' ', $tags);
        $tags = array_unique($tags);
        if (count($tags) > $_FANWE['cache']['albums']['setting']['album_tag_count']) {
            exit;
        }
        if ($id > 0) {
            $data['title'] = htmlspecialchars($_FANWE['request']['title']);
            $data['content'] = htmlspecialchars($_FANWE['request']['content']);
            $data['tags'] = implode(' ', $tags);
            FDB::update('album', $data, 'id = ' . $id);
            FS('Share')->updateShare($album['share_id'], $data['title'], $data['content']);
            FS("Album")->saveTags($id, $tags);
            if ($data['cid'] != $album['cid']) {
                FDB::query('UPDATE ' . FDB::table("album_share") . ' SET cid = ' . $data['cid'] . ' WHERE album_id = ' . $id);
            }
            $url = FU('album/show', array('id' => $id));
            fHeader('location: ' . $url);
            exit;
        }
        $_FANWE['request']['uid'] = $_FANWE['uid'];
        $_FANWE['request']['type'] = 'album';
        $share = FS('Share')->submit($_FANWE['request']);
        if ($share['status']) {
            $data['title'] = htmlspecialchars($_FANWE['request']['title']);
            $data['content'] = htmlspecialchars($_FANWE['request']['content']);
            $data['tags'] = implode(' ', $tags);
            $data['uid'] = $_FANWE['uid'];
            $data['share_id'] = $share['share_id'];
            $data['create_day'] = getTodayTime();
            $data['create_time'] = TIME_UTC;
            $aid = FDB::insert('album', $data, true);
            FS("Album")->saveTags($aid, $tags);
            FDB::query('UPDATE ' . FDB::table('share') . ' SET rec_id = ' . $aid . ' 
				WHERE share_id = ' . $share['share_id']);
            FDB::query("update " . FDB::table("user_count") . " set albums = albums + 1 where uid = " . $_FANWE['uid']);
            FS('Medal')->runAuto($_FANWE['uid'], 'albums');
            $url = FU('album/show', array('id' => $aid));
            fHeader('location: ' . $url);
        } else {
            showError('提交失败', '添加数据失败', -1);
        }
    }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:81,代码来源:album.module.php


示例19: listdetail

    public function listdetail()
    {
        global $_FANWE;
        if (!isset($_FANWE['request']['type'])) {
            $type = "hot";
        } else {
            $type = $_FANWE['request']['type'];
        }
        $page_args = array();
        $where = "";
        if (!isset($_FANWE['request']['order'])) {
            $order = "time";
        } else {
            $order = $_FANWE['request']['order'];
        }
        switch ($order) {
            case "time":
                $sort = 'e.last_share DESC';
                $page_args['sort'] = 'time';
                break;
            case "thread_count":
                $sort = 'e.thread_count DESC';
                $page_args['sort'] = 'pop';
                break;
        }
        $is_query = true;
        switch ($type) {
            case "new":
                $sort = 'e.id DESC';
                unset($page_args['sort']);
                break;
            case "me":
                if ($_FANWE['uid'] == 0) {
                    fHeader("location: " . FU('user/login'));
                }
                $where .= ' AND e.uid = ' . $_FANWE['uid'];
                break;
            case "reply":
                if ($_FANWE['uid'] == 0) {
                    fHeader("location: " . FU('user/login'));
                }
                $count = FDB::resultFirst('SELECT COUNT(DISTINCT event_id) FROM ' . FDB::table('event_share') . ' WHERE uid = ' . $_FANWE['uid']);
                if ($count == 0) {
                    $is_query = false;
                } else {
                    $sql = 'SELECT DISTINCT event_id FROM ' . FDB::table('event_share') . ' 
						WHERE uid = ' . $_FANWE['uid'];
                    $ids = array();
                    $res = FDB::query($sql);
                    while ($data = FDB::fetch($res)) {
                        $ids[] = $data['event_id'];
                    }
                    $ids = implode(',', $ids);
                    $where .= ' AND e.id IN (' . $ids . ')';
                }
                break;
            default:
                $sort = 'e.thread_count DESC';
                unset($page_args['sort']);
                $type = "hot";
                break;
        }
        if (!empty($where)) {
            $where = ' WHERE' . $where;
            $where = str_replace('WHERE AND', 'WHERE', $where);
        }
        $detaillist = array();
        if ($is_query) {
            if ($type != 'reply') {
                $count = FDB::resultFirst('SELECT COUNT(DISTINCT e.id) FROM ' . FDB::table('event') . ' AS e' . $where);
            }
            $pager = buildPage('event/' . ACTION_NAME, $page_args, $count, $_FANWE['page'], 20);
            if (empty($sort)) {
                $sort = 'e.id DESC';
            } else {
                $sort .= ',e.id DESC';
            }
            $sql = 'SELECT DISTINCT e.id,e.title,e.uid,e.create_time,e.last_share,e.last_share time,e.thread_count FROM ' . FDB::table('event') . ' AS e' . $where . ' ORDER BY ' . $sort . ' LIMIT ' . $pager['limit'];
            $list_users = array();
            $res = FDB::query($sql);
            while ($data = FDB::fetch($res)) {
                $detaillist[$data['id']] = $data;
                $detaillist[$data['id']]['user'] =& $list_users[$data['uid']];
            }
            FS('User')->usersFormat($list_users);
        }
        //热门话题
        $hot_event_list = FS("event")->getHotEvent(10);
        if (intval($_FANWE['uid']) > 0) {
            //我发布的
            $me_event_list = FS("event")->getUserEvent($_FANWE['uid'], 5);
            //我参与的
            $me_join_event_list = FS("event")->getUserJoinevent($_FANWE['uid'], 5);
        }
        include template('page/event/event_list');
        display();
    }
开发者ID:dalinhuang,项目名称:concourse,代码行数:97,代码来源:event.module.php


示例20: delete

 public function delete()
 {
     if (intval($GLOBALS['fanwe']->var['uid']) == 0) {
         fHeader("location: " . FU('user/login'));
     }
     $id = $_REQUEST['id'];
     FDB::query("delete from " . FDB::table("user_msg_rel") . " where mid in (" . $id . ")");
     FDB::query("delete from " . FDB::table("user_msg") . " where mid in (" . $id . ") and author_id > 0");
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:9,代码来源:message.module.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fInput函数代码示例发布时间:2022-05-15
下一篇:
PHP fEnd函数代码示例发布时间: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