function re_viewAgdtA($child,$no=0){ $str_agd = "วาระที่ "; //$str_detail = "รายละเอียด"; $str_present = "ประเด็นเสนอ"; $str_result = "มติ"; $str_file = "เอกสารแนบ"; $no_send = ""; $num1 = 0; $num2 = 0; $num3 = 0; $sum = 0; //echo "<div>"; $i = 0; foreach($child->result() as $row_child){ echo "<div id=".$row_child->agdt_id.">"; echo "<span class=\"string\">"; $i = $i + 1; if($row_child->agdt_level == 0){ echo "<br/><b>".$str_agd . al_to_th($i) . "</b> "; $no_send = $i; } else if($row_child->agdt_level <= 1){ echo " <b>".al_to_th($no) . "." . al_to_th($i) . "</b> "; $no_send = $no . "." . $i; } if($row_child->agdt_level <= 1){ echo "<b>".$row_child->agdt_head."</b><br/>"; } if($row_child->agdt_level == 0 && $row_child->child->num_rows() == 0){ echo " -"; } echo "</span>"; if($row_child->child->num_rows() > 0){ re_viewAgdtA($row_child->child,$no_send); } //echo "<br/>"; echo "</div>"; } //echo "</div>"; }
function re_viewAgdtA($child,$no=0){ $str_agd = "วาระที่ "; //$str_detail = "รายละเอียด"; $str_present = "ประเด็นเสนอ"; $str_result = "มติ"; $str_file = "เอกสารแนบ"; $no_send = ""; $num1 = 0; $num2 = 0; $num3 = 0; $sum = 0; $i = 0; foreach($child->result() as $row_child){ echo "<div id=".$row_child->agdt_id.">"; echo "<span style=\"font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">"; $i = $i + 1; if($row_child->agdt_level == 0){ echo "<br/><b>".$str_agd . al_to_th($i) . "</b> "; $no_send = $i; } else { $margin1 = 30; for ($j1 = 1; $j1 <= $row_child->agdt_level; $j1++) { $margin1 = $margin1 + 30; } echo "<div style=\"margin-left:".$margin1."px;\"><b>".al_to_th($no) . "." . al_to_th($i) . "</b> "; $no_send = $no . "." . $i; } echo "<b>".$row_child->agdt_head."</b></div>"; echo "</span>"; if($row_child->child->num_rows() > 0){ re_viewAgdtA($row_child->child,$no_send); } echo "</div>"; } }
function re_viewAgdtA($child,$no=0,$ck_edit=0,$cms_id,$rs_files,$links){ $linkSave = site_url() . "/emeeting/shortAgenda/agdtSave/"; // Image save $save = array( "src" => "images/emeeting/icons/edit.png", "width" => "16" ); $imgSave = img($save); $str_agd = "วาระที่ "; $str_detail = "รายละเอียด"; $str_present = "ประเด็นเสนอ"; $str_result = "มติ"; $str_edit = "แก้ไข"; $str_file = "เอกสารแนบ"; $no_send = ""; $num1 = 0; $num2 = 0; $num3 = 0; $num4 = 0; $sum = 0; ?> <ul class="sortable" > <?php $i = 0; foreach($child->result() as $row_child){ ?> <li id="<?php echo $row_child->ags_id; ?>"> <?php echo "<span class=\"string\"><div class=\"tbin\">"; $i = $i + 1; if($row_child->ags_level == 0){ echo "<b>".$str_agd . al_to_th($i) . "</b> "; $no_send = $i; $ags_no = $i; } else { echo "<b>".al_to_th($no) . "." . al_to_th($i) . "</b> "; $no_send = $no . "." . $i; $ags_no = $no . "." . $i; } echo "<b>".$row_child->ags_head."</b>"; //if($row_child->child->num_rows()==0){ // Detail //echo "<br/><u>".$str_detail."</u>"; if($row_child->ags_detail != "") { echo $row_child->ags_detail; $num1 = 0; } else { $num1 = 1; } // เสนอโดย if($row_child->ags_by != "") { echo $row_child->ags_by."<br/>"; } // File $ag_file = $rs_files->getFileByAgdtId($row_child->ags_id); if($ag_file->num_rows() > 0){ echo "<b><u>".$str_file."</u></b>"; echo "<ul>"; foreach($ag_file->result() as $row_file) { echo '<li><a href="'.base_url().'uploads/emeeting/docs/'.$row_file->agfls_nname.'" target="_blank" >- '.$row_file->agfls_oname.'</a></li>'; } echo "</ul>"; $num2 = 0; } else { $num2 = 1; } // Present if($row_child->ags_present != "") { echo "<b><u>".$str_present."</u></b>"; echo $row_child->ags_present; $num3 = 0; } else { $num3 = 1; } // Result if($row_child->ags_result != "") { echo "<b><u>".$str_result."</u></b>"; echo $row_child->ags_result; $num4 = 0; } else { $num4 = 1; } $sum = $num1 + $num2 + $num3 + $num4; if($sum == 4) { //echo "<br/> - ไม่มี -<br/>"; } //} echo "</div></span>"; $getSave = $row_child->ags_id."/".$row_child->ags_level."/".$row_child->ags_mt_id."/".$cms_id."/".$ck_edit."/".$ags_no."/1/".$links; //$getSave = $row_child->ags_id."/".$row_child->ags_level."/".$row_child->ags_mt_id."/".$cms_id."/".$ck_edit."/".$ags_no."/1"; //$links = str_replace("=",".",base64_encode($getSave)); //$getSave.="/".$links; ?> <span style="float:right;margin:3px;height:18px;"> <a href="<?php echo $linkSave . $getSave; ?>" class="agdtSave2" id="<?php echo $row_child->ags_id; ?>" title="บันทึกการประชุม" ><?php echo $imgSave; ?></a> </span> <?php if($row_child->child->num_rows()>0){ re_viewAgdtA($row_child->child,$no_send,$ck_edit,$cms_id,$rs_files,$links); } ?> </li> <?php if($row_child->ags_level == 0){ echo "<hr />"; } } ?> </ul> <?php }
function re_viewAgdtA($child,$no=0){ $str_agd = "วาระที่ "; //$str_detail = "รายละเอียด"; $str_present = "ประเด็นเสนอ"; $str_result = "มติ"; $str_file = "เอกสารแนบ"; $no_send = ""; $num1 = 0; $num2 = 0; $num3 = 0; $sum = 0; $i = 0; foreach($child->result() as $row_child){ echo "<div id=".$row_child->agdt_id.">"; echo "<span style=\"font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">"; $i = $i + 1; if($row_child->agdt_level == 0){ echo "<br/><b>".$str_agd . al_to_th($i) . "</b> "; $no_send = $i; } else { $margin1 = 30; for ($j1 = 1; $j1 <= $row_child->agdt_level; $j1++) { $margin1 = $margin1 + 30; } echo "<div style=\"margin-left:".$margin1."px;\"><b>".al_to_th($no) . "." . al_to_th($i) . "</b> "; $no_send = $no . "." . $i; } echo "<b>".$row_child->agdt_head."</b></div>"; $margin2 = 45; for ($j2 = 1; $j2 <= $row_child->agdt_level; $j2++) { $margin2 = $margin2 + 45; } if($row_child->agdt_detail != "") { $p = array("<p>", "</p>"); echo "<div style=\"margin-left:".$margin2."px;\">".str_replace($p,"",$row_child->agdt_detail)."</div><br/>"; $num1 = 0; } else { $num1 = 1; } // เสนอโดย if($row_child->agdt_by != "") { echo "<div style=\"margin-left:".$margin2."px;\">".$row_child->agdt_by."</div><br/>"; } if($row_child->agdt_present != "") { echo "<table style=\"border:0px;font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">"; echo "<tr>"; echo "<td valign=\"top\" width=\"90\"><b><u>".$str_present."</u></b></td>"; $p = array("<p>", "</p>"); echo "<td>".str_replace($p,"",$row_child->agdt_present)."</td>"; echo "</tr>"; echo "<tr>"; echo "<td><b><u>".$str_result."</u></b></td>"; echo "</tr>"; echo "</table>"; for($x=1; $x<=5; $x++) { echo "<br />"; } $num2 = 0; } else { $num2 = 1; } $sum = $num1 + $num2; if($sum == 2) { //echo " - ไม่มี -<br/>"; } echo "</span>"; if($row_child->child->num_rows()>0){ re_viewAgdtA($row_child->child,$no_send); } echo "</div>"; } }