📄 flow_report_detail_week.php
字号:
<?php
include_once( "inc/auth.php" );
$sql = "SELECT * FROM flow_type WHERE FLOW_ID=".$_REQUEST['FLOW_ID'];
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$flow_name = $row['FLOW_NAME'];
echo "<html>\r\n<head>\r\n<title>流程表单</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "cript src=\"/inc/prototype.js\"></script>\r\n";
echo "<s";
echo "cript src=\"/inc/common.js\"></script>\r\n";
echo "<s";
echo "cript src=\"/inc/follow.js\"></script>\r\n\r\n";
echo "<s";
echo "tyle>\r\nbody{\r\n\tmargin-left: 0px;\r\n\tmargin-top: 0px;\r\n\tmargin-right: 0px;\r\n\tmargin-bottom: 0px;\r\n\tpadding-left:10px\r\n}\r\n\r\n.container{\r\n\tborder:1px solid #E0E0E0;\r\n\twidth:80px;\r\n\theight:20px;\r\n\tvertical-align:middle;\r\n\twhite-space:nowrap;\r\n\tdisplay:inline;\r\n\ttext-align:center;\r\n\tpadding:4px;\r\n\tcolor:#666666;\r\n\tfont-weight:bold;\r\n}\r\n#tmpdivid{\r\n\twidth:5px;\r\n\twhite-space:nowrap;\r\n\tdisplay:inline;\r\n}\r\n";
echo "</style>\r\n\r\n";
echo "<s";
echo "cript>\r\n\r\nfunction loadingWeek(){\r\n\r\n\turl = 'option_week.php';\r\n\tvar objDivID = document.getElementById('weekstr');\r\n\tvar TIME_YEAR = document.getElementById('TIME_YEAR').value;\r\n\tpar = \"TIME_YEAR=\"+TIME_YEAR;\r\n\r\n\tvar objOtext = document.getElementById('otext');\r\n\tobjOtext.innerHTML = \"周加载中...\";\r\n\r\n\tvar saveGimg = {\r\n\t\tonCreate: function(){\r\n\t\t\tElement.show('divsave');\r\n\t\t},\r\n\t\tonComplete: fun";
echo "ction() {\r\n\t\t\tif(Ajax.activeRequestCount == 0){\r\n\t\t\t\tElement.hide('divsave');\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tAjax.Responders.register(saveGimg);\t\r\n\t\r\n\tqueryString = par;\r\n\tnew Ajax.Request\r\n\t(\r\n\t\turl,\r\n\t\t{\r\n\t\t\tmethod: \"post\",\t\r\n\t\t\tonSuccess : function(resp)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tobjDivID.innerHTML = resp.responseText;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\tonFailure : function()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\talert(url);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\t";
echo "parameters : queryString\r\n\t\t}\r\n\t);\r\n\r\n}\r\n\r\n\r\n\r\nfunction loadingImg(divid,url,par){\r\n\tvar TIME_YEAR = document.getElementById('TIME_YEAR').value;\r\n\tvar TIME_WEEK = document.getElementById('TIME_WEEK').value;\r\n\tpar = 'REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "';\r\n\tvar objDivID = document.getElementById(divid);\r\n\r\n\tobjDivID.src = url+'?'+par;\r\n\r\n\tvar objOtext = document.getElementById('otext');\r\n\tobjOtext.innerHTML = \"图形加载中...\";\r\n\r\n\tvar saveGimg = {\r\n\t\tonCreate: function(){\r\n\t\t\tElement.show('divsave');\r\n\t\t},\r\n\t\tonComplete: function() {\r\n\t\t\tif(Ajax.activeRequestCount == 0){\r\n\t\t\t\tElement.hide('divsave');\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tAjax.Responders.register(sav";
echo "eGimg);\t\r\n\t\r\n\r\n\r\n\tqueryString = par;\r\n\tnew Ajax.Request\r\n\t(\r\n\t\turl,\r\n\t\t{\r\n\t\t\tmethod: \"post\",\t\r\n\t\t\tonSuccess : function(resp)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//alert(objDivID.src);\r\n\t\t\t\t\t\t\t//alert(objDivID.src);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\tonFailure : function()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\talert(url);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\tparameters : queryString\r\n\t\t}\r\n\t);\r\n\r\n}\r\n\r\nfunction refImgReport(){\r\n\tvar TIME_YEAR = document.getElementB";
echo "yId('TIME_YEAR').value;\r\n\tvar TIME_WEEK = document.getElementById('TIME_WEEK').value;\r\n\tloadingImg('imgimgyear','/general/report/workflow/img_line_year.php','REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "');\r\n\tloadingImg('imgimgbaryear','/general/report/workflow/img_bar_year.php','REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "');\r\n\tloadingImg('imgimgpieyear','/general/report/workflow/img_pie_year.php','REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "');\r\n\r\n}\r\n\r\nfunction openWin(imgurl,par){\r\n\tvar TIME_YEAR = document.getElementById('TIME_YEAR').value;\r\n\tvar TIME_WEEK = document.getElementById('TIME_WEEK').value;\r\n\tpar = 'REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "';\r\n\r\n\tURL=\"img_resize.php?imgurl=\"+imgurl+\"&\"+par;\r\n\tmyleft=(screen.availWidth-500)/2;\r\n\twindow.open(URL,\"\",\"height=500,width=850,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=\"+myleft+\",resizable=yes\");\r\n}\r\n\r\nfunction downloadReport(){\r\n\tvar TIME_YEAR = document.getElementById('TIME_YEAR').value;\r\n\tvar TIME_WEEK = document.getElementById('TIME_WEEK').value;\r\n\tTYPE_FILE =";
echo " document.getElementById('TYPE_FILE').value;\r\n\tvar\tpar = 'REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "';\r\n\t\r\n\tmyleft=(screen.availWidth-500)/2;\r\n\tif(TYPE_FILE == 'xls'){\r\n\t\tURL = \"excel.php?\"+par;\r\n\t\t\r\n\t}\r\n\tif(TYPE_FILE == \"html\"){\r\n\t\tURL = \"html.php?\"+par;\r\n\t\r\n\t}\r\n\tif(TYPE_FILE == \"csv\"){\r\n\t\tURL = \"csv.php?\"+par;\r\n\t\r\n\t}\r\n\twindow.open(URL,\"\",\"height=500,width=850,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=\"+myleft+\",resizable=yes\");\r\n\t\r\n}\r\n\r\nfunction downloadReportDetai";
echo "l(){\r\n\tvar TIME_YEAR = document.getElementById('TIME_YEAR').value;\r\n\tvar TIME_WEEK = document.getElementById('TIME_WEEK').value;\r\n\tvar\tpar = 'REPORT_ID=";
echo $_REQUEST['REPORT_ID'];
echo "&REPORT_TYPE=week&TIME_YEAR='+TIME_YEAR+\"&TIME_WEEK=\"+TIME_WEEK+'&FLOW_ID=";
echo $_REQUEST['FLOW_ID'];
echo "';\r\n\t\r\n\tmyleft=(screen.availWidth-500)/2;\r\n\tURL = \"report_download.php?\"+par;\r\n\twindow.open(URL,\"\",\"height=500,width=850,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=\"+myleft+\",resizable=yes\");\r\n\t\r\n}\r\n\r\n\r\n\r\n</script>\r\n</head>\r\n<body >\r\n\r\n";
$requ = "REPORT_ID=".$_REQUEST['REPORT_ID']."&FLOW_ID=".$_REQUEST['FLOW_ID'];
echo "<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n <tr class=\"tablehead1\">\r\n <td><img src=\"/images/workflow.gif\" align=\"absmiddle\"> 流程报表 - ";
echo $flow_name;
echo "</td>\r\n </tr>\r\n <tr class=\"tablehead2\">\r\n <td>\r\n\t<BUTTON class=btn onclick=\"location='flow_report_detail.php?";
echo $requ;
echo "'\"><table><tr valign=middle ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">年报表</span></td></tr></table></BUTTON> \r\n\t<BUTTON class=btn onclick=\"location='flow_report_detail_month.php?";
echo $requ;
echo "'\"><table><tr valign=middle ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">月报表</span></td></tr></table></BUTTON> \r\n\t<BUTTON class=btn onclick=\"location='flow_report_detail_week.php?";
echo $requ;
echo "'\"><table><tr valign=middle ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">周报表</span></td></tr></table></BUTTON> \r\n\t<BUTTON class=btn onclick=\"location='flow_report_detail_day.php?";
echo $requ;
echo "'\"><table><tr valign=middle ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">日报表</span></td></tr></table></BUTTON> \r\n\t<BUTTON class=btn onclick=\"location='flow_report_detail_search.php?";
echo $requ;
echo "'\"><table><tr valign=middle ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">查询报表</span></td></tr></table></BUTTON> \r\n\t<BUTTON class=btn onclick=\"location='report_list.php?FLOW_ID=";
echo $FLOW_ID;
echo "'\"><table><tr valign=middle ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">返回</span></td></tr></table></BUTTON> \r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<hr width=\"95%\" height=\"1\" align=\"left\" color=\"#ffffff\">\r\n\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"5\" width=\"100%\">\r\n<form action=\"report_do.php\" name=\"form1\" method=\"post\">\r\n\t<tr>\r\n\t\t<td nowrap width=\"100\" class=\"tableline2\">选择年</td>\r\n\t\t<td class=\"tableline1\" width=\"100\">\r\n\t\t\t";
echo "<s";
echo "elect name=\"TIME_YEAR\" onchange=\"loadingWeek();\">\r\n\t\t\t\t";
$startYear = "1990";
$endYear = "2030";
$sledYear = $_REQUEST['selectYear'] == "" ? date( "Y" ) : $sledYear;
$i = $startYear;
for ( ; $i < $endYear; ++$i )
{
echo "\t\t\t\t<option value=\"";
echo $i;
echo "\" ";
if ( $sledYear == $i )
{
echo "selected";
}
echo ">";
echo $i;
echo "年</option>\r\n\t\t\t\t";
}
echo "\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</td>\r\n\t\t<td nowrap width=\"100\" class=\"tableline2\">选择周\r\n\t\t</td>\r\n\t\t<td width=\"200\"><div id=\"weekstr\">";
echo "<s";
echo "elect name=\"TIME_WEEK\">\r\n";
$sledYear = $_REQUEST['TIME_YEAR'] == "" ? date( "Y" ) : $_REQUEST['TIME_YEAR'];
$startWeek = date( "W", strtotime( $sledYear."-01-01 00:00:00" ) );
$newtime = strtotime( $sledYear."-01-01 00:00:00" );
$firstday = date( "w", strtotime( $sledYear."-01-01 00:00:00" ) );
if ( 1 < $startWeek )
{
$disday = 7 - date( "w", strtotime( $sledYear."-01-01 00:00:00" ) );
$newtime = strtotime( $sledYear."-01-01 00:00:00" ) + ( $disday + 1 ) * 24 * 60 * 60;
$firstday = date( "w", $newtime );
$startWeek = date( "W", $newtime );
}
$endWeek = date( "W", strtotime( $sledYear."-12-30 00:00:00" ) );
$sledWeek = $_REQUEST['selectWeek'] == "" ? date( "W" ) : $sledWeek;
$initDay = $newtime;
$i = $startWeek;
for ( ; $i <= $endWeek; ++$i )
{
if ( $i == 1 )
{
$sday = date( "Y-m-d", $initDay );
$eday = date( "Y-m-d", $initDay + ( 7 - $firstday ) * 24 * 60 * 60 );
}
else
{
$sday = date( "Y-m-d", strtotime( $eday." 00:00:00" ) + 86400 );
$eday = date( "Y-m-d", strtotime( $eday." 00:00:00" ) + 604800 );
}
echo "<option value=\"";
echo $i;
echo "\" ";
if ( $sledWeek == $i )
{
echo "selected";
}
echo ">第";
echo $i;
echo "周(";
echo $sday;
echo "至";
echo $eday;
echo ")</option>\r\n";
}
echo "\r\n</select>\r\n\t\t\t</div>\r\n\t\t\t";
echo "<s";
echo "cript>\r\n\t\t\tloadingWeek();\r\n\t\t\t</script>\r\n\t\t</td><td class=\"tableline1\"><INPUT TYPE=\"button\" class=\"smallinput\" value=\"显示图形\" onclick=\"refImgReport()\"></td>\r\n\t</tr>\r\n\t<input type=\"hidden\" name=\"FLOW_ID\" value=\"";
echo $_REQUEST['FLOW_ID'];
echo "\">\r\n\t<input type=\"hidden\" name=\"REPORT_ID\" value=\"";
echo $_REQUEST['REPORT_ID'];
echo "\">\r\n</table>\r\n\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"5\" width=\"100%\">\r\n\t<tr>\r\n\t\t<td nowrap width=\"100\" class=\"tableline2\">选择导出类型</td>\r\n\t\t<td class=\"tableline1\" width=\"100\">\r\n\t\t\t";
echo "<s";
echo "elect name=\"TYPE_FILE\" id=\"TYPE_FILE\">\r\n\r\n\t\t\t\t<option value=\"xls\" >xls</option>\r\n\t\t\t\t<option value=\"html\" >html</option>\r\n\t\t\t\t<option value=\"csv\" >csv</option>\r\n\r\n\t\t\t</select>\r\n\t\t</td>\r\n\t\t<td class=\"tableline1\"><INPUT TYPE=\"button\" class=\"smallinput\" value=\"下载周分析数据\" onclick=\"downloadReport()\"> </td>\r\n\t</tr>\r\n\t<tr>\t\t<td nowrap class=\"tableline2\"> </td>\r\n\t\t<td class=\"tableline1\" > \r\n\t\t</td>\r\n\t\t<td cl";
echo "ass=\"tableline1\"><INPUT TYPE=\"button\" class=\"smallinput\" value=\"下载详细数据\" onclick=\"downloadReportDetail()\"> </td>\r\n\t</tr>\r\n</form>\r\n</table>\r\n\r\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"5\" width=\"100%\">\r\n\t<tr>\r\n\t\t<td class=\"tableline2\"><a onclick=\"loadingImg('imgimgyear','/general/report/workflow/img_line_year.php','')\" style=\"cursor:hand;color:blue\">一周内的各项数值走势图</a> <img src=\"/images/repo";
echo "rt/chart_curve.gif\" title=\"刷新数据\" style=\"cursor:hand\" onclick=\"loadingImg('imgimgyear','/general/report/workflow/img_line_year.php','')\"></td>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td class=\"tableline1\"><div id=\"divimgyear\"><img src=\"/images/workflow/imgload.gif\" id=\"imgimgyear\" style=\"cursor:hand\" onclick=\"openWin('img_line_year.php','')\"></div></td>\r\n\t\t</td>\r\n\t</tr>\r\n\r\n\t<tr>\r\n\t\t<td class=\"tableline2\"><a onclick=\"";
echo "loadingImg('imgimgbaryear','/general/report/workflow/img_bar_year.php','')\" style=\"cursor:hand;color:blue\">一周内的各项数值柱状图</a> <img src=\"/images/report/chart_bar.gif\" title=\"刷新数据\" style=\"cursor:hand\" onclick=\"loadingImg('imgimgbaryear','/general/report/workflow/img_bar_year.php','')\"></td>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td class=\"tableline1\"><div id=\"divimgyear\"><img src=\"/images/workflow/imgload.g";
echo "if\" id=\"imgimgbaryear\" style=\"cursor:hand\" onclick=\"openWin('img_bar_year.php','')\"></div></td>\r\n\t\t</td>\r\n\t</tr>\r\n\r\n\t<tr>\r\n\t\t<td class=\"tableline2\"><a onclick=\"loadingImg('imgimgpieyear','/general/report/workflow/img_pie_year.php','')\" style=\"cursor:hand;color:blue\">一周内的各项数值饼形图</a> <img src=\"/images/report/chart_pie.gif\" title=\"刷新数据\" style=\"cursor:hand\" onclick=\"loadingImg('imgimgpieyear',";
echo "'/general/report/workflow/img_pie_year.php','')\"></td>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td class=\"tableline1\"><div id=\"divimgyear\"><img src=\"/images/workflow/imgload.gif\" id=\"imgimgpieyear\" style=\"cursor:hand\" onclick=\"openWin('img_pie_year.php','')\"></div></td>\r\n\t\t</td>\r\n\t</tr>\r\n\r\n</table>\r\n";
echo "<s";
echo "cript>\r\n\r\nloadingImg('imgimgyear','/general/report/workflow/img_line_year.php','');\r\nloadingImg('imgimgbaryear','/general/report/workflow/img_bar_year.php','');\r\nloadingImg('imgimgpieyear','/general/report/workflow/img_pie_year.php','');\r\n\r\n</script>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -