0) { $xc_var['xc_userid'] = $GLOBALS['xc_userid']; } if (strlen($_COOKIE['xc_userid']) > 0) { $xc_var['xc_userid'] = $_COOKIE['xc_userid']; } /////////////////////////////////////////////////// // Cookie in $xc_var einlesen /////////////////////////////////////////////////// $cookie = $GLOBALS['HTTP_COOKIE_VARS'][$xc_mod_name]; $cookie = explode("&",$cookie); for($i=0; $i 0) { $this_array['html_value'] = number_format($xc_preis,2,",",".")." ".$USER_CFG[$currency]; } else { $this_array['value'] = 0; $this_array['html_value'] = ''; $this_array['netto'] = 0; $this_array['brutto'] = 0; }; return $this_array; } ////////////////////////////////////////////////////////////// // Diese Routine holt alle verfügbaren Informationen zum // Fahrzeug aus der Datenbank un speichert sie in einem Array ////////////////////////////////////////////////////////////// function XC_GetCarInformation($car_id,$xc_db) { global $USER_CFG; global $s_hersteller,$s_typ,$s_fzgart,$s_standort,$active_currency; $this_array = array(); // Login Prüfen wenn Fehler dann zurück if ($GLOBALS['xc_hl_login'] == 1) { $price_name = "a.preis_hk"; $price2_name = "hk_preis"; $price3_name = "price_hk"; } else { $price_name = "a.preis_vk"; $price2_name = "vk_preis"; $price3_name = "price_vk"; } $query = "SELECT a.id AS id, a.id_fzg AS code, a.hersteller AS hersteller, a.typ AS typ, a.motor AS motor, a.ausstattung AS ausstattung, "; $query .= "a.kw AS kw, ".$price_name." AS preis, a.tueren AS tueren, a.farbe AS farbe, xa.caption AS fzgart, a.mwst AS mwst, "; $query .= "a.innenraum AS innenraum, a.hubraum AS hubraum, a.km AS km, a.erstzulassung AS zulassung, a.vorschaden AS vorschaden, "; $query .= "a.vorbesitzer AS vorbesitzer, a.hu AS hu, a.au AS au, xb.caption AS treibstoff, a.bemerkung AS bemerkung, a.id_modell AS modell, "; $query .= "xc.caption AS standort, a.config AS config, xd.caption AS kategorie "; $query .= "FROM xc_car_list a, lst_car_fzgart xa , lst_car_treibstoff xb, lst_car_standort xc, lst_car_kategorie AS xd "; $query .= "WHERE a.id='$car_id' AND a.id_fzgart=xa.id AND a.id_kategorie=xd.id AND a.id_standort=xc.id AND a.id_treibstoff=xb.id AND a.www='1'"; $result = mysql_query($query,$xc_db) or die ("Invalid query: $query"); $query = ''; $this_array = mysql_fetch_array($result); if (strpos($this_array['ausstattung'],"@@") > 0) { $this_array['ausstattung'] = substr($this_array['ausstattung'],0,strpos($this_array['ausstattung'],"@@")); } if (strpos($this_array['typ'],"@@") > 0) { $this_array['typ'] = substr($this_array['typ'],0,strpos($this_array['typ'],"@@")); } if ($this_array['config'] == '') { $this_array['config'] = 0; } if ($this_array['config'] == 4) { header("Location: fzg_config.php?car_id=$car_id&s_hersteller=$s_hersteller&s_typ=$s_typ&s_fzgart=$s_fzgart&s_standort=$s_standort&active_currency=$active_currency"); exit; } if ($this_array['bemerkung'] == '""') { $this_array['bemerkung'] = ''; } return $this_array; } ////////////////////////////////////////////////////////////// // Diese Routine holt alle verfügbaren Informationen zum // Fahrzeug aus der Datenbank un speichert sie in einem Array ////////////////////////////////////////////////////////////// function XC_GetCarAdditionalEquip($car_id,$car_modell, $xc_db) { $query = "SELECT distinct x.bezeichnung, e.description, x.code, x.state, x.description FROM xc_equ_items x, xc_car_equip e "; $query .= "WHERE e.equip_id=x.id AND e.car_id='$car_id' AND x.modell_id='$car_modell' AND e.status<>'S' AND e.status<>'C' "; $query .= "ORDER BY e.status DESC, x.bezeichnung ASC"; $result=mysql_query($query,$xc_db) or die ("Invalid query: $query"); $query = ''; $this_array = array(); $i = 0; while (list($bezeich, $bez, $code, $state, $comment) = mysql_fetch_row($result)) { if ($code = "???") { $code = ''; } $comment = str_replace("\n", "
", $comment); $comment = str_replace("\r", "", $comment); $comment = str_replace("\"", "``", $comment); $comment = str_replace("'", "`", $comment); $this_array[$i]['bezeichnung'] = $bezeich; $this_array[$i]['code'] = $code; $this_array[$i]['bemerkung'] = $comment; $this_array[$i]['status'] = $state; $i++; } // Manuelle Customized Equipment hinzufügen (da hier kein Bezug zum Konfigurator) $query = "SELECT distinct description, status FROM xc_car_equip "; $query .= "WHERE car_id='$car_id' AND status='C' "; $query .= "ORDER BY description ASC"; $result=mysql_query($query,$xc_db) or die ("Invalid query: $query"); $query = ''; while (list($bezeich, $state) = mysql_fetch_row($result)) { if ($code = "???") { $code = ''; } $this_array[$i]['bezeichnung'] = $bezeich; $this_array[$i]['status'] = $state; $i++; } return $this_array; } ////////////////////////////////////////////////////////////// // Diese Routine holt alle verfügbaren Informationen zum // Fahrzeug aus der Datenbank un speichert sie in einem Array ////////////////////////////////////////////////////////////// function XC_GetCarSerieEquip($car_id, $car_modell, $xc_db) { $query = "SELECT distinct x.bezeichnung, e.description, x.code, x.state, x.description FROM xc_equ_items x, xc_car_equip e "; $query .= "WHERE e.equip_id=x.id AND e.car_id='$car_id' AND (x.modell_id='$car_modell' OR x.modell_id='0') AND e.status='S' "; $query .= "ORDER BY e.status DESC, x.bezeichnung ASC"; $result=mysql_query($query,$xc_db) or die ("Invalid query: $query"); $query = ''; $this_array = array(); $i = 0; while (list($bezeich, $bez, $code, $state, $comment) = mysql_fetch_row($result)) { if ($bezeich == "") { $bezeich = $bez; } if ($code = "???") { $code = ''; } $comment = str_replace("\n", "
", $comment); $comment = str_replace("\r", "", $comment); $comment = str_replace("\"", "``", $comment); $comment = str_replace("'", "`", $comment); $this_array[$i]['bezeichnung'] = $bezeich; $this_array[$i]['code'] = $code; $this_array[$i]['bemerkung'] = $comment; $this_array[$i]['status'] = $state; $i++; } return $this_array; } ////////////////////////////////////////////////////////////// // Diese Routine wandelt den Delphi CommaText eines Memos // in HTML um ////////////////////////////////////////////////////////////// function CleanComment($str) { $str = str_replace("\"\"","``",$str); $status = 'off'; $newstr = ''; if ($str[0] <> '"') { $next = 'on'; } for ($i=0; $i < strlen($str); $i++) { $checked = False; if (($next == 'on') && ($str[$i] <> '"')) { $status = 'on'; $next = 'off';} if (($next == 'off') && ($str[$i] == ',')) { $status = 'off'; $next = '';} if (($str[$i] == '"') && ($status == 'off') && ($checked == False)) { $status = 'on'; $checked = True; $next = ''; } if (($str[$i] == ',') && ($status == 'off') && ($checked == False)) { $newstr .= "
"; $checked = True; $next = 'on'; } if (($str[$i] == '"') && ($status == 'on') && ($checked == False)) { $status = 'off'; $checked = True; } if (($checked == False) && ($status == 'on')) { $newstr .= $str[$i]; } } $newstr = str_replace("``","\"",$newstr); return $newstr; } ////////////////////////////////////////////////////////////// // Diese Routine holt alle verfügbaren Informationen zum // Fahrzeug aus der Datenbank un speichert sie in einem Array ////////////////////////////////////////////////////////////// function XC_GetCarEquipPrice($car_style, $car_modell,$xc_db) { global $sz_order,$USER_CFG,$active_currency; $this_array = array(); session_start; if (session_is_registered('sz_items') != TRUE) { session_register('sz_items'); } $GLOBALS['sz_items'] = implode(",",$sz_order); // Login Prüfen wenn Fehler dann zurück if ($GLOBALS['xc_hl_login'] == 1) { $price_name = "hk_preis"; $price3_name = "price_hk";} else { $price_name = "vk_preis"; $price3_name = "price_vk";} $sql_query = " i.modell_id='$car_modell' AND (i.id='$sz_order[0]'"; for ($i=1;$i 'O') and ($optional_state <> 'K') and ($optional_state <> 'A') and ($optional_state <> 'S')) { $query = "SELECT ".$price3_name." FROM xc_equ_pgroup WHERE id_equip='$optional_id' ORDER BY id LIMIT $optional_state,1"; $pg_result=mysql_query($query,$xc_db) or die ("Invalid query: $query"); $query = ''; if (mysql_num_rows($pg_result) > 0) { list($optional_preis) = mysql_fetch_row($pg_result); } } //MwSt Prüfen $optional_preis = str_replace(",",".",$optional_preis); $optional_preis = $optional_preis / 1.16; if ($GLOBALS['xc_hl_login'] == 1) { if ($USER_CFG['show_hk'] == "brutto") { $optional_preis = $optional_preis * ($USER_CFG['mwst'] / 100 + 1); } } else { if ($USER_CFG['show_vk'] == "brutto") { $optional_preis = $optional_preis * ($USER_CFG['mwst'] / 100 + 1); } } $optional_preis = $optional_preis * $USER_CFG[$active_currency."_factor"]; $excl_array = array_merge($excl_array,split (",", $excl_code)); array_push($preis_array,$optional_preis); array_push($code_array,$optional_code); } $collision = False; for ($i=0;$i'')) { $collision = True; $sql_query = "WHERE (id='$sz_order[0]'"; for ($j=1;$jconfirm('\"$part1\" kann nicht zusammen mit \"$part2\" als Zubehör verwendet werden!');"; } for ($i=0;$i"; $this_array['value'] = $opt_preis; if ($opt_preis > 0) { $this_array['html_value'] = number_format($opt_preis,2,",",".")." ".$USER_CFG[$currency]; } else { $this_array['value'] = 0; $this_array['html_value'] = ''; $this_array['netto'] = 0; $this_array['brutto'] = 0; }; return $this_array; } ?> "") && ($sql_typ <> "")) { if (($s_standort == $sql_standort) or ($s_standort=="")) { $array_hersteller[$sql_hersteller]++; $array_fzgart[$sql_fzgart]++; $array_typ[$sql_hersteller][$sql_typ]++; } $array_standort[$sql_standort]++; $entry_total++; } } if ($USER_CFG['usergroups'] == True) { $query = "SELECT distinct c.id,".$price_name.",c.hersteller, c.typ, c.motor, c.ausstattung, f.caption, s.caption, c.config, k.caption, c.kw, c.ps, c.farbe, c.tueren "; $query .= "FROM xc_car_list AS c, lst_car_fzgart AS f, lst_car_standort AS s, lst_car_kategorie AS k, con_fzg_group AS g "; $query .= "WHERE f.id = c.id_fzgart AND s.id=c.id_standort AND c.www = '1' and c.config<>2 and c.config<>3 AND k.id = c.id_kategorie "; $query .= "AND c.id=g.fzg_id AND (g.group_id='".str_replace(",","' OR g.group_id='",$groups)."')"; } else { $query = "SELECT distinct c.id,".$price_name.",c.hersteller, c.typ, c.motor, c.ausstattung, f.caption, s.caption, c.config, k.caption, c.kw, c.ps, c.farbe, c.tueren "; $query .= "FROM xc_car_list AS c, lst_car_fzgart AS f, lst_car_standort AS s, lst_car_kategorie AS k "; $query .= "WHERE f.id = c.id_fzgart AND s.id=c.id_standort AND c.www = '1' and c.config<>2 and c.config<>3 AND k.id = c.id_kategorie"; } $entry_count = array_sum($array_hersteller); if($old_fzgart == $s_fzgart) { if ($s_hersteller <> "") { $query .= " AND c.hersteller='$s_hersteller'"; $entry_count = $array_hersteller[$s_hersteller]; } if ($s_typ <> "") { $query .= " AND c.typ='$s_typ'"; $entry_count = $array_typ[$s_hersteller][$s_typ]; } $s_fzgart = ""; } if ($s_fzgart <> "") { $query .= " AND f.caption='$s_fzgart'"; $s_hersteller = ""; $s_typ = ""; $entry_count = $array_fzgart[$s_fzgart]; } if ($s_standort <> "") { $query .= " AND s.caption='$s_standort'"; } $query .= " ORDER BY c.preis_hk LIMIT ".$xc_start.",".$xc_count; $result_search = mysql_query($query,$db); ?> Übersicht über verfügbare Fahrzeuge

In unserer Datenbank sind von insgesamt Fahrzeugen verfügbar, die Ihren angegebenen
Kriterien entsprechen.

0) { $car_ausstattung = substr($car_ausstattung,0,strpos($car_ausstattung,"@@")); } if (strpos($car_typ,"@@") > 0) { $car_typ = substr($car_typ,0,strpos($car_typ,"@@")); } $xc_preis = XC_GetCorrectPrice($sz_preis ,$active_currency); $car_ps = str_replace(",",".",$car_ps); echo "\n"; echo " \n"; echo " "; $i++; } ?>
  # Bezeichnung Preis    
 ".($xc_start + $i)."$car_hersteller $car_typ $car_motor "; if (($car_ausstattung <> "") && ($car_config <> 4)) { echo "($car_ausstattung)"; } echo "
"; echo " $car_kategorie"; if ($car_config < 3) { if (strlen($car_standort) > 0) { echo ", $car_standort"; } if ($car_ps > 0) { echo ", ".(ceil($car_ps))." PS"; } if ($car_tueren > 0) { echo ", $car_tueren Türen"; } if (strlen($car_farbe) > 0) { echo ", $car_farbe"; } } else { echo ", konfigurierbar"; } echo "
"; if ($car_config == 1) { echo "\"Dieses"; } if ($car_config == 4) { echo "\"Dieses"; } echo "
"; echo " "; if ($xc_preis['value'] > 0) { if ($car_config == 4) { echo "ab "; } echo $xc_preis['html_value']; } echo "