 <br> 
<table style="BORDER-COLLAPSE: collapse" borderColor=#999999 cellPadding=0 width="100%" border=0>
  <tr class=titlefont> 
    <td valign="middle"><strong><a href="#jd">简单模式</a><a name="jd"></a></strong></td>
    <td valign="middle"><strong><a href="#gj">高级模式</a></strong></td>
  </tr>
  <tr align="center"> 
    <td colspan="2" ><table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr> 
          <td>统计代码:【{/$countlogotext|default:"PHPStat"/}】</td>
        </tr>
        <tr> 
          <td><textarea name="textarea" onFocus="this.select()" readonly cols="80" rows="7" >
<!-- phpstat.net -->
<script language=javascript>
 var _PCSWebSite="{/$website/}";
 var _PCSText="{/$countlogo|default:"宝贝统计"/}";
</script>
<script language="javascript" type="text/javascript" src="{/$Countlink/}" ></script>
<!-- /phpstat.net -->
</textarea></td>
        </tr>
        <tr> 
          <td>将以上代码复制并插入需要统计的页面.</td>
        </tr>
      </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr class=titlefont_03> 
          <td><div align="right"><a href="#" onclick="window.history.go(-1)">返回－<strong>上一级</strong></a></div></td>
        </tr>
      </table>
      <table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr> 
          <td>如果您将统计代码在框架中使用，也许下面更适合你。如果上面代码可以正常使用，请不要使用下面代码。【{/$countlogotext|default:"PHPStat"/}】</td>
        </tr>
        <tr> 
          <td><textarea name="textarea2" onFocus="this.select()" readonly cols="80" rows="7">
<!-- phpstat.net -->
<script language="javascript" type="text/javascript">
var _PCSIframe = true;
var _PCSWebSite="{/$website/}";
var _PCSText="{/$countlogo|default:"宝贝统计"/}";
</script>
<span id="PCSCount" name="PCSCount"></span>
<script language="javascript" src="{/$Countlink/}" ></script>
<!-- /phpstat.net -->
</textarea></td>
        </tr>
        <tr> 
          <td>将以上代码复制并插入需要统计的页面.</td>
        </tr>
      </table>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr class=titlefont_03> 
          <td><div align="right"><a href="#" onclick="window.history.go(-1)">返回－<strong>上一级</strong></a></div></td>
        </tr>
      </table>
      <table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr> 
          <td>如果您将统计代码在js中使用document.write进行输出，也许下面更适合你。如果上面代码可以正常使用，请不要使用下面代码。【{/$countlogotext|default:"PHPStat"/}】</td>
        </tr>
        <tr> 
          <td><textarea name="textarea3" onFocus="this.select()" readonly cols="80" rows="7">
<!-- phpstat.net -->
<script language="javascript" type="text/javascript">
var _PCSType = 2;
var _PCSWebSite="{/$website/}";
var _PCSText="{/$countlogo|default:"宝贝统计"/}";
</script>
<span id="PCSCount" name="PCSCount"></span>
<script language="javascript" src="{/$Countlink/}" ></script>
<!-- /phpstat.net -->
</textarea></td>
        </tr>
        <tr> 
          <td>将以上代码复制并插入需要统计的页面.</td>
        </tr>
      </table></td>
  </tr>
  <tr valign="middle" class=titlefont> 
    <td colspan="2" class=line_title><strong><a href="#gj">高级模式</a><a name="gj"></a></strong></td>
  </tr>
  <tr valign="middle" >
    <td colspan="2" class=line_title><div align="right">
        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr class=titlefont_03> 
            <td><div align="right"><a href="#" onclick="window.history.go(-1)">返回－<strong>上一级</strong></a></div></td>
          </tr>
        </table>
        <a href="#" onclick="window.history.go(-1)"></a></div></td>
  </tr>
  <tr> 
    <td colspan="2" valign="top">可以自定义让统计代码显示一下数据,并可设置顺序 
      图列:<br>
      【{/$countlogotext|default:"PHPStat"/}[今日访问:10205][今日IP:4508][本小时访问:2425][本小时IP:452] 
      】 </td>
  </tr>
  <tr> 
    <td colspan="2" valign="top"><table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr> 
          <td> 
            显示附加:<br> 
            <label for="DayCount"> 
            <input name="DayCount" type="checkbox" id="DayCount" value="DayCount" onclick="ChSel();">
            今日访问量</label> 
            <br> 
            <label for="DayIpCount"> 
            <input name="DayIpCount" type="checkbox" id="DayIpCount" value="DayIpCount" onclick="ChSel();">
            今日IP访问量</label> 
            <br> 
            <label for="HourCount"> 
            <input name="HourCount" type="checkbox" id="HourCount" value="HourCount" onclick="ChSel();">
            本小时访问量</label> 
            <br> 
            <label for="HourIpCount"> 
            <input name="HourIpCount" type="checkbox" id="HourIpCount" value="HourIpCount" onclick="ChSel();">
            本小时IP访问量</label> 
          </td>
          <td align="right"><select name="SelItem" size="5" id="SelItem" style="width:120;">
            </select> 
          </td>
          <td><input type="submit" name="Submit" value="上移" onclick="ChUp();" class=pagebutton> 
            <br> 
            <input type="submit" name="Submit" value="下移" onclick="ChDown();" class=pagebutton></td>
        </tr>
      </table>
      <table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr> 
          <td><div align="center"> 
              <input type="submit" name="Submit" value="更新代码" onclick="ChangeCode();" class=pagebutton>
              &nbsp; 
            </div></td>
        </tr>
        <tr> 
          <td></td>
        </tr>
        <textarea name="codearea" cols="80" rows="7" readonly id="codearea" onFocus="this.select()"></textarea>
        <tr> 
          <td>将以上代码复制并插入需要统计的页面.</td>
        </tr>
        <tr> 
          <td></td>
        </tr>
      </table></td>
  </tr>
</table>

<script language="javascript" type="text/javascript">

ObjArr = new Array();

ObjArr[0] = new Array(DayCount,"今日访问量");

ObjArr[1] = new Array(DayIpCount,"今日IP访问量");

ObjArr[2] = new Array(HourCount,"本小时访问量");

ObjArr[3] = new Array(HourIpCount,"本小时IP访问量");



function ChSel()

{

	SelItem.length = 0; 

	for( i=0; i < ObjArr.length; i++ )

	{

		if( ObjArr[i][0].checked )

		{

			SelItem.options[SelItem.length] = new Option(ObjArr[i][1],ObjArr[i][0].name);

		}

	}

	ChangeCode();

}



function ChUp()

{

	if( SelItem.selectedIndex > 0 )

	{

		ChItem = SelItem.options[SelItem.selectedIndex-1];

		ChItemValue = ChItem.value;

		ChItemText = ChItem.text;

		

		ChItem.value = SelItem.options[SelItem.selectedIndex].value;

		ChItem.text = SelItem.options[SelItem.selectedIndex].text;

		SelItem.options[SelItem.selectedIndex].value = ChItemValue;

		SelItem.options[SelItem.selectedIndex].text = ChItemText;

		SelItem.selectedIndex--;

	}

	ChangeCode();

}



function ChDown()

{

	if( SelItem.selectedIndex < SelItem.length -1 )

	{

		ChItem = SelItem.options[SelItem.selectedIndex+1];

		ChItemValue = ChItem.value;

		ChItemText = ChItem.text;

		

		ChItem.value = SelItem.options[SelItem.selectedIndex].value;

		ChItem.text = SelItem.options[SelItem.selectedIndex].text;

		SelItem.options[SelItem.selectedIndex].value = ChItemValue;

		SelItem.options[SelItem.selectedIndex].text = ChItemText;

		SelItem.selectedIndex++;

	}

	ChangeCode();

}



function ChangeCode()

{

	Code1='';

	Code='';

	Code = "\<\script\>\n";

	//Code += "var _Debug = false;\n";

	for( i=0; i<SelItem.length; i++)

	{

		if( Code1 == '' )

		{

			Code1 = "'" + SelItem.options[i].value + "'";

		}

		else

		{

			Code1 += ", '" + SelItem.options[i].value + "'";

		}

	}
	Code ="<!-- phpstat.net -->\n<script language=\"javascript\" type=\"text/javascript\">\n";
	if( Code1 != '' )	Code += "var _PCSShow = [ " + Code1 + " ];\n";
	var _PCSImage="{/$countlogo/}";
	Code += "\var _PCSWebSite=\"{/$website/}\";\n";
	Code += "\var _PCSText=\"{/$countlogo|default:"宝贝统计"/}\";\n</script\>\n";

	Code += "\<script language=\"javascript\" type=\"text/javascript\" src=\"{/$Countlink/}\" \>\</script\>\n";
	Code +="<!-- /phpstat.net -->";
	codearea.value=Code;

}



function yulan()

{

  var code=codearea.value;//即要运行的代码。

  var newwin=window.open('/_temp/none.html','','');  //打开一个窗口并赋给变量newwin。

  newwin.opener = null // 防止代码对论谈页面修改

  newwin.document.write('<html><body>\<script\>alert("a");\</script\>ddd' + code + 'ddd</body></html>');  //向这个打开的窗口中写入代码code，这样就实现了运行代码功能。

  

  newwin.document.close();

}



ChangeCode();

</script>