From c0b15dfe0dce7c4603cc7ec7c19b5a6cf226dc95 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Thu, 2 Jun 2011 21:38:19 +0200 Subject: user messages --- www-ssl/css/base.css | 11 ++ www-ssl/css/style6.css | 2 +- www-ssl/index.php | 11 +- www-ssl/nonpublic/einstellungen.php | 376 ------------------------------------ www-ssl/nonpublic/index.php | 77 -------- 5 files changed, 22 insertions(+), 455 deletions(-) delete mode 100644 www-ssl/nonpublic/einstellungen.php delete mode 100644 www-ssl/nonpublic/index.php (limited to 'www-ssl') diff --git a/www-ssl/css/base.css b/www-ssl/css/base.css index 5731fec0..bfe050a5 100644 --- a/www-ssl/css/base.css +++ b/www-ssl/css/base.css @@ -128,3 +128,14 @@ td, th { .success { color: #090; } + +.notice { + background: #f0f0f0; + border: 2px solid #888; + margin: 10px; + padding: 10px; +} + +.new_message { + font-weight: bold; +} diff --git a/www-ssl/css/style6.css b/www-ssl/css/style6.css index 2272f598..8dc008e7 100644 --- a/www-ssl/css/style6.css +++ b/www-ssl/css/style6.css @@ -71,6 +71,6 @@ h4.menu { font-size : 6pt; } -h4, h1 { +h4, h1, th { background: #333E47; } diff --git a/www-ssl/index.php b/www-ssl/index.php index 6b2e267b..48aea75c 100644 --- a/www-ssl/index.php +++ b/www-ssl/index.php @@ -13,6 +13,8 @@ require_once ('includes/sys_user.php'); require_once ('config/config.php'); require_once ('config/config_db.php'); +require_once ('includes/pages/user_messages.php'); + session_start(); sql_connect($config['host'], $config['user'], $config['pw'], $config['db']); @@ -20,7 +22,7 @@ sql_connect($config['host'], $config['user'], $config['pw'], $config['db']); load_auth(); // Gewünschte Seite/Funktion -$p = "start"; +$p = isset ($user) ? "news" : "start"; if (isset ($_REQUEST['p'])) $p = $_REQUEST['p']; @@ -33,6 +35,9 @@ if (in_array($p, $privileges)) { require_once ('includes/pages/user_news.php'); $content = user_news(); } + elseif ($p == "user_messages") { + $content = user_messages(); + } elseif ($p == "user_settings") { require_once ('includes/pages/user_settings.php'); $content = user_settings(); @@ -79,6 +84,10 @@ elseif ($p == "faq") { } } +// Hinweis für ungelesene Nachrichten +if (isset ($user) && $p != "user_messages") + $content = user_unread_messages() . $content; + echo template_render('../templates/layout.html', array ( 'theme' => isset ($user) ? $user['color'] : $default_theme, 'title' => $title, diff --git a/www-ssl/nonpublic/einstellungen.php b/www-ssl/nonpublic/einstellungen.php deleted file mode 100644 index 713425bb..00000000 --- a/www-ssl/nonpublic/einstellungen.php +++ /dev/null @@ -1,376 +0,0 @@ -\n\n"; - Print_Text(13); -?> -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
">
ICQ
jabber
- "> -
-
- -
- -
- - - - - -
- "> -
-
- -
-
- -
- - - - - - - - - - -
- -
Menu>L - >R -
- "> -
-
-
-
- -
- - - - - -
- -
- "> -
- -\n
\n
\n\n"; - echo Get_Text('pub_einstellungen_PictureUpload') . "
"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "(max " . get_cfg_var("post_max_size") . "Byte)
\n"; - echo "\n"; - echo "
\n"; - } - - switch (GetPicturShow($_SESSION['UID'])) { - case 'Y' : - echo Get_Text('pub_einstellungen_PictureShow') . "
"; - echo displayPictur($_SESSION['UID'], 0); - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - break; - case 'N' : - echo Get_Text('pub_einstellungen_PictureNoShow') . "
"; - echo displayPictur($_SESSION['UID'], 0); - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n
\n
\n\n"; - case '' : - echo "
\n
\n
\n\n"; - echo Get_Text(22) . "
"; - echo "\n
\n"; - echo "\n"; - echo "\n"; - echo "\n\n\n"; - echo "\n"; - echo "\n\n"; - echo "
" . Get_Text(23) . "
\n"; - echo "  \n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - break; - } //CASE - -} else { - switch ($_POST["action"]) { - case 'set' : - if ($_POST["new1"] == $_POST["new2"]) { - Print_Text(25); - $sql = "SELECT * FROM `User` WHERE `UID`='" . $_SESSION['UID'] . "'"; - $Erg = mysql_query($sql, $con); - - if (PassCrypt($_POST["old"]) == mysql_result($Erg, 0, "Passwort")) { - Print_Text(26); - Print_Text(27); - $usql = "UPDATE `User` SET `Passwort`='" . PassCrypt($_POST["new1"]) . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; - $Erg = mysql_query($usql, $con); - - if ($Erg == 1) { - Print_Text(28); - } else { - Print_Text(29); - } - } else { - Print_Text(30); - } - } else { - Print_Text(31); - } - break; - - case 'colour' : - - $chsql = "UPDATE `User` SET " . - "`color`= '" . $_POST["colourid"] . "', " . - "`Menu`= '" . $_POST["eMenu"] . "' " . - "WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - echo mysql_error($con); - $_SESSION['color'] = $_POST["colourid"]; - $_SESSION['Menu'] = $_POST["eMenu"]; - if ($Erg == 1) { - Print_Text(32); - } else { - Print_Text(29); - } - break; - - case 'sprache' : - - $chsql = "UPDATE `User` SET `Sprache` = '" . $_POST["language"] . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - $_SESSION['Sprache'] = $_POST["language"]; - if ($Erg == 1) { - Print_Text(33); - } else { - Print_Text(29); - } - break; - - case 'avatar' : - $chsql = "UPDATE `User` SET `Avatar`='" . $_POST["eAvatar"] . "' WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - $_SESSION['Avatar'] = $_POST["eAvatar"]; - if ($Erg == 1) - Print_Text(34); - else - Print_Text(29); - break; - - case 'setUserData' : - if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { - $chsql = "UPDATE `User` SET " . - "`Nick`='" . $_POST["eNick"] . "', `Name`='" . $_POST["eName"] . "', " . - "`Vorname`='" . $_POST["eVorname"] . "', `Alter`='" . $_POST["eAlter"] . "', " . - "`Telefon`='" . $_POST["eTelefon"] . "', `Handy`='" . $_POST["eHandy"] . "', " . - "`DECT`='" . $_POST["eDECT"] . "', `email`='" . $_POST["eemail"] . "', " . - "`ICQ`='" . $_POST["eICQ"] . "', `jabber`='" . $_POST["ejabber"] . "', " . - "`Hometown`='" . $_POST["Hometown"] . "', `Size`='" . $_POST["Sizeid"] . "' " . - "WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1;"; - } else { - $chsql = "UPDATE `User` SET " . - "`Nick`='" . $_POST["eNick"] . "', `Name`='" . $_POST["eName"] . "', " . - "`Vorname`='" . $_POST["eVorname"] . "', `Alter`='" . $_POST["eAlter"] . "', " . - "`Telefon`='" . $_POST["eTelefon"] . "', `Handy`='" . $_POST["eHandy"] . "', " . - "`DECT`='" . $_POST["eDECT"] . "', `email`='" . $_POST["eemail"] . "', " . - "`ICQ`='" . $_POST["eICQ"] . "', `jabber`='" . $_POST["ejabber"] . "', " . - "`Hometown`='" . $_POST["Hometown"] . "' " . - "WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1;"; - } - $Erg = mysql_query($chsql, $con); - - if ($Erg == 1) { - $_SESSION['Nick'] = $_POST["eNick"]; - $_SESSION['Name'] = $_POST["eName"]; - $_SESSION['Vorname'] = $_POST["eVorname"]; - $_SESSION['Alter'] = $_POST["eAlter"]; - $_SESSION['Telefon'] = $_POST["eTelefon"]; - $_SESSION['Handy'] = $_POST["eHandy"]; - $_SESSION['DECT'] = $_POST["eDECT"]; - $_SESSION['email'] = $_POST["eemail"]; - $_SESSION['ICQ'] = $_POST["eICQ"]; - $_SESSION['jabber'] = $_POST["ejabber"]; - $_SESSION['Hometown'] = $_POST["Hometown"]; - if ($_SESSION['CVS']["Change T_Shirt Size"] == "Y") { - $_SESSION['Size'] = $_POST["Sizeid"]; - } else - if ($_SESSION['Size'] != $_POST["Sizeid"]) { - array_push($error_messages, "einstellungen.php, change t-shirt size not allowed\n"); - } - - Print_Text("pub_einstellungen_UserDateSaved"); - } else { - Print_Text(29); - echo mysql_error($con); - } - break; - - case 'sendPicture' : - if ($_FILES["file"]["size"] > 0) { - if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) { - $data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"]))); - - if (GetPicturShow($_SESSION['UID']) == "") - $SQL = "INSERT INTO `UserPicture` " . - "( `UID`,`Bild`, `ContentType`, `show`) " . - "VALUES ('" . $_SESSION['UID'] . "', '$data', '" . $_FILES["file"]["type"] . "', 'N')"; - else - $SQL = "UPDATE `UserPicture` SET " . - "`Bild`='$data', " . - "`ContentType`='" . $_FILES["file"]["type"] . "', " . - "`show`='N' " . - "WHERE `UID`='" . $_SESSION['UID'] . "'"; - - $res = mysql_query($SQL, $con); - if ($res) - Print_Text("pub_einstellungen_send_OK"); - else - Print_Text("pub_einstellungen_send_KO"); - - echo "
('" . $_FILES["file"]["name"] . "', MIME-Type: " . $_FILES["file"]["type"] . ", " . $_FILES["file"]["size"] . " Byte)
"; - } else - Print_Text("pub_einstellungen_send_KO"); - } else - Print_Text("pub_einstellungen_send_KO"); - break; - - case 'delPicture' : - $chsql = "DELETE FROM `UserPicture` WHERE `UID`='" . $_SESSION['UID'] . "' LIMIT 1"; - $Erg = mysql_query($chsql, $con); - if ($Erg == 1) - Print_Text("pub_einstellungen_del_OK"); - else - Print_Text("pub_einstellungen_del_KO"); - Break; - } -} -include ("includes/footer.php"); -?> diff --git a/www-ssl/nonpublic/index.php b/www-ssl/nonpublic/index.php deleted file mode 100644 index b53f8088..00000000 --- a/www-ssl/nonpublic/index.php +++ /dev/null @@ -1,77 +0,0 @@ - 1 --> keine Anmeldung - if ($user_anz == 0) - $ErrorText = "pub_index_User_unset"; - else - $ErrorText = "pub_index_User_more_as_one"; - } // Ende Check, ob User angemeldet wurde -} -include ("includes/header.php"); -if (isset ($ErrorText)) - echo "

" . Get_Text($ErrorText) . "


\n"; -include ("includes/login_eingabefeld.php"); -include ("includes/footer.php"); -?> - - -- cgit v1.2.3-54-g00ecf