<?php 
function ischecked($value,$targ,$checkString=" checked='checked' "){
	if($value==$targ){
		echo $checkString;
	}
}
?>
<dl class="adminoption">
  <dt></dt>
  <dd><a href="#tab1">基本设置</a></dd>
  <dd><a href="#tab5">安全设置</a></dd>
  <dd><a href="#tab4">模板设置</a></dd>
  <dd><a href="#tab2">附件设置</a></dd>
  <dd><a href="#tab3">图片设置</a></dd>
</dl>
<div class="tab" id="tab5">
	<table class="adminform" cellspacing="0">
    	<tr>
        	<th>使用验证码</th>
        </tr>
        <tr>
        	<td><input type="radio" name="base[is_valid_number]" value="1" <?=ischecked($base->is_valid_number,1);?>/>是 
            <input type="radio" name="base[is_valid_number]" value="0" <?=ischecked($base->is_valid_number,0);?>/>否</td>
        </tr>
    </table>
</div>
<div class="tab" id="tab4">
  <table class="adminform" cellspacing="0">
  	<tr>
    	<th colspan="2">网站搜索结果模板</th>
    </tr>
  	<tr>
    	<td><input type="text" name="base[site_search_tpl]" value="<?=isset($base->site_search_tpl)?$base->site_search_tpl:"skins/default/list.html"?>" class="text" id="search_tpl"/><input type="button" value="选择" class="button" onclick="window.open('<?=BASEURI?>templates/select/search_tpl')"/></td>
        <td class="des">显示搜索结果的模板</td>
    </tr>
  </table>
</div>
<div class="tab" id="tab1">
  <table class="adminform" cellspacing="0">
    <tr>
      <th colspan="2">Title（网站标题）</th>
    </tr>
    <tr>
      <td><input type="text" class="text" name="base[site_title]" value="<?=$base->site_title ?>"></td>
      <td class="des">针对搜索引擎设置的网页标题</td>
    </tr>
    <tr>
      <th colspan="2">Meta Keywords（网页关键词）</th>
    </tr>
    <tr>
      <td><input type="text" class="text" name="base[site_keywords]" value="<?=$base->site_keywords ?>"></td>
      <td class="des">针对搜索引擎设置的关键词</td>
    </tr>
    <tr>
      <th colspan="2">Meta Description（网页描述）</th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->site_description ?>" name="base[site_description]"></td>
      <td class="des">针对搜索引擎设置的网页描述</td>
    </tr>
    <tr>
      <th colspan="2">生成文件扩展名</th>
    </tr>
    <tr>
      <td><select name="base[site_html_suffix]">
          <option value=".html" <?=ischecked($base->site_html_suffix,".html","selected");?>>HTML</option>
          <option value=".shtml" <?=ischecked($base->site_html_suffix,".shtml","selected");?>>SHTML</option>
          <option value=".htm" <?=ischecked($base->site_html_suffix,".htm","selected");?>>HTM</option>
          <option value=".shtm" <?=ischecked($base->site_html_suffix,".shtm","selected");?>>HTM</option>
        </select>
      </td>
      <td class="des">&nbsp;</td>
    </tr>
    <tr>
      <th colspan="2">版权信息</th>
    </tr>
    <tr>
      <td><textarea name="base[site_copyright]"><?=$base->site_copyright ?></textarea></td>
      <td class="des">将显示在网站底部</td>
    </tr>
    <tr>
      <th colspan="2">网站ICP备案序号</th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->site_icp ?>" name="base[site_icp]"></td>
      <td class="des">请在信息产业部管理网站申请</td>
    </tr>
  </table>
</div>
<div class="tab" id="tab2">
  <table class="adminform" cellspacing="0">
    <tr>
      <th colspan="2">允许前台上传附件</th>
    </tr>
    <tr>
      <td><INPUT value="1" type="radio" name="base[is_upfile]" <?=ischecked($base->is_upfile,1);?>>
        是    
        <INPUT value="0" type="radio" name="base[is_upfile]" <?=ischecked($base->is_upfile,0);?>>
        否 </td>
      <td class="des">&nbsp;</td>
    </tr>
    <tr>
      <th colspan="2"><STRONG>允许上传的附件类型</STRONG></th>
    </tr>
    <tr>
      <td><input type="text" name="base[upfiletype]" value="<?=$base->upfiletype ?>" /></td>
      <td class="des">&nbsp;允许上传的文件类型，多个类型请用"|"隔开</td>
    </tr>
    <tr>
      <th colspan="2"><STRONG>允许上传的附件大小</STRONG></th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->upfilesize ?>" name="base[upfilesize]" style="width:60px;" dataType="Number">&nbsp; KB</td>
      <td class="des">&nbsp;限制上传文件大小</td>
    </tr>
  </table>
</div>
<div class="tab" id="tab3">
  <table class="adminform" cellspacing="0">
    <tr>
      <th colspan="2">启用缩略图功能</th>
    </tr>
    <tr>
      <td><input type="radio" name="base[is_thumb]" value="1"  <?=ischecked($base->is_thumb,1);?>/>是&nbsp;&nbsp;<input type="radio" name="base[is_thumb]" value="0"  <?=ischecked($base->is_thumb,0);?>/> 否</td>
      <td class="des"></td>
    </tr>
    <tr>
    	<td colspan="2">生成缩略图方式</td>
    </tr>
    <tr>
    	<td>
        <input type="radio" name="base[thumb_way]" value="1|1" <?=ischecked($base->thumb_way,"1|1")?> />比例缩放
        <input type="radio" name="base[thumb_way]" value="top|left" <?=ischecked($base->thumb_way,"top|left")?> />剪裁(上左)
        <input type="radio" name="base[thumb_way]" value="top|center" <?=ischecked($base->thumb_way,"top|center")?> />剪裁(上中)
        <input type="radio" name="base[thumb_way]" value="top|right" <?=ischecked($base->thumb_way,"top|right")?> />剪裁(上右)
        <input type="radio" name="base[thumb_way]" value="center|left" <?=ischecked($base->thumb_way,"center|left")?> />剪裁(上左)
        <input type="radio" name="base[thumb_way]" value="center|center" <?=ischecked($base->thumb_way,"center|center")?> />剪裁(中)
        <input type="radio" name="base[thumb_way]" value="center|right" <?=ischecked($base->thumb_way,"center|right")?> />剪裁(中右)
        <input type="radio" name="base[thumb_way]" value="bottom|left" <?=ischecked($base->thumb_way,"bottom|left")?> />剪裁(下左)
        <input type="radio" name="base[thumb_way]" value="bottom|center" <?=ischecked($base->thumb_way,"bottom|center")?> />剪裁(下中)
        <input type="radio" name="base[thumb_way]" value="bottom|right" <?=ischecked($base->thumb_way,"bottom|right")?> />剪裁(下右)
        </td>
        <td class="des"></td>
    </tr>
    <tr>
      <th colspan="2">启用图片水印功能</th>
    </tr>
    <tr>
      <td><INPUT value="1" type="radio" name="base[watermark_enable]" <?=ischecked($base->watermark_enable,1);?>>
        是    
        <INPUT value="0" type="radio" name="base[watermark_enable]" <?=ischecked($base->watermark_enable,0);?>>
        否 </td>
      <td class="des">&nbsp;</td>
    </tr>
    <tr>
      <th colspan="2">水印类型</th>
    </tr>
    <tr>
      <td><INPUT value="font" type="radio" name="base[watermark_type]" <?=ischecked($base->watermark_type,"font");?>>
        文字    
        <INPUT value="image" type="radio" name="base[watermark_type]" <?=ischecked($base->watermark_type,"image");?>>
        图片</td>
      <td class="des">&nbsp;</td>
    </tr>
    <tr>
      <th colspan="2"><STRONG>水印图片路径</STRONG></th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->watermark_path ?>" name="base[watermark_path]"></td>
      <td class="des">您可替换水印文件以实现不同的水印效果。</td>
    </tr>
    <tr>
      <th colspan="2"><STRONG>水印文字</STRONG></th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->watermark_text ?>" name="base[watermark_text]"></td>
      <td class="des">支持中文水印。</td>
    </tr>
    <tr>
      <th colspan="2">水印透明度</th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->watermark_transparence ?>" name="base[watermark_transparence]"></td>
      <td class="des">范围为 1~100 的整数，数值越小水印图片越透明</td>
    </tr>
    <tr>
      <th colspan="2">JPEG 水印质量</th>
    </tr>
    <tr>
      <td><input type="text" class="text" value="<?=$base->image_quality ?>" name="base[image_quality]"></td>
      <td class="des">范围为 0~100 的整数，数值越大结果图片效果越好，但尺寸也越大</td>
    </tr>
    <tr>
      <th colspan="2">水印添加位置</th>
    </tr>
    <tr>
      <td><TABLE cellSpacing="1" cellPadding="4" width="160" bgColor="#dddddd">
          <TBODY>
            <TR align="middle" bgColor="#ffffff">
              <TD><INPUT value="1" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,1);?>>
                #1</TD>
              <TD><INPUT value="2" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,2);?>>
                #2</TD>
              <TD><INPUT value="3" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,3);?>>
                #3</TD>
            </TR>
            <TR align="middle" bgColor="#ffffff">
              <TD><INPUT value="4" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,4);?>>
                #4</TD>
              <TD><INPUT value="5" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,5);?>>
                #5</TD>
              <TD><INPUT value="6" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,6);?>>
                #6</TD>
            </TR>
            <TR align="middle" bgColor="#ffffff">
              <TD><INPUT value="7" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,7);?>>
                #7</TD>
              <TD><INPUT value="8" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,8);?>>
                #8</TD>
              <TD><INPUT value="9" type="radio" name="base[watermark_pos]" <?=ischecked($base->watermark_pos,9);?>>
                #9</TD>
            </TR>
          </TBODY>
        </TABLE></td>
      <td class="des">将显示在网站底部</td>
    </tr>
  </table>
</div>
<div>
<input type="submit" name="sb" value="修改" class="submit"/>
</div>