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


PHP GetCurUrl函数代码示例

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


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

示例1: CheckRank

function CheckRank($rank = 0, $money = 0)
{
    global $cfg_ml, $cfg_memberurl;
    if (!$cfg_ml->IsLogin()) {
        header("Location:{$cfg_memberurl}/login.php?gourl=" . urlencode(GetCurUrl()));
        exit;
    } else {
        if ($cfg_ml->M_Rank < $rank) {
            $needname = "";
            if ($cfg_ml->M_Rank == 0) {
                $row = $dsql->GetOne("Select membername From #@__arcrank where rank='{$rank}'");
                $myname = "普通会员";
                $needname = $row['membername'];
            } else {
                $dsql->SetQuery("Select membername From #@__arcrank where rank='{$rank}' Or rank='" . $cfg_ml->M_Rank . "' order by rank desc");
                $dsql->Execute();
                $row = $dsql->GetObject();
                $needname = $row->membername;
                if ($row = $dsql->GetObject()) {
                    $myname = $row->membername;
                } else {
                    $myname = "普通会员";
                }
            }
            ShowMsg("对不起,需要:<span style='font-size:11pt;color:red'>{$needname}</span> 才能访问本页面。<br>你目前的等级是:<span style='font-size:11pt;color:red'>{$myname}</span> 。", "-1", 0, 5000);
            exit;
        } else {
            if ($cfg_ml->M_Money < $money) {
                ShowMsg("对不起,需要花费金币:<span style='font-size:11pt;color:red'>{$money}</span> 才能访问本页面。<br>你目前拥有的金币是:<span style='font-size:11pt;color:red'>" . $cfg_ml->M_Money . "</span>  。", "-1", 0, 5000);
                exit;
            }
        }
    }
}
开发者ID:klr2003,项目名称:sourceread,代码行数:34,代码来源:config.php

示例2: slide

 function slide()
 {
     parent::__construct();
     $this->style = 'admin';
     //获取url
     $this->currurl = GetCurUrl();
     //载入模型
     $this->answer = $this->Model('askanswer');
     $this->question = $this->Model('mquestion');
 }
开发者ID:healthguo,项目名称:PHP,代码行数:10,代码来源:slide.php

示例3: asktype

 function asktype()
 {
     parent::__construct();
     //获取url
     $this->currurl = GetCurUrl();
     //获取类别
     require_once DEDEASK . '/data/asktype.inc.php';
     $this->asktypes = $asktypes;
     $this->style = 'admin';
     //载入模型
     $this->type = $this->Model('mtype');
 }
开发者ID:healthguo,项目名称:PHP,代码行数:12,代码来源:asktype.php

示例4: CheckRank

/**
 *  检查用户是否有权限进行某个操作
 *
 * @param     int  $rank  权限值
 * @param     int  $money  金币
 * @param     bool  $needinfo  是否需要填写详细信息
 * @return    void
 */
