1 AND tr.ad_id = ad.ad_id";
$res = $db->query($sqlquery) or die($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: [$sqlquery] " . $res->getMessage());
if ($row = $res->fetch_assoc()):
$retVal .= $row["tr_comp2"];
if ($jb_id == $jb_ids_special):
$retVal .= " - lfd. Nr.: " . $row["tr_sort"];
endif;
$retVal .= "
\n
\n";
$retVal .= $row["tr_comp"] . "
\n";
if (trim($row["tr_person"]) != ""):
$retVal .= $row["tr_person"] . "
\n";
endif;
$retVal .= $row["ad_street"] . " " . $row["tr_hsno"] . "
\n";
$retVal .= $row["ad_zipcode"] . " " . $row["ad_city"] . "
\n
\n";
if (trim($row["tr_phone"]) != ""):
$retVal .= "Tel.: " . $row["tr_phone"] . "
\n
\n";
endif;
endif;
$res->free();
$sqlquery = "SELECT ec_inv_no, ec_weight, ec_moa3, ec_dim FROM phoenix_log.edi_consignee WHERE ec_track_id = '$f_id'";
$res = $db->query($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: [$sqlquery] " . $res->getMessage());
if ($row = $res->fetch_assoc()):
$retVal .= $row["ec_inv_no"] . "
\n";
$p = xml_parser_create();
xml_parse_into_struct($p, $row["ec_moa3"], $vals, $index);
xml_parser_free($p);
if ($usr_id == 300001):
$retVal .= "Wert (netto): " . $vals[5]["value"] . " €
\n";
endif;
if (substr($row["ec_weight"], 0, 1) == "."):
$row["ec_weight"] = "0" . $row["ec_weight"];
endif;
$retVal .= "Gewicht (brutto): " . str_replace(".", ",", $row["ec_weight"]) . " kg
\n";
$p = xml_parser_create();
xml_parse_into_struct($p, $row["ec_dim"], $vals, $index);
xml_parser_free($p);
$retVal .= "LxBxH (cm):" . str_replace(".", ",", $vals[8]["value"]) . "x" . str_replace(".", ",", $vals[11]["value"]) . "x" . str_replace(".", ",", $vals[14]["value"]) . "
\n";
endif;
$res->free();
if ($usr_id == 300001):
$sqlquery = "SELECT ep_ven_no, ep_pci FROM phoenix_log.edi_consignee, phoenix_log.edi_package WHERE ec_track_id = '$f_id' AND phoenix_log.edi_consignee.ec_inv_no = phoenix_log.edi_package.ec_inv_no";
$res = $db->query($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: [$sqlquery] " . $res->getMessage());
$retVal .= "
| (" . str_replace(" ", " ", trim($vals[5]["value"])) . " | " . $row["ep_ven_no"] . " | " . "" . trim($vals[14]["value"]) . " x | " . trim($vals[20]["value"]) . " € = | " . trim($vals[23]["value"]) . " €) |