Fix: Pb register globals
This commit is contained in:
parent
9e1ecdf43a
commit
0ae2ef4cb3
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -21,7 +21,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/compta/facture/fiche-rec.php
|
/**
|
||||||
|
\file htdocs/compta/facture/fiche-rec.php
|
||||||
\ingroup facture
|
\ingroup facture
|
||||||
\brief Page d'affichage d'une facture récurrent
|
\brief Page d'affichage d'une facture récurrent
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
@ -30,30 +31,33 @@
|
|||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require("./facture-rec.class.php");
|
require("./facture-rec.class.php");
|
||||||
|
require("../../project.class.php");
|
||||||
|
|
||||||
$user->getrights('facture');
|
$user->getrights('facture');
|
||||||
|
|
||||||
if (!$user->rights->facture->lire)
|
if (!$user->rights->facture->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
require("../../project.class.php");
|
|
||||||
|
|
||||||
llxHeader('','Facture récurrente','ch-facture.html#s-fac-facture-rec');
|
llxHeader('','Facture récurrente','ch-facture.html#s-fac-facture-rec');
|
||||||
|
|
||||||
/*
|
// Sécurité accés client
|
||||||
* Sécurité accés client
|
|
||||||
*/
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
$socidp = $user->societe_id;
|
$socidp = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Ajout
|
||||||
if ($_POST["action"] == 'add')
|
if ($_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
$facturerec = new FactureRec($db, $facid);
|
$facturerec = new FactureRec($db, $_POST["facid"]);
|
||||||
|
|
||||||
$facturerec->titre = $_POST["titre"];
|
$facturerec->titre = $_POST["titre"];
|
||||||
|
|
||||||
if ($facturerec->create($user) > 0)
|
if ($facturerec->create($user) > 0)
|
||||||
@ -66,17 +70,16 @@ if ($_POST["action"] == 'add')
|
|||||||
$action = "create";
|
$action = "create";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($action == 'delete' && $user->rights->facture->supprimer)
|
// Suppression
|
||||||
|
if ($_POST["action"] == 'delete' && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
$fac = new FactureRec($db);
|
$fac = new FactureRec($db);
|
||||||
$fac->delete($facid);
|
$fac->delete($_POST["facid"]);
|
||||||
$facid = 0 ;
|
$facid = 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -87,8 +90,6 @@ $html = new Form($db);
|
|||||||
*
|
*
|
||||||
* Mode creation
|
* Mode creation
|
||||||
*
|
*
|
||||||
*
|
|
||||||
*
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user