MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/www/modules/FAQ/index.php
<?php


if (!eregi("modules.php", $PHP_SELF)) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");

function ShowFaq($id_cat, $categories) {
    global $bgcolor2, $sitename, $prefix, $dbi;
    OpenTable();
    echo"<center><font class=\"content\"><b>$sitename "._FAQ2."</b></font></center><br><br>"
	."<a name=\"top\"></a><br>" /* Bug fix : added missing closing hyperlink tag messes up display */
	.""._CATEGORY.": <a href=\"modules.php?op=modload&amp;name=FAQ&amp;file=index\">"._MAIN."</a> -> $categories"
	."<br><br>"
	."<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">"
	."<tr bgcolor=\"$bgcolor2\"><td colspan=\"2\"><font class=\"option\"><b>"._QUESTION."</b></font></td></tr><tr><td colspan=\"2\">";
    $result = sql_query("select id, id_cat, question, answer from $prefix"._faqAnswer." where id_cat='$id_cat'", $dbi);
    while(list($id, $id_cat, $question, $answer) = sql_fetch_row($result, $dbi)) {
	echo"<strong><big>&middot;</big></strong>&nbsp;&nbsp;<a href=\"#$id\">$question</a><br>";
    }
    echo "</td></tr></table>
    <br>";
}

function ShowFaqAll($id_cat) {
    global $bgcolor2, $prefix, $dbi;
    echo "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">"
	."<tr bgcolor=\"$bgcolor2\"><td colspan=\"2\"><font class=\"option\"><b>"._ANSWER."</b></font></td></tr>";
    $result = sql_query("select id, id_cat, question, answer from $prefix"._faqAnswer." where id_cat='$id_cat'", $dbi);
    while(list($id, $id_cat, $question, $answer) = sql_fetch_row($result, $dbi)) {
	echo"<tr><td><a name=\"$id\"></a>"
	    ."<strong><big>&middot;</big></strong>&nbsp;&nbsp;<b>$question</b>"
	    ."<p align=\"justify\">$answer</p>"
	    ."[ <a href=\"#top\">"._BACKTOTOP."</a> ]"
	    ."<br><br>"
	    ."</td></tr>";
    }
    echo "</table><br><br>"
	."<div align=\"center\"><b>[ <a href=\"modules.php?op=modload&amp;name=FAQ&amp;file=index\">"._BACKTOFAQINDEX."</a> ]</b></div>";
}

if (!$myfaq) {
    global $currentlang, $multilingual;
    if ($multilingual == 1) {
    	$querylang = "WHERE flanguage='$currentlang'";
    } else {
    	$querylang = "";
    }
    include("header.php");
    OpenTable();
    echo "<center><font class=\"option\">"._FAQ2."</font></center><br><br>"
	."<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">"
	."<tr><td bgcolor=\"$bgcolor2\"><font class=\"option\"><b>"._CATEGORIES."</b></font></td></tr><tr><td>";
    $result = sql_query("select id_cat, categories from $prefix"._faqCategories." $querylang", $dbi);
    while(list($id_cat, $categories) = sql_fetch_row($result, $dbi)) {
	$catname = urlencode($categories);
	echo"<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?op=modload&amp;name=FAQ&amp;file=index&amp;myfaq=yes&amp;id_cat=$id_cat&amp;categories=$catname\">$categories</a><br>";
    }
    echo "</td></tr></table>";
    CloseTable();
    include("footer.php");
} else {
    include("header.php");
    ShowFaq($id_cat, $categories);
    ShowFaqAll($id_cat);
    CloseTable();
    include("footer.php");
}

?>