<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $s_lang?>" />
<title>安裝程序 - 織夢內容管理系統<?php echo $verMsg; ?></title>
<script src="../include/dedeajax2.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--
    function $o(tid){
        return document.getElementById(tid);
    }
    function TestDb()
    {
		var dbhost = $o('dbhost').value;
        var dbuser = $o('dbuser').value;
        var dbpwd = $o('dbpwd').value;
		$o('havedbsta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
        var myajax = new DedeAjax($o('dbpwdsta'),false,true,'-','-','...');
        myajax.SendGet2('index.php?step=10&dbhost='+dbhost+'&dbuser='+dbuser+'&dbpwd='+dbpwd);
		DedeXHTTP = null;
		HaveDB();
    }
	
	function HaveDB()
    {
		var dbhost = $o('dbhost').value;
        var dbname = $o('dbname').value;
        var dbuser = $o('dbuser').value;
        var dbpwd = $o('dbpwd').value;
        var myajax = new DedeAjax($o('havedbsta'),false,true,'-','-','...');
        myajax.SendGet2('index.php?step=10&dbhost='+dbhost+'&dbuser='+dbuser+'&dbpwd='+dbpwd+'&dbname='+dbname);
		DedeXHTTP = null;
    }
    
	function GetRemoteDemo()
	{
		
		$o('_remotesta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
		var myajax = new DedeAjax($o('_remotesta'),false,true,'-','-','...');
		myajax.SendGet2('index.php?step=11');
		DedeXHTTP = null;
	}
	
    function DoInstall()
    {
        //$o('postloader').style.display = 'block';
        document.form1.submit();
    }
-->
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id='postloader' class='waitpage'></div>
<form action="index.php" method="post" name="form1">
<input type="hidden" name="step" value="4" />
<div class="top">
    <div class="top-logo">
        
    </div>
    <div class="top-link">
        <ul>
            <li><a href="http://www.dedecms.com" target="_blank">官方網站</a></li>
            <li><a href="http://bbs.dedecms.com" target="_blank">技術論壇</a></li>
            <li><a href="http://help.dedecms.com" target="_blank">幫助</a></li>
        </ul>
    </div>
    <div class="top-version">
        <!-- 版本信息 -->
        <h2>DEDECMS<?php echo $verMsg; ?></h2>
    </div>
</div>

<div class="main">
    <div class="pleft">
        <dl class="setpbox t1">
            <dt>安裝步驟</dt>
            <dd>
                <ul>
                    <li class="succeed">許可協議</li>
                    <li class="succeed">環境檢測</li>
                    <li class="now">參數配置</li>
                    <li>正在安裝</li>
                    <li>安裝完成</li>
                </ul>
            </dd>
        </dl>
    </div>
    <div class="pright">
        <div class="pr-title"><h3>模塊選擇</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
            <tr>
                <td style='line-height:180%'>
                    <b>默認已安裝模塊(不需要可在後台卸載)：</b><br />
                    百度新聞、文件管理器、挑錯管理、廣告管理、投票模塊、友情鏈接<br />
                    <b>已下載並可選安裝的：（不能選中的為未下載）</b><br />
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'0a7bea5dbe571d35def883cbec796437')){?>disabled = 'true'<?php }?> value='0a7bea5dbe571d35def883cbec796437' /> 留言簿模塊</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'59155be87ea60c5c65ec1f7a46a0fc9d')){?>disabled = 'true'<?php }?> value='59155be87ea60c5c65ec1f7a46a0fc9d' /> 手機WAP瀏覽</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'7badb72a3ff79af2a7112beee60cb970')){?>disabled = 'true'<?php }?> value='7badb72a3ff79af2a7112beee60cb970' /> 小說模塊</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'867af26e9c1ccf22a1cf67e756cf5acc')){?>disabled = 'true'<?php }?> value='867af26e9c1ccf22a1cf67e756cf5acc' /> 黃頁模塊</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'8964eda9013d1df0afea08ed63243436')){?>disabled = 'true'<?php }?> value='8964eda9013d1df0afea08ed63243436' /> 站內新聞</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'be722dbfa3cb3cb5628aab2d767ff62e')){?>disabled = 'true'<?php }?> value='be722dbfa3cb3cb5628aab2d767ff62e' /> 問答模塊</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'dfcb5cd4d7bc0e3f7eb655e62dd6bc64')){?>disabled = 'true'<?php }?> value='dfcb5cd4d7bc0e3f7eb655e62dd6bc64' /> 圈子模塊</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'c10bb6ac52082ab3e669b4814b44a6f1')){?>disabled = 'true'<?php }?> value='c10bb6ac52082ab3e669b4814b44a6f1' /> 郵件訂閱</div>
                    <div class='modulesel'><input type='checkbox' name='modules[]' <?php if(!IsDownLoad($module_local.'8a4773468b800900dcfefbc5988833ed')){?>disabled = 'true'<?php }?> value='8a4773468b800900dcfefbc5988833ed' /> UCenter模塊</div>
                </td>
            </tr>
        </table>    
        <div class="pr-title"><h3>數據庫設定</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
            <tr>
                <td class="onetd"><strong>數據庫主機：</strong></td>
                <td><input name="dbhost" id="dbhost" type="text" value="localhost" class="input-txt" />
                <small>一般為localhost</small></td>
            </tr>
            <tr>
                <td class="onetd"><strong>數據庫用戶：</strong></td>
                <td><input name="dbuser" id="dbuser" type="text" value="root" class="input-txt" /></td>
            </tr>
            <tr>
                <td class="onetd"><strong>數據庫密碼：</strong></td>
                <td>
                  <div style='float:left;margin-right:3px;'><input name="dbpwd" id="dbpwd" type="text" class="input-txt" onChange="TestDb()" /></div>
                  <div style='float:left' id='dbpwdsta'></div>
                </td>
            </tr>
			<tr>
                <td class="onetd"><strong>數據表前綴：</strong></td>
                <td><input name="dbprefix" id="dbprefix" type="text" value="dede_" class="input-txt" />
                        <small>如無特殊需要,請不要修改</small></td>
            </tr>
			<tr>
                <td class="onetd"><strong>數據庫名稱：</strong></td>
                <td>
                    <div style='float:left;margin-right:3px;'><input name="dbname" id="dbname" type="text" value="<?php echo $dfDbname; ?>" class="input-txt" onChange="HaveDB()" /></div>
					<div style='float:left' id='havedbsta'></div>
                </td>
            </tr>
            <tr>
                <td class="onetd"><strong>數據庫編碼：</strong></td>
                <td>
                        <?php
                        if($s_lang=='utf-8')
                        {
                        ?>
                        <input type="radio" name="dblang" id="dblang_utf8" value="utf8" checked="checked" /><label for="dblang_latin1">UTF8</label>
                        <?php
                        }
                        else if($s_lang=='big5')
                        {
                        ?>
                        <input type="radio" name="dblang" id="dblang_big5" value="big5" checked="checked" /><label for="dblang_latin1">BIG5</label>
                        <?php
                        }
                        else
                        {
                        ?>
                        <input type="radio" name="dblang" id="dblang_gbk" value="gbk" checked="checked" /><label for="dblang_gbk">GBK</label>
                        <input type="radio" name="dblang" id="dblang_latin1" value="latin1" /><label for="dblang_latin1">LATIN1</label>
                        <?php
                        }
                        ?>
                        <small>僅對4.1+以上版本的MySql選擇</small>
                </td>
            </tr>
        </table>

        <div class="pr-title"><h3>管理員初始密碼</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
            <tr>
                <td class="onetd"><strong>用戶名：</strong></td>
                <td>
                    <input name="adminuser" type="text" value="admin" class="input-txt" />
                    <p><small>只能用'0-9'、'a-z'、'A-Z'、'.'、'@'、'_'、'-'、'!'以內範圍的字符</small></p>
                </td>
            </tr>
            <tr>
                <td class="onetd"><strong>密　碼：</strong></td>
                <td><input name="adminpwd" type="text" value="admin" class="input-txt" /></td>
            </tr>
            <tr>
                <td class="onetd"><strong>Cookie加密碼：</strong></td>
                <td><input name="cookieencode" type="text" value="<?php echo $rnd_cookieEncode; ?>" class="input-txt" /></td>
            </tr>
        </table>

        <div class="pr-title"><h3>網站設置</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
            <tr>
                <td class="onetd"><strong>網站名稱：</strong></td>
                <td>
                    <input name="webname" type="text" value="我的網站" class="input-txt" />
                </td>
            </tr>
            <tr>
                <td class="onetd"><strong>管理員郵箱：</strong></td>
                <td><input name="adminmail" type="text" value="admin@dedecms.com" class="input-txt" /></td>
            </tr>
            <tr>
                <td class="onetd"><strong> 網站網址：</strong></td>
                <td><input name="baseurl" type="text" value="<?php echo $baseurl; ?>" class="input-txt" /></td>
            </tr>
            <tr>
                <td class="onetd"><strong>CMS安裝目錄：</strong></td>
                <td><input name="cmspath" type="text" class="input-txt" value="<?php echo $basepath; ?>" /><small>在根目錄安裝時不必理會</small></td>
            </tr>
        </table>
        
      <div class="pr-title"><h3>安裝測試體驗數據</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<td width="168"><strong> 
			      初始化數據體驗包</strong>：</td>
                 <?php
                   if($isdemosign == 0)
                   {
                  ?>
				<td width="558"><div class="olink" id="_remotesta"><div style="float:left">&nbsp; <font color="red">[×]</font> 不存在</div><a href="javascript:GetRemoteDemo()">遠程獲取</a></div></td>
				<?php
                   } else {
                 ?>
                <td width="558">&nbsp; <font color="green">[√]</font> 存在(您可以選擇安裝進行體驗)</td>   
                 <?php
                 }
                 ?>
          </tr>
            <tr>
                <td colspan="2"><label for="installdemo"><strong> 
                    <input name="installdemo" type="checkbox" id="installdemo" value="1" />
                安裝初始化數據進行體驗</strong>(體驗數據將含帶DedeCMS大部分功能的應用操作示例)</label></td>
          </tr>
        </table>

        <div class="btn-box">
    <input type="button" class="btn-back" value="後退" onclick="window.location.href='index.php?step=2';" />
            <input type="button" class="btn-next" value="開始安裝" onclick="DoInstall();" />
      </div>
    </div>
</div>
<div class="foot">
</div>
</form>
</body>
</html>
