⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 本代码是为客户联系管理而做的系统
💻 PHP
字号:
<?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 = "&nbsp;&nbsp;&middot;&nbsp;<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 .= "&nbsp;&nbsp;&middot;&nbsp;<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 .= "&nbsp;&nbsp;&middot;&nbsp;<A HREF=\"pms.php?do=view&is_read=0\">More...</A><BR>\n";
				$unread_more++;
			}
		} else {
			$unread .= $string;
		}
		$unread_count++;
	}
}

if (!$read) {
	$read = "&nbsp;&nbsp;<I>None</I><BR>\n";
}

if (!$unread) {
	$unread = "&nbsp;&nbsp;<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>&nbsp;</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();
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -