<?php die;?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<title><!--{$smarty.const.MICE_TITLE}--></title>
<base href="<!--{$smarty.const.MICE_URL}--><!--{$smarty.const.MICE_TPL}-->/admin/" />
<link href="css/Default.css" rel="stylesheet" type="text/css" />
<link href="css/fieldset.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
var baseurl = '<!--{$smarty.const.MICE_URL}--><!--{$smarty.const.MICE_TPL}-->/admin/';
</script>
<script type="text/javascript" src="js/Main.js"></script>
<script language="JavaScript">
function CheckForm()
{
	if (document.form1.MICE_URL.value.length == 0)
	{
		Dialog.alert("网址不能为空！");
		document.form1.MICE_URL.focus();
		return false;
	}
	if (document.form1.MICE_EXT.value.length == 0)
	{
		Dialog.alert("模板后缀不能为空！");
		document.form1.MICE_EXT.focus();
		return false;
	} 
	if (document.form1.MICE_DBNAME.value.length == 0)
	{
		Dialog.alert("数据库名不能为空！");
		document.form1.MICE_DBNAME.focus();
		return false;
	} 

	document.form1.submit();
	return true;
}

function ResetForm(){
	document.form1.reset();
}
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="6" cellpadding="0" style="border-collapse: separate; border-spacing: 6px;">
	  <form action="<!--{$update}-->" method="post" name="form1" id="form1" onsubmit="return CheckForm()">
      <tr valign="top">
        <td>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="blockTable">
			
			<tr>
			  <td width="100%" style="padding:6px 10px;" class="blockTd">
			  <div style="float: left;"><img src="imgs/Icons/icon021a1.gif" />系统配置</div>
			  <div style="float: right; white-space: nowrap;vertical-align:middle;"><a href='javascript:CheckForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a16.gif" /><b>保存&nbsp;</b></a><a href='javascript:ResetForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a13.gif" /><b>重置&nbsp;</b></a><a href='javascript:history.back(-1);' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon008a20.gif" /><b>返回&nbsp;</b></a></div>
			 </td>
            </tr>
            <tr>
              <td style="padding-top:0px;padding-left:6px;padding-right:6px;padding-bottom:8px;">

<!--内容开始-->
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="860" align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D5D5D5">
	<form name="form1" id="form1" method="POST" action="<!--{$update}-->" onsubmit="return CheckForm()">
      <tr>
        <td height="28" bgcolor="#F9F9F9">&nbsp;<B>主选项</B></td>
      </tr>
      <tr>
        <td height="28" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;网站地址(包括根路径)</td>
    <td height="28" class="bottomline"><input type="text" size="35" name="MICE_URL" value="<!--{$smarty.const.MICE_URL}-->">&nbsp;最后边有一个 /</td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;服务器时间和您当前的时间相差</td>
    <td height="28" class="bottomline"><select name="MICE_GMT">
	<option value="Etc/GMT+12" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+12"}-->selected<!--{/if}-->>-12</option>
	<option value="Etc/GMT+11" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+11"}-->selected<!--{/if}-->>-11</option>
	<option value="Etc/GMT+10" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+10"}-->selected<!--{/if}-->>-10</option>
	<option value="Etc/GMT+9" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+9"}-->selected<!--{/if}-->>-9</option>
	<option value="Etc/GMT+8" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+8"}-->selected<!--{/if}-->>-8</option>
	<option value="Etc/GMT+7" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+7"}-->selected<!--{/if}-->>-7</option>
	<option value="Etc/GMT+6" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+6"}-->selected<!--{/if}-->>-6</option>
	<option value="Etc/GMT+5" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+5"}-->selected<!--{/if}-->>-5</option>
	<option value="Etc/GMT+4" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+4"}-->selected<!--{/if}-->>-4</option>
	<option value="Etc/GMT+3" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+3"}-->selected<!--{/if}-->>-3</option>
	<option value="Etc/GMT+2" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+2"}-->selected<!--{/if}-->>-2</option>
	<option value="Etc/GMT+1" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+1"}-->selected<!--{/if}-->>-1</option>
	<option value="Etc/GMT+0" <!--{if $smarty.const.MICE_GMT=="Etc/GMT+0"}-->selected<!--{/if}-->>0</option>
	<option value="Etc/GMT-1" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-1"}-->selected<!--{/if}-->>+1</option>
	<option value="Etc/GMT-2" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-2"}-->selected<!--{/if}-->>+2</option>
	<option value="Etc/GMT-3" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-3"}-->selected<!--{/if}-->>+3</option>
	<option value="Etc/GMT-4" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-4"}-->selected<!--{/if}-->>+4</option>
	<option value="Etc/GMT-5" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-5"}-->selected<!--{/if}-->>+5</option>
	<option value="Etc/GMT-6" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-6"}-->selected<!--{/if}-->>+6</option>
	<option value="Etc/GMT-7" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-7"}-->selected<!--{/if}-->>+7</option>
	<option value="Etc/GMT-8" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-8"}-->selected<!--{/if}-->>+8</option>
	<option value="Etc/GMT-9" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-9"}-->selected<!--{/if}-->>+9</option>
	<option value="Etc/GMT-10" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-10"}-->selected<!--{/if}-->>+10</option>
	<option value="Etc/GMT-11" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-11"}-->selected<!--{/if}-->>+11</option>
	<option value="Etc/GMT-12" <!--{if $smarty.const.MICE_GMT=="Etc/GMT-12"}-->selected<!--{/if}-->>+12</option></select>&nbsp;&nbsp;小时(当前服务器时间：<!--{php}-->echo date("Y-m-d H:i:s");<!--{/php}-->,如果和您当前的时间相同,请勿修改)</td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;是否启用是否启用Apache的ReWrite功能</td>
    <td height="28" class="bottomline"><select name="MICE_REWRITE"><option value="" <!--{if $smarty.const.MICE_REWRITE==""}-->selected<!--{/if}-->>启用</option><option value="index.php/" <!--{if $smarty.const.MICE_REWRITE=="index.php/"}-->selected<!--{/if}-->>不启用</option></select></td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;HTML静态页面的生成方式</td>
    <td height="28" class="bottomline"><select name="MICE_HTML"><option value="0" <!--{if $smarty.const.MICE_HTML=="0"}-->selected<!--{/if}-->>不生成</option><option value="1" <!--{if $smarty.const.MICE_HTML=="1"}-->selected<!--{/if}-->>纯静态(手动生成)</option><option value="2" <!--{if $smarty.const.MICE_HTML=="2"}-->selected<!--{/if}-->>伪静态(触发式生成)</option></select></td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;生成HTML静态文件的扩展名</td>
    <td height="28" class="bottomline"><input type="text" size="5" name="MICE_HTML_EXT" value="<!--{$smarty.const.MICE_HTML_EXT}-->"></td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;是否错误报告</td>
    <td height="28" class="bottomline"><input type="text" size="5" name="MICE_DEBUG" value="<!--{$smarty.const.MICE_DEBUG}-->">&nbsp;&nbsp;0-255之间的数字;建议值2;0,不显示任何错误;7,只显示严重错误;尽量设在0-7之间</td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;是否启用网站自带的php配置文件php.ini</td>
    <td height="28" class="bottomline"><select name="MICE_INISET"><option value="1" <!--{if $smarty.const.MICE_INISET=="1"}-->selected<!--{/if}-->>启用(推荐)</option><option value="0" <!--{if $smarty.const.MICE_INISET=="0"}-->selected<!--{/if}-->>不启用</option></select></td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;是否启用图片验证码</td>
    <td height="28" class="bottomline"><select name="MICE_CCIMG"><option value="1" <!--{if $smarty.const.MICE_CCIMG=="1"}-->selected<!--{/if}-->>启用(推荐)</option><option value="0" <!--{if $smarty.const.MICE_CCIMG=="0"}-->selected<!--{/if}-->>不启用</option></select></td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;可上传的文件类型(用逗号[,]分割)</td>
    <td height="28" class="bottomline"><input type="text" size="35" name="MICE_UPLOAD_FILE_NAME" value="<!--{$smarty.const.MICE_UPLOAD_FILE_NAME}-->"></td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;单个文件上传最大容量(单位KB)</td>
    <td height="28" class="bottomline"><input type="text" size="35" name="MICE_UPLOAD_FILE_SIZE" value="<!--{$smarty.const.MICE_UPLOAD_FILE_SIZE}-->">&nbsp;当前服务器允许上传的文件最大为<!--{php}-->echo ini_get("upload_max_filesize");<!--{/php}-->(1MB=1024KB)</td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;文件上传的目录</td>
    <td height="28" class="bottomline"><input type="text" size="35" name="MICE_UPLOAD_FILE_DIR" value="<!--{$smarty.const.MICE_UPLOAD_FILE_DIR}-->">&nbsp;文件上传的目录,相对地址,相对于网站安装目录,必须以/结尾,{Y}{M}{D}年月日,如果使用了{Y}{M}{D}必须保证php能新建目录,否则会上传失败</td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;网站模板</td>
    <td height="28" class="bottomline"><select name="MICE_TPL"><!--{php}-->
	include_once MICE_DIR.'/includes/filelist.php';
	$table_data=read_dir(MICE_DIR.'templates/',"dir",true);
	foreach ($table_data as $key => $row)
	{
		if (MICE_TPL=="templates/".$row['id']){
			$selected='selected';
		}else{
			$selected='';
		}
		echo '<option value="templates/'.$row['id'].'" '.$selected.'>'.$row['id'].'</option>';
	}
	<!--{/php}-->
	</select>	</td>
  </tr>
  <tr>
    <td height="28" class="bottomline" width="300">&nbsp;模板后缀</td>
    <td height="28" class="bottomline"><input type="text" size="35" name="MICE_EXT" value="<!--{$smarty.const.MICE_EXT}-->"></td>
  </tr>
