<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="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='index.php?website={/$Item.website/}' target="_blank"><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>{/if $Item.all_count == 0/}<font color="#FF0000" disabled>正在接收數據</font>{//if/}{/if $Item.all_count > 0/}<font color="#FF0000">正在接收數據</font>{//if/}</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;<a href="manage_user.php?action=common">管理用戶</a>&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%" height="16"><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%"><font color="#666666"><a href="tools/cab/printhelp.html" target="_blank">打印設置</a></font></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">打印設置</font></td>
                  </tr>
                </table></td>
            </tr>
          </table> </td>
      </tr>
    </table>

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