Example #1
0
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>&nbsp;&nbsp;&nbsp;";
				$no_send = $i;
			} else if($row_child->agdt_level <= 1){
				echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>".al_to_th($no) . "." . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$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 "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-";
			}
			
			echo "</span>";
			
			if($row_child->child->num_rows() > 0){
				re_viewAgdtA($row_child->child,$no_send);
			}
			
			//echo "<br/>";
		echo "</div>";
		
		}
	//echo "</div>";
}
Example #2
0
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>&nbsp;&nbsp;&nbsp;";
			$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>&nbsp;&nbsp;";
			$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>";
	}
}
Example #3
0
function re_viewAgtp($child,$no=0,$ck_edit=0,$cms_id,$rs_file,$link){
	$linkSave = site_url() . "/emeeting/agenda/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->agdt_id; ?>">
			<?php 
			echo "<span class=\"string\"><div class=\"tbin\">";
			$i = $i + 1;
			if($row_child->agdt_level == 0){
				echo "<b>".$str_agd . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$no_send = $i;
				$agdt_no = $i;
			} else {
				echo "<b>".al_to_th($no) . "." . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$no_send = $no . "." . $i;
				$agdt_no = $no . "." . $i;
			}
			echo "<b>".$row_child->agdt_head."</b><br/>";
			//if($row_child->child->num_rows()==0){
				// Detail
				//echo "<br/><u>".$str_detail."</u>";
				if($row_child->agdt_detail != "")
				{
					echo $row_child->agdt_detail;
					$num1 = 0;
				}
				else
				{
					echo "<br/>";
					$num1 = 1;
				}
				
				//	เสนอโดย
				if($row_child->agdt_by != "")
				{
					echo $row_child->agdt_by."<br/><br/>";
				}
				
				// File
				$ag_file = $rs_file->getFileByAgdtId($row_child->agdt_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->agfl_nname.'" target="_blank" >- '.$row_file->agfl_oname.'</a></li>';
					}
					echo "</ul>";
					$num2 = 0;
				}
				else
				{
					$num2 = 1;
					
				}
				// Present
				if($row_child->agdt_present != "")
				{
					echo "<b><u>".$str_present."</u></b>";
					echo $row_child->agdt_present;
					$num3 = 0;
				}
				else
				{
					$num3 = 1;
				}
				// Result
				
				if($row_child->agdt_result != "")
				{
					echo "<b><u>".$str_result."</u></b>";
					echo $row_child->agdt_result;
					$num4 = 0;
				}
				else
				{
					$num4 = 1;
				}
				
				$sum = $num1 + $num2 + $num3 + $num4;
				if($sum == 4)
				{
					//echo "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ไม่มี -<br/>";
				}
			//}
			echo "</div></span>";
			
			if($ck_edit == ""){
				$ck_edit = -1;
			}
			//$no_ag = $no_send;
			
			//$getSave = $row_child->agdt_id."/".$row_child->agdt_level."/".$row_child->agdt_mt_id."/".$cms_id."/".$ck_edit."/".$agdt_no."/1/".$link;
			$getSave = $row_child->agdt_id."/".$row_child->agdt_level."/".$row_child->agdt_mt_id."/".$cms_id."/".$ck_edit."/".$agdt_no."/1";
			$link = str_replace("=",".",base64_encode($getSave));
			$getSave.="/".$link;
			?>
			<span style="float:right;margin:3px;height:18px;">
				<a href="<?php echo $linkSave . $getSave; ?>" class="agdtSave2" id="<?php echo $row_child->agdt_id; ?>" title="บันทึกการประชุม" ><?php echo $imgSave; ?></a>
			</span>
			<?php
			if($row_child->child->num_rows()>0){
				re_viewAgtp($row_child->child,$no_send,$ck_edit,$cms_id,$rs_file,$link);
			}
			?>
		</li>
		<?php
			if($row_child->agdt_level == 0){
				echo "<hr />";
			}
		}
		?>
	</ul>
<?php
}
Example #4
0
function re_viewAgtp($child,$no=0){
	$str_agd = "วาระที่ ";
	$no_send = "";
	?>
	<ul class="sortable">
		<?php
		$i = 0;
		foreach($child->result() as $row_child){
		?>
		<li id="<?php echo $row_child->agtp_id; ?>">
			<?php
			echo "<span class=\"string\">";
			$i = $i + 1;
			if($row_child->agtp_level == 0){
				echo $str_agd . al_to_th($i) . "&nbsp;&nbsp;&nbsp;";
				$no_send = $i;
			} else {
				echo al_to_th($no) . "." . al_to_th($i) . "&nbsp;&nbsp;&nbsp;";
				$no_send = $no . "." . $i;
			}
			echo $row_child->agtp_head . "</span>";
			//$getAdd = $row_child->agtp_id . "/" . ($row_child->agtp_level+1) . "/" .$row_child->agtp_cms_id;
			//$getEdit = $row_child->agtp_id . "/" . $row_child->agtp_level . "/" .$row_child->agtp_cms_id;
			if($row_child->child->num_rows()>0){
				re_viewAgtp($row_child->child,$no_send);
			}
			?>
		</li>
		<?php
		}
		?>
	</ul>
<?php
}
Example #5
0
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>&nbsp;&nbsp;";
			$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>&nbsp;&nbsp;";
			$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 "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ไม่มี -<br/>";
		}
		
		echo "</span>";
		
		if($row_child->child->num_rows()>0){
			re_viewAgdtA($row_child->child,$no_send);
		}
		
		echo "</div>";
	}
}
function re_viewAgdtN($child, &$num){	
	$str_agd = "วาระที่ ";
	$str_detail = "รายละเอียด";
	$no_send = "";
	$agdt_parent = "";
	
	echo "<table border=\"0\">";
	foreach($child->result() as $row_child){
		if($row_child->agdt_level < 2){
			if($row_child->agdt_level > 0){	
				echo "<tr>";
				echo "<td valign=\"top\" nowrap=\"nowrap\"><span style=\"font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">" . al_to_th($num) . ".</span></td>";
				echo "<td><span style=\"font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">" . $row_child->agdt_head . "</span></td>";
				echo "</tr>";	
				
				$num++;
			}
		}
		if($row_child->child->num_rows()>0){
			re_viewAgdtN($row_child->child, $num);
		}
	}
	echo "</table>";
}
Example #7
0
function print_type2($arr_pnt="", $arr_model="", $row=0){
	$t_col = 3;	// columns all
	
	$row_sgIn = "<table class=\"tbPrint\" style=\"width:100%;font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif'\" >";
		$row_sgIn .= "<thead>";
			$row_sgIn .= "<tr style=\"padding-top:5px;padding-buttom:5px;\" >";
				$row_sgIn .= "<th>ลำดับที่</th>";
				$row_sgIn .= "<th>ชื่อ-นามสกุล</th>";
				$row_sgIn .= "<th>ลายมือชื่อ</th>";
			$row_sgIn .= "</tr>";
		$row_sgIn .= "</thead>";
		$row_sgIn .= "<tbody>";
		
		if(!empty($arr_pnt)){
			$line = 0;
			foreach($arr_pnt as $key => $value){
				$pnt_id = $value["pnt_id"];
				$name = $value["pnt_name"];
				
				$line++;
				
				$row_sgIn .= "<tr>";
				$row_sgIn .= "<td align=\"center\">" . al_to_th($line) . "</td>";
				$row_sgIn .= "<td>{$name}<input type=\"hidden\" name=\"name\" value=\"{$name}\" /></td>";
				$row_sgIn .= "<td></td>";
				$row_sgIn .= "</tr>";
			}
			
			// rows space
			for($i=0;$i<$row;$i++) 
			{
				$row_sgIn .= "<tr>";
					for($j=0;$j<$t_col;$j++){
						if($j == 0){
							$row_sgIn .= "<td align=\"center\"></td>";
						}
						else if($j == ($t_col - 1)){
							$row_sgIn .= "<td>&nbsp;</td>";
						}
						else{
							$row_sgIn .= "<td></td>";
						}
					}
				$row_sgIn .= "</tr>";
			}
		}
		else{
			$row_sgIn .= "<tr>";
			$row_sgIn .= "<td colspan=\"{$t_col}\" class=\"red\" align=\"center\">{$this->config->item("emt_not_found")}</td>";
			$row_sgIn .= "</tr>";
		}	
		$row_sgIn .= "</tbody>";
	$row_sgIn .= "</table>";
	
	return $row_sgIn;
}
Example #8
0
<!-- fancybox -->
Example #9
0
function re_viewAgs($child,$no=0,$rs_file="",$mt_mts_id="",$txt=""){
	$str_agd = "วาระที่ ";
	$str_detail = "รายละเอียด";
	$str_by = "เสนอโดย";
	$str_present = "ประเด็นเสนอ";
	$str_result = "มติ";
	$str_edit = "สิ่งที่ต้องแก้ไข";
	$str_file = "เอกสารแนบ";
	$no_send = "";
	$num1 = 0;
	$num2 = 0;
	$num3 = 0;
	$num4 = 0;
	$sum = 0;
	
	$p = array("<p>", "</p>");
	
	?>
		<?php
		$i = 0;
		foreach($child->result() as $row_child){
		?>
		
		<div id="<?php echo $row_child->ags_id; ?>">
			<?php
			echo "<span class=\"string\">";
			$i = $i + 1;
			if($row_child->ags_level == 0){
				echo "<br/><b>".$str_agd . al_to_th($i) . "</b>&nbsp;&nbsp;";
				$no_send = $i;
			} else {
				$margin1 = 30;
				for ($j1 = 1; $j1 <= $row_child->ags_level; $j1++) {
					$margin1 = $margin1 + 30;
				}
				echo "<div style=\"margin-left:".$margin1."px;\"><b>".al_to_th($no) . "." . al_to_th($i) . "</b>&nbsp;&nbsp;";
				$no_send = $no . "." . $i;
			}
			
			echo str_replace($txt, "<span class=\"hilight\">".$txt."</span>", $row_child->ags_head)."<br/></div>";
			$margin2 = 45;
			for ($j2 = 1; $j2 <= $row_child->ags_level; $j2++) {
				$margin2 = $margin2 + 45;
			}
			if($row_child->ags_detail != "")
			{
				echo "<div class=\"tbin\" style=\"margin-left:".$margin2."px;\">".str_replace($txt, "<span class=\"hilight\">".$txt."</span>", $row_child->ags_detail)."</div>";
				$num1 = 0;
			}
			else
			{
				echo "<br/>";
				$num1 = 1;
			}
			
			//	เสนอโดย
			if($row_child->ags_by != "")
			{
				echo "<div style=\"margin-left:".$margin2."px;\"><b><u>".$str_by."</u></b>&nbsp;&nbsp;".$row_child->ags_by."</div><br/>";
			}
			
			$ag_file = $rs_file->getFileByAgdtId($row_child->ags_id);
			
			if($ag_file->num_rows() > 0){
				echo "<div style=\"margin-left:".$margin2."px;\"><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" >- '.str_replace($txt, "<span class=\"hilight\">".$txt."</span>", $row_file->agfls_oname).'</a></li>';
				}
				echo "</ul></div><br/>";
				$num2 = 0;
			}
			else
			{
				$num2 = 1;
			}
			
			if($row_child->ags_present != "")
			{
				echo "<table style=\"border:0px;font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">";
				echo "<tr>";
				echo "<td width=\"90\" valign=\"top\"><b><u>".$str_present."</u></b></td>";
				echo "<td valign=\"top\" ><div class=\"tbin\">".str_replace($txt, "<span class=\"hilight\">".$txt."</span>", str_replace($p,"",$row_child->ags_present))."</div></td>";
				echo "</tr>";
				echo "</table><br/>";
				$num3 = 0;
			}
			else
			{
				$num3 = 1;
			}

			if($row_child->ags_result != "" && $mt_mts_id > 25)
			{
				echo "<table style=\"border:0px;font-size:16.0pt;font-family:'TH SarabunPSK','sans-serif';\">";
				echo "<tr>";
				echo "<td width=\"90\" valign=\"top\"><b><u>".$str_result."</u></b></td>";
				echo "<td valign=\"top\"><div class=\"tbin\">".str_replace($txt, "<span class=\"hilight\">".$txt."</span>", str_replace($p,"",$row_child->ags_result))."</div></td>";
				echo "</tr>";
				echo "<tr><td>&nbsp;</td></tr>";
				echo "</table>";
				$num4 = 0;
			}
			else
			{
				$num4 = 1;
			}
			
			$sum = $num1 + $num2 + $num3 + $num4;
			if($sum == 4)
			{
				//echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ไม่มี -<br/>";
			}
			
			echo "</span>";
			
			if($row_child->child->num_rows()>0){
				re_viewAgs($row_child->child,$no_send,$rs_file,$mt_mts_id,$txt);
			}
			?>
		</div>
		<?php
		}
		?>
<?php
}
Example #10
0
function re_viewAgtp($child,$no=0,$cms_id,$rs_file){
	// Image OK
	$ok = array(
		"src" => "images/emeeting/yes.png",
		"width" => "16",
		"border" => "0"
	);
	$imgOK = img($ok);
	
	// Image Cancel
	$cancel = array(
		"src" => "images/emeeting/dialog_cancel.png",
		"width" => "16",
		"border" => "0"
	);
	$imgCancel = img($cancel);
	
	// Image Loader
	$load = array(
		"src" => "images/emeeting/loadera16.gif",
		"width" => "16",
		"border" => "0"
	);
	$imgLoad = img($load);
	
	$str_agd = "วาระที่ ";
	$str_detail = "รายละเอียด";
	$str_by = "เสนอโดย";
	$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){
			if($row_child->agdt_add == '1'){
				?>
				<li id="<?php echo $row_child->agdt_id; ?>" name="<?php echo $row_child->agdt_id; ?>" class="appv">
				<?php
			}
			else{
				?>
				<li id="<?php echo $row_child->agdt_id; ?>" name="<?php echo $row_child->agdt_id; ?>">
				<?php 
			}
			echo "<span class=\"string\" id=\"agdt_".$row_child->agdt_id."\"><div class=\"tbin\">";
			
			$i = $i + 1;
			if($row_child->agdt_level == 0){
				echo "<b>".$str_agd . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$no_send = $i;
				$agdt_no = $i;
			} else {
				echo "<b>".al_to_th($no) . "." . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$no_send = $no . "." . $i;
				$agdt_no = $no . "." . $i;
			}
			echo "<b>".$row_child->agdt_head."</b><br/>";

			if($row_child->agdt_detail != "")
			{
				echo $row_child->agdt_detail;
				$num1 = 0;
			}
			else
			{
				$num1 = 1;
				echo "<br/>";
			}
			
			//	เสนอโดย
			if($row_child->agdt_by != "")
			{
				echo "<b><u>".$str_by."</u></b>&nbsp;&nbsp;".$row_child->agdt_by."<br/><br/>";
			}
			
			// File
			$ag_file = $rs_file->getFileByAgdtId($row_child->agdt_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 color="#"><a href="'.base_url().'uploads/emeeting/docs/'.$row_file->agfl_nname.'" target="_blank" >- '.$row_file->agfl_oname.'</a></li>';
				}
				echo "</ul><br/>";
				$num2 = 0;
			}
			else
			{
				$num2 = 1;
				
			}
			// Present
			if($row_child->agdt_present != "")
			{
				echo "<b><u>".$str_present."</u></b>";
				echo $row_child->agdt_present;
				$num3 = 0;
			}
			else
			{
				$num3 = 1;
			}
			// Result
			
			if($row_child->agdt_result != "")
			{
				echo "<b><u>".$str_result."</u></b>";
				echo $row_child->agdt_result;
				$num4 = 0;
			}
			else
			{
				$num4 = 1;
			}
			
			$sum = $num1 + $num2 + $num3 + $num4;
			
			// จัดการวาระเพิ่มเติม
			if($row_child->agdt_add == '1')
			{
				if($row_child->agdt_flag_appv == 'Y' || $row_child->agdt_flag_appv == 'N'){
					$agdt_appv_note = $row_child->agdt_appv_note;
					$showInput = "";
				}
				else{
					$agdt_appv_note = "";
					$showInput = "style=\"display:none;\"";
				}
				?>
				<br/><div style="width:760px;border:1px solid #D0DCF0;background:white;padding:5px 5px 5px 5px;">
				<input type="radio" name="approvelist_<?php echo $row_child->agdt_id; ?>" class="approvelist_<?php echo $row_child->agdt_id; ?>" value="Y" <?php if($row_child->agdt_flag_appv == 'Y') echo "checked=\"checked\""; ?> onclick="approveList(this.value, '<?php echo $row_child->agdt_id; ?>', 1)" style="width:20;"><b>อนุมัติ</b>
				<input type="radio" name="approvelist_<?php echo $row_child->agdt_id; ?>" class="approvelist_<?php echo $row_child->agdt_id; ?>" value="N" <?php if($row_child->agdt_flag_appv == 'N') echo "checked=\"checked\""; ?> onclick="approveList(this.value, '<?php echo $row_child->agdt_id; ?>', 1)" style="width:20;"><b>ไม่อนุมัติ</b>
				
				<span class="showInput_<?php echo $row_child->agdt_id; ?>" <?php echo $showInput; ?> >&nbsp;&nbsp;&nbsp;<b>หมายเหตุ (ถ้ามี) : </b>
					<input type="text" name="notelist_<?php echo $row_child->agdt_id; ?>" class="notelist_<?php echo $row_child->agdt_id; ?>" value="<?php echo $agdt_appv_note; ?>" style="width:300;">
					&nbsp;&nbsp;&nbsp;<input type="button" name="btnApprovelist_<?php echo $row_child->agdt_id; ?>" value="บันทึก" onclick="appvNotelist('<?php echo $row_child->agdt_id; ?>', 1)" style="width:70;">
				</span>
				
				&nbsp;&nbsp;&nbsp;&nbsp;<span class="load_<?php echo $row_child->agdt_id; ?>" style="display:none;"><?php echo $imgLoad; ?></span>
				<span class="ok_<?php echo $row_child->agdt_id; ?>" style="display:none;color:green;"><?php echo $imgOK; ?>&nbsp;อนุมัติแล้ว</span>
				<span class="cancel_<?php echo $row_child->agdt_id; ?>" style="display:none;color:green;"><?php echo $imgOK; ?>&nbsp;ไม่อนุมัติ</span>
				<span class="valid_<?php echo $row_child->agdt_id; ?>" style="display:none;color:red;"><?php echo $imgCancel; ?>&nbsp;กรุณากรอกข้อมูล</span>
				<span class="yes_<?php echo $row_child->agdt_id; ?>" style="display:none;color:green;"><?php echo $imgOK; ?>&nbsp;บันทึกข้อมูลเรียบร้อย</span>
				</div><br/>
				<?php
			}
			echo "</div></span>";

			if($row_child->child->num_rows()>0){
				re_viewAgtp($row_child->child,$no_send,$cms_id,$rs_file);
			} 
			?>
		</li>
		<?php
			if($row_child->agdt_level == 0){
				echo "<hr />";
			}
		}
		?>
	</ul>
<?php
}
						if(!empty($arr_ps)){
							foreach($arr_ps as $key => $value){
								$pnt_id = $value["pnt_id"];
								$pnt_parent_id = $value["pnt_parent_id"];
								$pnt_parent_adminId = $value["pnt_parent_adminId"];
								$pnt_parent_typeAgenda = $value["pnt_parent_typeAgenda"];
								$name = $value["pnt_name"];
								$adminName = $value["pnt_adminName"];
							}
						}
						
						// print
						$line++;
						
						$rowPnt = "<tr class=\"{$pnt_id}\" >";
						$rowPnt .= "<td nowrap=\"nowrap\" align=\"center\" valign=\"top\">" . al_to_th($line) . "</td>";
						if($pnt_parent_typeAgenda == 0){
							// โดยชื่อ
							$rowPnt .= "<td style=\"padding-left:10px;\" valign=\"top\" nowrap=\"nowrap\" >";
							$rowPnt .= $name;
							if($pnt_parent_adminId != 0 && $adminName != ""){
								if($flag_note == 'Y'){
									$rowPnt .= "<br />(".$adminName.")";
								}
								else{
									$rowPnt .= " (".$adminName.")";
								}
							}
							$rowPnt .= "</td>";
						}
						else{
Example #12
0
function re_viewAgtp($child, $no=0, $ck_edit=0, $cms_id, $rs_file, $row_mt, $qu_magap){
	$linkSave = site_url() . "/emeeting/agenda/agdtSave/";
	// Image save
	$save = array(
		"src" => "image/icons/color/application_edit.png",
		"width" => "16",
		"border" => "0"
	);
	$imgSave = img($save);
	$str_agd = "วาระที่ ";
	$str_detail = "รายละเอียด";
	$str_by = "เสนอโดย";
	$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){
			if($row_child->agdt_add == '1')
			{
				continue;
			}
		?>
		<li id="<?php echo $row_child->agdt_id; ?>" name="<?php echo $row_child->agdt_id; ?>">
			<?php 
			echo "<span class=\"string\" id=\"agdt_".$row_child->agdt_id."\"><div class=\"tbin\">";
			
			$i = $i + 1;
			if($row_child->agdt_level == 0){
				echo "<b>".$str_agd . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$no_send = $i;
				$agdt_no = $i;
			} else {
				echo "<b>".al_to_th($no) . "." . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
				$no_send = $no . "." . $i;
				$agdt_no = $no . "." . $i;
			}
			echo "<b>".$row_child->agdt_head."</b><br/>";
			//if($row_child->child->num_rows()==0){
				// Detail
				//echo "<br/><u>".$str_detail."</u>";
				if($row_child->agdt_detail != "")
				{
					echo $row_child->agdt_detail;
					$num1 = 0;
				}
				else
				{
					echo "<br/>";
					$num1 = 1;
				}
				
				//	เสนอโดย
				if($row_child->agdt_by != "")
				{
					echo "<b><u>".$str_by."</u></b>&nbsp;&nbsp;".$row_child->agdt_by."<br/><br/>";
				}
				
				// File
				$ag_file = $rs_file->getFileByAgdtId($row_child->agdt_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->agfl_nname.'" target="_blank" >- '.$row_file->agfl_oname.'</a></li>';
					}
					echo "</ul>";
					$num2 = 0;
				}
				else
				{
					$num2 = 1;
					
				}
				// Present
				if($row_child->agdt_present != "")
				{
					echo "<b><u>".$str_present."</u></b>";
					echo $row_child->agdt_present;
					$num3 = 0;
				}
				else
				{
					$num3 = 1;
				}
				// Result
				
				if($row_child->agdt_result != "")
				{
					echo "<b><u>".$str_result."</u></b>";
					echo $row_child->agdt_result;
					$num4 = 0;
				}
				else
				{
					$num4 = 1;
				}
				
				// show approved agenda
				if($row_mt->mt_mts_id == 32 && $row_child->agdt_result != ""){
					// Load model
					$magap = $qu_magap;
					$magap->agap_agdt_id = $row_child->agdt_id;
					$magap->agap_mt_id = $row_mt->mt_id;
					$qu_appv = $magap->get_countByAgdtAndMt();
					if($qu_appv->num_rows() > 0){
						echo "<br/><div style=\"width:45%;border:1px solid #D0DCF0;background:#EEF2F7;padding:5px 5px 5px 5px;margin-left:40px;\" >";
						foreach($qu_appv->result() as $row_appv){  
							echo "<span style=\"margin-left:25px;\">";
							echo $row_appv->appv_name;
							if($row_appv->num_ps > 0){
								$getSave = str_replace("=",".",base64_encode($row_child->agdt_id."/".$row_appv->appv_id."/".$row_mt->mt_id."/".$agdt_no));
								echo "&nbsp;&nbsp;<a href=\"javascript:void(0);\" title=\"คลิกดูรายละเอียด\" class=\"linkDetail\" onclick=\"getPntApprv('{$getSave}')\" >(&nbsp;" . al_to_th($row_appv->num_ps) . "&nbsp;คน&nbsp;)</a>";
							}
							echo "</span>";
							if($row_appv->appv_id < 3){
								// no last type
								echo "<br />";
							}
						}
						echo "</div><br/>";
					}
				
					
					/*echo "<table style=\"border:1px solid #D0DCF0;background:red;margin-left:40px;\" >";
					echo "<tr>";
					echo "<td>";
					echo "ตาราง";
					echo "</td>";
					echo "</tr>";
					echo "</table>";*/
					
				}
				
				
				$sum = $num1 + $num2 + $num3 + $num4;
				//echo $sum;
				if($sum == 4)
				{
					//echo "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ไม่มี -<br/>";
				}
			//}
			echo "</div></span>";
			
			if($ck_edit == ""){
				$ck_edit = -1;
			}
			//$no_ag = $no_send;
				
			$getSave = $row_child->agdt_id."/".$row_child->agdt_level."/".$row_child->agdt_mt_id."/".$cms_id."/".$ck_edit."/".$agdt_no."/0";
			$link = str_replace("=",".",base64_encode($getSave));
			$getSave.="/".$link;
			?>
			<span style="float:right;margin:3px;height:18px;">
				<a href="javascript:void(0)" class="agdtSave" id="<?php echo $row_child->agdt_id; ?>" title="บันทึกการประชุม" onclick="callfancybox('<?php echo $row_child->agdt_id ?>','<?php echo $getSave ?>')"><?php echo $imgSave; ?></a>
			</span>
			<?php
			if($row_child->child->num_rows()>0){
				re_viewAgtp($row_child->child, $no_send, $ck_edit, $cms_id, $rs_file, $row_mt, $qu_magap);
			} 
			?>
		</li>
		<?php
			if($row_child->agdt_level == 0){
				echo "<hr />";
			}
		}
		?>
	</ul>
<?php
}
Example #13
0
	th{
		font-weight:bold;
		text-align:center;
		background-color:#EEF2F7;
		padding : 3px;
	}
</style>
<?php
	$row_cms = (isset($rs_cms))?$rs_cms->row():"";
	$row_mt = (isset($rs_mt))?$rs_mt->row():"";
?>
<div align="center">
	<p>&nbsp;</p>
	<div style="width:75%;">
	<h3>ตรวจสอบการรับรองมติ</h3>
	การประชุม<?php echo $row_cms->cms_name; ?>&nbsp;ครั้งที่&nbsp;<?php echo al_to_th($row_mt->mt_no); ?>/<?php echo al_to_th($row_mt->mt_year); ?>
	</div>
	<hr width="60%"/>
	<p>&nbsp;</p>
	<table>
		<thead>
			<tr>
				<th width="20%">ลำดับที่</th>
				<th width="60%">ชื่อผู้เข้าร่วมประชุม</th>
				<th>สถานะ</th>
			</tr>
		</thead>
		<tbody>
		<?php 
		// Image OK
		$ok = array(
Example #14
0
function re_viewAgdt($child, $no=0, $rs_file, $rs_agap, $qu_apprv, &$ck_result){
	$str_agd = "วาระที่ ";
	$str_detail = "รายละเอียด";
	$str_by = "เสนอโดย";
	$str_present = "ประเด็นเสนอ";
	$str_result = "มติ";
	$str_edit = "สิ่งที่ต้องแก้ไข";
	$str_file = "เอกสารแนบ";
	$no_send = "";
	
	// Image Loader
	$load = array(
		"src" => "images/emeeting/loadera16.gif",
		"width" => "16",
		"border" => "0"
	);
	$imgLoad = img($load);
	
	// Image OK
	$ok = array(
		"src" => "images/emeeting/yes.png",
		"width" => "16",
		"border" => "0"
	);
	$imgOK = img($ok);
	
	// Image Cancel
	$cancel = array(
		"src" => "images/emeeting/dialog_cancel.png",
		"width" => "16",
		"border" => "0"
	);
	$imgCancel = img($cancel);
	
	echo "<ul class=\"sortable\" >";
	
		$i = 0;
		foreach($child->result() as $row_child){
		
			echo "<li id=\"{$row_child->agdt_id}\" name=\"{$row_child->agdt_id}\" >";
				echo "<span class=\"string\" id=\"agdt_".$row_child->agdt_id."\"><div class=\"tbin\">";
				
				$i = $i + 1;
				if($row_child->agdt_level == 0){
					echo "<b>".$str_agd . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
					$no_send = $i;
					$agdt_no = $i;
				} else {
					echo "<b>".al_to_th($no) . "." . al_to_th($i) . "</b>&nbsp;&nbsp;&nbsp;";
					$no_send = $no . "." . $i;
					$agdt_no = $no . "." . $i;
				}
				
				echo "<b>".$row_child->agdt_head."</b><br/>";
				
				if($row_child->agdt_detail != "")
				{
					echo $row_child->agdt_detail;
				}
				else
				{
					echo "<br/>";
				}
				
				//	เสนอโดย
				if($row_child->agdt_by)
				{
					echo "<b><u>".$str_by."</u></b>&nbsp;&nbsp;".$row_child->agdt_by."<br/><br/>";
				}
				
				// File
				$ag_file = $rs_file->getFileByAgdtId($row_child->agdt_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->agfl_nname.'" target="_blank" >- '.$row_file->agfl_oname.'</a></li>';
					}
					echo "</ul><br/>";
				}
				
				// Present
				if($row_child->agdt_present != "")
				{
					echo "<b><u>".$str_present."</u></b>";
					echo $row_child->agdt_present;
				}
			
				// Result
				if($row_child->agdt_result != "")
				{
					$ck_result = 1;
					echo "<b><u>".$str_result."</u></b>";
					echo $row_child->agdt_result;
					
					$agap_appv_id = 0;
					$agap_note = "";
					if($rs_agap->num_rows() > 0){
						foreach($rs_agap->result() as $row_agap){
							if($row_agap->agap_agdt_id == $row_child->agdt_id){
								$agap_appv_id = $row_agap->agap_appv_id;
								$agap_note = $row_agap->agap_note;
								break;
							}
						}
					}
					
					// display approve checked 
					if($qu_apprv->num_rows() > 0){
						// init name to check invalid
						$appv_name_2 = "";
						echo "<br /><div style=\"width:75%;border:1px solid #CCC;padding:5px 5px 5px 5px;\" >";
						foreach($qu_apprv->result() as $row_appv){
							$checked = "";
							if($row_appv->appv_id == $agap_appv_id){
								$checked = "checked";
							}
							
							
							echo "<input type=\"radio\" name=\"approvelist_{$row_child->agdt_id}\" class=\"approvelist_{$row_child->agdt_id} approveAll_{$row_appv->appv_id}\" value=\"{$row_appv->appv_id}\" {$checked} onclick=\"approveList('{$row_appv->appv_id}', '{$row_child->agdt_id}')\" style=\"width:20px;margin:10px; 0px; 10px; 20px;\">{$row_appv->appv_name}";
							
							if($row_appv->appv_flag_note == 'Y'){
								// get name to check invalid
								$appv_name_2 = $row_appv->appv_name;
								echo " ดังนี้";
							}
							
							// display save for each appv_id
							echo "<span class=\"load_{$row_child->agdt_id} loadAppv_{$row_child->agdt_id}_{$row_appv->appv_id}\" style=\"margin-left:20px;display:none;\">{$imgLoad}</span>";
							echo "<span class=\"ok_{$row_child->agdt_id} okAppv_{$row_child->agdt_id}_{$row_appv->appv_id}\" style=\"margin-left:20px;display:none;color:green;\">{$imgOK}</span>";
							
							echo "<br />";	//ckeditor
							if($row_appv->appv_flag_note == 'Y'){
								echo "<div style=\"margin-left:40px;width:90%;align:left;margin-bottom:5px;\" >";
								echo "<textarea name=\"approveNotelist_{$row_child->agdt_id}\" class=\"approveNotelist_{$row_child->agdt_id}\" style=\"resize:none;\" rows=\"5\" cols=\"80%\" >{$agap_note}</textarea>";
								echo "</div><br />";
								echo "<input type=\"button\" class=\"da-button green\" name=\"btnApprovelist_{$row_child->agdt_id}\" value=\"บันทึก\" id=\"{$row_child->agdt_id}\" style=\"width:70px;margin-bottom:10px;margin-left:250px;\" >";
								//onclick=\"apprvNotelist('{$row_child->agdt_id}')\"
								
								// display save for note
								echo "<span class=\"loadNote_{$row_child->agdt_id}\" style=\"margin-left:40px;display:none;\">{$imgLoad}</span>";
								echo "<span class=\"okNote_{$row_child->agdt_id}\" style=\"margin-left:40px;display:none;color:green;\">{$imgOK}&nbsp;บันทึกข้อมูลเรียบร้อย</span>";
								echo "<br />";
								
								// display save for check valid
								echo "<div style=\"margin-left:40px;\" >";
								echo "<span class=\"invalid_{$row_child->agdt_id}\" style=\"display:none;color:red;\">{$imgCancel}&nbsp;กรุณาเลือก{$appv_name_2}</span>";
								echo "</div>";
							}
						}
						echo "</div><br />";
					}
				}
				
				echo "</div></span>";
				
				if($row_child->child->num_rows()>0){
					re_viewAgdt($row_child->child, $no_send, $rs_file, $rs_agap, $qu_apprv, $ck_result);
				} 
				
			echo "</li>";
			if($row_child->agdt_level == 0){
				echo "<hr />";
			}
		}
	echo "</ul>";
}