| 1 |
<?php |
<?php |
| 2 |
/** |
/** |
| 3 |
* @package Mambo Open Source |
* @package Mambo |
| 4 |
* @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
* @author Mambo Foundation Inc see README.php |
| 5 |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
* @copyright Mambo Foundation Inc. |
| 6 |
* |
* See COPYRIGHT.php for copyright notices and details. |
| 7 |
* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see |
| 8 |
* that Mambo remained free Open Source software owned and managed by the community. |
* LICENSE.php |
| 9 |
* Mambo is Free Software |
* Mambo is free software; you can redistribute it and/or |
| 10 |
|
* modify it under the terms of the GNU General Public License |
| 11 |
|
* as published by the Free Software Foundation; version 2 of the |
| 12 |
|
* License. |
| 13 |
*/ |
*/ |
| 14 |
|
|
| 15 |
/** ensure this file is being included by a parent file */ |
/** ensure this file is being included by a parent file */ |
| 36 |
* @param string The basic link to include in the href |
* @param string The basic link to include in the href |
| 37 |
* @return string |
* @return string |
| 38 |
*/ |
*/ |
| 39 |
function getLimitBox ( $link ) { |
function getLimitBox () { |
| 40 |
$limits = array(); |
$limits = array(); |
| 41 |
for ($i=5; $i <= 30; $i+=5) { |
for ($i=5; $i <= 30; $i+=5) { |
| 42 |
$limits[] = mosHTML::makeOption( "$i" ); |
$limits[] = mosHTML::makeOption( "$i" ); |
| 43 |
} |
} |
| 44 |
$limits[] = mosHTML::makeOption( "50" ); |
$limits[] = mosHTML::makeOption( "50" ); |
| 45 |
|
$limits[] = mosHTML::makeOption( "100" ); |
| 46 |
|
$limits[] = mosHTML::makeOption( "500" ); |
| 47 |
|
$limits[] = mosHTML::makeOption( "1000" ); |
| 48 |
|
$limits[] = mosHTML::makeOption( "2500" ); |
| 49 |
|
$limits[] = mosHTML::makeOption( "5000" ); |
| 50 |
|
|
| 51 |
// build the html select list |
// build the html select list |
| 52 |
$link = sefRelToAbs($link.'&limit=\' + this.options[selectedIndex].value + \'&limitstart='.$this->limitstart); |
$html = mosHTML::selectList( $limits, 'limit', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', |
|
return mosHTML::selectList( $limits, 'limit', |
|
|
'class="inputbox" size="1" onchange="document.location.href=\''.$link.'\';"', |
|
| 53 |
'value', 'text', $this->limit ); |
'value', 'text', $this->limit ); |
| 54 |
|
$html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"$this->limitstart\" />"; |
| 55 |
|
return $html; |
| 56 |
} |
} |
| 57 |
/** |
/** |
| 58 |
* Writes the html limit # input box |
* Writes the html limit # input box |
| 95 |
* @param string The basic link to include in the href |
* @param string The basic link to include in the href |
| 96 |
*/ |
*/ |
| 97 |
function writePagesLinks( $link ) { |
function writePagesLinks( $link ) { |
| 98 |
|
|
| 99 |
|
// clean link - could be better filtered in rewrite |
| 100 |
|
// stops XSS |
| 101 |
|
require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpInputFilter/class.inputfilter.php'); |
| 102 |
|
$iFilter = new InputFilter( null, null, 1, 1 ); |
| 103 |
|
$link = trim( $iFilter->process( $link ) ); |
| 104 |
|
|
| 105 |
|
// Removing task breaks nagivation - temporarily removed for 4.6.2 release |
| 106 |
|
// For more information, See FS#127 |
| 107 |
|
// $link = preg_replace("/(task.*?)&/i", "", $link); |
| 108 |
|
|
| 109 |
$txt = ''; |
$txt = ''; |
| 110 |
|
|
| 111 |
$displayed_pages = 10; |
$displayed_pages = 10; |
| 147 |
$txt .= '<span class="pagenav">'. T_('Next') .' ></span> '; |
$txt .= '<span class="pagenav">'. T_('Next') .' ></span> '; |
| 148 |
$txt .= '<span class="pagenav">'. T_('End') .' >></span>'; |
$txt .= '<span class="pagenav">'. T_('End') .' >></span>'; |
| 149 |
} |
} |
| 150 |
|
|
| 151 |
|
|
| 152 |
|
|
| 153 |
return $txt; |
return $txt; |
| 154 |
} |
} |
| 155 |
} |
} |