本文整理汇总了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']));