⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imgedit.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
echo "\r\n";
include_once( "inc/conn.php" );
include_once( "inc/img_flow.inc.php" );
include_once( "inc/img_patten.inc.php" );
$connection = openconnection( );
$query = "SELECT FLOW_NAME from FLOW_TYPE WHERE FLOW_ID={$FLOW_ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$FLOW_NAME = $ROW[0];
}
$query = "SELECT COUNT(*) AS cnt from FLOW_RUN where FLOW_ID={$FLOW_ID}";
$cursor = exequery( $connection, $query );
$ROW = mysql_fetch_array( $cursor );
if ( 0 < $ROW['cnt'] )
{
	$FLOW_READ_ONLY = 1;
}
$sql = "  \r\n     SELECT ID,FLOW_ID,PRCS_ID,PRCS_NAME,PRCS_USER,PRCS_ITEM,PRCS_DEPT,PRCS_PRIV,PRCS_TO \r\n\t       FROM flow_process \r\n\t\t       WHERE FLOW_ID=".$_REQUEST['FLOW_ID']." \r\n\t\t\t      ORDER BY ID ASC\r\n\t\t\t\t  ";
$res = exequery( $connection, $sql );
$fc = 0;
while ( $row = mysql_fetch_array( $res ) )
{
	$export[$row['PRCS_ID']] = $row['PRCS_TO'];
	++$fc;
}
if ( 0 < $fc )
{
	$NowImg = new imgflow( );
	$ImgPatten = new formatex( );
	$export = $ImgPatten->makeupex( $export );
	$export = $ImgPatten->replaceflag( $export );
	$screenxy = $ImgPatten->countsize( $export );
	$width = $screenxy['x'] - 49;
	$height = $screenxy['y'];
	$NowImg->definepic( "jpeg", $width, $height );
	$w = $NowImg->layer_w;
	$h = $NowImg->layer_h;
	$NowImg->defineexport( $export );
	$NowImg->destroyimg( );
	$coordinate = $NowImg->coordinate;
}
if ( $screenxy['x'] < 600 )
{
	$screenxy['x'] = 700;
}
echo "\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n\"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>流程步骤图形</title>\r\n";
echo "<s";
echo "cript src=\"/inc/prototype.js\"></script>\r\n";
echo "<s";
echo "cript language=\"JavaScript\" type=\"text/JavaScript\">\r\n<!--\r\nfunction MM_reloadPage(init) {  //reloads the window if Nav4 resized\r\n  if (init==true) with (navigator) {if ((appName==\"Netscape\")&&(parseInt(appVersion)==4)) {\r\n    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}\r\n  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();";
echo "\r\n}\r\nMM_reloadPage(true);\r\n//-->\r\n\r\nwindow.resizeTo(";
echo $screenxy['x'];
echo ",";
echo $screenxy['y'] + 300;
echo ");\r\n</script>\r\n";
echo "<s";
echo "tyle type=\"text/css\">\r\n<!--\r\n\r\n\r\ntd {\r\n\tfont-size: 12px;\r\n\tborder: 0px;\r\n}\r\n.win {\r\n\tfilter:BlendTrans(duration=1) DropShadow(Color=#cccccc, OffX=3, OffY=3) alpha(opacity=90)\r\n}\r\n\r\n\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body>\r\n\r\n\r\n</head>\r\n\r\n";
echo "<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n  <tr class=\"tablehead2\">\r\n    <td ><BUTTON class=btn onclick=\"location='processmain.php?FLOW_ID=";
echo $FLOW_ID;
echo "&uback=img&tagContent=tagContent1'\"><table><tr valign=middle ><td><img src=\"/images/workflow/html_go.gif\" align=\"center\"></td> <td>新建节点</td></tr></table></BUTTON>\r\n\t</td>\r\n  </tr>\r\n</table>\r\n\r\n";
if ( 0 < $fc )
{
	$flowinfo = $coordinate;
	$query = "SELECT * from FLOW_PROCESS WHERE FLOW_ID=".$_REQUEST['FLOW_ID']." ORDER BY PRCS_ID";
	$cursor = exequery( $connection, $query );
	$PRCS_COUNT = 0;
	while ( $ROW = mysql_fetch_array( $cursor ) )
	{
		++$PRCS_COUNT;
		$flowinfo[$PRCS_COUNT]['prcsname'] = $ROW['PRCS_NAME'];
		$flowinfo[$PRCS_COUNT]['id'] = $ROW['ID'];
		$flowinfo[$PRCS_COUNT]['prcsid'] = $ROW['PRCS_ID'];
	}
	echo "\r\n";
	while ( list( $key, $flowdetail ) = each( $flowinfo ) )
	{
		++$k;
		$str_js .= "\t\t  window.mm_menu_{$k} = new Menu(\"root\",90,24,\"宋体, SimSun, NSimSun\",12,\"#999999\",\"#000000\",\"#E2E4E3\",\"#f6f6f6\",\"left\",\"middle\",6,1,1000,-5,7,true,false,true,0,true,true);\r\n\t\t  mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;节点信息&nbsp;&nbsp;\",\"location='processmain.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent1'\");\r\n\t\t  mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;办理人员&nbsp;&nbsp;\",\"location='processmain.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent2'\");\r\n\t\t  mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;字段控制&nbsp;&nbsp;\",\"location='processmain.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent3'\");\r\n\t\t  mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;路径设置&nbsp;&nbsp;\",\"location='processmain.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent4'\");\r\n\t\t  mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;出口条件&nbsp;&nbsp;\",\"location='processmain.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent5'\");\r\n\t\t  /*mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;超时控制&nbsp;&nbsp;\",\"location='processmain.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent6'\");*/";
		if ( $FLOW_READ_ONLY != 1 )
		{
			$str_js .= "\t\t\t  mm_menu_{$k}.addMenuItem(\"&nbsp;&nbsp;删除节点&nbsp;&nbsp;\",\"location='redel.php?FLOW_ID={$_REQUEST['FLOW_ID']}&ID={$flowdetail['id']}&uback=img&tagContent=tagContent6'\");";
		}
		$str_js .= "\t\t  mm_menu_{$k}.hideOnMouseOut=true;\r\n\t\t  mm_menu_{$k}.bgColor='#00ccff';";
	}
	$str_js .= "mm_menu_{$k}.writeMenus();";
	echo "<s";
	echo "cript>\r\n\r\nfunction mmLoadMenus() {\r\n";
	echo $str_js;
	echo "}\r\nfunction ShowHideObj(id,mml){\r\n\t\r\n\tvar idObj = document.getElementById(id);\r\n\tif(idObj.style.display == \"none\"){\r\n\t\tidObj.style.display = \"\";\r\n\t}\r\n\telse{\r\n\t\tidObj.style.display = \"none\";\r\n\t}\r\n\r\n}\r\n</SCRIPT>\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"5\">\r\n\t<tr>\r\n\t\t<td><a href=\"#\" style=\"cursor:hand\" onclick=\"ShowHideObj('flowimgdiv',0)\">显示或隐藏图形</a> <a   href=\"#\" style=\"cursor:h";
	echo "and\" onclick=\"ShowHideObj('flowlistdiv',0)\"> 显示或隐藏列表</a>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>\r\n\t\t办理人员是一定要设置的,设置出口条件前请先设置路径,流程已经运行过了节点将不能再删除!\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n<div id=\"flowimgdiv\">\r\n";
	echo "<s";
	echo "cript src=\"/inc/mm_menu.js\"></script>\r\n";
	echo "<s";
	echo "cript>mmLoadMenus();</script>\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >\r\n  <tr>\r\n    <td><div id=\"parentLayer\" style=\"position:absolute; width:1px; height:1px; z-index:0\" >\r\n";
	reset( $flowinfo );
	unset( $k );
	while ( list( $key, $flowdetail ) = each( $flowinfo ) )
	{
		++$k;
		$x = $flowdetail['TL']['0'];
		$y = $flowdetail['TL']['1'];
		$prcsname = $flowdetail['prcsname'];
		$prcsid = $flowdetail['prcsid'];
		echo "<div id=\"";
		echo "layer".$k;
		echo "\" style=\"position:absolute; left:";
		echo $x;
		echo "px; top:";
		echo $y;
		echo "px; width:";
		echo $w;
		echo "px; height:";
		echo $h;
		echo "px; z-index:0; background-color: #E2E4E3; layer-background-color: #E2E4E3; border: 1px none #000000;\" >\r\n  <table width=\"100%\" height=\"";
		echo $h;
		echo "\" border=\"1\" cellpadding=\"2\" cellspacing=\"1\" bordercolor=\"#666666\"\r\n  onmouseover=\"MM_showMenu(window.mm_menu_";
		echo $k;
		echo ",";
		echo $x + 70;
		echo ",";
		echo $y + 100;
		echo ",null,'edit');\" \r\n                          onmouseout=\"MM_startTimeout();\" shape=RECT alt=\"\" \r\n                          coords=32,74,135,95 \r\n                          style=\"cursor:hand \"\r\n  \r\n  >\r\n    <tr align=\"center\">\r\n\t<td height=\"20\" bgcolor=\"#0099CC\">";
		echo "<s";
		echo "pan style=\"color:#FFFFFF;font-weight:bolder \">\r\n\t序号:";
		echo $prcsid;
		echo "</span>\r\n\t</td>\r\n\t</tr>\r\n    <tr >\r\n      <td align=\"center\"  valign=\"middle\">";
		echo "<s";
		echo "pan class=\"style1\">";
		echo $prcsname;
		echo "</span></td>\r\n    </tr>\r\n  </table>\r\n</div>\r\n";
	}
	echo "\t\r\n\t\r\n\t</div>\r\n\t\t<div>\r\n\t\t\t<img src='imgflow.php?FLOW_ID=";
	echo $_REQUEST['FLOW_ID'];
	echo "'>\r\n\t\t</div>\r\n\t</td>\r\n  </tr>\r\n</table>\r\n</div>\r\n<div id=\"flowlistdiv\">\r\n";
	$connection = openconnection( );
	$query = "SELECT * from FLOW_PROCESS WHERE FLOW_ID={$FLOW_ID} ORDER BY PRCS_ID";
	$cursor = exequery( $connection, $query );
	$PRCS_COUNT = 0;
	while ( $ROW = mysql_fetch_array( $cursor ) )
	{
		++$PRCS_COUNT;
		$ID = $ROW['ID'];
		$PRCS_ID = $ROW['PRCS_ID'];
		$PRCS_NAME = $ROW['PRCS_NAME'];
		$PRCS_NAME = str_replace( "<", "&lt", $PRCS_NAME );
		$PRCS_NAME = str_replace( ">", "&gt", $PRCS_NAME );
		$PRCS_NAME = stripslashes( $PRCS_NAME );
		if ( $PRCS_COUNT == 1 )
		{
			echo "  <table border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n    <tr class=\"TableHeader\">\r\n      <td nowrap >序号</td>\r\n      <td nowrap >名称</td>\r\n      <td nowrap >编辑该步骤的各项属性</td>\r\n      <td nowrap >删除步骤</td>\r\n    </tr>\r\n";
		}
		if ( $PRCS_COUNT % 2 == 1 )
		{
			$TableLine = "TableLine1";
		}
		else
		{
			$TableLine = "TableLine2";
		}
		echo "    <tr class=\"";
		echo $TableLine;
		echo "\">\r\n      <td >";
		echo $PRCS_ID;
		echo "</td>\r\n      <td >";
		echo $PRCS_NAME;
		echo "</td>\r\n      <td nowrap>&nbsp;\r\n          <a href=\"processmain.php?FLOW_ID=";
		echo $FLOW_ID;
		echo "&ID=";
		echo $ID;
		echo "&tagContent=tagContent1\">节点信息</a>&nbsp;&nbsp;\r\n          <a href=\"processmain.php?FLOW_ID=";
		echo $FLOW_ID;
		echo "&ID=";
		echo $ID;
		echo "&tagContent=tagContent2\">办理人员</a>&nbsp;&nbsp;\r\n\t\t  <a href=\"processmain.php?FLOW_ID=";
		echo $FLOW_ID;
		echo "&ID=";
		echo $ID;
		echo "&tagContent=tagContent3\">字段控制</a>&nbsp;&nbsp;\r\n\t\t  <a href=\"processmain.php?FLOW_ID=";
		echo $FLOW_ID;
		echo "&ID=";
		echo $ID;
		echo "&tagContent=tagContent4\">路径设置</a>&nbsp;&nbsp;\r\n\t\t  <a href=\"processmain.php?FLOW_ID=";
		echo $FLOW_ID;
		echo "&ID=";
		echo $ID;
		echo "&tagContent=tagContent5\">出口条件</a>&nbsp;&nbsp;\r\n          <!--<a href=\"processmain.php?FLOW_ID=";
		echo $FLOW_ID;
		echo "&ID=";
		echo $ID;
		echo "&tagContent=tagContent6\">超时控制</a>&nbsp;&nbsp;-->\r\n      </td>\r\n      <td nowrap>\r\n";
		if ( $FLOW_READ_ONLY != 1 )
		{
			echo "          <a href=\"redel.php?FLOW_ID=";
			echo $FLOW_ID;
			echo "&ID=";
			echo $ID;
			echo "&tagContent=tagContent6\">删除节点</a>\r\n";
		}
		echo "      </td>\r\n    </tr>\r\n";
	}
	echo "</table>\r\n</div>\r\n";
}
else
{
	message( "", "尚未定义流程步骤" );
}
echo "\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -