Commit 9886a7db authored by Feu's avatar Feu

remplacement des 404.php par site::error_not_found

parent 2503ad7d
......@@ -205,7 +205,7 @@ elseif ( $_REQUEST["action"] == "savecotiz" )
if ( $user->id < 0 )
{
header("Location: " . $topdir . "404.php");
$site->error_not_found();
exit();
}
else
......@@ -392,7 +392,7 @@ elseif ( $_REQUEST["action"] == "searchstudent" )
$user->load_by_id($res['id_utl']);
if ( $user->id < 0 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......@@ -526,7 +526,7 @@ elseif ( $_REQUEST["action"] == "newcotiz" )
$user->load_by_id($_REQUEST['id_utilisateur']);
if ( $user->id < 0 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......
......@@ -38,7 +38,7 @@ if ( isset($_REQUEST["id_election"]))
$elec->load_by_id($_REQUEST["id_election"]);
if ( $elec->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
}
......
......@@ -67,7 +67,7 @@ else if ( isset($_REQUEST["id_asso"]) )
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......
......@@ -31,7 +31,7 @@ $asso = new asso($site->db,$site->dbrw);
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
......
......@@ -41,7 +41,7 @@ $asso = new asso($site->db,$site->dbrw);
if ( !isset($_REQUEST["id_asso"]) )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......@@ -50,7 +50,7 @@ $asso_parent = new asso($site->db);
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......
......@@ -37,7 +37,7 @@ if ( isset($_REQUEST["id_asso"]) )
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -30,7 +30,7 @@ $asso = new asso($site->db,$site->dbrw);
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
......
......@@ -81,7 +81,7 @@ $asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -30,7 +30,7 @@ $asso = new asso($site->db,$site->dbrw);
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -31,7 +31,7 @@ $asso = new asso($site->db,$site->dbrw);
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
if ( !$site->user->is_in_group("gestion_ae") && !$asso->is_member_role($site->user->id,ROLEASSO_MEMBREBUREAU) )
......
......@@ -39,7 +39,7 @@ $asso = new asso($site->db,$site->dbrw);
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -39,7 +39,7 @@ $site->allow_only_logged_users("presentation");
$asso->load_by_id($_REQUEST["id_asso"]);
if ( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -35,7 +35,7 @@ $bat = new batiment($site->db,$site->dbrw);
$bat->load_by_id($_REQUEST["id_batiment"]);
if ( $bat->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
$sitebat->load_by_id($bat->id_site);
......
......@@ -37,7 +37,7 @@ $asso = new asso($site->db);
$budget->load_by_id($_REQUEST["id_budget"]);
if ( $budget->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
$cla->load_by_id($budget->id_classeur);
......
......@@ -36,7 +36,7 @@ if ( !$site->user->is_valid() )
$cptasso->load_by_id($_REQUEST["id_cptasso"]);
if( $cptasso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
$cpbc->load_by_id($cptasso->id_cptbc);
......
......@@ -35,7 +35,7 @@ $cpbc->load_by_id($_REQUEST["id_cptbc"]);
if ( $cpbc->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -35,7 +35,7 @@ if ( !$site->user->is_valid() )
$asso->load_by_id($_REQUEST["id_asso"]);
if( $asso->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......@@ -69,7 +69,7 @@ elseif ( $_REQUEST["action"] == "edit" )
if( $libelle->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -35,7 +35,7 @@ if ( isset($_REQUEST['id_utilisateur']) )
$user->load_by_id($_REQUEST["id_utilisateur"]);
if ( $user->id < 0 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
if ( !($user->id==$site->user->id || $site->user->is_in_group("gestion_ae")) )
......
......@@ -101,14 +101,14 @@ if ($_REQUEST['action'] == 'delete')
}
else
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
} // fin suppresion d'étapes
if (($trajet->id <= 0) || (! in_array($datetrj, $trajet->dates)))
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -40,7 +40,7 @@ if ( isset($_REQUEST["id_election"]))
$elec->load_by_id($_REQUEST["id_election"]);
if ( $elec->id < 1 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -41,7 +41,7 @@ if ( isset($_REQUEST["id_emprunt"]) )
$emp->load_by_id($_REQUEST["id_emprunt"]);
if ( $emp->id < 1 && !isset($_REQUEST["valid"]) )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
elseif ( $emp->id > 0 )
......
......@@ -34,7 +34,7 @@ if ( isset($_REQUEST['id_utilisateur']) )
$user->load_by_id($_REQUEST["id_utilisateur"]);
if ( $user->id < 0 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
$can_edit = ( $user->id==$site->user->id || $site->user->is_in_group("gestion_ae") );
......
......@@ -39,7 +39,7 @@ if ( isset($_REQUEST["id_groupe"]) )
$grp->load_by_id($_REQUEST["id_groupe"]);
if ( $grp->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
}
......
......@@ -89,7 +89,7 @@ if ($page == "upload_photos")
if (! $user->is_valid() )
{
header("Location: " . $topdir . "404.php");
$site->error_not_found();
exit();
}
......
......@@ -19,7 +19,7 @@ $user = new utilisateur($site->db,$site->dbrw);
$user->load_by_id($_REQUEST["id_utilisateur"]);
if ( $user->id < 0 )
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
$user->load_all_extra();
......
......@@ -49,7 +49,7 @@ if ( isset($_REQUEST["id_nouvelle"]) )
$news->load_by_id($_REQUEST["id_nouvelle"]);
if ( $news->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......
......@@ -52,7 +52,7 @@ if ( isset($_REQUEST["id_objet"]) )
$objet->load_by_id($_REQUEST["id_objet"]);
if ( $objet->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
$can_admin=false;
......
......@@ -43,7 +43,7 @@ if ( isset($_REQUEST["id_objtype"]) )
$objtype->load_by_id($_REQUEST["id_objtype"]);
if ( !$objtype->is_valid() )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......
......@@ -54,7 +54,7 @@ else if ( ereg("^/(.*)$",$_SERVER["argv"][0]) )
}
else
{
header("Location: ../404.php");
$site->error_not_found();
exit();
}
......
......@@ -35,7 +35,7 @@ if ( isset($_REQUEST["id_site"]) )
$sitebat->load_by_id($_REQUEST["id_site"]);
if ( $sitebat->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
if ( $_REQUEST["action"] == "addbat" && $site->user->is_in_group("gestion_ae") )
......
......@@ -96,7 +96,7 @@ if ( $_REQUEST["page"] == "edit" )
$cmt->load_by_id($_REQUEST["id_commentaire"]);
if ( $cmt->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......@@ -130,7 +130,7 @@ elseif ( $_REQUEST["page"] == "del" )
$cmt->load_by_id($_REQUEST["id_commentaire"]);
if ( $cmt->id < 1 )
{
header("Location: 404.php");
$site->error_not_found();
exit();
}
......
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