本文整理匯總了PHP中coupon::fetchCard方法的典型用法代碼示例。如果您正苦於以下問題:PHP coupon::fetchCard方法的具體用法?PHP coupon::fetchCard怎麽用?PHP coupon::fetchCard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類coupon
的用法示例。
在下文中一共展示了coupon::fetchCard方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
foreach ($data as &$da) {
$da['date_info'] = @iunserializer($da['date_info']);
$da['location_id_list'] = @iunserializer($da['location_id_list']);
}
}
$pager = pagination($total, $pindex, $psize);
template('wechat/card');
}
if ($do == 'sync') {
$id = intval($_GPC['cid']);
$card = pdo_fetch('SELECT id,status,card_id,acid FROM ' . tablename('coupon') . ' WHERE acid = :acid AND id = :id', array(':acid' => $acid, ':id' => $id));
if (empty($card) || empty($card['card_id'])) {
message('卡券不存在或卡券id為空', referer(), 'error');
}
$coupon = new coupon($acid);
$card = $coupon->fetchCard($card['card_id']);
if (is_error($card)) {
message($card['message'], referer(), 'error');
}
$type = strtolower($card['card_type']);
$coupon_status = coupon_status();
$status = $coupon_status[$card[$type]['base_info']['status']];
pdo_update('coupon', array('status' => $status), array('acid' => $acid, 'id' => $id));
message('更新卡券狀態成功', referer(), 'success');
}
if ($do == 'del') {
$id = intval($_GPC['id']);
$card_id = pdo_fetchcolumn('SELECT card_id FROM ' . tablename('coupon') . ' WHERE acid = :acid AND id = :id', array(':acid' => $acid, ':id' => $id));
$status = coupon_delete($id);
if (!is_error($status) || $_GPC['force'] == 1) {
pdo_delete('coupon', array('id' => $id, 'uniacid' => $_W['uniacid']));