news refined
This commit is contained in:
parent
91f6e7bbaf
commit
9325d7a78a
|
@ -9,8 +9,6 @@ function admin_rooms() {
|
|||
",<br />\nhier hast du die Möglichkeit, neue Räume für die Schichtpläne einzutragen " .
|
||||
"oder vorhandene abzuändern:<br /><br />\n";
|
||||
|
||||
$html .= "<a href=\"" . page_link_to("admin_rooms") . "&action=new\">Neuen Raum/Ort eintragen</a><br />\n";
|
||||
|
||||
// Räume auflisten
|
||||
if (count($rooms) > 0) {
|
||||
$html .= '<table><thead><tr>';
|
||||
|
@ -20,9 +18,7 @@ function admin_rooms() {
|
|||
|
||||
// Tabellenüberschriften generieren
|
||||
foreach ($rooms[0] as $attr => $tmp)
|
||||
if ($attr == 'RID')
|
||||
$html .= '<th>Anzahl: ' . count($rooms) . '</th>';
|
||||
else
|
||||
if ($attr != 'RID')
|
||||
$html .= '<th>' . $attr . '</th>';
|
||||
$html .= '<th> </th>';
|
||||
$html .= '</tr></thead><tbody>';
|
||||
|
@ -30,9 +26,7 @@ function admin_rooms() {
|
|||
foreach ($rooms as $i => $room) {
|
||||
$html .= '<tr>';
|
||||
foreach ($room as $attr => $value)
|
||||
if ($attr == 'RID')
|
||||
$html .= '<td>' . ($i +1) . '</td>';
|
||||
else
|
||||
if ($attr != 'RID')
|
||||
$html .= '<td>' . $value . '</td>';
|
||||
$html .= '<td><a href="' . page_link_to("admin_rooms") . '&action=change&RID=' . $room['RID'] . '">Edit</a></td>';
|
||||
$html .= '</tr>';
|
||||
|
@ -40,6 +34,7 @@ function admin_rooms() {
|
|||
|
||||
$html .= '</tbody></table>';
|
||||
}
|
||||
$html .= "<hr /><a href=\"" . page_link_to("admin_rooms") . "&action=new\">Neuen Raum/Ort eintragen</a><br />\n";
|
||||
} else {
|
||||
switch ($_REQUEST["action"]) {
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ function user_news_comments() {
|
|||
$html .= '<a href="' . page_link_to("news") . '">« Back</a>';
|
||||
$html .= display_news($news);
|
||||
|
||||
$html .= '<h2>Comments</h2>';
|
||||
$html .= '<h2>Kommentare</h2>';
|
||||
|
||||
$comments = sql_select("SELECT * FROM `news_comments` WHERE `Refid`='" . $nid . "' ORDER BY 'ID'");
|
||||
foreach ($comments as $comment) {
|
||||
|
|
6
txt/TODO
6
txt/TODO
|
@ -1,5 +1,4 @@
|
|||
jetzt:
|
||||
* news kommentieren
|
||||
* news administrieren
|
||||
* user administrieren
|
||||
* schichtimport
|
||||
|
@ -14,12 +13,13 @@ später:
|
|||
* MD5-Passwörter mit Salt speichern
|
||||
* Passwort-Mindestanforderungen stellen
|
||||
* User-Avatare (code liegt auskommentiert in user_settings.php)
|
||||
* user_messages schön machen
|
||||
* user_messages schön machen (dialogbasiert)
|
||||
* Formulare weg von Tabellen
|
||||
* Privilegien korrigieren (an die vom CVS anpassen)
|
||||
* Beim Raum-Management die benötigten Engel anzeigen
|
||||
* (Beim Raum-Management die benötigten Engel anzeigen)
|
||||
* Löschen nur mit Rückfrage
|
||||
* FAQ ordentlich mehrsprachig machen
|
||||
* Fertig übersetzen/Sprachwirrwarr beseitigen
|
||||
|
||||
* schichten ueber monatsgrenzen einbaue im moment werden die tage nur
|
||||
hochgezaehlt und die monatzgrenzen werden ignoriert
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Kommentare zu den News";
|
||||
$header = "Kommentar";
|
||||
include ("includes/header.php");
|
||||
|
||||
if (isset ($_GET["nid"])) {
|
||||
if (isset ($_GET["text"])) {
|
||||
$ch_sql = "INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) " .
|
||||
"VALUES ('" . $_GET["nid"] . "', '" . date("Y-m-d H:i:s") . "', '" . $_GET["text"] . "', '" . $_SESSION["UID"] . "')";
|
||||
$Erg = mysql_query($ch_sql, $con);
|
||||
|
||||
if ($Erg == 1) {
|
||||
echo "Eintrag wurde gespeichert<br /><br />";
|
||||
SetHeaderGo2Back();
|
||||
}
|
||||
}
|
||||
|
||||
$SQL = "SELECT * FROM `news_comments` WHERE `Refid`='" . $_GET["nid"] . "' ORDER BY 'ID'";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
// anzahl zeilen
|
||||
$news_rows = mysql_num_rows($Erg);
|
||||
?>
|
||||
|
||||
<table border="0" width="100%" class="border" cellpadding="2" cellspacing="1">
|
||||
<tr class="contenttopic">
|
||||
<th width=100 align="left">Datum</th>
|
||||
<th align="left">Nick</th>
|
||||
</tr>
|
||||
<tr class="contenttopic">
|
||||
<th align="left" colspan=2>Kommentar</th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
for ($n = 0; $n < $news_rows; $n++) {
|
||||
echo "\t<tr class=\"content\">";
|
||||
echo "\t\t<td width=100>";
|
||||
echo mysql_result($Erg, $n, "Datum");
|
||||
echo "\t\t</td>";
|
||||
echo "\t\t<td>";
|
||||
echo UID2Nick(mysql_result($Erg, $n, "UID"));
|
||||
// avatar anzeigen?
|
||||
echo DisplayAvatar(mysql_result($Erg, $n, "UID"));
|
||||
echo "\t\t</td>";
|
||||
echo "</tr>";
|
||||
echo "\t<tr class=\"content\">";
|
||||
echo "\t\t<td colspan=\"2\">";
|
||||
echo nl2br(mysql_result($Erg, $n, "Text")) . "\n";
|
||||
echo "\t\t</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
?>
|
||||
|
||||
<br />
|
||||
<hr>
|
||||
<h4>Neuer Kommentar:</h4>
|
||||
<a name="Neu"> </a>
|
||||
|
||||
<form action="./news_comments.php" method="GET">
|
||||
<input type="hidden" name="nid" value="<?php echo $_GET["nid"]; ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right" valign="top">Text:</td>
|
||||
<td><textarea name="text" cols="50" rows="10"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<input type="submit" value="sichern...">
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
} else {
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
}
|
||||
|
||||
include ("includes/footer.php");
|
||||
?>
|
Loading…
Reference in New Issue