/* ==================================================================== * File Name : wmvfaq.php * Description : Simple FAQ viewer for PerkinPusat.Com * Last Updated : Thursday, November 03, 2005 10:11:07 PM * Author : Toekang Web * ==================================================================== */ /* ----------------------------------------- * * Tables, configuration and library we need * * ----------------------------------------- */ $faqcat_file = "WMFAQCat"; $faqlist_file = "WMFAQList"; if(!isset($config)){ include("config/config.php"); } if(!isset($lib_lib)){ include("libs/lib-wmlib.php"); } if(!isset($lib_user)){ include("libs/lib-wmuser.php"); } if(!isset($lib_faq)){ include("libs/lib-wmfaq.php"); } $page_title = $T_FAQ; /* ---------------- * * Begin the action * * ---------------- */ $output = ""; $ps_query = "$PHP_SELF?FaqCatID=$FaqCatID"; $ps_text = $T_FAQ_LIST; /* --- ID Required --- */ if(!isset($FaqCatID) || empty($FaqCatID)){ $FaqCatID = 0; } /* --- Display Sub Categories if exists --- */ $output .= GetDisplayFaqCat($FaqCatID, "$PHP_SELF?FaqCatID="); /* --- Display FAQ if exists --- */ $get_faq = mysql_query("SELECT * FROM $faqlist_file LEFT JOIN $faqcat_file ON ($faqcat_file.FaqCatID = $faqlist_file.FaqLCatID) WHERE $faqlist_file.FaqLCatID='$FaqCatID' ORDER BY $faqlist_file.FaqLID ASC", $db); $kerangka = $detailnya = ""; if(mysql_num_rows($get_faq) != "0"){ $nu = 0; while($get_rows = mysql_fetch_array($get_faq)){ $nu++; $FaqLAnswerDisplay = nl2br($get_rows[FaqLAnswer]); $kerangka .= "
$FaqLAnswerDisplay
[$T_GOTOP]
"; if($FaqCatID == "0"){ $judulkerangka = "" . $T_FAQ . " " . $T_FAQ_MAINCAT . "
"; }else{ $judulkerangka = "" . $T_FAQ . " " . $get_rows[FaqCatName] . "
"; } } } if($kerangka != ""){ $kerangka = $judulkerangka . ""; } $kerangka = <<