加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

动易标签:签收标签(包括列表页、内容页)

(2013-02-14 02:17:48)
标签:

标签

动易

网站建设

it

分类: 建站笔记
http://s1/mw690/54c367d4gd4d37ceffc40&690

http://s10/mw690/54c367d4gd4d37d2fe3a9&690

http://s1/mw690/54c367d4gd4d37d4eb930&690

使用方法:

1、将“青春签收”文件夹上传到你的标签库目录中。
2
、列表后显示签收状态用法:
在你需要的地方插入 {PE.Label id="通用信息列表" bindStyle="青春签收式" outputQty="8" titleLength="30" /}
3
、内容页显示签收状态及统计用法:

在内容页模板中插入 {PE.Label id="青春内容页签收统计" itemId="1617" /}

《青春内容页签收统计》标签代码如下:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <LabelType>
青春签收</LabelType>
  <LabelIntro>
青春内容页签收统计
</LabelIntro>
  <OutType>sin</OutType>
  <LabelDataType>sql_sysquery</LabelDataType>
  <EnabelAjax>False</EnabelAjax>
  <Version officialVersion="" modifiedVersions="3608" compatibleVersion="" />
  <attributes>
    <name>itemId</name>
    <datatype>supersql</datatype>
    <default>0</default>
    <intro>
文章
ID</intro>
  </attributes>
  <IsXsltSql>false</IsXsltSql>
  <IsXsltCountSql>false</IsXsltCountSql>
  <LabelSqlString>select SL.*,SC.EndTime,CT.Company from PE_SigninLog as SL left join PE_SigninContent as SC on SL.GeneralID=SC.GeneralID left join PE_Contacter as CT on SL.UserName=CT.UserName where
SL.GeneralID=@itemId</LabelSqlString>
  <LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:output method="html" />
<xsl:param name="itemId"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="count(/NewDataSet/Table)=0">
</xsl:when>
<xsl:otherwise>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CAE3FF">
<tr bgcolor="#a10000">
  <td height="34" colspan="5" align="center" bgcolor="#F 4F9FF">
<h2>
签收情况列表&#160;&#160;{PE.Label id="青春签收状态" itemId="@RequestInt_Id" /}</h2>
</td>
  </tr>
<tr bgcolor="#a10000">
<td width="10%" height="30" align="center" bgcolor="#F7F7F7">
<strong>
序号</strong>
</td>
<td width="22%" align="center" bgcolor="#F7F7F7" >
<strong>
签收人
</strong>
</td>
<td width="22%" align="center" bgcolor="#F7F7F7"><strong>
签收
IP</strong>
</td>
<td width="30%" align="center" bgcolor="#F7F7F7">
<strong>
签收时间
</strong>
</td>
<td width="18%" align="center" bgcolor="#F7F7F7" >
<strong>
签收状态
</strong>
</td>
</tr>
<xsl:for-each select="/NewDataSet/Table">
 <tr bgcolor="#006699">
  <td height="24" align="center" bgcolor="#FFFFFF">
<xsl:value-of select="position()"/>
</td>
  <td align="center" bgcolor="#FFFFFF">
<xsl:value-of select="UserName"/>
</td>
  <td align="center" bgcolor="#FFFFFF"><xsl:value-of select="IP"/>
</td>
  <xsl:choose>
   <!--S_
没签收
-->
   <xsl:when test="IsSignin='false'">
    <td align="center" bgcolor="#FFFFFF">
</td>
    <xsl:choose>
     <xsl:when test="pe:TimeSpan(pe:TimeNow(),EndTime)>=0">
<td align="center" bgcolor="#FFFFFF">
未签收
</td>
</xsl:when>
     <xsl:otherwise>
<td align="center" bgcolor="#FFFFFF">
已过期
</td>
</xsl:otherwise>
    </xsl:choose>
   </xsl:when>
   <!--E_
没签收
-->
   <!--S_
已签收
-->
   <xsl:when test="IsSignin='true'">
   <td align="center" bgcolor="#FFFFFF">
<xsl:value-of select="pe:FormatDate(SigninTime,'yyyy
mmddhhffss
')"/>
</td>

<td align="center" bgcolor="#FFFFFF">已签收</td>

   </xsl:when>
   <!--E_
已签收-->
  </xsl:choose> 
</tr>
</xsl:for-each>
</table><div style="margin-bottom:40px;">
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
</root>

 

《通用信息列表_青春签收式》标签代码如下:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <LabelType>
青春签收</LabelType>
  <LabelIntro />
  <OutType>sin</OutType>
  <LabelDataType>sql_sysquery</LabelDataType>
  <EnabelAjax>False</EnabelAjax>
  <IsXsltSql>false</IsXsltSql>
  <IsXsltCountSql>false</IsXsltCountSql>
  <LabelSqlString>@queryCond</LabelSqlString>
  <attributes>
    <name>titleLength</name>
    <datatype>int</datatype>
    <default>50</default>
    <intro>
项目标题长度
</intro>
  </attributes>
  <attributes>
    <name>displayHits</name>
    <datatype>bool</datatype>
    <default>false</default>
    <intro>
是否显示项目点击数
</intro>
  </attributes>
  <attributes>
    <name>displayTips</name>
    <datatype>bool</datatype>
    <default>false</default>
    <intro>
是否显示录入者,更新日期,点击数等浮动提示信息
</intro>
  </attributes>
  <attributes>
    <name>displayDateTime</name>
    <datatype>string</datatype>
    <default />
    <intro>
格式化日期的模板,为空则不显示日期
</intro>
  </attributes>
  <attributes>
    <name>displayTitlePrefix</name>
    <datatype>bool</datatype>
    <default>false</default>
    <intro>
是否显示项目前缀修饰语
</intro>
  </attributes>
  <attributes>
    <name>displayNodeName</name>
    <datatype>bool</datatype>
    <default>false</default>
    <intro>
是否显示所属栏目名称
</intro>
  </attributes>
  <attributes>
    <name>displayNewSign</name>
    <datatype>int</datatype>
    <default />
    <intro>
近多少天内的项目视为最新项目并显示最新项目图标,为空则不显示
</intro>
  </attributes>
  <attributes>
    <name>displayHotSign</name>
    <datatype>bool</datatype>
    <default>false</default>
    <intro>
是否显示热门项目图标
</intro>
  </attributes>
  <attributes>
    <name>displayPropertyPrefix</name>
    <datatype>int</datatype>
    <default>0</default>
    <intro>
项目列表前缀修饰符
</intro>
  </attributes>
  <attributes>
    <name>linkOpenType</name>
    <datatype>int</datatype>
    <default>0</default>
    <intro>
项目列表打开方式
</intro>
  </attributes>
  <attributes>
    <name>nodes</name>
    <datatype>string</datatype>
    <default>0</default>
    <intro>
节点数组
</intro>
  </attributes>
  <attributes>
    <name>queryCond</name>
    <datatype>supersql</datatype>
    <default>SELECT TOP 10 * FROM PE_CommonModel</default>
    <intro>
查询条件
</intro>
  </attributes>
  <attributes>
    <name>queryCount</name>
    <datatype>supersql</datatype>
    <default />
    <intro>
统计条件
</intro>
  </attributes>
  <LabelTemplate><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
    <xsl:output method="xml" indent="yes"/>
    <xsl:param name="titleLength"/>
    <xsl:param name="displayPropertyPrefix"/>
    <xsl:param name="displayDateTime"/>
    <xsl:param name="displayTitlePrefix"/>
    <xsl:param name="displayHits"/>
    <xsl:param name="displayTips"/>
    <xsl:param name="displayInputer"/>
    <xsl:param name="displayNodeName"/>
    <xsl:param name="displayHotSign"/>
    <xsl:param name="displayNewSign"/>
    <xsl:param name="linkOpenType"/>
    <xsl:param name="nodes"/>
    <xsl:param name="optionalExtend"/>
    <xsl:param name="queryCond"/>
    <xsl:param name="queryCount"/>
    <xsl:template match="NewDataSet">
        <xsl:choose>
            <xsl:when test="Table">
                <xsl:for-each select="Table">
                    <li>
                        <!--
