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

📄 复件 默认文章内容页模板.html

📁 Enterprise Template for BizIdea 2.0, with full pictures and aspx files.
💻 HTML
字号:
{PE.DataSource id="cone" datasource="文章_内容页" itemid="@RequestInt_id" xslt="true" /}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="UTF-8">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="{PE.Field id="cone" fieldname="KeyWord" /}" name="Keywords" />
<meta content="{PE.Field id="cone" fieldname="Intro" /}" name="Description"/>
<title>{PE.Field id="cone" fieldname="Title" /}-{PE.SiteConfig.sitename /}</title>
<link href="{PE.SiteConfig.ApplicationPath/}Skin/Default/default.css" rel="stylesheet" type="text/css" />
<link href="{PE.SiteConfig.ApplicationPath/}Skin/Default/article.css" rel="stylesheet" type="text/css" />
<link href="{PE.SiteConfig.ApplicationPath/}Skin/Default/commentary.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{PE.SiteConfig.ApplicationPath/}JS/Common.js"></script>
<script language="javascript" type="text/javascript" src="{PE.SiteConfig.ApplicationPath/}JS/jsPopup.js"></script>
<script language="javascript" type="text/javascript" src="{PE.SiteConfig.ApplicationPath/}Skin/mall/js/tab.js"></script>

</head>
<body onload="commentinit()">
{PE.Label id="网站顶部" /}
<div id="center_all">
  <div id="main_bg">
    <div id="main_right">
      <div id="main_right_box">
        <!-- 网站位置导航信息开始 -->
        <div class="r_navigation">
          <div class="r_n_pic"></div>
          您现在的位置:<a href="{PE.SiteConfig.sitepath/}">{PE.SiteConfig.sitename /}</a>{PE.Label id="内容位置导航" itemid="@RequestInt_id" /} </div>
        <!-- 网站位置导航信息结束 -->
        {PE.Label id="右侧广告" /}
        <div class="c_spacing"> </div>
        <!-- 主体内容开始 -->
        <div class="c_main_box"  {PE.Field id="cone" fieldname="ArticleProtect" /}>
          <!-- 标题 -->
          <div class="c_title_text"> <span>
            <h1> <span><font style="{PE.Field id="cone" fieldname="TitleFontType" /}{PE.Field id="cone" fieldname="TitleFontColor" /}">{PE.Field id="cone" fieldname="TitleIntact" /}</font></span> </h1>
            </span> </div>
          <!-- 作者 -->
            <div class="c_title_author">
                        <div class="font_right"><span>点击数:{PE.Field id="cone" fieldname="Hits" /}</span> <span>【字体:<a href="javascript:fontZoomA();" class="top_UserLogin">小</a> <a href="javascript:fontZoomB();" class="top_UserLogin">大</a>】</span> <span>【<a href="{PE.SiteConfig.ApplicationPath/}User/Contents/Favorite.aspx?Action=add&Id={PE.Field id="cone" fieldname="GeneralID" /}">收藏</a>】</span> <span>【<a href="{PE.SiteConfig.applicationpath/}Print.aspx?id={PE.Field id="cone" fieldname="GeneralID" /}">打印文章</a>】</span> <span>【<a href="{PE.SiteConfig.applicationpath/}ShowComment.aspx?id={PE.Field id="cone" fieldname="GeneralID" /}">查看评论</a>】</span> <span>{PE.Label id="转入后台编辑" ItemId="@RequestInt_id" /}</span> </div>
                       
                        <div class="clearbox"></div>
                    </div> 
          <!-- 正文 -->
          <div class="c_content_text">
            <div class="c_content_overflow" id="fontzoom">
            {PE.Field id="cone" fieldname="Content"  charge="true"  showerr="true" chargelength="50" /}
</div>
          </div>
          <div class="c_bot_text">{PE.Page id="内容分页" datasource="contentpage" span="span"/}</div>
          <div class="c_bot_text">
 <div class="font_left"> <span>作者:<a href="{PE.SiteConfig.ApplicationPath/}Common/ShowAuthor.aspx?authorname={PE.Field id="cone" fieldname="LinkAuthor" /}">{PE.Field id="cone" fieldname="Author" /}</a></span> <span>来源:<a href="{PE.SiteConfig.ApplicationPath/}Common/ShowCopyFrom.aspx?copyfrom={PE.Field id="cone" fieldname="LinkCopyFrom" /}">{PE.Field id="cone" fieldname="CopyFrom" /}</a></span> <span>发布时间:{PE.Field id="cone" fieldname="UpdateTime" /}</span>  </div>
