Changeset 9498 for trunk/MagicSoft/Mars/datacenter/db/ctamcinfo.php
- Timestamp:
- 08/20/09 14:43:59 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/ctamcinfo.php
r9486 r9498 1 1 <?php 2 2 { 3 function CreateQuery($ _GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs, $timelimits)3 function CreateQuery($alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs, $timelimits) 4 4 { 5 5 $fromtable="MCRunData"; … … 15 15 $statusgroups++; 16 16 17 $query0 = "SELECT ";17 $query0 = "SELECT SQL_CALC_FOUND_ROWS "; 18 18 19 19 if ($groups>0 || $statusgroups>0) … … 204 204 205 205 if (empty($_GET["fNumStart"])) 206 $_GET["fNumStart"]=0; 206 $start=0; 207 else 208 $start=$_GET["fNumStart"]; 207 209 208 210 if (empty($_GET["fSendTxt"])) 209 $query0 .= " LIMIT " . $ _GET["fNumStart"]. ", " . $_GET["fNumResults"];211 $query0 .= " LIMIT " . $start . ", " . $_GET["fNumResults"]; 210 212 211 213 return $query0; 212 214 } 213 215 214 function InitGet( $_GET)216 function InitGet() 215 217 { 216 218 // Find out whether it is the first call to the php script … … 220 222 } 221 223 222 function PrintForm($ _GET, $host, $user, $pw, $db)224 function PrintForm($host, $user, $pw, $db) 223 225 { 224 226 printf("<center>\n"); … … 279 281 mysql_query("SET BIG_TABLES=1"); // necessary for mySQL <= 4 280 282 281 $query0 = CreateQuery($ _GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs, $timelimits);283 $query0 = CreateQuery($alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs, $timelimits); 282 284 283 285 $result0 = mysql_query($query0, $db_id); 286 $result1 = mysql_query("SELECT FOUND_ROWS()", $db_id); 284 287 285 288 if ($result0) 286 289 { 287 290 if ($html=="1" || $html=="2") 288 PrintMagicTable($result0, $alias, $rightalign, "", "", "", "", $_GET);291 PrintMagicTable($result0, $alias, $rightalign, "", "", "", $result1); 289 292 else 290 293 PrintText($result0); 291 294 292 295 mysql_free_result($result0); 296 mysql_free_result($result1); 293 297 } 294 298 mysql_close($db_id); … … 298 302 299 303 include ("include.php"); 300 include ("db .php");304 include ("db2.php"); 301 305 include ("menu.php"); 302 306 include ("ctadefs.php"); … … 319 323 $environment = sizeof($_GET); 320 324 321 InitGet( $_GET);325 InitGet(); 322 326 if (empty($_GET["fPrintTable"])) 323 PrintForm($ _GET, $host, $user, $pw, $db);327 PrintForm($host, $user, $pw, $db); 324 328 325 329 if ($environment==0)
Note:
See TracChangeset
for help on using the changeset viewer.