You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.1 KiB
PHTML

<?php
14 years ago
require_once ('../bootstrap.php');
14 years ago
$title = "Himmel";
$header = "FAQ / Fragen an die Erzengel";
include "includes/header.php";
// Erstaufruf, oder Frage bereits abgeschickt?
if (!isset ($_POST["eUID"])) {
Print_Text(35);
?>
14 years ago
<br /><br />
<form action="./faq.php" method="POST">
14 years ago
<input type="hidden" name="eUID" value="<?php echo $_SESSION['UID']; ?>">
<textarea name="frage" cols="40" rows="10"><?php Print_Text(36); ?></textarea><br /><br />
<input type="submit" value="<?php Print_Text("save"); ?>">
</form>
14 years ago
<?php
14 years ago
} else {
14 years ago
// Auswertung d. Formular-Daten:
14 years ago
echo "<b>" . Get_Text(37) . "</b><br /><br />\n" . nl2br($_POST["frage"]) . "<br /><br />\n" . Get_Text(38) . "<br />\n";
14 years ago
$SQL = "INSERT INTO `Questions` VALUES ('', '" . $_SESSION['UID'] . "', '" . $_POST["frage"] . "', '', '')";
$Erg = mysql_query($SQL, $con);
}
// Bisherige Anfragen:
14 years ago
echo "<br />\n<b>" . Get_Text(39) . "</b><br />\n";
echo "<hr width=\"99%\">\n";
14 years ago
echo "<br /><b>" . Get_Text(40) . "</b><br />\n";
14 years ago
$SQL = "SELECT * FROM `Questions` WHERE `UID` = " . $_SESSION['UID'] . " AND `AID`='0' ORDER BY 'QID' DESC";
$Erg = mysql_query($SQL, $con);
// anzahl zeilen
14 years ago
$Zeilen = mysql_num_rows($Erg);
14 years ago
if ($Zeilen == 0) {
Print_Text(41);
} else {
14 years ago
for ($n = 0; $n < $Zeilen; $n++) {
echo "<p class='question'>" . nl2br(mysql_result($Erg, $n, "Question")) . "<br />\n";
// Es gibt ja noch keine Antwort:
// echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer"))."</p>\n";
echo "\n<br />---<br />";
}
}
echo "<hr width=\"99%\">\n";
14 years ago
echo "<br /><b>" . Get_Text(42) . "</b><br />\n";
$SQL = "SELECT * FROM `Questions` WHERE `UID`='" . $_SESSION['UID'] . "' and `AID`<>'0' ORDER BY 'QID' DESC";
$Erg = mysql_query($SQL, $con);
// anzahl zeilen
14 years ago
$Zeilen = mysql_num_rows($Erg);
14 years ago
if ($Zeilen == 0) {
Print_Text(41);
} else {
14 years ago
for ($n = 0; $n < $Zeilen; $n++) {
echo "<p class='question'>" . nl2br(mysql_result($Erg, $n, "Question")) . "<br />\n";
echo "<p class='answer'>" . nl2br(mysql_result($Erg, $n, "Answer")) .
"@" . UID2Nick(mysql_result($Erg, $n, "AID")) . "\n";
echo "\n<br />---<br />";
}
}
14 years ago
include ("includes/footer.php");
?>