Commit 22f0d9c3 authored by Ayolo's avatar Ayolo

boxes

parent 003a3766
......@@ -763,6 +763,7 @@ class site extends interfaceweb
$sublist->add("<a href=\"".$topdir."jobetu/index.php\">AE JobEtu</a>");
$sublist->add("<a href=\"".$topdir."user.php?view=parrain\">Parrains et fillots</a>");
$sublist->add("<a href=\"".$topdir."user/compteae.php\">Compte AE</a>");
$sublist->add("<a href=\"".$topdir."user/outils.php\">Mes outils</a>");
}
$cts->add($sublist,true, true, "accountbox", "boxlist", true, true);
......@@ -858,7 +859,7 @@ class site extends interfaceweb
elseif( $req->lines == 0 )
$sublist = new itemlist("Gestion assos/club","boxlist");
else
$sublist = new itemlist("Gestion associations","boxlist");
$sublist = new itemlist("Gestion assos/clubs","boxlist");
if( $this->user->is_in_group("root") )
$sublist->add("<a href=\"".$topdir."rootplace/index.php\">Équipe informatique</a>");
......@@ -880,11 +881,17 @@ class site extends interfaceweb
$sublist = new itemlist("Actions bureaux AE","boxlist");
while ( list($id,$nom) = $req->get_row() )
$sublist->add("<a href=\"".$topdir."comptoir/bureau.php?id_comptoir=$id\">$nom</a>");
$sublist->add("<a href=\"".$topdir."comptoir/bureau.php?id_comptoir=$id\">$nom</a>");
$cts->add($sublist,true, true, "cptbureau", "boxlist", true, true);
}
elseif($this->user->is_in_group("root"))
{
$sublist = new itemlist("Gestion assos/club","boxlist");
$sublist->add("<a href=\"".$topdir."rootplace/index.php\">Équipe informatique</a>");
$cts->add($sublist,true);
}
if ( $this->user->is_in_group("root") && $this->user->is_in_group("gestion_syscarteae") )
......
<?php
/* Copyright 2008
* - Simon Lopez < simon dot lopez at ayolo dot org >
*
* Ce fichier fait partie du site de l'Association des Étudiants de
* l'UTBM, http://ae.utbm.fr.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
$topdir = "../";
require_once($topdir. "include/site.inc.php");
require_once($topdir."include/cts/board.inc.php");
$site = new site ();
$site->allow_only_logged_users("");
$today = date("Y-m-d");
$site->start_page("none","Ma boite à outils");
$cts = new contents("Ma boite à outils");
$board = new board();
// infos et réservations
$sublist = new itemlist("Infos et réservations");
$req = new requete($site->db,"SELECT " .
"COUNT(*) " .
"FROM sl_reservation " .
"INNER JOIN sl_salle ON sl_salle.id_salle=sl_reservation.id_salle " .
"WHERE sl_reservation.id_utilisateur='".$site->user->id."' AND " .
"sl_reservation.date_debut_salres >= '$today' AND " .
"((sl_reservation.date_accord_res IS NULL) OR " .
"(sl_salle.convention_salle=1 AND sl_reservation.convention_salres=0)) " );
list($nb) = $req->get_row();
if ( $nb )
$sublist->add("<a href=\"".$topdir."user/reservations.php\"><b>Mes reservations de salles : $nb en attente</b></a>");
else
$sublist->add("<a href=\"".$topdir."user/reservations.php\">Mes reservations de salles</a>");
$req = new requete($this->db,"SELECT COUNT(*) " .
"FROM inv_emprunt " .
"WHERE id_utilisateur='".$this->user->id."' AND etat_emprunt<=1");
list($nb) = $req->get_row();
if ( $nb )
$sublist->add("<a href=\"".$topdir."user/emprunts.php\"><b>Mes emprunts de matériel : $nb en attente</b></a>");
else
$sublist->add("<a href=\"".$topdir."user/emprunts.php\">Mes emprunts de matériel</a>");
$sublist->add("<a href=\"".$topdir."news.php\">Proposer une nouvelle</a>");
$sublist->add("<a href=\"".$topdir."salle.php?page=reservation\">Reserver une salle</a>");
$sublist->add("<a href=\"".$topdir."emprunt.php\">Reserver du matériel</a>");
$board->add($sublist,true);
// assos
$req = new requete($site->db,
"SELECT `asso`.`id_asso`, " .
"`asso`.`nom_asso` ".
"FROM `asso_membre` " .
"INNER JOIN `asso` ON `asso`.`id_asso`=`asso_membre`.`id_asso` " .
"WHERE `asso_membre`.`role` > 1 AND `asso_membre`.`date_fin` IS NULL " .
"AND `asso_membre`.`id_utilisateur`='".$site->user->id."' " .
"AND `asso`.`id_asso` != '1' " .
"ORDER BY asso.`nom_asso`");
if ( $req->lines > 0 )
{
if( $this->user->is_in_group("root") )
$sublist = new itemlist("Gestion assos/clubs","boxlist");
elseif( $req->lines == 0 )
$sublist = new itemlist("Gestion assos/club","boxlist");
else
$sublist = new itemlist("Gestion assos/clubs","boxlist");
if( $this->user->is_in_group("root") )
$sublist->add("<a href=\"".$topdir."rootplace/index.php\">Équipe informatique</a>");
while ( list($id,$nom) = $req->get_row() )
$sublist->add("<a href=\"".$topdir."comptoir/bureau.php?id_comptoir=$id\">$nom</a>");
$board->add($sublist,true);
}
elseif($this->user->is_in_group("root"))
{
$sublist = new itemlist("Gestion assos/club","boxlist");
$sublist->add("<a href=\"".$topdir."rootplace/index.php\">Équipe informatique</a>");
$board->add($sublist,true);
}
$cts->add($board);
$site->add_contents($cts);
$site->end_page();
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment