本文整理汇总了PHP中favourable_info函数的典型用法代码示例。如果您正苦于以下问题:PHP favourable_info函数的具体用法?PHP favourable_info怎么用?PHP favourable_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了favourable_info函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
unset($_SESSION['direct_shopping']);
} elseif ($_REQUEST['step'] == 'update_cart') {
if (isset($_POST['goods_number']) && is_array($_POST['goods_number'])) {
flow_update_cart($_POST['goods_number']);
}
show_message($_LANG['update_cart_notice'], $_LANG['back_to_cart'], 'flow.php');
exit;
} elseif ($_REQUEST['step'] == 'drop_goods') {
$rec_id = intval($_GET['id']);
flow_drop_cart_goods($rec_id);
ecs_header("Location: flow.php\n");
exit;
} elseif ($_REQUEST['step'] == 'add_favourable') {
/* 取得优惠活动信息 */
$act_id = intval($_POST['act_id']);
$favourable = favourable_info($act_id);
if (empty($favourable)) {
show_message($_LANG['favourable_not_exist']);
}
/* 判断用户能否享受该优惠 */
if (!favourable_available($favourable)) {
show_message($_LANG['favourable_not_available']);
}
/* 检查购物车中是否已有该优惠 */
$cart_favourable = cart_favourable();
if (favourable_used($favourable, $cart_favourable)) {
show_message($_LANG['favourable_used']);
}
/* 赠品(特惠品)优惠 */
if ($favourable['act_type'] == FAT_GOODS) {
/* 检查是否选择了赠品 */
示例2: favourable_info
$tui_info=array();
for($i=0;$i<$new_num;$i++){
$tui_info[$i]=get_recommend_goods12('new',$new_cat[$i]['cat_id'],8);
}
$smarty->assign('tui_info', $tui_info);
$smarty->assign('favourable', favourable_info(1));//促销活动 墙壁 地板 厨房 浴室卫生间
$smarty->assign('p_num', get_p_num());
$smarty->assign('zhonghe', get_area_name(''));
$smarty->assign('pengding', get_area_name('棚顶'));
$smarty->assign('qiangbi', get_area_name('墙壁'));
$smarty->assign('diban', get_area_name('地板'));
$smarty->assign('chufang', get_area_name('厨房'));
$smarty->assign('yushi', get_area_name('浴室'));
$smarty->assign('weishengjian', get_area_name('卫生间'));
$arr2['id'] ='223';
$arr2['num'] ='1';
示例3: make_json_result
make_json_result($val);
} elseif ($_REQUEST['act'] == 'add' || $_REQUEST['act'] == 'edit') {
/* 检查权限 */
admin_priv('favourable');
/* 是否添加 */
$is_add = $_REQUEST['act'] == 'add';
$smarty->assign('form_action', $is_add ? 'insert' : 'update');
/* 初始化、取得优惠活动信息 */
if ($is_add) {
$favourable = array('act_id' => 0, 'act_name' => '', 'start_time' => date('Y-m-d', time() + 86400), 'end_time' => date('Y-m-d', time() + 4 * 86400), 'user_rank' => '', 'act_range' => FAR_ALL, 'act_range_ext' => '', 'min_amount' => 0, 'max_amount' => 0, 'act_type' => FAT_GOODS, 'act_type_ext' => 0, 'gift' => array());
} else {
if (empty($_GET['id'])) {
sys_msg('invalid param');
}
$id = intval($_GET['id']);
$favourable = favourable_info($id);
if (empty($favourable)) {
sys_msg($_LANG['favourable_not_exist']);
}
}
$smarty->assign('favourable', $favourable);
/* 取得用户等级 */
$user_rank_list = array();
$user_rank_list[] = array('rank_id' => 0, 'rank_name' => $_LANG['not_user'], 'checked' => strpos(',' . $favourable['user_rank'] . ',', ',0,') !== false);
$sql = "SELECT rank_id, rank_name FROM " . $ecs->table('user_rank');
$res = $db->query($sql);
while ($row = $db->fetchRow($res)) {
$row['checked'] = strpos(',' . $favourable['user_rank'] . ',', ',' . $row['rank_id'] . ',') !== false;
$user_rank_list[] = $row;
}
$smarty->assign('user_rank_list', $user_rank_list);
示例4: favourableInfo
function favourableInfo()
{
return favourable_info();
}