2005-09-10 19:25:43 +02:00
|
|
|
<?php
|
|
|
|
$title = "Himmel";
|
|
|
|
$header = "FAQ / Fragen an die Erzengel";
|
2011-05-26 00:52:57 +02:00
|
|
|
include ("../../../camp2011/includes/header.php");
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Erstaufruf, oder Frage bereits abgeschickt?
|
2005-11-06 01:44:48 +01:00
|
|
|
if (!IsSet($_POST["eUID"]))
|
|
|
|
{
|
|
|
|
Print_Text(35);
|
2005-09-10 19:25:43 +02:00
|
|
|
?>
|
|
|
|
<br><br>
|
|
|
|
<form action="./faq.php" method="POST">
|
2005-11-30 23:13:38 +01:00
|
|
|
<input type="hidden" name="eUID" value="<?PHP echo $_SESSION['UID'] ?>">
|
2005-09-10 19:25:43 +02:00
|
|
|
<textarea name="frage" cols="40" rows="10"><?PHP Print_Text(36); ?></textarea><br><br>
|
2005-11-17 01:09:22 +01:00
|
|
|
<input type="submit" value="<?PHP Print_Text("save"); ?>">
|
2005-09-10 19:25:43 +02:00
|
|
|
</form>
|
2005-11-30 23:13:38 +01:00
|
|
|
<?PHP
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
} else {
|
|
|
|
// Auswertung d. Formular-Daten:
|
|
|
|
|
2005-11-06 01:44:48 +01:00
|
|
|
echo "<b>".Get_Text(37)."</b><br><br>\n".nl2br($_POST["frage"])."<br><br>\n".Get_Text(38)."<br>\n";
|
2005-09-10 19:25:43 +02:00
|
|
|
|
2006-12-04 20:54:51 +01:00
|
|
|
$SQL = "INSERT INTO `Questions` VALUES ('', '".$_SESSION['UID']."', '". $_POST["frage"]. "', '', '')";
|
2005-09-10 19:25:43 +02:00
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
}
|
|
|
|
// Bisherige Anfragen:
|
|
|
|
echo "<br>\n<b>".Get_Text(39)."</b><br>\n";
|
|
|
|
echo "<hr width=\"99%\">\n";
|
|
|
|
echo "<br><b>".Get_Text(40)."</b><br>\n";
|
|
|
|
|
2006-12-04 20:54:51 +01:00
|
|
|
$SQL = "SELECT * FROM `Questions` WHERE `UID` = ". $_SESSION['UID']. " AND `AID`='0' ORDER BY 'QID' DESC";
|
2005-09-10 19:25:43 +02:00
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
// anzahl zeilen
|
|
|
|
$Zeilen = mysql_num_rows($Erg);
|
|
|
|
|
|
|
|
if ($Zeilen==0){
|
|
|
|
Print_Text(41);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
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";
|
|
|
|
echo "<br><b>".Get_Text(42)."</b><br>\n";
|
2006-12-04 20:54:51 +01:00
|
|
|
$SQL = "SELECT * FROM `Questions` WHERE `UID`='".$_SESSION['UID']."' and `AID`<>'0' ORDER BY 'QID' DESC";
|
2005-09-10 19:25:43 +02:00
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
// anzahl zeilen
|
|
|
|
$Zeilen = mysql_num_rows($Erg);
|
|
|
|
|
|
|
|
if ($Zeilen==0){
|
|
|
|
Print_Text(41);
|
|
|
|
} else {
|
|
|
|
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
|
|
|
echo "<p class='question'>".nl2br(mysql_result($Erg, $n, "Question"))."<br>\n";
|
2006-04-16 15:55:40 +02:00
|
|
|
echo "<p class='answer'>".nl2br(mysql_result($Erg, $n, "Answer")).
|
|
|
|
"@". UID2Nick(mysql_result($Erg, $n, "AID"))."\n";
|
2005-09-10 19:25:43 +02:00
|
|
|
echo "\n<br>---<br>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-26 00:52:57 +02:00
|
|
|
include ("../../../camp2011/includes/footer.php");
|
2005-09-10 19:25:43 +02:00
|
|
|
?>
|