<?php

// testCopyCourier.php


include_once ("../include/mcglobal.inc.php");
include_once ("../include/auth.inc.php");
include_once ("../include/inc_courier.inc.php");



$debug = false;

$modifyArr = array();
$modifyArr["hq_id"] = "90";
$modifyArr["cr_id_parent"] = "0";
$modifyArr["cr_hq_id"] = "90";
$modifyArr["cr_eid_prefix"] = "STSL";
$modifyArr["cr_sid_prefix"] = "SL";
$modifyArr["crvh_sid_prefix"] = "SL";
$modifyArr["usr_account_prefix"] = "SL";
$modifyArr["usr_password"] = "38fb843c55682a6f";
$modifyArr["usr_password2"] = "38fb843c55682a6f";
$modifyArr["sys_inc_geocode_disabled"] = "1";
$modifyArr["noValidationOfAddress"] = true;



$crIdSrcArr = array('9152','9368','9837','10393','10555','10555','10637','10637','11791','11821','11934','12261','12436','12494','12602','12627',
'12713','12754','12843','12853','12998','13116','13140','13160','13180','13308','13309','13310','13365','13424','13469','13490','13501','13508',
'13511','13569','13591','13595','13596','13648','13701','13702','13703');


$crIdSrcArrLen = count($crIdSrcArr);

for ($j = 0; $j < $crIdSrcArrLen; $j++) :

    $outArr = copyCourier($crIdSrcArr[$j], $modifyArr);
    
    echo $crIdSrcArr[$j];
    echo "<br>";
endfor;





/*
SELECT cr.cr_id, cr.cr_eid, cr.cr_sid, crvh.crvh_sid, crvh.crvh_id 
  FROM 
    courier AS cr, 
    couriervehicle AS crvh
  WHERE 
    cr.hq_id = '1' AND 
    cr.cr_id_parent = '0' AND 
    cr.cr_availabletime >= '2023-05-01 00:00:00' AND 
    cr.cr_id = crvh.cr_id AND
    crvh.crvh_sid NOT IN ('HB1888','HB1777','HB1666','HB1555')
  ORDER BY crvh.crvh_sid
  LIMIT 0,1000
*/

?>