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

📄 usercorp.asp

📁 后台目录:qwbAdmin/Login.asp 登陆用户名:admin 登陆密码:admin
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<% Option Explicit %>
<!--#include file="../../FS_Inc/Const.asp" -->
<!--#include file="../../FS_InterFace/MF_Function.asp" -->
<!--#include file="../../FS_Inc/Function.asp" -->
<!--#include file="lib/strlib.asp" -->
<!--#include file="../../FS_Inc/Func_page.asp" -->
<% 'Copyright (c) 2006 Foosun Inc. Code by awen
Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
MF_Default_Conn
MF_User_Conn
MF_Session_TF
if not MF_Check_Pop_TF("ME_List") then Err_Show
if not MF_Check_Pop_TF("ME001") then Err_Show 

int_RPP=15 '设置每页显示数目
int_showNumberLink_=10 '数字导c航显示数目
showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
str_nonLinkColor_="#999999" '非热链接颜色
toF_="<font face=webdings>9</font>"   			'首页 
toP10_=" <font face=webdings>7</font>"			'上十
toP1_=" <font face=webdings>3</font>"			'上一
toN1_=" <font face=webdings>4</font>"			'下一
toN10_=" <font face=webdings>8</font>"			'下十
toL_="<font face=webdings>:</font>"				'尾页


''得到相关表的值。
Function Get_OtherTable_Value(This_Fun_Sql)
	Dim This_Fun_Rs
	if instr(This_Fun_Sql," FS_ME_")>0 then 
		set This_Fun_Rs = User_Conn.execute(This_Fun_Sql)
	else
		set This_Fun_Rs = Conn.execute(This_Fun_Sql)
	end if
	if instr(lcase(This_Fun_Sql)," in ")>0 then 
		do while not This_Fun_Rs.eof
			Get_OtherTable_Value = Get_OtherTable_Value & This_Fun_Rs(0) &"&nbsp;"
			This_Fun_Rs.movenext
		loop
	else			
		if not This_Fun_Rs.eof then 
			Get_OtherTable_Value = This_Fun_Rs(0)
		else
			Get_OtherTable_Value = ""
		end if
	end if	
	set This_Fun_Rs=nothing 
End Function

