<table cellspacing="2" cellpadding="1" width="670" align="center" border="0">
  <tbody>
    <tr>
      <td height="74"> <span class="heading">PHPStat Counter 安装数据库</span>
        <hr align="left" size="1" width="100%"/>
        
          <table width="100%" border="0" cellspacing="３" cellpadding="２">
            <tr>
              <td width="28%" rowspan="4"><table width="90%" height="200" border="0" cellpadding="5" cellspacing="3" style="border-right:2px solid #cccccc;">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>1.检查目录属性</td>
                </tr>
                <tr>
                  <td>2.检查参数设置</td>
                </tr>
                <tr>
                  <td>3.安装数据库</td>
                </tr>
                <tr>
                  <td><span class="heading">4.安装完成</span></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
              <td width="17%" height="25" align="right">&nbsp;</td>
              <td width="55%" height="25">&nbsp;</td>
            </tr>
            <tr>
              <td height="25" colspan="2" align="center"><div class=heading>安装完成，请进行下一步操作!</div></td>
            </tr>
            <tr>
              <td height="20" align="right">&nbsp;</td>
              <td height="20">&nbsp;</td>
            </tr>
            
            
            
            <tr>
              <td height="100">
		    <?
			$localdomain = 'http://' . $_SERVER["HTTP_HOST"] . dirname( $_SERVER["PHP_SELF"] );
			if(substr($localdomain,-1) == '\\')
			{
				$localdomain = substr($localdomain,0,-1);
			}
			$content = read_from_file( COUNT_DIRNAME.'/js/count.js' );
			$content = str_replace( 'COUNTER_INSTALL_URL' , $localdomain, $content );
	
			$content_com = read_from_file(  COUNT_DIRNAME.'/js/count.com.php' );
			$content_com = str_replace( 'COUNTER_INSTALL_URL' , $localdomain, $content_com );
	
			write_to_file(  COUNT_DIRNAME . '/count.js', $content );
			write_to_file(  COUNT_DIRNAME . '/count.com.php', $content_com );
			copy( COUNT_DIRNAME.'/js/count.php', COUNT_DIRNAME . '/count.php' );

			@mkdir('./' . COUNT_DIRNAME . '/count');
			@mkdir('./' . COUNT_DIRNAME . '/bot');
			@mkdir('./' . COUNT_DIRNAME . '/errors');
			@mkdir('./' . COUNT_DIRNAME . '/exclusion');
			@mkdir('./' . COUNT_DIRNAME . '/pagerank');

			@rename('install.php','install.lock');	
	
			  ?>			  </td>
              <td><div align="center"> <br />
                  
                  <input name=Submit type=button class=button onclick=window.location='login.php' value=删除安装文件,并跳转到登录界面>
			
              </div>
              <br />
              <strong>注:有些服务器不支持在线删除,请使用FTP软件删除根目录下的install.lock和install目录</strong></td>
            </tr>
          </table>
        <p>&nbsp;</p></td>
    </tr>
    <tr>
      <td height="18">&nbsp;</td>
    </tr>
  </tbody>
</table>
