本文整理汇总了PHP中coupon::GetColors方法的典型用法代码示例。如果您正苦于以下问题:PHP coupon::GetColors方法的具体用法?PHP coupon::GetColors怎么用?PHP coupon::GetColors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coupon
的用法示例。
在下文中一共展示了coupon::GetColors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
$data['province'] = trim($_GPC['reside']['province']) ? urlencode(trim($_GPC['reside']['province'])) : message('请选择门店所在省');
$data['city'] = trim($_GPC['reside']['city']) ? urlencode(trim($_GPC['reside']['city'])) : message('请选择门店所在市');
$data['district'] = trim($_GPC['reside']['district']) ? urlencode(trim($_GPC['reside']['district'])) : message('请选择门店所在区');
$data['address'] = trim($_GPC['address']) ? urlencode(trim($_GPC['address'])) : message('门店详细地址不能为空');
$data['longitude'] = trim($_GPC['baidumap']['lng']) ? trim($_GPC['baidumap']['lng']) : message('请选择门店所在地理位置经度');
$data['latitude'] = trim($_GPC['baidumap']['lat']) ? trim($_GPC['baidumap']['lat']) : message('请选择门店所在地理位置维度');
$data['telephone'] = trim($_GPC['telephone']) ? trim($_GPC['telephone']) : message('门店电话不能为空');
$acid = intval($_GPC['acid']);
load()->model('coupon');
unset($data['acid']);
$post[] = $data;
$acc = new coupon($acid);
$status = $acc->LocationBatchAdd($post);
if (is_error($status)) {
message($status['message'], referer(), 'error');
}
$data['acid'] = $acid;
$data['uniacid'] = $_W['uniacid'];
//插入数据库
pdo_insert('coupon_location', $data);
$id = pdo_insertid();
message('添加门店成功', url('manage/location_list'), 'success');
}
}
if ($do == 'display') {
load()->model('coupon');
$acid = 269;
$acc = new coupon($acid);
$status = $acc->GetColors($post);
}
template('wechat/location');
示例2: intval
$acid = intval($_GPC['__acid']);
if (!$acid || empty($accounts[$acid])) {
message('公众号不存在', url('wechat/account'), 'error');
} else {
isetcookie('__acid', $acid, 86400 * 3);
}
if ($do == 'location') {
$location = pdo_fetchall('SELECT id,location_id, business_name, address FROM ' . tablename('coupon_location') . " WHERE acid = :acid AND status = :status AND location_id != ''", array(':acid' => $acid, ':status' => 1));
template('wechat/location_model');
exit;
}
$accdata = $accounts[$acid];
if (empty($_GPC['__color'])) {
load()->classs('coupon');
$acc = new coupon($acid);
$status = $acc->GetColors();
if (is_error($status)) {
message($status['message'], referer(), 'error');
}
foreach ($status['colors'] as $val) {
$colors[$val['name']] = $val;
}
$colors = base64_encode(iserializer($colors));
isetcookie('__color', $colors, 86400 * 7);
}
$colors = iunserializer(base64_decode($_GPC['__color']));
load()->func('tpl');
load()->model('coupon');
load()->classs('coupon');
$setting = pdo_fetch('SELECT * FROM ' . tablename('coupon_setting') . ' WHERE uniacid = :aid AND acid = :cid', array(':aid' => $_W['uniacid'], ':cid' => $acid));
$setting['logourl_'] = media2local($setting['logourl']);