<!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 $cfg_soft_lang; ?>">
<title>主頁更新嚮導</title>
<link href="css/base.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" media="all" href="../include/calendar/calendar-win2k-1.css" title="win2k-1" />
<script type="text/javascript" src="../include/calendar/calendar.js"></script>
<script type="text/javascript" src="../include/calendar/calendar-cn.js"></script>
<script language="javascript">
function SelectTemplets(fname)
{
   var posLeft = 200;
   var posTop = 300;
   window.open("../include/dialog/select_templets.php?f="+fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left="+posLeft+", top="+posTop);
}
</script>
</head>
<body background="images/allbg.gif" leftmargin="8" topmargin="8">
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center">
  <form name="form1" action="makehtml_homepage.php" target="stafrm" method="post">
  <input type="hidden" name="dopost" value="make">
    <tr> 
      <td height="28" colspan="2" background='images/tbg.gif'>
	  <table width="98%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="30%" height="18" style="padding-left:10px;"><strong>主頁更新嚮導：</strong></td>
            <td width="70%" align="right">&nbsp;</td>
          </tr>
        </table>
		</td>
    </tr>
    <tr> 
      <td width="177" valign="top" bgcolor="#FFFFFF">選擇主頁模板：</td>
      <td width="791" valign="top" bgcolor="#FFFFFF">
	    <input name="templet" type="text" id="templet" style="width:300" value="<?php echo $row['templet']?>"> 
        <input type="button" name="set4" value="瀏覽..." style="width:60" onClick="SelectTemplets('form1.templet');"> 
      </td>
    </tr>
    <tr> 
      <td height="20" colspan="2" valign="top" bgcolor="#FFFFFF">默認的情況下，生成的主頁文件放在CMS的安裝目錄，如果您的CMS不是安裝在網站根目錄的，又想把主頁創建到網站根目錄，那麼請用相對路徑來表示「主頁位置」。<br />
        例：您的CMS安裝在 
        http://www.abc.com/dedecms/ 目錄，您想生成的主頁為 http://www.abc.com/index.html，那麼主頁位置就應該用： 
        「../index.html」。</td>
    </tr>
    <tr> 
      <td height="20" valign="top" bgcolor="#FFFFFF">主頁位置：</td>
      <td height="20" valign="top" bgcolor="#FFFFFF"><input name="position" type="text" id="position" value="<?php echo $row['position']?>" size="30"> 
      </td>
    </tr>
           <?php 
      if($cfg_remote_site=='Y')
      {
    ?> 
    <tr> 
      <td height="20" valign="top" bgcolor="#FFFFCC">遠程發佈：</td>
      <td height="20" valign="top" bgcolor="#FFFFCC"><input name="remotepos" type="text" id="remotepos" value="/index.html" size="30"> 
        (「/」相對遠程站點根目錄)&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </tr>
    <tr>
      <td height="20" colspan="2" valign="top" bgcolor="#FFFFCC">您已經啟用遠程發佈,請確保正確 [<a href="sys_info.php" style="color:red">配置FTP</a>]</td>
    </tr>
     <?php
      }
    ?>    
<tr> 
      <td height="20" valign="top" bgcolor="#FFFFFF">相關選項：</td>
      <td height="20" valign="top" bgcolor="#FFFFFF">
	  <input name="saveset" type="radio" value="0" class="np">
       不保存當前選項 
      <input name="saveset" type="radio" class="np" value="1" checked>
      保存當前選項
	</td>
    </tr>
<tr>
  <td height="20" valign="top" bgcolor="#FFFFFF">首頁模式:</td>
  <td height="20" valign="top" bgcolor="#FFFFFF"><input name="showmod" type="radio" value="0" class="np" <?php echo ($row['showmod']==0)? "checked='checked'" : "";?>/>
動態瀏覽
  <input name="showmod" type="radio" class="np" value="1" <?php echo ($row['showmod']==1)? "checked='checked'" : "";?> />
生成靜態 (或者手動刪除根目錄下index.html文件)</td>
</tr>
 

    <tr> 
      <td height="31" colspan="2" bgcolor="#ffffff" align="center">&nbsp;&nbsp;
	    <input name="view" class='coolbg np' type="button" id="view" value="預覽主頁" onClick="window.open('makehtml_homepage.php?dopost=view&templet='+form1.templet.value);" />

      <input type="submit" class='coolbg np' name="Submit" value="更新主頁HTML" />
      &nbsp;
           <?php 
      if($cfg_remote_site=='Y')
      {
    ?> 　 
      <input name="isremote" type="checkbox" id="isremote" value="1">
是否同步遠程發佈  <?php GetFtp();?>     <?php
      }
    ?>     
</td>
    </tr>

  </form>
  <tr bgcolor="#F9FCEF"> 
    <td height="20" colspan="2"><table width="100%">
        <tr> 
          <td width="74%">進行狀態： </td>
          <td width="26%" align="right">
		    <script language='javascript'>
            	function ResizeDiv(obj,ty)
            	{
            		if(ty=="+") document.all[obj].style.pixelHeight += 50;
            		else if(document.all[obj].style.pixelHeight>80) document.all[obj].style.pixelHeight = document.all[obj].style.pixelHeight - 50;
            	}
            	</script>
            [<a href='#' onClick="ResizeDiv('mdv','+');">增大</a>] [<a href='#' onClick="ResizeDiv('mdv','-');">縮小</a>] 
          </td>
        </tr>
      </table> </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" id="mtd">
			<div id='mdv' style='width:100%;height:350px;'> 
        <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
      </div>
	  </td>
  </tr>
</table>
</body>
</html>