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

📄 per_addons.asp

📁 直接附加数据库! 修改 Include/ Class_Main.asp 为自己信息 后台admin admin 绍兴人才网程序
💻 ASP
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Public/Person_Cookies.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<%
Dim Rs,Cmd,Tmp,Action
Dim Perid,UserName,UserType,Language_One,Language_Two,Mandarin,Skill_Memo,Computer,PhotoKeep,PhotoUrl
Action = Request.QueryString("action")
If Action <> "" Then
Select Case Action
Case "submit"
Call Submit()  '//跳转到保存数据的函数
Case "keep"
Call Keep_Submit() '//跳转到屏蔽或者恢复照片的函数
Case "delphoto"
Call Del_Submit() '//跳转到删除的函数
End Select
End if

'//判断用户身份
If IsArray(Session("Person")) Then
Perid = Session("Person")(2)
UserName = Session("Person")(0)
Else
Session.Abandon()
Response.write "<script>alert('-登录后才能进行该操作!-');location.href='../Public/MemberLogin.asp';</script>"
Response.End()
End if

'//调用存储过程
Set Cmd = Server.Createobject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Per_Addons"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Perid",200,1,30)
Cmd.Parameters("@Perid") = Perid
Set Rs = Cmd.Execute

If Rs.Eof Then
CloseRs
Set Cmd = Nothing
CloseDB
Response.write "没有找到会员资料!"
Response.End()
End if
Tmp = Rs.GetRows() '//将数据填充到数组
'//0姓名,1用户类型,2计算机水平,3第一语言,4第二语言,5第一语言掌握程度,6第二语言掌握程度,7普通话水平,8技能关键字,9技能描述,10计算机技能,11照片文件,12照片屏蔽
'//如:Tmp(0,0)表示 用户的姓名
CloseRs
Set Cmd = Nothing
'//功能代码
UserType = Cls_Usertype(Tmp(1,0))

Language_One = Tmp(3,0)
Language_Two = Tmp(4,0)
Mandarin = Tmp(7,0)
Computer = Tmp(2,0)
PhotoUrl = Tmp(11,0)
PhotoKeep = Tmp(12,0)
Skill_Memo = Tmp(9,0)
If Skill_Memo<>"" Then Skill_Memo = Replace(Skill_Memo,"<br>",Chr(13))
'//关闭数据库连接
CloseDB
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName %> -- 个人会员管理中心 -- 附加信息(专长/技能/照片)</title>
</head>
<script language="JavaScript" src="../js/Person_Addons.js"></script>
<body>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td>
<!--#include file="../Include/Header.asp" -->
</td>
</tr>
</table>
<table width="956" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
<td><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="4"></td>
</tr>
<tr>
<td height="1" bgcolor="#eeeeee"></td>
</tr>
</table>
      <table width="956" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
<td width="175">
<!--#include file="../Public/Person_Left.asp" -->
</td>
<td width="5">&nbsp;</td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><img src="../Images/icon.gif" width="11" height="11" align="absmiddle">
<%= Tmp(0,0) %>[<%= UserType %>] </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<td bgcolor="#FFFFFF"> <table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;个人照片</font></b></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="98%" border="0" align="center" cellspacing="0" class="text01">
<form name="form2" method="post" action="Per_Addons_PhotoUp.asp" enctype="multipart/form-data" >
<tr>
<td>请上传您的照片:</td>
</tr>
<tr>
<td> <input type="hidden" name="filepath" value="../Uploadfiles/PersonFile">
<input type="hidden" name="act" value="upload">
<input name="filename" style="font-family: 宋体; font-size: 12px" type="file" size="38">
</td>
</tr>
<tr>
<td> <input type="button" name="Submit22" value="删除照片"  onClick="location.href='?action=delphoto';">
<% If PhotoKeep = 0 Then %>
<input type="button" name="Submit2" value="屏蔽照片"  onClick="location.href='?action=keep&keepid=1';">
<% Else %>
<input type="button" name="Submit2" value="恢复照片"  onClick="location.href='?action=keep&keepid=0';">
<% End if %>
<input name="Send2" style="font-family: 宋体; font-size: 12px" type="submit" value="上传照片">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>上传说明<font color="#666666">:</font></td>
</tr>
<tr>
<td>所传照片一律为<font face="Verdana">JPG</font>、<font face="Verdana">JPEG</font>、或<font face="Verdana">GIF</font>格式
;</td>
</tr>
<tr>
<td><span style="font-family: 宋体; font-size: 12px">相片大小不能超过100K
; </span></td>
</tr>
<tr>
<td><span style="font-family: 宋体; font-size: 12px">照片应该处理成大小为135
x 160 像素 .</span></td>
</tr>
</table></td>
<td width="35%" height="170" align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="4"></td>
</tr>
<tr>
<td align="center">
<%
If PhotoKeep = 0 Then
If PhotoUrl <> Null or PhotoUrl <> "" Then
Response.write "<img src=""../UpLoadFiles/PersonFile/"&PhotoUrl&""" width=""135"" height=""160"">"
Else
Response.write "<img src=""../UpLoadFiles/DefaultFile/Person.gif"" width=""135"" height=""160"">"
End if
Else
Response.Write "照片被屏蔽"
End if
%>
</td>
</tr>
<tr>
<td height="4"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form action="?action=submit" name="edit" method="post" onSubmit="return edit_check();">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<td height="25" bgcolor="f5f5f5"><b><font color="#000000">&nbsp;专长/技能</font></b></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="18%" height="25" align="right"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 语言水平:</td>
<td width="82%" height="25">第一外语:
<select name="language_one" id="language_one" style="width:100px;">
<option  value="0">-请选择-</option>
<option  value="1" <% If Language_One = 1 Then Response.write "Selected" %>>英语</option>
<option  value="2" <% If Language_One = 2 Then Response.write "Selected" %>>日语</option>
<option  value="3" <% If Language_One = 3 Then Response.write "Selected" %>>法语</option>
<option  value="4" <% If Language_One = 4 Then Response.write "Selected" %>>德语</option>
<option  value="5" <% If Language_One = 5 Then Response.write "Selected" %>>阿拉伯语</option>
<option  value="6" <% If Language_One = 6 Then Response.write "Selected" %>>朝鲜语</option>
<option  value="7" <% If Language_One = 7 Then Response.write "Selected" %>>西班牙语</option>
<option  value="8" <% If Language_One = 8 Then Response.write "Selected" %>>俄语</option>
<option  value="9" <% If Language_One = 9 Then Response.write "Selected" %>>意大利语</option>
<option  value="10" <% If Language_One = 10 Then Response.write "Selected" %>>其他语言</option>
</select>
水平:
<input name="level_one" type="text" id="level_one" size="10" maxlength="10" value="<%= Tmp(5,0) %>"></td>
</tr>
<tr>
<td width="18%" height="25" align="right" bgcolor="f9f9f9">&nbsp;</td>
<td height="25" bgcolor="f9f9f9">第二外语:
<select name="language_two" id="language_two" style="width:100px;">
<option  value="0">-请选择-</option>
<option  value="1" <% If Language_Two = 1 Then Response.write "Selected" %>>英语</option>
<option  value="2" <% If Language_Two = 2 Then Response.write "Selected" %>>日语</option>
<option  value="3" <% If Language_Two = 3 Then Response.write "Selected" %>>法语</option>
<option  value="4" <% If Language_Two = 4 Then Response.write "Selected" %>>德语</option>
<option  value="5" <% If Language_Two = 5 Then Response.write "Selected" %>>阿拉伯语</option>
<option  value="6" <% If Language_Two = 6 Then Response.write "Selected" %>>朝鲜语</option>
<option  value="7" <% If Language_Two = 7 Then Response.write "Selected" %>>西班牙语</option>
<option  value="8" <% If Language_Two = 8 Then Response.write "Selected" %>>俄语</option>
<option  value="9" <% If Language_Two = 9 Then Response.write "Selected" %>>意大利语</option>
<option  value="10" <% If Language_Two = 10 Then Response.write "Selected" %>>其他语言</option>
</select>
水平:
<input name="level_two" type="text" id="level_two" size="10" maxlength="10" value="<%= Tmp(6,0) %>">
</td>
</tr>
<tr>
<td height="25" align="right">&nbsp;</td>
<td height="25">普 通 话:
<select name="mandarin" id="mandarin" style="width:100px;">
<option value="0">-请选择-</option>
<option value="4" <% If Mandarin = 4 Then Response.write "Selected" %>>标准</option>
<option value="3" <% If Mandarin = 3 Then Response.write "Selected" %>>一般</option>
<option value="2" <% If Mandarin = 2 Then Response.write "Selected" %>>较差</option>
<option value="1" <% If Mandarin = 1 Then Response.write "Selected" %>>差</option>
</select></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 计算机证书:</td>
<td height="25" bgcolor="f9f9f9">
<!--#include file="../Include/Class_Computer.asp" -->
</td>
</tr>
<tr>
<td height="25" align="right">计算机技能:</td>
<td height="25"><input name="computerother" type="text" id="computerother" maxlength="100" value="<%= Tmp(10,0) %>"  style="width:300px;">
相关技能/获得的其他证书</td>
</tr>
<tr>
<td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 技能关键字:</td>
<td height="25" bgcolor="f9f9f9"><input name="skill_key" type="text" id="skill_key" maxlength="100" value="<%= Tmp(8,0) %>"  style="width:300px;">
<FONT face=宋体>如:软件工程</FONT></td>
</tr>
<tr>
<td height="25" align="right"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 技能描述:</td>
<td height="25"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="310"> <textarea name="skill_memo" cols="45" rows="8" id="skill_memo" style="width:300px;"><%= Skill_Memo %></textarea></td>
<td>请详细并有重点地描述您的相关技能,请注明一些与您职业密切相关的关键字,如“企业管理5年经验”等
. </td>
</tr>
</table></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="40" align="center"> <input name="perid" type="hidden" id="perid" value="<%= Perid %>">
<input type="submit" name="Submit" value=" 保存附加信息数据 " style="height:35px;">
</td>
</tr>
</form>
</table></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="1" bgcolor="#eeeeee"></td>
</tr>
</table>
<!--#include file="../Include/Footer.asp" -->
</td>
</tr>
</table>

</body>
</html>
<%
Sub Submit()
Call Check_url()    '防止外部站点提交数据
'//提交数据
Perid                = Session("Person")(2)
Computer             = Replace_Text(Request.Form("Computer"))
Language_one         = Replace_Text(Request.Form("Language_one"))
Language_two         = Replace_Text(Request.Form("Language_two"))
Level_one            = Replace_Text(Request.Form("Level_one"))
Level_two            = Replace_Text(Request.Form("Level_two"))
Mandarin             = Replace_Text(Request.Form("Mandarin"))
Skill_key            = Replace_Text(Request.Form("Skill_key"))
Skill_Memo           = Replace_Text(Request.Form("Skill_Memo"))
ComputerOther        = Replace_Text(Request.Form("ComputerOther"))

If Skill_Memo<>"" Then Skill_Memo = Replace(Skill_Memo,Chr(13),"<br>")

SQL = "Update [pH_Person_Info] Set  Computer="&Computer&",Language_one="&Language_one&",Language_two="&Language_two&",Level_one='"&Level_one&"',Level_two='"&Level_two&"',Mandarin="&Mandarin&",Skill_key='"&Skill_key&"',Skill_Memo='"&Skill_Memo&"',ComputerOther='"&ComputerOther&"'  Where Perid='"&Perid&"'"
Conn.Execute(SQL)

'//更改最后修改时间
SQL = "Update [pH_Person_Base] Set LastUpdate_Time='"&Now()&"' Where Perid='"&Perid&"'"
Conn.Execute(SQL)

CloseDB
Response.redirect "Per_Addons.asp"
End Sub

Sub Keep_Submit()     '//屏蔽和恢复照片的函数
'Call Check_url()    '防止外部站点提交数据
'//提交数据
Perid                = Session("Person")(2)
Paramid              = Replace_Text(Request.QueryString("keepid"))

SQL = "Update [pH_Person_Info] Set PhotoKeep="&Paramid&" Where Perid='"&Perid&"'"
Conn.Execute(SQL)

'//更改最后修改时间
SQL = "Update [pH_Person_Base] Set LastUpdate_Time='"&Now()&"' Where Perid='"&Perid&"'"
Conn.Execute(SQL)

CloseDB
Response.redirect "Per_Addons.asp"
End Sub

Sub Del_Submit()      '//删除照片函数
'//提交数据
Perid                = Session("Person")(2)
Set Rs = Conn.Execute("Select PhotoUrl From [pH_Person_Info] Where Perid='"&Perid&"'")
If Rs(0) = Null or Rs(0) = "" Then
CloseRs
CloseDB
Response.redirect "Per_Addons.asp"
Else
'//删除图片文件
Set Fso = Server.createobject("Scripting.FileSystemObject")
If Fso.FileExists(Server.Mappath("../UpLoadFiles/PersonFile/"&Rs(0))) Then
Fso.DeleteFile(Server.Mappath("../UpLoadFiles/PersonFile/"&Rs(0)))
End if

SQL = "Update [pH_Person_Info] Set PhotoUrl=Null Where Perid='"&Perid&"'"
Conn.Execute(SQL)

'//更改最后修改时间
SQL = "Update [pH_Person_Base] Set LastUpdate_Time='"&Now()&"' Where Perid='"&Perid&"'"
Conn.Execute(SQL)

CloseRs
CloseDB
Response.redirect "Per_Addons.asp"
End if
End Sub
%>

⌨️ 快捷键说明

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