"; endif; // $j = array_search("cs_eid",$displayedListColsArray); // if ($j === FALSE) : $tableHeaderSearchFieldsExtra .= ""; endif; // $j = array_search("cscad_phone",$displayedListColsArray); // if ($j === FALSE) : $tableHeaderSearchFieldsExtra .= ""; endif; $f_cmp_match = trim($f_cmp_match); if ($constSearchCscsclistCmpcompCmpmatch == "1" && $f_cmp_match == "") : $f_cmp_match = trim($f_cmp_comp); endif; // $f_cs_eid = trim($f_cs_eid); // if ($constSearchCscsclistCmpcompCseid == "1" && $f_cs_eid == "") : $f_cs_eid = trim($f_cmp_comp); endif; // $f_phone = trim($f_phone); // if ($constSearchCscsclistCmpcompCscadphone == "1" && $f_usr_phone == "") : $f_usr_phone = trim($f_cmp_comp); endif; // * END * // EXPORT: Table header export select fields $tableHeaderExportFields = ""; if (TRUE) : $rangeTo = $displayedListColsArrayLen; // upper range for export fields almost is less or equal than number of elements for output on screen $dspColHeaderExportFieldArray = array(); $dspColHeaderExportFieldArray["cmp_comp"] = ""; $dspColHeaderExportFieldArray["cmp_comp2"] = ""; $dspColHeaderExportFieldArray["cmp_comp3"] = ""; $dspColHeaderExportFieldArray["cmp_comp4"] = ""; $dspColHeaderExportFieldArray["ad_street"] = ""; $dspColHeaderExportFieldArray["cmp_hsno"] = ""; $dspColHeaderExportFieldArray["ad_zipcode"] = ""; $dspColHeaderExportFieldArray["ad_city"] = ""; $dspColHeaderExportFieldArray["cmp_match"] = ""; $dspColHeaderExportFieldArray["cs_eid"] = ""; $dspColHeaderExportFieldArray["usr_phone"] = ""; $dspColHeaderExportFieldArray["usr_email"] = ""; $dspColHeaderExportFieldArray["usr_name"] = ""; $dspColHeaderExportFieldArray["usr_firstname"] = ""; $dspColHeaderExportFieldArray["br_key"] = ""; $dspColHeaderExportFieldArray["br_name"] = ""; endif; // OUTPUT: Table header search fields $tableHeaderSearchFields = ""; if (TRUE) : $dspColHeaderSearchFieldArray = array(); $dspColHeaderSearchFieldArray["cmp_comp"] = ""; $dspColHeaderSearchFieldArray["cmp_comp2"] = ""; $dspColHeaderSearchFieldArray["cmp_comp3"] = ""; $dspColHeaderSearchFieldArray["cmp_comp4"] = ""; $dspColHeaderSearchFieldArray["ad_street"] = ""; $dspColHeaderSearchFieldArray["cmp_hsno"] = ""; $dspColHeaderSearchFieldArray["ad_zipcode"] = ""; $dspColHeaderSearchFieldArray["ad_city"] = ""; $dspColHeaderSearchFieldArray["cmp_match"] = ""; $dspColHeaderSearchFieldArray["cs_eid"] = ""; $dspColHeaderSearchFieldArray["cs_discount"] = ""; $dspColHeaderSearchFieldArray["usr_phone"] = ""; $dspColHeaderSearchFieldArray["usr_email"] = ""; $dspColHeaderSearchFieldArray["usr_inv_email"] = ""; $dspColHeaderSearchFieldArray["usr_reminder_email"] = ""; $dspColHeaderSearchFieldArray["cmp_sustainability_email"] = ""; $dspColHeaderSearchFieldArray["cmp_stax_idno"] = ""; $dspColHeaderSearchFieldArray["tx_sign"] = ""; $dspColHeaderSearchFieldArray["tx_value"] = ""; $dspColHeaderSearchFieldArray["cmp_inv2hq"] = ""; $dspColHeaderSearchFieldArray["mt_value_payment_term"] = ""; $dspColHeaderSearchFieldArray["usr_name"] = ""; $dspColHeaderSearchFieldArray["usr_firstname"] = ""; $dspColHeaderSearchFieldArray["csc_id_jb_edit"] = " "; $dspColHeaderSearchFieldArray["cs_id_history"] = " "; $dspColHeaderSearchFieldArray["cs_id_report"] = " "; $dspColHeaderSearchFieldArray["cmp_authenticated_img"] = " " . getLngt("Suchen") . " "; $dspColHeaderSearchFieldArray["cs_id_jb_permanent"] = " "; // $dspColHeaderSearchFieldArray["cmp_cashmode"] = " "; $dspColHeaderSearchFieldArray["cmp_id_edit"] = " "; $dspColHeaderSearchFieldArray["cs_num_of_documents"] = " "; $dspColHeaderSearchFieldArray["br_key"] = ""; $dspColHeaderSearchFieldArray["br_name"] = ""; $dspColHeaderSearchFieldArray["cs_eid_old"] = ""; $dspColHeaderSearchFieldArray["cs_become_cs_date"] = ""; // Use "check-array" to avoid search fields by multiple columns of the same (DB) field $chkArr = array(); $tmpKeys = array_keys($dspColHeaderSearchFieldArray); for ($i = 0; $i < $displayedListColsArrayLen; $i++) { // Search for the value "$displayedListColsArray" in "$dspColArray" and get the key (index) $j = array_search($displayedListColsArray[$i], $tmpKeys); if (!($j === FALSE)) : $cellColor = getListColor(1, 1); if (!in_array($tmpKeys[$j], $chkArr)) : $tableHeaderSearchFields .= "" . $dspColHeaderSearchFieldArray[$tmpKeys[$j]] . ""; array_push($chkArr, $tmpKeys[$j]); else : $tableHeaderSearchFields .= "" . " " . ""; endif; endif; } endif; // OUTPUT: Table header column links $tableHeaderLinks = ""; if (TRUE) : $dspColHeaderLinksArray = array(); $dspColHeaderLinksArray["cmp_comp"] = " " . getLngt("Firma") . " "; $dspColHeaderLinksArray["cmp_comp2"] = " " . getLngt("Firma2") . " "; $dspColHeaderLinksArray["cmp_comp3"] = " " . getLngt("Firma3") . " "; $dspColHeaderLinksArray["cmp_comp4"] = " " . getLngt("Firma4") . " "; $dspColHeaderLinksArray["ad_street"] = " " . getLngt("Strasse") . " "; $dspColHeaderLinksArray["cmp_hsno"] = " " . getLngt("Hausnr.") . " "; $dspColHeaderLinksArray["ad_zipcode"] = " " . getLngt("PLZ") . " "; $dspColHeaderLinksArray["ad_city"] = " " . getLngt("Ort") . " "; $dspColHeaderLinksArray["cmp_match"] = " " . getLngt("Freitext") . " "; $dspColHeaderLinksArray["cs_eid"] = " " . getLngt("EID") . " "; $dspColHeaderLinksArray["cs_discount"] = " " . getLngt("Rabatt") . " "; $dspColHeaderLinksArray["usr_phone"] = " " . getLngt("Telefon") . " "; $dspColHeaderLinksArray["usr_email"] = " " . getLngt("Email") . " "; $dspColHeaderLinksArray["usr_inv_email"] = " " . getLngt("Rechnungs-Email") . " "; $dspColHeaderLinksArray["usr_reminder_email"] = " " . getLngt("Mahn-Email") . " "; $dspColHeaderLinksArray["cmp_sustainability_email"] = " " . getLngt("Nachhaltigkeits-Email") . " "; $dspColHeaderLinksArray["cmp_stax_idno"] = " " . getLngt("USt-IdNr.") . " "; $dspColHeaderLinksArray["tx_sign"] = " " . getLngt("USt-Kennz.") . " "; $dspColHeaderLinksArray["tx_value"] = " " . getLngt("USt-Satz") . " "; $dspColHeaderLinksArray["cmp_inv2hq"] = " " . getLngt("Einzelrechnung") . " "; $dspColHeaderLinksArray["mt_value_payment_term"] = " " . getLngt("Zahlungsbedingung") . " "; $dspColHeaderLinksArray["usr_name"] = " " . getLngt("Name") . " "; $dspColHeaderLinksArray["usr_firstname"] = " " . getLngt("Vorname") . " "; $dspColHeaderLinksArray["csc_id_jb_edit"] = " " . getLngt("Auftrag") . " "; $dspColHeaderLinksArray["cs_id_history"] = " " . getLngt("Historie"); $dspColHeaderLinksArray["cs_id_report"] = " " . getLngt("Berichte"); $dspColHeaderLinksArray["cmp_authenticated_img"] = " " . getLngt("Kundenstatus") . "
 " . getLngt("Hat Metakunden") . "
 " . getLngt("Freigabe") . "
 " . getLngt("Eigenerfassung") . " "; $dspColHeaderLinksArray["cs_id_jb_permanent"] = " " . getLngt("Konserven") . ",
 " . getLngt("Dauerauftr."); // $dspColHeaderLinksArray["cmp_cashmode"] = " " . getLngt("Rechnung") . " "; $dspColHeaderLinksArray["cmp_id_edit"] = " " . getLngt("Bearbeiten") . " "; $dspColHeaderLinksArray["cs_num_of_documents"] = " " . getLngt("Dokumente") . " "; $dspColHeaderLinksArray["br_key"] = " " . getLngt("Br.Schl.") . " "; $dspColHeaderLinksArray["br_name"] = " " . getLngt("Branche") . " "; $dspColHeaderLinksArray["cs_eid_old"] = " " . getLngt("Alt-EID") . " "; $dspColHeaderLinksArray["cs_become_cs_date"] = " " . getLngt("Kunde seit") . " "; $tmpKeys = array_keys($dspColHeaderLinksArray); for ($i = 0; $i < $displayedListColsArrayLen; $i++) { // Search for the value "$displayedListColsArray" in "$dspColArray" and get the key (index) $j = array_search($displayedListColsArray[$i], $tmpKeys); if (!($j === FALSE)) : $cellColor = getListColor(0, 0); $tableHeaderLinks .= "" . $dspColHeaderLinksArray[$tmpKeys[$j]] . ""; // Handling of the export fields if (isset($dspColHeaderExportFieldArray[$tmpKeys[$j]]) && $dspColHeaderExportFieldArray[$tmpKeys[$j]] != "") : // $tableHeaderExportFields .= ""; $tableHeaderExportFields .= "" . $dspColHeaderLinksArray[$tmpKeys[$j]] . ":"; $tableHeaderExportFields .= "" . $dspColHeaderExportFieldArray[$tmpKeys[$j]] . ""; $tableHeaderExportFields .= "   "; // $tableHeaderExportFields .= ""; endif; endif; } endif; if ($f_searchmode == "") : $f_searchmode = "1"; endif; // Generate search-resultset if ($f_act == "search") : mcTrim($f_cmp_comp); mcTrim($f_cmp_comp2); mcTrim($f_cmp_comp3); mcTrim($f_cmp_comp4); mcTrim($f_ad_street); mcTrim($f_cmp_hsno); mcTrim($f_ad_zipcode); mcTrim($f_ad_city); mcTrim($f_cmp_match); mcTrim($f_cs_eid); mcTrim($f_cs_discount); mcTrim($f_usr_phone); mcTrim($f_usr_email); mcTrim($f_usr_inv_email); mcTrim($f_usr_reminder_email); mcTrim($f_usr_name); mcTrim($f_usr_firstname); mcTrim($f_cmp_iln); mcTrim($f_cmp_tax_idno); mcTrim($f_cmp_bank); mcTrim($f_cmp_bankno); mcTrim($f_cmp_bankacc); mcTrim($f_br_key); mcTrim($f_br_name); mcTrim($f_cs_eid_old); mcTrim($f_cs_become_cs_date); mcTrim($f_cmp_sustainability_email); mcTrim($f_cmp_stax_idno); mcTrim($f_tx_sign); mcTrim($f_tx_value); mcTrim($f_cmp_inv2hq); mcTrim($f_mt_value_payment_term); $doSearch = FALSE; if (strlen($f_cmp_comp . $f_cmp_comp2 . $f_cmp_comp3 . $f_cmp_comp4 . $f_cmp_match . $f_ad_street . $f_cmp_hsno . $f_ad_zipcode . $f_ad_city . $f_cs_eid . $f_cs_discount . $f_usr_phone . $f_usr_email . $f_usr_inv_email . $f_usr_reminder_email . $f_usr_name . $f_usr_firstname . $f_cmp_iln . $f_cmp_tax_idno . $f_cmp_bank . $f_cmp_bankno . $f_cmp_bankacc . $f_br_key . $f_br_name . $f_cs_eid_old . $f_cs_become_cs_date . $f_cmp_sustainability_email . $f_cmp_stax_idno . $f_tx_sign . $f_tx_value . $f_cmp_inv2hq . $f_mt_value_payment_term) == 0) : if ($f_show_allcustomers == "1" || getCountOfTable("customer") <= MAX_CARDINALITY) : $doSearch = TRUE; endif; endif; if ($doSearch || strlen($f_cmp_comp) > 2 || strlen($f_cmp_comp2) > 2 || strlen($f_cmp_comp3) > 2 || strlen($f_cmp_comp4) > 2 || strlen($f_ad_street) > 2 || strlen($f_cmp_hsno) > 0 || strlen($f_ad_zipcode) > 2 || strlen($f_ad_city) > 2 || strlen($f_cmp_match) > 2 || strlen($f_cs_eid) > 2 || strlen($f_cs_discount) > 0 || strlen($f_usr_phone) > 2 || strlen($f_usr_email) > 2 || strlen($f_usr_inv_email) > 2 || strlen($f_usr_reminder_email) > 2 || strlen($f_usr_name) > 2 || strlen($f_usr_firstname) > 2 || strlen($f_cmp_iln) > 2 || strlen($f_cmp_tax_idno) > 2 || strlen($f_cmp_bank) > 2 || strlen($f_cmp_bankno) > 2 || strlen($f_cmp_bankacc) > 2 || strlen($f_br_key) > 2 || strlen($f_br_name) > 3 || strlen($f_cs_eid_old) > 2 || strlen($f_cs_become_cs_date) > 3 || strlen($f_cmp_sustainability_email) > 2 || strlen($f_cmp_stax_idno) > 3 || $f_tx_sign != "" || $f_tx_value != "" || $f_cmp_inv2hq != "" || strlen($f_mt_value_payment_term) >= 1) : // ******************************************* // * Selection of the customers for the list * // ******************************************* if ($f_searchmode == "1") : $prefix = "%"; else : $prefix = ""; endif; $whereClause = ""; // Check for search value in cmp.cmp_comp OR cmp.cmp_match if ($f_cmp_comp != "") : $whereClause .= "cmp.cmp_comp LIKE '" . $prefix . $f_cmp_comp . "%'"; if (($constSearchCscsclistCmpcompCmpmatch == "1" && $f_cmp_match != "") || ($constSearchCscsclistCmpcompCseid == "1" && $f_cs_eid != "") || ($constSearchCscsclistCmpcompCscadphone == "1" && $f_usr_phone != "")) : $whereClause = " (" . $whereClause; if ($constSearchCscsclistCmpcompCmpmatch == "1" && $f_cmp_match != "") : $whereClause .= " OR cmp.cmp_match LIKE '" . $prefix . $f_cmp_match . "%'"; endif; if ($constSearchCscsclistCmpcompCseid == "1" && $f_cs_eid != "") : $whereClause .= " OR cs.cs_eid LIKE '" . $prefix . $f_cs_eid . "%'"; endif; if ($constSearchCscsclistCmpcompCscadphone == "1" && $f_usr_phone != "") : $whereClause .= " OR usr.usr_phone LIKE '" . $prefix . $f_usr_phone . "%'"; endif; $whereClause .= ") "; endif; endif; // if ($f_cmp_comp != "") : $whereClause .= "cmp.cmp_comp LIKE '" . $prefix . $f_cmp_comp . "%'"; endif; if ($whereClause != "" && $f_cmp_comp2 != "") : $whereClause .= " AND "; endif; if ($f_cmp_comp2 != "") : $whereClause .= "cmp.cmp_comp2 LIKE '" . $prefix . $f_cmp_comp2 . "%'"; endif; if ($whereClause != "" && $f_cmp_comp3 != "") : $whereClause .= " AND "; endif; if ($f_cmp_comp3 != "") : $whereClause .= "cmp.cmp_comp3 LIKE '" . $prefix . $f_cmp_comp3 . "%'"; endif; if ($whereClause != "" && $f_cmp_comp4 != "") : $whereClause .= " AND "; endif; if ($f_cmp_comp4 != "") : $whereClause .= "cmp.cmp_comp4 LIKE '" . $prefix . $f_cmp_comp4 . "%'"; endif; // if ($whereClause != "" && $f_cmp_match != "") : $whereClause .= " AND "; endif; // if ($f_cmp_match != "") : $whereClause .= "cmp.cmp_match LIKE '" . $prefix . $f_cmp_match . "%'"; endif; if ($whereClause != "" && $f_cs_eid != "") : $whereClause .= " AND "; endif; if ($f_cs_eid != "") : $whereClause .= "cs.cs_eid LIKE '" . $prefix . $f_cs_eid . "%'"; endif; if ($whereClause != "" && $f_cs_discount != "") : $whereClause .= " AND "; endif; if ($f_cs_discount != "") : $whereClause .= "cs.cs_discount LIKE '" . $prefix . $f_cs_discount . "%'"; endif; if ($whereClause != "" && $f_usr_name != "") : $whereClause .= " AND "; endif; if ($f_usr_name != "") : $whereClause .= "usr.usr_name LIKE '" . $prefix . $f_usr_name . "%'"; endif; if ($whereClause != "" && $f_usr_phone != "") : $whereClause .= " AND "; endif; if ($f_usr_phone != "") : $whereClause .= "usr.usr_phone LIKE '" . $prefix . $f_usr_phone . "%'"; endif; if ($whereClause != "" && $f_usr_email != "") : $whereClause .= " AND "; endif; if ($f_usr_email != "") : $whereClause .= "usr.usr_email LIKE '" . $prefix . $f_usr_email . "%'"; endif; if ($whereClause != "" && $f_usr_inv_email != "") : $whereClause .= " AND "; endif; if ($f_usr_inv_email != "") : $whereClause .= "usr.usr_inv_email LIKE '" . $prefix . $f_usr_inv_email . "%'"; endif; if ($whereClause != "" && $f_usr_reminder_email != "") : $whereClause .= " AND "; endif; if ($f_usr_reminder_email != "") : $whereClause .= "usr.usr_reminder_email LIKE '" . $prefix . $f_usr_reminder_email . "%'"; endif; if ($whereClause != "" && $f_cmp_sustainability_email != "") : $whereClause .= " AND "; endif; if ($f_cmp_sustainability_email != "") : $whereClause .= "cmp.cmp_sustainability_email LIKE '" . $prefix . $f_cmp_sustainability_email . "%'"; endif; if ($whereClause != "" && $f_cmp_stax_idno != "") : $whereClause .= " AND "; endif; if ($f_cmp_stax_idno != "") : $whereClause .= "cmp.cmp_stax_idno LIKE '" . $prefix . $f_cmp_stax_idno . "%'"; endif; if ($whereClause != "" && $f_tx_sign != "") : $whereClause .= " AND "; endif; if ($f_tx_sign != "") : $whereClause .= "tx.tx_sign = '" . $f_tx_sign . "'"; endif; if ($whereClause != "" && $f_tx_value != "") : $whereClause .= " AND "; endif; if ($f_tx_value != "") : $whereClause .= "tx.tx_value = '" . $f_tx_value . "'"; endif; if ($whereClause != "" && $f_cmp_inv2hq != "") : $whereClause .= " AND "; endif; if ($f_cmp_inv2hq != "") : $whereClause .= "cmp.cmp_inv2hq = '" . $f_cmp_inv2hq . "'"; endif; if ($whereClause != "" && $f_mt_value_payment_term != "") : $whereClause .= " AND "; endif; if ($f_mt_value_payment_term != "") : $whereClause .= "mt_payment_term.mt_sort = '" . $f_mt_value_payment_term . "'"; endif; if ($whereClause != "" && $f_usr_name != "") : $whereClause .= " AND "; endif; if ($f_usr_name != "") : $whereClause .= "usr.usr_name LIKE '" . $prefix . $f_usr_name . "%'"; endif; if ($whereClause != "" && $f_usr_firstname != "") : $whereClause .= " AND "; endif; if ($f_usr_firstname != "") : $whereClause .= "usr.usr_firstname LIKE '" . $prefix . $f_usr_firstname . "%'"; endif; if ($whereClause != "" && $f_cmp_iln != "") : $whereClause .= " AND "; endif; if ($f_cmp_iln != "") : $whereClause .= "cmp.cmp_iln LIKE '" . $prefix . $f_cmp_iln . "%'"; endif; if ($whereClause != "" && $f_cmp_tax_idno != "") : $whereClause .= " AND "; endif; if ($f_cmp_tax_idno != "") : $whereClause .= "cmp.cmp_tax_idno LIKE '" . $prefix . $f_cmp_tax_idno . "%'"; endif; if ($whereClause != "" && $f_cmp_bank != "") : $whereClause .= " AND "; endif; if ($f_cmp_bank != "") : $whereClause .= "cmp.cmp_bank LIKE '" . $prefix . $f_cmp_bank . "%'"; endif; if ($whereClause != "" && $f_cmp_bankno != "") : $whereClause .= " AND "; endif; if ($f_cmp_bankno != "") : $whereClause .= "cmp.cmp_bankno LIKE '" . $prefix . $f_cmp_bankno . "%'"; endif; if ($whereClause != "" && $f_cmp_bankacc != "") : $whereClause .= " AND "; endif; if ($f_cmp_bankacc != "") : $whereClause .= "cmp.cmp_bankacc LIKE '" . $prefix . $f_cmp_bankacc . "%'"; endif; if ($whereClause != "" && $f_ad_street != "") : $whereClause .= " AND "; endif; if ($f_ad_street != "") : $whereClause .= "ad.ad_street LIKE '" . $prefix . $f_ad_street . "%'"; endif; if ($whereClause != "" && $f_cmp_hsno != "") : $whereClause .= " AND "; endif; if ($f_cmp_hsno != "") : $whereClause .= "cmp.cmp_hsno LIKE '" . $prefix . $f_cmp_hsno . "%'"; endif; if ($whereClause != "" && $f_ad_zipcode != "") : $whereClause .= " AND "; endif; if ($f_ad_zipcode != "") : $whereClause .= "ad.ad_zipcode LIKE '" . $prefix . $f_ad_zipcode . "%'"; endif; if ($whereClause != "" && $f_ad_city != "") : $whereClause .= " AND "; endif; if ($f_ad_city != "") : $whereClause .= "ad.ad_city LIKE '" . $prefix . $f_ad_city . "%'"; endif; if ($whereClause != "" && $f_br_key != "") : $whereClause .= " AND "; endif; if ($f_br_key != "") : $whereClause .= "br.br_key LIKE '" . $prefix . $f_br_key . "%'"; endif; if ($whereClause != "" && $f_br_name != "") : $whereClause .= " AND "; endif; if ($f_br_name != "") : $whereClause .= "br.br_name LIKE '" . $prefix . $f_br_name . "%'"; endif; if ($whereClause != "" && $f_cs_eid_old != "") : $whereClause .= " AND "; endif; if ($f_cs_eid_old != "") : $whereClause .= "gdc_2.gdc_content LIKE '" . $prefix . $f_cs_eid_old . "%'"; endif; if ($whereClause != "" && $f_cs_become_cs_date != "") : $whereClause .= " AND "; endif; if ($f_cs_become_cs_date != "") : $whereClause .= "cs.cs_become_cs_date LIKE '" . $prefix . $f_cs_become_cs_date . "%'"; endif; // Check authentication if ($whereClause != "" && $f_cmp_authenticated == "1") : $whereClause .= " AND "; endif; if ($f_cmp_authenticated == "1") : $whereClause .= "cmp.cmp_authenticated LIKE '" . $f_cmp_authenticated . "%'"; endif; // Check visibles if ($f_show_only_invisible == "1") : $whereClauseVisibility = " cmp.cmp_visible = '0' "; else : $whereClauseVisibility = " cmp.cmp_visible = '1' "; if ($f_show_invisible == "1") : $whereClauseVisibility = ""; endif; endif; if ($whereClause != "" && $whereClauseVisibility != "") : $whereClauseVisibility = " AND " . $whereClauseVisibility; endif; $whereClause .= $whereClauseVisibility; // Check job edit activated $whereClauseJobEdit = ""; if ($f_show_only_jbedit == "1") : $whereClauseJobEdit = " cs.cs_jbedit = '1' "; endif; if ($whereClause != "" && $whereClauseJobEdit != "") : $whereClauseJobEdit = " AND " . $whereClauseJobEdit; endif; $whereClause .= $whereClauseJobEdit; // Check existing old EID $whereClauseOldEid = ""; if ($f_show_only_old_eid == "1") : $whereClauseOldEid = " gdc_2.gdc_content != '' "; endif; if ($whereClause != "" && $whereClauseOldEid != "") : $whereClauseOldEid = " AND " . $whereClauseOldEid; endif; $whereClause .= $whereClauseOldEid; // Check authenticated $whereClauseAuthenticated = ""; if ($f_hide_notauthenticated == "1") : $whereClauseAuthenticated = " cmp.cmp_authenticated = '1' "; endif; if ($whereClause != "" && $whereClauseAuthenticated != "") : $whereClauseAuthenticated = " AND " . $whereClauseAuthenticated; endif; $whereClause .= $whereClauseAuthenticated; // Check no metacustomer reference $whereClauseNoMetacustomer = ""; if ($f_no_metacustomer == "1") : $whereClauseNoMetacustomer = " (cs.cs_id_parent = '' OR isnull(cs.cs_id_parent)) "; endif; if ($whereClause != "" && $whereClauseNoMetacustomer != "") : $whereClauseNoMetacustomer = " AND " . $whereClauseNoMetacustomer; endif; $whereClause .= $whereClauseNoMetacustomer; // Check with metacustomer reference $whereClauseWithMetacustomer = ""; if ($f_with_metacustomer == "1") : $whereClauseWithMetacustomer = " (cs.cs_id_parent != '' AND (NOT isnull(cs.cs_id_parent)) AND cs.cs_id_parent > '0') "; endif; if ($whereClause != "" && $whereClauseWithMetacustomer != "") : $whereClauseWithMetacustomer = " AND " . $whereClauseWithMetacustomer; endif; $whereClause .= $whereClauseWithMetacustomer; // Filter by discount $whereClauseCsDiscount = ""; if ($f_with_discount == "1") : $whereClauseCsDiscount = " cs.cs_discount != '0' AND"; endif; // Filter by type (customer, prospect, ...) $whereClauseCmpType = ""; if ($f_cmp_type != "") : $whereClauseCmpType = " cmp.cmp_type = '" . $f_cmp_type . "' AND"; endif; // Only new customers according to entered date $whereClauseCmpNewDate = ""; if ($f_cmp_new_date != "") : $whereClauseCmpNewDate = " cmp.cmp_new_date >= '" . $f_cmp_new_date . "' AND"; endif; // Filter by branch $whereClauseBranch = ""; if ($f_branch != "") : $whereClauseBranch = " cmp.br_id = '" . $f_branch . "' AND"; endif; // Filter by sales ranking $whereClauseSalesRankingMan = ""; if ($f_cmp_sales_ranking_man != "") : $whereClauseSalesRankingMan = " cmp.cmp_sales_ranking_man = '" . $f_cmp_sales_ranking_man . "' AND"; endif; // **** Costcenter addresses (service, invoice, pickup) => Search with harder plausible checks **** $f_cscad_service_street = trim($f_cscad_service_street); $f_cscad_service_zipcode = trim($f_cscad_service_zipcode); $f_cscad_service_city = trim($f_cscad_service_city); $f_cscad_invoice_street = trim($f_cscad_invoice_street); $f_cscad_invoice_zipcode = trim($f_cscad_invoice_zipcode); $f_cscad_invoice_city = trim($f_cscad_invoice_city); $f_cscad_pickup_street = trim($f_cscad_pickup_street); $f_cscad_pickup_zipcode = trim($f_cscad_pickup_zipcode); $f_cscad_pickup_city = trim($f_cscad_pickup_city); $f_cscad_addresses = $f_cscad_service_street . $f_cscad_service_zipcode . $f_cscad_service_city . $f_cscad_invoice_street . $f_cscad_invoice_zipcode . $f_cscad_invoice_city . $f_cscad_pickup_street . $f_cscad_pickup_zipcode . $f_cscad_pickup_city; // Check at least one char has been entered in address fields $cscadRequested = false; if ($f_cscad_addresses != "") : $cscadRequested = true; endif; $cscadAtLeastLen = 4; if (strlen($f_cscad_service_street) >= $cscadAtLeastLen || strlen($f_cscad_service_zipcode) >= $cscadAtLeastLen || strlen($f_cscad_service_city) >= $cscadAtLeastLen || strlen($f_cscad_invoice_street) >= $cscadAtLeastLen || strlen($f_cscad_invoice_zipcode) >= $cscadAtLeastLen || strlen($f_cscad_invoice_city) >= $cscadAtLeastLen || strlen($f_cscad_pickup_street) >= $cscadAtLeastLen || strlen($f_cscad_pickup_zipcode) >= $cscadAtLeastLen || strlen($f_cscad_pickup_city) >= $cscadAtLeastLen) : // f_cscad_service_street, f_cscad_service_zipcode, f_cscad_service_city, f_cscad_invoice_street, f_cscad_invoice_zipcode, f_cscad_invoice_city, f_cscad_pickup_street, f_cscad_pickup_zipcode, f_cscad_pickup_city // $f_cscad_service_street, $f_cscad_service_zipcode, $f_cscad_service_city, $f_cscad_invoice_street, $f_cscad_invoice_zipcode, $f_cscad_invoice_city, $f_cscad_pickup_street, $f_cscad_pickup_zipcode, $f_cscad_pickup_city $whereClauseAddresses = ""; // Service address if ($f_cscad_service_street != "") : $whereClauseAddresses = " ad_srv.ad_street LIKE '%" . $f_cscad_service_street . "%'"; endif; if ($whereClauseAddresses != "" && $f_cscad_service_zipcode != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_service_zipcode != "") : $whereClauseAddresses = " ad_srv.ad_zipcode = '" . $f_cscad_service_zipcode . "'"; endif; if ($whereClauseAddresses != "" && $f_cscad_service_city != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_service_city != "") : $whereClauseAddresses = " ad_srv.ad_city = '" . $f_cscad_service_city . "'"; endif; // Invoice address if ($whereClauseAddresses != "" && $f_cscad_invoice_street != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_invoice_street != "") : $whereClauseAddresses = " ad_inv.ad_street LIKE '%" . $f_cscad_invoice_street . "%'"; endif; if ($whereClauseAddresses != "" && $f_cscad_invoice_zipcode != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_invoice_zipcode != "") : $whereClauseAddresses = " ad_inv.ad_zipcode = '" . $f_cscad_invoice_zipcode . "'"; endif; if ($whereClauseAddresses != "" && $f_cscad_invoice_city != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_invoice_city != "") : $whereClauseAddresses = " ad_inv.ad_city = '" . $f_cscad_invoice_city . "'"; endif; // Pickup address if ($whereClauseAddresses != "" && $f_cscad_pickup_street != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_pickup_street != "") : $whereClauseAddresses = " ad_pck.ad_street LIKE '%" . $f_cscad_pickup_street . "%'"; endif; if ($whereClauseAddresses != "" && $f_cscad_pickup_zipcode != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_pickup_zipcode != "") : $whereClauseAddresses = " ad_pck.ad_zipcode = '" . $f_cscad_pickup_zipcode . "'"; endif; if ($whereClauseAddresses != "" && $f_cscad_pickup_city != "") : $whereClauseAddresses .= " AND "; endif; if ($f_cscad_pickup_city != "") : $whereClauseAddresses = " ad_pck.ad_city = '" . $f_cscad_pickup_city . "'"; endif; if ($whereClauseAddresses != "") : $whereClauseAddresses .= " AND "; endif; if ($whereClause != "") : $whereClause .= " AND "; endif; if ($orderClause == "") : $orderClause = "cmp.cmp_comp"; endif; // $sqlquery = "SELECT " . getDBFields("all_customer") . "," . getDBFields("all_company") . "," . getDBFields("costcenter") . "," // . getDBFields("costcenteraddress_service") . "," . getDBFields("costcenteraddress_invoice") . "," . getDBFields("costcenteraddress_pickup") . "," // . getDBFields("address_service") . "," . getDBFields("address_invoice") . "," . getDBFields("address_pickup") $sqlquery = "SELECT cmp.cmp_id, cmp.cmp_type, cmp.cmp_comp, cmp.cmp_comp2, cmp.cmp_comp3, cmp.cmp_comp4, cmp.cmp_iln, cmp.cmp_tax_idno," . " cmp.cmp_bank, cmp.cmp_bankno, cmp.cmp_bankacc, cmp.cmp_authenticated, cmp.cmp_match, cmp.cmp_cashmode, cmp.cmp_hsno," . " cmp.cmp_inv2hq, cmp.cmp_sustainability_email, cmp.cmp_stax_idno, tx.tx_sign, tx.tx_value, br.br_key, br.br_name," . " cs.cs_id, cs.cs_eid, cs.cs_discount, cs.csc_id, cs.cs_jbedit, cs.cs_id_parent, cs.cs_become_cs_date," . " mt_payment_term.mt_value AS mt_value_payment_term, mt_payment_term.mt_mapped_value AS mt_mapped_value_payment_term," . " gdc_1.gdc_content AS cs_num_of_documents, gdc_2.gdc_content AS cs_eid_old," . " usr.usr_name, usr.usr_firstname, usr.usr_email, usr.usr_inv_email, usr.usr_reminder_email, usr.usr_phone," . " usr.usr_phone2, usr.usr_fax, ad.ad_street, ad.ad_zipcode, ad.ad_city" . " FROM" . " customer AS cs LEFT JOIN genericdatacontainer AS gdc_1 ON cs.cs_id = gdc_1.gdc_obj_id AND gdc_1.gdc_obj_type = 'cs' AND gdc_1.gdc_gen_fieldname = 'num_of_documents'" . " LEFT JOIN genericdatacontainer AS gdc_2 ON cs.cs_id = gdc_2.gdc_obj_id AND gdc_2.gdc_obj_type = 'cs' AND gdc_2.gdc_gen_fieldname = 'eid_old'" . " LEFT JOIN metatype AS mt_payment_term ON cs.cs_payment_term = mt_payment_term.mt_sort AND mt_payment_term.mt_type = 'payment_term'," . " company AS cmp LEFT JOIN branch AS br ON cmp.br_id = br.br_id" . " LEFT JOIN tax AS tx ON cmp.tx_id = tx.tx_id," . " address AS ad," . " employee AS emp," . " user AS usr," . " costcenter AS csc," . " costcenteraddress AS cscad_inv," . " address AS ad_inv," . " costcenteraddress AS cscad_pck," . " address AS ad_pck," . " costcenteraddress AS cscad_srv," . " address AS ad_srv" . " WHERE " . $whereClause . $whereClauseCsDiscount . $whereClauseCmpType . $whereClauseCmpNewDate . $whereClauseBranch . $whereClauseSalesRankingMan . $whereClauseAddresses . " csc.csc_id = cs.csc_id AND" . " cs.hq_id IN " . getSQLMandatorArray($f_hq_id) . " AND" . " cscad_inv.csc_id = csc.csc_id AND" . " cscad_inv.adt_id = '2' AND" . " ad_inv.ad_id = cscad_inv.ad_id AND" . " cscad_pck.csc_id = csc.csc_id AND" . " cscad_pck.adt_id = '4' AND" . " ad_pck.ad_id = cscad_pck.ad_id AND" . " cscad_srv.csc_id = csc.csc_id AND" . " cscad_srv.adt_id = '1' AND" . " ad_srv.ad_id = cscad_srv.ad_id AND" . " cmp.cmp_id = cs.cmp_id AND" . " cmp.cmp_archived = '0' AND" . " cmp.cmp_authenticated = '1' AND" . " cmp.cmp_visible = '1' AND" . " cmp.cmp_type = '0' AND" . " cmp.ad_id = ad.ad_id AND" . " emp.emp_id = cs.cs_admin AND" . " usr.usr_id = emp.usr_id" . " AND" . " usr.hq_id IN " . getSQLMandatorArray($f_hq_id) . " ORDER BY " . $orderClause; // echo $sqlquery . "
"; die(); $result = $db->query($sqlquery); if (DB::isError($result)) : die ("$PHP_SELF: " . $result->getMessage()); endif; else : // At least one char has been entered in address fields, but no search condition does match. Init all address values (!!!!) if ($cscadRequested) : $f_cscad_service_street = ""; $f_cscad_service_zipcode = ""; $f_cscad_service_city = ""; $f_cscad_invoice_street = ""; $f_cscad_invoice_zipcode = ""; $f_cscad_invoice_city = ""; $f_cscad_pickup_street = ""; $f_cscad_pickup_zipcode = ""; $f_cscad_pickup_city = ""; $statusMessage = getLngt("Geben Sie bitte in mindestens einem aller Felder für die Leistungs-/Rechnungs-/Abhol-/Liefer-Adresse mindestens " . $cscadAtLeastLen . " Zeichen ein!"); endif; if ($whereClause != "") : $whereClause .= " AND "; endif; if ($orderClause == "") : $orderClause = "cmp.cmp_comp"; endif; $sqlquery = "SELECT cmp.cmp_id, cmp.cmp_type, cmp.cmp_comp, cmp.cmp_comp2, cmp.cmp_comp3, cmp.cmp_comp4, cmp.cmp_iln, cmp.cmp_tax_idno," . " cmp.cmp_bank, cmp.cmp_bankno, cmp.cmp_bankacc, cmp.cmp_authenticated, cmp.cmp_match, cmp.cmp_cashmode, cmp.cmp_hsno," . " cmp.cmp_inv2hq, cmp.cmp_sustainability_email, cmp.cmp_stax_idno, tx.tx_sign, tx.tx_value, br.br_key, br.br_name," . " cs.cs_id, cs.cs_eid, cs.cs_discount, cs.csc_id, cs.cs_jbedit, cs.cs_id_parent, cs.cs_become_cs_date," . " mt_payment_term.mt_value AS mt_value_payment_term, mt_payment_term.mt_mapped_value AS mt_mapped_value_payment_term," . " gdc_1.gdc_content AS cs_num_of_documents, gdc_2.gdc_content AS cs_eid_old," . " usr.usr_name, usr.usr_firstname, usr.usr_email, usr.usr_inv_email, usr.usr_reminder_email, usr.usr_phone," . " usr.usr_phone2, usr.usr_fax, ad.ad_street, ad.ad_zipcode, ad.ad_city" . " FROM company AS cmp LEFT JOIN branch AS br ON cmp.br_id = br.br_id" . " LEFT JOIN tax AS tx ON cmp.tx_id = tx.tx_id," . " customer AS cs LEFT JOIN genericdatacontainer AS gdc_1 ON cs.cs_id = gdc_1.gdc_obj_id AND gdc_1.gdc_obj_type = 'cs' AND gdc_1.gdc_gen_fieldname = 'num_of_documents'" . " LEFT JOIN genericdatacontainer AS gdc_2 ON cs.cs_id = gdc_2.gdc_obj_id AND gdc_2.gdc_obj_type = 'cs' AND gdc_2.gdc_gen_fieldname = 'eid_old'" . " LEFT JOIN metatype AS mt_payment_term ON cs.cs_payment_term = mt_payment_term.mt_sort AND mt_payment_term.mt_type = 'payment_term'," . " employee AS emp, user AS usr, address AS ad" . " WHERE " . $whereClause . $whereClauseCsDiscount . $whereClauseCmpType . $whereClauseCmpNewDate . $whereClauseBranch . $whereClauseSalesRankingMan . " cmp.cmp_id = cs.cmp_id AND" . " cmp.cmp_archived = '0' AND " . " cs.hq_id IN " . getSQLMandatorArray($f_hq_id) . " AND" . " cmp.ad_id = ad.ad_id AND" . " cs.cs_admin = emp.emp_id AND" . " emp.usr_id = usr.usr_id AND" . " usr.hq_id IN " . getSQLMandatorArray($f_hq_id) . " ORDER BY " . $orderClause; // echo $sqlquery . "
"; die(); $result = $db->query($sqlquery); if (DB::isError($result)) : die ("$PHP_SELF: " . $result->getMessage()); endif; endif; // Table with header $rowCounter = 0; $lineToggler = 0; while ($row = $result->fetch_assoc()): $numOfRows++; $dspColArray = array(); // Only for focussing the first element (link) of the list // Look in tag $elementName = ""; if ($numOfRows == "1") : $elementName = " name=\"cs2focus\" "; endif; $tableOfRows .= ""; // Link refers to job // $tableOfRows .= " " // . substr($row["cmp_comp"], 0, 15) . "" . ""; // Link refers to customer details // $dspColArray["cmp_comp"] = " " // . $row["cmp_comp"] . "" . ""; $dspColArray["cmp_comp"] = " " . $row["cmp_comp"] . "" . ""; $dspColArray["cmp_comp2"] = " " . $row["cmp_comp2"] . ""; $dspColArray["cmp_comp3"] = " " . $row["cmp_comp3"] . ""; $dspColArray["cmp_comp4"] = " " . $row["cmp_comp4"] . ""; $dspColArray["ad_street"] = " " . $row["ad_street"] . ""; $dspColArray["cmp_hsno"] = " " . $row["cmp_hsno"] . ""; $dspColArray["ad_zipcode"] = " " . substr($row["ad_zipcode"], 0, 5) . ""; $dspColArray["ad_city"] = " " . $row["ad_city"] . ""; $dspColArray["cmp_match"] = " " . $row["cmp_match"] . ""; $dspColArray["cmp_iln"] = " " . $row["cmp_iln"] . ""; $dspColArray["cmp_tax_idno"] = " " . $row["cmp_tax_idno"] . ""; $dspColArray["cs_eid"] = " " . substr($row["cs_eid"], 0, 10) . ""; $dspColArray["cs_discount"] = " " . ($row["cs_discount"] != 0 ? pad(number_format($row["cs_discount"], 2, ",", "."),5," ") : "") . ""; $dspColArray["usr_phone"] = " " . substr($row["usr_phone"], 0, 15) . ""; $dspColArray["usr_email"] = " " . $row["usr_email"] . ""; $dspColArray["usr_inv_email"] = " " . $row["usr_inv_email"] . ""; $dspColArray["usr_reminder_email"] = " " . $row["usr_reminder_email"] . ""; $dspColArray["usr_name"] = " " . $row["usr_name"] . ""; $dspColArray["usr_firstname"] = " " . $row["usr_firstname"] . ""; $dspColArray["br_key"] = " " . $row["br_key"] . ""; $dspColArray["br_name"] = " " . $row["br_name"] . ""; $dspColArray["cmp_sustainability_email"] = " " . $row["cmp_sustainability_email"] . ""; $dspColArray["cmp_stax_idno"] = " " . $row["cmp_stax_idno"] . ""; $dspColArray["tx_sign"] = " " . $row["tx_sign"] . ""; $dspColArray["tx_value"] = " " . $row["tx_value"] . ""; $dspColArray["cmp_inv2hq"] = " " . ($row["cmp_inv2hq"] == "0" ? getLngt("Nein") : getLngt("Ja")) . ""; $dspColArray["mt_value_payment_term"] = " " . $row["mt_value_payment_term"] . " :: " . str_replace(" ", " ", $row["mt_mapped_value_payment_term"]) . ""; // $tableOfRows .= "" // . "" // . "" . ""; $dspColArray["csc_id_jb_edit"] = "" . "" . "" . ""; $dspColArray["cs_id_history"] = "" . "" . ""; // $dspColArray["cs_id_report"] = "" // . "" // . ""; $dspColArray["cs_id_report"] = "" . "" . ""; $dspColArray["cmp_bank"] = " " . $row["cmp_bank"] . ""; $dspColArray["cmp_bankno"] = " " . $row["cmp_bankno"] . ""; $dspColArray["cmp_bankacc"] = " " . $row["cmp_bankacc"] . ""; // $dspColArray["cmp_id_remove"] = " " . "" // . "" // . "" . ""; // Status images of the customer $csStatusArray = array(); $imgStyle = "style=\"width: 7px; height: 7px; \""; // Customer state (customer or meta customer) $tmpImgName = "spacer_green.jpg"; if ($row["cmp_type"] == "1") : $tmpImgName = "spacer_lightblue.jpg"; endif; if ($row["cmp_type"] == "2") : $tmpImgName = "spacer_lightblue.jpg"; endif; if ($row["cmp_type"] == "3") : $tmpImgName = "spacer_lightblue.jpg"; endif; // if ($metaCsMarkerEnabled == "1") : if (isset($metaCsArray[$row["cs_id"]]) && $metaCsArray[$row["cs_id"]] != "" && $metaCsArray[$row["cs_id"]] != "0") : $tmpImgName = "spacer_magenta.jpg"; endif; // endif; $csStatusArray[0] = ""; // Has meta customer $csStatusArray[1] = ""; // Authenticated $csStatusArray[2] = ""; // Customer is able to insert jobs /* $csStatusArray[2] = ""; if ($row["cs_jbedit"] == "1") : $csStatusArray[2] = ""; endif; */ $csStatusArray[3] = ""; $dspColArray["cmp_authenticated_img"] = ""; $csStatusArrayLen = count($csStatusArray); for ($i = 0; $i < $csStatusArrayLen; $i++) : $dspColArray["cmp_authenticated_img"] .= ""; endfor; $dspColArray["cmp_authenticated_img"] .= "
" . $csStatusArray[$i] . "
"; $dspColArray["cs_id_jb_permanent"] = "" . "" . ""; // Only cash payer mode or invoice customer $cashmodeImgName = "circle_red.png"; if ($row["cmp_cashmode"] == "0") : $cashmodeImgName = "circle_green.png"; endif; // $dspColArray["cmp_cashmode"] = ""; // $dspColArray["cmp_id_edit"] = "" // . "" // . "" . ""; $dspColArray["cmp_id_edit"] = "" . "" . "" . ""; // Number of documents associated to the customer $dspColArray["cs_num_of_documents"] = "" . "" . ($row["cs_num_of_documents"] != "" && $row["cs_num_of_documents"] != "0" ? "[" . $row["cs_num_of_documents"] . "]" : " ") . "" . ""; $dspColArray["cs_eid_old"] = " " . $row["cs_eid_old"] . ""; $dspColArray["cs_become_cs_date"] = " " . ($row["cs_become_cs_date"] != "0000-00-00" ? $row["cs_become_cs_date"] : "") . ""; // Generate list $rowCounter++; $tmpKeys = array_keys($dspColArray); for ($i = 0; $i < $displayedListColsArrayLen; $i++) : // Search for the value "$displayedListColsArray" in "$dspColArray" and get the key (index) $j = array_search($displayedListColsArray[$i], $tmpKeys); if (!($j === FALSE)) : if ($lineToggler == 0) : $lineToggler = 1; else : $lineToggler = 0; endif; $cellColor = getListColor($rowCounter, $lineToggler); $dspColArray[$tmpKeys[$j]] = str_replace("__BGCOL__", " bgcolor=\"" . $cellColor ."\"", $dspColArray[$tmpKeys[$j]]); $tableOfRows .= $dspColArray[$tmpKeys[$j]]; endif; endfor; $tableOfRows .= ""; endwhile; $result->free(); // *** (CSV-)EXPORT of the customer data if ($csExportIt == "1") : // Compose $fieldArray $fieldArray = array(); for ($i = 1; $i <= $displayedListColsArrayLen; $i++) : if ($f_exp_cmp_comp == $i) : array_push($fieldArray, "cmp_comp"); endif; if ($f_exp_cmp_comp2 == $i) : array_push($fieldArray, "cmp_comp2"); endif; if ($f_exp_cmp_comp3 == $i) : array_push($fieldArray, "cmp_comp3"); endif; if ($f_exp_cmp_comp4 == $i) : array_push($fieldArray, "cmp_comp4"); endif; if ($f_exp_ad_street == $i) : array_push($fieldArray, "ad_street"); endif; if ($f_exp_cmp_hsno == $i) : array_push($fieldArray, "cmp_hsno"); endif; if ($f_exp_ad_zipcode == $i) : array_push($fieldArray, "ad_zipcode"); endif; if ($f_exp_ad_city == $i) : array_push($fieldArray, "ad_city"); endif; if ($f_exp_cmp_match == $i) : array_push($fieldArray, "cmp_match"); endif; if ($f_exp_cs_eid == $i) : array_push($fieldArray, "cs_eid"); endif; if ($f_exp_usr_phone == $i) : array_push($fieldArray, "usr_phone"); endif; if ($f_exp_usr_email == $i) : array_push($fieldArray, "usr_email"); endif; // if ($f_exp_usr_inv_email == $i) : array_push($fieldArray, "usr_inv_email"); endif; // if ($f_exp_usr_reminder_email == $i) : array_push($fieldArray, "usr_reminder_email"); endif; if ($f_exp_usr_name == $i) : array_push($fieldArray, "usr_name"); endif; if ($f_exp_usr_firstname == $i) : array_push($fieldArray, "usr_firstname"); endif; if ($f_exp_br_key == $i) : array_push($fieldArray, "br_key"); endif; if ($f_exp_br_name == $i) : array_push($fieldArray, "br_name"); endif; endfor; // Remove old files foreach (glob(TEMP_PATH . "*.cs") as $fileNameToBoRemoved) { if ((time() - filemtime($fileNameToBoRemoved)) > 60) : if (file_exists($fileNameToBoRemoved)) : unlink($fileNameToBoRemoved); endif; endif; } // Reset row pointer // $row = $result->fetch_assoc(DB_FETCHMODE_OBJECT, 0); $result = $db->dbQ($sqlquery); // Define output parameters $delimiter = $csExportDelimiter; $writeHeader = "NO"; $mode = "1"; include_once ("../include/inc_list_defineoutput2file.inc.php"); $outputLinesArrayLen = count($outputLinesArray); if ($outputLinesArrayLen > 0) : $f_fileName = getLngt("KUNDEN") . "_" . date("YmdHis"); $f_secretFileName = md5($f_fileName) . ".cs"; if ($outputHeader != "") : writeToFile(TEMP_PATH . $f_secretFileName, $outputHeader); // write header if requested endif; for ($i = 0; $i < $outputLinesArrayLen; $i++) : writeToFile(TEMP_PATH . $f_secretFileName, $outputLinesArray[$i]); // write statistic data endfor; else : $statusMessage = getLngt("Es wurden keine Daten gefunden! Eine Datei wurde deshalb nicht generiert!"); $fileOutput = false; endif; $result->free(); $onLoadCall .= "downloadFile();"; endif; // ************************************** else : $statusMessage = getLngt("Bei Eingabe weniger als 3 Zeichen in mindestens einem Feld erfolgt keine Suche!"); endif; endif; // Link to enter a new customer or to switch "visibility output" $headerOps = "   |   "; // $headerOps .= "" . getLngt("Neuer Kunde") . ""; $headerOps .= "" . getLngt("Neuer Kunde") . ""; $headerOps .= "   |   "; $headerOps .= getLngt("Ausgeblendete anzeigen") . " "; ?> <?php echo $pageTitel ?>
      |       |    Option:   > >    |      
"; ?>
"; ?>
"; ?>
"; ?>
"; ?>
"; ?>
"; ?>
"; ?>
:
: (Monat) (Jahr)
:
:
:   "> "> ">
:   "> "> ">
:   "> "> ">

: