コード例 #1
0
			
		}		
		$sl_alluser = implode("','",$alluserid);
		$find = "select user_id from $approved_selected_objective where user_id in ('$sl_alluser')";	
		$findres = $db_object->get_single_column($find);
		$diffarray = array_diff($alluserid,$findres);
		$pattern = "/<{objective_loopstart}>(.*?)<{objective_loopend}>/s";
		preg_match($pattern,$file,$arr);
		$match = $arr[0];
		$diff = @array_values($diffarray);
		for($j=0;$j<count($diff);$j++)
		{
			$uid = $diff[$j];
			$username = $common->name_display($db_object,$uid);
			$mailqry = "select email from $user_table where user_id='$uid'";
			$mailres = $db_object->get_a_line($mailqry);
			$email = $mailres['email'];
			$str.=preg_replace("/<{(.*?)}>/e","$$1",$match);
		}		
		$file = preg_replace($pattern,$str,$file);
		
		
		$file = $common->direct_replace($db_object,$file,$val);
		echo $file;
	}//end view
}//end class
	$ob = new objective;
	$ob->view_form($db_object,$common,$user_id,$default,$error_msg);
include_once("footer.php");
?>
コード例 #2
0
		$bossid = $usres['position'];

		$aqry ="select user_id,date_format(submit_date,'$date_format') as submit_date from $performance_alert where boss_id='$bossid'";
		$ares = $db_object->get_rsltset($aqry);

		$pattern1 = "/<{objective_loopstart(.*?)<{objective_loopend}>/s";	
		preg_match($pattern1,$file,$arr1);
			$match1=$arr1[0];
			$str1="";
			for($i=0;$i<count($ares);$i++)
			{
				$uid = $ares[$i]['user_id'];
				$username = $common->name_display($db_object,$uid);
				$date = $ares[$i]['submit_date'];
				$str1.=preg_replace("/\<\{(.*?)\}\>/e","$$1",$match1);
			}			
			$file=preg_replace($pattern1,$str1,$file);
			if($str1=="")
			{
				$file = preg_replace("/\<table(.*?)table>/s",$err['cEmptyrecords'],$file);
			}

		$file = $common->direct_replace($db_object,$file,$val);
		echo $file;
	}//end view
}//end class
	$ob = new objective;
	$ob->view_form($db_object,$common,$user_id,$default,$error_msg,$gbl_date_format);
include_once("footer.php");
?>