Commit de08924f authored by Feu's avatar Feu

Suppression fonctions deprecies : error_403 et classlink

parent 948c354f
......@@ -30,7 +30,7 @@ require_once($topdir. "include/cts/sqltable.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("gestion_ae"))
error_403();
$site->error_forbidden();
$site->start_page("none","Activités");
......
......@@ -29,7 +29,7 @@ require_once($topdir . "include/entities/cotisation.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("gestion_ae"))
error_403();
$site->error_forbidden();
if ( $_REQUEST["action"] == "pdf" )
{
......
......@@ -31,7 +31,7 @@ require_once($topdir."include/cts/board.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("moderateur_site") )
error_403();
$site->error_forbidden();
$site->start_page("none","Tâches courantes Com` AE");
......
......@@ -38,7 +38,7 @@ require_once($topdir . "include/entities/pays.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") )
error_403();
$site->error_forbidden();
if (date("m-d") < "02-15")
{
......@@ -420,7 +420,7 @@ elseif ( $_REQUEST["action"] == "searchstudent" )
$user->tel_portable . "<br/>"
);
$cts->add_paragraph("Fiche utilisateur : ".classlink($user));
$cts->add_paragraph("Fiche utilisateur : ".$user->get_html_link());
$cts->add_paragraph("&nbsp;");
......
......@@ -31,7 +31,7 @@ $site = new site();
$elec = new election($site->db,$site->dbrw);
if ( !$site->user->is_in_group("gestion_ae") )
error_403();
$site->error_forbidden();
if ( isset($_REQUEST["id_election"]))
{
......
......@@ -36,7 +36,7 @@ require_once($topdir."include/entities/folder.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("moderateur_site") )
error_403();
$site->error_forbidden();
if ( $_REQUEST["action"] == "foldermodere")
......
......@@ -33,7 +33,7 @@ require_once($topdir. "include/cts/planning.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") )
error_403();
$site->error_forbidden();
$emp = new emprunt ( $site->db, $site->dbrw );
$asso = new asso($site->db);
......@@ -64,7 +64,7 @@ elseif ( $emp->id > 0 && $_REQUEST["action"] == "retrait" && ($emp->etat == EMPR
{
$emp->retrait ( $site->user->id, $_REQUEST["caution"], $_REQUEST["prix_emprunt"], $_REQUEST["notes"] );
$Message = new contents("Emprunt de matériel retiré.",classlink($emp)." : <a href=\"".$topdir."emprunt.php?action=print&amp;id_emprunt=".$emp->id."\">Imprimer</a>");
$Message = new contents("Emprunt de matériel retiré.",$emp->get_html_link()." : <a href=\"".$topdir."emprunt.php?action=print&amp;id_emprunt=".$emp->id."\">Imprimer</a>");
$emp->id = -1;
}
......
......@@ -35,7 +35,7 @@ require_once($topdir . "include/entities/lieu.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
error_403();
$site->error_forbidden();
$site->start_page ("none", "Mod&eacute;ration des nouvelles");
......@@ -154,7 +154,7 @@ if (isset($_REQUEST['id_nouvelle']) &&
$fl->load_by_id($id);
if ( !$fl->modere )
{
$form->add_checkbox("dfile|".$fl->id,"Accepter de m&ecirc;me l'image contenue dans la nouvelle : ".classlink($fl),true);
$form->add_checkbox("dfile|".$fl->id,"Accepter de m&ecirc;me l'image contenue dans la nouvelle : ".$fl->get_html_link(),true);
}
}
}
......
......@@ -36,7 +36,7 @@ require_once($topdir. "include/cts/planning.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") && !$site->user->is_in_group("bdf-bureau") )
error_403();
$site->error_forbidden();
$resa = new reservation($site->db, $site->dbrw);
......@@ -104,16 +104,16 @@ elseif ( $_REQUEST["action"] == "info")
$tbl = new table("Informations");
$tbl->add_row(array("Demande faite le ",date("d/m/Y H:i",$resa->date_demande)));
$tbl->add_row(array("Période",date("d/m/Y H:i",$resa->date_debut)." au ".date("d/m/Y H:i",$resa->date_fin)));
$tbl->add_row(array("Demandeur",classlink($user)));
$tbl->add_row(array("Demandeur",$user->get_html_link()));
if ( $asso->id > 0 )
$tbl->add_row(array("Association",classlink($asso)));
$tbl->add_row(array("Association",$asso->get_html_link()));
$tbl->add_row(array("Convention de locaux requise",$salle->convention?"Oui":"Non"));
$tbl->add_row(array("Convention de locaux faite",$resa->convention?"Oui":"Non"));
if( $resa->date_accord )
$tbl->add_row(array("Accord","le ".date("d/m/Y H:i",$resa->date_accord)." par ".classlink($userop)));
$tbl->add_row(array("Salle",classlink($salle)));
$tbl->add_row(array("Batiment",classlink($bat)));
$tbl->add_row(array("Site",classlink($sitebat)));
$tbl->add_row(array("Accord","le ".date("d/m/Y H:i",$resa->date_accord)." par ".$userop->get_html_link()));
$tbl->add_row(array("Salle",$salle->get_html_link()));
$tbl->add_row(array("Batiment",$bat->get_html_link()));
$tbl->add_row(array("Site",$sitebat->get_html_link()));
$tbl->add_row(array("Motif",htmlentities($resa->description,ENT_NOQUOTES,"UTF-8")));
$cts->add($tbl,true);
......
......@@ -37,7 +37,7 @@ require_once($topdir. "include/cts/sqltable.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
error_403();
$site->error_forbidden();
/* else */
$site->start_page ("none", "Gestion du site");
......
......@@ -28,7 +28,7 @@ require_once($topdir. "include/entities/sondage.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
error_403();
$site->error_forbidden();
$site->start_page ("none", "Sondages");
......
......@@ -27,7 +27,7 @@ require_once($topdir . "include/graph.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("gestion_ae"))
error_403();
$site->error_forbidden();
function dec2hex($val)
{
......
......@@ -40,7 +40,7 @@ require_once($topdir."include/entities/books.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_syscarteae") )
error_403();
$site->error_forbidden();
if ( $_REQUEST["action"] == "genfact" )
{
......
......@@ -27,7 +27,7 @@ require_once($topdir. "include/site.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
error_403();
$site->error_forbidden();
$site->start_page ("none", "Planning / Photo de la semaine");
......
......@@ -142,9 +142,9 @@ elseif ( $folder->is_valid() && $_REQUEST["action"] == "delete" )
}
if ( $file->is_valid() )
$path = classlink($folder)." / ".classlink($file);
$path = $folder->get_html_link()." / ".$file->get_html_link();
else
$path = classlink($folder);
$path = $folder->get_html_link();
$pfolder = new dfolder($site->db);
$pfolder->load_by_id($folder->id_folder_parent);
......@@ -152,7 +152,7 @@ $pfolder->load_by_id($folder->id_folder_parent);
while ( $pfolder->is_valid() )
{
$id_asso = $pfolder->id_asso;
$path = classlink($pfolder)." / $path";
$path = $pfolder->get_html_link()." / $path";
$pfolder->load_by_id($pfolder->id_folder_parent);
}
......@@ -178,7 +178,7 @@ if ( $_REQUEST["action"] == "addfolder" && $folder->is_right($site->user,DROIT_A
$nfolder->add_folder ( $_REQUEST["nom"], $folder->id, $_REQUEST["description"], $asso->id );
$folder = $nfolder;
$path .= " / ".classlink($folder);
$path .= " / ".$folder->get_html_link();
}
}
elseif ( $_REQUEST["action"] == "addfile" && $folder->is_right($site->user,DROIT_AJOUTITEM) )
......@@ -277,7 +277,7 @@ if ( $file->is_valid() )
"Date d'ajout: ".date("d/m/Y",$file->date_ajout),
"Nom r&eacute;el: ".$file->nom_fichier,
"Nombre de t&eacute;l&eacute;chargements: ".$file->nb_telechargement,
"Propos&eacute; par : ". classlink($user)
"Propos&eacute; par : ". $user->get_html_link()
)),true);
......@@ -403,12 +403,12 @@ if ( isset($_SESSION["d_clipboard"]) )
if ( $aid{0} == 'I' )
{
$inffile->load_by_id($id);
$lst->add(classlink($inffile));
$lst->add($inffile->get_html_link());
}
else
{
$inffolder->load_by_id($id);
$lst->add(classlink($inffolder));
$lst->add($inffolder->get_html_link());
}
}
......
......@@ -405,7 +405,7 @@ $frm->add_text_area ("content", "Contenu",$_REQUEST["content"],80,10,true);
if ( $file->id > 0 )
{
$frm->add_info("Affiche enregistr&eacute;e : ".classlink($file).".");
$frm->add_info("Affiche enregistr&eacute;e : ".$file->get_html_link().".");
$frm->add_hidden("id_file",$file->id);
}
else
......
......@@ -107,9 +107,9 @@ if ( $cat->id == $rootcat->id )
}
if ($photo->is_valid() )
$path = classlink($cat)." / ".classlink($photo);
$path = $cat->get_html_link()." / ".$photo->get_html_link();
else
$path = classlink($cat);
$path = $cat->get_html_link();
if ( $metacat->is_valid() )
{
......@@ -134,7 +134,7 @@ while ( $catpr->is_valid() && $catpr->id != $rootcat->id_catph_parent )
$catpr->nom = "Photos";
}
$path = classlink($catpr)." / ".$path;
$path = $catpr->get_html_link()." / ".$path;
$catpr->load_by_id($catpr->id_catph_parent);
}
......@@ -202,7 +202,7 @@ if ( $photo->is_valid() )
if ( $utl->is_valid() )
{
$photo->add_personne($utl,true);
$Message="Personne ajout&eacute;e : ".classlink($utl);
$Message="Personne ajout&eacute;e : ".$utl->get_html_link();
}
else
$ErrorPersonne="Personne inconnue...";
......@@ -240,7 +240,7 @@ if ( $photo->is_valid() )
if ( $utl->is_valid() )
{
$photo->add_personne($utl,false);
$Message="Personne ajout&eacute;e comme suggestion : ".classlink($utl);;
$Message="Personne ajout&eacute;e comme suggestion : ".$utl->get_html_link();;
}
else
$ErrorSuggest="Personne inconnue...";
......@@ -341,7 +341,7 @@ if ( $_REQUEST["action"] == "addsubcat" && $cat->is_right($site->user,DROIT_AJOU
$ncat->herit($cat,true);
$ncat->set_rights($site->user,$_REQUEST['rights'],$_REQUEST['rights_id_group'],$_REQUEST['rights_id_group_admin'],true);
$ncat->add_catphoto($cat->id,$_REQUEST["nom"],$_REQUEST["debut"],$_REQUEST["fin"],$_REQUEST["id_asso"],$_REQUEST["mode"]);
$path .= " / ".classlink($ncat);
$path .= " / ".$ncat->get_html_link();
$cat = $ncat;
}
......@@ -368,11 +368,11 @@ elseif ( $_REQUEST["action"] == "editcat" && $cat->is_right($site->user,DROIT_EC
$cat->update_catphoto($site->user,$cat->id_catph_parent,$_REQUEST["nom"],$_REQUEST["debut"],$_REQUEST["fin"],$_REQUEST["id_asso"],$_REQUEST["mode"]);
$cat->set_photo($photo->id);
$path = classlink($cat);
$path = $cat->get_html_link();
$catpr->load_by_id($cat->id_catph_parent);
while ( $catpr->is_valid() )
{
$path = classlink($catpr)." / ".$path;
$path = $catpr->get_html_link()." / ".$path;
$catpr->load_by_id($catpr->id_catph_parent);
}
}
......
......@@ -119,7 +119,7 @@ if ( !$page->is_valid() )
}
if ( !$page->is_right($site->user,DROIT_LECTURE) )
error_403();
$site->error_forbidden();
$section = "presentation";
if ( $page->section )
......
......@@ -35,7 +35,7 @@ if ( $asso->id < 1 )
exit();
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
error_403();
$site->error_forbidden();
$site->start_page("campagne","Campagnes de recrutement");
......
......@@ -42,7 +42,7 @@ if ( isset($_REQUEST["id_asso"]) )
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
error_403();
$site->error_forbidden();
$site->start_page("presentation",$asso->nom);
......
......@@ -34,7 +34,7 @@ if ( $asso->id < 1 )
exit();
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
error_403();
$site->error_forbidden();
$site->start_page("presentation",$asso->nom);
......
......@@ -53,7 +53,7 @@ while ( $asso_parent->id > 0 )
}
/*if( !$site->user->ae && !$can_admin )
error_403("reserveAE");*/
$site->error_forbidden("none","reserveAE");*/
if ( $_REQUEST["action"]=="getallvcards" && !$limited )
{
......
......@@ -35,7 +35,7 @@ if ( $asso->id < 1 )
exit();
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
error_403();
$site->error_forbidden();
$site->start_page("presentation",$asso->nom);
......
......@@ -46,7 +46,7 @@ if ( $asso->id < 1 )
if ((!$site->user->is_in_group("gestion_ae"))
&& (!$asso->is_member_role($site->user->id,ROLEASSO_PRESIDENT)))
{
error_403();
$site->error_forbidden();
}
$site->start_page("Presentation", $asso->nom);
......
......@@ -44,7 +44,7 @@ if ( $asso->id < 1 )
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
error_403();
$site->error_forbidden();
if (isset($_REQUEST['action']) && $_REQUEST['action']=="pdf")
{
......
......@@ -51,8 +51,8 @@ if ( $_REQUEST["action"] == "addsalle" )
}
$site->start_page("none","Batiment ".$bat->nom);
$cts = new contents(classlink($sitebat)." / ".classlink($bat));
$cts->add_paragraph("Site : ".classlink($sitebat));
$cts = new contents($sitebat->get_html_link()." / ".$bat->get_html_link());
$cts->add_paragraph("Site : ".$sitebat->get_html_link());
$cts->add_paragraph("Voir aussi : <a href=\"sitebat.php\">Autre sites</a>");
$req = new requete($site->db,"SELECT * FROM `sl_salle` WHERE `id_batiment`='".$bat->id."'");
......
......@@ -445,7 +445,7 @@ elseif ( $jeu->is_valid() )
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"jeux"));
$cts->add_title(2,classlink($serie)." / ".classlink($jeu));
$cts->add_title(2,$serie->get_html_link()." / ".$jeu->get_html_link());
$frm = new form("savejeu","./?id_jeu=".$jeu->id,false,"POST","Modifier");
$frm->add_hidden("action","save");
......@@ -485,7 +485,7 @@ elseif ( $jeu->is_valid() )
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"jeux"));
$cts->add_title(2,classlink($serie)." / ".classlink($jeu));
$cts->add_title(2,$serie->get_html_link()." / ".$jeu->get_html_link());
if ( $is_admin )
{
......@@ -495,15 +495,15 @@ elseif ( $jeu->is_valid() )
$tbl = new table("Informations");
$tbl->add_row(array("Titre",$jeu->nom));
$tbl->add_row(array("Type",classlink($objtype)));
$tbl->add_row(array("Serie",classlink($serie)));
$tbl->add_row(array("Type",$objtype->get_html_link()));
$tbl->add_row(array("Serie",$serie->get_html_link()));
$tbl->add_row(array("Etat",$jeu->etat));
$tbl->add_row(array("Nombre de joueurs",$jeu->nb_joueurs));
$tbl->add_row(array("Durée moyenne d'une partie",$jeu->duree));
$tbl->add_row(array("Langue",$jeu->langue));
$tbl->add_row(array("Difficultée",$jeu->difficulte));
$tbl->add_row(array("Association",classlink($asso_gest)));
$tbl->add_row(array("Emplacement",classlink($salle)));
$tbl->add_row(array("Association",$asso_gest->get_html_link()));
$tbl->add_row(array("Emplacement",$salle->get_html_link()));
if ($livre->date_achat)
$tbl->add_row(array("Date d'achat",date("d/m/Y",$jeu->date_achat)));
$tbl->add_row(array("En etat",$jeu->en_etat?"Oui":"Non"));
......@@ -566,7 +566,7 @@ elseif ( $livre->is_valid() )
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"livres"));
$cts->add_title(2,classlink($serie)." / ".classlink($livre));
$cts->add_title(2,$serie->get_html_link()." / ".$livre->get_html_link());
$frm = new form("savelivre","./?id_livre=".$livre->id,false,"POST","Modifier");
$frm->add_hidden("action","save");
......@@ -635,9 +635,9 @@ elseif ( $livre->is_valid() )
{
$auteur->_load($row);
if ( is_null($auteurs) )
$auteurs .= classlink($auteur);
$auteurs .= $auteur->get_html_link();
else
$auteurs .= ", ".classlink($auteur);
$auteurs .= ", ".$auteur->get_html_link();
}
......@@ -645,7 +645,7 @@ elseif ( $livre->is_valid() )
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"livres"));
$cts->add_title(2,classlink($serie)." / ".classlink($livre));
$cts->add_title(2,$serie->get_html_link()." / ".$livre->get_html_link());
if ( $is_admin )
{
......@@ -655,13 +655,13 @@ elseif ( $livre->is_valid() )
$tbl = new table("Informations");
$tbl->add_row(array("Titre",$livre->nom));
$tbl->add_row(array("Type",classlink($objtype)));
$tbl->add_row(array("Serie",classlink($serie)));
$tbl->add_row(array("Type",$objtype->get_html_link()));
$tbl->add_row(array("Serie",$serie->get_html_link()));
$tbl->add_row(array("N°",$livre->num_livre));
$tbl->add_row(array("Auteur(s)",$auteurs));
$tbl->add_row(array("Editeur",classlink($editeur)));
$tbl->add_row(array("Association",classlink($asso_gest)));
$tbl->add_row(array("Emplacement",classlink($salle)));
$tbl->add_row(array("Editeur",$editeur->get_html_link()));
$tbl->add_row(array("Association",$asso_gest->get_html_link()));
$tbl->add_row(array("Emplacement",$salle->get_html_link()));
if ($livre->date_achat) $tbl->add_row(array("Date d'achat",date("d/m/Y",$livre->date_achat)));
$tbl->add_row(array("En etat",$livre->en_etat?"Oui":"Non"));
$tbl->add_row(array("Archive (sorti de l'inventaire)",$livre->archive?"Oui":"Non"));
......@@ -678,7 +678,7 @@ elseif ( $serie->is_valid() )
$site->start_page("services","Bibliothéque");
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"series"));
$cts->add_paragraph(classlink($serie));
$cts->add_paragraph($serie->get_html_link());
$req = new requete ( $site->db, "SELECT `inv_objet`.`id_objet` AS `id_livre`," .
......@@ -743,7 +743,7 @@ elseif ( $auteur->is_valid() )
$site->start_page("services","Bibliothéque");
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"auteurs"));
$cts->add_paragraph(classlink($auteur));
$cts->add_paragraph($auteur->get_html_link());
$req = new requete ( $site->db, "SELECT `inv_objet`.`id_objet` AS `id_livre`," .
"`bk_editeur`.`id_editeur`,`bk_editeur`.`nom_editeur`," .
......@@ -778,7 +778,7 @@ elseif ( $editeur->is_valid() )
$site->start_page("services","Bibliothéque");
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"editeurs"));
$cts->add_paragraph(classlink($editeur));
$cts->add_paragraph($editeur->get_html_link());
$req = new requete ( $site->db, "SELECT `inv_objet`.`id_objet` AS `id_livre`," .
//"`bk_auteur`.`id_auteur`,`bk_auteur`.`nom_auteur`," .
"`bk_editeur`.`id_editeur`,`bk_editeur`.`nom_editeur`," .
......@@ -812,7 +812,7 @@ elseif ( $salle->is_valid() )
$site->start_page("services","Bibliothéque");
$cts = new contents("Bibliothèque");
$cts->add(new tabshead($tabs,"lieux"));
$cts->add_paragraph(classlink($salle));
$cts->add_paragraph($salle->get_html_link());
if ( $is_admin )
$cts->add_paragraph("<a href=\"./?id_salle=".$salle->id."&amp;mode=cbars\">Planche de correspondance code barres-livres</a>");
......
......@@ -30,7 +30,7 @@ require_once($topdir. "include/cts/sqltable.inc.php");
$site = new site ();
if ( !$site->user->is_valid() )
error_403();
$site->error_forbidden();
$cpg = new campagne($site->db,$site->dbrw);
......
......@@ -30,7 +30,7 @@ $site = new sitecompta();
$site->allow_only_logged_users("none");
if ( !$site->user->is_in_group("compta_admin") )
error_403();
$site->error_forbidden();
if ($_REQUEST['action'] == "addcptasso")
......
......@@ -46,7 +46,7 @@ $cpbc->load_by_id($cptasso->id_cptbc);
$asso->load_by_id($cptasso->id_asso);
if ( !$site->user->is_in_group("compta_admin") && !$asso->is_member_role($site->user->id,ROLEASSO_TRESORIER) )
error_403();
$site->error_forbidden();
$site->set_current($asso->id,$asso->nom,$cla->id,$cla->nom,$cpbc->nom);
......@@ -100,7 +100,7 @@ elseif ( $_REQUEST["action"] == "edit" && !$budget->valide )
$site->start_page ("none", "Budget ".$budget->nom." dans classeur ".$cla->nom." ( ".$asso->nom ." - ". $cpbc->nom.")" );
//$cts = new contents("Budget ".$budget->nom." dans classeur ".$cla->nom." ( ".$asso->nom ." - ". $cpbc->nom.")");
$cts = new contents("<a href=\"./\">Compta</a> / ".classlink($cpbc)." / ".classlink($cptasso)." / ".classlink($cla)." / ".classlink($budget));
$cts = new contents("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link()." / ".$cptasso->get_html_link()." / ".$cla->get_html_link()." / ".$budget->get_html_link());
$cts->set_help_page("compta-budget");
$frm = new form("editline","budget.php?id_budget=".$budget->id,true,"POST","Editer une ligne budgetaire");
......@@ -120,7 +120,7 @@ elseif ( $_REQUEST["action"] == "edit" && !$budget->valide )
$site->start_page ("none", "Budget ".$budget->nom." dans classeur ".$cla->nom." ( ".$asso->nom ." - ". $cpbc->nom.")" );
$cts = new contents("<a href=\"./\">Compta</a> / ".classlink($cpbc)." / ".classlink($cptasso)." / ".classlink($cla)." / ".classlink($budget));
$cts = new contents("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link()." / ".$cptasso->get_html_link()." / ".$cla->get_html_link()." / ".$budget->get_html_link());
$cts->set_help_page("compta-budget");
$frm = new form("updatebudget","budget.php?id_budget=".$budget->id,false,"POST","Informations");
......
......@@ -67,7 +67,7 @@ $cpbc->load_by_id($cptasso->id_cptbc);
$asso->load_by_id($cptasso->id_asso);
if ( !$site->user->is_in_group("compta_admin") && !$asso->is_member_role($site->user->id,ROLEASSO_TRESORIER) )
error_403();
$site->error_forbidden();
$site->set_current($asso->id,$asso->nom,$cla->id,$cla->nom,$cpbc->nom);
......@@ -437,7 +437,7 @@ while($row=$req->get_row())
$globalsum[$row[0]] = $row[1];
$cts = new contents("<a href=\"./\">Compta</a> / ".classlink($cpbc)." / ".classlink($cptasso)." / ".classlink($cla));
$cts = new contents("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link()." / ".$cptasso->get_html_link()." / ".$cla->get_html_link());
$cts->add(new tabshead(array(
array("typ","compta/typeop.php?id_asso=".$asso->id,"Natures(types) d'opérations"),
......@@ -549,7 +549,7 @@ if( $_REQUEST["action"] == "edit" && ($op->is_valid()))
$cts->add_title(2,"Opération liée");
$cts->add_paragraph(classlink($lien_cpbc)." / ".classlink($lien_cptasso)." / ".classlink($lien_cla)." / ".classlink($lien_op));
$cts->add_paragraph($lien_cpbc->get_html_link()." / ".$lien_cptasso->get_html_link()." / ".$lien_cla->get_html_link()." / ".$lien_op->get_html_link());
}
......
......@@ -31,7 +31,7 @@ $cpbc = new compte_bancaire($site->db);
$asso = new asso($site->db);
if ( !$site->user->is_valid() )
error_403();
$site->error_forbidden();
$cptasso->load_by_id($_REQUEST["id_cptasso"]);
if( $cptasso->id < 1 )
......@@ -45,7 +45,7 @@ $asso->load_by_id($cptasso->id_asso);
$site->set_current($asso->id,$asso->nom,null,null,$cpbc->nom);
if ( !$site->user->is_in_group("compta_admin") && !$asso->is_member_role($site->user->id,ROLEASSO_TRESORIER) )
error_403();
$site->error_forbidden();
if ( $_REQUEST["action"] == "newclasseur" && $GLOBALS["svalid_call"] )
{
......@@ -74,7 +74,7 @@ elseif ( $_REQUEST["action"] == "fermerdans" )
$site->start_page ("none", "Compte asso" );
$cts = new contents ("<a href=\"./\">Compta</a> / ".classlink($cpbc)." / ".classlink($cptasso));
$cts = new contents ("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link()." / ".$cptasso->get_html_link());
$frm = new form("newclasseur","cptasso.php?id_cptasso=".$cptasso->id,true,"POST","Fermer le classeur et le transferer dans un nouveau classeur");
$frm->add_hidden("action","transfert");
$frm->allow_only_one_usage();
......@@ -96,7 +96,7 @@ elseif ( $_REQUEST["action"] == "edit" )
$cla->load_by_id($_REQUEST['id_classeur']);
$site->start_page ("none", "Compte asso" );
$cts = new contents ("<a href=\"./\">Compta</a> / ".classlink($cpbc)." / ".classlink($cptasso)." / ".classlink($cla));
$cts = new contents ("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link()." / ".$cptasso->get_html_link()." / ".$cla->get_html_link());
$frm = new form("newclasseur","cptasso.php?id_cptasso=".$cptasso->id,true,"POST","Editer");
$frm->add_hidden("action","save");
$frm->add_hidden("id_classeur",$cla->id);
......@@ -187,7 +187,7 @@ elseif ( $_REQUEST["action"] == "transfert" && $GLOBALS["svalid_call"] )
$site->start_page ("none", "Compte asso" );
$cts = new contents ("<a href=\"./\">Compta</a> / ".classlink($cpbc)." / ".classlink($cptasso));
$cts = new contents ("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link()." / ".$cptasso->get_html_link());
$lst = new itemlist("Outils");
$lst->add("<a href=\"typeop.php?id_asso=".$asso->id."\">Types d'opérations</a>");
......
......@@ -29,7 +29,7 @@ $site = new sitecompta();
$cpbc = new compte_bancaire($site->db);
if ( !$site->user->is_in_group("compta_admin") )
error_403();
$site->error_forbidden();
$cpbc->load_by_id($_REQUEST["id_cptbc"]);
......@@ -41,7 +41,7 @@ if ( $cpbc->id < 1 )
$site->start_page ("none", "Compte bancaire" );
$cts = new contents ("<a href=\"./\">Compta</a> / ".classlink($cpbc));
$cts = new contents ("<a href=\"./\">Compta</a> / ".$cpbc->get_html_link());
$req_sql = new requete ($site->db,
"SELECT `cpta_classeur`.`id_classeur`,`cpta_classeur`.`nom_classeur`," .
......
......@@ -41,14 +41,14 @@ if ( isset($_REQUEST["id_efact"]) )
{
$efact->load_by_id($_REQUEST["id_efact"]);
if ( !$efact->is_valid() )
error_403();
$site->error_forbidden();
$cla->load_by_id($efact->id_classeur);
}
else
{
$cla->load_by_id($_REQUEST["id_classeur"]);
if ( !$cla->is_valid() )
error_403();
$site->error_forbidden();
}
$cptasso->load_by_id($cla->id_cptasso);
......@@ -56,7 +56,7 @@ $cpbc->load_by_id($cptasso->id_cptbc);
$asso->load_by_id($cptasso->id_asso);
if ( !$site->user->is_in_group("compta_admin") && !$asso->is_member_role($site->user->id,ROLEASSO_TRESORIER) )
error_403();
$site->error_forbidden();
if ( $_REQUEST["action"] == "create" && $GLOBALS["svalid_call"] )
{
......
......@@ -32,7 +32,7 @@ $site = new sitecompta();