control.php

来自「极限网络智能办公系统 - Office Automation 2008 官方10」· PHP 代码 · 共 56 行

PHP
56
字号
<?php
 

include_once( "inc/auth.php" );
$FLOW_VIEW = $_COOKIE['FLOW_VIEW_COOKIE'];
if ( $FLOW_VIEW == "" )
{
	$FLOW_VIEW = "123";
}
echo "\r\n<html>\r\n<head>\r\n<title>表单打印</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n<script Language=\"JavaScript\">\r\nfunction copy_form()\r\n{\r\n  parent.form_view.document.execCommand('selectall');\r\n  parent.form_view.document.execCommand('copy');\r\n  alert(\"表单全文已复制到剪贴板!\");\r\n}\r\n\r\nfunction print_preview()\r\n{\r\n  parent.form_view.MyWebBrowser.innerHTML=\"<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>\";\r\n  parent.form_view.focus();\r\n  parent.form_view.WebBrowser.ExecWB(7,1);\r\n}\r\n\r\nfunction form_export_html()\r\n{\r\n  parent.form_view.MyWebBrowser.innerHTML=\"<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>\";\r\n  parent.form_view.WebBrowser.ExecWB(4,1);\r\n}\r\n\r\nfunction form_export_word()\r\n{\r\n  var FLOW_VIEW=\"\";\r\n  if(CHECK1.checked)\r\n     FLOW_VIEW+=\"1\";\r\n  if(CHECK2.checked)\r\n     FLOW_VIEW+=\"2\";\r\n  if(CHECK3.checked)\r\n     FLOW_VIEW+=\"3\";\r\n  if(CHECK4.checked)\r\n     FLOW_VIEW+=\"4\";\r\n  location=\"../print.php?WORD=1&RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "&FLOW_VIEW=\"+FLOW_VIEW;\r\n}\r\n\r\nfunction flow_view()\r\n{\r\n  var FLOW_VIEW=\"\";\r\n  if(CHECK1.checked)\r\n     FLOW_VIEW+=\"1\";\r\n  if(CHECK2.checked)\r\n     FLOW_VIEW+=\"2\";\r\n  if(CHECK3.checked)\r\n     FLOW_VIEW+=\"3\";\r\n  if(CHECK4.checked)\r\n     FLOW_VIEW+=\"4\";\r\n  parent.form_view.location=\"../print.php?RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "&FLOW_VIEW=\"+FLOW_VIEW;\r\n}\r\n\r\nfunction flow_window()\r\n{\r\n  var FLOW_VIEW=\"\";\r\n  if(CHECK1.checked)\r\n     FLOW_VIEW+=\"1\";\r\n  if(CHECK2.checked)\r\n     FLOW_VIEW+=\"2\";\r\n  if(CHECK3.checked)\r\n     FLOW_VIEW+=\"3\";\r\n  if(CHECK4.checked)\r\n     FLOW_VIEW+=\"4\";\r\n  window.open(\"../print.php?RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "&FLOW_VIEW=\"+FLOW_VIEW);\r\n}\r\nfunction setCookie(name,value) {\r\n   var today = new Date();\r\n   var expires = new Date();\r\n   expires.setTime(today.getTime() + 1000*60*60*24*2000);\r\n   parent.document.cookie = name + \"=\" + escape(value) + \"; expires=\" + expires.toGMTString();\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n\r\n<body class=\"bodycolor\" topmargin=\"7\" leftmargin=\"1\">\r\n<table class=\"Big1\" width=\"100%\">\r\n<tr class=\"Small\">\r\n\t<td align=\"left\" nowrap><b>\r\n\t\t流水号:";
echo $RUN_ID;
echo "   <input type=\"checkbox\" name=\"CHECK1\" id=\"CHECK1\" class=\"SmallButton\" onclick=\"flow_view();\" ";
if ( strstr( $FLOW_VIEW, "1" ) )
{
	echo "checked";
}
echo "> <label for=\"CHECK1\" style=\"cursor:hand\">表单</label>\r\n   <input type=\"checkbox\" name=\"CHECK2\" id=\"CHECK2\" class=\"SmallButton\" onclick=\"flow_view();\" ";
if ( strstr( $FLOW_VIEW, "2" ) )
{
	echo "checked";
}
echo "> <label for=\"CHECK2\" style=\"cursor:hand\">公共附件</label>\r\n   <input type=\"checkbox\" name=\"CHECK3\" id=\"CHECK3\" class=\"SmallButton\" onclick=\"flow_view();\" ";
if ( strstr( $FLOW_VIEW, "3" ) )
{
	echo "checked";
}
echo "> <label for=\"CHECK3\" style=\"cursor:hand\">会签</label>\r\n   <input type=\"checkbox\" name=\"CHECK4\" id=\"CHECK4\" class=\"SmallButton\" onclick=\"flow_view();\" ";
if ( strstr( $FLOW_VIEW, "4" ) )
{
	echo "checked";
}
echo "> <label for=\"CHECK4\" style=\"cursor:hand\">流程图</label></b>\r\n  </td>\r\n  <td align=\"right\" nowrap>\r\n   <input type=\"button\" value=\"打印\" class=\"SmallButton\" ";
$VAL = "PRINT_".$RUN_ID."_".$FLOW_ID;
if ( $$VAL == 1 )
{
	echo "style='color:green'";
}
echo " onclick=\"setCookie('PRINT_";
echo $RUN_ID;
echo "_";
echo $FLOW_ID;
echo "','1');parent.form_view.myprint()\">\r\n   <input type=\"button\" value=\"打印预览\" class=\"SmallButton\" onclick=\"print_preview()\">\r\n   <input type=\"button\" value=\"复制\" class=\"SmallButton\" onclick=\"copy_form();\" title=\"复制全文至剪贴版,可粘贴至word并调整格式打印(先打开word再复制)\">\r\n   <input type=\"button\" value=\"导出HTML\" class=\"SmallButton\" onclick=\"form_export_html();\" title=\"导出表单为HTML格式\">\r\n   <input type=\"button\" value=\"导出WORD\" class=\"SmallButton\" onclick=\"form_export_word();\" title=\"导出表单为WORD格式\">\r\n   <input type=\"button\" value=\"新窗口\" class=\"SmallButton\" onclick=\"flow_window();\" title=\"在新窗口显示表单\">\r\n   <input type=\"button\" value=\"关闭\" class=\"SmallButton\" onclick=\"parent.close();\">\r\n  </td>\r\n</tr>\r\n</div>\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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