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

📄 html.php

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

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "report_query.php" );
$sql = "SELECT * FROM flow_report WHERE REPORT_ID=".$_REQUEST['REPORT_ID']."";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$reportname = $row['REPORT_NAME'];
$file_name = $reportname.date( "YdmHis" ).".html";
if ( $_REQUEST['REPORT_TYPE'] == "year" )
{
	$unit = "月";
	$title = "月份";
}
$html = "<html>\r\n<head>\r\n<title>{$file_name}</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<style>\r\ntd {font-size: 9pt; font-family:Verdana;}\r\n.TableHeader { BACKGROUND: #D3E5FA; color: #000000;  background-image: url(\"/theme/1/headerbg.gif\");height: 22px; font-weight: bold;}\r\n.TableLine1  { BACKGROUND: #F5F5F5;height:20px;}\r\n.TableLine2  { BACKGROUND: #E8E8E8;height:20px;}\r\n</style>\r\n</head>\r\n<body>\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"5\" width=\"100%\">";
$trtd = "<tr class='TableHeader'><td>{$title}</td>";
if ( 0 < count( $arrayData ) )
{
	$i = 0;
	for ( ;	$i < count( $arrayData[1] );	++$i	)
	{
		if ( $arrayData[1][$i]['FIELD_IMG'] == 1 )
		{
			$trtd .= "<td>".$arrayData[1][$i]['FIELD_NAME']."</td>";
		}
	}
}
$trtd .= "<td>合计</td><tr>";
if ( 0 < count( $arrayData ) )
{
	$totalX = array( );
	$i = 1;
	for ( ;	$i <= count( $arrayData );	++$i	)
	{
		$trtd .= "<tr class='TableLine1'><td>".$i.$unit."</td>";
		$totalY = 0;
		$j = 0;
		for ( ;	$j < count( $arrayData[$i] );	++$j	)
		{
			if ( $arrayData[$i][$j]['FIELD_IMG'] == 1 )
			{
				$totalY += $arrayData[$i][$j]['FIELD_VALUE'];
				$trtd .= "<td>".$arrayData[$i][$j]['FIELD_VALUE']."</td>";
				$totalX[$j] += $arrayData[$i][$j]['FIELD_VALUE'];
			}
		}
		$totalXY += $totalY;
		$trtd .= "<td>".$totalY."</td></tr>";
	}
	$trtd .= "<tr class='TableLine2'><td>合计</td>";
	while ( list( $key, $var ) = each( $totalX ) )
	{
		$trtd .= "<td>".$var."</td>";
	}
	$trtd .= "<td>".$totalXY."</td></tr>";
}
$html .= $trtd;
$html .= "</table>\r\n</body>\r\n</html>";
ob_end_clean( );
header( "Cache-control: private" );
header( "Content-type: application/html" );
header( "Accept-Ranges: bytes" );
header( "Accept-Length: ".strlen( $html ) );
header( "Content-Disposition: attachment; filename=".$file_name );
echo $html;
?>

⌨️ 快捷键说明

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