<script language=JavaScript1.2>
function showsubmenu(ss,ii,aa)
{
var menuobjedt=document.getElementById(ss);
if (menuobjedt)
{
 if (menuobjedt.style.display=="none") 
  {menuobjedt.style.display="";
}
 else
  {menuobjedt.style.display="none"; 
   }
}
}
function ismail(mail)
{
	return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(mail));
}
function isstr(website)
{
	return(/[^a-zA-Z]/g.test(website));
}
function regcheck(formct){
	if (!ismail(formct.email.value)){
		alert('email格式不对,请填写');
		return false;
	}
}
function sitecheck(formct){
	if (formct.sitename.value == ""){
		alert('站点名称为空,请填写');
		return false;
	}
	if (formct.website.value == ""){
		alert('站点代码为空,请填写');
		return false;
	}
	if (isstr(formct.website.value)){
		alert('站点代码格式不对,请填写');
		return false;
	}
	if (formct.site.value == ""){
		alert('站点地址为空,请填写');
		return false;
	}
}
function openwindow(strURL){
	strURL = strURL;
	nWidth = screen.availWidth;
	nHeight = screen.availHeight;
	window.open(strURL, "","toolbar=no,location=no,directories=no,status=yes,"+ "menubar=no,copyhistory=no,left=0,top=0,scrollbars=yes,resizable=yes,"+ "width=" + nWidth + ",height=" + nHeight);
}
</script>
<br>

  {/if $selectMode 
  == "user"/}
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" > 
  <tr class=line_title> 
    <td><form name="formuser" method="post" action="" onSubmit='return regcheck(formuser)'>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td><strong><a href="#">图片模式</a></strong></td>
            <td><div align="right"><a href="site_list.php?website=true&action=sitelist">返回－<strong></strong><strong>站点列表</strong></a></div></td>
          </tr>
        </table>
      </form></td>
  </tr></table>
  {//if/} {/if 
  $selectMode 
  == "site"/}
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" > 
  <tr valign="top"> 
    <td height="432"> 
      <form action="" method="post" name="formedit" id="formedit"  onSubmit='return sitecheck(formedit)'>
        
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class=titlefont> 
          <td >添加/修改一个站点的信息</td>
          <td ><div align="right"><a href="site_list.php?website=true&action=sitelist"></a></div></td>
        </tr>
      </table>
        
      <table style="BORDER-COLLAPSE: collapse" borderColor=#93C2DC cellPadding=2 width="100%" border=1>
        <tr> 
          <td width="20%" height="26"><strong>站点信息</strong></td>
          <td width="80%" height="26">&nbsp;</td>
        </tr>
        <tr> 
          <td height="26">站点名称*</td>
          <td height="26"> 
            <input name="sitename" type="text" id="sitename" value="{/$UserData.sitename/}" maxlength="10" class=input> 
          </td>
        </tr>
        <tr> 
          <td height="26">站点代码*</td>
          <td height="26"> 
            <input name="website" type="text" id="sitename" value="{/$UserData.website/}" maxlength="10"  class=input>
            站点统计代码,字符[a-Z]</td>
        </tr>
        <tr> 
          <td height="26">站点介绍*</td>
          <td height="26"> 
            <input name="sitedes" type="text" id="sitedes" value="{/$UserData.sitedes/}" size="50" maxlength="125"  class=input> 
          </td>
        </tr>
        <tr> 
          <td height="26">站点地址*</td>
          <td height="26"> 
            <input name="site" type="text" id="site" value="{/$UserData.site/}" size="50" maxlength="125"  class=input> 
          </td>
        </tr>
        <tr> 
          <td height="26">统计类型*</td>
          <td height="26"> 
            <select name="sitetype"  class=input>
              <option value={/$UserData.sitetypevalue/}>{/$UserData.sitetypetext/}</option>
              <option value=0>作为主站</option>
			  {/foreach item=Item key=Key from=$sitetype/} 
			    <option value={/$Item.website/}>作为 {/$Item.sitename/} 的频道或者子站</option>
			  {//foreach/}
              <!--FIXME-->
            </select> 
          </td>
        </tr>
        <tr> 
          <td height="26">公开统计结果*</td>
          <td height="26"> 
            <select name="siteshow"  class=input>
              <option selected value={/$UserData.siteshow/}>{/$UserData.siteshowtext/}</option>
              <option value=no>需要密码</option>
              <option value=yes>公开结果</option>
              <!--FIXME-->
            </select> 
          </td>
        </tr>
        <tr> 
          <td height="27" colspan="2"> 
            <div align="center"><font color="#FFFFFF"> 
              <input name="action" type="hidden" id="action" value="{/$action|default:"updatesite"/}">
              <input name="websiteid" type="hidden" id="websiteid" value="{/$UserData.id/}">
              </font> 
              <input name="button" type="submit" class=pagebutton id="button" value=" {/$submit|default:"修改"/}">
			  <input name="button" type="button" class=pagebutton id="button" value=" 返回" onclick="window.history.go(-1)">
            </div>
            <div align="left"></div></td>
        </tr>
        <tr>
          <td height="27" colspan="2"><div align="right"><a href="site_list.php?website=true&action=sitelist">返回－<strong></strong><strong>站点列表</strong></a></div></td>
        </tr>
      </table>
	  </form>
		 {//if/} {/if $selectMode  ==  "sitelist"/} 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
         
          <tr>
            <td >&nbsp;</td>
          </tr>
        </table>
        
      <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#93C2DC cellPadding=2 width="100%" border=1>
        <tr class=titlefont> 
          <td height="25" colspan="5" ><div align="right">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr > 
                  <td><strong>&nbsp;&nbsp;网站配置信息</strong></td>
                  <td><div align="right"><strong><a href="user_info.php?website=true&action=addsite">添加新的网站配置信息</a>&nbsp;&nbsp;&nbsp;&nbsp;</strong></div></td>
                </tr>
              </table></td>
        </tr>
        <tr> 
          <td height="25" colspan="5" >&nbsp;</td>
        </tr>
        <tr class=titlefont> 
          <td width="25%" >&nbsp;站点名称</td>
          <td width="10%" >&nbsp;总浏览量</td>
          <td width="10%" >&nbsp;总IP</td>
          <td width="45%" >&nbsp;管理</td>
          <td width="10%" >状态</td>
        </tr>
        {/foreach item=Item from=$UserData1/} 
        <tr> 
          <td  height="30" >&nbsp;<a href={/$Item.site/} target="_blank">{/$Item.sitename/}</a></td>
          <td  height="30" >&nbsp;{/$Item.all_count/}</td>
          <td  height="30" >&nbsp;{/$Item.all_count_ip/}</td>
          <td  height="30" align=center>&nbsp;<a href='#' onclick="openwindow('index.php?website={/$Item.website/}')"><strong>统计报告</strong></a>&nbsp;<strong><A HREF="#" onclick="window.open('pop.php?website={/$Item.website/}','RSS订约地址','')">RSS订阅</A></strong>&nbsp;{/if $Item.session == 'admin' or $Item.session == 'superadmin' or $Item.session == 'strongsuperadmin'/}<a href=getcode.php?website={/$Item.website/}>统计代码</a>&nbsp;[<a href=#>暂停统计</a>&nbsp;<a href=user_info.php?action=editsite&website={/$Item.website/}>编辑站点</a>&nbsp;<a href="javascript:if(confirm('确实要清空该站点[{/$Item.sitename/}]的统计信息吗?该操作不可逆转!')) location='manage_all_site.php?website={/$Item.website/}&ac=truncate'">清空站点</a>&nbsp;<a  href="javascript:if(confirm('确实要删除该站点[{/$Item.sitename/}]的统计信息吗?该操作不可逆转!')) location='manage_all_site.php?website={/$Item.website/}&ac=del'">删除站点</a>]{//if/} 
          </td>
          <td align=center><font color="#FF0000" disabled>正在接收数据</font></td>
        </tr>
        {//foreach/} 
      </table>        
      <p>
	  {/if $ViewUser == "true"/}
        <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#93C2DC cellPadding=2 width="100%" border=1>
          <tr class=titlefont> 
            <td height="25" colspan="7" ><div align="right"> 
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td><strong>&nbsp;&nbsp;拥有网站访问权用户</strong></td>
                    <td><div align="right"><strong><a href="adduser.php?action=register" target="_blank">添加用户</a>&nbsp;&nbsp;&nbsp;&nbsp;</strong></div></td>
                  </tr>
                </table>
              </div></td>
          </tr>
          <tr> 
            <td height="25" colspan="7" >&nbsp;</td>
          </tr>
          <tr class=titlefont> 
            <td width="20%" >&nbsp;用户</td>
            <td width="20%" >&nbsp;电子邮件地址</td>
            <td width="20%" >&nbsp;用户类型</td>
            <td width="10%" >&nbsp;设置</td>
            <td width="10%" >&nbsp;报告预览</td>
            <td width="10%" >&nbsp;删除</td>
            <td width="10%" >&nbsp;</td>
          </tr>
          {/foreach item=Item from=$UserData2/} 
          <tr> 
            <td  height="30" >&nbsp;{/$Item.manager/}</td>
            <td  height="30" >&nbsp;{/$Item.email/}</td>
            
          <td  height="30" >&nbsp;{/$Item.group/}</td>
            <td align=center>&nbsp;<a href="manage_user.php?action=edituser&managerid={/$Item.manager/}">修改</a></td>
            <td  height="30" align=center disabled>报告预览 </td>
            <td align=center><a href="#" onclick="javascript:if(confirm('确实要删除该用户吗?该操作不可逆转'))location='manage_user.php?action=del&managerid={/$Item.manager/}'">删除</a> </td>
            <td align=center>&nbsp;</td>
          </tr>
          {//foreach/} 
        </table>		
        
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td width="50%"> <TABLE width="99%" border=1 align="left" cellPadding=2 borderColor=#93C2DC style="BORDER-COLLAPSE: collapse">
              <tr class=titlefont> 
                <td height="25" ><div align="right"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td><strong>&nbsp;&nbsp;数据库运行信息</strong></td>
                        <td><div align="right"><strong><a href="manage_db.php">优化数据库</a>&nbsp;&nbsp;&nbsp;</strong></div></td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
              <tr> 
                <td  height="40" ><font color="#666666">作为一个访问量很大的网站(日20万人次以上)的数据库系统,经常优化数据库，保持统计运行速度，在Linux高负载下mysql数据库依然性能优越。</font></td>
              </tr>
            </table></td>
          <td width="50%"> <TABLE width="99%" border=1 align="right" cellPadding=2 borderColor=#93C2DC style="BORDER-COLLAPSE: collapse">
              <tr class=titlefont> 
                <td width="60%" height="25" colspan="3" ><div align="right"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td><strong>&nbsp;&nbsp;软件配置信息</strong></td>
                        <td><div align="right"><strong><a href="syscfg.php">查阅配置</a>&nbsp;&nbsp;&nbsp;&nbsp;</strong></div></td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
              <tr> 
                <td height="40" colspan="3" ><font color="#666666">在这里可以了解到与软件运行相关的配置文件信息，包括域名，用户数，统计站点数以及产品序列号。</font></td>
              </tr>
            </table></td>
        </tr>
      </table>
	  {//if/}
      
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td height="22"><TABLE width="100%" border=1 align="right" cellPadding=2 borderColor=#93C2DC style="BORDER-COLLAPSE: collapse">
            <tr class=titlefont> 
              <td height="25" ><div align="right"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><strong>&nbsp;&nbsp;资讯/更新/打印报表设置</strong></td>
                      <td><div align="right"><strong>&nbsp;&nbsp;&nbsp;</strong></div></td>
                    </tr>
                  </table>
                </div></td>
            </tr>
            <tr> 
              <td  height="40" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td width="33%"><a href="checkupdate.php" target="_blank">检查更新</a><br> 
                    </td>
                    <td width="33%"><a href="http://www.phpstat.net/Article/Class_4_Time_1.html" target="_blank">最新资讯</a></td>
                    <td width="33%">打印设置</td>
                  </tr>
                  <tr> 
                    <td width="33%"><font color="#666666">寻找官方最新版本信息</font></td>
                    <td width="33%"><font color="#666666">查看官方主页资讯</font></td>
                    <td width="33%"><font color="#666666"><a href="tools/cab/printhelp.html" target="_blank">打印设置</a></font></td>
                  </tr>
                </table></td>
            </tr>
          </table> </td>
      </tr>
    </table>

    <p>&nbsp;</p>
    <p>{//if/} </p>