Ajout onglet

This commit is contained in:
Rodolphe Quiedeville 2005-08-21 12:27:54 +00:00
parent 311ad98507
commit 52f328db8d

View File

@ -29,13 +29,12 @@
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once("../propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
require_once("../facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
if (!$user->rights->projet->lire) accessforbidden(); if (!$user->rights->projet->lire) accessforbidden();
if ($_POST["action"] == 'add' && $user->rights->projet->creer) if ($_POST["action"] == 'add' && $user->rights->projet->creer)
{ {
$pro = new Project($db); $pro = new Project($db);
@ -58,7 +57,8 @@ if ($_POST["action"] == 'add' && $user->rights->projet->creer)
if ($_POST["action"] == 'update' && $user->rights->projet->creer) if ($_POST["action"] == 'update' && $user->rights->projet->creer)
{ {
if (! $_POST["cancel"]) { if (! $_POST["cancel"])
{
if (!(empty($_POST["id"]) || empty($_POST["ref"]) || empty($_POST["title"]))) if (!(empty($_POST["id"]) || empty($_POST["ref"]) || empty($_POST["title"])))
{ {
$projet = new Project($db); $projet = new Project($db);
@ -73,7 +73,9 @@ if ($_POST["action"] == 'update' && $user->rights->projet->creer)
{ {
$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet $_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet
} }
} else { }
else
{
$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet $_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet
} }
} }
@ -139,6 +141,10 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
$hselected=$h; $hselected=$h;
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Tasks");
$h++;
if ($conf->propal->enabled) if ($conf->propal->enabled)
{ {
$langs->load("propal"); $langs->load("propal");