[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_tmpl/ -> chat.list.tmpl.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2009 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  $chatlist = empty($_GET['l']) ? 0 : intval($_GET['l']); //Prüfen, wieviele Chatmeldungen angezeigt werden sollen
  32  if(!$chatlist) $chatlist = 15; //Standardanzahl Chatmitteilungen
  33  
  34  require_once (PHPWCMS_ROOT."/include/inc_lib/autolink.inc.php");
  35  
  36  ?><form action="include/inc_act/act_addchat.php" method="post" name="sendchatmessage" target="_top" onSubmit="window.document.cookie='chatstring=';"><table width="538" border="0" cellpadding="0" cellspacing="0" summary="">
  37           <tr>
  38              <td colspan="2" class="title"><table width="490" border="0" cellpadding="0" cellspacing="0" summary="">
  39                  <tr valign="bottom">
  40                    <td class="title"><?php echo $BL['be_chat_title'] ?></td>
  41                    <td align="right" class="chatlist"><?php echo $BL['be_chat_lines'] ?>:&nbsp;<a href="javascript:set_chatlist('5');">5</a>|<a href="javascript:set_chatlist('10');">10</a>|<a href="javascript:set_chatlist('15');">15</a>|<a href="javascript:set_chatlist('25');">25</a>|<a href="javascript:set_chatlist('50');">50</a>|<a href="javascript:set_chatlist('100');">100</a>|<a href="javascript:set_chatlist('99999');">ALL</a><input name="chatlist" type="hidden" value="<?php echo $chatlist ?>"></td>
  42                  </tr>
  43                </table></td>
  44            </tr>
  45            <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr>
  46            <tr>
  47              <td width="490"><input name="chatmsg" type="text" id="chatmsg" style="font-family: Verdana, Arial, sans-serif; width:490px; font-size: 11px" size="40" maxlength="250" onKeyDown="timer=restart_reload(timer);"></td>
  48              <td width="48">&nbsp;<input name="Submit" type="image" id="Submit" src="img/button/send_chat_message.gif" width="36" height="15" border="0"></td>
  49            </tr>
  50            <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  51            <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr>
  52            <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  53        </table></form>
  54        <table width="538" border="0" cellpadding="0" cellspacing="0" summary="">
  55        <?php
  56        //Chatlisting
  57        $sql = "SELECT * FROM ".DB_PREPEND."phpwcms_chat WHERE chat_cat=0 ORDER BY chat_tstamp DESC LIMIT ".$chatlist.";";
  58        $result = mysql_query($sql, $db);
  59        while($row = mysql_fetch_array($result)) {
  60            if($row['chat_uid'] == $_SESSION['wcs_user_id']) {
  61              $chatclass=" class='chat'";
  62          } else {
  63              $chatclass="";
  64          }
  65            echo "<tr valign='top'>\n<td align='right'".$chatclass.">".$row["chat_name"].":&nbsp;</td>\n";
  66          echo "<td width='90%'".$chatclass.">".auto_link(html_specialchars($row["chat_text"]))."</td>\n</tr>\n";
  67          } //Chatlisting Ende
  68          
  69        ?>
  70            <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  71          <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr>
  72          <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  73        </table>


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7