Filter:   InfoImg
download faq.php
Language: PHP
LOC: 76
Project Info
Free Market(freemarket)
Server: SourceForge
Type: cvs
...\freemarket\freemarket\www\
   .htaccess
   admin.php
   article.php
   auth.inc.php
   backend.php
   banners.php
   comments.php
   counter.php
   dhtmllib.js
   download.php
   ezhilit.php
   faq.php
   footer.php
   friend.php
   header.php
   index.php
   lang-croatian.php
   lang-danish.php
   lang-dutch.php
   lang-english.php
   lang-french.php
   lang-german.php
   lang-indonesia.php
   lang-indonesian.php
   lang-italian.php
   lang-japanese.php
   lang-korean.php
   lang-latvian.php
   lang-norwegian.php
   lang-polish.php
   lang-portuguese.php
   lang-quebec.php
   lang-russian.php
   lang-simplifiedchinese.php
   lang-slovak.php
   lang-spanish.php
   lang-swedish.php
   lang-TEMPLATE.php
   ...-traditionalchinese.php
   links.php
   mainfile.php
   memberlist.php
   memberslist.php
   pollBooth.php
   pollcomments.php
   postinfo.html
   print.php
   problems.php
   scroller.js
   search.php
   sections.php
   stats.php
   submit.php
   top.php
   topics.php
   user.php

<?php

######################################################################
# PHP-NUKE 4.2: FAQ Add-On
# ===========================
#
# Brought to you by PHP Nuke Add-On Team
#
# Copyright (c) 2000 by Richard Tirtadji (rtirtadji@hotmail.com)
# 
# http://www.phpnuke.web.id
#
#
######################################################################

if (!isset($mainfile)) { include("mainfile.php"); }

function ShowFaq($id_cat) {
  global $bgcolor2;
  $result = mysql_query(" select categories from faqCategories " .
                        " where id_cat='$id_cat' ");
  list($categories) = mysql_fetch_row($result);

  echo"
<center>
  <table cellpadding=0 cellspacing=1 bgcolor=000000 width=100% border=0>
  <tr> <td>
  <table cellpadding=8 cellspacing=1 bgcolor=FFFFFF width=100% border=0>
   <tr><td> <center> <font size=4>" .translate("FAQ (Frequently Asked Questions)").
   "</font> </center> <br><br>
   <a name=top><a href=faq.php>".translate("Home")."</a> | $categories
    <table width=100% cellpadding=4 cellspacing=0 border=0>
    <tr bgcolor=$bgcolor2><td colspan=2><font color=white><b>Questions</b></font></td></tr><tr><td colspan=2>";


$result = mysql_query("select id, id_cat, question, answer from faqAnswer where id_cat='$id_cat'");
while(list($id, $id_cat, $question, $answer) = mysql_fetch_row($result)) {
echo"<li><a href=\"#$id\">$question</a>";
}

echo "</td></tr></table>
	<br>";

}

function ShowFaqAll($id_cat) {
   global $bgcolor2;
   echo"
     <table width=100% cellpadding=4 cellspacing=0 border=0>
     <tr bgcolor=$bgcolor2><td colspan=2><font color=white><b>Answers</b></font></td></tr>";
   $result = mysql_query("select id, id_cat, question, answer from faqAnswer where id_cat='$id_cat'");
   while(list($id, $id_cat, $question, $answer) = mysql_fetch_row($result)) {
      echo"<tr><td><a name=\"#$id\"><b>$question</b>
      <p align=justify>$answer</p>
      <a href=#top>".translate("Back to Top")."</a>
      <hr>
       </td></tr>";
   }
   echo"
   </table>";
}

if (!$myfaq) {

  include ("header.php");
  echo"<center>
    <table cellpadding=0 cellspacing=1 bgcolor=000000 width=100% border=0><tr><td>
    <table cellpadding=8 cellspacing=1 bgcolor=FFFFFF width=100% border=0><tr><td>
    <center><font size=4>".translate("FAQ (Frequently Asked Questions)")."</font></center><br><br>
    <table width=100% cellpadding=4 cellspacing=0 border=0>
    <tr bgcolor=$bgcolor2><td colspan=2><font color=white><b>".translate("Categories")."</b></font></td></tr><tr><td>";

  $result = mysql_query("select id_cat, categories from faqCategories");
  while(list($id_cat, $categories) = mysql_fetch_row($result)) {
    echo"<li><a href=\"faq.php?myfaq=yes&id_cat=$id_cat&".
      "categories=$categories\">$categories</a>";
  }
  echo"</td></tr></table></td></tr></table></td></tr></table>";
  include ("footer.php");
}
else {
   include("header.php");
   ShowFaq($id_cat);
   ShowFaqAll($id_cat);
   echo"</td></tr></table></td></tr></table>";
}

include("footer.php");

?>