Changeset 693 for trunk/phpbms/print.php
- Timestamp:
- 12/31/09 13:36:45 (2 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/print.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/print.php
r643 r693 100 100 101 101 if(isset($_POST["choosereport"])){ 102 102 103 $tablePrinter->openwindows=""; 104 103 105 for($i=0;$i<count($_POST["choosereport"]);$i++){ 106 104 107 if($_POST["choosereport"][$i]){ 105 $querystatement="SELECT reportfile,type from reports where id=".$_POST["choosereport"][$i].";"; 106 $queryresult=$db->query($querystatement); 107 if(!$queryresult) $error = new appError(100,"Could not Retrieve Report Information"); 108 $reportrecord=$db->fetchArray($queryresult); 108 109 $querystatement = " 110 SELECT 111 `uuid`, 112 `reportfile`, 113 `type` 114 FROM 115 `reports` 116 WHERE 117 id = ".$_POST["choosereport"][$i]; 118 119 $queryresult = $db->query($querystatement); 120 121 if(!$queryresult) 122 $error = new appError(100,"Could not Retrieve Report Information"); 123 124 $reportrecord = $db->fetchArray($queryresult); 125 109 126 $fakeExtForIE=""; 110 if($reportrecord["type"]=="PDF Report") 111 $fakeExtForIE="&ext=.pdf"; 112 $dateTimeStamp="&ts=".mktime(); // make the url unique to avoid using browser cache 127 128 if($reportrecord["type"] == "PDF Report") 129 $fakeExtForIE = "' + String.fromCharCode(38) + ' &ext=.pdf"; 130 131 // make the url unique to avoid using browser cache 132 $dateTimeStamp = "' + String.fromCharCode(38) + 'ts=".mktime(); 133 113 134 //javascript open each report in new window 114 $tablePrinter->openwindows.="window.open('".APP_PATH.$reportrecord["reportfile"]."?tid=".urlencode($tablePrinter->tableid).$dateTimeStamp.$fakeExtForIE."','print".$i."');\n"; 115 } 116 } 117 } 135 $tablePrinter->openwindows .= "window.open('".APP_PATH.$reportrecord["reportfile"]."?rid=".urlencode($reportrecord["uuid"])."' + String.fromCharCode(38) + 'tid=".urlencode($tablePrinter->tableid).$dateTimeStamp.$fakeExtForIE."','print".$i."');\n"; 136 137 }//endif 138 139 }//endfor 140 141 }//endif 142 118 143 break; 119 144 }