Viewing file: v_plandetail_t5.php (5.31 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php //echo link_tag('css/nav_esa.css');?>
<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
<script type="text/javascript">
jQuery(document).ready(function(){
//get_option();
jQuery('#atb_type1').click(function() {
jQuery('#atb1').show('slow');
jQuery('#atb1').show('slow');
jQuery('#atb2').hide('slow');
});
jQuery('#atb_type2').click(function() {
jQuery('#atb1').show('slow');
jQuery('#atb2').show('slow');
jQuery('#atb1').hide('slow');
});
});
var auto_num =0;
function addRow () {
var target = jQuery("#num_acp");
var childObj = target.clone();
var text = target.parents("td:first").prev().text();
var no = jQuery(":text").length +1;
var color = target.parents("tr:first").prev().attr("bgcolor");
text = text.replace(/[0-9]/,"");
var html = "<tr bgcolor=\""+color+"\">";
html += "<td>";
html += "กิจกรรมที่ "+no;
html += " <input type=\"text\" name=\"num_acp[]\" id=\"num_acp_"+no+"\" size=\"50\" maxlength=\"100\"/>";
html += "</td>"
html += "</tr>";
jQuery(html).insertAfter(jQuery(":input[name='num_acp\[\]']:last").parents("tr:first"));
jQuery(":input[id='num_acp_"+no+"']").val("");
}
</script>
<?php
?>
<table border='0' width="80%">
<tr><td>
<?php
$_image_add = array(
'src' => 'images/esa/add_2.gif',
'width' => '15',
'height' => '15',
'border' => '0',
'title' => 'เพิ่มกิจกรรม',
'align' => 'absmiddle',
'onClick' => 'addRow()',
'onmouseover' => "this.style.cursor='pointer'"
);
$_image_del = array(
'src' => 'images/delete.png',
'width' => '15',
'height' => '15',
'border' => '0',
'title' => 'ลบข้อมูล',
'onmouseover' => "this.style.cursor='pointer'"
);
$_image_reply = array(
'src' => 'images/edit.png',
'width' => '15',
'height' => '15',
'border' => '0',
'title' => 'แก้ไขข้อมูล',
'onmouseover' => "this.style.cursor='pointer'"
);
//if($qu_mpj!='')
// $mpj = ($qu_mpj->row()) ? $qu_mpj->row() : '';
$mpj = ($qu_dpj->row()) ? $qu_dpj->row() : '';
?>
<?php // กิจกรรม
echo form_open($this->config->item('sa_folder').'project/add_edit_activity', array("name" => "myform", "id" => "myform"));?>
<table class='szone2' width="100%" border="0" align="left">
<input type="hidden" name="mpj_id" value="<?php echo (isset($mpj_id))?$mpj_id:''; ?>" />
<tr>
<th width="20%" align="right"><font size="2"><b>ปีงบประมาณ :</b></font></th>
<td width="20%"><?php echo (isset($mpj->dpj_bgY))?$mpj->dpj_bgY:''; ?>
</td>
<th width="20%" align="left">รหัสโครงการ :</th>
<td>
<?php echo (isset($mpj->dpj_code))?$mpj->dpj_code:''; ?>
</td>
</tr>
<tr >
<!-- <td align="right"><font size="2"><b>ชื่อโครงการหลัก:</b></font></td> -->
<th align="right">ชื่อโครงการ:</th>
<td colspan="3"><?php echo (isset($mpj->dpj_sub_name))?$mpj->dpj_sub_name:''; ?>
</td>
</tr>
<tr class='szone' valign='top'>
<!-- , set_value('stp_stg_id',getval('stp_stg_id',$qu_sb))-->
<td align="right" width="10%" valign='top'> <font size="2"><b>กิจกรรม</b></font>
<?php echo img($_image_add);?></td>
<td colspan="3">
<table>
<?php
$index = 1;
if ($rs_acp->num_rows()>0) {
foreach ($rs_acp->result() as $row_acp) {
?>
<tr><td>
กิจกรรมที่ <?php echo $index; ?>
<input type="text" readonly name="" id="" value="<?php echo $row_acp->dpj_sub_name;?>" size="50" maxlength="100">
<span class="hand" onClick="sendPost('myform', {'mpj_id':'<?php echo $row_acp->dpj_id; ?>'}, '<?php echo site_url($this->config->item('sa_folder').'project/plandetail/1')?>')"><?php echo img($this->config->item('sa_image_reply'));?></span>
<?php echo anchor($this->config->item('sa_folder').'project/delete_dpj/'.$row_acp->dpj_id,img($_image_del),array('onclick'=>"return confirm('ต้องการลบกิจกรรมนี้ใช่หรือไม่');")); ?>
</td></tr>
<?php
$index++;
}
}
?>
<tr><td>
กิจกรรมที่ <?php echo $index; ?>
<input type="text" name="num_acp[]" id="num_acp" value="<?php echo set_value('num_acp[]');?>" size="50" maxlength="100">
</td></tr>
</table>
<?php echo form_error('num_acp[]');?>
</td>
</tr>
<tr class="szone2">
<td colspan="4" height="22" align="center" bgcolor="#D1DCF3"><input type="submit" name="add" value="บันทึก" /><?php echo form_error('sb_name'); ?></td>
</tr>
</table>
<?php echo form_close();?>
</td></tr>
</table>
|