📄 edxsky_news.js
字号:
var tmp_img_h=web_img_h;
function news_bar_top(tvar,tt,ttype,tmore)
{
var w_wid="20%";
if (tvar.length>10) { w_wid="45%"; }
if (tvar.length>25) { w_wid="70%"; }
if (ttype==2) { w_wid="45%"; }
var more_var="<img src='"+web_dir_skin+"main/"+m_channel+"_more_0"+ttype+".gif' border=0>";
if (tmore!="" && tmore!=null)
{
is_more="1";
more_var="<a href='"+tmore+"'><img src='"+web_dir_skin+"main/"+m_channel+"_more_1"+ttype+".gif' border=0 alt='点击浏览更多……'></a>";
}
web_img_h=tmp_img_h+ttype;
var temp1="<table border=0 cellspacing=0 cellpadding=0 class=tablew>";
temp1+="<tr><td height=23 background='"+web_dir_skin+"main/"+m_channel+"_bar_right"+ttype+".gif'>";
temp1+=" <table border=0 cellspacing=0 cellpadding=0 width='100%'>";
temp1+=" <tr height=23>";
temp1+=" <td width='"+w_wid+"' background='"+web_dir_skin+"main/"+m_channel+"_bar_left"+ttype+".gif'> "+img_skin(web_img_m+ttype)+"<font class=btd>"+tvar+"</font></td>";
temp1+=" <td width='*' align=right>"+more_var+" </td>";
temp1+=" </tr>";
temp1+=" </table>";
temp1+="</td></tr>";
temp1+="<tr><td align=center>";
if (tt==1) temp1+=" <table border=0 width='100%'>";
document.write (temp1);
}
function news_bar_end(mvar,tt)
{
var temp1="";
if (tt==1) temp1+=" </table>";
temp1+="</td></tr>";
//if (mvar!="" && mvar!=null) temp1+="<tr><td align=right>"+mvar+" </td></tr>";
temp1+="</table>";
document.write (temp1+ukong);
}
function news_topic_type(b_c_num,b_id,b_username,b_topic,b_tim,b_counter,b_ispic,b_tim_type)
{
var n_url="news_view.asp?id="+b_id;
var n_jt=img_skin(web_img_h);
document.write ( format_topic_type(n_jt,b_username,b_topic,b_c_num,n_url,b_tim,b_counter,b_ispic,"新闻标题","浏览人次",b_tim_type) );
}
function news_label()
{
var temp1="<table border=0 cellspacing=0 cellpadding=4>";
temp1+="<tr><td> "+img_skin("label_"+m_channel)+" <a href='news_list.asp?action=pic'";
if (action=="pic") temp1+=" class=red";
temp1+=">图片新闻</a></td></tr>";
temp1+="<tr><td> "+img_skin("label_"+m_channel)+" <a href='news_list.asp?action=good'";
if (action=="good") temp1+=" class=red";
temp1+=">推荐新闻</a></td></tr>";
temp1+="<tr><td> "+img_skin("label_"+m_channel)+" <a href='news_list.asp?action=hot'";
if (action=="hot") temp1+=" class=red";
temp1+=">热门新闻</a></td></tr>";
temp1+="</table>";
document.write (temp1);
//return temp1;
}
function news_list_pagecute(p_nummer,p_rssum,p_viewpage,p_thepages,p_pageurl)
{
var temp1="";
temp1+="<table border=0 width='98%' cellspacing=0 cellpadding=2>";
temp1+="<tr>";
temp1+="<td height=25>";
temp1+=" 本栏共有 <font class=red>"+p_rssum+"</font> 条新闻";
temp1+="页次:<font class=red>"+p_viewpage+"</font>/<font class=red>"+p_thepages+"</font> ";
temp1+=" 分页:"+format_pagecute(p_viewpage,p_thepages,p_pageurl,5);
temp1+="</td>";
temp1+="</table>"+ukong;
document.write(temp1);
}
function news_search(stit)
{
var keyvar="请输入关键字";
var temp1="<table border=0>";
temp1+="<form name=news_sea_frm action='news_list.asp' method=get onsubmit=\"javascript:frm_submitonce(this);\">";
temp1+="<input type=hidden name=action value='search'>";
temp1+="<tr height=30>";
temp1+="<td>"+img_skin('new')+"</td>";
temp1+="<td wdith=5></td>";
temp1+="<td>"+select_type(stit,0,0)+"</td>";
temp1+="<td wdith=5></td>";
temp1+="<td><select name=sea_type sizs=1><option value='topic'>"+stit+"标题</option><option value='username'>发布人</option></seelct></td>";
temp1+="<td wdith=5></td>";
temp1+="<td><select name=sea_term sizs=1><option value='all'>满足所有条件</option><option value='only'>满足一个条件</option></seelct></td>";
temp1+="<td wdith=5></td>";
//temp1+="<td>关键字:</td>";
temp1+="<td><input type=text name=keyword value='"+keyvar+"' onfocus=\"if (value =='请输入关键字'){value =''}\" onblur=\"if (value ==''){value='请输入关键字'}\" size=20 maxlength=20 title='多个关键字请用 空格 格开'></td>";
temp1+="<td wdith=5></td>";
temp1+=" <td><input type=submit value='搜索' onclick=\"javascript:return news_sea('"+stit+"');\"></td>";
//<input type=image src='images/small/search_go.gif' border=0>
temp1+=" </tr></form></table>";
document.write(temp1);
return temp1;
}
function news_sea(stit)
{
if (document.news_sea_frm.keyword.value=="请输入关键字")
{
alert("请在搜索"+stit+"前先输入要查询的 关键字 !");
document.news_sea_frm.keyword.focus();
return false;
}
}
function news_view1(v_id,v_topic,v_tim,v_comto,v_pic,v_ispic)
{
var n_pic="";
if (vtrue(v_ispic) && vnull(v_pic)) { n_pic="<tr><td align=center><img src='"+pic_url(v_pic,0)+"' border=0 onload=\"javascript:if(this.width>"+max_w+")this.width="+max_w+";\"></td></tr>"; }
var temp1="<table border=0 width='98%' cellspacing=0 cellpadding=0 align=center>";
temp1+="<tr><td align=center height=50><font class=red_3 size=3><b>"+v_topic+"</b></font></td></tr>";
temp1+="<tr><td align=center class=gray>"+v_tim+" "+web_name+" 出处:"+v_comto+"</td></tr>";
temp1+="<tr><td height=10></td></tr>";
temp1+="<tr><td valign=top>";
temp1+=" <table border=0 class=tablew>"+n_pic+"<tr><td>";
temp1+=" <table border=0 width='100%' class=tf><tr><td class=bw>";
document.write (temp1);
//return temp1;
}
function news_view2(v_id,v_sort,v_topic,v_counter,v_username,v_id1,v_topic1,v_id2,v_topic2)
{
var temp1=" <font class=gray>(本文已被浏览 "+v_counter+" 次)</font>";
temp1+=" </td></tr></table>";
temp1+=" </td></tr></table>";
temp1+="</td></tr>";
temp1+="<tr><td height=10></td></tr>";
temp1+="<tr><td>";
temp1+=" <table border=0 width='100%'>";
temp1+=" <tr>";
temp1+=" <td width='35%' class=htd> 发布人:"+format_user_name(v_username,0,'')+"<br> "+commend_friend(tit,v_topic,'news_view.asp?id='+v_id)+" "+commend_err(tit,v_topic,v_id,v_sort,'err.asp?id='+v_id)+"</td>";
temp1+=" <td width='65%' class=htd>";
temp1+="上篇新闻:";
if (v_topic1!="" && v_topic1!=null)
{ temp1+="<a href='news_view.asp?id="+v_id1+"' title='"+code_html(v_topic2,1,0)+"'>"+code_html(v_topic1,1,25)+"</a>"; }
else
{ temp1+="<font class=gray>没有找到相关新闻</font>"; }
temp1+="<br>下篇新闻:";
if (v_topic2!="" && v_topic2!=null)
{ temp1+="<a href='news_view.asp?id="+v_id2+"' title='"+code_html(v_topic2,1,0)+"'>"+code_html(v_topic2,1,25)+"</a>"; }
else
{ temp1+="<font class=gray>没有找到相关新闻</font>"; }
temp1+=" </td></tr></table>";
temp1+="</td></tr>";
temp1+="</table>";
document.write (temp1+ukong);
//return temp1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -