?? field_edit.php
字號(hào):
<?php
defined('IN_PHPCMS') or exit('Access Denied');
include admintpl('header');
?>
<script language="JavaScript">
<!--
//檢驗(yàn)文本框中內(nèi)容是否超長(zhǎng)
function checktextarealength(val, max_length) {
var str_area=document.forms[0].elements[val].value;
if (str_area!=null&&str_area.length > max_length && document.myform.fieldtype.value!=2){
alert("文本文字超長(zhǎng),最多可輸入" + max_length +"個(gè)字符,請(qǐng)重新輸入!");
document.forms[0].elements[val].focus();
return false;
}
return true;
}
function fieldcheckform(FieldTypeValue){
if(FieldTypeValue=='3'){
trOptions.style.display='';
document.myform.defaultvalue.rows=1;
}else if(FieldTypeValue=='2'){
trOptions.style.display='none';
document.myform.defaultvalue.rows=10;
}else{
trOptions.style.display='none';
document.myform.defaultvalue.rows=1;
}
}
-->
</script>
<body onload="fieldcheckform(myform.fieldtype.value)">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="10">
<tr>
<td ></td>
</tr>
</table>
<?=$menu?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="10">
<tr>
<td ></td>
</tr>
</table>
<table cellpadding="2" cellspacing="1" class="tableborder">
<tr>
<th colspan=2>自定義字段修改</th>
</tr>
<form action="?mod=<?=$mod?>&file=field&action=edit&channelid=<?=$channelid?>&fieldid=<?=$fieldid?>" method="post" name="myform">
<tr>
<td class="tablerow" width="30%"><strong>字段名稱</strong></td>
<td class="tablerow">
<input size=20 name="fieldname" type="text" maxlength='20' value="<?=$fieldname?>" disabled>
</td>
</tr>
<tr>
<td class="tablerow"><strong>字段標(biāo)題</strong></td>
<td class="tablerow">
<input size=50 name="title" type="text" value="<?=$title?>">
</td>
</tr>
<tr>
<td class="tablerow"><strong>字段說(shuō)明</strong></td>
<td class="tablerow">
<textarea name='note' rows='3' cols='50'><?=$note?></textarea>
</td>
</tr>
<tr>
<td class="tablerow"><strong>字段類型</strong></td>
<td class="tablerow">
<select name='fieldtype' disabled>
<option value='1' <?php if($fieldtype==1){ ?>selected <?php } ?>>單行文本</option>
<option value='2' <?php if($fieldtype==2){ ?>selected <?php } ?>>多行文本</option>
<option value='3' <?php if($fieldtype==3){ ?>selected <?php } ?>>下拉列表</option>
<option value='4' <?php if($fieldtype==4){ ?>selected <?php } ?>>數(shù)字</option>
<option value='5' <?php if($fieldtype==5){ ?>selected <?php } ?>>日期</option>
</select>
</td>
</tr>
<tr>
<td class='tablerow'><strong>默認(rèn)值</strong></td>
<td class='tablerow'>
<textarea name='defaultvalue' rows='1' cols='50' onkeypress="javascript:checktextarealength('defaultvalue',30);"><?=$defaultvalue?></textarea>
</td>
</tr>
<tr id='trOptions' style='display:none'>
<td class='tablerow'><strong>列表項(xiàng)目:</strong><br>每一行為一個(gè)列表項(xiàng)目</td>
<td class='tablerow'><textarea name='options' cols='40' rows='3' id='options'><?=$options?></textarea></td>
</tr>
<tr>
<td class='tablerow'><strong>是否必填</strong></td>
<td class='tablerow'>
<input type='radio' name='enablenull' value='0' <?php if($enablenull==0){ ?>checked<?php } ?>> 是
<input type='radio' name='enablenull' value='1' <?php if($enablenull==1){ ?>checked<?php } ?>> 否
</td>
</tr>
<tr>
<td class="tablerow"><strong>是否作為搜索條件</strong></td>
<td class="tablerow">
<input type='radio' name='enablesearch' value='1' <?php if($enablesearch==1){ ?>checked<?php } ?>> 是
<input type='radio' name='enablesearch' value='0' <?php if($enablesearch==0){ ?>checked<?php } ?>> 否
</td>
</tr>
<tr>
<td class="tablerow"></td>
<td class="tablerow"> <input type="Submit" name="submit" value=" 確定 ">
<input type="reset" name="reset" value=" 清除 "> </td>
</tr>
</form>
</table>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -