Viewing file: v_militaryFileAttach.php (2.98 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script language="JavaScript1.2">
function checkDocFile() {
var docFile, docName;
docFile = document.getElementById('docFile').value;
docName = document.getElementById('docName').value;
if(docFile!="" && docName=="") {
alert("กรุณากป้อนชื่อเอกสาร!!");
return false;
}
}
</script>
<?php
$row_nw = (isset($qu_nw) && $qu_nw!=NULL) ? $qu_nw->row() : NULL;
?>
<table width="100%">
<tr>
<th align="center">แนบ/ลบแบบฟอร์มเกี่ยวกับงานทหาร</th>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="szone2">
<?php echo form_open_multipart($this->config->item("sa_folder")."military/mlt_attachFile_insert_update", array("name" => "myform", "id" => "myform"));?>
<tr>
<th>ชื่อแบบฟอร์ม :</b>
<?php echo setValue('nwTitle',$row_nw);?></th>
</tr>
<tr>
<th><b>แบบฟอร์มที่แนบแล้ว : </b>
<?php
$i = 0;
if(isset($rs_nwu) && $rs_nwu->num_rows()) {
foreach($rs_nwu->result() as $row_nwu) {
?>
<a href="<?php echo base_url().$this->config->item('rg_docNews').$row_nwu->nwuPath;?>"><?php echo $row_nwu->nwuFileName." ";?></a>
<span onClick="confirmDel2({nwuId:<?php echo $row_nwu->nwuId;?>, nwuNwId:<?php echo $row_nwu->nwuNwId;?>}, 'm_form1','<?php echo site_url($this->config->item('sa_folder').'military/mlt_deleteFile');?>')" /><img src="<?php echo base_url()."images/".$this->config->item("rg_folder")."picture/delete.gif";?>" align="absmiddle" border="0" width="16" height="19" class="hand"/></span>
<?php
}
} else {
echo "ไม่มีการแนบไฟล์";
}
?>
</th>
</tr>
<tr>
<td><table class="szone2">
<tr>
<th width="20px"></th>
<th>ชื่อเอกสาร</th>
<th><input type="text" name="docName" id="docName" size="30" maxlength="70" value="<?php echo set_value('docName');?>" />
<span class="error"> *</span>
<?php echo form_error('docName');?></th>
</tr>
<tr>
<th></th>
<th>แนบเอกสาร</th>
<th><input type="file" name="docFile" id="docFile" value="<?php echo set_value('docFile');?>" />
<span class="error"> (ขนาดไฟล์ไม่เกิน 2 MB)</span>
<span class="error"><?php echo form_error('docFile');?></th>
</tr>
</table></td>
</tr>
<tr>
<td align="center" colspan="2" class="coltd_szone">
<input type="submit" name="add" id="add" value="บันทึก" onClick="return checkDocFile()" />
<input type="button" name="back" id="back" value="ย้อนกลับ" onclick="location.href='<?php echo site_url()."/".$this->config->item('sa_folder').'military/mlt_file';?>'" />
<input type="hidden" name="nwId" id="nwId" value="<?php echo setValue('nwId', $row_nw);?>" />
</tr>
<?php echo form_close();?></table></td>
</tr>
<tr>
<td><br /></td>
</tr>
</table>
|