通达OA流程中心触发器使用实例

<?php
//qq:874689017
//专业提供通达OA最新破解版本
include_once "inc/session.php";
include_once "inc/conn.php";
//include_once "inc/auth.inc.php";
include_once "inc/utility_org.php";
include_once "inc/flow_engine2.0/inc/tform/TWorkExport.class.php";
include_once "inc/flow_engine2.0/workrun/dao/WorkRunLogDAO.php";
include_once "inc/flow_engine2.0/workrun/dao/WorkRunDAO.php";
include_once "inc/flow_engine/engine/TFlowEngine.php";
/*
global $USER_FUNC_ID_STR;
 $arr=$_GET;
 $str="".$USER_FUNC_ID_STR."|";
 foreach($_GET  as $k=>$v){
	 $str.=$k."=>".$v.",";
	 }
	 */
$str="";
$str.=$RUN_ID."**********************";
$str.=$FLOW_ID."*********************";
$RUN_ID='47970';

$arr_para = TFlowEngine::get_para_data($RUN_ID);
$arr_data = TFlowEngine::get_data($RUN_ID);
print_r($arr_para);
echo "<hr>";
print_r($arr_data);

echo "<hr>";

$runData = engine\TFlowEngine::getRunData(108,47970);
print_r($runData);

$runObj = new dao\run\WorkRunDAO();
		$runList = $runObj->getWorkRunInfo($RUN_ID);
		print_r($runList);

echo "<hr>";
		$flowId = $runList["FLOW_ID"];
		$runName = $runList["RUN_NAME"];
		echo $runName;


		$workRunInfo = engine\TFlowEngine::getWorkRunInfo($RUN_ID, array("RUN_NAME"));
		print_r($workRunInfo);
				$RUN_NAME = $workRunInfo["RUN_NAME"];
exit;
$query="select a.run_id,c.begin_dept,c.begin_user,c.begin_time,a.data_m13558,a.data_m13559,a.data_m13560,a.data_m13562,a.data_m13563,a.data_m13564,a.data_m13565,a.data_m13566,a.data_m15398 from  bpm_data_642 as a,bpm_run as c where a.run_id='$RUN_ID'  and a.run_id=c.run_id and c.del_flag=0";
//echo $query."<br>";
//exit;
$curosr=exequery(TD::conn(),$query);
while($row=mysql_fetch_array($curosr)){
	$top_dept=top_dept($row["begin_dept"]);
	//echo $top_dept."<br>";
	$run_id=$row["run_id"];
	$zuoyelinghao=$row["data_m13558"];
	$hetongbianhao=$row["data_m13559"];
	$chenglandanwei=$row["data_m13560"];
	$chenglandanwei="313";
	$kehumingcheng=$row["data_m13562"];
	$dinghuoneirong=$row["data_m13563"];
	$dinghuoshuliang=$row["data_m13564"];
	$hetongjine=$row["data_m13565"];
	$ydjfrq=$row["data_m13566"];
	$jsxybh="";
	$zlxybh="";
	$pingshenriqi=$row["data_m15398"];
	$hetongleibie="";
	
	//$user_id=$_SESSION["LOGIN_USER_ID"];
	 $user_id=$row["begin_user"]; 
	  $begin_time=$row["begin_time"]; 
	//$now=date("Y-m-d H:i:s");
	$now= $begin_time;
	$query1="select * from ht_hetong where run_id='$run_id' and laiyuan='OA' limit 1";
	//echo $query1."<br>";
	$cursor1=exequery(TD::conn(),$query1);
	$num=mysql_num_rows($cursor1);
	//echo $num;
	if($num==0){
		$query2="INSERT INTO `TD_OA`.`ht_hetong` ( `run_id`, `hetongleibie`, `pingshenriqi`, `hetongbianhao`, `zuoyelinghao`, `chenglandanwei`, `kehumingcheng`, `dinghuoneirong`, `dinghuoshuliang`, `jsxybh`, `zlxybh`, `htqdrq`, `ydjfrq`, `hetongjine`, `dfhtbh`, `jgbdmc`, `beizhu`, `top_dept`, `laiyuan`, `tongbushijian`, `createuser`, `flow_id`) VALUES ( '$run_id', '$hetongleibie', '$pingshenriqi', '$hetongbianhao', '$zuoyelinghao', '$chenglandanwei', '$kehumingcheng', '$dinghuoneirong', '$dinghuoshuliang', '$jsxybh', '$zlxybh', '', '$ydjfrq', '$hetongjine', '', '', '', '$top_dept', 'OA', '$now', '$user_id', '642')";
		//echo $query2."<br>";
		exequery(TD::conn(),$query2);
		$query2=str_replace("'","\"",$query2);
		$query4="INSERT INTO `TD_OA`.`ht_rizhi` ( `content`, `zhujian`, `leibie`, `createuser`, `createtime`) VALUES ( '$query2', '', '新增合同','$user_id','$now')";
		exequery(TD::conn(),$query4);
		} else {
			$query3="UPDATE `TD_OA`.`ht_hetong` SET   `pingshenriqi`='$pingshenriqi', `hetongbianhao`='$hetongbianhao', `zuoyelinghao`='$zuoyelinghao', `chenglandanwei`='$chenglandanwei', `kehumingcheng`='$kehumingcheng', `dinghuoneirong`='$dinghuoneirong', `dinghuoshuliang`='$dinghuoshuliang', `ydjfrq`='$ydjfrq', `hetongjine`='$hetongjine',  `top_dept`='$top_dept', `tongbushijian`='$now',  `flow_id`='642' WHERE `run_id`='$run_id' and `laiyuan`='OA' ";
				//echo $query3."<br>";
			exequery(TD::conn(),$query3);
			$query3=str_replace("'","\"",$query3);
			$query4="INSERT INTO `TD_OA`.`ht_rizhi` ( `content`, `zhujian`, `leibie`, `createuser`, `createtime`) VALUES ( '$query3', '', '修改合同','$user_id','$now')";
		exequery(TD::conn(),$query4);
						}
	
	}


?>

上一篇:《The way to go学习笔记》第三章


下一篇:tcache poisoning(爆破stout获得libc并且熟练使用了realloc)