'.$parts[1].''; } $html_string = join(" » ", $html); return $html_string; } require("libs/Smarty.class.php"); $smarty = new smarty; $smarty->register_modifier('breadcrumb_format', 'breadcrumb_format'); /*$smarty->register_modifier('sidebar_links', 'sidebar_links');*/ $_pages = array("home", "ueberuns", "unternehmen", "geschichte", "historie", "standorte", "import", "export", "partner", "national", "international", "lieferanten", "kooperationen", "produkte", "oas", "verbrauchsmaterial", "ocs", "ods", "chemikalien", "moebel", "logistik", "service", "glasblaeserei", "pipettenkalibrierung", "patronenregenerierung", "wartung_reparatur", "vorfuehrgeraete", "exklusive", "aktuelles", "veranstaltungen", "sonderaktionen", "galerie", "sonstiges", "shop", "download", "lieferanten", "diverses", "impressum", "kontakt", "wegbeschreibung", "jobs", "lieferanten_download", "diverses_download", "logoseite", "krannich" ); $lang = (isset($_GET['lang']) && in_array($_GET['lang'], array("de", "en")) ? $_GET['lang'] : 'de'); $_p = (isset($_GET['p']) && in_array($_GET['p'], $_pages) ? $_GET['p'] : 'home'); if($_p=='lieferanten'){ $suppliers_per_page = 10; // Anzahl der Arrays $handle = fopen ("hpb/export/1/lieferanten.csv","r"); // Datei zum Lesen �ffnen while ( ($data = fgetcsv ($handle, 1000, ",")) !== FALSE ) { // Daten werden aus der Datei // in ein Array $data gelesen $num = count ($data); // Felder im Array $data // werden gez�hlt $row++; // Anzahl der Arrays wird // inkrementiert for ($c=0; $c < $num; $c++) { // FOR-Schleife, um Felder $result[$row][$c] = explode(';', $data[$c]); // des Arrays auszugeben if($result[$row][$c][0]!='Sortierung'){ // keinen Link f�r erste Zeile mit Spaltennamen $current_letter = substr($result[$row][$c][0], 0, 1); if(!isset($links[$current_letter])){ $suppliers_per_letter[$current_letter] = 0; } $suppliers_per_letter[$current_letter]++; $result[$row][$c][8] = $suppliers_per_letter[$current_letter]; if($suppliers_per_letter[$current_letter] > $suppliers_per_page){ $paging_links[$current_letter][1] = '1'; $pages_for_letter[$current_letter] = ceil($suppliers_per_letter[$current_letter] / $suppliers_per_page); $paging_links[$current_letter][$pages_for_letter[$current_letter]] = '' . $pages_for_letter[$current_letter] .''; } $paging_info = $pages_for_letter[$current_letter] > 1 ? '&page=1' : ''; $links[$current_letter] = ' ' . $current_letter .' '; } } } fclose ($handle); $smarty->assign("LIEFERANTEN", $result); /* echo'
';
    print_r($$result);
    echo'
'; */ $smarty->assign("LETTER_LINKS", $links); $smarty->assign("SUPPLIERS_PER_PAGE", $suppliers_per_page); $smarty->assign("SUPPLIERS_PER_LETTER", $suppliers_per_letter); $letter = (isset($_GET['letter'])? $_GET['letter'] : ''); $letter_page = (isset($_GET['page'])? $_GET['page'] : ''); $smarty->assign("CURRENT_LETTER", $letter); $smarty->assign("CURRENT_LETTER_PAGE", $letter_page); $smarty->assign("PAGING_LINKS", $paging_links); } if(!file_exists("templates/".$lang.".content.".$_p.".tpl")) $_p = "unknown"; $smarty->assign("export_file", (file_exists("hpb/export/1/".$_p."-include")?"hpb/export/1/".$_p."-include":"templates/".$lang.".include.unknown.tpl")); if ($lang == "en"){ $smarty->assign("export_file", (file_exists("hpb/export/2/".$_p."-include")?"hpb/export/2/".$_p."-include":"templates/".$lang.".include.unknown.tpl")); } $smarty->assign("link_navi", array($_p => 'id="'.$_p.'-aktive"')); $smarty->assign("_p", $_p); $smarty->display($lang.".content.".$_p.".tpl"); ?>