Changeset 34 for trunk/phpgwapi/inc/adodb/adodb-pager.inc.php
- Timestamp:
- 06/29/07 15:17:46 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/adodb/adodb-pager.inc.php
r2 r34 2 2 3 3 /* 4 V4. 51 29 July 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.4 V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. 5 5 Released under both BSD license and Lesser GPL library license. 6 6 Whenever there is any discrepancy between the two licenses, … … 58 58 function ADODB_Pager(&$db,$sql,$id = 'adodb', $showPageLinks = false) 59 59 { 60 global $ HTTP_SERVER_VARS,$PHP_SELF,$HTTP_SESSION_VARS,$HTTP_GET_VARS;60 global $PHP_SELF; 61 61 62 62 $curr_page = $id.'_curr_page'; 63 if (empty($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];63 if (empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks 64 64 65 65 $this->sql = $sql; … … 70 70 $next_page = $id.'_next_page'; 71 71 72 if (isset($ HTTP_GET_VARS[$next_page])) {73 $ HTTP_SESSION_VARS[$curr_page] = $HTTP_GET_VARS[$next_page];74 } 75 if (empty($ HTTP_SESSION_VARS[$curr_page])) $HTTP_SESSION_VARS[$curr_page] = 1; ## at first page76 77 $this->curr_page = $ HTTP_SESSION_VARS[$curr_page];72 if (isset($_GET[$next_page])) { 73 $_SESSION[$curr_page] = (integer) $_GET[$next_page]; 74 } 75 if (empty($_SESSION[$curr_page])) $_SESSION[$curr_page] = 1; ## at first page 76 77 $this->curr_page = $_SESSION[$curr_page]; 78 78 79 79 } … … 243 243 $this->rows = $rows; 244 244 245 if ($this->db->dataProvider == 'informix') $this->db->cursorType = IFX_SCROLL; 246 245 247 $savec = $ADODB_COUNTRECS; 246 248 if ($this->db->pageExecuteCountRows) $ADODB_COUNTRECS = true; … … 264 266 $grid = $this->RenderGrid(); 265 267 $footer = $this->RenderPageCount(); 268 269 $this->RenderLayout($header,$grid,$footer); 270 266 271 $rs->Close(); 267 272 $this->rs = false; 268 269 $this->RenderLayout($header,$grid,$footer);270 273 } 271 274
Note: See TracChangeset
for help on using the changeset viewer.