示例#1
0
文件: sohu.php 项目: pf5512/phpstudy
	$o['Value'] = $one['price'];
	$o['Price'] = $one['nowprice'];
	$o['Rebate'] = $one['discount'];
	$bgtime = str_replace('-', '', $one['begintime']).'000000';
	$ovtime = str_replace('-', '', $one['overtime']).'000000';
	$o['StartTime'] = $bgtime;
	$o['EndTime'] = $ovtime;
	$o['Quantity'] = $one['maxnum'];
	$o['Bought'] = $one['num'];
	$o['MinBought'] = $one['successnum'];
	$o['BoughtLimit'] = $one['oncemax'];

		$g = array();
		$g['Name'] = $one['sellername'];
		$g['ProviderName'] = $one['sellername'];
		$g['ProviderUrl'] = $one['sellerurl'];
		$g['ImageUrlSet'] = imager($one['img']);
		$g['Contact'] = $one['sellerphone'];
		$g['Address'] = $one['selleraddress'];
		$g['Map'] = null;
		$g['Description'] = $one['selleraddress'];

	$o['Goods'] = $g;
	$oa[] = $o;
}

header('Content-Type: application/xml; charset=UTF-8');
Output::SetTagSon('ActivitySet', 'Activity');
if (ENC_IS_GBK) $oa = array_iconv('GBK', 'UTF-8', $oa);
Output::XmlCustom($oa, 'ActivitySet');
?>
示例#2
0
文件: 163.php 项目: hhdem/tuangala_v2
    //$o['identifier'] = $one['id'];
    $o['siteurl'] = $INI['system']['wwwprefix'];
    ($o['city'] = $city) || ($o['city'] = '全国');
    $o['title'] = $one['title'];
    $o['image'] = team_image($one['image'], true);
    ($o['tag'] = $group) || ($o['tag'] = '无');
    $o['startTime'] = $one['begin_time'];
    $o['endTime'] = $one['end_time'];
    $o['value'] = $one['market_price'];
    $o['price'] = $one['team_price'];
    if ($one['market_price'] > 0) {
        $o['rebate'] = moneyit(10 * $one['team_price'] / $one['market_price']);
    } else {
        $o['rebate'] = '0';
    }
    $o['bought'] = abs(intval($one['now_number']));
    $o['merchantEndTime'] = date('Y-n-j', $one['end_time']);
    $item['data']['display'] = $o;
    $p = Table::Fetch('partner', $one['partner_id']);
    $pval = array();
    $pval['name'] = $p['title'];
    $pval['tel'] = $p['tel'];
    $pval['addr'] = $p['address'];
    if ($p['longlat']) {
        list($pval['longitude'], $pval['latitude']) = explode(',', $p['longlat']);
    }
    $item['data']['shops']['shop'] = $pval;
    $oa[] = $item;
}
Output::XmlCustom($oa, 'urlset', 'utf-8');
示例#3
0
文件: soso.php 项目: pf5512/phpstudy
    $item = array();
    $item['keyword'] = "{$si['site_name']} {$team['name']}";
    $item['url'] = "{$si['site_url']}/?view={$team['id']}";
    $item['creator'] = $_SERVER['HTTP_HOST'];
    $item['title'] = "{$si['site_name']} {$team['name']}";
    $item['publishdate'] = date('Y-m-d', $team['begintime']);
    $item['imageaddress1'] = imager($team['img']);
    $item['imagealt1'] = $team['name'];
    $item['imagelink1'] = "{$si['site_url']}/?view={$team['id']}";
    $item['content1'] = $team['name'];
    $item['linktext1'] = $team['name'];
    $item['linktarget1'] = "{$si['site_url']}/?view={$team['id']}";
    $item['content2'] = "{$team['price']}{$rmb}";
    $item['content3'] = "{$team['nowprice']}{$rmb}";
    $item['content4'] = "{$team['discount']}{$rmb}";
    $item['content5'] = $group;
    $item['content6'] = $city;
    $item['content7'] = $team['num'];
    $item['linktext2'] = $si['site_name'];
    $item['linktarget2'] = $si['site_url'];
    $item['content8'] = date('Y-m-d H:i:s', $team['begintime']);
    $item['content9'] = date('Y-m-d H:i:s', $team['overtime']);
    $item['valid'] = '1';
    $itemList[] = $item;
}

$oa['datalist']['item'] = $itemList;

header('Content-Type: application/xml; charset=GBK');
Output::XmlCustom($oa, 'sdd', 'GBK');
?>
示例#4
0
        $partner = Table::Fetch('partner', $coupon['partner_id']);
        $team = Table::Fetch('team', $coupon['team_id']);
        if (!$coupon) {
            $result = false;
        } else {
            if ($coupon['secret'] != $sec) {
                $result = false;
            } else {
                if ($coupon['expire_time'] < strtotime(date('Y-m-d'))) {
                    $result = false;
                } else {
                    if ($coupon['consume'] == 'Y') {
                        $result = false;
                    } else {
                        ZCoupon::Consume($coupon);
                        if (option_yes('usecouponsms')) {
                            sms_usecoupon($coupon);
                        }
                        $result = true;
                        $arr = array(result => true, product => $team['product'], price => $team['team_price']);
                    }
                }
            }
        }
        if ($result) {
            Output::XmlCustom($arr, 'coupon');
        } else {
            Output::XmlCustom(array(result => 'false'), 'coupon');
        }
    }
}