标题前缀图标修饰符-->
                        <xsl:if test="$displayDateTime != ''">
                            <span class="datetime">
                                <xsl:value-of select="pe:FormatDate(UpdateTime, $displayDateTime)"/>
                            </span>
                        </xsl:if>
                        <xsl:if test="$displayPropertyPrefix != 0">
                            <xsl:element name="img">
                                <xsl:choose>
                                    <xsl:when test="EliteLevel &gt; pe:GetNodeInfo(NodeID, 'LeastOfEliteLevel')">
                                        <xsl:attribute name="src">
                                            <xsl:value-of select="pe:InstallDir()"/>images/elite<xsl:value-of select="$displayPropertyPrefix"/>.gif
                                        </xsl:attribute>
                                        <xsl:attribute name="alt">
推荐
</xsl:attribute>
                                    </xsl:when>
                                    <xsl:when test="Hits &gt; pe:GetNodeInfo(NodeID, 'HitsOfHot')">
                                        <xsl:attribute name="src">
                                            <xsl:value-of select="pe:InstallDir()"/>images/ontop<xsl:value-of select="$displayPropertyPrefix"/>.gif
                                        </xsl:attribute>
                                        <xsl:attribute name="alt">
热门
</xsl:attribute>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <xsl:attribute name="src">
                                            <xsl:value-of select="pe:InstallDir()"/>images/common<xsl:value-of select="$displayPropertyPrefix"/>.gif
                                        </xsl:attribute>
                                        <xsl:attribute name="alt">
普通
</xsl:attribute>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </xsl:element>
                        </xsl:if>
                        <!--
节点名称
-->
                        <xsl:if test="$displayNodeName = 'true'">
                            <span class="node_name">
                                <a href="{pe:GetNodePath('false',NodeID)}" target="{pe:GetLinkTarget(pe:GetNodeInfo(NodeID, 'OpenType'))}">
                                    <xsl:value-of select="pe:GetNodeInfo(NodeID,'NodeName')"/>
                                </a>
                            </span>
                        </xsl:if>
                        <!--
标题前缀,如[组图
]-->
                        <xsl:if test="$displayTitlePrefix = 'true'">
                            <xsl:if test="IncludePic != '
'">
                                <span class="title_prefix">
                                    <xsl:value-of select="IncludePic"/>
                                </span>
                            </xsl:if>
                        </xsl:if>
                        <!--
标题链接
-->
                        <a href="{pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)}">
                            <xsl:attribute name="target">
                                <xsl:choose>
                                    <xsl:when test="$linkOpenType = 1">_blank</xsl:when>
                                    <!--
项目所在的节点配置托管
-->
                                    <xsl:when test="$linkOpenType = 2">
                                        <xsl:value-of select="pe:GetLinkTarget(pe:GetNodeInfo(NodeID, 'ItemOpenType'))"/>
                                    </xsl:when>
                                    <!--
调用所在的节点配置托管
-->
                                    <xsl:when test="$linkOpenType = 3">
                                        <xsl:choose>
                                            <xsl:when test="contains($nodes,',')">
                                                <xsl:value-of select="pe:GetLinkTarget(pe:GetNodeInfo(substring-before($nodes,','), 'ItemOpenType'))"/>
                                            </xsl:when>
                                            <xsl:otherwise>
                                                <xsl:value-of select="pe:GetLinkTarget(pe:GetNodeInfo($nodes, 'ItemOpenType'))"/>
                                            </xsl:otherwise>
                                        </xsl:choose>
                                    </xsl:when>
                                    <xsl:otherwise>_blank</xsl:otherwise>
                                </xsl:choose>
                            </xsl:attribute>
                            <!--
标题Title属性
-->
                            <xsl:if test="$displayTips = 'true'">
                                <xsl:attribute name="title">
