74 lines
2.6 KiB
PHP
74 lines
2.6 KiB
PHP
|
<!-- $Id: category_info.htm 16752 2009-10-20 09:59:38Z wangleisvn $ -->
|
||
|
<?php echo $this->fetch('pageheader.htm'); ?>
|
||
|
<!-- start add new category form -->
|
||
|
<div class="main-div">
|
||
|
<form action="facility.php" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
|
||
|
<table width="100%" id="general-table">
|
||
|
<tr>
|
||
|
<td class="label">名稱:</td>
|
||
|
<td>
|
||
|
<input type='text' name='name' maxlength="20" value='<?php echo htmlspecialchars($this->_var['fac']['name']); ?>' size='27' /> <font color="red">*</font>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="label">排序:</td>
|
||
|
<td>
|
||
|
<input type="text" name='sort_order' <?php if ($this->_var['fac']['sort_order']): ?>value='<?php echo $this->_var['fac']['sort_order']; ?>'<?php else: ?> value="50"<?php endif; ?> size="15" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td class="label">是否有效:</td>
|
||
|
<td>
|
||
|
<input type="radio" name="is_show" value="1" <?php if ($this->_var['fac']['is_show'] != 0): ?> checked="true"<?php endif; ?>/> <?php echo $this->_var['lang']['yes']; ?>
|
||
|
<input type="radio" name="is_show" value="0" <?php if ($this->_var['fac']['is_show'] == 0): ?> checked="true"<?php endif; ?> /> <?php echo $this->_var['lang']['no']; ?>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="label">上傳檔案:</td>
|
||
|
<td>
|
||
|
<input type="file" name="image"/><br />
|
||
|
<div style="padding:10px 0px">
|
||
|
<?php if ($this->_var['fac']['image'] != ''): ?>
|
||
|
<a href="javascript:void(0);" onClick="openwindow('../<?php echo $this->_var['fac']['image']; ?>','照片',800,500);">
|
||
|
<img src="../<?php echo $this->_var['fac']['image']; ?>" width="100" height="100" />
|
||
|
</a>
|
||
|
<?php else: ?>
|
||
|
<?php echo $this->_var['lang']['msg_na']; ?>
|
||
|
<?php endif; ?>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
<div class="button-div">
|
||
|
<input type="submit" value="確定" />
|
||
|
<input type="reset" value="重置" />
|
||
|
</div>
|
||
|
<input type="hidden" name="act" value="<?php echo $this->_var['form_act']; ?>" />
|
||
|
<input type="hidden" name="id" value="<?php echo $this->_var['fac']['id']; ?>" />
|
||
|
</form>
|
||
|
</div>
|
||
|
<?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,validator.js')); ?>
|
||
|
|
||
|
<script language="JavaScript">
|
||
|
<!--
|
||
|
document.forms['theForm'].elements['name'].focus();
|
||
|
/**
|
||
|
* 检查表单输入的数据
|
||
|
*/
|
||
|
function validate()
|
||
|
{
|
||
|
validator = new Validator("theForm");
|
||
|
validator.required("name",'名稱未填');
|
||
|
return validator.passed();
|
||
|
}
|
||
|
|
||
|
onload = function()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
//-->
|
||
|
</script>
|
||
|
|
||
|
<?php echo $this->fetch('pagefooter.htm'); ?>
|