Function Get_FildValue_List(This_Fun_Sql,EquValue,Get_Type)
'''This_Fun_Sql 传入sql语句,EquValue与数据库相同的值如果是<option>则加上selected,Get_Type=1为<option>
Dim Get_Html,This_Fun_Rs,Text
On Error Resume Next
set This_Fun_Rs = User_Conn.execute(This_Fun_Sql)
If Err.Number <> 0 then Err.clear : response.Redirect("../error.asp?ErrCodes=<li>抱歉,传入的Sql语句有问题.或表和字段不存在.</li>")
do while not This_Fun_Rs.eof 
	select case Get_Type
	  case 1
		''<option>		
		if instr(This_Fun_Sql,",") >0 then 
			Text = This_Fun_Rs(1)
		else
			Text = This_Fun_Rs(0)
		end if	
		if EquValue = This_Fun_Rs(0) then 
			Get_Html = Get_Html & "<option value="""&This_Fun_Rs(0)&"""  style=""color:#0000FF"" selected>"&Text&"</option>"&vbNewLine
		else
			Get_Html = Get_Html & "<option value="""&This_Fun_Rs(0)&""">"&Text&"</option>"&vbNewLine
		end if		
	  case else
		exit do : Get_FildValue_List = "Get_Type值传入错误" : exit Function 
	end select
	This_Fun_Rs.movenext
loop
This_Fun_Rs.close
Get_FildValue_List = Get_Html
End Function 

Function Get_WhileData(Add_Sql)
	Dim Get_Html,This_Fun_Sql,ii,Str_Tmp,Arr_Tmp,New_Search_Str,Req_Str,regxp
	Str_Tmp = "A.UserNumber,UserName,C_Name,C_Tel,Email,C_Website,Integral,FS_Money,RegTime,isLock,isLockCorp"
	Str_Tmp = Str_Tmp & ",C_Name,C_ShortName,C_Province,C_City,C_Address,C_PostCode,C_ConactName,C_Tel,C_Fax,C_VocationClassID,C_Website,C_size,C_Capital,C_BankName,C_BankUserName"
	This_Fun_Sql = "select "&Str_Tmp&"  from FS_ME_Users A,FS_ME_CorpUser B where  A.UserNumber=B.UserNumber and A.IsCorporation=1"
	if Add_Sql<>"" then 
		if instr(Add_Sql,"order by")>0 then 
			This_Fun_Sql = This_Fun_Sql &"  "& replace(Add_Sql,"UserNumber","A.UserNumber")
		else
			This_Fun_Sql = and_where(This_Fun_Sql) & Add_Sql
		end if		
	end if
	if request.QueryString("Act")="SearchGo" then 
		Arr_Tmp = split(Str_Tmp,",")
		for each Str_Tmp in Arr_Tmp
			if Trim(request.Form("frm_"&Str_Tmp))<>"" then 
				Req_Str = NoSqlHack(Trim(request.Form("frm_"&Str_Tmp)))
				select case Str_Tmp
					case "Integral","FS_Money","RegTime","Certificate","C_VocationClassID","isLock"
					''数字,日期
						regxp = "|<|>|=|<=|>=|<>|"
						if instr(regxp,"|"&left(Req_Str,1)&"|")>0 or instr(regxp,"|"&left(Req_Str,2)&"|")>0 then 
							New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" "& Req_Str
						elseif instr(Req_Str,"*")>0 then 
							if left(Req_Str,1)="*" then Req_Str = "%"&mid(Req_Str,2)
							if right(Req_Str,1)="*" then Req_Str = mid(Req_Str,1,len(Req_Str) - 1) & "%"							
							New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" like '"& Req_Str &"'"							
						else	
							New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" = "& Req_Str
						end if		
					case else
					''字符
						New_Search_Str = and_where( New_Search_Str ) & Str_Tmp &" like '%"& Req_Str & "%'"
				end select 		
			end if
		next
		if New_Search_Str<>"" then This_Fun_Sql = and_where(This_Fun_Sql) & replace(New_Search_Str," where ","")
		'response.Write(This_Fun_Sql)
		'response.End()
	end if
	Str_Tmp = ""
	'response.Write(This_Fun_Sql)
	Set GetUserDataObj_Rs = CreateObject(G_FS_RS)
	GetUserDataObj_Rs.Open This_Fun_Sql,User_Conn,1,1
	IF not GetUserDataObj_Rs.eof THEN
	
	GetUserDataObj_Rs.PageSize=int_RPP
	cPageNo=NoSqlHack(Request.QueryString("Page"))
	If cPageNo="" Then cPageNo = 1
	If not isnumeric(cPageNo) Then cPageNo = 1
	cPageNo = Clng(cPageNo)
	If cPageNo<=0 Then cPageNo=1
	If cPageNo>GetUserDataObj_Rs.PageCount Then cPageNo=GetUserDataObj_Rs.PageCount 
	GetUserDataObj_Rs.AbsolutePage=cPageNo
	
	  FOR int_Start=1 TO int_RPP
		Get_Html = Get_Html & "<tr class=""hback"">" & vbcrlf
		Get_Html = Get_Html & "<td align=""center""><a href=""#"" onclick=""javascript:if(TD_U_"&GetUserDataObj_Rs("UserNumber")&".style.display=='') TD_U_"&GetUserDataObj_Rs("UserNumber")&".style.display='none'; else TD_U_"&GetUserDataObj_Rs("UserNumber")&".style.display='';"" class=""otherset"" title='点击查看更多信息'>"&GetUserDataObj_Rs("UserNumber")&"</a></td>" & vbcrlf
		Get_Html = Get_Html & "<td align=""center""><a href=""UserCorp.asp?Act=Edit&UserNumber="&GetUserDataObj_Rs("UserNumber")&""" class=""otherset"" title='点击修改公司信息'>"&GetUserDataObj_Rs("C_Name")&"</a></td>" & vbcrlf
		Get_Html = Get_Html & "<td align=""center"">"&GetUserDataObj_Rs("UserName")&"</td>" & vbcrlf
		Get_Html = Get_Html & "<td align=""center""><a href=""mailto:"&GetUserDataObj_Rs("Email")&""" title=""发邮件给他"">"& GetUserDataObj_Rs("Email") & "</td>" & vbcrlf
		Get_Html = Get_Html & "<td align=""center"">" & GetUserDataObj_Rs("RegTime") & "</td>" & vbcrlf
		if GetUserDataObj_Rs("isLockCorp")&"" <> "0" then 
			''锁定,需要解锁
			Get_Html = Get_Html & "<td align=""center""><input type=button value=""锁 定"" onclick=""javascript:location='UserCorp.asp?Act=OtherEdit&EditSql="&server.URLEncode( "isLock=0" )&"&UserNumber="&GetUserDataObj_Rs("UserNumber")&"'"" title=""点击解锁"" style=""color:red""></td>" & vbcrlf
		else
			Get_Html = Get_Html & "<td align=""center""><input type=button value=""正 常"" onclick=""javascript:location='UserCorp.asp?Act=OtherEdit&EditSql="&server.URLEncode( "isLock=1" )&"&UserNumber="&GetUserDataObj_Rs("UserNumber")&"'"" title=""点击锁定""></td>" & vbcrlf
		end if
		Get_Html = Get_Html & "<td align=""center"" class=""ischeck""><input type=""checkbox"" name=""frm_UserNumber"" id=""frm_UserNumber"" value="""&GetUserDataObj_Rs("UserNumber")&""" /><input type=""hidden"" name=""frm_UserName"" id=""frm_UserName"" value="""&GetUserDataObj_Rs("UserName")&""" /></td>" & vbcrlf
		Get_Html = Get_Html & "</tr>" & vbcrlf
		''++++++++++++++++++++++++++++++++++++++点开用户编号时显示详细信息。
		Get_Html = Get_Html & "<tr class=""hback"" id=""TD_U_"& GetUserDataObj_Rs("UserNumber") &""" style=""display:none""><td colspan=20>" & vbcrlf
		Get_Html = Get_Html & "<table width=""100%"" height=""30"" border=""0"" cellspacing=""1"" cellpadding=""2"" class=""table"">" & vbcrlf & "<tr class=""hback"">" & vbcrlf
		Get_Html = Get_Html & "<td>" & GetUserDataObj_Rs("C_Province") &" | "& GetUserDataObj_Rs("C_City") &" | "& GetUserDataObj_Rs("C_Address") &" | " & GetUserDataObj_Rs("C_size") &" | "& GetUserDataObj_Rs("C_Capital") & "</td>" & vbcrlf
		Get_Html = Get_Html & "</tr></table>" & vbcrlf
		Get_Html = Get_Html &"</td></tr>" & vbcrlf
		''+++++++++++++++++++++++++++++++++++++++		
		Str_Tmp = ""
		GetUserDataObj_Rs.MoveNext
 		if GetUserDataObj_Rs.eof or GetUserDataObj_Rs.bof then exit for
      NEXT
	END IF
	Get_Html = Get_Html & "<tr class=""hback""><td colspan=20 align=""center"" class=""ischeck"">"& vbcrlf &"<table width=""100%"" border=0><tr><td height=30>" & vbcrlf
	Get_Html = Get_Html & fPageCount(GetUserDataObj_Rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)  & vbcrlf
	Get_Html = Get_Html & "</td><td align=right><input type=""submit"" name=""submit"" value="" 删除 "" onclick=""javascript:return confirm('确定要删除所选项目吗?');""></td>"
	Get_Html = Get_Html &"</tr></table>"&vbNewLine&"</td></tr>"
	GetUserDataObj_Rs.close
	Get_WhileData = Get_Html
End Function
Sub OtherEdit()
	Dim islock,islockCorp
	islock = request.QueryString("EditSql")
	islockCorp = replace(islock,"isLock","isLockCorp")
	User_Conn.execute("Update FS_ME_Users set "&islock&" where UserNumber='"&request.QueryString("UserNumber")&"'")	
	User_Conn.execute("Update FS_ME_CorpUser set "&islockCorp&" where UserNumber='"&request.QueryString("UserNumber")&"'")	
	response.Redirect("UserCorp.asp?Act=View")
End Sub
''================================================================
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>FoosunCMS</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
</HEAD>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//点击标题排序
var Old_Sql = document.URL;

function OrderByName(FildName)
{
	//alert(document.URL);	
	var New_Sql;
	if(Old_Sql.indexOf('Add_Sql')<0)
	{
		if(Old_Sql.indexOf('?')<0)
			New_Sql = Old_Sql + "?Add_Sql=order by " + FildName;	
		else
			New_Sql = Old_Sql + "&Add_Sql=order by " + FildName;	
	}
	else
	{
		if(Old_Sql.indexOf("Add_Sql=order by " + FildName + " desc")>-1)
		{
			New_Sql = Old_Sql.substring(0,Old_Sql.indexOf("Add_Sql=")) + "Add_Sql=order by " + FildName;
		}
		else
		{
			New_Sql = Old_Sql.substring(0,Old_Sql.indexOf("Add_Sql=")) + "Add_Sql=order by " + FildName + " desc";	
		}	
	}
	//alert(New_Sql);	
	location = New_Sql;
}
-->
</script>
<script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
<script language="JavaScript" src="../../FS_Inc/PublicJS_YanZheng.js" type="text/JavaScript"></script>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=yes  oncontextmenu="return true;">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
	<tr  class="hback">
		<td class="xingmu" colspan=20>企业用户信息管理</td>
	</tr>
	<tr  class="hback">
		<td><a href="UserCorp.asp?Act=View">管理首页</a>
			<!-- | <a href="UserCorp.asp?Act=Add"><b>新增</b></a>-->
			| <a href="UserCorp.asp?Act=Search">查询</a></td>
	</tr>
</table>
<%
'******************************************************************
select case request.QueryString("Act")
	case "","View","SearchGo"
	View
	case "Edit","Search","Add_BaseData"
	Add_Edit_Search
	case "Add"
	response.Write("后台添加公司信息已屏蔽。若需开通请与我们联系。")
	response.End()
	case "OtherEdit"
	OtherEdit
	case else
	response.Write(request.QueryString("Act")&"参数传递错误!")
end select

'******************************************************************
Sub View()%>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
	<form name="form1" id="form1" method="post" action="UserCorp_DataAction.asp?Act=Del">
		<tr  class="hback">
			<td align="center" class="xingmu" ><a href="javascript:OrderByName('UserNumber')" class="sd"><b>〖用户编号〗</b></a> <span id="Show_Oder_UserNumber"></span></td>
			<td align="center" class="xingmu"><a href="javascript:OrderByName('C_Name')" class="sd"><b>企业名称</b></a> <span id="Show_Oder_C_Name"></span></td>
			<td align="center" class="xingmu"><a href="javascript:OrderByName('UserName')" class="sd"><b>用户名</b></a> <span id="Show_Oder_UserName"></span></td>
			<td align="center" class="xingmu"><a href="javascript:OrderByName('Email')" class="sd"><b>Email</b></a> <span id="Show_Oder_Email"></span></td>
			<td width="10%" align="center" class="xingmu"><a href="javascript:OrderByName('RegTime')" class="sd"><b>注册日期</b></a> <span id="Show_Oder_RegTime"></span></td>
			<td width="10%" align="center" class="xingmu"><a href="javascript:OrderByName('isLock')" class="sd"><b>是否锁定</b></a> <span id="Show_Oder_isLock"></span></td>
			<td width="2%" align="center" class="xingmu">
				<input name="ischeck" type="checkbox" value="checkbox" onClick="selectAll(this.form)" />
			</td>
		</tr>
		<%
		response.Write( Get_WhileData( request.QueryString("Add_Sql") ) )
	%>
	</form>
</table>
<%End Sub

⌨️ 快捷键说明

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