www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > user/user_cartoon_face.asp

    <%
'===================================================================
'= ASP FILENAME	: /user/user_cartoon_face.asp
'= CREATED TIME : SEP,8,2003
'= LAST MODIFIED: SEP,8,2003
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION  : 卡通头像选取
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/customer/include_customer_action_view.asp" -->

<!-- #include file = "../main_func.asp" -->

<!-- #include file = "./user_inc.asp" -->

<%
'========================================================
'==   Action参数设置
'========================================================
'== 页面名
Const CONST_PAGE_FILE	= "user/user_cartoon_face.asp"

'== 页面标题/功能
Const CONST_PAGE_TITLE	= "用户卡通选择"

'== 功能函数名字空间
Const CONST_ACTION_FUNC	= "ShowPopCartoonFacelist"

'== 相对根目录路径 
GBL_strHomeURL			= "../"

'== 页面构造
Call ActionBuild()

'== 请求校验与过滤
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)
 

'== 页面析构
Call ActionOver()
%>

<%
'===================================================================
'= Function    : LoadPageTpl()
'= Time		   : Created At 2006-5-4
'= Description : 加载页面模块
'===================================================================
Function LoadPageTpl()
%>
	<!-- #include file = "../template_c/page_pop.html.asp" --> 
<%
End Function

Dim strFaceDir 

'=============== FUNCTION BODY BEGIN ===============================
'===================================================================
'= Function    : ShowPopCartoonFacelist() 
'= Time	       : Created At SEP,8,2003
'= Input       : None

'= Called by   : /board/cartoon_face.asp
'= Calls       :
'= Return      :
'= Table       :
'= Description : 用做签名图的用户卡通头像列表
'= Modify      :
'=               Time    Description
'===================================================================
Function ShowPopCartoonFacelist()
	Dim intPerNum
	intPerNum = 12		'== 每屏显示数量(偶数)
	Dim strFaceType
	strFaceType = Trim(Request.QueryString("strFaceType"))

	strFaceDir = GBL_strHomeURL & GBL_strCartoonFacePath

	If strFaceType = "" Then
		strFaceType = "c1"
	End If
	Select Case strFaceType
			Case "c1"	 :	intPerNum = 12
			Case "c2"	 :	intPerNum = 5
			Case "ht"	 :	intPerNum = 12
			Case "xj"	 :	intPerNum = 12
			Case "foot"	 :	intPerNum = 10
			Case "kd"	 :	intPerNum = 11
			Case "ho"	 :  intPerNum = 12
			Case "ho"	 :  intPerNum = 12
			Case "ct2"	 :  intPerNum = 12
			Case "ct3"	 :  intPerNum = 12
			Case "ct4"	 :  intPerNum = 12
			Case "ct5"	 :  intPerNum = 12
			Case "ct6"	 :  intPerNum = 12
			Case "ct7"	 :  intPerNum = 12
			Case "ct8"	 :  intPerNum = 12
			Case "ct9"	 :  intPerNum = 12
			Case "ct"	 :  intPerNum = 12
			Case "cta"	 :  intPerNum = 12
			Case "ctb"	 :  intPerNum = 12
			Case "ctc"	 :  intPerNum = 5
			Case Else		intPerNum = 12
	End Select
	%>
	<table align=center class=l cellpadding="0" cellspacing="5">
		<tr>
			<td colspan=8><table><tr>
				<td><a href="user_cartoon_face.asp?strFaceType=c1">|大头卡通1|
				<a href="user_cartoon_face.asp?strFaceType=c2">|大头卡通2|</a><a href="user_cartoon_face.asp?strFaceType=ht">FACE| </a><a href="user_cartoon_face.asp?strFaceType=xj">仙剑| </a><a href="user_cartoon_face.asp?strFaceType=foot">球星| </a><a href="user_cartoon_face.asp?strFaceType=kd">最终幻想| </a><a href="user_cartoon_face.asp?strFaceType=ho">小鬼| </a><a href="user_cartoon_face.asp?strFaceType=ct9">卡通9| </a><a href="user_cartoon_face.asp?strFaceType=ct">卡通10| </a><a href="user_cartoon_face.asp?strFaceType=ct8">卡通11| </a></td>
			</tr>
			<tr>
				<td><a href="user_cartoon_face.asp?strFaceType=cta">|卡通1| </a><a href="user_cartoon_face.asp?strFaceType=ct2">卡通2| </a><a href="user_cartoon_face.asp?strFaceType=ct3">卡通3| </a><a href="user_cartoon_face.asp?strFaceType=ct4">卡通4| </a><a href="user_cartoon_face.asp?strFaceType=ct5">卡通5| </a><a href="user_cartoon_face.asp?strFaceType=ct6">卡通6| </a><a href="user_cartoon_face.asp?strFaceType=ct7">卡通7| </a><a href="user_cartoon_face.asp?strFaceType=ctb">卡通8| </a><a href="user_cartoon_face.asp?strFaceType=ctc">卡通11| </a></td>
			</tr>
			</table></td>
		</tr>
		<%
		Dim n
		For n = 1 To intPerNum
			Response.Write "<tr align=center>" & VbCrLf
			Response.Write "	<td>" & VbCrLf
			Response.Write "		" & string(3 -len(cstr(n)),"0") & n
			Response.Write "	</td>" & VbCrLf
			Response.Write "	<td>" & VbCrLf
			Response.Write "		<a href=#1 onClick="&chr(34)&"MM_setTextOfTextfield('userface','','" & strFaceType & string(3 - len(cstr(n)),"0") & n &"')"&chr(34)&"><img src=" & strFaceDir & strFaceType & string(3 - len(cstr(n)),"0")&n&".gif border=0 >"
			Response.Write		"</td>" & VbCrLf
			n = n + 1
			If n > intPerNum Then Exit For

			Response.Write "	<td>" & VbCrLf
			Response.Write "		" & string(3 -len(cstr(n)),"0") & n
			Response.Write "	</td>" & VbCrLf
			Response.Write "	<td>" & VbCrLf
			Response.Write "		<a href=#1 onClick="&chr(34)&"MM_setTextOfTextfield('userface','','" & strFaceType & string(3 - len(cstr(n)),"0") & n &"')"&chr(34)&"><img src=" & strFaceDir & strFaceType & string(3 - len(cstr(n)),"0")&n&".gif border=0 >"
			Response.Write		"</td>" & VbCrLf
			n = n + 1
			If n > intPerNum Then Exit For

			Response.Write "	<td>" & VbCrLf
			Response.Write "		" & string(3 -len(cstr(n)),"0") & n
			Response.Write "	</td>" & VbCrLf
			Response.Write "	<td>" & VbCrLf
			Response.Write "		<a href=#1 onClick="&chr(34)&"MM_setTextOfTextfield('userface','','" & strFaceType & string(3 - len(cstr(n)),"0") & n &"')"&chr(34)&"><img src=" & strFaceDir & strFaceType & string(3 - len(cstr(n)),"0")&n&".gif border=0 >"
			Response.Write		"</td>" & VbCrLf
			n = n + 1
			If n > intPerNum Then Exit For

			Response.Write		"<td>" & string( 3 - len(cstr(n)),"0") & n
			Response.Write		"</td>"
			Response.Write		"<td>"
			Response.Write		"<a href=#1 			onClick="&chr(34)&"MM_setTextOfTextfield('userface','','" & strFaceType & string(3 - len(cstr(n)),"0") & n &"')"&chr(34)&"><img src=" & strFaceDir & strFaceType & string(3 - len(cstr(n)),"0") & n &".gif border=0 >"
			Response.Write		"</td>"
			Response.Write	"</tr>" & VbCrLf
			Next
		%>
		<tr>
			<td colspan=8>
				<hr size=1>
			</td>
		</tr>
	</table>
	</center>
	<center>
		<a href=#1 onClick='returnvalue();'>
		[关闭]
		</a>
	</center>
<%
End Function
'============ End of Function ShowPopSmileFaceList() ===============
'=============== FUNCTION BODY END =================================
%>

<script>
	function closeit()
	{
		setTimeout("self.close()",90000)
	}
	function MM_findObj(n, d)
	{ //v3.0
		var p,i,x;
		if(!d) d=document;
		if((p=n.indexOf("?"))>0&&parent.frames.length)
		{
			d=parent.frames[n.substring(p+1)].document; 
			n=n.substring(0,p);
		}
		if(!(x=d[n])&&d.all) x=d.all[n]; 
		for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
		return x;
	}
	function MM_setTextOfTextfield(objName,x,newText)
	{ //v3.0
		var obj = MM_findObj(objName);
		if (obj) obj.value = newText;
		opener.document.frmFormCartoon.iptCartoonFace.value=newText;
		opener.document.imgCartoonFace.src='<%= strFaceDir %>'+newText+'.gif'
		window.close();
	}

	function returnvalue(){
		window.returnValue = 1;
		window.close();
	}
	function cancelPost(){
		window.close();
	}
</script>