index.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:3k
- <?php
- // +-------------------------------------------------------------+
- // | DeskPRO v [2.0.1 Production]
- // | Copyright (C) 2001 - 2004 Headstart Solutions Limited
- // | Supplied by WTN-WDYL
- // | Nullified by WTN-WDYL
- // | Distribution via WebForum, ForumRU and associated file dumps
- // +-------------------------------------------------------------+
- // | DESKPRO IS NOT FREE SOFTWARE
- // +-------------------------------------------------------------+
- // | License ID : Full Enterprise License =) ...
- // | License Owner : WTN-WDYL Team
- // +-------------------------------------------------------------+
- // | $RCSfile: index.php,v $
- // | $Date: 2004/02/10 01:34:30 $
- // | $Revision: 1.11 $
- // +-------------------------------------------------------------+
- // | File Details:
- // | - Private message display
- // +-------------------------------------------------------------+
- error_reporting(E_ALL ^ E_NOTICE);
- include "./../global.php";
- tech_nav('teamwork');
- $db->query("SELECT pm_source.*, tech.username, pm_relations.is_read
- FROM pm_relations
- LEFT JOIN pm_source ON (pm_source.id = pm_relations.pmid)
- LEFT JOIN tech ON (pm_source.fromid = tech.id)
- WHERE pm_relations.techid = '$user[id]'
- ORDER BY pm_source.timestamp
- ");
- $read = NULL; $unread = NULL; $read_count = 0; $unread_count = 0;
- while ($res = $db->row_array()) {
- if (strlen($res['title']) > 30) {
- $res['title'] = substr($res['subject'],30).'...';
- }
- $string = " · <A HREF="pms.php?do=read&id=$res[id]">[$res[username]] $res[title]</A><BR>n";
- if ($res['is_read']) {
- if ($read_count > 20) {
- if (!$read_more) {
- $read .= " · <A HREF="pms.php?do=view&is_read=1">More...</A><BR>n";
- $read_more++;
- }
- } else {
- $read .= $string;
- }
- $read_count++;
- } else {
- if ($unread_count > 20) {
- if (!$unread_more) {
- $unread .= " · <A HREF="pms.php?do=view&is_read=0">More...</A><BR>n";
- $unread_more++;
- }
- } else {
- $unread .= $string;
- }
- $unread_count++;
- }
- }
- if (!$read) {
- $read = " <I>None</I><BR>n";
- }
- if (!$unread) {
- $unread = " <I>None</I><BR>n";
- }
- $links = "<B><A HREF="pms.php?do=send">Send a Message...</A></B>n";
- echo "<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3"><TR VALIGN="TOP"><TD>
- <B><U>UNREAD MESSAGES ($unread_count)</U></B><BR>
- $unread</TD><TD> </TD>
- <TD><B><U>READ MESSAGES ($read_count)</U></B><BR>
- $read</TD></TR>
- <TR><TD COLSPAN="2">
- $links</TD></TR></TABLE><BR>";
- tech_footer();
- ?>