bebeboutik-scripts/export_pdf.php
2017-12-18 17:14:31 +01:00

65 lines
3.3 KiB
PHP

<?php
if (isset($_SERVER['REMOTE_ADDR'])) {
exit;
}
$_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
$_SERVER['SERVER_NAME'] = 'www.bebeboutik.com';
$_SERVER['HTTP_PORT'] = 80;
$_SERVER['SERVER_ADDR'] = '127.0.0:1';
$_SERVER['REMOTE_ADDR'] = '127.0.0:1';
include dirname(__FILE__).'/www/config/config.inc.php';
// $cookie = new Cookie('ps');
// foreach( array(299018, 288941, 289938, 284443, 289421, 285700, 289459, 274391,
// 273319, 272544, 271819, 269964, 265852, 260292, 259059, 265544, 261308,
// 257100, 234423, 240829, 240829, 233767, 217497, 205633, 203823, 201126,
// 187387, 185462, 179854, 166753, 176233, 183491, 177402, 279535, 292812,
// 266573, 277760, 274366, 274318, 273079, 257063, 256322, 250723, 245678,
// 238412, 237659, 196253, 192709, 180700, 180046, 175868, 302878, 298027,
// 297853, 299159, 297052, 294427, 293780, 298746, 298927, 297934, 298480,
// 291756, 291544, 296747, 290810, 290168, 287607, 287277, 285811, 289946,
// 288263, 288795, 288591, 289048, 285813, 287451, 285987, 287996, 291066,
// 289082, 288720, 284603, 286209, 291216, 283027, 289347, 284423, 288667,
// 284717, 278478, 294520, 294799, 281439, 295020, 284542, 287228, 289790,
// 282791, 283355, 280889, 280188, 284988, 278545, 284070, 282825, 280327,
// 279775, 277188, 283192, 278137, 278137, 281455, 277836, 271812, 275759,
// 275407, 274469, 279319, 274013, 271066, 270306, 271764, 273388, 276328,
// 267492, 272076, 277800, 284796, 284462, 275265, 270320, 270486, 270171,
// 267818, 267585, 269886, 266411, 266333, 268554, 264148, 265590, 262954,
// 262851, 260846, 262689, 261596, 262103, 261976, 261521, 262447, 260983,
// 259890, 262905, 260747, 261067, 258471, 235844, 243813, 225221, 229011,
// 222430, 203373, 204814, 206033, 204894, 200585, 200839, 200125, 198425,
// 188263, 197940, 194892, 187277, 188266, 176280, 294794, 256386, 267588,
// 259733, 255594, 250994, 255479, 253251, 252393, 252441, 251929, 252987,
// 252734, 249873, 250484, 249240, 248519, 248202, 256012, 250175, 248340,
// 250448, 248500, 246880, 249146, 247554, 247139, 246179, 246930, 245615,
// 246352, 241094, 244392, 241484, 241314, 240026, 240797, 240427, 239982,
// 240330, 237796, 237127, 238402, 239833, 239833, 236551, 245077, 300088,
// 286495, 290190, 296685, 290539, 291935, 287612, 284108, 285930, 285284,
// 288626, 290659, 295252, 292214, 287915, 278572, 282846, 281120, 281324,
// 292999, 279299, 278681, 276840, 272366, 274417, 276233, 272552, 267126,
// 273451, 267563, 266108, 267186, 269235, 258571, 257172, 258306, 259788,
// 259000, 259547, 254186, 225736) as $id_order) {
// $pdf = new PDF('P', 'mm', 'A4');
// $order = new Order((int) $id_order);
// if(Validate::isLoadedObject($order)) {
// PDF::invoice($order, 'F', TRUE, $pdf);
// $pdf->Output(dirname(__FILE__).'/pdf/'.(int) $id_order.'.pdf', 'F');
// } else {
// echo $id_order."\n";
// }
// }
//
foreach( array('8R27056095774' '7R00015822420' '7R00015822253' '6A10909980655' '6A09248520172') as $id_order) {
$pdf = new PDF('P', 'mm', 'A4');
$order = new Order((int) $id_order);
if(Validate::isLoadedObject($order)) {
PDF::invoice($order, 'F', TRUE, $pdf);
$pdf->Output(dirname(__FILE__).'/pdf/'.(int) $id_order.'.pdf', 'F');
} else {
echo $id_order."\n";
}
}