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

📄 link.asp

📁 视频源代码 视频源代码
💻 ASP
字号:
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/vip.asp"-->
<%
sql="select categoryid,categoryname,categoryindex from category where categorysort='news' order by categoryid ASC"
rs.open sql,conn,1,1
if not rs.eof then
  category=rs.getrows
end if
rs.close

Set rs=nothing
Set conn=nothing
%>
<!--#include file="../inc/head.asp"-->
<script>
one=new Array();
two=new Array();
<%
if isarray(category) then
  ii=0:jj=0
  for i=0 to ubound(category,2)
    cindex=split(category(2,i),".")
    if ubound(cindex)=1 then
response.write "one["&ii&"]=new Array("&category(0,i)&",'"&category(1,i)&"');"&vbcrlf
      for j=0 to ubound(category,2)
        if instr(category(2,j),category(2,i))>0 and category(2,j)><category(2,i) then
response.write "two["&jj&"]=new Array("&category(0,j)&",'"&category(1,j)&"',"&category(0,i)&");"&vbcrlf
        jj=jj+1
        end if
      next
response.write vbcrlf
      ii=ii+1
    end if
  next
end if
%>
</script>
<form name="news" method="POST" action="../js/js.asp" autocomplete="off" target="JS">
<input type="hidden" name="path" value="http://<%=Request.ServerVariables("HTTP_HOST")%>/news/">
<table border="0" align="center" width="400" cellpadding="1" cellspacing="1">
  <tr bgcolor="EFEFEF"><th colspan="4" height="20">新 闻 代 码 生 成 器</th></tr>
  <tr bgcolor="FFFFFF"><th width=30>栏目</th><td width=170><select name=onesort onchange="sort(this.options[this.selectedIndex].value)"></select></td>
      <th width=30>专题</th><td width=170><select name=twosort><option></select></td></tr>
  <tr bgcolor="FFFFFF"><th>条数</th><td><input class="text" type="text" name="num" size="3" onkeypress="return Num();" value="10"> 字符<input class="text" type="text" name="size" size="3" onkeypress="return Num();"> 行距<input class="text" type="text" name="height" size="3" onkeypress="return Num();"></td>
      <th>消息</th><td><input type="radio" name="cont" value="" checked>最新 <input type="radio" name="cont" value="top">热门 <input type="radio" name="cont" value="pic">图文</td></tr>
  <tr bgcolor="FFFFFF"><th>排列</th><td><input type="radio" name="order" value="" checked>ID <input type="radio" name="order" value="hits">点击 <input type="radio" name="order" value="time">时间</td>
      <th>显示</th><td><input type="checkbox" name="date" value="1">日期 <input type="checkbox" name="time" value="1">时间 <input type="checkbox" name="hits" value="1">点击</td></tr>
  <tr bgcolor="FFFFFF"><th>限制</th><td colspan="3"><input type="radio" name="only" value="" checked>不限制 <input type="radio" name="only" value="today">本日 <input type="radio" name="only" value="week">本周 <input type="radio" name="only" value="month">本月 <input type="radio" name="only" value="season">季度</td></tr>
  <tr bgcolor="FFFFFF"><td colspan="4" align=center>
<input class="button" type="button" value="生成代码" onclick="makecode()"> 
<input class="button" type="button" value="复制到剪贴板" onclick="copycode()"> 
<input class="button" type="reset" value="默认"> 
<input class="button" type="submit" value="演示" onclick="openwin('about:blank','JS',400,420);">
  </td></tr>
  <tr bgcolor="FFFFFF"><td colspan="4">
<textarea class="text" name="code" cols="55" rows="5">显示新闻来源于数据库:
<script language="javascript" src="list.asp"></script>
显示新闻来源于HTML文件:
<script language="javascript" src="html.asp"></script></textarea>
  </td></tr>
</table>
</form>
<script>
document.all.onesort.options[0]=new Option('请选择新闻栏目','');
document.all.onesort.options[1]=new Option('全部新闻栏目','all');
for (var i=0;i<one.length;i++) {
  document.all.onesort.options[i+2] = new Option(one[i][1],one[i][0]);
}

function sort(id) {
  document.all.twosort.length=0; 
  document.all.twosort.options[0]=new Option('请选择栏目专题','');
  for (var i=0;i<two.length;i++) {
    if (two[i][2]==id) document.all.twosort.options[document.all.twosort.length] = new Option(two[i][1],two[i][0]);
  }  
}

function makecode(){
  var news_location='list.asp'
  onevalue=document.all.onesort.options[document.all.onesort.selectedIndex].value;
  twovalue=document.all.twosort.options[document.all.twosort.selectedIndex].value;
  if (onevalue=="") alert('请选择显示栏目或专题');
  else
    if (twovalue!="") news_location+='?id='+twovalue;
    else
      if (onevalue!="all") news_location+='?id='+onevalue;
  if (document.all.num.value!="" && document.all.num.value!="10") news_location+='&num='+document.all.num.value;
  if (document.all.size.value!="" && document.all.size.value!="10") news_location+='&size='+document.all.size.value;
  if (document.all.height.value!="") news_location+="&height="+document.all.height.value;
  for(var i=0;i<3;i++){
    if (document.all.cont[i].status==true){
      if (document.all.cont[i].value!="") news_location+="&sort="+document.all.cont[i].value;
    }
  }
  for(var i=0;i<3;i++){
    if (document.all.order[i].status==true){
      if (document.all.order[i].value!="") news_location+="&order="+document.all.order[i].value;
    }
  }
  if (document.all.date.status==true) news_location+="&date=1";
  if (document.all.time.status==true) news_location+="&time=1";
  if (document.all.hits.status==true) news_location+="&hits=1";
  for(var i=0;i<4;i++){
    if (document.all.only[i].status==true){
      if (document.all.only[i].value!="") news_location+="&only="+document.all.only[i].value;
    }
  }
  list_location=news_location.replace(/list.asp&/ig,'list.asp?');
  html_location=news_location.replace(/list.asp&/ig,'html.asp?');
  html_location=html_location.replace(/list.asp/ig,'html.asp');
  document.all.code.value='显示新闻来源于数据库:\n'+
                          '<\script language="javascript" src="'+list_location+'"><\/script>\n'+
                           '显示新闻来源于HTML文件:\n'+
                          '<\script language="javascript" src="'+html_location+'"><\/script>';
}

function copycode() {
  var tempval=eval("document.all.code");
  tempval.focus();
  tempval.select();
  therange=tempval.createTextRange();
  therange.execCommand("Copy");
  alert("\n新闻代码已经拷贝到你的剪贴板上了!\n\n请按Ctrl+V将其粘贴到适当的位置。");
}
</script>

<!--#include file="../inc/foot.asp"-->

⌨️ 快捷键说明

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