function get_file_type_option($fatherid = 0, $selid = 0, $layer = 0) { $str = ""; global $db; $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "file_type where father='{$fatherid}' ORDER BY id Asc "); if (count($query) > 0) { for ($i = 0; $i < $layer; $i++) { $str .= "├"; } while ($row = $db->fetch_array($query)) { $selstr = $row['id'] == $selid ? 'selected="selected"' : ''; $htmlstr = '<option value="' . $row['id'] . '" ' . $selstr . '>' . $str . $row['title'] . '</option>'; echo $htmlstr; get_file_type_option($row['id'], $selid, $layer + 1, $type); } } return; }
<input type="hidden" name="savetype" value="edit" /> <input type="hidden" name="id" value="<?php echo $blog['id']; ?> " /> <?php $appendix = explode(',', $blog['appendix']); ?> <table class="TableBlock" border="0" width="90%" align="center" style="border-bottom:#4686c6 solid 0px;"> <tr> <td nowrap class="TableContent" width="120"> 档案类目:</td> <td class="TableData"><select class="BigStatic" name="filetype"> <?php get_file_type_option(0, $blog['filetype']); ?> </select></td> <td class="TableContent" width="120">档案编号:<?php get_helps(); ?> </td> <td class="TableData"> <input name="filenumber" type="text" class="BigInput" id="filenumber" style="width: 300px;" maxlength="100" value="<?php echo $blog['filenumber']; ?> " /></td> </tr> <tr> <td nowrap class="TableContent" width="120"> 档案名称:<?php get_helps();
<label class="ui-form-label" for="J-start">创建时间:</label> <div class="ui-form-content"> <input type="text" value="<?php echo $vstartdate; ?> " class="ui-input i-date" readonly="readonly" onClick="WdatePicker();" name='vstartdate' > - <input type="text" value="<?php echo $venddate; ?> " class="ui-input i-date" readonly="readonly" onClick="WdatePicker();" name='venddate' > </div> <label class="ui-form-label" for="J-start">所属类目:</label> <div class="ui-form-content"> <select class="BigStatic" name="filetype"> <option value="" selected="selected">请选择</option> <?php get_file_type_option(0, $filetype); ?> </select> </div> <label class="ui-form-label" for="J-start">保存期限:</label> <div class="ui-form-content"> <select name="enddate" class="BigStatic" id="enddate"> <option value="0" selected="selected">请选择</option> <option value="5">五年</option> <option value="99">永久</option> <option value="1">一年</option> <option value="3">三年</option> </select> </div> <div class="submit-time-container "> <div class="submit-time ui-button ui-button-sorange">
} function sendForm() { if(CheckForm()) document.save.submit(); } </script> <form name="save" method="post" action="?ac=add&do=save&fileurl=file"> <input type="hidden" name="savetype" value="add" /> <table class="TableBlock" border="0" width="90%" align="center" style="border-bottom:#4686c6 solid 0px;"> <tr> <td nowrap class="TableContent" width="120"> 档案类目:</td> <td class="TableData"><select class="BigStatic" name="filetype"> <?php get_file_type_option(); ?> </select></td> <td class="TableContent" width="120">档案编号:<?php get_helps(); ?> </td> <td class="TableData"> <input name="filenumber" type="text" class="BigInput" id="filenumber" style="width: 300px;" maxlength="100" value="<?php echo get_date('YmdHis', PHP_TIME); ?> " /></td> </tr> <tr> <td nowrap class="TableContent" width="120"> 档案名称:<?php get_helps();
?> </td> <td class="TableData"> <?php get_pubuser(2, "keyuser", $workdate[keyuser], "+选择审批人员", 60, 4); ?> </td> </tr> <tr> <td nowrap class="TableContent"> 选择上级栏目:</td> <td class="TableData"> <select class="BigStatic" name="father"> <option value="0" >顶级栏目</option> <?php get_file_type_option(0, $workdate[father]); ?> </select> </td> </tr> <tr align="center" class="TableControl"> <td colspan="2" nowrap height="35"> <input type="button" value="保存" class="BigButtonBHover" onClick="sendForm();"> </td> </tr> </table>