<%
'程序名称：千纸鹤网站管理系统
'程序作者：千纸鹤
'作者邮箱：qzhxxw@sina.com
'作者 Q Q：138999501
'作者电话：0000000000
'官方主页：http://www.qqzzhh.com/
'官方论坛：http://www.qqzzhh.com/bbs
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<%
call hacker()
if session("superlogin")<>yecao then
response.Write "<script>alert('您还没有登陆！');this.location.href='index.asp';</script>"
Response.End
end if
if session("superadmin")<>"admin" then
response.Write "<script>alert('\n错误提示：您的权限不足！\n\n您不是超级管理员！');this.location.href='index.asp';</script>"
Response.End
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
<script src=img/adminjs.js></script></head>
<body <%if request("action")="editother" then%>onload="return cc();"<%end if%>>
<table align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d  id=upother style="position:absolute;left:270;top:40;display:none">
<tr onmousedown="MDown(upother)" style="cursor:move" height=22><td colspan="2" class=uptitle><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;上传频道文件</b>
<img onclick="document.all.upother.style.display=(document.all.upother.style.display=='none')?'':'none'" style="position:absolute;right:2;top:5;cursor:hand" border="0" src="img/adminclose.gif" align=absMiddle></td></tr>
<tr class=bg>
<td align=center height=30><iframe frameborder=0 width=290 height=35 scrolling=no src="up.asp?action=other"></iframe>
</td>
</tr>
</table>
<%
Select case request("action")
case ""
call other()
case "newother"
%>
<script language="javascript">
function chk(){
document.all("content").value=IframeID.document.body.innerHTML;
if(document.form.title.value==""){
alert("频道标题不能为空");
document.form.title.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("频道内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=newotherok">
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d>
<tr class="title"  height="22"><td><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;发布频道</b></td></tr>	
<tr class=bg height="25"><td>&nbsp;频道标题：<input name="title" type="text" id="title" size="20" class=yecao style="width:120px">&nbsp;<button onclick="document.all.upother.style.display=(document.all.upother.style.display=='none')?'':'none'" class=button>上传频道文件</button></td></tr>
<tr><td><%call html()%></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td  align="center">
<input name="new" type="submit" class="adminbutton" id="new" value="发 布">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr>
<textarea name="content" cols="50" rows="50" id="content" style="display:none"></textarea>
</table> 
</form><%
case "editother"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_other where id="&request.QueryString("id")
rs.open sql,conn,1,1%>
<script language="javascript">
function cc(){
IframeID.document.body.innerHTML=document.all("content").value;
document.all("content").value="";
}
function chk(){
document.all("content").value=IframeID.document.body.innerHTML;
if(document.form.title.value==""){
alert("频道标题不能为空");
document.form.title.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("频道内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=editotherok">
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22"  class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;修改频道</b></td></tr>
<tr class=bg height=25><td>&nbsp;标&nbsp;题：<input name="title" type="text" id="title" value="<%=rs("title")%>" size="20" class=yecao style="width:120px">&nbsp;<button onclick="document.all.upother.style.display=(document.all.upother.style.display=='none')?'':'none'" class=button>重新上传频道文件</button></td></tr>
<tr><td height="30" colspan=2><%call html()%></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td align="center">
<input name="id" type="hidden"  value="<%=rs("id")%>">
<input name="edit" type="submit" class="adminbutton" id="edit" value="修 改">&nbsp;<input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr>
<textarea name="content" id="content" style=display:none><%=Server.HtmlEncode(rs("content"))%></textarea></table></form>
<%rs.close
set rs=nothing
case "newotherok"
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_other",conn,1,3
rs.addnew
rs("title")=request.Form("title")
rs("content")=request.Form("content")
rs.update
rs.close
set rs=nothing
response.write"<script>location.href='admin_other.asp';</script>"
case "editotherok"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_other where id="&request("id")
rs.open sql,conn,1,3
rs("title")=request.Form("title")
rs("content")=request.Form("content")
rs.update
rs.close
set rs=nothing
response.Redirect"admin_other.asp"
End Select
sub other()
dim other
sql="select * from YC_other order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
other=rs.recordcount%>
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22" colspan="6" class=title><b>&nbsp;<img src=img/ie.gif border=0 width=15 height=15 align=absMiddle>&nbsp;频道管理 [当前共有<%=other%>个频道]</b></td></tr>
<tr class=bg height="25">
<form  method="post" name="form" id="form" action="del.asp" onsubmit="return downdel();">
<td width="5%"  align=center>选定</td>
<td width="30%" align=center>频道标题</td>
<td width="40%">频道地址</td>
<td width="10%" align=center>操作</td></tr><tr><td class="hr" colspan="6"></td></tr>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr height=25 class=bg>
<td align=center>
<input name='SoftID' type='checkbox' onclick="unselectall()" id="SoftID" value='<%=rs("id")%>'></td>
<td><%=rs("title")%></td>
<td ><input type="text" value="other.asp?id=<%=rs("id")%>" size="20" class=yecao style="width:120px" onMouseOver='this.focus()' onFocus='this.select()'></td>
<td>&nbsp;<a href="?action=editother&id=<%=rs("id")%>">编辑</a>&nbsp;
<a href="other.asp?id=<%=rs("id")%>" target=_blank>查看</a></td></tr>
<%rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>暂时没有频道！</</b></font></td></tr>"
end if
end if%>
<tr><td class="hr" colspan="6"></td></tr>
<tr class=bg><td width="5%" height="23" align=center><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox"></td>
<td height="30" colspan="6">
<input name="submit" type='submit' onClick="document.form.Action.value='Del'" value="删 除" class="adminbutton">
<input name="Action" type="hidden" id="Action" value="Del">
<input name="tab" type="hidden" id="tab" value="YC_other">
<input name="url" type="hidden" id="url" value="admin_other.asp"></td>
</tr></form>
</table></td></tr></table>
<%rs.close
set rs=nothing
end sub
call closedata()%>

