function force_login(&$page)
{
if (S::logged()) {
- $page->changeTpl('password_prompt_logged.tpl');
+ $page->changeTpl('core/password_prompt_logged.tpl');
$page->addJsLink('do_challenge_response_logged.js');
} else {
- $page->changeTpl('password_prompt.tpl');
+ $page->changeTpl('core/password_prompt.tpl');
$page->addJsLink('do_challenge_response.js');
}
$page->run();
{
global $page;
- new_skinned_page('index.tpl');
+ new_skinned_page('platal/index.tpl');
if (empty($this->path)) {
$this->path = 'index';
}
if ($globals->debug & 1) {
- $this->assign('db_trace', XDB::trace_format($this, 'database-debug.tpl'));
+ $this->assign('db_trace', XDB::trace_format($this, 'skin/common.database-debug.tpl'));
}
$this->assign('validate', true);
}
// call when done
function apply(&$page, $action, $id = false) {
- $page->changeTpl('table-editor.tpl');
+ $page->changeTpl('core/table-editor.tpl');
$list = true;
if ($action == 'delete') {
if (!isset($this->delete_action)) {
}
}
- public static function trace_format(&$page, $template = 'database-debug.tpl') {
+ public static function trace_format(&$page, $template = 'skin/common.database-debug.tpl') {
$page->assign('trace_data', @$GLOBALS['XDB::trace_data']);
$page->assign('db_error', @$GLOBALS['XDB::error']);
return $page->fetch($template);
pl_redirect('');
}
-new_skinned_page('wiki.tpl');
+new_skinned_page('core/wiki.tpl');
$perms = wiki_get_perms($n);
switch (Env::v('action')) {
pl_redirect('');
}
-new_skinned_page('wiki.tpl');
+new_skinned_page('core/wiki.tpl');
$perms = wiki_get_perms($n);
if (Env::v('display') == 'light') {
function do_page(&$page)
{
- $page->changeTpl('vcard.tpl', NO_SKIN);
+ $page->changeTpl('core/vcard.tpl', NO_SKIN);
$page->register_modifier('vcard_enc', array($this, 'text_encode'));
$page->register_function('format_adr', array($this, 'format_adr'));
$page->assign_by_ref('users', $this->users);
}
}
- $page->changeTpl('logger-view.tpl');
+ $page->changeTpl('admin/logger-view.tpl');
$page->assign('xorg_title','Polytechnique.org - Administration - Logs des sessions');
}
return array(
'403' => $this->make_hook('403', AUTH_PUBLIC),
'404' => $this->make_hook('404', AUTH_PUBLIC),
+ 'send_bug' => $this->make_hook('bug', AUTH_COOKIE),
'purge_cache' => $this->make_hook('purge_cache', AUTH_COOKIE, 'admin'),
'get_rights' => $this->make_hook('get_rights', AUTH_MDP, 'admin'),
function handler_403(&$page)
{
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
- $page->changeTpl('403.tpl');
+ $page->changeTpl('core/403.tpl');
}
function handler_404(&$page)
global $platal;
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
$page->assign('near', $platal->near_hook());
- $page->changeTpl('404.tpl');
+ $page->changeTpl('core/404.tpl');
}
function handler_favicon(&$page)
pl_redirect('/');
}
+
+ function handler_bug(&$page)
+ {
+ $page->changeTpl('core/bug.tpl',SIMPLE);
+ $page->addJsLink('close_on_esc.js');
+ if (Env::has('send')) {
+ $page->assign('bug_sent',1);
+ $mymail = new PlMailer();
+ $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>');
+ $mymail->addTo('support+platal@polytechnique.org');
+ $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary'));
+ $mymail->setTxtBody(Env::v('detailed_desc'));
+ $mymail->send();
+ }
+ }
}
?>
return array(
'events' => $this->make_hook('ev', AUTH_COOKIE),
'rss' => $this->make_hook('rss', AUTH_PUBLIC),
- 'send_bug' => $this->make_hook('bug', AUTH_COOKIE),
'events/submit' => $this->make_hook('ev_submit', AUTH_MDP),
'admin/events' => $this->make_hook('admin_events', AUTH_MDP, 'admin'),
return $res->fetchOneAssoc();
}
- function handler_bug(&$page)
- {
- $page->changeTpl('bug.tpl',SIMPLE);
- $page->addJsLink('close_on_esc.js');
- if (Env::has('send')) {
- $page->assign('bug_sent',1);
- $mymail = new PlMailer();
- $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>');
- $mymail->addTo('support+platal@polytechnique.org');
- $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary'));
- $mymail->setTxtBody(Env::v('detailed_desc'));
- $mymail->send();
- }
- }
-
function handler_ev(&$page, $action = 'list', $eid = null, $pound = null)
{
- $page->changeTpl('login.tpl');
+ $page->changeTpl('events/index.tpl');
$page->addJsLink('ajax.js');
$page->assign('tips', $this->get_tips());
{
require_once 'rss.inc.php';
- $uid = init_rss('rss.tpl', $user, $hash);
+ $uid = init_rss('events/rss.tpl', $user, $hash);
$rss = XDB::iterator(
'SELECT e.id, e.titre, e.texte, e.creation_date,
function handler_ev_submit(&$page)
{
- $page->changeTpl('evenements.tpl');
+ $page->changeTpl('events/submit.tpl');
$titre = Post::v('titre');
$texte = Post::v('texte');
function handler_admin_events(&$page, $action = 'list', $eid = null)
{
- $page->changeTpl('admin/evenements.tpl');
+ $page->changeTpl('events/admin_events.tpl');
$page->assign('xorg_title','Polytechnique.org - Administration - Evenements');
$page->register_modifier('hde', 'html_entity_decode');
function handler_changelog(&$page)
{
- $page->changeTpl('changeLog.tpl');
+ $page->changeTpl('platal/changeLog.tpl');
$clog = htmlentities(file_get_contents(dirname(__FILE__).'/../ChangeLog'));
$clog = preg_replace('!(#[0-9]+(,[0-9]+)*)!e', 'bugize("\1")', $clog);
function handler_prefs(&$page)
{
- $page->changeTpl('preferences.tpl');
+ $page->changeTpl('platal/preferences.tpl');
$page->assign('xorg_title','Polytechnique.org - Mes préférences');
if (Post::has('mail_fmt')) {
function handler_webredir(&$page)
{
- $page->changeTpl('webredirect.tpl');
+ $page->changeTpl('platal/webredirect.tpl');
$page->assign('xorg_title','Polytechnique.org - Redirection de page WEB');
function handler_prefs_rss(&$page)
{
- $page->changeTpl('filrss.tpl');
+ $page->changeTpl('platal/filrss.tpl');
$page->assign('goback', Env::v('referer', 'login'));
setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0);
}
- $page->changeTpl('motdepasse.success.tpl');
+ $page->changeTpl('platal/motdepasse.success.tpl');
$page->run();
}
- $page->changeTpl('motdepasse.tpl');
+ $page->changeTpl('platal/motdepasse.tpl');
$page->addJsLink('motdepasse.js');
$page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
}
function handler_smtppass(&$page)
{
- $page->changeTpl('acces_smtp.tpl');
+ $page->changeTpl('platal/acces_smtp.tpl');
$page->assign('xorg_title','Polytechnique.org - Acces SMTP/NNTP');
$uid = S::v('uid');
{
global $globals;
- $page->changeTpl('recovery.tpl');
+ $page->changeTpl('platal/recovery.tpl');
if (!Env::has('login') || !Env::has('birth')) {
return;
$res = XDB::query('SELECT uid FROM perte_pass WHERE certificat={?}', $certif);
$ligne = $res->fetchOneAssoc();
if (!$ligne) {
- $page->changeTpl('index.tpl');
+ $page->changeTpl('platal/index.tpl');
$page->kill("Cette adresse n'existe pas ou n'existe plus sur le serveur.");
}
$password, $uid);
XDB::query('DELETE FROM perte_pass WHERE certificat={?}', $certif);
$logger->log("passwd","");
- $page->changeTpl('tmpPWD.success.tpl');
+ $page->changeTpl('platal/tmpPWD.success.tpl');
} else {
- $page->changeTpl('motdepasse.tpl');
+ $page->changeTpl('platal/motdepasse.tpl');
$page->addJsLink('motdepasse.js');
}
}
{
global $globals;
- $page->changeTpl('skins.tpl');
+ $page->changeTpl('platal/skins.tpl');
$page->assign('xorg_title','Polytechnique.org - Skins');
if (Env::has('newskin')) { // formulaire soumis, traitons les données envoyées
if (Get::has('redirect')) {
http_redirect(rawurldecode(Get::v('redirect')));
} else {
- $page->changeTpl('exit.tpl');
+ $page->changeTpl('platal/exit.tpl');
}
}
}
function handler_photo_change(&$page)
{
- $page->changeTpl('trombino.tpl');
+ $page->changeTpl('profile/trombino.tpl');
require_once('validations.inc.php');
global $globals;
require_once 'user.func.inc.php';
- $page->changeTpl('fiche.tpl', SIMPLE);
+ $page->changeTpl('profile/fiche.tpl', SIMPLE);
$view = 'private';
if (!S::logged() || Env::v('view') == 'public') $view = 'public';
{
global $globals;
- $page->changeTpl('profil.tpl');
+ $page->changeTpl('profile/edit.tpl');
$page->addCssLink('profil.css');
$page->assign('xorg_title', 'Polytechnique.org - Mon Profil');
if($page->nb_errs()) {
require_once "profil/assign_{$opened_tab}.inc.php";
$page->assign('onglet', $opened_tab);
- $page->assign('onglet_tpl', "profil/$opened_tab.tpl");
+ $page->assign('onglet_tpl', "profile/$opened_tab.tpl");
return;
}
require_once "profil/assign_{$opened_tab}.inc.php";
$page->assign('onglet', $opened_tab);
- $page->assign('onglet_tpl', "profil/$opened_tab.tpl");
+ $page->assign('onglet_tpl', "profile/$opened_tab.tpl");
return;
}
function handler_p_orange(&$page)
{
- $page->changeTpl('orange.tpl');
+ $page->changeTpl('profile/orange.tpl');
require_once 'validations.inc.php';
require_once 'xorg.misc.inc.php';
return PL_NOT_FOUND;
}
- $page->changeTpl('fiche_referent.tpl', SIMPLE);
+ $page->changeTpl('profile/fiche_referent.tpl', SIMPLE);
$res = XDB::query(
"SELECT prenom, nom, user_id, promo, cv, a.alias AS bestalias
function handler_ref_search(&$page)
{
- $page->changeTpl('referent.tpl');
+ $page->changeTpl('profile/referent.tpl');
$page->assign('xorg_title', 'Polytechnique.org - Conseil Pro');
function handler_p_usage(&$page)
{
- $page->changeTpl('nomusage.tpl');
+ $page->changeTpl('profile/nomusage.tpl');
require_once 'validations.inc.php';
require_once 'xorg.misc.inc.php';
function handler_trombi(&$page, $promo = null)
{
- $page->changeTpl('trombipromo.tpl');
+ $page->changeTpl('profile/trombipromo.tpl');
$page->assign('xorg_title', 'Polytechnique.org - Trombi Promo');
if (is_null($promo)) {
function handler_xnet(&$page)
{
- $page->changeTpl('groupesx.tpl');
+ $page->changeTpl('profile/groupesx.tpl');
$page->assign('xorg_title', 'Polytechnique.org - Promo, Groupes X, Binets');
$req = XDB::query('
}
function handler_admin_trombino(&$page, $uid = null, $action = null) {
- $page->changeTpl('admin/admin_trombino.tpl');
+ $page->changeTpl('profile/admin_trombino.tpl');
$page->assign('xorg_title','Polytechnique.org - Administration - Trombino');
$page->assign('uid', $uid);
$table_editor->describe('img', 'nom de l\'image', false);
$table_editor->apply($page, $action, $id);
if ($id && $action == 'edit') {
- $page->changeTpl('admin/gerer_decos.tpl');
+ $page->changeTpl('profile/admin_decos.tpl');
$mid = $id;
'groups' => $this->make_hook('groups', AUTH_PUBLIC),
'groupes.php' => $this->make_hook('groups2', AUTH_PUBLIC),
'plan' => $this->make_hook('plan', AUTH_PUBLIC),
- 'send_bug' => $this->make_hook('bug', AUTH_MDP),
'photo' => $this->make_hook('photo', AUTH_MDP),
);
}
}
exit;
}
-
- function handler_bug(&$page)
- {
- $page->changeTpl('bug.tpl',SIMPLE);
- $page->addJsLink('close_on_esc.js');
- if (Env::has('send')) {
- $page->assign('bug_sent',1);
- $mymail = new PlMailer();
- $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>');
- $mymail->addTo('support+platal@polytechnique.org');
- $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary'));
- $mymail->setTxtBody(Env::v('detailed_desc'));
- $mymail->send();
- }
- }
function handler_index(&$page)
{
return PL_NOT_FOUND;
}
- new_group_open_page('xnet/groupe/asso.tpl');
+ new_group_open_page('xnetgrp/asso.tpl');
if (S::logged()) {
if (Env::has('read')) {
{
global $globals;
- new_groupadmin_page('xnet/groupe/edit.tpl');
+ new_groupadmin_page('xnetgrp/edit.tpl');
if (Post::has('submit')) {
if (S::has_perms()) {
{
global $globals;
- new_groupadmin_page('xnet/groupe/mail.tpl');
+ new_groupadmin_page('xnetgrp/mail.tpl');
$mmlist = new MMList(S::v('uid'), S::v('password'),
$globals->asso('mail_domain'));
$page->assign('listes', $mmlist->get_lists());
function handler_annuaire(&$page)
{
global $globals;
- new_annu_page('xnet/groupe/annuaire.tpl');
+ new_annu_page('xnetgrp/annuaire.tpl');
$sort = Env::v('order');
switch (Env::v('order')) {
function handler_trombi(&$page, $num = 1)
{
global $globals;
- new_annu_page('xnet/groupe/trombi.tpl');
+ new_annu_page('xnetgrp/trombi.tpl');
$page->assign('urlmainsite', "https://www.polytechnique.org/");
$trombi = new Trombi(array($this, '_trombi_getlist'));
{
global $globals;
- new_group_open_page('xnet/groupe/inscrire.tpl');
+ new_group_open_page('xnetgrp/inscrire.tpl');
if (!$globals->asso('inscriptible'))
$page->kill("Il n'est pas possible de s'inscire en ligne à ce "
require_once 'xnet/mail.inc.php';
- new_groupadmin_page('xnet/groupe/annuaire-admin.tpl');
+ new_groupadmin_page('xnetgrp/annuaire-admin.tpl');
$mmlist = new MMList(S::v('uid'), S::v('password'),
$globals->asso('mail_domain'));
$lists = $mmlist->get_lists();
{
global $globals;
- new_groupadmin_page('xnet/groupe/membres-add.tpl');
+ new_groupadmin_page('xnetgrp/membres-add.tpl');
$page->addJsLink('ajax.js');
if (is_null($email)) {
function handler_admin_member_new_ajax(&$page)
{
header('Content-Type: text/html; charset="iso-8859-15"');
- $page->changeTpl('xnet/groupe/membres-new-search.tpl', NO_SKIN);
+ $page->changeTpl('xnetgrp/membres-new-search.tpl', NO_SKIN);
list($nom, $prenom) = str_replace(array('-', ' ', "'"), '%', array(Env::v('nom'), Env::v('prenom')));
$where = "perms = 'pending'";
if (!empty($nom)) {
function handler_unsubscribe(&$page)
{
- new_group_page('xnet/groupe/membres-del.tpl');
+ new_group_page('xnetgrp/membres-del.tpl');
$user = get_infos(S::v('forlife'));
if (empty($user)) {
return PL_NOT_FOUND;
function handler_admin_member_del(&$page, $user = null)
{
- new_groupadmin_page('xnet/groupe/membres-del.tpl');
+ new_groupadmin_page('xnetgrp/membres-del.tpl');
$user = get_infos($user);
if (empty($user)) {
return PL_NOT_FOUND;
{
global $globals;
- new_groupadmin_page('xnet/groupe/membres-edit.tpl');
+ new_groupadmin_page('xnetgrp/membres-edit.tpl');
$user = get_infos($user);
if (empty($user)) {
global $globals;
require_once('rss.inc.php');
require_once('url_catcher.inc.php');
- $uid = init_rss('xnet/groupe/announce-rss.tpl', $user, $hash, false);
+ $uid = init_rss('xnetgrp/announce-rss.tpl', $user, $hash, false);
$page->register_modifier('url_catcher', 'url_catcher');
if ($uid) {
function handler_edit_announce(&$page, $aid = null)
{
global $globals, $platal;
- new_groupadmin_page('xnet/groupe/announce-edit.tpl');
+ new_groupadmin_page('xnetgrp/announce-edit.tpl');
$page->assign('new', is_null($aid));
$art = array();
function handler_admin_announce(&$page)
{
global $globals;
- new_groupadmin_page('xnet/groupe/announce-admin.tpl');
+ new_groupadmin_page('xnetgrp/announce-admin.tpl');
if (Env::has('del')) {
XDB::execute("DELETE FROM groupex.announces
{**************************************************************************}
-{include file="applis.js.tpl"}
+{include file="profile/applis.js.tpl"}
<div class="blocunite_tab">
<table class="bicol" cellspacing="0" cellpadding="0"
summary="Profil : Informations générales">