本文整理汇总了PHP中refreshto函数的典型用法代码示例。如果您正苦于以下问题:PHP refreshto函数的具体用法?PHP refreshto怎么用?PHP refreshto使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了refreshto函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paymsg
function paymsg($url, $msg, $notify = 'success')
{
if (empty($_POST)) {
refreshto($url, $msg);
}
exit($notify);
}
示例2: olpay_end
function olpay_end($numcode)
{
global $db, $pre, $webdb, $banktype, $pay_code, $lfjuid;
$pay_code = str_replace('QIBO', '=', $pay_code);
//这个符号“=”容易出问题
if (!$pay_code) {
showerr("数据有误!!");
}
list($type, $atc_moeny, $atc_numcode, $mid, $shopmoney) = explode("\t", mymd5($pay_code, 'DE'));
if ($atc_numcode != intval($numcode)) {
showerr("数据被修改过!!");
}
//主要是针对支付宝不能单纯一位数字的问题,inc/olpay/alipay.php,文件中做了修改
$numcode = str_replace("code", "", $numcode);
//万能表单订单
if ($type == 'form') {
$rt = $db->get_one("SELECT * FROM {$pre}olpay WHERE numcode='{$numcode}' AND `formid`='{$mid}'");
//商城订单
} elseif ($type == 'module') {
$rt = $db->get_one("SELECT * FROM {$pre}olpay WHERE numcode='{$numcode}' AND `moduleid`='{$mid}'");
$db->query("UPDATE {$pre}shoporderuser SET ifpay='1' WHERE id='{$atc_numcode}'");
//奖励积分
if ($shopmoney) {
add_user($lfjuid, $shopmoney, '购买商品得分');
}
}
if (!$rt) {
showerr('系统中没有您的订单,无法完成支付!');
}
if ($rt['ifpay'] == 1) {
showerr('该订单已经支付成功!');
}
$db->query("UPDATE {$pre}olpay SET ifpay='1' WHERE id='{$rt['id']}'");
refreshto("{$webdb['www_url']}/", "恭喜你支付成功", 60);
}
示例3: olpay_end
function olpay_end($numcode)
{
global $db, $pre, $webdb, $banktype;
$rt = $db->get_one("SELECT * FROM {$pre}olpay WHERE numcode='{$numcode}' AND `paytype`=1");
if (!$rt) {
showerr('系统中没有您的充值订单,无法完成充值!');
}
if ($rt['ifpay'] == 1) {
showerr('该订单已经充值成功!');
}
$db->query("UPDATE {$pre}olpay SET ifpay='1' WHERE id='{$rt['id']}'");
$num = $rt[money] * $webdb[alipay_scale];
add_user($rt[uid], $num, '在线充值');
refreshto("{$webdb['www_url']}/", "恭喜你充值成功", 10);
}
示例4: implode
$postSpecial->updateData($tid);
}
if ($postTopic) {
//分类主题
$postTopic->initData();
$postTopic->insertData($tid, $fid);
}
if ($postCate) {
//团购活动
$postCate->initData();
$postCate->insertData($tid, $fid);
}
if ($postdata->getIfcheck()) {
if ($postdata->filter->filter_weight == 3) {
$pinfo = 'enter_words';
$banword = implode(',', $postdata->filter->filter_word);
} else {
$pinfo = 'enter_thread';
}
} else {
if ($postdata->filter->filter_weight == 2) {
$banword = implode(',', $postdata->filter->filter_word);
$pinfo = 'post_word_check';
} elseif ($postdata->linkCheckStrategy) {
$pinfo = 'post_link_check';
} else {
$pinfo = 'post_check';
}
}
refreshto("read.php?tid={$tid}&page={$page}&toread=1#{$pid}", $pinfo);
}
示例5: md5
}
$pwd = md5($pwd);
}
require_once R_P . 'require/bbscode.php';
$wordsfb = L::loadClass('FilterUtil');
if (($banword = $wordsfb->comprise($aname)) !== false) {
Showmsg('title_wordsfb');
}
if (($banword = $wordsfb->comprise($aintro)) !== false) {
Showmsg('content_wordsfb');
}
if ($private == 3 && !$pwd && $rt['albumpwd']) {
$pwd = $rt['albumpwd'];
}
$db->update("UPDATE pw_cnalbum SET " . pwSqlSingle(array('aname' => $aname, 'aintro' => $aintro, 'private' => $private, 'albumpwd' => $pwd)) . ' WHERE aid=' . pwEscape($aid));
refreshto("{$basename}a=own", 'operate_success');
}
} elseif ($a == 'viewalbum') {
define('AJAX', 1);
define('F_M', true);
InitGP(array('aid'));
$aid = (int) $aid;
empty($aid) && Showmsg('data_error');
require_once PrintEot('m_ajax');
ajax_footer();
} elseif ($a == 'createajax') {
define('AJAX', 1);
define('F_M', true);
banUser();
InitGP(array('job'));
require_once PrintEot('m_ajax');
示例6: Showmsg
Showmsg('undefined_action');
}
$needcur = $days * $rt['sright']['sellprice'];
$cur = $credit->get($winduid, $rt['sright']['selltype']);
if ($cur === false) {
Showmsg('numerics_checkfailed');
}
if ($cur < $needcur) {
Showmsg('noenough_currency');
}
$credit->addLog('main_buygroup', array($rt['sright']['selltype'] => -$needcur), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'gptitle' => $rt['grouptitle'], 'days' => $days));
if (!$credit->set($winduid, $rt['sright']['selltype'], -$needcur)) {
Showmsg('numerics_checkfailed');
}
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
if ($options == 1) {
if ($winddb['groupid'] == '-1') {
$userService->update($winduid, array('groupid' => $gid));
} else {
$groups = $mb['groups'] ? $mb['groups'] . $winddb['groupid'] . ',' : ",{$winddb['groupid']},";
$userService->update($winduid, array('groupid' => $gid, 'groups' => $groups));
}
} else {
$groups = $mb['groups'] ? $mb['groups'] . $gid . ',' : ",{$gid},";
$userService->update($winduid, array('groups' => $groups));
}
$db->pw_update("SELECT uid FROM pw_extragroups WHERE uid=" . S::sqlEscape($winduid) . " AND gid=" . S::sqlEscape($gid), "UPDATE pw_extragroups SET " . S::sqlSingle(array('togid' => $winddb['groupid'], 'startdate' => $timestamp, 'days' => $days)) . " WHERE uid=" . S::sqlEscape($winduid) . "AND gid=" . S::sqlEscape($gid), "INSERT INTO pw_extragroups SET " . S::sqlSingle(array('uid' => $winduid, 'togid' => $winddb['groupid'], 'gid' => $gid, 'startdate' => $timestamp, 'days' => $days)));
refreshto("profile.php?action=buy", 'group_buy_success');
}
}
示例7: while
while ($rs = $db->fetch_array($query)) {
$Module_db->showfield($module_DB[2]['field'], $rs, 'list');
$rs[username] || ($rs[username] = $rs[ip]);
$rs[posttime] = date("Y-m-d H:i:s", $rs[posttime]);
$rs[del] = " <A HREF='?action=delete_apply&id={$rs['apply_id']}'>踢除</A>";
$listdb[] = $rs;
}
$showpage = getpage('', '', "?job={$job}", $rows, $totalNum);
require ROOT_PATH . "member/head.php";
require Memberpath . "template/list_job_member.htm";
require ROOT_PATH . "member/foot.php";
} elseif ($action == 'delete_apply') {
//踢除某职位下的其中一个应聘者
$r = $db->get_one("SELECT * FROM `{$_pre}apply` WHERE id='{$id}'");
$rs = $db->get_one("SELECT * FROM `{$_pre}content` WHERE cid='{$r['cid']}'");
if ($rs[uid] != $lfjuid) {
showerr("非法踢除!");
}
$db->query("DELETE FROM {$_pre}apply WHERE id='{$id}'");
refreshto($FROMURL, '踢除成功', 1);
} elseif ($action == "del") {
//删除某职位
$rs = $db->get_one("SELECT * FROM `{$_pre}content` WHERE id='{$id}' AND uid={$lfjuid}");
if (!$rs) {
showerr("非法删除!");
}
$db->query("DELETE FROM `{$_pre}content` WHERE `id` = '{$id}'");
$db->query("DELETE FROM `{$_pre}content_1` WHERE `id` = '{$id}'");
$db->query("DELETE FROM `{$_pre}apply` WHERE `cid` = '{$id}'");
refreshto($FROMURL, '删除成功', 1);
}
示例8: while
$min = ($page - 1) * $rows;
$query = $db->query("SELECT * FROM {$_pre}comments WHERE uid='{$lfjuid}' ORDER BY cid DESC LIMIT {$min},{$rows}");
while ($rs = $db->fetch_array($query)) {
$rs[content] = preg_replace("/<([^<]+)>/is", "", $rs[content]);
$rs[title] = get_word($rs[content], 70);
if (!$rs[username]) {
$detail = explode(".", $rs[ip]);
$rs[username] = "{$detail['0']}.{$detail['1']}.{$detail['2']}.*";
}
$rss = $db->get_one("SELECT city_id FROM {$_pre}db WHERE id='{$rs['id']}'");
$rs[url] = get_info_url($rs[id], $rs[fid], $rss[city_id]);
$rs[posttime] = date("Y-m-d H:i", $rs[posttime]);
$listdb[] = $rs;
}
require ROOT_PATH . "member/head.php";
require dirname(__FILE__) . "/" . "template/comment/mylist.htm";
require ROOT_PATH . "member/foot.php";
} elseif ($action == "del") {
if (!$ciddb) {
showerr("请选择一个");
}
foreach ($ciddb as $key => $value) {
$rs = $db->get_one("SELECT * FROM {$_pre}comments WHERE cid='{$value}'");
if ($rs[uid] = $lfjuid || ($rs[cuid] = $lfjuid)) {
$db->query("DELETE FROM {$_pre}comments WHERE cid='{$value}'");
$_erp = $Fid_db[tableid][$rs[fid]];
$db->query("UPDATE {$_pre}content{$_erp} SET comments=comments-1 WHERE id='{$rs['id']}'");
}
}
refreshto("{$FROMURL}", "删除成功", 1);
}
示例9: array
$mids = array();
foreach ($weibos as $key => $weibo) {
$mids[] = $weibo['mid'];
}
$weiboService->deleteWeibos($mids);
}
countPosts('-1');
$credit->runsql();
sendMawholeMessages($msgdb);
if ($db_ifpwcache ^ 1) {
$db->update("DELETE FROM pw_elements WHERE type !='usersort' AND id IN(" . S::sqlImplode($selids) . ')');
}
//* P_unlink(D_P.'data/bbscache/c_cache.php');
pwCache::deleteData(D_P . 'data/bbscache/c_cache.php');
if (!defined('AJAX')) {
refreshto("apps.php?q=group&a=thread&cyid={$cyid}", 'deltopic_success');
} else {
Showmsg('deltopic_success_ajax');
}
}
}
function checkForHeadTopic($toptype, $fid, $selForums)
{
require_once R_P . 'require/updateforum.php';
list($catedbs, $top_1, $top_2, $top_3) = getForumListForHeadTopic($fid);
$topAll = '';
if ($toptype == 0) {
return true;
}
if ($toptype == 1) {
$topAll = ',' . implode(',', array_keys((array) $top_1)) . ',';
示例10: elseif
}
} elseif ($action == 'del') {
PostCheck();
InitGP(array('selid', 'type'));
$selids = array();
foreach ($selid as $key => $value) {
is_numeric($value) && ($selids[] = $value);
}
if ($selids) {
$selids = pwImplode($selids);
} else {
Showmsg('id_error');
}
if ($type == 'report') {
$db->update("DELETE FROM pw_report WHERE id IN ({$selids})");
refreshto("forumcp.php?action=edit&type=report&fid={$fid}", 'operate_success');
}
}
function updatecache_fd1()
{
global $db;
$db->update("UPDATE pw_forums SET childid='0',fupadmin=''");
$query = $db->query("SELECT fid,forumadmin FROM pw_forums WHERE type='category' ORDER BY vieworder");
while ($cate = $db->fetch_array($query)) {
Add_S($cate);
$query2 = $db->query("SELECT fid,forumadmin FROM pw_forums WHERE type='forum' AND fup=" . pwEscape($cate['fid']));
if ($db->num_rows($query2)) {
$havechild[] = $cate['fid'];
while ($forum = $db->fetch_array($query2)) {
Add_S($forum);
$fupadmin = trim($cate['forumadmin']);
示例11: array_diff
}
$tmpKeyArray = array_diff(array_keys($tucoolAttachs), (array) $contentAids);
$tmpArray = array();
foreach ((array) $tmpKeyArray as $v) {
$tmpArray[$v] = $tucoolAttachs[$v];
}
$contentAttachs = array();
if (S::isArray($haveAids)) {
foreach ($tucoolAttachs as $k => $v) {
if (S::inArray($k, $haveAids)) {
$contentAttachs[$k] = $tucoolAttachs[$k];
}
}
}
$tucoolAttachs = array_merge($contentAttachs, (array) $tmpArray);
!$tucoolAttachs && refreshto("read.php?tid={$tid}&ds=1", '您暂无权限查看此帖的图片!');
// 编辑图片信息权限
$editAttachRight = $admincheck || $read['authorid'] == $winduid ? 1 : 0;
// 回复数
if ($openIndex) {
#高楼帖子索引
$replyCount = 1 + $db->get_value("SELECT max(floor) FROM pw_postsfloor WHERE tid =" . S::sqlEscape($tid));
} else {
$replyCount = $read['replies'] + 1;
}
//帖子浏览记录
$readlog = str_replace(",{$tid},", ',', GetCookie('readlog'));
$readlog .= ($readlog ? '' : ',') . $tid . ',';
$readlogCount = substr_count($readlog, ',');
$readlogCount > 11 && ($readlog = preg_replace("/[\\d]+\\,/i", '', $readlog, $readlogCount - 11));
Cookie('readlog', $readlog);
示例12: refreshto
refreshto($jumpUrl, $msg);
} else {
Showmsg('修改文章失败');
}
}
} elseif ($action == 'deletepage') {
S::gp(array('id', 'page'));
$articleModule = $articleService->getArticleModule($id);
if (!checkEditPurview($windid, $articleModule->columnId) && $articleModule->user != $windid) {
Showmsg('你没有权限编辑本栏目的文章');
}
$articleModule->deletePage($page);
$articleModule->showError();
$result = $articleService->updateArticle($articleModule);
if ($result) {
refreshto("{$basename}q=post&action=edit&id={$id}&page=1", 'operate_success', 2);
} else {
Showmsg('删除分页失败');
}
}
require cmsTemplate::printEot('post');
footer();
function initFileTypeInfo($db_uploadfiletype)
{
$uploadfiletype = $db_uploadfiletype ? unserialize($db_uploadfiletype) : array();
$attachAllow = pwJsonEncode($uploadfiletype);
$imageAllow = pwJsonEncode(getAllowKeysFromArray($uploadfiletype, array('jpg', 'jpeg', 'gif', 'png', 'bmp')));
return array($attachAllow, $imageAllow);
}
function initAttach($attachs)
{
示例13: pingfenMsg
function pingfenMsg($msg_info)
{
global $baseUrl, $action, $tid;
$msg_info = getLangInfo('msg', $msg_info);
refreshto($baseUrl . 'action=' . $action . '&selid=' . $tid . '&', $msg_info, 3);
}
示例14: Showmsg
Showmsg('bk_credit_type_error');
}
$change = (int) $change;
if (!is_numeric($change) || $change <= 0) {
Showmsg('bk_credit_fillin_error');
}
$change % $jf_A[$type][0] != 0 && Showmsg('change_error');
list($sell, $buy) = explode('_', $type);
$credit1 = $change;
$credit2 = intval($change / $jf_A[$type][0] * $jf_A[$type][1]);
/*
$db->query("LOCK TABLES pw_memberdata WRITE,pw_membercredit WRITE");
$lockfile = D_P.'data/bbscache/lock_profile.txt';
$fp = fopen($lockfile,'wb+');
flock($fp,LOCK_EX);
*/
if (procLock('credit_change', $winduid)) {
if ($credit1 > $credit->get($winduid, $sell)) {
procUnLock('credit_change', $winduid);
Showmsg('bk_credit_change_error');
}
$credit->addLog('main_changereduce', array($sell => -$credit1), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'tocname' => $credit->cType[$buy]));
$credit->addLog('main_changeadd', array($buy => $credit2), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'fromcname' => $credit->cType[$sell]));
$credit->sets($winduid, array($sell => -$credit1, $buy => $credit2));
procUnLock('credit_change', $winduid);
//fclose($fp);
//$db->query("UNLOCK TABLES");
}
refreshto('userpay.php?action=change', 'bank_creditsuccess', 1, true);
}
}
示例15: set_cookie
//XXX 作为demo,临时存放在session中,网站应该用自己安全的存储系统来存储这些信息
//$_SESSION["token"] = $result["oauth_token"];
//$_SESSION["secret"] = $result["oauth_token_secret"];
//$_SESSION["openid"] = $result["openid"];
set_cookie('token_secret', mymd5($result["oauth_token"] . "\t" . $result["oauth_token_secret"] . "\t" . $result["openid"]), 3600);
if ($rs = $db->get_one("SELECT * FROM {$pre}memberdata WHERE `qq_api`='{$result['openid']}'")) {
$userDB->login($rs[username], '', 3600, true);
$fromurl = get_cookie('qq_fromurl');
if ($fromurl && !eregi("login\\.php", $fromurl) && !eregi("reg\\.php", $fromurl)) {
$jumpto = $fromurl;
} else {
$jumpto = "{$webdb['www_url']}/";
}
refreshto("{$jumpto}", "QQ方式登录成功{$uc_login_code}", 1);
} else {
refreshto("qq_bind.php", "QQ登录成功,请进行帐号绑定设置", 10);
}
//第三方处理用户绑定逻辑
//将openid与第三方的帐号做关联
//bind_to_openid();
} else {
//登录前
set_cookie('qq_fromurl', $FROMURL);
redirect_to_login($webdb[QQ_appid], $webdb[QQ_appkey], "{$webdb['www_url']}/do/qq_login.php");
}
/**
* @brief get a access token
* rfc1738 urlencode
* @param $appid
* @param $appkey
* @param $request_token