本文整理汇总了PHP中udecode函数的典型用法代码示例。如果您正苦于以下问题:PHP udecode函数的具体用法?PHP udecode怎么用?PHP udecode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了udecode函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRecentGoods
}
getRecentGoods($id);
// 查看是否已经收藏该团购
$had_collect = false;
if ($login_user_id) {
$collect = DB::GetTableRow("collect",array('user_id'=>$login_user_id,'team_id'=>$id));
if($collect){
$had_collect = true;
}
}
/* refer */
if ($_rid = strval($_GET['r'])) {
$_rid = udecode($_rid);
$_user = Table::Fetch('user',$_rid,'email');
if($_user) cookieset('_rid', abs(intval($_user['id'])));
redirect( WEB_ROOT . "/team.php?id={$id}");
}
$teamcity = Table::Fetch('category', $team['city_id']);
$city = $teamcity ? $teamcity : $city;
$city = $city ? $city : array('id'=>0, 'name'=>'全部');
$pagetitle = $team['title'];
$discount_price = $team['market_price'] - $team['team_price'];
$discount_rate = team_discount($team);
$left = array();
$now = time();
示例2: redirect
$login_user = ZUser::GetLogin($_POST['email'], $_POST['password']);
if (!$login_user) {
Session::Set('error', '登录失败');
redirect(WEB_ROOT . '/account/login.php');
} else {
if (option_yes('mobilecode') && $login_user['emailable'] == 'Y' && $login_user['enable'] == 'N') {
$user['id'] = $login_user['id'];
Session::Set('error', '请验证手机号');
die(include template('account_signmobile'));
} else {
if (option_yes('emailverify') && $login_user['emailable'] == 'N' && $login_user['enable'] == 'N' && $login_user['secret']) {
Session::Set('unemail', $_POST['email']);
redirect(WEB_ROOT . '/account/verify.php');
} else {
Session::Set('user_id', $login_user['id']);
if (abs(intval($_POST['auto_login']))) {
ZLogin::Remember($login_user);
}
ZUser::SynLogin($login_user['username'], $_POST['password']);
ZCredit::Login($login_user['id']);
redirect(get_loginpage(WEB_ROOT . '/index.php'));
}
}
}
}
$currefer = strval($_GET['r']);
if ($currefer) {
Session::Set('loginpage', udecode($currefer));
}
$pagetitle = '登录';
include template('account_login');
示例3: require_once
* ----------------------------------------------------------------------------
* This is not free software
* ----------------------------------------------------------------------------
* @author abei <abei@qiang8.cn>
* @version 1.0
* @link http://www.qiang8.cn
*/
require_once(dirname(dirname(__FILE__)) . '/app.php');
$ename = strval($_GET['n']);
$currefer = null;
if ($ename&&$ename!='none') {
$city = Table::Fetch('category', $ename, 'ename');
if ($city) {
cookie_city($city);
$currefer = udecode($currefer);
if ($currefer) {
redirect($currefer);
} else if ( $_SERVER['HTTP_REFERER'] ) {
if (!preg_match('#'.$_SERVER['HTTP_HOST'].'#', $_SERVER['HTTP_REFERER'])) {
redirect( 'index.php');
}
if (preg_match('#/city#', $_SERVER['HTTP_REFERER'])) {
redirect( 'index.php');
}
redirect($_SERVER['HTTP_REFERER']);
}
redirect('index.php');
}
}
示例4: dirname
<?php
require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_auth('ask');
$id = abs(intval($_GET['id']));
Table::Delete('ask', $id);
Session::Set('notice', "删除团购咨询({$id})记录成功");
redirect(udecode($_GET['r']));
示例5: dirname
<?php
require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_auth('market');
$action = strval($_GET['action']);
$id = abs(intval($_GET['id']));
$r = udecode($_GET['r']);
$cate = strval($_GET['cate']);
$like = strval($_GET['like']);
if ($action == 'r') {
Table::Delete('feedback', $id);
redirect($r);
} else {
if ($action == 'm') {
Table::UpdateCache('feedback', $id, array('user_id' => $login_user_id));
redirect($r);
}
}
$condition = array();
if ($cate) {
$condition['category'] = $cate;
}
if ($like) {
$condition[] = "content like '%" . mysql_escape_string($like) . "%'";
}
$count = Table::Count('feedback', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$asks = DB::LimitQuery('feedback', array('condition' => $condition, 'order' => 'ORDER BY id DESC', 'size' => $pagesize, 'offset' => $offset));
$user_ids = Utility::GetColumn($asks, 'user_id');
$users = Table::Fetch('user', $user_ids);
示例6: dirname
<?php
require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
$id = abs(intval($_GET['id']));
$team = Table::Fetch('team', $id);
$order = Table::Fetch('order', $id, 'team_id');
if ($order) {
Session::Set('notice', "删除团购({$id})记录失败,存在订单记录");
} else {
Table::Delete('team', $id);
Session::Set('notice', "删除团购({$id})记录成功");
}
Utility::Redirect(udecode($_GET['r']));
示例7: cookie_city
function cookie_city($city)
{
if ($city) {
$city_v = uencode("{$city['id']}|{$city['ename']}|{$city['name']}");
$expire = time() + 365 * 86400;
cookieset('city', $city_v);
} else {
if (!cookieget('city')) {
$city = get_city();
if (!$city) {
return array();
}
return cookie_city($city);
} else {
$v = explode('|', udecode(cookieget('city')));
return array('id' => $v[0], 'ename' => $v[1], 'name' => $v[2]);
}
}
return $city;
}
示例8: dirname
<?php
require_once dirname(__FILE__) . '/app.php';
$mail = strval($_GET['r']);
if ($mail) {
$mail = udecode($mail);
$user = Table::Fetch('user', $mail, 'email');
$id = $user['id'];
if ($login_user_id) {
ZInvite::CreateFromId($id, $login_user_id);
} else {
$longtime = 86400 * 3;
//3 days
cookieset('_rid', $id, $longtime);
}
}
redirect(WEB_ROOT . '/index.php');