addClick("kitchen", "furniture_material"); $componentobj=new Component(); $template_file=substr($_SERVER["SCRIPT_FILENAME"], 0, -3)."htm"; $tpl = new TemplatePower($template_file); $dbo3=new DBHandle("db03"); $num_row=3; $kitchen_channel_sql="select question_id, subject from channel_question where source='kitchen' and status='active' order by entry_date desc limit $num_row"; $kitchen_channel_query=$dbo3->query($kitchen_channel_sql); $material_menu = implode ('', file ('/var/www/html/house18.com/furniture/material_menu.php')); $tpl->prepare(); $tpl->assign("top", $componentobj->GetTop("house18","furniture")); $tpl->assign("footer", $componentobj->GetFooter("house18")); $tpl->assign("material_menu", $material_menu); for ($i=1;$kitchen_channel_row=mysql_fetch_array($kitchen_channel_query);$i++) { $tpl->newBlock("kitchen_channel_list"); $tpl->assign("kitchen_subject", $kitchen_channel_row["subject"]); $tpl->assign("question_id", $kitchen_channel_row["question_id"]); $tpl->assign("question_no", $i); $tpl->assign("kitchen_question_id", $kitchen_channel_row["question_id"]); } require_once("online_service.php"); $os = new online_service(); $max_company_list = $os->getMaxCompanyList('kitchen'); $company_list_query = $os->company_list('kitchen',$max_company_list); while ($company_list_result = mysql_fetch_array($company_list_query)) { $tpl->newBlock("company_list"); $tpl->assign("company_desc", $company_list_result['company_desc']); $service_section_id = $os->getIDFromPlan($company_list_result['planid']); if ($service_section_id == "1") { //display url only $company_url = "" . $company_list_result['company_name'] . ""; } elseif ($service_section_id == "2") { //display detail box $company_url = "電話: " . $company_list_result['company_phone'] . "傳真: " . $company_list_result['company_fax'] . "地址: " . $company_list_result['company_address'] . "','');return true;\" onmouseout=\"nd();return true;\" style=\"text-decoration:none\">" . $company_list_result['company_name'] . ""; //box display company detail } elseif ($service_section_id == "3") { //display additional page $company_url = "" . $company_list_result['company_name'] . ""; } else { $company_url = ""; } $tpl->assign("company_url", $company_url ); } $tpl->printToScreen(); ?>