/usr/share/phpgacl/admin/gacl_admin_api.class.php is in phpgacl 3.3.7-7.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | <?php
/**
* phpGACL - Generic Access Control List
* Copyright (C) 2002,2003 Mike Benoit
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For questions, help, comments, discussion, etc., please join the
* phpGACL mailing list. http://sourceforge.net/mail/?group_id=57103
*
* You may contact the author of phpGACL by e-mail at:
* ipso@snappymail.ca
*
* The latest version of phpGACL can be obtained from:
* http://phpgacl.sourceforge.net/
*
* @package phpGACL
*
*/
/*
*
* For examples, see example.php or the Administration interface,
* as it makes use of nearly every API Call.
*
*/
/**
* gacl_admin_api Custom Extended API Class
*
* Class gacl_api should be used for applications that must interface directly with
* phpGACL's data structures, objects, and rules.
*
* @package phpGACL
* @author Mike Benoit <ipso@snappymail.ca>
*
*/
class gacl_admin_api extends gacl_api {
/*
* Administration interface settings
*/
/** @var int Number of items to display per page in the phpGACL interface. */
var $_items_per_page = 100;
/** @var int Maximum number of items to display in a select box. Override to manage large collections via ACL Admin */
var $_max_select_box_items = 100;
/** @var int Maximum number of items to return in an ACL Search. */
var $_max_search_return_items = 100;
/*
*
* Misc admin functions.
*
*/
/**
* return_page()
*
* Sends the user back to a passed URL, unless debug is enabled, then we don't redirect.
* If no URL is passed, try the REFERER
* @param string URL to return to.
*/
function return_page($url="") {
global $_SERVER, $debug;
if (empty($url) AND !empty($_SERVER[HTTP_REFERER])) {
$this->debug_text("return_page(): URL not set, using referer!");
$url = $_SERVER[HTTP_REFERER];
}
if (!$debug OR $debug==0) {
header("Location: $url\n\n");
} else {
$this->debug_text("return_page(): URL: $url -- Referer: $_SERVER[HTTP_REFERRER]");
}
}
/**
* get_paging_data()
*
* Creates a basic array for Smarty to deal with paging large recordsets.
*
* @param ADORecordSet ADODB recordset.
*/
function get_paging_data($rs) {
return array(
'prevpage' => $rs->absolutepage() - 1,
'currentpage' => $rs->absolutepage(),
'nextpage' => $rs->absolutepage() + 1,
'atfirstpage' => $rs->atfirstpage(),
'atlastpage' => $rs->atlastpage(),
'lastpageno' => $rs->lastpageno()
);
}
}
?>
|