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


PHP ReDirect函数代码示例

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


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

示例1: s_check_logincheck

function s_check_logincheck()
{
    if (option::xget("s_check", "login_check") != 0) {
        $geetest = new GeetestLib();
        $geetest->set_privatekey("2d5be5ba4207f11d33f7ae5e14a1c33e");
        if (isset($_POST['geetest_challenge']) && isset($_POST['geetest_validate']) && isset($_POST['geetest_seccode'])) {
            $result = $geetest->validate($_POST['geetest_challenge'], $_POST['geetest_validate'], $_POST['geetest_seccode']);
        }
        if ($result == TRUE) {
        } else {
            if ($result == FALSE) {
                ReDirect("index.php?mod=login&error_msg=" . urlencode('登陆失败,请拖动滑块完成验证'));
                die;
            } else {
                ReDirect("index.php?mod=login&error_msg=" . urlencode('登陆失败,请拖动滑块完成验证'));
                die;
            }
        }
    }
}
开发者ID:chajianku,项目名称:s_check,代码行数:20,代码来源:s_check.php

示例2: msg

        msg('设置无法保存,因为您的总灌水量超过了管理员的设置');
    }
    foreach ($tbss as $key => $tbsx) {
        if (!empty($tbsx) && !empty($pid[$key])) {
            $np = str_ireplace('http://tieba.baidu.com/p/', '', $tbsx);
            $tes = $m->once_fetch_array("SELECT count(*) AS `c` FROM `" . DB_NAME . "`.`" . DB_PREFIX . "wmzz_post_data` WHERE `uid` = '" . UID . "' AND `pid` = '{$pid[$key]}' AND `url` = '{$np}'");
            if ($tes['c'] <= 0) {
                $m->query("INSERT INTO `" . DB_NAME . "`.`" . DB_PREFIX . "wmzz_post_data` ( `id`,`uid`,`pid`,`url` ) VALUES ( NULL,'" . UID . "','{$pid[$key]}','{$np}' );");
            } else {
                $m->query("UPDATE `" . DB_NAME . "`.`" . DB_PREFIX . "wmzz_post_data` SET `url` = '{$np}', `pid` = '{$pid[$key]}' WHERE `id` = '{$rcid[$rcidk]}';");
                $rcidk = $rcidk + 1;
            }
        }
    }
    $m->query('INSERT INTO `' . DB_NAME . '`.`' . DB_PREFIX . 'wmzz_post` (`uid`, `cont`, `num`) VALUES (' . UID . ', \'' . $wsc . '\', \'' . $num . '\') on duplicate key update `cont` = \'' . $wsc . '\', `num` = \'' . $num . '\'');
    ReDirect(SYSTEM_URL . "index.php?plugin=wmzz_post&mod=set&ok");
    die;
}
loadhead();
echo '<h2>贴吧帖子云灌水</h2>';
if (SYSTEM_PAGE == 'set') {
    $tbs = '';
    $content = '';
    $tbss = $m->query("SELECT * FROM `" . DB_PREFIX . "wmzz_post_data` WHERE `uid` = '" . UID . "';");
    while ($valux = $m->fetch_array($tbss)) {
        $tbs .= '<tr><td><input type="text" class="form-control" name="tieba[]" style="width:100%" value="http://tieba.baidu.com/p/' . $valux['url'] . '" readonly></td><td><input type="text" name="pid[]" value="' . $valux['pid'] . '" class="form-control" readonly></td><td><a class="btn btn-default" title="删除" href="index.php?plugin=wmzz_post&mod=set&del=' . $valux['id'] . '"><b>X</b></a></td></tr>';
    }
    $tbs = trim($tbs, "\n");
    $val = unserialize($us['cont']);
    if (!empty($val)) {
        foreach ($val as $valu) {
开发者ID:pixode,项目名称:wmzz_post,代码行数:31,代码来源:wmzz_post_show.php

示例3: ReDirect

                  $largeIcon = $_FILES['large_icon']['tmp_name'];
                  if (file_exists($largeIcon) && $largeIcon != "") {
                      $largeIconPath = "pic/sw720dp/" . $_POST['url'] . ".png";
                      if ($db->upload_image($_FILES['large_icon'], $largeIconPath))
                          $bookmark['large_icon'] = $largeIconPath;
                  }
                  
                  $db->upd_rec("bookmark", $bookmark, "id='" . $_POST['bID'] . "'");
                  ReDirect('index.php?page=bookmark&msg=1');
                  exit();
              }
              $MiddleContents["page"] = "views/edit_bookmark.php";
              include ($TemplateFile);
              break;
          } */
        case "logout":
            session_destroy();
            $URL = "login.php?Msg=Successfully Logout";
            ReDirect($URL);
            break;
        default:
            $Title = "Admin: Dashboard";
            $MiddleContents["page"] = "views/home.php";
            include $TemplateFile;
    }
} else {
    session_destroy();
    $URL = "login.php?Msg=Successfully Logout";
    ReDirect($URL);
    break;
}
开发者ID:Wings1986,项目名称:SMBeacon-IOS-Web,代码行数:31,代码来源:index.php

