<%@ Page Language="C#" MasterPageFile="~/v/UsersAddEdit.Master" AutoEventWireup="true" CodeBehind="StatCode.aspx.cs" Inherits="Stat.web.v.StatCode1" Title="获取该站点统计代码" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  <script type="text/javascript">
    
function UpdateAndCopy(txt)
  {
    //取得选中的值；
       copyToClipboard(txt);
  }
function copyToClipboard(txt) {
         if (window.clipboardData) {
                window.clipboardData.clearData();
                window.clipboardData.setData("Text", txt);
            } else if (navigator.userAgent.indexOf("Opera") != -1) {
                window.location = txt;
            } else if (window.netscape) {
                try {
                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                } catch (e) {              
                    //alert("Your current browser settings have been off this feature!\nPlease follow these steps to turn on this feature! to open a new browser in the browser address bar type 'about: config' and press ENTER. \nand then locate the 'signed.applets.codebase_principal_support' item is set to post double-click the 'true'. \nStatement: This feature will not be very hazardous to your computer or data security!")
                     alert("您的当前浏览器设置已关闭此功能！请按以下步骤开启此功能！\n新开一个浏览器，在浏览器地址栏输入'about:config'并回车。\n然后找到'signed.applets.codebase_principal_support'项，双击后设置为'true'。\n声明：本功能不会危极您计算机或数据的安全！");
                }
                var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
                if (!clip) return;
                var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
                if (!trans) return;
                trans.addDataFlavor('text/unicode');
                var str = new Object();
                var len = new Object();
                var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
                var copytext = txt;
                str.data = copytext;
                trans.setTransferData("text/unicode", str, copytext.length * 2);
                var clipid = Components.interfaces.nsIClipboard;
                if (!clip) return false;
                clip.setData(trans, null, clipid.kGlobalClipboard);
            }
            alert("已成功复制！");
       
        return true;
    } 
  
  </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMain" runat="server">
<div class="C_u_ti">获取该站点统计代码</div>
<div class="box" style="margin-top:10px; line-height:22px;">
<span style="color:Red">代码使用说明：</span><br />
<ul>
<li>&nbsp;&nbsp;&nbsp;●请复制您需要的样式代码放到您所要统计的网页中即可。如果您的网站有动态内容，建议可以放在常用的包含文件或模板页中。</li>
<li>&nbsp;&nbsp;&nbsp;●为了保证统计数据的准确性，请将统计代码放置在其它统计代码的前面或者后面都可以。</li>
<li>&nbsp;&nbsp;&nbsp;●在弹出窗口内或者嵌入IFRAME页内放统计代码将统计不到来路。</li>
<li>&nbsp;&nbsp;&nbsp;●如有问题或者需要其他的显示样式，请联系我们，您将得到帮助。</li>
</ul>
</div>
<div class="box">

<hr style=" width:98%; text-align:center;" />
<br />
<B>&nbsp;&nbsp;&nbsp;文字样式：</B>总流量XXXX次
<br />
&nbsp;&nbsp;&nbsp;
<textarea cols="60" id="txtCopy"><script src="http://<%=ServerUrl%>/stat.aspx?id=<%=WebId%>&s=t1" type="text/javascript" charset="utf-8"></script></textarea>
<button style="height:36px;" onclick="UpdateAndCopy(txtCopy.value)">复制代码到剪贴板</button>
<br />
<hr style=" width:98%; text-align:center;" />
<br />
<B>&nbsp;&nbsp;&nbsp;文字样式：</B>站长统计
<br />
&nbsp;&nbsp;&nbsp;
<textarea cols="60" id="txtCopy5">
<script type="text/javascript">var ccstat_webid=<%=WebId%>;var ccstat_hostName="<%=ServerUrl%>";</script>
<script src="http://<%=ServerUrl%>/stat.js" type="text/javascript" charset="utf-8"></script>
<a href="http://<%=ServerUrl%>/v/Main.aspx?wid=<%=WebId%>">站长统计</a>
</textarea>
<button style="height:36px;" onclick="UpdateAndCopy(txtCopy5.value)">复制代码到剪贴板</button>
<br />
<hr style=" width:98%; text-align:center;" />
<br />
<B>&nbsp;&nbsp;&nbsp;文字样式：</B>无
<br />
&nbsp;&nbsp;&nbsp;
<textarea cols="60" id="txtCopy1">
<script type="text/javascript">var ccstat_webid=<%=WebId%>;var ccstat_hostName="<%=ServerUrl%>";</script>
<script src="http://<%=ServerUrl%>/stat.js" type="text/javascript" charset="utf-8"></script>
</textarea>
<button style="height:36px;" onclick="UpdateAndCopy(txtCopy1.value)">复制代码到剪贴板</button>
<br />
<hr style=" width:98%; text-align:center;" />
<br />
<B>&nbsp;&nbsp;&nbsp;图片样式A：</B><img src="../img/1.gif" />
<br />
&nbsp;&nbsp;&nbsp;
<textarea cols="60" id="txtCopy2">
<script type="text/javascript">var ccstat_webid=<%=WebId%>;var ccstat_hostName="<%=ServerUrl%>";</script>
<script src="http://<%=ServerUrl%>/stat.js" type="text/javascript" charset="utf-8"></script>
<a href="http://<%=ServerUrl%>/v/Main.aspx?wid=<%=WebId%>"><img src="http://<%=ServerUrl%>/img/1.gif" border="0" alt="站长统计" /></a>
</textarea>
<button style="height:36px;" onclick="UpdateAndCopy(txtCopy2.value)">复制代码到剪贴板</button>
<br />
<hr style=" width:98%; text-align:center;" />
<br />
<B>&nbsp;&nbsp;&nbsp;图片样式B：</B><img src="../img/2.gif" />
<br />
&nbsp;&nbsp;&nbsp;
<textarea cols="60" id="txtCopy3">
<script type="text/javascript">var ccstat_webid=<%=WebId%>;var ccstat_hostName="<%=ServerUrl%>";</script>
<script src="http://<%=ServerUrl%>/stat.js" type="text/javascript" charset="utf-8"></script>
<a href="http://<%=ServerUrl%>/v/Main.aspx?wid=<%=WebId%>"><img src="http://<%=ServerUrl%>/img/2.gif" border="0" alt="站长统计" /></a>
</textarea>
<button style="height:36px;" onclick="UpdateAndCopy(txtCopy3.value)">复制代码到剪贴板</button>
<br />
<hr style=" width:98%; text-align:center;" />
<br />
<B>&nbsp;&nbsp;&nbsp;图片样式C：</B><img src="../img/3.gif" />
<br />
&nbsp;&nbsp;&nbsp;
<textarea cols="60" id="txtCopy4">
<script type="text/javascript">var ccstat_webid=<%=WebId%>;var ccstat_hostName="<%=ServerUrl%>";</script>
<script src="http://<%=ServerUrl%>/stat.js" type="text/javascript" charset="utf-8"></script>
<a href="http://<%=ServerUrl%>/v/Main.aspx?wid=<%=WebId%>"><img src="http://<%=ServerUrl%>/img/3.gif" border="0" alt="站长统计" /></a>
</textarea>
<button style="height:36px;" onclick="UpdateAndCopy(txtCopy4.value)">复制代码到剪贴板</button>
<br />
<hr style=" width:98%; text-align:center;" />
<br />
<br />
<asp:Literal ID="ltrShowTypeList" runat="server"></asp:Literal>

</div>
</asp:Content>
