?? mymodify.asp
字號:
theKidney=split(KidneyType, ",")
for i = 0 to ubound(theKidney)
response.write "<input type=""checkbox"" name=""character"" value="""&trim(theKidney(i))&""" "
if instr(character,trim(theKidney(i)))>0 then '如果有此項性格
response.write "checked"
end if
response.write ">"&trim(theKidney(i))&" "
if ((i+1) mod 5)=0 then response.write "<br>" '每行顯示六個性格進行換行
next
%>
</td>
</tr>
<tr>
<td class=tablebody1><b>個人簡介: </b><br>
<textarea name=personal rows=6 cols=90% ><%=personal%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>國 家:</b>
<b>
<input type=text name=country size=18 value="<%=country%>">
</b> </td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>聯系電話:</b>
<b>
<input type=text name=userphone size=18 value="<%=userphone%>">
</b> </td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>通信地址:</b>
<b>
<input type=text name=address size=18 value="<%=address%>">
</b> </td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>省 份:</b>
<input type=text name=province size=18 value="<%=province%>">
</td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>城 市:
</b>
<input type=text name=city size=18 value="<%=city%>">
</td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>生 肖:
</b>
<select size=1 name=shengxiao>
<option <%if shengxiao="" then%>selected<%end if%>></option>
<option value=鼠 <%if shengxiao="鼠" then%>selected<%end if%>>鼠</option>
<option value=牛 <%if shengxiao="牛" then%>selected<%end if%>>牛</option>
<option value=虎 <%if shengxiao="虎" then%>selected<%end if%>>虎</option>
<option value=兔 <%if shengxiao="兔" then%>selected<%end if%>>兔</option>
<option value=龍 <%if shengxiao="龍" then%>selected<%end if%>>龍</option>
<option value=蛇 <%if shengxiao="蛇" then%>selected<%end if%>>蛇</option>
<option value=馬 <%if shengxiao="馬" then%>selected<%end if%>>馬</option>
<option value=羊 <%if shengxiao="羊" then%>selected<%end if%>>羊</option>
<option value=猴 <%if shengxiao="猴" then%>selected<%end if%>>猴</option>
<option value=雞 <%if shengxiao="雞" then%>selected<%end if%>>雞</option>
<option value=狗 <%if shengxiao="狗" then%>selected<%end if%>>狗</option>
<option value=豬 <%if shengxiao="豬" then%>selected<%end if%>>豬</option>
</select>
</td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>血 型:</b>
<select size=1 name=blood>
<option <%if blood="" then%>selected<%end if%>></option>
<option value=A <%if blood="A" then%>selected<%end if%>>A</option>
<option value=B <%if blood="B" then%>selected<%end if%>>B</option>
<option value=AB <%if blood="AB" then%>selected<%end if%>>AB</option>
<option value=O <%if blood="O" then%>selected<%end if%>>O</option>
<option value=其他 <%if blood="其他" then%>selected<%end if%>>其他</option>
</select>
</td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>信 仰:</b>
<select size=1 name=belief>
<option <%if belief="" then%>selected<%end if%>></option>
<option value=佛教 <%if belief="佛教" then%>selected<%end if%>>佛教</option>
<option value=道教 <%if belief="道教" then%>selected<%end if%>>道教</option>
<option value=基督教 <%if belief="基督教" then%>selected<%end if%>>基督教</option>
<option value=天主教 <%if belief="天主教" then%>selected<%end if%>>天主教</option>
<option value=回教 <%if belief="回教" then%>selected<%end if%>>回教</option>
<option value=無神論者 <%if belief="無神論者" then%>selected<%end if%>>無神論者</option>
<option value=共產主義者 <%if belief="共產主義者" then%>selected<%end if%>>共產主義者</option>
<option value=其他 <%if belief="其他" then%>selected<%end if%>>其他</option>
</select></td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>職 業: </b>
<select name=occupation>
<option <%if occupation="" then%>selected<%end if%>> </option>
<option value="財會/金融" <%if occupation="財會/金融" then%>selected<%end if%>>財會/金融</option>
<option value=工程師 <%if occupation="工程師" then%>selected<%end if%>>工程師</option>
<option value=顧問 <%if occupation="顧問" then%>selected<%end if%>>顧問</option>
<option value=計算機相關行業 <%if occupation="計算機相關行業" then%>selected<%end if%>>計算機相關行業</option>
<option value=家庭主婦 <%if occupation="家庭主婦" then%>selected<%end if%>>家庭主婦</option>
<option value="教育/培訓" <%if occupation="教育/培訓" then%>selected<%end if%>>教育/培訓</option>
<option value="客戶服務/支持" <%if occupation="客戶服務/支持" then%>selected<%end if%>>客戶服務/支持</option>
<option value="零售商/手工工人" <%if occupation="零售商/手工工人" then%>selected<%end if%>>零售商/手工工人</option>
<option value=退休 <%if occupation="退休" then%>selected<%end if%>>退休</option>
<option value=無職業 <%if occupation="無職業" then%>selected<%end if%>>無職業</option>
<option value="銷售/市場/廣告" <%if occupation="銷售/市場/廣告" then%>selected<%end if%>>銷售/市場/廣告</option>
<option value=學生 <%if occupation="學生" then%>selected<%end if%>>學生</option>
<option value=研究和開發 <%if occupation="研究和開發" then%>selected<%end if%>>研究和開發</option>
<option value="一般管理/監督" <%if occupation="一般管理/監督" then%>selected<%end if%>>一般管理/監督</option>
<option value="政府/軍隊" <%if occupation="政府/軍隊" then%>selected<%end if%>>政府/軍隊</option>
<option value="執行官/高級管理" <%if occupation="執行官/高級管理" then%>selected<%end if%>>執行官/高級管理</option>
<option value="制造/生產/操作" <%if occupation="制造/生產/操作" then%>selected<%end if%>>制造/生產/操作</option>
<option value=專業人員 <%if occupation="專業人員" then%>selected<%end if%>>專業人員</option>
<option value="自雇/業主" <%if occupation="自雇/業主" then%>selected<%end if%>>自雇/業主</option>
<option value=其他 <%if occupation="其他" then%>selected<%end if%>>其他</option>
</select></td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>婚姻狀況:</b>
<select size=1 name=marital>
<option <%if marital="" then%>selected<%end if%>></option>
<option value=未婚 <%if marital="未婚" then%>selected<%end if%>>未婚</option>
<option value=已婚 <%if marital="已婚" then%>selected<%end if%>>已婚</option>
<option value=離異 <%if marital="離異" then%>selected<%end if%>>離異</option>
<option value=喪偶 <%if marital="喪偶" then%>selected<%end if%>>喪偶</option>
</select></td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>最高學歷:</b>
<select size=1 name=education>
<option <%if education="" then%>selected<%end if%>></option>
<option value=小學 <%if education="小學" then%>selected<%end if%>>小學</option>
<option value=初中 <%if education="初中" then%>selected<%end if%>>初中</option>
<option value=高中 <%if education="高中" then%>selected<%end if%>>高中</option>
<option value=大學 <%if education="大學" then%>selected<%end if%>>大學</option>
<option value=碩士 <%if education="碩士" then%>selected<%end if%>>碩士</option>
<option value=博士 <%if education="博士" then%>selected<%end if%>>博士</option>
</select></td>
</tr>
<tr>
<td valign=top width=40% class=tablebody1> <b>畢業院校:</b>
<input type=text name=college size=18 value="<%=college%>"></td>
</tr>
<tr align="center">
<td colspan="2" width="100%" class=tablebody2>
<input type=Submit value="更 新" name="Submit"> <input type="reset" name="Submit2" value="清 除">
</td>
</tr>
</table></form>
</body>
</html>
<%
end if
rs.close
set rs=nothing
end sub
sub update()
dim CanUseTitle,CanUseTitle1,CanUseTitle2
Dim SplitUserTitle
CanUseTitle=false
CanUseTitle1=false
CanUseTitle2=false
if request("sex")="" then
errmsg=errmsg+"<br>"+"<li>請選擇您的性別。"
founderr=true
elseif request("sex")=0 or request("sex")=1 then
sex=request("sex")
else
errmsg=errmsg+"<br>"+"<li>您輸入的字符非法。"
founderr=true
end if
if request("showRe")="" then
errmsg=errmsg+"<br>"+"<li>請選擇有回帖時是否提示您。"
founderr=true
elseif request("showRe")=0 or request("showRe")=1 then
showRe=request("showRe")
else
errmsg=errmsg+"<br>"+"<li>您輸入的字符非法。"
founderr=true
end if
if request("myface")<>"" and ((Cint(forum_setting(54))>0 and myarticle>Cint(forum_setting(54))) or Cint(forum_setting(54))=0) then
if request("width")="" or request("height")="" then
errmsg=errmsg+"<br>"+"<li>請輸入圖片的寬度和高度。"
founderr=true
elseif not isInteger(request("width")) or not isInteger(request("height")) then
errmsg=errmsg+"<br>"+"<li>您輸入的字符不合法。"
founderr=true
elseif Cint(request("width"))>Cint(forum_setting(57)) then
errmsg=errmsg+"<br>"+"<li>您輸入的圖片寬度不符合標準。"
founderr=true
elseif Cint(request("height"))>Cint(forum_setting(57)) then
errmsg=errmsg+"<br>"+"<li>您輸入的圖片高度不符合標準。"
founderr=true
else
if Cint(forum_setting(55))=0 then
if instr(lcase(request("myface")),"http://")>0 or instr(lcase(request("myface")),"www.")>0 then
errmsg=errmsg+"<br>"+"<li>本論壇設置了不允許連接外部網址做頭像。"
founderr=true
end if
end if
face=request("myface")
width=request("width")
height=request("height")
end if
else
if request("face")="" then
errmsg=errmsg+"<br>"+"<li>請選擇您的個性頭像。"
founderr=true
else
face=request("face")
end if
end if
if width="" or height="" then
width=forum_setting(38)
height=forum_setting(39)
end if
if strLength(request("Signature"))>250 then
errmsg=errmsg+"<br>"+"<li>簽名只能在250個字符以內。"
founderr=true
end if
if request.Form("birthyear")="" or request.form("birthmonth")="" or request.form("birthday")="" then
birthday=""
else
birthday=trim(Request.Form("birthyear"))&"-"&trim(Request.Form("birthmonth"))&"-"&trim(Request.Form("birthday"))
if not isdate(birthday) then birthday=""
end if
dim userinfo,usersetting
userinfo=checkreal(request.Form("realname")) & "|||" & checkreal(request.Form("character")) & "|||" & checkreal(request.Form("personal")) & "|||" & checkreal(request.Form("country")) & "|||" & checkreal(request.Form("province")) & "|||" & checkreal(request.Form("city")) & "|||" & request.Form("shengxiao") & "|||" & request.Form("blood") & "|||" & request.Form("belief") & "|||" & request.Form("occupation") & "|||" & request.Form("marital") & "|||" & request.Form("education") & "|||" & checkreal(request.Form("college")) & "|||" & checkreal(request.Form("userphone")) & "|||" & checkreal(request.Form("address"))
usersetting=request.Form("setuserinfo") & "|||" & request.Form("setusertrue")
set rs=server.createobject("adodb.recordset")
sql="Select * from [User] where userid="&userid
rs.open sql,conn,1,3
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>該用戶名不存在。"
founderr=true
else
rs("face")=face
rs("width")=width
rs("height")=height
rs("sex")=sex
rs("sign")=trim(request("Signature"))
rs("userphoto")=request("userphoto")
rs("showRe")=showRe
rs("UserGroup")=request("groupname")
'判斷是否允許提交頭銜
if Cint(Forum_Setting(6))=1 then
CanUseTitle=true
end if
if CanUseTitle and Cint(forum_setting(60))>0 and rs("article")>Cint(forum_setting(60)) then
CanUseTitle1=true
elseif CanUseTitle and Cint(forum_setting(60))=0 then
CanUseTitle1=true
else
CanUseTitle1=false
end if
if CanUseTitle and Cint(forum_setting(61))>0 and DateDiff("d",rs("AddDate"),Now())>Cint(forum_setting(61)) then
CanUseTitle2=true
elseif CanUseTitle and Cint(forum_setting(61))=0 then
CanUseTitle2=true
else
CanUseTitle2=false
end if
if CanUseTitle and Cint(forum_setting(62))=1 then
if CanUseTitle1 and CanUseTitle2 then
CanUseTitle=true
else
CanUseTitle=false
end if
elseif CanUseTitle and (CanUseTitle1 or CanUseTitle2) then
CanUseTitle=true
else
CanUseTitle=false
end if
if request("title")<>"" and CanUseTitle then
if trim(forum_setting(63))<>"" then
SplitUserTitle=split(forum_setting(63),"|")
for i=0 to ubound(SplitUserTitle)
if instr(lcase(request("title")),lcase(SplitUserTitle(i)))>0 then
Errmsg=Errmsg + "<br>" + "<li>您設定的頭銜中包含了系統禁止使用的字符"
FoundErr=true
exit sub
end if
next
end if
if len(request("title"))>Cint(forum_setting(59)) then
Errmsg=Errmsg + "<br>" + "<li>您設置的頭銜超過了本論壇允許的長度,頭銜最大長度為"&forum_setting(59)&"字節。"
FoundErr=true
exit sub
end if
rs("title")=htmlencode(request("title"))
end if
if birthday<>"" then
rs("birthday")=birthday
end if
rs("userinfo")=userinfo
rs("usersetting")=usersetting
rs("bbstype")=request("bbstype")
rs.Update
usercookies=request("usercookies")
select case usercookies
case 0
Response.Cookies("aspsky")("usercookies") = usercookies
case 1
Response.Cookies("aspsky").Expires=Date+1
Response.Cookies("aspsky")("usercookies") = usercookies
case 2
Response.Cookies("aspsky").Expires=Date+31
Response.Cookies("aspsky")("usercookies") = usercookies
case 3
Response.Cookies("aspsky").Expires=Date+365
Response.Cookies("aspsky")("usercookies") = usercookies
end select
Response.Cookies("aspsky")("tempid") = request("bbstype")
Response.Cookies("aspsky").path=cookiepath
end if
rs.close
set rs=nothing
'******************
'對上傳頭象進行過濾與改名
if Cint(Forum_Setting(7))=1 then
on error resume next
dim objFSO,upfilename,newfilename
dim upface,memberid
set rs=conn.execute("select userid,face from [user] where userid="&userid)
memberid=rs(0)
upface=trim(rs(1))
newfilename=""
upfilename=split(upface,"/")
if ubound(upfilename)=1 and upfilename(0)="uploadFace" then
if instr(upfilename(1),"_")=0 then
newfilename="uploadFace/"&memberid&"_"&upfilename(1)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.fileExists(Server.MapPath(upface)) then
objFSO.movefile ""&Server.MapPath(upface)&"",""&Server.MapPath(newfilename)&""
end if
if objFSO.fileExists(Server.MapPath(newfilename)) then
conn.execute("update [user] set face='"&newfilename&"' where userid="&userid)
end if
set objFSO=nothing
end if
end if
rs.close
set rs=nothing
end if
'對上傳頭象進行過濾與改名結束
'****************
end sub
function checkreal(v)
dim w
if not isnull(v) then
w=replace(v,"|||","§§§")
checkreal=w
end if
end function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -