📄 admin.asp
字号:
</div>
</body>
</html>
<%
end if
if request("admin") = "item" Then
lid=request("id")
if isnumeric(lid)=false then
response.write "<script>alert('参数错误,关闭窗口!');window.opener=null;window.close();</script>"
response.end
end if
sql="select * from item where id=cint('"&lid&"')"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
if not rs.eof then
rs.delete
rs.update
response.write "<script language=javascript>alert('删除成功!');this.top.location.href='javascript:history.back(-1)';</script>';"
end if
end if
if request("admin")="edit" Then
lid=request("id")
if isnumeric(lid)=false then
response.write "<script>alert('参数错误,关闭窗口!');window.opener=null;window.close();</script>"
response.end
end if
sql="select * from data where id=cint('"&lid&"')"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
'\\\\\\\\\\\\\\\\\\\\\\\\
yesorno=HtmlEncode(Trim(request.form("yesorno")))
markk=HtmlEncode(Trim(request.form("markk")))
showname=HtmlEncode(Trim(request.form("showname")))
showitem=HtmlEncode(Trim(request.form("showitem")))
showtype=HtmlEncode(Trim(request.form("showtype")))
showaddress1=HtmlEncode(Trim(request.form("showaddress1")))
showaddress2=HtmlEncode(Trim(request.form("showaddress2")))
showaddress3=HtmlEncode(Trim(request.form("showaddress3")))
showaddress4=HtmlEncode(Trim(request.form("showaddress4")))
showaddress5=HtmlEncode(Trim(request.form("showaddress5")))
'\\\\\\\\\\\\\\\\\\\\\\\\
if yesorno<>"" then
sql="select * from data where id=cint('"&lid&"')"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
'\\\\\\\\\\\\\\\\\\\\\\\\
rs("yesno")=yesorno
rs("mark")=markk
rs("name")=showname
rs("item")=showitem
rs("type")=showtype
rs("address1")=showaddress1
rs("address2")=showaddress2
rs("address3")=showaddress3
rs("address4")=showaddress4
rs("address5")=showaddress5
'\\\\\\\\\\\\\\\\\\\\\\\\
rs.update
response.write "<script language=javascript>alert('修改成功!');this.top.location.href='javascript:history.back(-1)';</script>';"
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<noscript><iframe src=*.asp></iframe></noscript>
<title><%=webname%> - 修改频道信息</title>
</head>
<body>
<div align="center">
<input type=button value="添加栏目" onClick="window.location.href='?admin=Tjlm'">
<input type=button value="栏目管理" onClick="window.location.href='?admin=lmgl'">
<input type=button value="添加播放器" onClick="window.location.href='?admin=Tjplay'">
<input type=button value="播放器管理" onClick="window.location.href='?admin=playgl'">
<input type=button value="网站设置" onClick="window.location.href='?admin=web'">
<input type=button value="修改密码" onClick="window.location.href='?admin=pass'">
<input type=button value="添加影片" onClick="window.location.href='?admin=add'">
<form action="" method="post" name="postart" onSubmit="return checkadd()">
<table border="0" width="500" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="30">
<p align="center"><b>本频道显示状态:</b><% if rs("yesno")="1" then %><font color="#008000">显示</font><% end if %><% if rs("yesno")="0" then %><font color="#FF0000">隐藏</font><% end if %>
</td>
</tr>
<tr>
<td width="34%" align="right" height="22">状态设置:</td>
<td width="66%" height="22"><select size="1" name="yesorno">
<% if rs("yesno")="0" then %>
<option value="0" selected>隐藏</option>
<option value="1">显示</option>
<% end if %>
<% if rs("yesno")="1" then %>
<option value="1" selected>显示</option>
<option value="0">隐藏</option>
<% end if %>
</select></td>
</tr>
<tr>
<td width="34%" align="right" height="8">显示名称:</td>
<td width="66%" height="8"><input type="text" name="showname" size="20" value="<%=rs("name")%>" maxlength="50"></td>
</tr>
<tr>
<td width="34%" align="right" height="8">频道类型:</td>
<td width="66%" height="8">
<select size="1" name="showitem">
<option value="<%=rs("item")%>" selected><%=rs("item")%></option>
<%
set rs_class = server.createobject("adodb.recordset")
sql = "select * from item"
rs_class.open sql,conn,1,1
do while not rs_class.eof
%>
<option value="<%=rs_class("name")%>"><%=rs_class("name")%></option>
<%
rs_class.movenext
loop
rs_class.close
%>
</select>
</td>
</tr>
<tr>
<td width="34%" align="right" height="8">密码设置:</td>
<td width="66%" height="8"><input type="text" name="markk" size="20" value="<%=rs("mark")%>" maxlength="50"> '不设置留空</td>
</tr>
<tr>
<td width="34%" align="right" height="23">播放格式:</td>
<td width="66%" height="23"><select size="1" name="showtype">
<option value="<%=rs("type")%>"><%=rs("type")%> 播放器</option>
<%
set rs_class = server.createobject("adodb.recordset")
sql = "select * from type"
rs_class.open sql,conn,1,1
do while not rs_class.eof
%>
<option value="<%=rs_class("name")%>"><%=rs_class("name")%></option>
<%
rs_class.movenext
loop
rs_class.close
%>
</select></td>
</tr>
<tr>
<td width="34%" align="right" height="10">第一集:</td>
<td width="66%" height="10"><input type="text" name="showaddress1" size="40" value="<%=rs("address1")%>"></td>
</tr>
<tr>
<td width="34%" align="right" height="11">第二集:</td>
<td width="66%" height="11"><input type="text" name="showaddress2" size="40" value="<%=rs("address2")%>"></td>
</tr>
<tr>
<td width="34%" align="right" height="9">第三集:</td>
<td width="66%" height="9"><input type="text" name="showaddress3" size="40" value="<%=rs("address3")%>"></td>
</tr>
<tr>
<td width="34%" align="right" height="6">第四集:</td>
<td width="66%" height="6"><input type="text" name="showaddress4" size="40" value="<%=rs("address4")%>"></td>
</tr>
<tr>
<td width="34%" align="right" height="13">第五集:</td>
<td width="66%" height="13"><input type="text" name="showaddress5" size="40" value="<%=rs("address5")%>"></td>
</tr>
<tr>
<td width="100%" align="right" colspan="2" height="30">
<p align="center"><input type="submit" value="确定" name="ok"> <input type="reset" value="取消" name="reset">
<input type="button" value="关闭" name="back" onClick="javascript:window.opener=null;window.close();"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<%
end if
if request("admin") = "add" Then
yesno="1"
showmark=Trim(request.form("showmark"))
showname=Trim(request.form("showname"))
showaddress1=Trim(request.form("showaddress1"))
showaddress2=Trim(request.form("showaddress2"))
showaddress3=Trim(request.form("showaddress3"))
showaddress4=Trim(request.form("showaddress4"))
showaddress5=Trim(request.form("showaddress5"))
showtype=Trim(request.form("showtype"))
showitem=Trim(request.form("showitem"))
if showname<>"" then
sql="select * from data"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew
rs("mark")=HtmlEncode(showmark)
rs("name")=HtmlEncode(showname)
rs("yesno")=HtmlEncode(yesno)
rs("address1")=HtmlEncode(showaddress1)
rs("address2")=HtmlEncode(showaddress2)
rs("address3")=HtmlEncode(showaddress3)
rs("address4")=HtmlEncode(showaddress4)
rs("address5")=HtmlEncode(showaddress5)
rs("type")=HtmlEncode(showtype)
rs("item")=HtmlEncode(showitem)
rs.update
Response.Write("<script language=javascript>alert('增加成功!');this.top.location.href='index.asp';</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<noscript><iframe src=*.asp></iframe></noscript>
<title><%=webname%> - 电视视频直播添加</title>
</head>
<SCRIPT language=javascript>
function check_input() {
if (document.domainlogin.showname.value == '') {
alert("请输入显示名称!");
document.domainlogin.showname.focus();
return false;
}
if (document.domainlogin.showaddress1.value == '') {
alert("第一集地址没有输入!");
document.domainlogin.showaddress1.focus();
return false;
}
return true;
}
//-->
</SCRIPT>
<div align="center">
<input type=button value="添加栏目" onClick="window.location.href='?admin=Tjlm'">
<input type=button value="栏目管理" onClick="window.location.href='?admin=lmgl'">
<input type=button value="添加播放器" onClick="window.location.href='?admin=Tjplay'">
<input type=button value="播放器管理" onClick="window.location.href='?admin=playgl'">
<input type=button value="网站设置" onClick="window.location.href='?admin=web'">
<input type=button value="修改密码" onClick="window.location.href='?admin=pass'">
<input type=button value="添加影片" onClick="window.location.href='?admin=add'">
<TABLE align=center bgColor=#1a2942 border=0 borderColorDark=#1a2942
cellPadding=4 cellSpacing=0 width=496>
<FORM name="domainlogin" onSubmit="return check_input();" action="" method="post">
<TBODY>
<TR align=middle>
<TD align=middle bgcolor=#1a2942 width="100%" height="252">
<TABLE bgColor=#eeeeee border=0 cellPadding=3 cellSpacing=1>
<TBODY>
<TR bgColor=#1a2942>
<TD align=right height=20 width="102"><B>显示名称:</B></TD>
<TD height=30><INPUT class=smallinput maxLength=50
name=showname size=30 id=showname> </TD></TR>
<TR bgColor=#1a2942>
<TD align=right height=20 width="102"><B>密码设置:</B></TD>
<TD height=30><INPUT class=smallinput maxLength=50
name=showmark size=20></TD>
</TR>
<TR bgColor=#1a2942>
<TD align=right height=16 width="102"><B>第一集:</B></TD>
<TD height=16><INPUT class=smallinput
name=showaddress1 size=40 id=showaddress1></TD>
</TR>
<tr>
<TD align=right height=6 width="102" bgcolor="#1a2942"><B>第二集:</B></TD>
<TD height=6 bgcolor="#1a2942"><INPUT class=smallinput
name=showaddress2 size=40></TD>
</tr>
<tr>
<TD align=right height=4 width="102" bgcolor="#1a2942"><B>第三集:</B></TD>
<TD height=4 bgcolor="#1a2942"><INPUT class=smallinput
name=showaddress3 size=40></TD>
</tr>
<tr>
<TD align=right height=9 width="102" bgcolor="#1a2942"><B>第四集:</B></TD>
<TD height=9 bgcolor="#1a2942"><INPUT class=smallinput
name=showaddress4 size=40></TD>
</tr>
<tr>
<TD align=right height=2 width="102" bgcolor="#1a2942"><B>第五集:</B></TD>
<TD height=2 bgcolor="#1a2942"><INPUT class=smallinput
name=showaddress5 size=40></TD>
</tr>
<TR bgColor=#1a2942>
<TD align=right height=20 width="102"><B>播放格式:</B></TD>
<TD>
<select size="1" name="showtype">
<%
set rs_class = server.createobject("adodb.recordset")
sql = "select * from type"
rs_class.open sql,conn,1,1
do while not rs_class.eof
%>
<option value="<%=rs_class("name")%>"><%=rs_class("name")%></option>
<%
rs_class.movenext
loop
rs_class.close
%>
</select>
</TD></TR>
<TR bgColor=#1a2942>
<TD align=right height=20 vAlign=top width="102"><B>频道类型:</B></TD>
<TD><select size="1" name="showitem">
<%
set rs_class = server.createobject("adodb.recordset")
sql = "select * from item"
rs_class.open sql,conn,1,1
do while not rs_class.eof
%>
<option value="<%=rs_class("name")%>"><%=rs_class("name")%></option>
<%
rs_class.movenext
loop
rs_class.close
%>
</select></TD></TR>
<TR bgColor=#1a2942>
<TD align=right height=20 vAlign=top width="102"> </TD>
<TD><INPUT name=submit type=submit value="添加"> <INPUT name=again type=reset value="重填"></TD></TR></TABLE></TD></TR></FORM></TBODY></TABLE>
</div>
</body>
</html>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -