{/**/}
{/* ===========================================*/}
{/* 项目: Ourplus网站流量统计分析系统*/}
{/* 版本: Bate1*/}
{/* 开发: 看海*/}
{/* ===========================================*/}
{/* Copyright (c) 2004 - 2005*/}
{/* 主页: http://stat.ourplus.com*/}
{/* 信箱: fantasysisky@hotmail.com*/}
{/* 版权所有: 本软体为共享软体(shareware)提供个人网站免费使用，作者看海 (stat.ourplus.com) 保留全部权力，受相关法律和国际公约保护，请勿非法修改、转载、散播，或用于其他赢利行为，并请勿删除版权声明。*/}
{/* ===========================================*/}
{/**/}
<table width="600" border="0" align="center" cellpadding="3" cellspacing="1" style="border:1px solid #000000 ">

  <tr>

    <td valign="top"><strong><a href="#jd">简单模式</a><a name="jd"></a></strong></td>

    <td valign="top"><strong><a href="#gj">高级模式</a></strong></td>

  </tr>

  <tr align="center">

    <td colspan="2"  style="border-bottom:1px solid #000000;"><table width="600" border="0" align="center" cellpadding="3" cellspacing="1">

      <tr>

        <td>统计代码:</td>

      </tr>

      <tr>

        <td><textarea name="textarea" onFocus="this.select()" readonly cols="80" rows="5" ><script language="javascript" type="text/javascript" src="{/$Countlink/}" ></script></textarea></td>

      </tr>

      <tr>

        <td>将以上代码复制并插入需要统计的页面.</td>

      </tr>

    </table>

      <table width="600" border="0" align="center" cellpadding="3" cellspacing="1">

        <tr>

          <td>如果您将统计代码在js中使用document.write进行输出，也许下面更适合你。如果上面代码可以正常使用，请不要使用下面代码。</td>

        </tr>

        <tr>

          <td><textarea name="textarea" onFocus="this.select()" readonly cols="80" rows="5"><script language="javascript" type="text/javascript">
var _OurplusType = 2;
</script>
<span id="OurplusCount" name="OurplusCount"></span>
<script language="javascript" src="{/$Countlink/}" ></script></textarea></td>

        </tr>

        <tr>

          <td>将以上代码复制并插入需要统计的页面.</td>

        </tr>

      </table></td>

  </tr>

  <tr>

    <td colspan="2" valign="top"><strong><a href="#gj">高级模式</a><a name="gj"></a></strong></td>

  </tr>

  <tr>

    <td colspan="2" valign="top">可以自定义让统计代码显示一下数据,并可设置顺序

    图列:<br>

    <img name="" src="imagefiles/yl.gif" alt="" style="border:1px solid #000;"></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();">

          <br>

          <input type="submit" name="Submit" value="下移" onclick="ChDown();"></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();">

&nbsp;

          </div></td>

        </tr>

        <tr>

          <td><textarea name="codearea" cols="80" rows="5" readonly id="codearea" onFocus="this.select()"></textarea></td>

        </tr>

        <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 + "'";

		}

	}

	if( Code1 != '' )	Code += "var _OurplusShow = [ " + Code1 + " ];\n";

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

	Code += "\<script language=\"javascript\" type=\"text/javascript\" src=\"{/$Countlink/}\" \>\</script\>";

	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>