[ Index ] |
PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2012 Oliver Georgi <oliver@phpwcms.de> // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 // ---------------------------------------------------------------- 24 // obligate check for phpwcms constants 25 if (!defined('PHPWCMS_ROOT')) { 26 die("You Cannot Access This Script Directly, Have a Nice Day."); 27 } 28 // ---------------------------------------------------------------- 29 30 31 32 $no_durchlauf = 0; 33 34 35 //Count message boxes 36 //New Messages 37 if($check = mysql_query("SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_message WHERE msg_uid=".$_SESSION["wcs_user_id"]." AND (msg_read=0 OR (NOW()-msg_tstamp<86400)) AND msg_deleted=0;", $db)) 38 { if($count = mysql_fetch_row($check)) $count_newmsg = $count[0]; } 39 //Old Messages 40 if($check = mysql_query("SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_message WHERE msg_uid=".$_SESSION["wcs_user_id"]." AND msg_read=1 AND msg_deleted=0;", $db)) 41 { if($count = mysql_fetch_row($check)) $count_readmsg = $count[0]; } 42 //Sent Messages 43 if($check = mysql_query("SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_message WHERE msg_from=".$_SESSION["wcs_user_id"]." AND msg_from_del=0;", $db)) 44 { if($count = mysql_fetch_row($check)) $count_sentmsg = $count[0]; } 45 //Files in trash 46 if($check = mysql_query("SELECT COUNT(*) FROM ".DB_PREPEND."phpwcms_message WHERE (msg_uid=".$_SESSION["wcs_user_id"]." AND msg_deleted=1) OR (msg_from=".$_SESSION["wcs_user_id"]." AND msg_from_del=1);", $db)) 47 { if($count = mysql_fetch_row($check)) $count_delmsg = $count[0]; } 48 49 //Ermitteln, wieviele Nachrichten angezeigt werden sollen 50 $msg_list = empty($_GET['l']) ? 15 : intval($_GET['l']); 51 52 //Ermitteln, ob aufsteigend oder absteigend 53 //0 = normal, absteigend (neueste zuerst) -> 1 = absteigend 54 $msg_order = empty($_GET['o']) ? 0 : intval($_GET['o']); 55 56 //Welche Message soll gerade angezeigt werden 57 if(empty($_GET["msg"])) { 58 $msg = 0; 59 $msg_get["msg"] = ''; 60 } else { 61 $msg_get["msg"] = "&msg=".$_GET["msg"]; 62 list($msg, $msg_read) = explode(":", $_GET["msg"]); 63 $msg = intval($msg); 64 } 65 66 67 //Ermitteln, welcher Message Ordner angezeigt wird 68 $msg_folder = empty($_GET['f']) ? 0 : intval($_GET['f']); 69 if($msg_folder == 0 || $msg_folder >= 4) $msg_folder = 0; //new msg 70 71 //fester GET-Konstrukt + Teile 72 $msg_get["all"] = "&o=".$msg_order."&f=".$msg_folder."&l=".$msg_list; 73 $msg_get["list"] = "&l=".$msg_list; 74 $msg_get["order"] = "&o=".$msg_order; 75 $msg_get["folder"] = "&f=".$msg_folder; 76 77 78 ?><table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 79 <tr><td class="title"><?php echo $BL['be_msg_title'] ?></td></tr> 80 <tr><td><img src="img/leer.gif" alt="" width="1" height="6"></td></tr> 81 <tr><td><table width="538" border="0" cellpadding="2" cellspacing="0" summary=""><tr> 82 <td width="70" align="center" background="img/background/bg_eckeli.gif" <?php which_folder_active($msg_folder, 0) ?>><a href="phpwcms.php?do=messages<?php echo $msg_get["list"].$msg_get["order"]."&f=0" ?>"><?php echo $count_newmsg." ".$BL['be_msg_new'] ?></a></td> 83 <td width="69" align="center" background="img/background/bg_eckeli.gif" <?php which_folder_active($msg_folder, 1) ?>><a href="phpwcms.php?do=messages<?php echo $msg_get["list"].$msg_get["order"]."&f=1" ?>"><?php echo $count_readmsg." ".$BL['be_msg_old'] ?></a></td> 84 <td width="70" align="center" background="img/background/bg_eckeli.gif" <?php which_folder_active($msg_folder, 2) ?>><a href="phpwcms.php?do=messages<?php echo $msg_get["list"].$msg_get["order"]."&f=2" ?>"><?php echo $count_sentmsg." ".$BL['be_msg_senttop'] ?></a></td> 85 <td width="70" align="center" background="img/background/bg_eckeli.gif" <?php which_folder_active($msg_folder, 3) ?>><a href="phpwcms.php?do=messages<?php echo $msg_get["list"].$msg_get["order"]."&f=3" ?>"><?php echo $count_delmsg." ".$BL['be_msg_del'] ?></a></td> 86 <td width="239" align="right" bgcolor="#FFFFFF" class="chatlist"> 87 <a href="phpwcms.php?do=messages<?php echo $msg_get["folder"].$msg_get["order"]."&l=10".$msg_get["msg"] ?>">10</a> 88 <a href="phpwcms.php?do=messages<?php echo $msg_get["folder"].$msg_get["order"]."&l=25".$msg_get["msg"] ?>">25</a> 89 <a href="phpwcms.php?do=messages<?php echo $msg_get["folder"].$msg_get["order"]."&l=50".$msg_get["msg"] ?>">50</a> 90 <a href="phpwcms.php?do=messages<?php echo $msg_get["folder"].$msg_get["order"]."&l=100".$msg_get["msg"] ?>">100</a> 91 <a href="phpwcms.php?do=messages<?php echo $msg_get["folder"].$msg_get["order"]."&l=500".$msg_get["msg"] ?>">250</a> 92 <a href="phpwcms.php?do=messages<?php echo $msg_get["folder"].$msg_get["order"]."&l=99999".$msg_get["msg"] ?>"><?php echo $BL['be_ftptakeover_all'] ?></a> 93 </td> 94 </tr></table></td> 95 <tr><td bgcolor="#9BBECA"><img src="img/leer.gif" alt="" width="1" height="4"></td></tr> 96 <tr><td><img src="img/leer.gif" alt="" width="1" height="6"></td></tr> 97 </table> 98 <?php 99 //Read the List of User_ID and User_Name 100 if($msg_user = mysql_query("SELECT usr_id, usr_login, usr_name, usr_email FROM ".DB_PREPEND."phpwcms_user", $db)) { 101 while($msg_user_result = mysql_fetch_array($msg_user)) { 102 $msg_user_list[$msg_user_result["usr_id"]] = $msg_user_result["usr_login"]."###". 103 $msg_user_result["usr_name"]."###". 104 $msg_user_result["usr_email"]; 105 } 106 mysql_free_result($msg_user); 107 } 108 109 110 //Wenn Nachricht angezeigt werden soll 111 if(!empty($_GET["msg"]) && intval($_GET["msg"])) { 112 if($msg_read == "I" && $msg) { //Wenn die Nachricht noch den Status Unread hat, setzen auf read 113 $sql = "UPDATE ".DB_PREPEND."phpwcms_message SET ". 114 "msg_tstamp=msg_tstamp, msg_read=1 WHERE ". 115 "msg_uid=".$_SESSION["wcs_user_id"]." AND ". 116 "msg_id=".$msg.";"; 117 mysql_query($sql, $db) or die("error"); 118 } 119 if($msg) { 120 $sql = "SELECT msg_id, msg_pid, msg_uid, msg_subject, msg_from, msg_read, msg_deleted, ". 121 "msg_from_del, msg_to, msg_text, DATE_FORMAT(msg_tstamp, '%b %e, %Y (%H:%i)') AS msg_date ". 122 "FROM ".DB_PREPEND."phpwcms_message WHERE ((msg_uid=".$_SESSION["wcs_user_id"]." AND msg_deleted<>9)". 123 " OR (msg_from=".$_SESSION["wcs_user_id"]." AND msg_from_del<>9)) AND msg_id=".$msg. 124 " LIMIT 1;"; 125 if($result = mysql_query($sql, $db)) { 126 if($msgdetail = mysql_fetch_array($result)) { 127 include ("include/inc_lib/autolink.inc.php"); 128 if($msgdetail["msg_from"] == $_SESSION["wcs_user_id"]) $do_move = 2; 129 if($msgdetail["msg_uid"] == $_SESSION["wcs_user_id"]) $do_move = 1; 130 ?> 131 <table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 132 <tr><td colspan="3"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 133 <tr> 134 <td width="4"><img src="img/leer.gif" alt="" width="4" height="1"></td> 135 <td><img src="img/leer.gif" alt="" width="530" height="1"></td> 136 <td width="4"><img src="img/leer.gif" alt="" width="4" height="1"></td> 137 </tr> 138 <tr bgcolor="#FFE57F"> 139 <td width="4"><img src="img/leer.gif" alt="" width="4" height="18"></td> 140 <td width="530"><span class="v10"><?php echo $BL['be_msg_from'] ?>:</span> <?php echo gib_part($msg_user_list[$msgdetail["msg_from"]], 1, "###")." (".gib_part($msg_user_list[$msgdetail["msg_from"]], 0, "###").")"; ?> <span class="v10"><?php echo $BL['be_msg_date'] ?>:</span> <?php echo $msgdetail["msg_date"] ?></td> 141 <td width="4"><img src="img/leer.gif" alt="" width="4" height="1"></td> 142 </tr> 143 <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 144 <tr><td colspan="3" class="title"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 145 <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 146 <tr bgcolor="#FFF8DF"><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 147 <tr bgcolor="#FFF8DF"> 148 <td width=4><img src="img/leer.gif" alt="" width="4" height="1"></td> 149 <td class="msgtext"><strong><?php echo html_specialchars($msgdetail["msg_subject"]) ?></strong></td> 150 <td width=4><img src="img/leer.gif" alt="" width="4" height="1"></td> 151 </tr> 152 <tr bgcolor="#FFF8DF"> 153 <td width=4><img src="img/leer.gif" alt="" width="4" height="1"></td> 154 <td class="msgtext"><?php echo auto_link(nl2br(html_specialchars($msgdetail["msg_text"]))) ?></td> 155 <td width=4><img src="img/leer.gif" alt="" width="4" height="1"></td> 156 </tr> 157 <tr bgcolor="#FFF8DF"><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 158 <tr bgcolor="#FFF8DF"> 159 <td width=4><img src="img/leer.gif" alt="" width="4" height="1"></td> 160 <td><a href="phpwcms.php?do=messages<?php echo $msg_get["all"] ?>" title="<?php echo $BL['be_msg_close'] ?>"><img src="img/button/close_message.gif" alt="" width="14" height="14" border="0"></a><img src="img/leer.gif" alt="" width="12" height="1"><a href="phpwcms.php?do=messages&p=1" title="<?php echo $BL['be_msg_create'] ?>"><img src="img/button/new_message1.gif" alt="" width="68" height="14" border="0"></a><img src="img/leer.gif" alt="" width="4" height="1"><a href="phpwcms.php?do=messages&p=1&msg=<?php echo $msgdetail["msg_id"].":"; if(!$msgdetail["msg_read"]) echo "I"; ?>" title="<?php echo $BL['be_msg_reply'] ?>"><img src="img/button/reply_to_message1.gif" alt="" width="83" height="14" border="0"></a><img src="img/leer.gif" alt="" width="4" height="1"><?php if($msg_folder<>3) {?><a href="include/inc_act/act_message.php?do=<?php echo $do_move ?>.<?php echo $msgdetail["msg_id"] ?>.1" title="<?php echo $BL['be_msg_move'] ?>"><img src="img/button/message_to_trash.gif" alt="" width="71" height="14" border="0"></a><?php } // ?></td> 161 <td width=4><img src="img/leer.gif" alt="" width="4" height="1"></td> 162 </tr> 163 <tr bgcolor="#FFF8DF"><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 164 <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 165 <tr><td colspan="3"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 166 <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr> 167 </table> 168 <?php 169 } //Ende Anzeige Message gefunden 170 } //Bedingung für Abfrage 171 } //Ende Anzeige komplette gewählte Nachricht 172 } //Ende Anzeigen Nachricht 173 174 if($count_newmsg && $msg_folder==0) { //Wenn Count > 0 dann Listing der neuen Nachrichten 175 ?><table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 176 <tr><td colspan="4"><strong style="color:#9BBECA;"><?php echo $BL['be_msg_unread'] ?></strong></td></tr> 177 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 178 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 179 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 180 <tr bgcolor="#EBF2F4"> 181 <td width="135" class="columnhead"><img src="img/leer.gif" alt="" width="1" height="1"><span style="color:#727889"><?php echo $BL['be_msg_from'] ?></span>:</td> 182 <td width="250" class="columnhead"><?php echo $BL['be_msg_subject'] ?>:</td> 183 <td width="93" class="columnhead"><?php echo $BL['be_msg_date'] ?>:</td> 184 <td width="60"><img src="img/leer.gif" alt="" width="60" height="1"></td> 185 </tr> 186 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 187 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 188 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 189 <?php 190 //Listing new messages 191 $sql = "SELECT msg_id, msg_pid, msg_uid, msg_subject, msg_from, msg_read, ". 192 "DATE_FORMAT(msg_tstamp, '%m/%d/%y %H:%i') AS msg_date ". 193 "FROM ".DB_PREPEND."phpwcms_message WHERE msg_uid=".$_SESSION["wcs_user_id"]. 194 " AND (msg_read=0 OR (NOW()-msg_tstamp<86400)) AND msg_deleted=0 ". 195 "ORDER BY msg_tstamp DESC LIMIT ".$msg_list.";"; 196 if($result = mysql_query($sql, $db)) { 197 //falls new messages listing schleife 198 $bg_color1 = "#FFFFFF"; 199 $bg_color2 = "#F5F9FA"; 200 $zaehler = 0; 201 while($row = mysql_fetch_array($result)) { 202 $bg_color = ($zaehler % 2) ? $bg_color2 : $bg_color1; 203 $goto = "phpwcms.php?do=messages".$msg_get["folder"].$msg_get["order"].$msg_get["list"]."&msg=".$row["msg_id"].":"; 204 if(!$row["msg_read"]) $goto .= "I"; 205 if($msg == $row["msg_id"]) $bg_color = "#FFCC00"; 206 ?> 207 <tr onMouseOver="bgColor='#FFCC00'" onMouseOut="bgColor='<?php echo $bg_color ?>'" onclick="location.href='<?php echo $phpwcms["site"].$goto ?>';"> 208 <td bgcolor="<?php echo $bg_color ?>" class="msglist"><img src="img/leer.gif" alt="" width="1" height="1"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo gib_part($msg_user_list[$row["msg_from"]], 1, "###"); ?></a></td> 209 <td bgcolor="<?php echo $bg_color ?>" class="msglist"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo cut_string($row["msg_subject"], "…", 40) ?></a></td> 210 <td width="93" bgcolor="<?php echo $bg_color ?>" class="msglist"><?php echo $row["msg_date"] ?></td> 211 <td width="60" align="right" bgcolor="<?php echo $bg_color ?>" class="v10"><a href="phpwcms.php?do=messages&p=1&msg=<?php echo $row["msg_id"].":"; if(!$row["msg_read"]) echo "I"; ?>"><img src="img/button/reply_mini.gif" alt="" width="40" height="15" border="0"></a><a href="include/inc_act/act_message.php?do=1.<?php echo $row["msg_id"] ?>.1"><img src="img/icons/trash.gif" alt="" width="15" height="15" border="0"></a></td> 212 </tr> 213 <?php 214 $zaehler++; 215 } //Ende Listing Schleife 216 mysql_free_result($result); 217 } //Ende Listing new messages 218 ?> 219 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 220 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 221 <tr> 222 <td><img src="img/leer.gif" alt="" width="135" height="1"></td> 223 <td><img src="img/leer.gif" alt="" width="250" height="1"></td> 224 <td width="93"><img src="img/leer.gif" alt="" width="93" height="1"></td> 225 <td width="60"><img src="img/leer.gif" alt="" width="60" height="10"></td> 226 </tr> 227 </table><?php 228 $no_durchlauf++; 229 } //Ende Anzeige unglesene Mitteilungen 230 231 232 if($count_readmsg && $msg_folder==1) { //Wenn Count > 0 dann Listing der bereits gelesenen Nachrichten 233 ?><table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 234 <tr><td colspan="4"><strong style="color:#9BBECA"><?php echo str_replace('{VAL}', $msg_list, $BL['be_msg_lastread']); ?></strong></td></tr> 235 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 236 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 237 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 238 <tr bgcolor="#EBF2F4"> 239 <td width="135" class="columnhead"><img src="img/leer.gif" alt="" width="1" height="1"><span style="color:#727889"><?php echo $BL['be_msg_from'] ?></span>:</td> 240 <td width="250" class="columnhead"><?php echo $BL['be_msg_subject'] ?>:</td> 241 <td width="93" class="columnhead"><?php echo $BL['be_msg_date'] ?>:</td> 242 <td width="60"><img src="img/leer.gif" alt="" width="60" height="1"></td> 243 </tr> 244 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 245 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 246 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 247 <?php 248 //Listing new messages 249 $sql = "SELECT msg_id, msg_pid, msg_uid, msg_subject, msg_from, msg_read, ". 250 "DATE_FORMAT(msg_tstamp, '%m/%d/%y %H:%i') AS msg_date ". 251 "FROM ".DB_PREPEND."phpwcms_message WHERE msg_uid=".$_SESSION["wcs_user_id"]. 252 " AND msg_read=1 AND msg_deleted=0 ORDER BY msg_tstamp DESC LIMIT ".$msg_list.";"; 253 if($result = mysql_query($sql, $db)) { 254 //falls new messages listing schleife 255 $bg_color1 = "#FFFFFF"; 256 $bg_color2 = "#F5F9FA"; 257 $zaehler = 0; 258 while($row = mysql_fetch_array($result)) { 259 $bg_color = ($zaehler % 2) ? $bg_color2 : $bg_color1; 260 $goto = "phpwcms.php?do=messages".$msg_get["folder"].$msg_get["order"].$msg_get["list"]."&msg=".$row["msg_id"].":"; 261 if(!$row["msg_read"]) $goto .= "I"; 262 if($msg == $row["msg_id"]) $bg_color = "#FFCC00"; 263 ?> 264 <tr bgcolor="<?php echo $bg_color ?>" onMouseOver="bgColor='#FFCC00'" onMouseOut="bgColor='<?php echo $bg_color ?>'" onclick="location.href='<?php echo $phpwcms["site"].$goto ?>';"> 265 <td class="msglist"><img src="img/leer.gif" alt="" width="1" height="1"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo gib_part($msg_user_list[$row["msg_from"]], 1, "###"); ?></a></td> 266 <td class="msglist"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo cut_string($row["msg_subject"], "…", 40) ?></a></td> 267 <td width="93" class="msglist"><?php echo $row["msg_date"] ?></td> 268 <td width="60" align="right" class="v10"><a href="phpwcms.php?do=messages&p=1&msg=<?php echo $row["msg_id"].":"; if(!$row["msg_read"]) echo "I"; ?>"><img src="img/button/reply_mini.gif" alt="" width="40" height="15" border="0"></a><a href="include/inc_act/act_message.php?do=1.<?php echo $row["msg_id"] ?>.1"><img src="img/icons/trash.gif" alt="" width="15" height="15" border="0"></a></td> 269 </tr> 270 <?php 271 $zaehler++; 272 } //Ende Listing Schleife 273 mysql_free_result($result); 274 } //Ende Listing new messages 275 ?> 276 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 277 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 278 <tr> 279 <td><img src="img/leer.gif" alt="" width="135" height="1"></td> 280 <td><img src="img/leer.gif" alt="" width="250" height="1"></td> 281 <td width="93"><img src="img/leer.gif" alt="" width="93" height="1"></td> 282 <td width="60"><img src="img/leer.gif" alt="" width="60" height="10"></td> 283 </tr> 284 </table> 285 <?php 286 $no_durchlauf++; 287 } //Ende Anzeige gelesene Mitteilungen 288 289 290 if($count_sentmsg && $msg_folder==2) { //Wenn Count > 0 dann Listing der neuen Nachrichten 291 ?><table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 292 <tr><td colspan="4"><strong style="color:#9BBECA"><?php echo str_replace('{VAL}', $msg_list, $BL['be_msg_lastsent']); ?></strong></td></tr> 293 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 294 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 295 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 296 <tr bgcolor="#EBF2F4"> 297 <td width="135" class="columnhead"><img src="img/leer.gif" alt="" width="1" height="1"><span style="color:#727889"><?php echo $BL['be_msg_from'] ?></span>:</td> 298 <td width="250" class="columnhead"><?php echo $BL['be_msg_subject'] ?>:</td> 299 <td width="93" class="columnhead"><?php echo $BL['be_msg_date'] ?>:</td> 300 <td width="60"><img src="img/leer.gif" alt="" width="60" height="1"></td> 301 </tr> 302 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 303 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 304 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 305 <?php 306 //Listing new messages 307 $sql = "SELECT msg_id, msg_pid, msg_uid, msg_subject, msg_from, msg_read, ". 308 "DATE_FORMAT(msg_tstamp, '%m/%d/%y %H:%i') AS msg_date ". 309 "FROM ".DB_PREPEND."phpwcms_message WHERE msg_from=".$_SESSION["wcs_user_id"]. 310 " AND msg_from_del=0 ORDER BY msg_tstamp DESC LIMIT ".$msg_list.";"; 311 if($result = mysql_query($sql, $db)) { 312 //falls new messages listing schleife 313 $bg_color1 = "#FFFFFF"; 314 $bg_color2 = "#F5F9FA"; 315 $zaehler = 0; 316 while($row = mysql_fetch_array($result)) { 317 $bg_color = ($zaehler % 2) ? $bg_color2 : $bg_color1; 318 $goto = "phpwcms.php?do=messages".$msg_get["folder"].$msg_get["order"].$msg_get["list"]."&msg=".$row["msg_id"].":"; 319 if(!$row["msg_read"]) $goto .= "I"; 320 if($msg == $row["msg_id"]) $bg_color = "#FFCC00"; 321 ?> 322 <tr onMouseOver="bgColor='#FFCC00'" onMouseOut="bgColor='<?php echo $bg_color ?>'" onclick="location.href='<?php echo $phpwcms["site"].$goto ?>';"> 323 <td bgcolor="<?php echo $bg_color ?>" class="msglist"><img src="img/leer.gif" alt="" width="1" height="1"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo gib_part($msg_user_list[$row["msg_from"]], 1, "###"); ?></a></td> 324 <td bgcolor="<?php echo $bg_color ?>" class="msglist"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo cut_string($row["msg_subject"], "…", 40) ?></a></td> 325 <td width="93" bgcolor="<?php echo $bg_color ?>" class="msglist"><?php echo $row["msg_date"] ?></td> 326 <td width="60" align="right" bgcolor="<?php echo $bg_color ?>" class="v10"><a href="phpwcms.php?do=messages&p=1&msg=<?php echo $row["msg_id"].":"; if(!$row["msg_read"]) echo "I"; ?>"><img src="img/button/reply_mini.gif" alt="" width="40" height="15" border="0"></a><a href="include/inc_act/act_message.php?do=2.<?php echo $row["msg_id"] ?>.1"><img src="img/icons/trash.gif" alt="" width="15" height="15" border="0"></a></td> 327 </tr> 328 <?php 329 $zaehler++; 330 } //Ende Listing Schleife 331 mysql_free_result($result); 332 } //Ende Listing new messages 333 ?> 334 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 335 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 336 <tr> 337 <td><img src="img/leer.gif" alt="" width="135" height="1"></td> 338 <td><img src="img/leer.gif" alt="" width="250" height="1"></td> 339 <td width="93"><img src="img/leer.gif" alt="" width="93" height="1"></td> 340 <td width="60"><img src="img/leer.gif" alt="" width="60" height="10"></td> 341 </tr> 342 </table><?php 343 $no_durchlauf++; 344 } //Ende Anzeige unglesene Mitteilungen 345 346 347 if($count_delmsg && $msg_folder==3) { //Wenn Count > 0 dann Listing der neuen Nachrichten 348 ?><table width="538" border="0" cellpadding="0" cellspacing="0" summary=""> 349 <tr><td colspan="4"><strong style="color:#9BBECA"><?php echo $BL['be_msg_marked'] ?></strong></td></tr> 350 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 351 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 352 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 353 <tr bgcolor="#EBF2F4"> 354 <td width="135" class="columnhead"><img src="img/leer.gif" alt="" width="1" height="1"><span style="color:#727889"><?php echo $BL['be_msg_from'] ?></span>:</td> 355 <td width="250" class="columnhead"><?php echo $BL['be_msg_subject'] ?>:</td> 356 <td width="93" class="columnhead"><?php echo $BL['be_msg_date'] ?>:</td> 357 <td width="60"><img src="img/leer.gif" alt="" width="60" height="1"></td> 358 </tr> 359 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr> 360 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 361 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 362 <?php 363 //Listing new messages 364 $sql = "SELECT msg_id, msg_pid, msg_uid, msg_subject, msg_from, msg_read, ". 365 "DATE_FORMAT(msg_tstamp, '%m/%d/%y %H:%i') AS msg_date, msg_from_del, msg_deleted ". 366 "FROM ".DB_PREPEND."phpwcms_message WHERE (msg_uid=".$_SESSION["wcs_user_id"]." AND msg_deleted=1) OR ". 367 "(msg_from=".$_SESSION["wcs_user_id"]." AND msg_from_del=1) ". 368 "ORDER BY msg_tstamp DESC LIMIT ".$msg_list.";"; 369 if($result = mysql_query($sql, $db)) { 370 //falls new messages listing schleife 371 $bg_color1 = "#FFFFFF"; 372 $bg_color2 = "#F5F9FA"; 373 $zaehler = 0; 374 while($row = mysql_fetch_array($result)) { 375 $bg_color = ($zaehler % 2) ? $bg_color2 : $bg_color1; 376 $goto = "phpwcms.php?do=messages".$msg_get["folder"].$msg_get["order"].$msg_get["list"]."&msg=".$row["msg_id"].":"; 377 if(!$row["msg_read"]) $goto .= "I"; 378 if($msg == $row["msg_id"]) $bg_color = "#FFCC00"; 379 //Prüfen, welche DO-Aktion 380 if($row["msg_from_del"] == 1 && $row["msg_from"] == $_SESSION["wcs_user_id"]) $do_undo = 4; //Undo sent message 381 if($row["msg_deleted"] == 1 && $row["msg_uid"] == $_SESSION["wcs_user_id"]) $do_undo = 3; //Undo normal message 382 if($row["msg_from_del"] == 1 && $row["msg_from"] == $_SESSION["wcs_user_id"]) $do_del = 6; //Delete sent message 383 if($row["msg_deleted"] == 1 && $row["msg_uid"] == $_SESSION["wcs_user_id"]) $do_del = 5; //Delete normal message 384 ?> 385 <tr onMouseOver="bgColor='#FFCC00'" onMouseOut="bgColor='<?php echo $bg_color ?>'" onclick="location.href='<?php echo $phpwcms["site"].$goto ?>';"> 386 <td bgcolor="<?php echo $bg_color ?>" class="msglist"><img src="img/leer.gif" alt="" width="1" height="1"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo gib_part($msg_user_list[$row["msg_from"]], 1, "###"); ?></a></td> 387 <td bgcolor="<?php echo $bg_color ?>" class="msglist"><a href="<?php echo $goto ?>" title="<?php echo $row["msg_subject"] ?>"><?php echo cut_string($row["msg_subject"], "…", 40) ?></a></td> 388 <td width="93" bgcolor="<?php echo $bg_color ?>" class="msglist"><?php echo $row["msg_date"] ?></td> 389 <td width="60" align="right" bgcolor="<?php echo $bg_color ?>" class="v10"><a href="include/inc_act/act_message.php?do=<?php echo $do_undo ?>.<?php echo $row["msg_id"] ?>.0"><img src="img/button/undo_message.gif" alt="" width="29" height="15" border="0"></a><a href="include/inc_act/act_message.php?do=<?php echo $do_del ?>.<?php echo $row["msg_id"] ?>.9"><img src="img/button/del_message_final.gif" alt="" width="22" height="15" border="0"></a></td> 390 </tr> 391 <?php 392 $zaehler++; 393 } //Ende Listing Schleife 394 mysql_free_result($result); 395 } //Ende Listing new messages 396 ?> 397 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 398 <tr><td colspan="4"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 399 <tr> 400 <td><img src="img/leer.gif" alt="" width="135" height="1"></td> 401 <td><img src="img/leer.gif" alt="" width="250" height="1"></td> 402 <td width="93"><img src="img/leer.gif" alt="" width="93" height="1"></td> 403 <td width="60"><img src="img/leer.gif" alt="" width="60" height="10"></td> 404 </tr> 405 </table><?php 406 $no_durchlauf++; 407 } //Ende Anzeige Dateien im Papierkorb 408 409 if(!$no_durchlauf) echo $BL['be_msg_nomsg']."<br /><img src='img/leer.gif' width=1 height=4>"; 410 echo "<table width=538 border=0 cellspacing=0 cellpadding=0>\n"; 411 echo "<tr><td bgcolor='#9BBECA'><img src='img/leer.gif' width=1 height=4></td><tr>\n"; 412 echo "<tr><td><img src='img/leer.gif' width=1 height=15></td><tr>\n"; 413 echo "</table>\n"; 414 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jan 29 16:31:14 2012 | Cross-referenced by PHPXref 0.7.1 |