<!--
<?php
print <<<EOT
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>PHP168整站系統安裝程式</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #E6E6E6;
}
td{
	font-size: 9pt;
}
.style1 {
	color: #FFFFFF;
	font-size: 9pt;
	line-height: 16px;
}
.style5 {font-size: 18px; font-family: "黑體";}
.style9 {
	font-size: 9pt;
	color: #666666;
	line-height: 16px;
}
.style11 {
	color: #990000;
	font-weight: bold;
	font-family: Arial, Helvetica, sans-serif;
}
.style13 {font-family: Arial, Helvetica, sans-serif}
.style17 {font-size: 18px; font-family: "黑體"; color: #990000; }
.style18 {color: #000000}
-->
</style>
</head>

<body>
<table width="100%" height="90"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="1%" class="style5">&nbsp;</td>
    <td height="59" class="style5">歡迎您使用<strong>PHP168</strong>整站系統<br>
      該界面為<span class="style11">程序初始化</span><span class="style5">安裝</span> </td>
    <td width="580" align="right" background="install/images/b_right.gif" class="style5">&nbsp;</td>
  </tr>
</table>
<table width="100%" height="33"  border="0" cellpadding="0" cellspacing="0" background="install/images/Bottom.gif">
  <tr>
    <td class="style13">&nbsp;</td>
  </tr>
</table>
<table width="770" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF" class="style9">
  <tr>
    <td> 
      <!--
EOT;
if($job=='start'){
print <<<EOT
-->
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        <form name="form40" id="form40" method="post" action="?action=end_choose">
          <tr> 
            <td colspan="2">安裝前,如果你的服務器不是windows的話,請確認已修改以下文件與目錄屬性為0777可寫,否則會運行不正常<br>
				
              <font color="#FF0000">php168/</font> 目錄與目錄下所有文件<br>
			  <font color="#FF0000">upload_files/</font> 目錄與目錄下所有文件<br>
              <font color="#FF0000">cache/</font> 目錄與目錄下所有文件</td>
          </tr>
          <tr> 
            <td colspan="2" align="center"> 
              <input type="radio" name="ifpassport" id="ifpassport0" value="0"   onclick="document.getElementById('ifpassport_tr').style.display='none';" $readonly2 checked>
              獨立安裝 
      <!--
EOT;
if($addPW){
print <<<EOT
-->
			  <input type="radio" name="ifpassport" id="ifpassport2" value="2"  onclick="document.getElementById('ifpassport_tr').style.display='none';"  >
              同時全新安裝一個phpwind論壇(將刪除原有論壇)  
      <!--
EOT;
}
print <<<EOT
-->
              <input type="radio" name="ifpassport" id="ifpassport1" value="1" onclick="document.getElementById('ifpassport_tr').style.display='';">
              整合已有論壇(比如:phpwind、discuz、動網PHP論壇)</td>
          </tr>
          <tr id="ifpassport_tr" style="display:none;"> 
            <td width="24%" align="right">請選擇整合哪個論壇:</td>
            <td width="76%"> 請必須確認已安裝其中一個論壇，並且整站的數據庫要跟論壇同在一個庫里<br>
              <input type="radio" name="passportType" value="pwbbs5" checked>
              phpwind論壇5.x/6.x/7.x<br>
              <input type="radio" name="passportType" value="dzbbs5" disabled>
              discuz論壇(只能安裝後,再手工設置整合uc_center)<br>
              論壇相對整站的目錄︰ 
              <input type="text" name="passportPath" size="9" value="bbs">
              <br>
              舉例︰<br>
              情況一︰<br>
              論壇︰http://www.php168.com/bbs/<br>
              整站︰http://www.php168.com/<br>
              此時上面輸入<font color="#FF0000"><b>bbs</b></font><br>
              情況二︰ <br>
              論壇︰http://www.php168.com/<br>
              整站︰http://www.php168.com/web/<br>
              此時上面輸入<font color="#FF0000"><b>../</b></font><br>
              情況三︰ <br>
              論壇︰http://www.php168.com/bbs/<br>
              整站︰http://www.php168.com/web/<br>
              此時上面輸入<font color="#FF0000"><b>../bbs</b></font><br>
              論壇數據表前綴︰ 
              <input type="text" name="passportPre" size="8" value="pw_">
              PW論壇默認是<font color="#0000FF">pw_</font> 如果你修改過的話,對應要使用修改後的<br>
              注意:如果跟論壇不同一個數據庫,數據表前面需要加上論壇數據庫的名字如“<font color="#FF0000">db3.pw_</font>”</td>
          </tr>
          <tr> 
            <td colspan="2" align="center"> 
              <input type="submit" name="Submit3" value="點擊下一步"><SCRIPT LANGUAGE="JavaScript">
<!--
function choose_passport(t){
	document.getElementById('ifpassport0').checked=false;
	document.getElementById('ifpassport1').checked=false;
	if(t==0||t==''){
		document.getElementById('ifpassport_tr').style.display='none';
		document.getElementById('ifpassport0').checked=true;
	}else{
		document.getElementById('ifpassport_tr').style.display='';
		document.getElementById('ifpassport1').checked=true;
	}
	if(t==2){
		form=document.getElementById('form40');
		for (var i=0;i<form.elements.length;i++){
			var e = form.elements[i];
			if(e.type=='submit')continue;
			e.readOnly=true;
		}
	}
}
choose_passport('$ifPW');
//-->
</SCRIPT>


 
            </td>
          </tr>
        </form>
      </table>
      <!--
EOT;
}
print <<<EOT
-->
      <!--
EOT;
if($job=='addmysqlpwd'){
print <<<EOT
-->
      <font color="#0000FF">注︰MYSQL數據庫帳號、數據庫密碼、所使用的數據庫請向空間商咨詢或購買。 </font> 
      <form name="form1" method="post" action="?action=addmysqlpwd"> 
        <table width="98%" cellspacing="0" cellpadding="4">
          <tr> 
            <td width="33%">數據庫主機:</td>
            <td width="67%"> 
              <input type="text" name="dbhost" value="$dbhost">
              <font color="#0000FF" size="2">(一般不必修改)</font> </td>
          </tr>
          <tr> 
            <td width="33%">數據庫帳號(即是用戶名):</td>
            <td width="67%"> 
              <input type="text" name="dbuser" value="$dbuser">
            </td>
          </tr>
          <tr> 
            <td width="33%">數據庫密碼:</td>
            <td width="67%"> 
              <input type="text" name="dbpw" value="$dbpw">
            </td>
          </tr>
          <tr> 
            <td width="33%">所使用的<font color="#0000FF">數據庫</font>:</td>
            <td width="67%"> 
              <input type="text" name="dbname" value="$dbname">
            </td>
          </tr>
          <tr> 
            <td width="33%">整站數據表區分符:</td>
            <td width="67%"> 
              <input type="text" name="db168" value="p8_">
              <font color="#0000FF" size="2">建議不要修改,方便以後升級維護，並減少出錯的機會</font> </td>
          </tr>
          <tr> 
            <td width="33%">數據庫支持的編碼:</td>
            <td width="67%">
              <select name="dbcharset">
                <option value="gbk">默認</option>
                <option value="latin1">latin1</option>
                <option value="gbk">gbk</option>
                <option value="utf8">utf8</option>
                <option value="big5">big5</option>
              </select>
              {$charset_msg}一般情況不必選擇</td>
          </tr>
          <tr> 
            <td width="33%"> 
              <input type="hidden" name="ifpassport" value="$ifpassport">
              <input type="hidden" name="passportType" value="$passportType">
              <input type="hidden" name="passportPath" value="$passportPath">
              <input type="hidden" name="passportPre" value="$passportPre">
            </td>
            <td width="67%"> 
              <input type="submit" name="Submit" value="點擊下一步">
            </td>
          </tr>
        </table>
      </form>
      <!--
EOT;
}
if($job=='exist_sql'){
print <<<EOT
-->
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td>
            <p align="center"><b><font size="6" color="#FF0000">特別提醒！！！</font></b></p>
            <p>系統已檢測到你已經安裝了相關論壇或整站程序, 你是否還要繼續,如果是的話.將會清空原來的數據,請仔細考慮, 此時建議你修改數據表前綴,把<font color=red> 
              {$db168} </font>換成其他的吧 </p>
          </td>
        </tr>
        <tr>
          <td>
            <table width="98%" cellspacing="0" cellpadding="4">
              <form name="form2" method="post" action="?action=addmysqlpwd">
                <tr> 
                  <td width="21%">整站數據表區分符:</td>
                  <td width="79%"> 
                    <input type="text" name="db168" value="php168_">
                    <font color="#0000FF" size="2">建議修改，否則將會清空原來的數據</font></td>
                </tr>
                <tr> 
                  <td width="21%"> <input type="hidden" name="ifpassport" value="$ifpassport">
              <input type="hidden" name="passportType" value="$passportType">
              <input type="hidden" name="passportPath" value="$passportPath">
              <input type="hidden" name="passportPre" value="$passportPre">

                    <input type="hidden" name="step" value="continue">
                  </td>
                  <td width="79%"> 
                    <input type="submit" name="Submit2" value="繼續下一步">
                    <input type="hidden" name="dbhost" value="$dbhost">
                    <input type="hidden" name="dbuser" value="$dbuser">
                    <input type="hidden" name="dbpw" value="$dbpw">
                    <input type="hidden" name="dbname" value="$dbname">
                    <input type="hidden" name="dbcharset" value="$dbcharset">
                  </td>
                </tr>
              </form>
            </table>
          </td>
        </tr>
      </table>
      <!--
EOT;
}
if($job=='adduser'){
print<<<EOT
-->
      <table width="100%" cellspacing="0" cellpadding="0">
        <form name="form3" method="post" action="?action=adduser">
          <tr> 
            <td colspan="2"> 
              <div align="center"><b><font color="#FF0000" size="6">請設置管理員帳號密碼</font></b></div>
            </td>
          </tr>
          <tr align="left"> 
            <td height="4" colspan="2"> <font color="#0000FF">
			
      <!--
EOT;
if($ifPW){
print<<<EOT
-->    
提示:當前系統版本為︰php168&phpwind整合版,建議使用默認管理員帳號.

  <!--
EOT;
}elseif($ifpassport==1){print<<<EOT
-->
			提示:你選擇了整合論壇,請必須把帳號密碼設置與論壇的帳號密碼一樣.
      <!--
EOT;
}
print<<<EOT
-->
			</font></td>
          </tr>
          <tr> 
            <td height="4" align="right"><font color="#FF0000">超級管理員帳號</font>︰</td>
            <td height="4"> 
              <input type="text" name="admin_name" value="$default_admin" $readonlymsg>
            </td>
          </tr>
          <tr> 
            <td height="4"> 
              <div align="right"><font color="#0000FF">超級管理員密碼</font>︰</div>
            </td>
            <td height="4"> 
              <input type="password" name="admin_pwd">
            </td>
          </tr>
          <tr> 
            <td height="2"> 
              <div align="right"><font color="#0000FF">重復輸入管理密碼</font>︰</div>
            </td>
            <td height="2"> 
              <input type="password" name="admin_pwd2">
            </td>
          </tr>
          <tr> 
            <td height="0"> 
              <div align="right">電子郵箱︰</div>
            </td>
            <td height="0"> 
              <input type="text" name="admin_email" value="admin@admin.com">
            </td>
          </tr>
          <tr>
            <td height="1" align="right">是否清空測試數據︰</td>
            <td height="1">
              <input type="radio" name="delete_all" value="0" checked>
              保留（推薦） 
              <input type="radio" name="delete_all" value="1" $readonly2>
              清空（不推薦） </td>
          </tr>
          <tr style="display:none;"> 
            <td height="1"> 
              <div align="right"></div>
            </td>
            <td height="1"> 
              <input type="radio" name="is_del" value="1" checked>
              自動刪除安裝文件</td>
          </tr>
          <tr> 
            <td colspan="2" height="23"> 
              <input type="hidden" name="ifpassport" value="$ifpassport">
              <input type="hidden" name="passportType" value="$passportType">
              <input type="hidden" name="passportPath" value="$passportPath">
              <input type="hidden" name="passportPre" value="$passportPre">
              <input type="hidden" name="dbhost" value="$dbhost">
              <input type="hidden" name="dbuser" value="$dbuser">
              <input type="hidden" name="dbpw" value="$dbpw">
              <input type="hidden" name="dbname" value="$dbname">
              <input type="hidden" name="db168" value="$db168">
              <input type="hidden" name="dbcharset" value="$dbcharset">
            </td>
          </tr>
          <tr> 
            <td colspan="2"> 
              <div align="center"> 
                <input type="submit" name="Submit22" value="繼續下一步">
              </div>
            </td>
          </tr>
        </form>
      </table> 
      <!--
EOT;
}
if($job=='succee'){
print<<<EOT
-->
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr> 
          <td> 
            <div align="center"><b><font size="6" color="#FF0000">恭喜你!!PHP168整站系統安裝succeed!!</font></b></div>
          </td>
        </tr>
        <tr> 
          <td>$show</td>
        </tr>
        <tr> 
          <td height="25"> 
            <div align="center"><a href="index.php">點擊進入主頁</a></div>
          </td>
        </tr>
        <tr> 
          <td height="27"> 
            <div align="center"><a href="admin/index.php">點擊進入後台</a></div>
          </td>
        </tr>
        <tr>
          <td height="13"><b><font color="#0000FF">在使用過程中遇到任何問題,歡迎前來咨詢:</font></b><a href="http://www.php168.com" target="_blank">http://www.php168.com</a></td>
        </tr>
      </table>
      <!--
EOT;
}
if($show){
print<<<EOT
-->
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td>
            <div align="center"><font size="6"><b><i><font color="#FF0000">出錯警告!!!</font></i></b></font></div>
          </td>
        </tr>
        <tr>
          <td height="52">$show</td>
        </tr>
      </table>
      <!--
EOT;
}
print <<<EOT
-->
    </td>
  </tr>
</table>
<table width="770"  border="0" align="center" cellpadding="10" cellspacing="0" background="install/images/Bottom.gif">
  <tr> 
    <td>
<hr>
    </td>
  </tr>
  <tr> 
    <td align="center" class="style1"></td>
  </tr>
</table>  
<br>
</body>
</html>
<!--
EOT;
?>
-->