📄 contactlist.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/utility_all.php';
echo '<s';
echo 'cript>
function set_page()
{
PAGE_START=PAGE_NUM.value;
location="contactlist.php?CUSTOMER_ID=';
echo $CUSTOMER_ID;
echo '&CUR_PAGE="+PAGE_START;
}
function td_detail(I)
{
if(document.all(I).style.display=="none")
{document.all(I).style.display="";
document.all(I).style.cursor="hand";
}
else
document.all(I).style.display="none";
}
function td_close(I)
{
document.all(I).style.display="none";
}
function show_detail(CONTACT_ID)
{
URL="contact/showdetail.ph';
echo 'p?CONTACT_ID="+CONTACT_ID;
myleft=(screen.availWidth-650)/2;
window.open(URL,"formul_edit","height=500,width=550,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}
</script>
<html>
<head>
<title>客户服务安排查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin="5">
';
$CUSTOMER_COUNT = 0;
$query = (((''.'SELECT count(*) from CONTACT where CUSTOMER_ID=\'').$CUSTOMER_ID).'\'');
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$CUSTOMER_COUNT = $ROW[0];
}
$PER_PAGE = 5;
$PAGE_COUNT = ceil (($CUSTOMER_COUNT / $PER_PAGE));
if ((($CUR_PAGE <= 0) OR ($CUR_PAGE == '')))
{
$CUR_PAGE = 1;
}
if (($PAGE_COUNT < $CUR_PAGE))
{
$CUR_PAGE = $PAGE_COUNT;
}
$query1 = (((''.'SELECT a.CONTACT_ID,b.CODE_NAME as CONTACT_TYPE,a.CONTACT_DATE as CONTACT_DATE,a.CONTACT_CONTENT as CONTACT_CONTENT,a.SELLER as SELLER
from CONTACT a LEFT OUTER JOIN SYS_CODE b
ON a.CONTACT_TYPE=b.CODE_NO AND b.PARENT_NO = \'CONTACT_TYPE\'
where CUSTOMER_ID=\'').$CUSTOMER_ID).'\' ');
$offest = (($CUR_PAGE - 1) * 5);
$query1 = (((($query1.' LIMIT ').$offest).' ,').$PER_PAGE);
$cursor1 = exequery ($connection, $query1);
if (($CUSTOMER_COUNT == 0))
{
message ('<br>提示', '没有服务记录');
exit ();
}
else
{
echo '<table border="0" cellspacing="1" width="95%" class="small" cellpadding="3">
<tr>
<td align="left">
<a href="contactlist.php?CUR_PAGE=1&CUSTOMER_ID=';
echo $CUSTOMER_ID;
echo '"><img src=\'/images/first02.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'首页\'></a>
<a href="contactlist.php?CUR_PAGE=';
echo ($CUR_PAGE - 1);
echo '&CUSTOMER_ID=';
echo $CUSTOMER_ID;
echo '"><img src=\'/images/first01.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'上一页\'></a>
<a href="contactlist.php?CUR_PAGE=';
echo ($CUR_PAGE + 1);
echo '&CUSTOMER_ID=';
echo $CUSTOMER_ID;
echo '"><img src=\'/images/last01.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'下一页\' style="cursor:hand"></a>
<a href="contactlist.php?CUR_PAGE=';
echo $PAGE_COUNT;
echo '&CUSTOMER_ID=';
echo $CUSTOMER_ID;
echo '"><img src=\'/images/last02.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'末页\' style="cursor:hand"></a>
到
<input type="text" name="PAGE_NUM" size="3" maxlength="4" class="SmallInput">
页
<img id="btnGotoPage" src="/images/menu/book.gif" onclick="set_page()" border="0" WIDTH="19" HEIGHT="17" style="cursor:hand" alt="转到相应页面">
</td>
<td align="right">
';
echo $CUR_PAGE;
echo '/';
echo $PAGE_COUNT;
echo '页 共 ';
echo $CUSTOMER_COUNT;
echo ' 条
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
<tr class="TableHeader">
<td nowrap align="center">服务类型</td>
<td nowrap align="center">服务日期</td>
<td nowrap align="center">服务内容</td>
<td nowrap align="center">销售员</td>
<td nowrap align="center">操作</td>
</tr>
';
$CUSTOMER_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor1))
{
$SIGN = '';
++$CUSTOMER_COUNT;
$CONTACT_ID1 = $ROW['CONTACT_ID'];
$CONTACT_TYPE1 = $ROW['CONTACT_TYPE'];
$CONTACT_DATE1 = $ROW['CONTACT_DATE'];
$CONTACT_CONTENT1 = $ROW['CONTACT_CONTENT'];
$SELLER1 = $ROW['SELLER'];
if (($SELLER1 == $LOGIN_USER_ID))
{
$SIGN = '1';
}
$query2 = (((''.'select * from USER where USER_ID=\'').$SELLER1).'\'');
$cursor2 = exequery ($connection, $query2);
if ($ROW = mysql_fetch_array ($cursor2))
{
$SELLER1 = $ROW['USER_NAME'];
}
if ((($CUSTOMER_COUNT % 2) == 1))
{
$TableLine = 'TableLine1';
}
else
{
$TableLine = 'TableLine2';
}
echo ' <tr class="';
echo $TableLine;
echo '">
<td nowrap align="center">';
echo $CONTACT_TYPE1;
echo '</td>
<td nowrap align="center">';
echo $CONTACT_DATE1;
echo '</td>
<td nowrap align="center" style="cursor:hand" onclick="td_detail(\'';
echo $CONTACT_ID1;
echo '\');">点击查看</td>
<td nowrap align="center">';
echo $SELLER1;
echo '</td>
</td>
<td nowrap align="center">
<a href="javascript:show_detail(';
echo $CONTACT_ID1;
echo ');"> 详细信息 </a>
</td>
</tr>
<tr class="TableData" id=';
echo $CONTACT_ID1;
echo ' style="display:none" onDblClick="td_close(\'';
echo $CONTACT_ID1;
echo '\');" title="双击关闭子窗口">
<td align="left" colspan=10>
';
echo '<s';
echo 'pan class="big4">服务内容:';
echo $CONTACT_CONTENT1;
echo '</span>
</tr>
';
}
}
echo '</table>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -