设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 57|回复: 1
打印 上一主题 下一主题

if not isempty(request("selUserID")) then 中有错误!请帮我一下! ...

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-17 08:29:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<!--#include file="Include/Gaobei_setup.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="Include/check.asp"-->
<!--#include file="other/Gaobei_md5.asp" -->
<%CheckAdmin3%>
<%
function cutstr(str,strlen,more,url)
if len(str)>strlen then
str=left(str,strlen) & "......"
end if
if (len(str)>strlen) and more then
str=str+"&nbsp;&nbsp;&nbsp;点这里查看详情"
end if
cutstr=str
end function
function AutoUrl(str)
on error resume next
Set url=new RegExp
url.IgnoreCase =True
url.Global=True
url.MultiLine = True
url.Pattern = "^(http://[A-Za-z0-9\./=\?%\-&_~`@:+!]+)"
str = url.Replace(str,"$1")
url.Pattern = "(http://[A-Za-z0-9\./=\?%\-&_~`@:+!]+)$"
str = url.Replace(str,"$1")
url.Pattern = "^(www.[A-Za-z0-9\./=\?%\-&_~`@:+!]+)"
str = url.Replace(str,"$1")
url.Pattern = "(www.[A-Za-z0-9\./=\?%\-&_~`@:+!]+)$"
str = url.Replace(str,"$1")
set url=Nothing
AutoUrl=str
end function
Rem 判断数字是否整形
function isInteger(para)
on error resume next
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
end function
Function FormatStr(String)
on Error resume next
String = Replace(String, CHR(13), "")
String = Replace(String, CHR(32), "&nbsp;")
String = Replace(String, "", "&nbsp;")
String = Replace(String, "<", "&lt;")
String = Replace(String, ">", "&gt;")
String = Replace(String, CHR(10) & CHR(10), "<BR><BR>")
String = Replace(String, CHR(10), "<BR>")
FormatStr = String
End Function
Function Ubb2Html(str, showemot, showimg)
ON ERROR RESUME NEXT
if not str<>"" then exit function
tmpstr="uNobwab"
str=UbbStr(str,"url")
str=UbbStr(str,"quote")
str=UbbStr(str,"color")
str=UbbStr(str,"size")
str=UbbStr(str,"face")
if showemot then
for i=1 to 16
str=replace(str,":em"&i&":","<img src='emot/em"&i&".gif'>",1,6,1)
str=replace(str,":em"&i&":","",1,-1,1)
next
end if
if showimg then
str=UbbStr(str,"img")
str=UbbStr(str,"swf")
str=UbbStr(str,"dir")
str=UbbStr(str,"rm")
str=UbbStr(str,"mp")
str=UbbStr(str,"qt")
end if
str=UbbStr(str,"frame")
str=replace(str,"","<b>",1,-1,1)
str=replace(str,"","</b>",1,-1,1)
str=replace(str,"","<u>",1,-1,1)
str=replace(str,"","</u>",1,-1,1)
str=replace(str,"
","<br>",1,-1,1)
str=replace(str,"
","<center>",1,-1,1)
str=replace(str,"
","</center>",1,-1,1)
str=replace(str,"","<marquee>",1,-1,1)
str=replace(str,"
","</marquee>",1,-1,1)
str=replace(str,"["&tmpstr,"[",1,-1,1)
str=replace(str,tmpstr&"]","]",1,-1,1)
str=replace(str,"/"&tmpstr,"/",1,-1,1)
Ubb2Html=str
End Function
%>
<%
'日期格式转换函数
function DateTimeFormat(DateTime,Format)
select case Format
case "1"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日"
case "2"
DateTimeFormat=""&month(DateTime)&"月"&day(DateTime)&"日"
case "3"
DateTimeFormat=""&year(DateTime)&"-"&month(DateTime)&"-"&day(DateTime)&""
case "4"
DateTimeFormat=""&year(DateTime)&"/"&month(DateTime)&"/"&day(DateTime)&""
case "5"
DateTimeFormat=""&month(DateTime)&"/"&day(DateTime)&""
case "6"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日<font color=red> "&FormatDateTime(DateTime,4)&"</font>"
case "7"
temp="星期日,星期一,星期二,星期三,星期四,星期五,星期六"
temp=split(temp,",")
DateTimeFormat=temp(Weekday(DateTime)-1)
case else
DateTimeFormat=DateTime
end select
end function
%>

<HTML><HEAD><TITLE>商品管理系统 -- 商品管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="other/Admin.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
color: #663399;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #663399;
}
a:hover {
text-decoration: underline;
color: #CC3300;
}
a:active {
text-decoration: none;
}
-->
</style>
<SCRIPT LANGUAGE=javascript>
//实现反向选择
<!--
function SelectAll() {
for (var i=0;i<document.selform.selUserID.length;i++) {
var e=document.selform.selUserID;
e.checked=!e.checked;
}
}
//-->
</script>
</HEAD>

<p align="center">客户管理系统 V 1.0<br><br><a href="admin_khedit.asp?action=newsoft">添加客户信息</a> | <a href="admin_kehu.asp?action=list">修改客户信息</a></p>
<body>
<%
dim selUserID
if not isempty(request("selUserID")) then
selUserID=request("selUserID")
if request("action")="删除" then
call delUser()
elseif request("action")="激活" then
call kh_isactive()
elseif request("action")="锁定" then
call noActive()
elseif request("action")="设为普通客户" then
call general()
elseif request("action")="设为VIP客户" then
call vipuser()
elseif request("action")="设为大宗客户" then
call dzkhuser()
else
response.write "无效的参数!"
response.end
end if
end if
sub delUser()
conn.execute("delete from kehu_table where kh_id in ("&selUserID&")")
end sub
sub kh_isactive()
conn.execute("update kehu_table set kh_isactive=1 where kh_id in ("&selUserID&")")
end sub
sub noActive()
conn.execute("update kehu_table set kh_isactive=0 where kh_id in ("&selUserID&")")
end sub
sub general()
conn.execute("update kehu_table set kh_grade=0 where kh_id in ("&selUserID&")")
end sub
sub vipuser()
conn.execute("update kehu_table set kh_grade=1 where kh_id in ("&selUserID&")")
end sub
sub dzkhuser()
conn.execute("update kehu_table set kh_grade=2 where kh_id in ("&selUserID&")")
end sub
set rs=server.createobject("adodb.recordset")
%>
<% if request.querystring("action")="list" then
dim keyword,colname,totalsoft,Currentpage,totalpages,i
keyword=trim(replace(request.form("keyword"),"'",""))
colname=request("colname")
sql="select kh_id,kh_bianhao,kh_name,kh_bir,kh_address,kh_shangping,kh_money,kh_jifen,kh_tel,kh_email,kh_grade,kh_sex,kh_time,kh_isactive from kehu_table order by kh_time desc"
if keyword<>"" and colname<>"0" then
sql="select kh_id,kh_bianhao,kh_name,kh_bir,kh_address,kh_shangping,kh_money,kh_jifen,kh_tel,kh_email,kh_grade,kh_sex,kh_time,kh_isactive from kehu_table where "&colname&" like '%"&keyword&"%' order by kh_time desc"
else
sql="SELECT kh_id,kh_bianhao,kh_name,kh_bir,kh_address,kh_shangping,kh_money,kh_jifen,kh_tel,kh_email,kh_grade,kh_sex,kh_time,kh_isactive from kehu_table order by kh_time desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table width="98%" align="center" border="0" cellspacing="0" cellpadding="4" style="border-collapse: collapse">
<tr>
<form name="form1" method="post" action="admin_kehu.asp?action=list"><td align="center">
<select name="colname"><option value=0 selected>--==客户信息检索==--</option><option value="kh_bianhao">客户编号</option><option value="kh_name">客户姓名</option><option value="kh_shangping">客户购买商品</option><option value="kh_address">客户地址</option></select>&nbsp; <input type="text" name="keyword" class="textarea" size="40">&nbsp;&nbsp; <input type="submit" name="Submit" value="开 始 搜 索" class="button"></
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-20 07:27 , Processed in 0.115469 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表