"0") :
$crEid = getFieldValueFromId("courier","usr_id",$usr_id,"cr_eid"); // $crEid = "STB283531";
endif;
$constListBgCol1 = "#AAAAFF";
$constListBgCol2 = "#AAAAFF";
$constListBgCol3 = "#CCCCFF";
$constListBgCol4 = "#CCCCFF";
if ($f_act == "") : $f_act = ""; endif;
if ($stmNumber == "") : $stmNumber = "0"; endif;
if ($f_showDateAndTime == "") : $f_showDateAndTime = "0"; endif; // Show the clock time fields [default "NO"]
// Check ranges of time. All fields have to be set
if ($f_showDateAndTime == "0" || $hour_from == "" || $minute_from == "" || $hour_to == "" || $minute_to == "") :
$hour_from = "00";
$minute_from = "00";
$hour_to = "23";
$minute_to = "59";
$f_showDateAndTime == "0";
endif;
$hour_from = pad($hour_from,2);
$minute_from = pad($minute_from,2);
$hour_to = pad($hour_to,2);
$minute_to = pad($minute_to,2);
// Time range
$fromTimeRange = " " . $hour_from . ":" . $minute_from . ":00";
$toTimeRange = " " . $hour_to . ":" . $minute_to . ":59";
// Check ranges of date. All fields have to be set
if ($day_from == "" || $month_from == "" || $year_from == "" ||
$day_to == "" || $month_to == "" || $year_to == "") :
// Initialize date-ranges to the current date
$fromDateRange = getDateTime("3") . $fromTimeRange;
$toDateRange = getDateTime("3") . $toTimeRange;
$day_from = getDateTime("day");
$month_from = getDateTime("month");
$year_from = getDateTime("year");
$day_to = getDateTime("day");
$month_to = getDateTime("month");
$year_to = getDateTime("year");
else :
$fromDateRange = $year_from . "-" . pad($month_from,2) . "-" . pad($day_from,2) . $fromTimeRange;
$toDateRange = $year_to . "-" . pad($month_to,2) . "-" . pad($day_to,2) . $toTimeRange;
endif;
/*
echo "year_from: " . $year_from . "
";
// Get the year of the begin of history data
$dbhistory = getDBNames($dbhistory, $year_from);
echo "dbhistory: " . $dbhistory . "
";
$remDbHistory = $dbhistory;
$constYearOfBeginHistory = getParameterValue("0", "STATISTIC_YEAR_OF_BEGIN_HISTORY", "0");
if ($dbhistory == "1" || !is_numeric($constYearOfBeginHistory) || $constYearOfBeginHistory >= getDateTime("year")) :
$constYearOfBeginHistory = "";
endif;
echo "constYearOfBeginHistory: " . $constYearOfBeginHistory . "
";
echo "dbh_jb: " . $dbh_jb . "
";
*/
// Get the year of the begin of history data
$dbhistory = "0";
// echo "dbhistory: " . $dbhistory . "
";
$dbhistory = getDBNames($dbhistory, $year_from);
// echo "dbhistory: " . $dbhistory . "
";
$constYearOfBeginHistory = getParameterValue("0", "STATISTIC_YEAR_OF_BEGIN_HISTORY", "0");
if ($dbhistory == "0" && is_numeric($constYearOfBeginHistory) && $year_from <= $constYearOfBeginHistory) :
$dbhistory = "1";
$dbhistory = getDBNames($dbhistory, $year_from);
endif;
$remDbHistory = $dbhistory;
// echo "year_from: " . $year_from . "
";
// echo "dbhistory: " . $dbhistory . "
";
// echo "constYearOfBeginHistory: " . $constYearOfBeginHistory . "
";
// echo "dbh_jb: " . $dbh_jb . "
";
// Converts matrix (2-dim-array) to vector (1-dim-array) e.g. like "csv-lines"
function specialConvertAssociativeMatrixToTable ($matrix, $typeArr = array(), $alignArr =array(), $noDisplayTableTag = "", $cssTable = "", $cssTr = "", $cssTd = "") {
global $constListBgCol1,$constListBgCol2,$constListBgCol3,$constListBgCol4;
$retValue = "";
if (is_array($matrix)) :
if ($noDisplayTableTag != "1") :
$retValue .= "
| \n"; $retValue .= $val; $retValue .= " | \n"; else : $retValue .= $val; // Content in $colArray[$j] is like "
| " . getLngt("Transporteur") . " | "; $outTable .= "" . getLngt("Vorname") . " | "; $outTable .= "" . getLngt("Nachname") . " | "; $outTable .= "" . getLngt("Auftragsanzahl") . " | "; $outTable .= "" . getLngt("Umsatz") . " | "; $outTable .= "