function CheckRank($rank = 0, $money = 0, $needinfo = TRUE)
{
    global $cfg_ml, $cfg_memberurl, $cfg_mb_reginfo, $cfg_mb_spacesta;
    if (!$cfg_ml->IsLogin()) {
        header("Location:{$cfg_memberurl}/login.php?gourl=" . urlencode(GetCurUrl()));
        exit;
    } else {
        if ($cfg_mb_reginfo == 'Y' && $needinfo) {
            //如果启用注册详细信息
            if ($cfg_ml->fields['spacesta'] == 0 || $cfg_ml->fields['spacesta'] == 1) {
                ShowMsg("尚未完成详细资料,请完善...", "{$cfg_memberurl}/index_do.php?fmdo=user&dopost=regnew&step=2", 0, 1000);
                exit;
            }
        }
        if ($cfg_mb_spacesta == '-10') {
            //如果启用注册邮件验证
            if ($cfg_ml->fields['spacesta'] == '-10') {
                $msg = "您尚未进行邮件验证,请到邮箱查阅...</br>重新发送邮件验证 <a href='/member/index_do.php?fmdo=sendMail'><font color='red'>点击此处</font></a>";
                ShowMsg($msg, "-1", 0, 5000);
                exit;
            }
        }
        if ($cfg_ml->M_Rank < $rank) {
            $needname = "";
            if ($cfg_ml->M_Rank == 0) {
                $row = $dsql->GetOne("SELECT membername FROM #@__arcrank WHERE rank='{$rank}'");
                $myname = "普通会员";
                $needname = $row['membername'];
            } else {
                $dsql->SetQuery("SELECT membername From #@__arcrank WHERE rank='{$rank}' OR rank='" . $cfg_ml->M_Rank . "' ORDER BY rank DESC");
                $dsql->Execute();
                $row = $dsql->GetObject();
                $needname = $row->membername;
                if ($row = $dsql->GetObject()) {
                    $myname = $row->membername;
                } else {
                    $myname = "普通会员";
                }
            }
            ShowMsg("对不起,需要:<span style='font-size:11pt;color:red'>{$needname}</span> 才能访问本页面。<br>你目前的等级是:<span style='font-size:11pt;color:red'>{$myname}</span> 。", "-1", 0, 5000);
            exit;
        } else {
            if ($cfg_ml->M_Money < $money) {
                ShowMsg("对不起,需要花费金币:<span style='font-size:11pt;color:red'>{$money}</span> 才能访问本页面。<br>你目前拥有的金币是:<span style='font-size:11pt;color:red'>" . $cfg_ml->M_Money . "</span>  。", "-1", 0, 5000);
                exit;
            }
        }
    }
}
开发者ID:wshudong,项目名称:hbypsy,代码行数:57,代码来源:config.php

示例5: issue

 function issue()
 {
     parent::__construct();
     $this->temp = DEDEAPPTPL . '/admin';
     $this->lurd = new Lurd('#@__ask', $this->temp, $this->temp . '/lurd');
     $this->lurd->appName = "问题管理";
     $this->lurd->isDebug = FALSE;
     //开启调试模式后每次都会生成模板
     $this->lurd->stringSafe = 2;
     //默认1(只限制不安全的HTML[script、frame等],0--为不限,2--为不支持HTML
     //获取url
     $this->currurl = GetCurUrl();
     //载入模型
     $this->question = $this->Model('mquestion');
 }
开发者ID:healthguo,项目名称:PHP,代码行数:15,代码来源:issue.php

示例6: getArticleList

function getArticleList($parm)
{
    if (empty($parm['type_id'])) {
        return;
    }
    $map['type_id'] = $parm['type_id'];
    $Osql = "id DESC";
    $field = "id,title,art_set,art_time,art_url";
    if ($parm["need_content"]) {
        $field .= ",art_content";
    }
    //查询条件
    if ($parm['pagesize']) {
        //分页处理
        import("ORG.Util.Page");
        $count = M('article')->where($map)->count('id');
        $depr = C('URL_PATHINFO_DEPR');
        $cur_url = GetCurUrl();
        if (preg_match("/\\/l\\/([a-zA-z-]+)\\/([\\w\\/]*)\\?l=([a-zA-z-]+)/", $cur_url) === 1) {
            $cur_url = preg_replace("/\\?l=([a-zA-z-]+)/", "", $cur_url);
        }
        $p = new Page($count, $parm['pagesize'], '', preg_replace(array('/.html\\/l\\/([a-zA-z-]+)\\/\\d*/', '/.html\\/\\d+/'), array('.html?l=' . LANG_SET, '.html'), ltrim($cur_url, $depr)));
        $page = $p->show();
        $Lsql = "{$p->firstRow},{$p->listRows}";
        //分页处理
    } else {
        $page = "";
        $Lsql = "{$parm['limit']}";
    }
    $data = M('article')->field($field)->where($map)->order($Osql)->limit($Lsql)->select();
    $suffix = C("URL_HTML_SUFFIX");
    $typefix = get_type_leve_nid($map['type_id']);
    $typeu = implode("/", $typefix);
    foreach ($data as $key => $v) {
        if ($v['art_set'] == 1) {
            $data[$key]['arturl'] = stripos($v['art_url'], "http://") === false ? "http://" . $v['art_url'] : $v['art_url'];
        } else {
            $data[$key]['arturl'] = MU("Home/{$typeu}", "article", array("id" => $v['id'], "suffix" => $suffix));
        }
    }
    $row = array();
    $row['list'] = $data;
    $row['page'] = $page;
    return $row;
}
开发者ID:hutao1004,项目名称:yintt,代码行数:45,代码来源:function.php

示例7: loader

 public static function loader($appid, $file, $url = "")
 {
     global $_G;
     global $_CACHE;
     $cache = VI_ROOT . 'cache/dataset/' . $appid . "/" . $file . ".php";
     if (file_exists($cache)) {
         return require $cache;
     } elseif ($url) {
         if (strrpos($url, "=") > 0 || strrpos($url, "%3d") > 0) {
             $url .= "&jump=" . GetCurUrl();
         } else {
             $url .= "?jump=" . GetCurUrl();
         }
         header("Location:" . VI_BASE . "serve.error.php?action=cache&cache=" . ($id ? $file . "/" . $id : $file) . "&url=" . urlencode($url));
     } else {
         return FALSE;
     }
 }
开发者ID:a195474368,项目名称:ejw,代码行数:18,代码来源:cached.php

示例8: get_openid

function get_openid($openid = NULL)
{
    if ($openid !== NULL) {
        $_SESSION['openid'] = $openid;
    } elseif (!empty($_REQUEST['openid'])) {
        $_SESSION['openid'] = $_REQUEST['openid'];
    }
    if (isset($_SESSION['openid'])) {
        $openid = $_SESSION['openid'];
    }
    $isWeixinBrowser = isWeixinBrowser();
    if ((empty($openid) || $openid == '-1') && $isWeixinBrowser) {
        $callback = GetCurUrl();
        OAuthWeixin($callback);
    }
    if (empty($openid)) {
        return -1;
    }
    return $openid;
}
开发者ID:Rockroc,项目名称:PHP,代码行数:20,代码来源:Function.php

示例9: getPaymentOpenid

 function getPaymentOpenid()
 {
     // echo '444';
     $callback = GetCurUrl();
     if (defined('IN_WEIXIN') && IN_WEIXIN || isset($_GET['is_stree'])) {
         return false;
     }
     $callback = urldecode($callback);
     $isWeixinBrowser = isWeixinBrowser();
     // echo '555';die();
     // $info = get_token_appinfo ( $token );
     if (strpos($callback, '?') === false) {
         $callback .= '?';
     } else {
         $callback .= '&';
     }
     // if (! $isWeixinBrowser || $info ['type'] != 2 || empty ( $info ['appid'] )) {
     // redirect ( $callback . 'openid=-1' );
     // }
     // $map['token'] = get_token();
     // $info=M ( 'payment_set' )->where($map)->find();
     $param['appid'] = $this->payConfig['wxappid'];
     if (!isset($_GET['getOpenId'])) {
         $param['redirect_uri'] = $callback . 'getOpenId=1';
         $param['response_type'] = 'code';
         $param['scope'] = 'snsapi_base';
         $param['state'] = 123;
         $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?' . http_build_query($param) . '#wechat_redirect';
         redirect($url);
     } else {
         if ($_GET['state']) {
             $param['secret'] = $this->payConfig['wxappsecret'];
             $param['code'] = I('code');
             $param['grant_type'] = 'authorization_code';
             $url = 'https://api.weixin.qq.com/sns/oauth2/access_token?' . http_build_query($param);
             $content = file_get_contents($url);
             $content = json_decode($content, true);
             return $content['openid'];
         }
     }
 }
开发者ID:chenpusn,项目名称:guoxian,代码行数:41,代码来源:WeixinController.class.php

示例10: session_save_path

    require_once PHPMYWIND_INC . '/mysql.class.php';
}
//引入语言包
//Session保存路径
$sess_savepath = PHPMYWIND_DATA . '/sessions/';
if (is_writable($sess_savepath) && is_readable($sess_savepath)) {
    session_save_path($sess_savepath);
}
//上传文件保存路径
$cfg_image_dir = PHPMYWIND_UPLOAD . '/image';
$cfg_soft_dir = PHPMYWIND_UPLOAD . '/soft';
$cfg_media_dir = PHPMYWIND_UPLOAD . '/media';
//系统版本号
$cfg_vernum = '5.3 Beta';
$cfg_vertime = '20150913221909';
//设置默认时区
if (PHP_VERSION > '5.1') {
    $time51 = $cfg_timezone * -1;
    @date_default_timezone_set('Etc/GMT' . $time51);
}
//判断是否开启错误提示
if ($cfg_diserror == 'Y') {
    error_reporting(E_ALL);
} else {
    error_reporting(0);
}
//判断访问设备
//如果手动更改后台目录,请将/admin目录更改成新后台目录
if (IsMobile() && !strstr(GetCurUrl(), '4g.php') && $cfg_mobile == 'Y' && !strstr(GetCurUrl(), '/admin')) {
    header('location:4g.php');
}
开发者ID:wtySk,项目名称:github,代码行数:31,代码来源:common.inc.php

示例11: define

define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__)));
require_once DEDEADMIN . '/../include/common.inc.php';
require_once DEDEINC . '/userlogin.class.php';
header('Cache-Control:private');
$dsql->safeCheck = FALSE;
$dsql->SetLongLink();
$cfg_admin_skin = 1;
// 后台管理风格
if (file_exists(DEDEDATA . '/admin/skin.txt')) {
    $skin = file_get_contents(DEDEDATA . '/admin/skin.txt');
    $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin;
}
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项
$dedeNowurl = $s_scriptName = '';
$isUrlOpen = @ini_get('allow_url_fopen');
$dedeNowurl = GetCurUrl();
$dedeNowurls = explode('?', $dedeNowurl);
$s_scriptName = $dedeNowurls[0];
$cfg_remote_site = empty($cfg_remote_site) ? 'N' : $cfg_remote_site;
//检验用户登录状态
$cuserLogin = new userLogin();
if ($cuserLogin->getUserID() == -1) {
    header("location:login.php?gotopage=" . urlencode($dedeNowurl));
    exit;
}
function XSSClean($val)
{
    if (is_array($val)) {
        while (list($key) = each($val)) {
            $val[$key] = XSSClean($val[$key]);
        }
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:config.php

示例12: OxWindow

        $gid = $dsql->GetLastID();
        if ($needCheck == 1) {
            require_once DEDEINC . "/oxwindow.class.php";
            $msg = "\r\n        <font color='red'><b>成功发送或回复留言!</b></font> &nbsp; <a href='guestbook.php' style='font-size:14px;font-weight:bold'><u>我已经知道了,点击此返回&gt;&gt;</u></a>";
            $wintitle = "留言发布成功提示";
            $wecome_info = "留言发布成功:";
            $win = new OxWindow();
            $win->Init("", "js/blank.js", "post");
            $win->AddTitle("提示:");
            $win->AddMsgItem("<div style='padding:20px;line-height:300%;font-size:14px'>{$msg}</div>");
            $winform = $win->GetWindow("hand");
            $win->Display();
        } else {
            ShowMsg('成功发送一则留言,但需审核后才能显示!', 'guestbook.php', 0, 3000);
        }
        exit;
    } else {
        setcookie('GUEST_BOOK_POS', GetCurUrl(), time() + 3600, '/');
        if ($g_isadmin) {
            $sql = 'SELECT * FROM `#@__guestbook` ORDER BY id DESC';
        } else {
            $sql = 'SELECT * FROM `#@__guestbook` WHERE ischeck=1 ORDER BY id DESC';
        }
        $dlist = new DataListCP();
        $dlist->pageSize = 10;
        $dlist->SetParameter('gotopagerank', $gotopagerank);
        $dlist->SetTemplate(DEDETEMPLATE . '/plus/guestbook.htm');
        $dlist->SetSource($sql);
        $dlist->Display();
    }
}
开发者ID:JaniseSheng,项目名称:wwwroot,代码行数:31,代码来源:guestbook.php

示例13: dirname

<?php

/**
 * 我的收藏夹
 * 
 * @version        $Id: mystow.php 1 8:38 2010年7月9日Z tianya $
 * @package        DedeCMS.Member
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckRank(0, 0);
require_once DEDEINC . "/datalistcp.class.php";
setcookie("ENV_GOBACK_URL", GetCurUrl(), time() + 3600, "/");
$type = empty($type) ? "sys" : trim($type);
$tpl = '';
$menutype = 'mydede';
$rank = empty($rank) ? "" : $rank;
if ($rank == 'top') {
    $sql = "SELECT s.*,COUNT(s.aid) AS num,t.*  from #@__member_stow AS s LEFT JOIN `#@__member_stowtype` AS t on t.stowname=s.type group by s.aid order by num desc";
    $tpl = 'stowtop';
} else {
    $sql = "SELECT s.*,t.* FROM `#@__member_stow` AS s left join `#@__member_stowtype` AS t on t.stowname=s.type  where s.mid='" . $cfg_ml->M_ID . "' order by s.id desc";
    $tpl = 'mystow';
}
$dsql->Execute('nn', 'SELECT indexname,stowname FROM `#@__member_stowtype`');
while ($row = $dsql->GetArray('nn')) {
    $rows[] = $row;
}
$dlist = new DataListCP();
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:mystow.php

示例14: get_openid

function get_openid($openid = NULL)
{
    $token = get_token();
    if ($openid !== NULL) {
        session('openid_' . $token, $openid);
    } elseif (!empty($_REQUEST['openid'])) {
        session('openid_' . $token, $_REQUEST['openid']);
    }
    $openid = session('openid_' . $token);
    $isWeixinBrowser = isWeixinBrowser();
    if (empty($openid) && $isWeixinBrowser) {
        $callback = GetCurUrl();
        OAuthWeixin($callback);
    }
    if (empty($openid)) {
        return -1;
    }
    return $openid;
}
开发者ID:amotewangrong,项目名称:WeiPHP-SWXZS,代码行数:19,代码来源:function.php

示例15: index

 public function index()
 {
     if (IS_GET) {
         $url = GetCurUrl();
         weixin_log($url, 'auth');
         if ($this->auth(TOKEN)) {
             echo $_GET['echostr'];
         }
         die;
     }
     $content = file_get_contents('php://input');
     $content = new \SimpleXMLElement($content);
     foreach ($content as $key => $value) {
         $data[$key] = strval($value);
     }
     $this->data = $data;
     weixin_log($data, $GLOBALS['HTTP_RAW_POST_DATA']);
     if (!empty($data['FromUserName'])) {
         session('openid', $data['FromUserName']);
     }
     $key = $data['Content'];
     $keywordArr = array();
     $list = D('addons')->where('is_weixin=1')->findAll();
     foreach ($list as $vo) {
         if ($vo['status']) {
             $addon_list[] = $vo;
         } else {
             $forbit_list[] = $vo;
         }
     }
     if ($data['MsgType'] == 'event') {
         $event = strtolower($data['Event']);
         foreach ($addon_list as $vo) {
             $name = $vo['name'];
             $this->plugin_deal($name, $event, $data);
         }
         if (!($event == 'click' && !empty($data['EventKey']))) {
             return true;
         }
         $key = $data['Content'] = $data['EventKey'];
     }
     $uid = intval($this->mid);
     $user_status = S('user_status_' . $uid);
     if (!isset($plugins[$key]) && $user_status) {
         $plugins[$key] = $user_status['module'];
         $keywordArr = $user_status['keywordArr'];
         S('user_status_' . $uid, null);
     }
     if (!isset($plugins[$key])) {
         foreach ($addon_list as $k => $vo) {
             $plugins[$vo['name']] = $k;
             $plugins[$vo['pluginName']] = $k;
         }
     }
     if (!isset($plugins[$key])) {
         $like['keyword'] = array('like', "%{$key}%");
         if (!empty($forbit_list)) {
             $like['module'] = array('not in', $forbit_list);
         }
         $keywordArr = M('keyword')->where($like)->order('id desc')->find();
         $plugins[$key] = $keywordArr['module'];
     }
     // 回答不上
     if (!isset($plugins[$key])) {
         $plugins[$key] = 'Base';
     }
     $this->plugin_deal($plugins[$key], 'response', $data, $keywordArr);
 }
开发者ID:omusico,项目名称:ThinkSNS-4,代码行数:68,代码来源:WeixinAction.class.php


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