标题:<xsl:value-of select="Title"/> <xsl:value-of select="'&#10;'"/>点击数:<xsl:value-of select="Hits"/> <xsl:value-of select="'&#10;'"/>发表时间:<xsl:value-of select="pe:FormatDate(UpdateTime, 'yymmdd
')"/>
</xsl:attribute>
                            </xsl:if>
                            <!--
标题样式
-->
                            <xsl:choose>
                                <xsl:when test="TitleFontColor != '' or TitleFontType != '
字形
'">
                                    <span>
                                        <xsl:attribute name="style">
                                            <xsl:if test="TitleFontColor != ''">color:<xsl:value-of select="TitleFontColor"/>;</xsl:if>
                                            <xsl:if test="TitleFontType != '
字形
'">
                                                <xsl:choose>
                                                    <xsl:when test="TitleFontType ='
粗体
'">font-weight:bold;font-style:normal;</xsl:when>
                                                    <xsl:when test="TitleFontType ='
斜体
'">font-weight:normal ;font-style:italic;</xsl:when>
                                                    <xsl:when test="TitleFontType ='
粗 斜
'">font-weight:bold;font-style:italic;</xsl:when>
                                                    <xsl:otherwise>font-weight:normal ;font-style:normal;</xsl:otherwise>
                                                </xsl:choose>
                                            </xsl:if>
                                        </xsl:attribute>
                                        <xsl:value-of select="pe:CutText(Title,$titleLength,'
')"/>
                                    </span>
                                </xsl:when>
                                <xsl:otherwise>
                                    <xsl:value-of select="pe:CutText(Title,$titleLength,'
')"/>
                                </xsl:otherwise>
                            </xsl:choose>
                        </a>
     {PE.Label id="
青春签收状态
" itemId="<xsl:value-of select="GeneralID"/>" /}
                        <xsl:if test="ShowCommentLink = 'true'">
                            <span class="comment_link">
                                <a target="_blank" href="{pe:InstallDir()}Comment/AddComment.aspx?itemId={GeneralID}&amp;nodeId={NodeID}">
评论
</a>
                            </span>
                        </xsl:if>
                        <xsl:if test="$displayHits = 'true'">
                            <span class="item_hits">
                                <xsl:value-of select="Hits"/>
                            </span>
                        </xsl:if>
                        <xsl:if test="$displayHotSign = 'true' and Hits &gt; pe:GetNodeInfo(NodeID, 'HitsOfHot')">
                            <img src="{pe:InstallDir()}images/hot.gif" alt="
热门内容
"/>
                        </xsl:if>
                        <xsl:if test="$displayNewSign != 0 and $displayNewSign &gt;= pe:TimeSpan(UpdateTime,pe:TimeNow())">
                            <img src="{pe:InstallDir()}images/new.gif" alt="
最新内容
"/>
                        </xsl:if>
                    </li>
                </xsl:for-each>
            </xsl:when>
            <xsl:otherwise>
                <li>
                    <span class="missing_data">
还没有任何内容!
</span>
                </li>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
</xsl:stylesheet>]]></LabelTemplate>
  <UsePage>True</UsePage>
  <LabelSqlCount>@queryCount</LabelSqlCount>
  <Version officialVersion="" modifiedVersions="4600" compatibleVersion="" />
</root>

 

《青春签收状态》标签代码如下:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <LabelType>
青春签收</LabelType>
  <LabelIntro>
青春签收状态
</LabelIntro>
  <OutType>sin</OutType>
  <LabelDataType>sql_sysquery</LabelDataType>
  <EnabelAjax>False</EnabelAjax>
  <Version officialVersion="" modifiedVersions="3611" compatibleVersion="" />
  <attributes>
    <name>itemId</name>
    <datatype>supersql</datatype>
    <default>0</default>
    <intro>
文章
ID</intro>
  </attributes>
  <IsXsltSql>false</IsXsltSql>
  <IsXsltCountSql>false</IsXsltCountSql>
  <LabelSqlString>select SC.GeneralID SCID,SC.EndTime,SL.* from PE_SigninContent as SC left join (select * from PE_SigninLog where
GeneralID=@itemId) as SL on SL.GeneralID=SC.GeneralID where SC.GeneralID=@itemId</LabelSqlString>
  <LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:output method="html" />
<xsl:param name="itemId"/>
<xsl:param name="userName"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="count(/NewDataSet/Table)=0">
</xsl:when>
<xsl:otherwise>
<xsl:choose>
 <xsl:when test="pe:IsLogined()='true'">

<font color='red'>{PE.Label id="青春签收" itemId="<xsl:value-of select="$itemId"/>" /}</font>

 </xsl:when>
    <xsl:otherwise>
<font color='red'>
<a>
                <xsl:attribute name="href">
<xsl:value-of select="pe:GetSiteConfigInfo('SiteUrl')"/>/User/login.aspx
                </xsl:attribute>
                <xsl:attribute name="title">
                </xsl:attribute>
<font color="#990000">
【登录签收】</font>

                </a>
</font>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
</root>

 

《青春签收》标签代码如下:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <LabelType>
青春签收</LabelType>
  <LabelIntro>
青春签收
</LabelIntro>
  <OutType>txt</OutType>
  <LabelDataType>static</LabelDataType>
  <attributes>
    <name>itemId</name>
    <default>0</default>
    <intro>
内容
ID</intro>
  </attributes>
  <LabelTemplate><![CDATA[<span id="content_signin<xsl:value-of select="$itemId"/>"></span><span id="content_SigninAjaxStatus<xsl:value-of select="$itemId"/>"></span>
  <script type="text/javascript">
function GetContentSigninStatus(id) {
    $.pe.ajax('GetContentSigninStatus',{ params: { itemId: id }, success: function(s) {
        var data = $(s);
        var status = data.find('status').text();
        $('#content_signinAjaxStatus<xsl:value-of select="$itemId"/>').css({ display: 'none' });
        switch (status) {
            case "NoSignin":
                break;
            case "NoLogin":
                break;
            case "AutoSignin":
                var time = data.find("time").text();
                AutoSigninContent(id, time);
                break;
            case "NormalSignin":
                $("#content_signin<xsl:value-of select="$itemId"/>").html("
<span style='cursor: pointer;' onclick=\"SigninContent('" id "')\" >请你签收</span>
");
                break;
            case "SigninOutTime":
                $("#content_signin<xsl:value-of select="$itemId"/>").html("
【已过签收截止时间】
");
                break;
            case "Signined":
                $("#content_signin<xsl:value-of select="$itemId"/>").html("
【已经签收】
");
                break;
        }
    }
    })
}

function AutoSigninContent(id, time) {
    var secs = time;
    var wait = secs * 1000;
    $("#content_signin<xsl:value-of select="$itemId"/>").html("
【自动签收[" secs "]秒】");
    for (i = 1; i <= secs; i ) {
        window.setTimeout("UpdateAutoSigninTime(" i "," secs ")", i * 1000);
    }
    window.setTimeout("SigninContent('" id "')", wait);
}

function UpdateAutoSigninTime(number, wait) {
    printnr = wait - number;
    $("#content_signin<xsl:value-of select="$itemId"/>").html("
【自动签收[" printnr "]秒】");
}

function SigninContent(id) {


    $.pe.ajax( 'SigninContent',{ params: { itemId: id },success: function(s) {
        var status = $(s).find('status').text();
        switch (status) {
            case "Signined":
                $("#content_signin<xsl:value-of select="$itemId"/>").html("
【已经签收】");
                break;
            case "NotSignined":
                $("#content_signin<xsl:value-of select="$itemId"/>").html("
【签收失败】
");
                break;
            case "SigninOutTime":
                $("#content_signin<xsl:value-of select="$itemId"/>").html("
【已过签收截止时间】
");
                break;
        }
    }
    });
}
GetContentSigninStatus('<xsl:value-of select="$itemId"/>');
  </script>]]></LabelTemplate>
  <EnabelAjax>False</EnabelAjax>
  <Version officialVersion="" modifiedVersions="4600" compatibleVersion="" />
</root>

 


0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有