</table></td>
      </tr>
    </table>
      <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
	  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D5D5D5">
        <tr>
          <td height="28" bgcolor="#F9F9F9">&nbsp;<B>搜索引擎优化</B></td>
        </tr>

        <tr>
          <td height="28" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
				<td height="28" class="bottomline" width="280"><b>标题附加字:</b><br>网页标题通常是搜索引擎关注的重点，本附加字设置将出现在标题中网站名称的后面，如果有多个关键字，建议用 "|"、","(不含引号) 等符号分隔</td>
				<td height="28" class="bottomline" width="20">&nbsp;</td>
				<td height="28" class="bottomline"><input type="text" size="55" name="MICE_TITLE" value="<!--{$smarty.const.MICE_TITLE}-->"></td>
			  </tr>
			  <tr>
				<td height="28" class="bottomline" width="280"><b>Meta Keywords:</b><br>Keywords 项出现在页面头部的 Meta 标签中，用于记录本页面的关键字，多个关键字间请用半角逗号 "," 隔开</td>
				<td height="28" class="bottomline" width="20">&nbsp;</td>
				<td height="28" class="bottomline"><input type="text" size="55" name="MICE_KW" value="<!--{$smarty.const.MICE_KW}-->"></td>
			  </tr>
			  <tr>
				<td height="28" class="bottomline" width="280"><b>Meta Description:</b><br>Description 出现在页面头部的 Meta 标签中，用于记录本页面的概要与描述</td>
				<td height="28" class="bottomline" width="20">&nbsp;</td>
				<td height="28" class="bottomline"><input type="text" size="55" name="MICE_DP" value="<!--{$smarty.const.MICE_DP}-->"></td>
			  </tr>
          </table></td>
        </tr>
      </table>
	  <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
	  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D5D5D5">  
  <tr>
    <td height="28" bgcolor="#F9F9F9">&nbsp;<B>数据库设置</B></td>
  </tr>
  <tr>
    <td height="28" bgcolor="#FFFFFF">&nbsp;如果您没有一个专业的数据库系统如 MySQL 或 SQL Server, 您可以使用文本数据库。<br>&nbsp;miceCMS不会自动建立数据库,需要你先建立一个数据库,如果你选择文本文件作为数据库,需要先在private目录下建立一个名字和数据库名称相同的文件夹。<br><br>&nbsp;数据库类型选择框说明：<br><span style="color:green; font-weight:bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;绿色选项</span> 的数据库系统目前可用<br><span style="color:gray; font-weight:bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;灰色选项</span> 表示当前服务器上的PHP已经支持此数据库,但需要到下载安装相应的<a href="http://www.micecms.com" target="_blank">驱动程序</a><br><span style="color:red; font-weight:bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;红色选项</span> 表示当前服务器上的PHP不支持此数据库(您需要 修改PHP设置)<br><br></td>
  </tr>
  <tr>
    <td height="28" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="28" class="bottomline" width="300">&nbsp;数据库类型</td>
        <td height="28" class="bottomline"><select name="MICE_DB"><!--{php}-->
		function txt_connect() { }
		$databases = array(
				array('txt' , '文本文件(Flat File)', 'txt_connect'),
				array('mysql' , 'MySQL', 'mysql_connect'),
				array('mysqli' , 'MySQLi', 'mysqli_connect'),
				array('sqlite' , 'SQLite2', 'sqlite_open'),
				array('mssql' , 'Microsoft SQL Server', 'mssql_pconnect'),
				array('postgres' , 'PostgresSQL', 'pg_connect'),
				array('postgres64' , 'PostgresSQL 6.4', 'pg_connect'),
				array('postgres7' , 'PostgresSQL 7', 'pg_connect'),
				array('postgres8' , 'PostgresSQL 8', 'pg_connect'),
				);
			
		for($i=0;$i<count($databases);$i++) {
			$db =& $databases[$i];
			if($db[0]=='txt'){
				$db0='gladius';
			}else{
				$db0=$db[0];
			}
			$db[3] = (int)is_dir(MICE_DIR.'classes/adodb_lite/drivers/'.$db0);
			$db[3] |= (((int)function_exists($db[2])) << 1);
		}

		for($i=0;$i<count($databases);$i++) {
			$db =& $databases[$i];
		}


		for($i=0;$i<count($databases);$i++) {
			$db =& $databases[$i];
			$class = ' class="db_avail'.$db[3].'"';
			echo '<option value="'.$db[0].'"';
			echo $class;
			if(strtolower($db[0])==strtolower(MICE_DB))	echo 'selected';
			echo '>'.$db[1].'</option>'."\r\n";
		}
		<!--{/php}-->
		</select></td>
      </tr>
	  <tr>
		<td height="28" class="bottomline" width="300">&nbsp;数据库名称</td>
		<td height="28" class="bottomline"><input type="text" size="35" name="MICE_DBNAME" value="<!--{$smarty.const.MICE_DBNAME}-->"></td>
	  </tr>
	  <tr>
		<td height="28" class="bottomline" width="300">&nbsp;数据库表前缀</td>
		<td height="28" class="bottomline"><input type="text" size="35" name="MICE_PREFIX" value="<!--{$smarty.const.MICE_PREFIX}-->">&nbsp;实际表名=前缀+系统定义表名</td>
	  </tr>
	  <tr>
		<td height="28" class="bottomline" width="300">&nbsp;数据库主机地址</td>
		<td height="28" class="bottomline"><input type="text" size="35" name="MICE_DBHOST" value="<!--{$smarty.const.MICE_DBHOST}-->">&nbsp;一般都是:localhost</td>
	  </tr>
	  <tr>
		<td height="28" class="bottomline" width="300">&nbsp;数据库用户名</td>
		<td height="28" class="bottomline"><input type="text" size="35" name="MICE_DBUSERNAME" value="<!--{$smarty.const.MICE_DBUSERNAME}-->"></td>
	  </tr>
	  <tr>
		<td height="28" class="bottomline" width="300">&nbsp;数据库密码</td>
		<td height="28" class="bottomline"><input type="password" size="35" name="MICE_DBPASSWORD" value="">&nbsp;如不修改,请留空</td>
	  </tr>
    </table></td>
  </tr>
      </table>
	  <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
	</td>
  </tr>
</table>

<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr > 
		<td height="30" valign='middle'>
			<div id='_PageBar_buttom' class="pageBarWrap" style="padding-top:6px;clear:both;bottom:0px; height:30px; line-height:30px;"><div class="pageBar" style='float:right;font-family:Tahoma'></div><div style='float:left;font-family:Tahoma'><a href='javascript:CheckForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a16.gif" /><b>保存&nbsp;</b></a><a href='javascript:ResetForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a13.gif" /><b>重置&nbsp;</b></a><a href='javascript:history.back(-1);' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon008a20.gif" /><b>返回&nbsp;</b></a></div></div>
		</td>
	</tr>
</table>

<!--内容结束-->
		</td>
		</tr>
	</table></td>
  </tr>
  </form>
</table>
</body>
</html>