📄 user_photo.asp
字号:
<option value="2" <%if Stars=2 then response.write " selected"%>>★★</option>
<option value="1" <%if Stars=1 then response.write " selected"%>>★</option>
<option value="0" <%if Stars=0 then response.write " selected"%>>无</option>
</select> <font color="#FF0000">*</font></td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>查看次数:</strong></td>
<td colspan="2">本日:
<input name="DayHits" type="text" id="DayHits" value="<%=DayHits%>" size="10" maxlength="10" />
本周:
<input name="WeekHits" type="text" id="WeekHits" value="<%=WeekHits%>" size="10" maxlength="10" />
本月:
<input name="MonthHits" type="text" id="MonthHits" value="<%=MonthHits%>" size="10" maxlength="10" />
总计:
<input name="Hits" type="text" id="Hits" value="<%=Hits%>" size="10" maxlength="10" /></td>
</tr>
<tr class="tdbg"<%=CheckUse("4",Cl.Channel.selectSingleNode("@disableitem").text)%>>
<td width="100" align="right"><strong>查看等级:</strong></td>
<td colspan="2">
<input name="InfoGroup" type="hidden" id="InfoGroup" value="<%=InfoGroup%>" />
<input name="InfoGroupView" type="text" id="InfoGroupView" value="<%=Cl.GetUserGroupName(InfoGroup)%>" size="80" onclick="SelectUserGroup('InfoGroup');" readonly="Readonly" />
<input type="checkbox" name="GetClassPurview" id="GetClassPurview" value="yes" onclick="document.myform.InfoGroupView.disabled=this.checked" />
继承栏目权限<br /><font color="#0066cc">只有具有相应权限的人才能查看此<%=Cl.ChannelItemName%>。</font></td>
</tr>
<tr class="tdbg"<%=CheckUse("5",Cl.Channel.selectSingleNode("@disableitem").text)%>>
<td width="100" align="right"><strong>查看<%=Cl.Web_Setting(28)%>:</strong></td>
<td colspan="2"><input name="InfoPoint" type="text" id="InfoPoint" value="<%=InfoPoint%>" size="8" maxlength="5" />
<%=Cl.Web_Setting(29)%>
<font color="#0000FF">如果大于0,则用户查看此图片时将消耗相应<%=Cl.Web_Setting(28)%>。(对游客无效)</font></td>
</tr>
<tr class="tdbg"<%=CheckUse("6",Cl.Channel.selectSingleNode("@disableitem").text)%>>
<td width="100" align="right"><strong>查看<%=Cl.Web_Setting(26)%>:</strong></td>
<td colspan="2"><input name="InfoMoney" type="text" id="InfoMoney" value="<%=InfoMoney%>" size="8" maxlength="5" />
<%=Cl.Web_Setting(27)%>
<font color="#0000FF">如果大于0,则用户查看此图片时将消耗相应<%=Cl.Web_Setting(26)%>。(对游客无效)</font></td>
</tr>
<tr class="tdbg"<%=CheckUse("7",Cl.Channel.selectSingleNode("@disableitem").text)%>>
<td width="100" align="right"><strong>回扣设置:</strong></td>
<td colspan="2">
<%=Cl.Web_Setting(28)%>:<input name="BackPoint" type="text" id="BackPoint" value="<%=BackPoint%>" size="5" maxlength="3" style="text-align: right;" />
<%=Cl.Web_Setting(29)%>+<%=Cl.Web_Setting(28)%>的<input name="BackPointRate" type="text" id="BackPointRate" value="<%=BackPointRate%>" size="5" maxlength="2" style="text-align: right;" />
%<br />
<%=Cl.Web_Setting(26)%>:<input name="BackMoney" type="text" id="BackMoney" value="<%=BackMoney%>" size="5" maxlength="3" style="text-align: right;" />
<%=Cl.Web_Setting(27)%>+<%=Cl.Web_Setting(26)%>的<input name="BackMoneyRate" type="text" id="BackMoneyRate" value="<%=BackMoneyRate%>" size="5" maxlength="2" style="text-align: right;" />
%<br /><font color="#0000FF">即当用户游览或下载此内容时,给予一定的回扣给添加者!</font>
</td>
</tr>
<tr class="tdbg"<%=CheckUse("8",Cl.Channel.selectSingleNode("@disableitem").text)%>>
<td width="100" align="right"><strong>录入时间:</strong></td>
<td colspan="2"><input name="UpdateTime" type="text" id="UpdateTime" value="<%=UpdateTime%>" maxlength="50" />
<font color="blue"><--【<a href='javascript:ToValue("","UpdateTime","<%=now%>")'>设为当前时间</a>】</font><br />
时间格式为“年-月-日 时:分:秒”,如:<font color="#0066cc"><%=Now%></font></td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>立即发布:</strong></td>
<td colspan="2"><input name="Passed" type="checkbox" id="Passed" value="yes" <%if Status=1 then response.write " checked"%> />
是<font color="#0000FF">(如果选中的话将直接发布,否则审核后才能发布。)</font>
<input name="NowCreate" type="checkbox" value="yes" checked="checked" />
立即生成</td>
</tr>-->
</table>
<div align="center">
<p>
<input name="ChannelID" type="hidden" id="ChannelID" value="<%=ChannelID%>" />
<input name="Action" type="hidden" id="Action" value="Save<%=Action%>" />
<%if Action="Modify" then%>
<input name="InfoID" type="hidden" id="InfoID" value="<%=InfoID%>" />
<input name="Save" type="submit" id="Save" value="保存修改结果" style="cursor:hand;" />
<!--
<input name="Add" type="submit" id="Add" value="添加为新<%=Cl.ChannelItemName%>" onClick="document.myform.Action.value='SaveAdd';" style="cursor:hand;" />-->
<%else%>
<input name="Add" type="submit" id="Add" value=" 添 加 " style="cursor:hand;" />
<!--<script type="text/javascript">
$("InfoGroupView").disabled=true;
$("GetClassPurview").checked=true;
</script>-->
<%end if%>
<input name="Cancel" type="button" id="Cancel" value=" 取 消 " onclick="history.go(-1)" style="cursor:hand;" />
</p>
</div>
</form>
<%
End Sub
Sub DoSaveRecord()
FoundErr = False
InfoID = Cl.GetClng(request.Form("InfoID"))
ClassID = Cl.GetClng(request.form("ClassID"))
SpecialID = Trim(request.Form("SpecialID"))
PhotoName = Trim(request.form("PhotoName"))
FontColor = Trim(request.form("FontColor"))
FontType = Cl.GetClng(request.form("FontType"))
Keyword = Trim(request.form("Keyword"))
Author = Trim(request.form("Author"))
AuthorEmail = Trim(request.form("AuthorEmail"))
AuthorHomepage = Trim(request.form("AuthorHomePage"))
PicUrl = Trim(request.form("PicUrl"))
PhotoUrl = Trim(request.form("PhotoUrls"))
Intro = Trim(request.form("Intro"))
OnTop = Trim(request.form("OnTop"))
Hot = Trim(request.form("Hot"))
Elite = Trim(request.form("Elite"))
Stars = Cl.GetClng(request.form("Stars"))
Hits = Cl.GetClng(request.form("Hits"))
DayHits = Cl.GetClng(request.form("DayHits"))
WeekHits = Cl.GetClng(request.form("WeekHits"))
MonthHits = Cl.GetClng(request.form("MonthHits"))
InfoGroup = Trim(request.form("InfoGroup"))
InfoPoint = Cl.GetClng(request.form("InfoPoint"))
InfoMoney = Cl.GetClng(request.form("InfoMoney"))
BackPoint = Cl.GetClng(request.form("BackPoint"))
BackPointRate = Cl.GetClng(request.form("BackPointRate"))
BackMoney = Cl.GetClng(request.form("BackMoney"))
BackMoneyRate = Cl.GetClng(request.form("BackMoneyRate"))
UpdateTime = Trim(request.form("UpdateTime"))
Passed = Trim(request.form("Passed"))
IsDownLoad = Trim(request.form("IsDownLoad"))
NowCreate = Trim(request.form("NowCreate"))
UploadFiles = Trim(request.form("UploadFiles"))
Editor = Cl.MemberName
if ClassID<=0 then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>指定了非法的栏目(外部栏目或不存在的栏目)</li>"
end if
if PhotoName="" then
founderr=true
errmsg=ErrMsg & "<br /><li>图片名称不能为空</li>"
end if
if Keyword="" then
founderr=true
errmsg=errmsg & "<br /><li>请输入图片关键字</li>"
end if
if PicUrl="" then
founderr=true
errmsg=ErrMsg & "<br /><li>缩略图地址不能为空</li>"
end if
if PhotoUrl="" then
founderr=true
errmsg=errmsg & "<br /><li>图片地址不能为空</li>"
end if
if FoundErr=True then Cl.ShowErr(ErrMsg)
set tClass=Cl.Execute("select ClassName,Depth,ParentID,ParentPath,Child,ClassMaster,BrowsePurview,DisabledAdd,AddPoint,AddIsChk,MaxLimit,IsOuter From Cl_Class where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>找不到指定的栏目</li>"
else
if tClass(11)=1 then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>不能指定外部栏目</li>"
elseif tClass(7)<>0 then
FoundErr=True
ErrMsg=ErrMsg & "<br /><li>对不起,此栏目禁止添加资料</li>"
else
ClassName = tClass(0) : Depth = tClass(1)
ParentID = tClass(2) : ParentPath= tClass(3)
Child = tClass(4) : ClassMaster= tClass(5)
sAddPoint = tClass(8) : sAddIsChk = tClass(9)
sMaxLimit = tClass(10)
if request("GetClassPurview")="yes" then InfoGroup="5"
end if
end if
tClass.Close :Set tClass=Nothing
if Intro="" then
Intro="暂无简介"
else
if Cl.strLength(Intro)>sMaxLimit and sMaxLimit<>0 then
founderr=true
errmsg=errmsg & "<br /><li>简介内容大小超过了最大限制("&sMaxLimit&" 字节!)</li>"
end if
if Trim(Cl.Web_Setting(9))="Yes" then
Intro=Cl.DeCode(Intro,Trim(Cl.Web_Setting(10)))
end if
end if
if FoundErr=True then Cl.ShowErr(ErrMsg)
dim sTempP
IsTruePurview = False
IsTruePurview_P = False
if Cl.TrueChannelPurview_U(2,ChannelID) then
IsTruePurview = True
IsTruePurview_P = True
else
sTempP=Split(ParentPath & "," & ClassID,",")
for i=1 to Ubound(sTempP)
IsTruePurview = Cl.TrueClassPurview_U(3,ChannelID,sTempP(i))
if IsTruePurview Then Exit For
Next
for i=1 to Ubound(sTempP)
IsTruePurview_P = Cl.TrueClassPurview_U(2,ChannelID,sTempP(i))
if IsTruePurview_P Then Exit For
Next
end if
if Not IsTruePurview then
Cl.ShowErr("<br /><li>您无权在此栏目下添加或修改资料。</li>")
end if
if SpecialID="" Or SpecialID="0" then
SpecialID="0"
else
SpecialID=Replace(SpecialID," ","")
if Len(SpecialID)>250 then
Dim TempStr,SpecialStr
TempStr=Split(SpecialID,",")
For i=0 to Ubound(TempStr)
if TempStr(i)<>"" then SpecialStr=SpecialStr & "," & TempStr(i)
if Len(SpecialStr)>=230 then Exit For
Next
SpecialID=SpecialStr & ","
else
SpecialID=","&SpecialID&","
End If
SpecialID=Replace(SpecialID,",0,",",")
end if
Keyword=Cl.ReplaceBadChar(Keyword)
Keyword=Replace(Keyword,"||","|")
if Left(Keyword,1)="|" then Keyword=Right(Keyword,Len(Keyword)-1)
if Right(Keyword,1)="|" then Keyword=Left(Keyword,Len(Keyword)-1)
if UpdateTime<>"" and IsDate(UpdateTime)=true then
UpdateTime=CDate(UpdateTime)
else
UpdateTime=now()
end if
InfoGroup=Replace(InfoGroup," ","")
if Not IsNumeric(Replace(InfoGroup,",","")) then InfoGroup="5"
if OnTop="yes" then OnTop=True else OnTop=False end if
if Hot="yes" then Hot=True else Hot=False end if
if Elite="yes" then Elite=True else Elite=False end if
if IsDownLoad="yes" then IsDownLoad=True else IsDownLoad=False
if Passed="yes" then Passed=True else Passed=False end If
PhotoName = Server.HtmlEnCode(PhotoName)
Keyword = Server.HtmlEnCode(Keyword)
If FontColor<>"" Then FontColor = Server.HtmlEnCode(FontColor)
If Author<>"" Then Author = Server.HtmlEnCode(Author)
If AuthorEmail<>"" Then AuthorEmail = Server.HtmlEnCode(AuthorEmail)
If AuthorHomepage<>"" Then AuthorHomepage = Server.HtmlEnCode(AuthorHomepage)
If PicUrl<>"" Then PicUrl = Server.HtmlEnCode(PicUrl)
set rs=server.createobject("adodb.recordset")
if Action="SaveAdd" then
Dim MaxTID
MaxTID=Cl.Execute("select max(InfoID) from Cl_Photo")(0)
if isnull(MaxTID) or Not IsNumeric(MaxTID) then MaxTID=0
InfoID=MaxTID+1
sql="select Top 1 * from Cl_Photo"
OpenConn : rs.open sql,Conn,1,3
rs.addnew
rs("InfoID")=InfoID
rs("ChannelID")=ChannelID
call SaveData()
rs("Editor")=Editor
rs.update
elseif Action="SaveModify" then
if InfoID=0 then
Cl.ShowErr("<br /><li>不能确定InfoID的值</li>")
else
sql="select * from Cl_Photo where InfoID=" & InfoID
OpenConn : rs.open sql,Conn,1,3
if rs.bof and rs.eof then
rs.close : set rs=Nothing
Cl.ShowErr("<br /><li>找不到此图片,可能已经被其他人删除。</li>")
else
Editor = Rs("Editor")
if rs("Status")=1 then
Cl.Execute_U("update " & Db.UserTable & " set " & Db.UserPoint & "=" & Db.UserPoint & "-"&sAddPoint&"," & Db.DataCount & "=" & Db.DataCount & "-1 where " & Db.UserName & "='" & Editor & "'")
end if
call SaveData()
rs.update
end if
end if
elseif Action="SaveAddMore" then
SaveAddMore : Exit Sub
else
Cl.ShowErr("<br /><li>参数错误!</li>")
end if
rs.close : set rs=Nothing
Cl.ChkUploadFile InfoID,PicUrl & PhotoUrl & Intro,UploadFiles
Cl.SaveAdminLog
Rem 用Cookies保存用户最后录入的资料信息
Response.Cookies("Photo")("ClassID") = ClassID
Response.Cookies("Photo")("SpecialID") = SpecialID
Response.Cookies("Photo")("Prefixion") = Prefixion
Response.Cookies("Photo")("FontColor") = FontColor
Response.Cookies("Photo")("FontType") = FontType
Response.Cookies("Photo")("Keyword") = Keyword
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -