|
|
|
|
Frequently Asked Questions
Maui and Lake Tahoe |
|
|
|
|
|
"; echo "numbofheader: ".$numofheaders." "; echo ""; print_r($headerIDs); echo " ";}
// Given a FAQ header ID, return the actual name of the header
function GetHeader($headerID) {
$link = dbConnect2();
$queryheader = "SELECT * FROM faqheader WHERE ID = '".$headerID."'";
$resultheader = mysqli_query($link, $queryheader);
$row = mysqli_fetch_assoc($resultheader);
mysqli_close($link);
$header = $row['header'];
if($debug) { echo $queryheader." ";}
return $header;
}
// Cycle through each header ID and return the header followed by all the questions linked to that header.
// If a header has no questions linked to it, do not display it and move on to the next header.
$prevHeaderTitle = "";
$columncounter = 0;
foreach($headerIDs as $headerID) {
$query = "SELECT * FROM faq WHERE header = ".$headerID." ORDER BY ID ASC";
$link = dbConnect2();
$result = mysqli_query($link, $query);
$j = 0;
$headertitle = GetHeader($headerID);
$numofrows = mysqli_num_rows($result);
mysqli_close($link);
if($debug == 1) {
echo "query: ".$query." ";
echo "headertitle: ".$headertitle." ";
echo "prevHeaderTitle: ".$prevHeaderTitle." ";
echo "numofrows: ".$numofrows."
";
}
if(($prevHeaderTitle != $headertitle) && ($numofrows > 0)) {
?>
|
|
0) {
$ID = $row['id'];
$header = $row['header'];
$question = $row['question'];
$answer = $row['answer'];
if($debug == 1) {
echo "header: ".$header." ";
echo "headerID: ".$headerID." ";
echo "question: ".$question." ";
echo "answer: ".$answer."
";
}
if($header == $headerID) {
?>
"> |
|
";
echo "numofheaders (rounded): ".round($numofheaders / 2)."
";
}
}
?>
|
|
|
|
|
|
Phone Numbers: Island Gophers (Maintenance, Incidentals, Concierge) (808) 357-3625 or Wailea Security (808) 879-1948 or (808) 269-3663 |
|
|
|
|
|
";
echo "headertitle: ".$headertitle." ";
echo "prevHeaderTitle: ".$prevHeaderTitle." ";
echo "numofrows: ".$numofrows."
";
}
if(($prevHeaderTitle != $headertitle) && ($numofrows > 0)) {
?>
|
|
0) {
$ID = $row['id'];
$header = $row['header'];
$question = $row['question'];
$answer = $row['answer'];
if($debug == 1) {
echo "header: ".$header." ";
echo "headerID: ".$headerID." ";
echo "question: ".$question." ";
echo "answer: ".$answer."
";
}
if($header == $headerID) {
?>
" class="faqquestion" name=""> |
|
|
|
";
echo "numofheaders (rounded): ".round($numofheaders / 2)."
";
}
}
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|