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

📄 admin_softlink.asp

📁 网络电视免费版
💻 ASP
字号:
<!-- #include file="config.asp" -->
<!--#include file="inc/CHAR.asp"-->
<HTML><HEAD><TITLE>节目下载链接管理 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=keywords content="视听新时空(网络电视,网络广播,免费电影:全球最大的中文网络电视,广播网站)">
</HEAD>
<link rel="stylesheet" href="admin.css" type="text/css">
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{

if (myform.LinkName.value == "")
	{
		alert("下载连接名称不能为空!");
		myform.LinkName.focus();
		return (false);
	}

	if (myform.Address.value == "")
	{
		alert("下载连接地址不能为空!");
		myform.Address.focus();
		return (false);
	}

function checktext(text)
{
	allValid = false;
		
	var checkOK = "0123456789";

	for (i = 0;  i < text.length;  i++)
	{
		ch = text.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
  		allValid = true;
			break;
		}
	}
return allValid;
}
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}	
	
}
//-->
</script>
<BODY  leftMargin=0 topmargin="2">
<%	   
   set rs=server.createobject("adodb.recordset")
	   if UserName="" then
       msgtitle="下载链接"
       msginfo="<li>操作失败!你没有登录网站系统。</li><br><li><a href=""User.asp"">点此登录系统</a></li>"
       call Sysmsg(msgtitle,msginfo) 
	   else	     
	      if not chkEditUser(UserName,trim(request("SoftID"))) then
	      msgtitle="下载链接"
	      msginfo="<li>你没有权限编辑其他人添加的节目。</li><li><a href=""Admin_Category.asp"">我要添加新的节目</a></li>"
	      call Sysmsg(msgtitle,msginfo) 
	      else
	   isEdit=False
	   select case Request("action")
              case "add"  '添加
                 call saveadd()
              case "edit"  '修改
			     isEdit=True
                 call SoftLink(isEdit)
			  case "del"
			     call delsoftlink()
              case "modify"  '保存修改
                  call savemodfiy() 
              case else
			      isEdit=False
                  call SoftLink(isEdit) '一般
              end select
          end if
		end if 
	
sub saveadd() '**********************************添加****************************************

   sql="select * from "&CategoryName&"_SoftLink where (ID is null)"
	rs.open sql,conn,1,3
	rs.addnew
	rs("LinkName")=request.form("LinkName")
	rs("Address")=request.form("Address")
	rs("SoftID")=request.form("SoftID")
	rs("DateTime")=Now()
	rs("Hits")=0
	rs.update	
	rs.close
		
	msgtitle="添加链接"
	msginfo="<li><a href=""Admin_SoftLink.asp?SoftID="&request.form("SoftID")&""">接着添加节目下载链接</a></li>"
	call Sysmsg(msgtitle,msginfo)
    isEdit=False	
    call SoftLink(isEdit)
end sub

sub savemodfiy() '**********************************修改****************************************
    sql="select * from "&CategoryName&"_SoftLink where ID="&request("ID")
	rs.open sql,conn,1,3
	rs("LinkName")=request.form("LinkName")
	rs("Address")=request.form("Address")
	rs.update	
	rs.close
	msgtitle="修改链接"
	msginfo="<li><a href=""Admin_SoftLink.asp?SoftID="&request.form("SoftID")&""">接着添加节目下载链接</a></li>"
	call Sysmsg(msgtitle,msginfo)  
    isEdit=False	
    call SoftLink(isEdit)
end sub

sub delsoftlink()

conn.execute("delete from "&CategoryName&"_SoftLink where ID="&request("ID")&"")
   isEdit=False	
   call SoftLink(isEdit)
end sub	

sub SoftLink(isEdit) %> 
        
<table width="90%" border=0 align="center" cellpadding=3 cellspacing=1 class="tableBorder">
  <tr  height=25> 
            <th colspan="2"><% if isEdit then 
			Response.Write("修改节目下载地址")
			else
			Response.Write("添加节目下载地址")
			end if %></th>
          </tr>
          <form name="myform" method="post" action="Admin_SoftLink.asp"  onSubmit="return Juge(this)">
            <tr>               
      <td width="60" class="forumRowHighlight">节目名称:</td>
              
      <td class="forumRow"> 
        <%
		  sql="select SoftName,SoftVer from "&CategoryName&"_SoftInfo where SoftID="&request("SoftID")
					 	rs.open sql,conn,1,1
	          			response.write "<a href=""Admin_SoftInfo.Asp?action=edit&SoftID="&request("SoftID")&""">"&rs("SoftName")&" "&rs("SoftVer")&"</a>"
						rs.close
					%> <input type="Hidden" name="SoftID" value="<%=request("SoftID")%>"> 
              </td>
            </tr>
            <tr> 
              
      <td class="forumRowHighlight">已经添加:</td>
              
      <td class="forumRow"> 
        <%			sql="select * from "&CategoryName&"_SoftLink where SoftID="&request("SoftID")
					rs.open sql,conn,1,1
					if rs.eof and rs.bof then
					response.write "目前还没有添加任何下载连接!"
					else
					dim i
					i=1
					do while not rs.eof
					response.write (i&"、"&rs("LinkName"))
					response.write (" <a href=""Admin_SoftLink.asp?action=edit&ID="&rs("ID")&"&SoftID="&request("SoftID")&""">修改</a> ")
					response.write (" <a href=""Admin_SoftLink.asp?action=del&ID="&rs("ID")&"&SoftID="&request("SoftID")&""">删除</a><br>")
					i=i+1
					rs.movenext
    	             loop
					end if
					rs.close
					
					if isEdit then
					sql="select * from "&CategoryName&"_SoftLink where ID="&request("ID")
					rs.open sql,conn,1,1					
					Response.Write "<input type=""Hidden"" name=""ID"" value="""&request("ID")&""">"
					Response.Write "<input type=""Hidden"" name=""action"" value=""modify"">"
					else
					Response.Write "<input type=""Hidden"" name=""action"" value=""add"">"
					end if
					%></td>
            </tr>                 
            <tr> 
              
      <td class="forumRowHighlight">连接名称:</td>
              
      <td class="forumRow"> 
        &nbsp;<select size="1" name="LinkName">
        <option value="<% if isedit then response.write trim(rs("LinkName"))%>"><% if isedit then response.write trim(rs("LinkName"))%>
        </option>
        <option value="播放地址2  :(报告错误!)">播放地址2  :(报告错误!)
        </option>
        <option value="播放地址3  :(报告错误!)">播放地址3  :(报告错误!)
        </option>
        <option value="播放地址4  :(报告错误!)">播放地址4  :(报告错误!)
        </option>
        <option value="播放地址5:(报告错误!)">播放地址5  :(报告错误!)
        </option>
        <option value="播放地址6 :(报告错误!)">播放地址6  :(报告错误!)
        </option>
        <option value="播放地址7 :(报告错误!)">播放地址7  :(报告错误!)
        </option>
        <option value="播放地址8  :(报告错误!)">播放地址8  :(报告错误!)
        </option>
        <option value="播放地址9 :(报告错误!)">播放地址9 :(报告错误!)
        </option>
        <option value="播放地址10  :(报告错误!)">播放地址10  :(报告错误!)
        </option>
        <option value="播放地址1  :(报告错误!)">播放地址1  :(报告错误!)
        </option>
        <option value="数据正在整理中..........">数据正在整理中..........</option>
        </select><font color="#FF0000">!</font> </td>
            </tr>
            <tr> 
              
      <td class="forumRowHighlight">下载地址:</td>
              
      <td class="forumRow"> 
        <input type="text" name="Address" size="50" maxlength="150" value="<% if isedit then response.write trim(rs("Address"))%>"> 
                <font color="#FF0000"> !</font> </td>
            </tr>
            <tr> 
              
      <td class="forumRowHighlight"> </td>
              
      <td class="forumRow"> 
        <input type="submit" name="Submit1" value="提交"> <input type="reset" name="Submit2" value="重设"> 
              </td>
            </tr>
            <tr> 
              
      <td class="forumRowHighlight">相关说明:</td>
              
      <td class="forumRow">高级版(HTML)添加、更新、删除下载地址将自动更新节目信息静态页面SoftView_*.htm</td>
            </tr>
          </form>
        </table>
        <%
		if isEdit then rs.close
		end sub
			
		sub Sysmsg(msgtitle,msginfo)
		%><br>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder" >
  <tr> 
    <th><%=msgtitle%></th>
  </tr>
  <tr> 
    <td class="forumRow"><%=msginfo%></td>
  </tr>
  <tr> 
    <td height="22" align="center" class="forumRowHighlight"><a href="javascript:history.go(-1)" >&lt;&lt; 
      返回上一页</a></td>
  </tr>
</table>
<br>
<%end sub %>
</BODY></HTML>
<%
set rs=nothing
CloseDatabase
%>

⌨️ 快捷键说明

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