<div class="clearbox"></div>
</div> 
<div class="c_bot_text">{PE.Label id="LWEI-上一篇" ItemID="@RequestInt_id"/} {PE.Label id="LWEI-下一篇" ItemID="@RequestInt_id"/}</div>
        <div class="c_mains">
            <dl>
                <dt class="c_title">
                    <a>相关信息</a></dt>
                    <dd class="c_contents">
                       {PE.Label id="内容页_相关信息" itemid="@RequestInt_id"/} 
                    </dd>
            </dl>
        </div>
        </div>

        <!-- 主体内容结束 -->
        <!-- 评论开始 -->
   <span id="commentform"></span>
        <!-- 评论结束 -->
         </div>
    </div>
    {PE.Label id="文章节点左侧" /} </div>
</div>
{PE.Label id="网站底部" /}
<!-- 统计点击数 -->

<!-- 评论变量区 -->
<input id="username" type="hidden" value="游客" />
<input id="position" type="hidden" value="1" />
<input id="private" type="hidden" value="0" />
<input id="score" type="hidden" value="3" />
<input id="face" type="hidden" value="Images\Comment\01.gif" />
<input id="gid" type="hidden" value="@RequestInt_id" />
<input id="nid" type="hidden" value="{PE.Field id="cone" fieldname="NodeID" /}" />
<input id="tid" type="hidden" value="1" />
<!-- 评论变量区 -->
<script language="javascript" type="text/javascript">
function redirecturl(url, tarid)
{
    location=url.replace(/{\$pageid\/}/g,tarid);
}

//评论相关代码
function commentinit()
{
    var x = new AjaxRequest('XML','commentform');
    x.labelname = "内容评论PK标签";
    x.para = ['generalid=@RequestInt_id'];
    x.currentpage = 1;
    x.post('updatelabel', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s) {
        var xml = x.createXmlDom(s);
        $("commentform").innerHTML = xml.getElementsByTagName("body")[0].firstChild.data;
        changepage(1,'评论列表','JS_基本风格');
        getcurrentuserinfo()
    });
}

function SetPosition(st)
{
     for (i=-1;i<2;i++){
          if(i == st){
              $("Positon" + i).className="PK_mouseover";
          }
          else{
              $("Positon" + i).className="PK_title";
          }
     }
     $("position").value = st;
}

function addcomment()
{
    if(!$("guest").checked)
    {
        var strEmail = $("email").value;
	    var regEmail = /^([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
    	var matchArray = strEmail.match(regEmail);
    	if(matchArray == null)
	    {
            alert("请输入正确的Email格式!");
            $("email").focus();
            return false; 
	    }
	
        if($("iusername").value == '')
        {
            alert("请输入用户名");
            $("iusername").focus();
            return false;           
        }
        else
        {
            $("username").value = $("iusername").value;
        }
    }
//    if($("commenttitle").value == '')
//    {
//        alert("请输入标题");
//        $("commenttitle").focus();
//        return false; 
//    }


    if($("content").value == '')
    {
        alert("请输入评论内容");
        $("content").focus();
        return false;                
    }
    var x = new AjaxRequest('XML','status');
    x.para = ['username', 'commenttitle', 'content', 'email', 'face', 'gid', 'nid', 'tid', 'private', 'position', 'score'];
    x.paratype = ['nohtml','nohtml','nohtml']
    x.post('addcomment', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s) {
        var xml = x.createXmlDom(s);
        var  status = xml.getElementsByTagName("status")[0].firstChild.data;
        document.getElementById("status").style.display = "none";
        switch (status)
        {
            case "ok":
                changepage(1,'评论列表','JS_基本风格');
                break;
            case "check":
                alert("发表评论成功,请等待管理员审核。");  
                break;
            case "err":
                alert("发表评论失败!");  
                break;
            case "nopurview":
                alert("此栏目已禁止发表评论!");  
                break;
            case "noTourists":
                alert("此栏目已禁止游客发表评论!");  
                break;                    
            default:
                alert("发表评论失败!"); 
                break;
        }
        $("content").value = '';
    });
}

function addpkzone(commentid,position,content)
{
    var x = new AjaxRequest('XML','status');
    x.para = ['commentid='+ commentid, 'position=' + position, 'content=' + content];
    x.post('addpkzone', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s) {
        var xml = x.createXmlDom(s);
        var  status = xml.getElementsByTagName("status")[0].firstChild.data;
        document.getElementById("status").style.display = "none";
        switch (status)
        {
            case "ok":
                changepage(1,'评论列表','JS_基本风格');
                break;                  
            default:
                alert("辩论失败!"); 
                break;
        }
    });
}