示例4: empty

<?php

if (ROLE === 'admin') {
    $doa = empty($_POST['wmzz_anno_doa']) ? array() : $_POST['wmzz_anno_doa'];
    option::set('wmzz_anno_set', htmlspecialchars_decode($_POST['wmzz_anno_set']));
    option::set('wmzz_anno_tpl', htmlspecialchars_decode($_POST['wmzz_anno_tpl']));
    option::set('wmzz_anno_doa', serialize($doa));
    ReDirect('index.php?mod=admin:setplug&plug=wmzz_anno&ok');
}
开发者ID:chajianku,项目名称:wmzz_anno,代码行数:9,代码来源:wmzz_anno_show.php

示例5: die

    die('Insufficient Permissions');
}
global $i;
switch ($i['mode'][0]) {
    case 'baiduid':
        loadhead('百度账号管理');
        template('baiduid');
        break;
    case 'showtb':
        loadhead('云签到设置和日志');
        template('showtb');
        break;
    case 'log':
        //兼容老版本插件,重定向到showtb
        Clean();
        ReDirect('index.php?mod=showtb');
        break;
    case 'set':
        loadhead('个人设置');
        template('set');
        break;
    case 'admin':
        if (ROLE != 'admin') {
            msg('权限不足!');
        }
        switch ($i['mode'][1]) {
            case 'set':
                loadhead('全局设置');
                template('admin-set');
                break;
            case 'tools':
开发者ID:xiashali,项目名称:Tieba-Cloud-Sign-OpenShift-QuickStart,代码行数:31,代码来源:control.php

示例6: file_put_contents

        file_put_contents($backup . '/__backup.ini', '[info]' . "\r\n" . '
name=' . SYSTEM_NAME . "\r\n" . '
ver=' . SYSTEM_VER . "\r\n" . '
time=' . date('Y-m-d H:m:s') . "\r\n");
        foreach ($_POST['file'] as $file) {
            $c = new wcurl($server . $file);
            $data = $c->exec();
            $c->close();
            if (empty($data)) {
                DeleteFile(SYSTEM_ROOT . '/setup/update_cache');
                msg('错误:更新失败:<br/><br/>与更新服务器的连接中断:无法下载数据' . $server . $file);
            }
            file_put_contents(SYSTEM_ROOT . '/setup/update_cache' . $file, $data);
            copy(SYSTEM_ROOT . $file, $backup . $file);
        }
        ReDirect('ajax.php?mod=admin:update:install&updfile=' . $_POST['updatefile']);
        break;
        /*
        	case 'admin:update': 
        $c    = new wcurl(SUPPORT_URL . 'get.php?ver=' . SYSTEM_VER);
        $data = json_decode($c->exec());
        $c->close();
        $d    = '';
        if(!empty($data)){
        	$t = '';
        	//预先提供文件夹列表
        	foreach ($data->items->dir as $dir) {
        		$d .= '<input type="hidden" name="dir[]" value="'.$dir.'">';
        	}
        
        	//检测文件是否存在以及MD5是否相同
开发者ID:wan-qy,项目名称:Tieba-Cloud-Sign,代码行数:31,代码来源:ajax.php

示例7: unserialize

global $i, $m;
$s = unserialize(option::get('plugin_wmzz_ban'));
if (SYSTEM_PAGE == 'add') {
    $pid = !empty($_POST['pid']) ? intval($_POST['pid']) : msg('请选择PID');
    if (!isset($i['user']['bduss'][$pid])) {
        msg('PID不存在');
    }
    $tieba = !empty($_POST['tieba']) ? addslashes(strip_tags($_POST['tieba'])) : msg('请输入贴吧');
    if (isset($_POST['date'])) {
        if (empty($_POST['date'])) {
            $date = '0';
        } else {
            $date = strtotime($_POST['date']);
        }
    } else {
        msg('请输入截止日期');
    }
    foreach ($_POST['user'] as $value) {
        $value = addslashes(strip_tags($value));
        $m->query("INSERT INTO `" . DB_PREFIX . "wmzz_ban` (`uid`, `pid`, `tieba`, `user`, `date`) VALUES ('" . UID . "', '{$pid}', '{$tieba}', '{$value}', '{$date}')");
    }
    ReDirect(SYSTEM_URL . 'index.php?plugin=wmzz_ban&ok');
} elseif (SYSTEM_PAGE == 'del') {
    $id = isset($_GET['id']) ? intval($_GET['id']) : msg('缺少ID');
    $m->query("DELETE FROM `" . DB_PREFIX . "wmzz_ban` WHERE `uid` = " . UID . " AND `id` = " . $id);
    ReDirect(SYSTEM_URL . 'index.php?plugin=wmzz_ban&ok');
} else {
    loadhead();
    require SYSTEM_ROOT . '/plugins/wmzz_ban/show.php';
    loadfoot();
}
开发者ID:chajianku,项目名称:wmzz_ban,代码行数:31,代码来源:wmzz_ban_show.php

示例8: ReDirect

            $hide_num_wx = !empty($_POST['hide_num_wx']) ? 1 : 0;
            option::set('xy_invite_gs_yqm', $_POST['gs_yqm']);
            option::set('xy_invite_gs_sy', $_POST['gs_sy']);
            option::set('xy_invite_shownum', $show_num);
            option::set('xy_invite_hidenum_1', $hide_num_1);
            option::set('xy_invite_hidenum_wx', $hide_num_wx);
            ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=xy_invite&msg=设置已保存!');
        }
    } else {
        ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=xy_invite&error_msg=邀请码格式不能为空!');
    }
}
//多邀请码开启
if (isset($_GET['open'])) {
    option::set('yr_reg', '多邀请码已开启');
    ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=xy_invite&msg=已开启邀请码注册功能!');
}
//错误提示
if (isset($_GET['error_msg'])) {
    echo '<div class="alert alert-danger alert-dismissable">
	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>错误:' . strip_tags($_GET['error_msg']) . '</div>';
}
//提示
if (isset($_GET['msg'])) {
    echo '<div class="alert alert-info alert-dismissable">
	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>' . strip_tags($_GET['msg']) . '</div>';
}
//未开启邀请码提示
if (!option::get('yr_reg')) {
    echo '<div class="alert alert-warning alert-dismissable">警告:没有开启邀请码注册! <a href="index.php?mod=admin:setplug&plug=xy_invite&open">点击开启</a></div>';
}
开发者ID:chajianku,项目名称:xy_invite,代码行数:31,代码来源:xy_invite_setting.php

示例9: die

<?php

if (!defined('SYSTEM_ROOT')) {
    die('Insufficient Permissions');
}
if (isset($_REQUEST['plug']) && $_REQUEST['plug'] == "dl_pages" && $_REQUEST['page'] == "") {
    ReDirect('index.php?mod=admin:setplug&plug=dl_pages&page=1');
}
if (isset($_GET['ok'])) {
    echo '<div class="alert alert-success">设置已成功保存!</div>';
}
if (option::get('dl_pages_title') == "0") {
    global $m;
    option::set('dl_pages_text', '');
    option::set('dl_pages_title', '');
}
if (option::get('dl_pages_title2') == "0") {
    global $m;
    option::set('dl_pages_text2', '');
    option::set('dl_pages_title2', '');
}
if (option::get('dl_pages_title3') == "0") {
    global $m;
    option::set('dl_pages_text3', '');
    option::set('dl_pages_title3', '');
}
if (option::get('dl_pages_title4') == "0") {
    global $m;
    option::set('dl_pages_text4', '');
    option::set('dl_pages_title4', '');
}
开发者ID:chajianku,项目名称:dl_pages,代码行数:31,代码来源:dl_pages_setting.php

示例10: strip_tags

</div><?php 
}
?>
<div style="display:none;"><script src="http://js.users.51.la/17795549.js"></script></div> 
<?php 
if (isset($_GET['success_msg'])) {
    ?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<?php 
    echo strip_tags($_GET['success_msg']);
    ?>
</div><?php 
}
if (isset($_GET['jh'])) {
    global $m;
    $email = base64_decode($_GET['email']);
    $key = $_GET['key'];
    $cx = $m->query("SELECT * FROM  `" . DB_NAME . "`.`" . DB_PREFIX . "users` WHERE email = '{$email}' LIMIT 1");
    $p = $m->fetch_array($cx);
    $pw = sha1(md5($p['pw'] . date('Ymd') . option::get(salt)));
    if ($pw != $key) {
        ReDirect(SYSTEM_URL . 'index.php?pub_plugin=reg_supervise&error_msg=链接无效!!');
        die;
    } else {
        $m->query("UPDATE `" . DB_NAME . "`.`" . DB_PREFIX . "users` SET `role` = 'user' WHERE email = '{$email}'");
        setcookie("wmzz_tc_user", $p['name']);
        setcookie("wmzz_tc_pw", $p['pw']);
        ReDirect(SYSTEM_URL . 'index.php?pub_plugin=reg_supervise&success_msg=用户激活成功!请绑定百度账号。');
    }
}
开发者ID:chajianku,项目名称:reg_supervise,代码行数:31,代码来源:reg_supervise_public.php

示例11: die

if (ROLE != 'admin') {
    die('权限不足');
}
global $m;
//参数替换
function getgs($gs)
{
    $data = str_ireplace('{百度ID}', '(.*)', $gs);
    $data = str_ireplace('{百度BDUSS}', '([0-9a-zA-Z\\-\\~]+)', $data);
    return $data;
}
//导入BDUSS
if (isset($_GET['new'])) {
    $import_str = !empty($_POST['import_str']) ? $_POST['import_str'] : '';
    if (empty($import_str)) {
        ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=xy_import&error_msg=导入文本不能为空!');
    }
    $import_str = preg_replace('/[\\r\\n]+/', PHP_EOL, $import_str);
    $arr = explode(PHP_EOL, $import_str);
    $total = count($arr);
    $gs = option::get('xy_import_gs');
    $refresh = option::get('xy_import_refresh');
    $hs = $cf = $ok = $err = $up = $sx = 0;
    for ($i = 0; $i < $total; $i++) {
        preg_match('/' . getgs($gs) . '/', $arr[$i], $re);
        if (!empty($re[2])) {
            $hs++;
            $x = $m->once_fetch_array("SELECT COUNT(*) AS bduss FROM `" . DB_NAME . "`.`" . DB_PREFIX . "baiduid` where `bduss` = '" . $re[2] . "';");
            if ($x['bduss'] > 0) {
                $cf++;
            } else {
开发者ID:chajianku,项目名称:xy_import,代码行数:31,代码来源:view_ajax.php

示例12: getBaiduID

    $baiduid = getBaiduID($bduss);
    if (!empty($baiduid)) {
        $uid = $m->once_fetch_array("SELECT `uid` FROM  `" . DB_NAME . "`.`" . DB_PREFIX . "baiduid` WHERE `name` = '{$baiduid}'");
        if (!empty($uid)) {
            $uid = $uid['uid'];
            $p = $m->once_fetch_array("SELECT * FROM  `" . DB_NAME . "`.`" . DB_PREFIX . "users` WHERE `id` = '{$uid}'");
        } else {
            msg('无相应绑定信息,请尝试使用其他方式登陆');
        }
    } else {
        msg('您输入的bduss有误');
    }
    $cktime = (int) option::get('cktime');
    setcookie("wmzz_tc_user", $p['name'], time() + $cktime);
    setcookie("wmzz_tc_pw", $p['pw'], time() + $cktime);
    ReDirect('index.php');
}
loadhead();
?>
<div class="panel panel-success" style="margin:5% 15% 5% 15%;">
	<div class="panel-heading">
		<h3 class="panel-title">花式登录</h3>
	</div>   
	<div style="margin:0% 5% 5% 5%;"><br/>
		<form name="form" method="post" action="<?php 
echo SYSTEM_URL;
?>
index.php?pub_plugin=fyy_newlogin&">
			<div class="input-group">
				<span class="input-group-addon">BDUSS</span>
				<input type="text" class="form-control" name="bduss" id="bduss" placeholder="登录百度账号后,点击Get it可以获取BDUSS信息"/>
开发者ID:chajianku,项目名称:fyy_newlogin,代码行数:31,代码来源:fyy_newlogin_public.php

示例13: max

if (isset($_GET['update'])) {
    global $m;
    $result = $m->fetch_array($m->query("select max(id) as id from `" . DB_NAME . "`.`" . DB_PREFIX . "dl_invite`"));
    $row = $result['id'];
    $zg = $row + 1;
    $zg2 = $row + 100;
    for ($i = $zg; $i <= $zg2; $i++) {
        $yqm = getRandStr(18);
        $m->query('INSERT INTO `' . DB_NAME . '`.`' . DB_PREFIX . 'dl_invite` (`id`, `code`) VALUES (\'' . $i . '\', \'' . $yqm . '\');');
    }
    ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=dl_invite&ok');
}
if (isset($_GET['delete'])) {
    global $m;
    $m->query("truncate table `" . DB_NAME . "`.`" . DB_PREFIX . "dl_invite`");
    ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=dl_invite&ok');
}
?>
<h3>多邀请码设置</h3>
</br></br></br>
<?php 
global $m;
$cont = '';
$result = $m->fetch_array($m->query("select max(id) as id from `" . DB_NAME . "`.`" . DB_PREFIX . "dl_invite`"));
$row = $result['id'];
for ($i = 0; $i <= $row; $i++) {
    $invite = $m->fetch_array($m->query('select * from `' . DB_NAME . '`.`' . DB_PREFIX . 'dl_invite` where `id` = ' . $i));
    if (!empty($invite['code'])) {
        $cont = $cont . "\n" . $invite['code'];
    }
}
开发者ID:chajianku,项目名称:dl_invite,代码行数:31,代码来源:dl_invite_setting.php

示例14: ReDirect

    global $m;
    option::set('dl_pages_text3', $_POST['text3']);
    option::set('dl_pages_title3', $_POST['title3']);
    ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=dl_pages&page=3&ok');
}
if (isset($_GET['add4'])) {
    global $m;
    option::set('dl_pages_text4', $_POST['text4']);
    option::set('dl_pages_title4', $_POST['title4']);
    ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=dl_pages&page=4&ok');
}
if (isset($_GET['add5'])) {
    global $m;
    option::set('dl_pages_text5', $_POST['text5']);
    option::set('dl_pages_title5', $_POST['title5']);
    ReDirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=dl_pages&page=5&ok');
}
loadhead();
if ($_REQUEST['page'] == 'dl_pages_one') {
    echo "<h2>" . option::get('dl_pages_title') . "</h2></br>";
    if (option::get('dl_pages_text') == "") {
        echo '<div class="alert alert-danger">管理员未设置内容!</div>';
    }
    echo option::get('dl_pages_text');
    echo '</br></br>插件作者:<a href="http://blog.jt371.cn" target="_blank">D丶L</a> &nbsp;&nbsp;&nbsp; 程序作者:<a href="http://zhizhe8.net" target="_blank">无名智者</a>';
} else {
}
if ($_REQUEST['page'] == 'dl_pages_two') {
    echo "<h2>" . option::get('dl_pages_title2') . "</h2></br>";
    if (option::get('dl_pages_text2') == "") {
        echo '<div class="alert alert-danger">管理员未设置内容!</div>';
开发者ID:chajianku,项目名称:dl_pages,代码行数:31,代码来源:dl_pages_show.php

示例15: dl_invite_yz

function dl_invite_yz()
{
    global $m;
    if (option::get('enable_reg') != '1') {
        msg('注册失败:该站点已关闭注册');
    }
    $name = isset($_POST['user']) ? addslashes(strip_tags($_POST['user'])) : '';
    $mail = isset($_POST['mail']) ? addslashes(strip_tags($_POST['mail'])) : '';
    $pw = isset($_POST['pw']) ? addslashes(strip_tags($_POST['pw'])) : '';
    $yr = isset($_POST['invite']) ? addslashes(strip_tags($_POST['invite'])) : '';
    if (empty($name) || empty($mail) || empty($pw)) {
        msg('注册失败:请正确填写账户、密码或邮箱');
    }
    $x = $m->once_fetch_array("SELECT COUNT(*) AS total FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users` WHERE name='{$name}'");
    $z = $m->once_fetch_array("SELECT COUNT(*) AS total FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users` WHERE email='{$name}'");
    $y = $m->once_fetch_array("SELECT COUNT(*) AS total FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users`");
    if ($x['total'] > 0) {
        msg('注册失败:用户名已经存在');
    }
    if ($z['total'] > 0) {
        msg('注册失败:邮箱已经存在');
    }
    if (!checkMail($mail)) {
        msg('注册失败:邮箱格式不正确');
    }
    if (empty($yr)) {
        msg('注册失败:请输入邀请码');
    }
    $invite = $m->fetch_array($m->query('select * from `' . DB_NAME . '`.`' . DB_PREFIX . 'dl_invite` where `code` = "' . $yr . '"'));
    if (!empty($invite['code'])) {
        $dlyr = $invite['code'];
        $m->query('DELETE FROM `' . DB_NAME . '`.`' . DB_PREFIX . 'dl_invite` where `code` = "' . $dlyr . '"');
    } else {
        msg('注册失败:邀请码错误或已被使用');
    }
    if ($y['total'] <= 0) {
        $role = 'admin';
    } else {
        $role = 'user';
    }
    doAction('admin_reg_2');
    $m->query('INSERT INTO `' . DB_NAME . '`.`' . DB_PREFIX . 'users` (`id`, `name`, `pw`, `email`, `role`, `t`) VALUES (NULL, \'' . $name . '\', \'' . EncodePwd($pw) . '\', \'' . $mail . '\', \'' . $role . '\', \'' . getfreetable() . '\');');
    setcookie("wmzz_tc_user", $name);
    setcookie("wmzz_tc_pw", EncodePwd($pw));
    doAction('admin_reg_3');
    ReDirect('index.php');
    echo '}';
    die;
}
开发者ID:chajianku,项目名称:dl_invite,代码行数:49,代码来源:dl_invite.php


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