📄 view.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
<!--#include file="Connections/conn.asp" -->
<!--登录权限判断,Session和MD5加密判断-->
<%
Function getGroupName(gId)
If gId = "" Then
getGroupName = ""
Else
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_group Where gId = " & gId,conn,3,1
If rs.RecordCount <> 1 Then
getGroupName = ""
Else
getGroupName = rs("gName")
End If
rs.Close
Set rs = Nothing
End If
End Function
Function getList(i,sTable,iId,sValue)
If i < 1 Or i > 2 Then
getList = ""
Exit Function
End If
Dim strList
Dim rs
If i = 1 Then
strList = "<select name=""" & sValue & """>"
strList = strList & "<option value="""">请选择</option>"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From " & sTable & "",conn,3,1
Do While Not rs.BOF And Not rs.EOF
strList = strList & "<option value=""" & rs(sValue) & """>" & rs(sValue) & "</option>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
strList = strList & "</select>"
getList = strList
Else
strList = "<select name=""" & sValue & """>"
strList = strList & "<option value="""">请选择</option>"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From " & sTable & "",conn,3,1
Do While Not rs.BOF And Not rs.EOF
strList = strList & "<option value=""" & rs(iId) & """>" & rs(sValue) & "</option>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
strList = strList & "</select>"
getList = strList
End If
End Function
Function listRecords(cId)
Dim rs,strOut
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_records Where cId = " & cId,conn,3,1
Do While Not rs.BOF And Not rs.EOF
strOut = strOut & " <tr>" & VBCrlf
strOut = strOut & " <td width=""120"" align=""center"">" & rs("rDate") & "</td>" & VBCrlf
strOut = strOut & " <td width=""80"" align=""center"">" & rs("rType") & "</td>" & VBCrlf
strOut = strOut & " <td>" & rs("rContent") & "</td>" & VBCrlf
strOut = strOut & " </tr>" & VBCrlf
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
listRecords = strOut
End Function
Rem Session("CRM_account") 用户帐号
Rem Session("CRM_name") 用户名
Rem Session("CRM_level") 用户等级
If Session("CRM_account") = "" Or Session("CRM_name") = "" Or Session("CRM_level") <= 0 Then Response.Redirect("login.asp")
Session("CRM_url") = Request.ServerVariables("HTTP_REFERER")
If InStr(Session("CRM_url"),"addData.asp") > 0 Or InStr(Session("CRM_url"),"view.asp") > 0 Then
Session("CRM_url") = "listAll.asp"
End If
Dim strNormal,strAdmin,strToPrint
strNormal = strNormal & " <tr>" & VBCrlf
strNormal = strNormal & " <td width=""60"" align=""center"" bgcolor=""menu"">编号</td>" & VBCrlf
strNormal = strNormal & " <td align=""center"" bgcolor=""menu"">公司名称</td>" & VBCrlf
strNormal = strNormal & " <td align=""center"" bgcolor=""menu"">公司网址</td>" & VBCrlf
strNormal = strNormal & " <td width=""80"" align=""center"" bgcolor=""menu"">地区</td>" & VBCrlf
strNormal = strNormal & " </tr>" & VBCrlf
strAdmin = strAdmin & " <tr>" & VBCrlf
strAdmin = strAdmin & " <td width=""60"" align=""center"" bgcolor=""menu"">编号</td>" & VBCrlf
strAdmin = strAdmin & " <td align=""center"" bgcolor=""menu"">公司名称</td>" & VBCrlf
strAdmin = strAdmin & " <td align=""center"" bgcolor=""menu"">公司网址</td>" & VBCrlf
strAdmin = strAdmin & " <td width=""80"" align=""center"" bgcolor=""menu"">地区</td>" & VBCrlf
strAdmin = strAdmin & " <td width=""80"" align=""center"" bgcolor=""menu"">业务员</td>" & VBCrlf
strAdmin = strAdmin & " </tr>" & VBCrlf
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>销售管理系统</title>
<link href="myStyle.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function showHideHead(strSrc)
{
var strFile = strSrc.substring(strSrc.lastIndexOf("/"),strSrc.length);
if (strFile == "/arrow_up.gif"){
oHead.style.display = "none";
oHeadCtrl.src = "images/arrow_down.gif";
oHeadCtrl.alt = "显示头部";
oHeadBar.title = "显示头部";
}
else {
oHead.style.display = "block";
oHeadCtrl.src = "images/arrow_up.gif";
oHeadCtrl.alt = "隐藏头部";
oHeadBar.title = "隐藏头部";
}
}
function showHideBlock(s)
{
if(eval("document.all." + s + ".style.display == \"none\"")){
eval("document.all." + s + ".style.display = \"block\"");
}
else{
eval("document.all." + s + ".style.display = \"none\"");
}
}
function checkInput()
{
for(var i=0;i<arguments.length;i++){
var o = eval("document.all." + arguments[i]);
if(o.value == ""){
alert("请输入内容。");
o.focus();
return false;
break;
}
}
}
if (this.location.href == top.location.href){
top.location.href = "";
}
function openModalDialog(thisUrl)
{
var strUrl = thisUrl;
//window.showModalDialog(strUrl,"","status:false;dialogWidth:600px;dialogHeight:450px;status:no;scroll=no;resizable=no;help=no;");
window.open(strUrl,'','menubar=no,scrollbars=no,resizable=no,width=480,height=360');
}
-->
</script>
<style type="text/css">
.style7 {color: #2d4865}
.style8 {color: #0d79b3;
font-weight: bold;
}
</style>
</head>
<body topmargin="0" leftmargin="0">
<table width="583" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="21"><div align="center">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="2" height="25"><span class="style8"><img src="../images/main/l3.gif" width="2" height="25"></span></td>
<td background="../images/main/m3.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21"><div align="center"><span class="style8"><img src="../images/main/icon.gif" width="15" height="12"></span></div></td>
<td class="style7">销售系统</td>
</tr>
</table></td>
<td width="1"><span class="style8"><img src="../images/main/r3.gif" width="1" height="25"></span></td>
</tr>
</table>
<font color="0D79B3"></font></div></td>
</tr>
</table>
<br>
<%
Dim action
action = Trim(Request("action"))
Select Case action
''Case "save"
'' Call saveData()
''Case "edit"
'' Call editForm()
Case "saveRecords"
Call saveEditData()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -