* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once('xorg.plugin.inc.php');
-
-// {{{ class Trombi
-
class Trombi extends XOrgPlugin
{
- // {{{ properties
-
var $_get_vars = array('offset');
var $limit = 24;
var $admin = false;
var $showpromo = true;
- // }}}
- // {{{ function setNbRows()
-
function setNbRows($row)
{ $this->limit = $row*3; }
- // }}}
- // {{{ function setAdmin()
-
function setAdmin()
{ $this->admin = true; }
- // }}}
- // {{{ function hidePromo()
-
function hidePromo()
{ $this->showpromo = false; }
- // }}}
- // {{{ function show()
-
function show()
{
/* this point is nasty... but since show() is called from the template ...
$page->assign('trombi_admin', $this->admin);
return $page->fetch('include/trombi.tpl');
}
-
- // }}}
}
-// }}}
-
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-// {{{ class XOrgPlugin
-
/**
* XOrg Plugins class
*
*/
class XOrgPlugin
{
- // {{{ properties
-
/** have to override, contents the fields names used to drive the plugin */
var $_get_vars = array();
/** some polymorphism at low cost, may be used, or not */
var $_callback;
- // }}}
- // {{{ function XOrgPlugin()
-
/** constructor.
* the constructor override $_get_vars settings by prefixing the names with $prefix
*/
}
}
- // }}}
- // {{{ function get_value()
-
/** transparent access to $_GET, wrt the right $prefix
*/
function get_value($key)
return Get::v($this->_prefix.$key);
}
- // }}}
- // {{{ function make_url()
-
/** construct an url with the given parameters to drive the plugin.
* leave all other GET params alone
*/
return pl_self() . '?' . join('&', $get);
}
- // }}}
- // {{{ function show()
-
/** need to be overriden. */
function show ()
- { return ''; }
-
- // }}}
+ {
+ return '';
+ }
}
-// }}}
-
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
?>
}
if ($action == 'trombi') {
- require_once 'trombi.inc.php';
-
$trombi = new Trombi(array($this, '_get_list'));
$trombi->setNbRows(4);
$page->assign_by_ref('trombi',$trombi);
$page->assign('no_annu', 1);
}
- require_once 'search.inc.php';
+ require_once dirname(__FILE__).'/search/search.inc.php';
+
$page->changeTpl('geoloc/index.tpl');
$fields = new SFieldGroup(true, advancedSearchFromInput());
$search = str_replace('&','&',$fields->get_url());
$page->changeTpl('geoloc/city.tpl', NO_SKIN);
+ require_once dirname(__FILE__).'/search/search.inc.php';
require_once('geoloc.inc.php');
- require_once('search.inc.php');
if (empty($GLOBALS['IS_XNET_SITE'])) {
$usual_fields = advancedSearchFromInput();
$page->changeTpl('geoloc/country.tpl', NO_SKIN);
}
+ require_once dirname(__FILE__).'/search/search.inc.php';
require_once 'geoloc.inc.php';
- require_once 'search.inc.php';
$querystring = $this->_make_qs();
$page->assign('searchvars', $querystring);
$owners = $this->client->get_owners($liste);
if (is_array($owners)) {
- require_once 'trombi.inc.php';
$moderos = list_sort_owners($owners[1]);
$page->assign_by_ref('details', $owners[0]);
function handler_trombi(&$page, $promo = null)
{
- require_once 'trombi.inc.php';
-
$page->changeTpl('trombipromo.tpl');
$page->assign('xorg_title', 'Polytechnique.org - Trombi Promo');
{
global $globals;
- require_once 'search.inc.php';
+ require_once dirname(__FILE__).'/search/search.inc.php';
$page->changeTpl('search/index.tpl');
{
global $globals;
- require_once 'search.inc.php' ;
+ require_once dirname(__FILE__).'/search/search.inc.php';
require_once 'applis.func.inc.php';
require_once 'geoloc.inc.php';
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once('xorg.plugin.inc.php');
-require_once("search/classes.inc.php");
+require_once dirname(__FILE__).'/classes.inc.php';
// {{{ function advancedSearchFromInput
function getadr_join($table) {