本文整理汇总了PHP中jump函数的典型用法代码示例。如果您正苦于以下问题:PHP jump函数的具体用法?PHP jump怎么用?PHP jump使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jump函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: main
function main()
{
if (isset($_REQUEST['a'])) {
jump($_REQUEST["a"]);
}
main_page();
}
开发者ID:hassanazimi,项目名称:PostgreSQL,代码行数:7,代码来源:db.php
示例2: _initialize
function _initialize()
{
$model = M('config');
$list = $model->select();
foreach ($list as $v) {
$GLOBALS[$v['varname']] = $v['value'];
}
import('ORG.File');
import('ORG.Plugin');
//设置发信配置
C('MAIL_ADDRESS', $GLOBALS['cfg_smtp_usermail']);
C('MAIL_SMTP', $GLOBALS['cfg_smtp_server']);
C('MAIL_LOGINNAME', $GLOBALS['cfg_smtp_user']);
C('MAIL_PASSWORD', $GLOBALS['cfg_smtp_password']);
//登陆判断
$this->isLogin() ? define('USER_LOGINED', true) : define('USER_LOGINED', false);
global $cfg_mb_open, $cfg_mb_reginfo;
if ($cfg_mb_open == 1) {
$this->error('系统会员功能已禁用!');
}
//缓存用户信息
if (USER_LOGINED == true) {
$model = M('member');
$list = $model->where(array('id' => cookie('uid')))->find();
$GLOBALS['member'] = $list;
if ($list['status'] == 1 && !in_array(MODULE_NAME, array('Index', 'Public'))) {
jump(U('Index/myfile'));
}
}
}
开发者ID:google2013,项目名称:pppon,代码行数:30,代码来源:CommonAction.class.php
示例3: checklogin
function checklogin($x)
{
global $islogin;
/*
home.php 对应 islogin = 1
login.php 对应 islogin = 2
如果session == 1,但此刻不在home.php($islogin!=1),那么就跳到home.php
如果session没设置,且此刻不在login.php($islogin!=2),那么就跳到login.php
*/
if ($x) {
if ($islogin != 1) {
jump('home.php');
}
} else {
if ($islogin != 2) {
jump('login.php');
}
}
/*
if($x){
if($x==1){
if($islogin!=1){
jump('home.php');
}
}else{
jump('login.php');
}
}elseif($islogin!=2){
jump('login.php');
}
*/
}
开发者ID:emaste-r,项目名称:GunCMS,代码行数:32,代码来源:fun.php
示例4: main
function main()
{
if (!isset($_REQUEST['a'])) {
$_REQUEST['a'] = '';
}
jump($_REQUEST["a"]);
}
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:7,代码来源:crud.php
示例5: check_login
public final function check_login()
{
if (M == 'admin' && C == 'index' && A == 'login') {
return true;
} else {
$userid = getCookie('userid');
if (!isset($_SESSION['userid']) || !isset($_SESSION['roleid']) || !$_SESSION['userid'] || !$_SESSION['roleid'] || $userid != $_SESSION['userid']) {
jump('登陆', '?m=admin&c=index&a=login');
}
}
}
开发者ID:iquanxin,项目名称:march,代码行数:11,代码来源:admin.cls.php
示例6: checksafeauth
protected function checksafeauth()
{
$safeauth = F('safeauth', '', COMMON_PATH);
if (empty($safeauth)) {
jump(U('Index/main'));
}
$safeauthset = cookie('safeauthset');
if (empty($safeauthset)) {
$this->display('Public:checksafeauth');
exit;
}
}
开发者ID:google2013,项目名称:pppon,代码行数:12,代码来源:CommonAction.class.php
示例7: logining
public function logining()
{
$username = isset($_POST['username']) ? htmlspecialchars(trim($_POST['username'])) : '';
$password = isset($_POST['password']) ? htmlspecialchars(trim($_POST['password'])) : '';
//查询用户名和密码是否正确
$rs = User::isUsernamePassWord($username, $password);
if ($rs) {
$url = User::getUserLoginUrl($rs['id']);
} else {
$url = url("myweb", "login::index");
}
jump($url);
}
开发者ID:lughong,项目名称:test,代码行数:13,代码来源:login.php
示例8: check_permission
/**
* 验证用户是否有权限
* @param string $name
* @return string
*/
public function check_permission($name)
{
if (!empty($_SESSION)) {
foreach ($_SESSION['permission'] as $value) {
$check_array[] = $value['fname'];
}
if (!in_array($name, $check_array)) {
jump('您没有这样的操作权限', "pages/404.php", '', 0);
die;
} else {
return $name;
}
}
}
开发者ID:KienShin,项目名称:rbac0,代码行数:19,代码来源:common.class.php
示例9: doTopLogin
public function doTopLogin()
{
$data['username'] = I('post.email');
$data['password'] = I('post.password');
$data['password'] = md5($data['password']);
//查询数据库
$userres = M('users')->where($data)->find();
//如果存在,写入session ,返回session数组
if ($userres) {
//写入session
session('user', $userres);
//返回成功信息
jump('登陆成功', __APP__);
} else {
jump('用户名或密码错误', __APP__);
}
}
开发者ID:noikiy,项目名称:lagou,代码行数:17,代码来源:LoginController.class.php
示例10: isLogin
public static function isLogin()
{
if (!self::_isLogin()) {
if ($_COOKIE['is_login']) {
$username = $_COOKIE['is_login']['username'];
$rs = self::getUserInfoByUsername($username);
if ($rs) {
self::userLogin($rs[0]['id']);
return true;
} else {
return false;
}
} else {
$last_url = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : HOMEURL;
LuS::set('last_url', $last_url);
$url = url("login", "login::index");
jump($url);
}
} else {
return true;
}
}
开发者ID:lughong,项目名称:shop,代码行数:22,代码来源:User.class.php
示例11: compute
function compute($registers, $input)
{
while ($row = current($input)) {
#echo "$row\n";
$parts = explode(" ", $row);
$cmd = array_shift($parts);
$reg = str_replace(",", "", array_shift($parts));
$val = $parts ? (int) array_shift($parts) : false;
switch ($cmd) {
case "hlf":
$registers[$reg] /= 2;
break;
case "tpl":
$registers[$reg] *= 3;
break;
case "inc":
$registers[$reg] += 1;
break;
case "jmp":
jump($reg, $input);
break;
case "jie":
if ($registers[$reg] % 2 == 0) {
jump($val, $input);
}
break;
case "jio":
if ($registers[$reg] == 1) {
jump($val, $input);
}
break;
default:
echo "wtf!!\n";
}
next($input);
}
return $registers;
}
开发者ID:kratskij,项目名称:adventofcode,代码行数:38,代码来源:nissen.php
示例12: adminCheck
/**
* 管理员权限验证
*
*/
function adminCheck($permission = '')
{
openSession();
if (empty($_SESSION['admin'])) {
jump(U('index/login'));
}
$adm = json_decode($_SESSION['admin']);
if (empty($adm)) {
echo 'no adm';
exit;
}
if (!empty($permission)) {
$adm = json_decode($_SESSION['admin']);
$p = ',' . $adm->a_permission . ',';
if (!is_numeric(strpos($p, ',superadmin,'))) {
$permission = ',' . $permission . ',';
if (!is_numeric(strpos($p, $permission))) {
echo '您没权限访问此页面';
exit;
}
}
}
}
开发者ID:startwang,项目名称:news,代码行数:27,代码来源:function.php
示例13: session_start
<?php
//开启session
session_start();
//设置字符集
header("content-type:text/html;charset=utf-8");
//定义绝对路径
define('PATH', str_replace('\\', '/', dirname(__FILE__)) . '/../');
$des = strtolower(explode('/', $_SERVER['SERVER_PROTOCOL'])[0]) . '://' . $_SERVER['SERVER_NAME'];
$search = $_SERVER['DOCUMENT_ROOT'];
//用于跳转
define('APP', str_replace($search, $des, PATH));
include PATH . 'include/config.php';
include PATH . 'include/funcs.php';
if (!isset($_SESSION['login']['lv'])) {
exit(jump('还没有登陆', APP . 'login.php'));
}
?>
开发者ID:lyghlqlxx,项目名称:nuomi_shop,代码行数:18,代码来源:init.php
示例14: define
<?php
/*
Xiuno BBS 3.0 插件实例
广告插件卸载程序
*/
define('DEBUG', 1);
// 发布的时候改为 0
define('APP_NAME', 'bbs');
// 应用的名称
define('APP_PATH', '../../');
// 应用的路径
chdir(APP_PATH);
$conf = (include './conf/conf.php');
include './xiunophp/xiunophp.php';
include './model.inc.php';
$pconf = xn_json_decode(file_get_contents('./plugin/xn_ad/conf.json'));
$pconf['installed'] == 0 and message(-1, '插件已经卸载。');
$user = user_token_get('', 'bbs');
$user['gid'] != 1 and message(-1, jump('需要管理员权限才能完成卸载。', 'user-login.htm'));
// 第一处卸载
plugin_unstall_before('./pc/view/thread.htm', '<?php echo $first[\'message\']; ?>', file_get_contents('./plugin/xn_ad/ad_1.htm'));
// 第二处卸载
plugin_install_remove('./pc/view/footer_debug.inc.htm', file_get_contents('./plugin/xn_ad/ad_2.htm'));
json_conf_set('installed', 0, './plugin/xn_ad/conf.json');
message(0, '卸载完成!');
开发者ID:xianyuxmu,项目名称:alinkagarden-xiuno,代码行数:26,代码来源:unstall.php
示例15: weixinpay
public function weixinpay()
{
$commonUtil = new CommonUtil();
$wxPayHelper = new WxPayHelper();
$source = Input::safeHtml($_POST['source']);
//接收来源属性
$custom_id = intval($_POST['custom_id']);
//接收客户id
$order_id = intval($_POST['trade_no']);
//接收订单id
$merchant_url = Input::safeHtml($_POST['merchant_url']);
//操作中断返回地址
//获取商城id
$shop_id = $_GET['shop_id'];
//获取商品名称
$shop_name = M(C('DB_WECHAT_NAME') . '.wxh_order_detail')->where("is_del = 0 and order_id = '" . $order_id . "' and source = '" . $source . "'")->getField('commodity_name');
//echo M()->getLastSql();
//dump($shop_name);
// echo '<br >access_token为:'.$wxPayHelper->access_token(false);
//获取订单信息
$order_info = M(C('DB_WECHAT_NAME') . '.wxh_order')->where('is_del = 0 and status = 5 and id = ' . $order_id . ' and user_id = ' . $_SESSION['U_IF']['member_id'])->field('from_id, price, add_time')->find();
//$price = $order_info['price'];
//验证post参数,非法返回
if ($source == '' || $custom_id <= 0 || $order_id <= 0 || $merchant_url == '') {
die(jump(array('jumpmsg' => '参数非法')));
}
//获取订单编号 :来源+订单ID+客户ID+用户ID
$order_no = $source . '_' . $order_id . '_' . $custom_id . '_' . $_SESSION['U_IF']['member_id'];
//echo $order_no;
//$wxpay_config = C('WX_PAY_CONFIG');
//dump($wxpay_config);
//echo $total_fee = round($price,2); //付款金额
//获取银行通道类型
$wxPayHelper->setParameter("bank_type", "WX");
//商品描述
$wxPayHelper->setParameter("body", $shop_name);
//商户号
$wxPayHelper->setParameter("partner", $wxPayHelper->getPartnerId());
//商户订单号
$wxPayHelper->setParameter("out_trade_no", $order_no);
//订单总金额
$wxPayHelper->setParameter("total_fee", '1');
//支付币种
$wxPayHelper->setParameter("fee_type", "1");
//通知url
$wxPayHelper->setParameter("notify_url", "http://test.weixinhai.net/shop.php/Wxpay/payNotifyUrl/shop_id/" . $shop_id);
//订单生成的机器IP
$wxPayHelper->setParameter("spbill_create_ip", get_client_ip());
//字符编码
$wxPayHelper->setParameter("input_charset", "UTF-8");
//生成jsapi支付请求json
//dump($wxPayHelper->parameters);
$data = array('merchant_url' => $merchant_url, 'custom_id' => $custom_id, 'shop_name' => $shop_name, 'order_info' => $order_info);
$msg = $wxPayHelper->create_biz_package();
$this->assign('merchant_url', $merchant_url);
$this->assign('custom_id', $custom_id);
$this->assign('data', $data);
$this->assign('msg', $msg);
$this->display('./shop/Tpl/Index/weixinpay.html');
//dump($msg);
}
开发者ID:q546530715,项目名称:fenzhi-git,代码行数:61,代码来源:WxpayAction.class.php
示例16: do_post
/**
*插入与更新标签
**/
function do_post()
{
global $db, $pre, $lid, $ch, $chtype, $tag, $type, $code, $div, $hide, $js_time, $userdb, $timestamp, $typesystem, $ch_pagetype, $ch_module, $ch_fid, $ch_ifjs, $CHDB, $webdb, $FROMURL, $viewurl, $mystyle;
//修复旧版的
$db->query("UPDATE `{$pre}label` SET chtype=99,module=0 WHERE module='-99'");
if ($lid) {
$db->query("UPDATE `{$pre}label` SET ch='{$ch}',chtype='{$chtype}',tag='{$tag}',type='{$type}',code='{$code}',divcode='{$div}',hide='{$hide}',js_time='{$js_time}',uid='{$userdb['uid']}',username='{$userdb['username']}',posttime='{$timestamp}',typesystem='{$typesystem}',pagetype='{$ch_pagetype}',module='{$ch_module}',fid='{$ch_fid}',if_js='{$ch_ifjs}',style='{$mystyle}' WHERE lid='{$lid}' ");
//die("s");
} else {
$db->query("INSERT INTO `{$pre}label` ( `ch`, `chtype`, `tag`, `type`, `code`, `divcode`, `hide`, `js_time`, `uid`, `username`, `posttime`,`typesystem`, `pagetype`, `module`, `fid`,`if_js`,`style`) VALUES ('{$ch}','{$chtype}','{$tag}','{$type}','{$code}','{$div}','{$hide}','{$js_time}','{$userdb['uid']}','{$userdb['username']}','{$posttime}','{$typesystem}','{$ch_pagetype}','{$ch_module}','{$ch_fid}','{$ch_ifjs}','{$mystyle}')");
}
//头与尾
if ($chtype == 99) {
label_hf();
}
if ($ch_ifjs) {
//返回到JS调用页
header("location:index.php?lfj=js&job=show&id={$lid}&{$timestamp}");
exit;
}
make_tag_cache();
SetModule_config();
jump("<CENTER>[<A HREF='{$viewurl}' target='_blank'>点击浏览效果</A>] [<A HREF='{$FROMURL}'>继续修改</A>] [<A HREF='{$viewurl}&jobs=show'>返回频道/专题</A>]</CENTER>", "{$FROMURL}", 600);
}
开发者ID:xubo245,项目名称:liuyangzhang,代码行数:27,代码来源:label.php
示例17: session_begin
<?php
require_once 'func.php';
//$chapter = xss($_POST['c']);
session_begin();
if (!isset($_SESSION['user']) || !isset($_SESSION['pass'])) {
jump('unit.php');
}
require_once 'config.php';
$link = conn_db($hostname, $username, $password, $database);
if (!$link) {
echo "Mysql conncet ERROR";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>错题回顾</title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
<body>
<h1><center>信息论课程在线答题系统</center></h1>
<div align="right">
<table width="20%" style="margin-right:20px;margin_top:0px" border='0'>
<tr align="right">
<td>
开发者ID:alpaca-nemesis,项目名称:xxl,代码行数:31,代码来源:lookback.php
示例18: VALUES
$db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_id', '{$newid}', '')");
$db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_pre', '{$postdb['pre']}', '')");
$writefile = "<?php\r\n";
$query = $db->query("SELECT * FROM `{$table}`");
while ($rs = $db->fetch_array($query)) {
$rs[c_value] = addslashes($rs[c_value]);
$writefile .= "\$webdb['{$rs['c_key']}']='{$rs['c_value']}';\r\n";
}
write_file(ROOT_PATH . "{$postdb['dir']}/data/config.php", $writefile);
jump("复制成功,请设置一下新模块的后台权限", "index.php?lfj=group&job=admin_gr&gid=3", 10);
} elseif ($action == "order") {
foreach ($postdb as $key => $value) {
$db->query("UPDATE {$pre}module SET list='{$value}' WHERE id='{$key}'");
}
make_module_cache();
jump("操作成功", "index.php?lfj=module&job=list", 1);
}
function strlen_lable($num, $sring)
{
$sring = stripslashes($sring);
$num = strlen($sring);
return "s:{$num}:\"{$sring}\";";
}
function copy_module_file($path, $newp)
{
if (!is_dir($newp)) {
mkdir($newp);
}
if (file_exists($path)) {
if (is_file($path)) {
copy($path, $newp);
开发者ID:GHubgenius,项目名称:qbbj,代码行数:31,代码来源:module.php
示例19: jump
<?php
if (Admin::isLogged()) {
jump('index.php?page=home');
}
if ($config->isPost()) {
// vine din forma
if (Admin::login($_POST['email'], $_POST['password'])) {
jump('index.php?page=home');
} else {
$smarty->assign('error_login', 'Login failed!');
}
}
// incarcam pagina de login
$smarty->assign('CONTENT', 'components/login.tpl');
开发者ID:robertpop,项目名称:NS,代码行数:15,代码来源:login.php
示例20: GetId
<?php
require_once "../includes/head.php";
/*session_start();
if(isset($_SESSION["username"])) $USERNAME= $_SESSION["username"];
else $USERNAME= NULL;
$USERID= GetId($USERNAME);*/
if ($USERNAME == NULL) {
jump("/index.php?id=1");
}
?>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Profile - NSU-ED</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/custom.css">
<!--[if lt IE 9]>
<script src="/js/html5shiv.min.js"></script>
<script src="/js/respond.min.js"></script>
<![endif]-->
</head>
<body id="page_profile">
<?php
开发者ID:auishik,项目名称:nsu-ed,代码行数:31,代码来源:index.php
注:本文中的jump函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论