require("/home/atsi/pagelayout/header.inc"); require("/home/atsi/pagelayout/footer.inc"); add_header("ATSI - Products","atsi,products,product line,line card,testers,tester"); ?>
Product Information
$dirlist = Array(); if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && !is_file('./'.$file)) { array_push($dirlist,$file); } } closedir($handle); } sort($dirlist); $cat_misc = ""; $sub_categories = ""; $categories = Array(); foreach($dirlist as $d) { if (is_file('./'.$d.'/index.html')) { $s = implode ('', file('./'.$d.'/index.html')); if (preg_match("/add_product_header\(\"([^\"]*)\"/i",$s,$matches)) { $s2 = "".$matches[1].""; if (preg_match("/product_category\(\"([^\"]*)\"/i",$s,$matches)) { $categories[$matches[1]] .= "".$s2."
"; } else { $cat_misc .="".$s2."
"; } } else { if (preg_match("/product_category\(\"([^\"]*)\"/i",$s,$matches)) { $sub_categories .= ""; } } } } ksort($categories); foreach ($categories as $key => $va) { echo "".$key."
"; echo $va; ?>} ?>
Other Products
echo $cat_misc; ?>if ($sub_categories) { ?>
echo $sub_categories; } ?> add_footer(); ?>