function changepage(pagenum,sourcename,spanname)
{
    var x = new AjaxRequest('XML','pe100_' + sourcename);
    x.labelname = sourcename;
    x.currentpage = pagenum; 
	x.para = ['gid=@RequestInt_id', 'listnum=10', 'page=true', 'pagesize=10'];
	x.post('updatelabel', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s) {
        var xml = x.createXmlDom(s);
        var plstr = "";
        for (var i=0; i<xml.getElementsByTagName("body")[0].childNodes.length; i++)     
        {
            plstr += xml.getElementsByTagName("body")[0].childNodes[i].nodeValue;
        }
        $("pe100_" + sourcename).innerHTML = plstr;
        updatepage(spanname, sourcename, xml);
    });
}

function updatepage(spanname, sourcename, xml)
{
    if(parseInt(xml.getElementsByTagName("total")[0].firstChild.data) > 0)
    {
        var x = new AjaxRequest('XML','pe100_page_' + sourcename);
        x.labelname = spanname;
        x.sourcename = sourcename;
        x.total = xml.getElementsByTagName("total")[0].firstChild.data;
        x.currentpage = xml.getElementsByTagName("currentpage")[0].firstChild.data;
        x.pagesize = xml.getElementsByTagName("pagesize")[0].firstChild.data;
	    x.post('updatepage', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s) {
            var xml = x.createXmlDom(s);
            if($("pe100_page_" + sourcename) != null)
            {
                var plstr = "";
                for (var i=0; i<xml.getElementsByTagName("body")[0].childNodes.length; i++)     
                {
                    plstr += xml.getElementsByTagName("body")[0].childNodes[i].nodeValue;
                }
                $("pe100_page_" + sourcename).innerHTML = plstr;
            }
	});
    }
}

function setprivate()
{
    if($("open").checked)
    {
        $("private").value = 0;
    }
    else
    {
        $("private").value = 1;
    }
}
 
function getcurrentuserinfo()
{ 
    try{
        var x = new AjaxRequest('XML','');
	x.post('logincheck','{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s) {
            var xml = x.createXmlDom(s);
            if(xml.getElementsByTagName("status")[0].firstChild.data == "ok")
            {
                if($("iusername")!=null)
                {
                    $("iusername").value = xml.getElementsByTagName("username")[0].firstChild.data;
                    $("email").value = xml.getElementsByTagName("email")[0].firstChild.data;
                    $("iusername").disabled = true;
                    $("email").disabled = true;
                }
            }
        });
      }
      catch(e){
      };
}

function setguest()
{
    if($("guest").checked)
    {
        $("spanusername").style.display = 'none';
        $("spanemail").style.display = 'none';
    }
    else
    {
        $("spanusername").style.display = '';
        $("spanemail").style.display = '';
    }
}

function ChangeStar(index, isfixed){
     var colStars = document.getElementById("divStars").getElementsByTagName("input");
     var i = 0;
     var k = isfixed? parseInt(document.getElementById("score").value) : index;

     for(i=0; i<colStars.length; i++){
             colStars[i].src = (i<k? "{PE.SiteConfig.applicationpath/}Images/fstar.gif" : "{PE.SiteConfig.applicationpath/}Images/estar.gif");
     }
}

function StarClick(index)
{
    document.getElementById("score").value=index;
}

function StarMouseOver(index){
    ChangeStar(index,false);
}

function StarMouseOut(){
    ChangeStar(0,true);
}

//双击鼠标滚动屏幕的代码
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize

//更改字体大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
  if(curfontsize>8){
    document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
	document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
  }
}
function fontZoomB(){
  if(curfontsize<64){
    document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
	document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
  }
}
</script>
</body>
</html>

⌨️ 快捷键说明

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