📄 print.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/utility_html.php" );
echo "<script Language=\"JavaScript\">\r\nvar parent_window =window.opener;\r\nfunction setvalue(optext,opvalue,kname)\r\n{\r\n \r\n option_text=optext;\r\n option_value=opvalue; \r\n var my_option =parent_window.document.createElement(\"OPTION\");\r\n my_option.text=option_text;\r\n my_option.value=option_value;\r\n //parent_window.form1.SOURCE.add(my_option,0);\r\n parent_window.document.all(kname).add(my_option,0);\r\n //parent_window.form1.SOURCE.selectedIndex=0;\r\n parent_window.document.all(kname).selectedIndex=0;\r\n //parent_window.form1.SOURCE.selected;\r\n parent_window.document.all(kname).selected;\r\n //parent.close();\r\n}\r\n</script>\r\n<html>\r\n<head>\r\n<title>表单打印 - ";
echo $RUN_NAME;
echo "</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<style type=\"text/css\">\r\n<!--\r\n.title { font-family: \"宋体\"; font-size: 18pt; font-weight: bold}\r\n-->\r\n</style>\r\n\r\n<script>\r\nfunction myprint()\r\n{\r\n document.execCommand('Print');\r\n}\r\n</script>\r\n</head>\r\n\r\n<body>\r\n\r\n<input type=\"hidden\" name=\"PRINT_MODEL\">\r\n";
$query = "SELECT * from FLOW_FORM_TYPE where FORM_ID='38'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$FORM_NAME = $ROW['FORM_NAME'];
$PRINT_MODEL = $ROW['PRINT_MODEL'];
}
$PRINT_MODEL = str_replace( "#[表单]", "<b>".$FORM_NAME."</b>", $PRINT_MODEL );
$PRINT_MODEL = str_replace( "#[文号]", $RUN_NAME, $PRINT_MODEL );
$PRINT_MODEL = str_replace( "#[时间]", "日期:".$PRCS_TIME1, $PRINT_MODEL );
$ELEMENT_ARRAY = html_element( $PRINT_MODEL );
$ITEM_ID_MAX = sizeof( $ELEMENT_ARRAY );
$ITEM_ID = 0;
$POS = 0;
$ITEM_I = 0;
for ( ; $ITEM_I < $ITEM_ID_MAX; ++$ITEM_I )
{
$ELEMENT = $ELEMENT_ARRAY[$ITEM_I];
echo $ELEMENT;
$ENAME = get_attr( $ELEMENT, "NAME" );
$EVALUE = get_attr( $ELEMENT, "VALUE" );
$ECLASS = get_attr( $ELEMENT, "CLASS" );
echo $ECLASS;
if ( $ECLASS != "DATE" )
{
++$ITEM_ID;
}
if ( $ECLASS == "A" )
{
$ITEM_VALUE = "啊阿阿阿阿";
}
if ( $ECLASS == "B" )
{
$ITEM_VALUE = "不不不不不";
}
if ( $ECLASS == "C" )
{
$ITEM_VALUE = "此次才才才";
}
$POS = strpos( $PRINT_MODEL, $ELEMENT, $POS );
$PRINT_MODEL = substr( $PRINT_MODEL, 0, $POS ).$ITEM_VALUE.substr( $PRINT_MODEL, $POS + strlen( $ELEMENT ) );
}
if ( strstr( $FLOW_VIEW, "1" ) )
{
echo $PRINT_MODEL;
}
$PRINT_FLAG = 1;
echo "\r\n<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -