Esempio n. 1
0
function dooexport($request)
{
    extract(_validate($request));
    $tpl = new Simplate();
    $tpl->customers = _query($from, $till);
    $result = $tpl->render('sales.csv');
    $result_length = strlen($result);
    $filename = "sales-{$from}-{$till}.cvs";
    header('Content-Disposition: attachment; filename="' . $filename . '"');
    header("Content-Type: application/vnd.ms-excel");
    header("Content-Length: {$result_length}");
    echo $result;
}
Esempio n. 2
0
// 店舗用
require_once '/usr/goonet/HTTP_PHP/lib/api/Api.php';
// API共通
require_once '/usr/goonet/HTTP_PHP/lib/api/Zaiko.php';
// API Zaiko共通
$Sanitizing = new Sanitizing();
$Logger = new Logger("StockCarDetail");
$Param = new Parameter();
$Search = new Search();
$tt_sub_photo = new TT_SubPhoto();
$Shop = new Shop();
$Api = new Api();
$Zaiko = new Zaiko();
$Logger->setLogFilePath("/usr/LOG/api_stock.log.daily");
$data = $_GET;
if (!_validate($data, $Logger)) {
    exit;
}
$Param->allSetter($data);
$goo_car_id = isset($data['goo_car_id']) ? $data['goo_car_id'] : '';
$stock_id = isset($data['stock_id']) ? $data['stock_id'] : '';
//baitaiがカラで、gooworldからの遷移とき
if ($data['baitai'] == '' && strstr($_SERVER['HTTP_HOST'], "gooworld.jp")) {
    $Param->setBaitai('goow_iphone');
    // 媒体
} else {
    $Param->setBaitai($data['baitai']);
    // 媒体
}
//APIVerを指定
$apiVer = 0;