-Subproject commit 63f00a3fb4e2c83167b8293d575da8ac1778709b
+Subproject commit 24173926fa9e13ef5c3509645fca69e5304b0068
function handler_groupex(&$page, $charset = 'utf8')
{
- require_once dirname(__FILE__).'/auth/auth.inc.php';
+ $this->load('auth.inc.php');
$page->assign('referer', true);
$gpex_pass = $_GET["pass"];
return $this->handler_index($page, 'out');
}
}
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
$page->changeTpl('axletter/unsubscribe.tpl');
$page->assign('success', AXLetter::unsubscribe($hash, true));
}
function handler_index(&$page, $action = null)
{
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
$page->changeTpl('axletter/index.tpl');
$page->setTitle('Envois de l\'AX');
function handler_submit(&$page, $action = null)
{
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
if (!AXLetter::hasPerms()) {
return PL_FORBIDDEN;
}
switch (@Post::v('valid')) {
case 'Aperçu':
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
$al = new AXLetter(array($id, $short_name, $subject, $title, $body, $signature,
$promo_min, $promo_max, $echeance, 0, 'new'));
$al->toHtml($page, S::v('prenom'), S::v('nom'), S::v('femme'));
function handler_cancel(&$page, $force = null)
{
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
if (!AXLetter::hasPerms() || !S::has_xsrf_token()) {
return PL_FORBIDDEN;
}
function handler_valid(&$page, $force = null)
{
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
if (!AXLetter::hasPerms() || !S::has_xsrf_token()) {
return PL_FORBIDDEN;
}
function handler_show(&$page, $nid = 'last')
{
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
$page->changeTpl('axletter/show.tpl');
$nl = new AXLetter($nid);
function handler_admin(&$page, $action = null, $uid = null)
{
- require_once dirname(__FILE__) . '/axletter/axletter.inc.php';
+ $this->load('axletter.inc.php');
if (Post::has('action')) {
$action = Post::v('action');
$uid = Post::v('uid');
function handler_pdf(&$page, $arg0 = null, $arg1 = null)
{
- require_once dirname(__FILE__).'/carnet/contacts.pdf.inc.php';
+ $this->load('contacts.pdf.inc.php');
require_once 'user.func.inc.php';
Platal::session()->close();
function handler_rss(&$page, $user = null, $hash = null)
{
- require_once dirname(__FILE__) . '/carnet/feed.inc.php';
+ $this->load('feed.inc.php');
$feed = new CarnetFeed();
return $feed->run($page, $user, $hash);
}
function handler_rss(&$page, $user = null, $hash = null)
{
- require_once dirname(__FILE__) . '/events/feed.inc.php';
+ $this->load('feed.inc.php');
$feed = new EventFeed();
return $feed->run($page, $user, $hash);
}
{
global $globals;
- require_once dirname(__FILE__).'/lists/lists.inc.php';
+ $this->load('lists.inc.php');
$this->client = new MMList(S::v('uid'), S::v('password'));
return $globals->mail->domain;
global $globals;
require_once 'profil.func.inc.php' ;
- require_once dirname(__FILE__).'/payment/money.inc.php' ;
+ $this->load('money.inc.php');
if (!empty($GLOBALS['IS_XNET_SITE'])) {
if (!$globals->asso('id')) {
function handler_review(&$page, $action = null, $mode = null)
{
- require_once dirname(__FILE__) . '/platal/review.inc.php';
+ $this->load('review.inc.php');
$dom = 'Review';
if (@$GLOBALS['IS_XNET_SITE']) {
$dom .= 'Xnet';
$page->addJsLink('profile.js');
$page->addJsLink('jquery.autocomplete.js');
$wiz = new PlWizard('Profil', PlPage::getCoreTpl('plwizard.tpl'), true, true);
- require_once dirname(__FILE__) . '/profile/page.inc.php';
+ $this->load('page.inc.php');
$wiz->addPage('ProfileGeneral', 'Général', 'general');
$wiz->addPage('ProfileAddresses', 'Adresses personnelles', 'adresses');
$wiz->addPage('ProfileGroups', 'Groupes X - Binets', 'poly');
$sub_state['step'] = 1;
if (isset($sub_state['hash'])) {
$sub_state['step'] = 3;
- require_once(dirname(__FILE__) . '/register/register.inc.php');
+ $this->load('register.inc.php');
create_aliases($sub_state);
}
}
case 2:
if (count($_POST)) {
- require_once(dirname(__FILE__) . '/register/register.inc.php');
+ $this->load('register.inc.php');
$sub_state['prenom'] = Post::v('prenom');
$sub_state['nom'] = Post::v('nom');
$sub_state['mat'] = Post::v('mat');
case 3:
if (count($_POST)) {
- require_once(dirname(__FILE__) . '/register/register.inc.php');
+ $this->load('register.inc.php');
require_once 'emails.inc.php';
if (!isvalid_email(Post::v('email'))) {
$err[] = "Le champ 'E-mail' n'est pas valide.";
$page->addJsLink('ajax.js');
}
- require_once dirname(__FILE__) . '/search/search.inc.php';
+ $this->load('search.inc.php');
$page->changeTpl('search/index.tpl');
$page->setTitle('Annuaire');
}
{
global $globals;
require_once 'geoloc.inc.php';
- require_once dirname(__FILE__) . '/search/search.inc.php';
+ $this->load('search.inc.php');
$page->assign('advanced',1);
$page->addJsLink('jquery.autocomplete.js');
// {{{ function handler_index() : lists all available surveys
function handler_index(&$page, $action = null)
{
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$page->changeTpl('survey/index.tpl');
$page->assign('survey_current', Survey::retrieveList('c'));
$page->assign('survey_old', Survey::retrieveList('o'));
if ($id == -1) {
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey');
}
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$survey = Survey::retrieveSurvey($id); // retrieves the survey object structure
if ($survey == null || !$survey->isValid()) {
return $this->show_error($page, "Sondage ".$id." introuvable.", 'survey');
if ($id == -1) {
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey');
}
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$survey = Survey::retrieveSurvey($id); // retrieves the survey object structure
if ($survey == null || !$survey->isValid()) {
return $this->show_error($page, "Sondage ".$id." introuvable.", 'survey');
// {{{ function handler_admin() : index of admin mode
function handler_admin(&$page, $id = -1)
{
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$this->clear_session();
if ($id == -1) {
$page->changeTpl('survey/admin.tpl');
if ($id == -1 || ($id == 'req' && $req == -1)) {
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey/admin');
}
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$this->clear_session(); // cleans session (in case there would have been a problem before)
if ($id == 'req') {
$survey = Survey::retrieveSurveyReq($req);
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey/admin');
}
$id = intval($id);
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$surveyInfo = Survey::retrieveSurveyInfo($id); // retrieves information about the survey (does not retrieve and unserialize the object structure)
if ($surveyInfo == null) {
return $this->show_error($page, "Sondage ".$id." introuvable.", 'survey/admin');
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'survey/admin');
}
$id = intval($id);
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$surveyInfo = Survey::retrieveSurveyInfo($id); // retrieves information about the survey (does not retrieve and unserialize the object structure)
if ($surveyInfo == null) {
return $this->show_error($page, "Sondage ".$id." introuvable.", 'survey/admin');
// {{{ function handler_edit() : edits a survey (in normal mode unless called by handler_adminEdit() )
function handler_edit(&$page, $action = 'show', $qid = 'root')
{
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
$action = Post::v('survey_action', $action);
$qid = Post::v('survey_qid', $qid);
if (Post::has('survey_cancel')) { // after cancelling changes, shows the survey
// {{{ function handler_ajax() : some ajax in editing a new question (for now, there may be a little more later)
function handler_ajax(&$page, $type)
{
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
header('Content-Type: text/html; charset="UTF-8"');
if (Survey::isType($type)) { // when type has been chosen, the form is updated to fit exactly the type of question chosen
$page->changeTpl('survey/edit_new.tpl', NO_SKIN);
// {{{ function check_surveyPerms() : checks the particular surveys access permissions
function check_surveyPerms(&$page, $survey)
{
- require_once dirname(__FILE__).'/survey/survey.inc.php';
+ $this->load('survey.inc.php');
if (!$survey->isMode(Survey::MODE_ALL)) { // if the survey is reserved to alumni
global $globals;
if (!call_user_func(array($globals->session, 'doAuth'))) { // checks authentification
function handler_sub(&$page, $eid = null)
{
- require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php';
+ $this->load('xnetevents.inc.php');
$page->changeTpl('xnetevents/subscribe.tpl');
$evt = get_event_detail($eid);
function handler_csv(&$page, $eid = null, $item_id = null)
{
- require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php';
+ $this->load('xnetevents.inc.php');
if (!is_numeric($item_id)) {
$item_id = null;
{
global $globals;
- require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php';
+ $this->load('xnetevents.inc.php');
$evt = get_event_detail($eid);
if (!$evt) {
return PL_FORBIDDEN;
if (Post::v('intitule')) {
S::assert_xsrf_token();
- require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php';
+ $this->load('xnetevents.inc.php');
$short_name = event_change_shortname($page, $eid,
$infos['short_name'],
Env::v('short_name', ''));
{
global $globals;
- require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php';
+ $this->load('xnetevents.inc.php');
$evt = get_event_detail($eid, $item_id);
if (!$evt) {
$mls = array_keys(Env::v('ml', array()));
$mbr = array_keys(Env::v('membres', array()));
- require_once dirname(__FILE__) . '/xnetgrp/mail.inc.php';
+ $this->load('mail.inc.php');
set_time_limit(120);
$tos = get_all_redirects($mbr, $mls, $mmlist);
$upload = PlUpload::get($_FILES['uploaded'], S::v('forlife'), 'xnet.emails', true);
{
global $globals;
- require_once dirname(__FILE__) . '/xnetgrp/mail.inc.php';
+ $this->load('mail.inc.php');
$page->changeTpl('xnetgrp/annuaire-admin.tpl');
$mmlist = new MMList(S::v('uid'), S::v('password'),
$globals->asso('mail_domain'));
global $globals;
$page->assign('asso', $globals->asso());
- require_once dirname(__FILE__) . '/xnetgrp/feed.inc.php';
+ $this->load('feed.inc.php');
$feed = new XnetGrpEventFeed();
return $feed->run($page, $user, $hash, false);
}