summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DB/db_rewrite.sql43
-rw-r--r--includes/pages/user_news.php71
-rw-r--r--includes/sys_menu.php1
-rw-r--r--www-ssl/admin/user.php133
-rw-r--r--www-ssl/index.php4
-rw-r--r--www-ssl/nonpublic/engelbesprechung.php29
6 files changed, 80 insertions, 201 deletions
diff --git a/DB/db_rewrite.sql b/DB/db_rewrite.sql
index f713c813..20a23f1e 100644
--- a/DB/db_rewrite.sql
+++ b/DB/db_rewrite.sql
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: localhost
--- Erstellungszeit: 03. Juni 2011 um 04:40
+-- Erstellungszeit: 03. Juni 2011 um 04:47
-- Server Version: 5.1.44
-- PHP-Version: 5.3.1
@@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS `Counter` (
--
INSERT INTO `Counter` (`URL`, `Anz`) VALUES
-('news', 190),
+('news', 192),
('login', 26),
('logout', 13),
('start', 26),
@@ -82,13 +82,14 @@ INSERT INTO `Counter` (`URL`, `Anz`) VALUES
('admin_angel_types', 71),
('user_settings', 126),
('user_messages', 113),
-('admin_groups', 125),
+('admin_groups', 129),
('user_questions', 55),
('admin_questions', 42),
('admin_faq', 55),
-('admin_news', 32),
+('admin_news', 33),
('news_comments', 151),
-('admin_user', 55);
+('admin_user', 59),
+('user_meetings', 5);
-- --------------------------------------------------------
@@ -134,29 +135,30 @@ CREATE TABLE IF NOT EXISTS `GroupPrivileges` (
`privilege_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `group_id` (`group_id`,`privilege_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=64 ;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=71 ;
--
-- Daten für Tabelle `GroupPrivileges`
--
INSERT INTO `GroupPrivileges` (`id`, `group_id`, `privilege_id`) VALUES
-(42, -2, 15),
+(69, -2, 11),
(24, -1, 5),
-(40, -2, 4),
-(41, -2, 3),
+(68, -2, 9),
+(67, -2, 17),
(23, -1, 2),
(62, -4, 16),
(61, -4, 6),
-(44, -2, 11),
-(43, -2, 9),
+(66, -2, 15),
+(65, -2, 3),
(12, -5, 10),
(60, -4, 12),
(59, -4, 14),
-(45, -2, 8),
+(64, -2, 4),
(58, -4, 13),
(57, -4, 7),
-(63, -4, 5);
+(63, -4, 5),
+(70, -2, 8);
-- --------------------------------------------------------
@@ -223,12 +225,14 @@ CREATE TABLE IF NOT EXISTS `News` (
`UID` int(11) NOT NULL DEFAULT '0',
`Treffen` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
--
-- Daten für Tabelle `News`
--
+INSERT INTO `News` (`ID`, `Datum`, `Betreff`, `Text`, `UID`, `Treffen`) VALUES
+(4, 1307076340, 'Achtung, Treffen!', '', 1, 1);
-- --------------------------------------------------------
@@ -268,7 +272,7 @@ CREATE TABLE IF NOT EXISTS `Privileges` (
`desc` varchar(1024) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=18 ;
--
-- Daten für Tabelle `Privileges`
@@ -290,7 +294,8 @@ INSERT INTO `Privileges` (`id`, `name`, `desc`) VALUES
(13, 'admin_faq', 'Edit FAQs'),
(14, 'admin_news', 'Administrate the news section'),
(15, 'news_comments', 'User can comment news'),
-(16, 'admin_user', 'Administrate the angels');
+(16, 'admin_user', 'Administrate the angels'),
+(17, 'user_meetings', 'Lists meetings (news)');
-- --------------------------------------------------------
@@ -1033,7 +1038,9 @@ INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES
('news_comments', 'DE', 'News Kommentare'),
('news_comments', 'EN', 'News comments'),
('admin_news', 'DE', 'News verwalten'),
-('admin_news', 'EN', 'Manage news');
+('admin_news', 'EN', 'Manage news'),
+('user_meetings', 'DE', 'Treffen'),
+('user_meetings', 'EN', 'Meetings');
-- --------------------------------------------------------
@@ -1076,7 +1083,7 @@ CREATE TABLE IF NOT EXISTS `User` (
--
INSERT INTO `User` (`UID`, `Nick`, `Name`, `Vorname`, `Alter`, `Telefon`, `DECT`, `Handy`, `email`, `ICQ`, `jabber`, `Size`, `Passwort`, `Gekommen`, `Aktiv`, `Tshirt`, `color`, `Sprache`, `Avatar`, `Menu`, `lastLogIn`, `CreateDate`, `Art`, `kommentar`, `Hometown`) VALUES
-(1, 'admin', '', '', 0, '', '', '', '', '', '', 'L', '21232f297a57a5a743894a0e4a801fc3', 0, 0, 0, 10, 'DE', 115, 'L', 1307075960, '0000-00-00 00:00:00', '', '', ''),
+(1, 'admin', '', '', 0, '', '', '', '', '', '', 'L', '21232f297a57a5a743894a0e4a801fc3', 0, 0, 0, 10, 'DE', 115, 'L', 1307076377, '0000-00-00 00:00:00', '', '', ''),
(147, 'msquare', '', '', 23, '', '', '', 'msquare@notrademark.de', '', '', 'L', 'e10adc3949ba59abbe56e057f20f883e', 0, 0, 0, 6, 'EN', 0, 'L', 1307042703, '2011-06-02 00:55:09', '', '', '');
-- --------------------------------------------------------
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php
index 7b4f9482..818c2da2 100644
--- a/includes/pages/user_news.php
+++ b/includes/pages/user_news.php
@@ -1,16 +1,45 @@
<?php
+function user_meetings() {
+ global $DISPLAY_NEWS, $privileges, $user;
+
+ $html = "";
+
+ if (isset ($_REQUEST['page']) && preg_match("/^[0-9]{1,}$/", $_REQUEST['page']))
+ $page = $_REQUEST['page'];
+ else
+ $page = 0;
+
+ $news = sql_select("SELECT * FROM `News` WHERE `Treffen`=1 ORDER BY `ID` DESC LIMIT " . ($page * $DISPLAY_NEWS) . ", " . $DISPLAY_NEWS);
+ foreach ($news as $entry)
+ $html .= display_news($entry);
+
+ $html .= "<div class=\"pagination\">\n\n";
+ $dis_rows = ceil(sql_num_query("SELECT * FROM `News` WHERE `Treffen`=1") / $DISPLAY_NEWS);
+
+ $html .= Get_Text(5);
+
+ for ($i = 0; $i < $dis_rows; $i++) {
+ if ($i == $_REQUEST['page'])
+ $html .= ($i +1) . "&nbsp; ";
+ else
+ $html .= '<a href="' . page_link_to("news") . '&page=' . $i . '">' . ($i +1) . '</a>&nbsp; ';
+ }
+ $html .= '</div>';
+ return $html;
+}
+
function display_news($news) {
global $privileges, $p;
$html .= "";
$html .= '<article class="news' . ($news['Treffen'] == 1 ? ' meeting' : '') . '">';
$html .= '<details>';
- $html .= date("Y-m-d H:i",$news['Datum']) . ', ';
+ $html .= date("Y-m-d H:i", $news['Datum']) . ', ';
$html .= UID2Nick($news['UID']);
if ($p != "news_comments")
$html .= ', <a href="' . page_link_to("news_comments") . '&nid=' . $news['ID'] . '">Kommentare (' . sql_num_query("SELECT * FROM `news_comments` WHERE `Refid`='" . sql_escape($news['ID']) . "'") . ') &raquo;</a>';
$html .= '</details>';
- $html .= '<h3>'.($news['Treffen'] == 1 ? '[Meeting] ' : '') . ReplaceSmilies($news['Betreff']) . '</h3>';
+ $html .= '<h3>' . ($news['Treffen'] == 1 ? '[Meeting] ' : '') . ReplaceSmilies($news['Betreff']) . '</h3>';
$html .= '<p>' . ReplaceSmilies(nl2br($news['Text'])) . '</p>';
if (in_array("admin_news", $privileges))
$html .= "<details><a href=\"" . page_link_to("admin_news") . "&action=edit&id=" . $news['ID'] . "\">Edit</a></details>\n";
@@ -51,22 +80,22 @@ function user_news_comments() {
$html .= "</table>";
$html .= '
- <br />
- <hr>
- <h2>Neuer Kommentar:</h2>
- <a name="Neu">&nbsp;</a>
-
- <form action="' . page_link_to("news_comments") . '" method="post">
- <input type="hidden" name="nid" value="' . $_REQUEST["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>';
+ <br />
+ <hr>
+ <h2>Neuer Kommentar:</h2>
+ <a name="Neu">&nbsp;</a>
+
+ <form action="' . page_link_to("news_comments") . '" method="post">
+ <input type="hidden" name="nid" value="' . $_REQUEST["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>';
} else {
$html .= "Fehlerhafter Aufruf!";
}
@@ -125,9 +154,9 @@ function user_news() {
</tr>';
if (in_array('admin_news', $privileges)) {
$html .= ' <tr>
- <td align="right">' . Get_Text(9) . '</td>
- <td><input type="checkbox" name="treffen" size="1" value="1"></td>
- </tr>';
+ <td align="right">' . Get_Text(9) . '</td>
+ <td><input type="checkbox" name="treffen" size="1" value="1"></td>
+ </tr>';
}
$html .= '</table>
diff --git a/includes/sys_menu.php b/includes/sys_menu.php
index 6a10c32b..d5543f97 100644
--- a/includes/sys_menu.php
+++ b/includes/sys_menu.php
@@ -22,6 +22,7 @@ function make_navigation() {
// Engel Navigation
$menu .= make_navigation_for(Get_Text('inc_schicht_engel'), array (
"news",
+ "user_meetings",
"user_myshifts",
"user_shifts",
"user_messages",
diff --git a/www-ssl/admin/user.php b/www-ssl/admin/user.php
deleted file mode 100644
index 0b31c97c..00000000
--- a/www-ssl/admin/user.php
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-require_once ('../bootstrap.php');
-
-$title = "User-Liste";
-$header = "Editieren der Engelliste";
-include ("includes/header.php");
-include ("includes/funktion_db_list.php");
-
-if (!IsSet ($_GET["enterUID"])) {
- // Userliste, keine UID uebergeben...
-
- echo "<a href=\"../makeuser.php\">Neuen Engel eintragen</a><br /><br />\n";
-
- if (!isset ($_GET["OrderBy"]))
- $_GET["OrderBy"] = "Nick";
- $SQL = "SELECT User.*, UserGroups.Name AS 'Group' FROM `User` " .
- "LEFT JOIN `UserCVS` ON User.UID = UserCVS.UID " .
- "LEFT JOIN `UserGroups` ON UserGroups.UID = UserCVS.GroupID " .
- "ORDER BY `" . $_GET["OrderBy"] . "` ASC";
- $Erg = mysql_query($SQL, $con);
- echo mysql_error($con);
-
- // anzahl zeilen
- $Zeilen = mysql_num_rows($Erg);
-
- echo "Anzahl Engel: $Zeilen<br /><br />\n";
-?><table width="100%" class="border" cellpadding="2" cellspacing="1">
- <tr class="contenttopic">
- <td>
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Nick">Nick</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=CreateDate">CreateDate</a>
- </td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Name">Name</a></td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Vorname">Vorname</a></td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Alter">Alter</a></td>
- <td>
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=email">@</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=DECT">DECT</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Hometown">Hometown</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=lastLogIn">lastLogIn</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Art">Type</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=ICQ">ICQ</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=jabber">jabber</a> |
- <a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Group">Group</a>
- </td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Size">Gr&ouml;&szlig;e</a></td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Gekommen">G</a></td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Aktiv">A</a></td>
- <td><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?OrderBy=Tshirt">T</a></td>
- <td>&Auml;nd.</td>
- <td>Secure</td>
- </tr>
-
-
- <?php
-
-
- $Gekommen = 0;
- $Active = 0;
- $Tshirt = 0;
-
- for ($n = 0; $n < $Zeilen; $n++) {
- echo "<tr class=\"content\">\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Nick") . "<br />(Create: " . mysql_result($Erg, $n, "CreateDate") . ")</td>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Name") . "</td>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Vorname") . "</td>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Alter") . "</td>\n";
- echo "\t<td>";
- if (strlen(mysql_result($Erg, $n, "Telefon")) > 0)
- echo "\n\t\tTel: " . mysql_result($Erg, $n, "Telefon") . "<br />";
- if (strlen(mysql_result($Erg, $n, "Handy")) > 0)
- echo "\n\t\tHandy: " . mysql_result($Erg, $n, "Handy") . "<br />";
- if (strlen(mysql_result($Erg, $n, "DECT")) > 0)
- echo "\n\t\tDECT: <a href=\"./dect.php?custum=" . mysql_result($Erg, $n, "DECT") . "\">" .
- mysql_result($Erg, $n, "DECT") . "</a><br />";
- if (strlen(mysql_result($Erg, $n, "email")) > 0)
- echo "\n\t\temail: <a href=\"mailto:" . mysql_result($Erg, $n, "email") . "\">" .
- mysql_result($Erg, $n, "email") . "</a><br />";
- if (strlen(mysql_result($Erg, $n, "Hometown")) > 0)
- echo "\n\t\tHometown: " . mysql_result($Erg, $n, "Hometown") . "<br />";
- if (strlen(mysql_result($Erg, $n, "lastLogIn")) > 0)
- echo "\n\t\tlastLogIn: " . mysql_result($Erg, $n, "lastLogIn") . "<br />";
- if (strlen(mysql_result($Erg, $n, "Art")) > 0)
- echo "\n\t\tType: " . mysql_result($Erg, $n, "Art") . "<br />";
- if (strlen(mysql_result($Erg, $n, "ICQ")) > 0)
- echo "\n\t\tICQ: " . mysql_result($Erg, $n, "ICQ") . "<br />";
- if (strlen(mysql_result($Erg, $n, "jabber")) > 0)
- echo "\n\t\tjabber: " . mysql_result($Erg, $n, "jabber") . "<br />";
- echo "\n\t\tGroup: " . mysql_result($Erg, $n, "Group") . "<br />";
- echo "</td>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Size") . "</td>\n";
- $Gekommen += mysql_result($Erg, $n, "Gekommen");
- echo "\t<td>" . mysql_result($Erg, $n, "Gekommen") . "</td>\n";
- $Active += mysql_result($Erg, $n, "Aktiv");
- echo "\t<td>" . mysql_result($Erg, $n, "Aktiv") . "</td>\n";
- $Tshirt += mysql_result($Erg, $n, "Tshirt");
- echo "\t<td>" . mysql_result($Erg, $n, "Tshirt") . "</td>\n";
- echo "\t<td>" . funktion_isLinkAllowed_addLink_OrEmpty("admin/userChangeNormal.php?enterUID=" .
- mysql_result($Erg, $n, "UID") . "&Type=Normal", "&Auml;nd.") .
- "</td>\n";
- echo "\t<td>" . funktion_isLinkAllowed_addLink_OrEmpty("admin/userChangeSecure.php?enterUID=" .
- mysql_result($Erg, $n, "UID") . "&Type=Secure", "Secure") .
- "</td>\n";
- echo "</tr>\n";
- }
- echo "<tr>" .
- "<td></td><td></td><td></td><td></td><td></td><td></td>" .
- "<td>$Gekommen</td><td>$Active</td><td>$Tshirt</td><td></td></tr>\n";
- echo "\t</table>\n";
- // Ende Userliste
-
- echo "<h1>Statistics</h1>";
- funktion_db_element_list_2row("Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
-
- echo "<br />\n";
-
- funktion_db_element_list_2row("Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
-
- echo "<br />\n";
-
- funktion_db_element_list_2row("Used Groups", "SELECT UserGroups.Name AS 'GroupName', COUNT(UserGroups.Name) AS Count FROM `UserCVS` " .
- "LEFT JOIN `UserGroups` ON UserGroups.UID = UserCVS.GroupID " .
- "WHERE (UserCVS.GroupID!='NULL') " .
- "GROUP BY `GroupName` " .
- "");
-} else {
- echo "error";
-}
-
-include ("includes/footer.php");
-?>
-
-
diff --git a/www-ssl/index.php b/www-ssl/index.php
index f6c6aaa2..ded6c110 100644
--- a/www-ssl/index.php
+++ b/www-ssl/index.php
@@ -40,6 +40,10 @@ if (in_array($p, $privileges)) {
require_once ('includes/pages/user_news.php');
$content = user_news_comments();
}
+ elseif ($p == "user_meetings") {
+ require_once ('includes/pages/user_news.php');
+ $content = user_meetings();
+ }
elseif ($p == "user_messages") {
$content = user_messages();
}
diff --git a/www-ssl/nonpublic/engelbesprechung.php b/www-ssl/nonpublic/engelbesprechung.php
deleted file mode 100644
index 7ff684d4..00000000
--- a/www-ssl/nonpublic/engelbesprechung.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-require_once ('../bootstrap.php');
-
-$title = "Himmel";
-$header = "Engelbesprechung";
-include "includes/header.php";
-
-$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
-$Erg = mysql_query($SQL, $con);
-
-// anzahl zeilen
-$Zeilen = mysql_num_rows($Erg);
-
-for ($n = 0; $n < $Zeilen; $n++) {
- if (mysql_result($Erg, $n, "Treffen") == "1") {
- echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
-
- // Show Admin Page
- if ($_SESSION['CVS']["admin/news.php"] == "Y")
- echo " <a href=\"./../admin/news.php?action=change&date=" . mysql_result($Erg, $n, "Datum") . "\">[edit]</a>";
-
- echo "<br />&nbsp; &nbsp;<font size=1>" . mysql_result($Erg, $n, "Datum") . ", ";
- echo UID2Nick(mysql_result($Erg, $n, "UID")) . "</font></p>\n";
- echo "<p class='answetion'>" . nl2br(mysql_result($Erg, $n, "Text")) . "</p>\n";
- }
-}
-
-include ("includes/footer.php");
-?>