2
0
forked from Wavyzz/dolibarr

Qual: Removed dead code

This commit is contained in:
Laurent Destailleur
2011-08-14 02:11:15 +00:00
parent 17c0da5d66
commit 3f2e6bbf82
11 changed files with 33 additions and 250 deletions

View File

@@ -20,7 +20,7 @@
* \file htdocs/comm/propal/contact.php
* \ingroup propal
* \brief Onglet de gestion des contacts de propal
* \version $Id: contact.php,v 1.43 2011/08/03 00:46:33 eldy Exp $
* \version $Id: contact.php,v 1.44 2011/08/14 02:11:45 eldy Exp $
*/
require("../../main.inc.php");
@@ -80,30 +80,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->propale->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->propale->creer)
{
$propal = new Propal($db);
if ($propal->fetch($id))
{
$contact = $propal->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $propal->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($action == 'swapstatut' && $user->rights->propale->creer)
@@ -165,7 +141,7 @@ $userstatic=new User($db);
/* Mode vue et edition */
/* */
/* *************************************************************************** */
if (isset($mesg)) print $mesg;
dol_htmloutput_mesg($mesg);
$id = $id;
$ref= GETPOST('ref');
@@ -187,7 +163,7 @@ if ($id > 0 || ! empty($ref))
*/
print '<table class="border" width="100%">';
$linkback="<a href=\"".$_SERVER["PHP_SELF"]."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder\">".$langs->trans("BackToList")."</a>";
$linkback="<a href=\"".DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder\">".$langs->trans("BackToList")."</a>";
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
@@ -301,7 +277,7 @@ if ($id > 0 || ! empty($ref))
print '</form>';
print '<tr><td colspan="6">&nbsp;</td></tr>';
print '<tr><td colspan="7">&nbsp;</td></tr>';
}
@@ -311,7 +287,8 @@ if ($id > 0 || ! empty($ref))
print '<td>'.$langs->trans("Company").'</td>';
print '<td>'.$langs->trans("Contacts").'</td>';
print '<td>'.$langs->trans("ContactType").'</td>';
print '<td align="center" colspan="3">'.$langs->trans("Status").'</td>';
print '<td align="center">'.$langs->trans("Status").'</td>';
print '<td colspan="2">&nbsp;</td>';
print "</tr>\n";
$companystatic = new Societe($db);
@@ -382,7 +359,7 @@ if ($id > 0 || ! empty($ref))
print '</td>';
// Icon update et delete
print '<td align="center" nowrap colspan="3">';
print '<td align="center" nowrap="nowrap" colspan="2">';
if ($user->rights->propale->creer)
{
print '&nbsp;';
@@ -407,5 +384,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date: 2011/08/03 00:46:33 $');
llxFooter('$Date: 2011/08/14 02:11:45 $');
?>

View File

@@ -22,7 +22,7 @@
* \file htdocs/comm/propal/document.php
* \ingroup propale
* \brief Page de gestion des documents attaches a une proposition commerciale
* \version $Id: document.php,v 1.68 2011/08/03 00:46:33 eldy Exp $
* \version $Id: document.php,v 1.69 2011/08/14 02:11:45 eldy Exp $
*/
require("../../main.inc.php");
@@ -146,7 +146,7 @@ if ($id > 0 || ! empty($ref))
print '<table class="border"width="100%">';
$linkback='<a href="'.$_SERVER["PHP_SELF"].'?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder">'.$langs->trans("BackToList").'</a>';
$linkback='<a href="'.DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder".'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
@@ -208,5 +208,5 @@ else
$db->close();
llxFooter('$Date: 2011/08/03 00:46:33 $ - $Revision: 1.68 $');
llxFooter('$Date: 2011/08/14 02:11:45 $ - $Revision: 1.69 $');
?>

View File

@@ -22,7 +22,7 @@
* \file htdocs/comm/propal/note.php
* \ingroup propale
* \brief Fiche d'information sur une proposition commerciale
* \version $Id: note.php,v 1.62 2011/08/03 00:46:33 eldy Exp $
* \version $Id: note.php,v 1.63 2011/08/14 02:11:45 eldy Exp $
*/
require("../../main.inc.php");
@@ -112,7 +112,7 @@ if ($id > 0 || ! empty($ref))
print '<table class="border" width="100%">';
$linkback="<a href=\"".$_SERVER["PHP_SELF"]."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder\">".$langs->trans("BackToList")."</a>";
$linkback="<a href=\"".DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder\">".$langs->trans("BackToList")."</a>";
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
@@ -226,5 +226,5 @@ if ($id > 0 || ! empty($ref))
}
$db->close();
llxFooter('$Date: 2011/08/03 00:46:33 $ - $Revision: 1.15 ');
llxFooter('$Date: 2011/08/14 02:11:45 $ - $Revision: 1.15 ');
?>

View File

@@ -21,7 +21,7 @@
* \file htdocs/commande/contact.php
* \ingroup commande
* \brief Onglet de gestion des contacts de commande
* \version $Id: contact.php,v 1.43 2011/07/31 22:23:15 eldy Exp $
* \version $Id: contact.php,v 1.44 2011/08/14 02:11:45 eldy Exp $
*/
require("../main.inc.php");
@@ -75,30 +75,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->commande->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->commande->creer)
{
$commande = new Commande($db);
if ($commande->fetch($_GET["id"]))
{
$contact = $commande->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $commande->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
@@ -160,7 +136,7 @@ $userstatic=new User($db);
/* Mode vue et edition */
/* */
/* *************************************************************************** */
if (isset($mesg)) print $mesg;
dol_htmloutput_mesg($mesg);
$id = $_GET['id'];
$ref= $_GET['ref'];
@@ -374,7 +350,7 @@ if ($id > 0 || ! empty($ref))
print '</td>';
// Icon update et delete
print '<td align="center" nowrap>';
print '<td align="center" nowrap="nowrap" colspan="2">';
if ($commande->statut < 5 && $user->rights->commande->creer)
{
print '&nbsp;';
@@ -400,5 +376,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date: 2011/07/31 22:23:15 $');
llxFooter('$Date: 2011/08/14 02:11:45 $');
?>

View File

@@ -20,7 +20,7 @@
* \file htdocs/compta/facture/contact.php
* \ingroup facture
* \brief Onglet de gestion des contacts des factures
* \version $Id: contact.php,v 1.48 2011/07/31 22:23:13 eldy Exp $
* \version $Id: contact.php,v 1.49 2011/08/14 02:11:46 eldy Exp $
*/
require("../../main.inc.php");
@@ -74,30 +74,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->facture->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer)
{
$facture = new Facture($db);
if ($facture->fetch($_GET["facid"]))
{
$contact = $facture->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $facture->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->facture->creer)
@@ -395,5 +371,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date: 2011/07/31 22:23:13 $');
llxFooter('$Date: 2011/08/14 02:11:46 $');
?>

View File

@@ -20,7 +20,7 @@
\file htdocs/contrat/contact.php
\ingroup contrat
\brief Onglet de gestion des contacts des contrats
\version $Id: contact.php,v 1.46 2011/07/31 23:46:55 eldy Exp $
\version $Id: contact.php,v 1.47 2011/08/14 02:11:46 eldy Exp $
*/
require ("../main.inc.php");
@@ -73,30 +73,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->contrat->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->contrat->creer)
{
$contrat = new Contrat($db);
if ($contrat->fetch($_GET["id"]))
{
$contact = $contrat->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $contrat->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->contrat->creer)
@@ -400,5 +376,5 @@ if ($id > 0)
$db->close();
llxFooter('$Date: 2011/07/31 23:46:55 $');
llxFooter('$Date: 2011/08/14 02:11:46 $');
?>

View File

@@ -20,7 +20,7 @@
* \file htdocs/fichinter/contact.php
* \ingroup fichinter
* \brief Onglet de gestion des contacts de fiche d'intervention
* \version $Id: contact.php,v 1.30 2011/07/31 23:50:54 eldy Exp $
* \version $Id: contact.php,v 1.31 2011/08/14 02:11:45 eldy Exp $
*/
require("../main.inc.php");
@@ -74,30 +74,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->ficheinter->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->ficheinter->creer)
{
$fichinter = new Fichinter($db);
if ($fichinter->fetch($_GET["id"]))
{
$contact = $fichinter->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $fichinter->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->ficheinter->creer)
@@ -384,5 +360,5 @@ if ($id > 0)
$db->close();
llxFooter('$Date: 2011/07/31 23:50:54 $');
llxFooter('$Date: 2011/08/14 02:11:45 $');
?>

View File

@@ -21,7 +21,7 @@
* \file htdocs/fourn/commande/contact.php
* \ingroup commande
* \brief Onglet de gestion des contacts de commande
* \version $Id: contact.php,v 1.20 2011/07/31 23:57:02 eldy Exp $
* \version $Id: contact.php,v 1.21 2011/08/14 02:11:46 eldy Exp $
*/
require("../../main.inc.php");
@@ -75,30 +75,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->commande->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->commande->creer)
{
$commande = new CommandeFournisseur($db);
if ($commande->fetch($_GET["id"]))
{
$contact = $commande->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $commande->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
@@ -366,7 +342,7 @@ if ($id > 0 || ! empty($ref))
print '</td>';
// Icon update et delete
print '<td align="center" nowrap>';
print '<td align="center" nowrap="nowrap">';
if ($commande->statut < 5 && $user->rights->commande->creer)
{
print '&nbsp;';
@@ -392,5 +368,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date: 2011/07/31 23:57:02 $');
llxFooter('$Date: 2011/08/14 02:11:46 $');
?>

View File

@@ -21,7 +21,7 @@
* \file htdocs/fourn/facture/contact.php
* \ingroup facture, fournisseur
* \brief Onglet de gestion des contacts des factures
* \version $Id: contact.php,v 1.27 2011/07/31 23:57:01 eldy Exp $
* \version $Id: contact.php,v 1.28 2011/08/14 02:11:46 eldy Exp $
*/
require("../../main.inc.php");
@@ -76,30 +76,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->fournisseur->facture->cre
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->fournisseur->facture->creer)
{
$facture = new FactureFournisseur($db);
if ($facture->fetch($_GET["facid"]))
{
$contact = $facture->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $facture->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
} else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->fournisseur->facture->creer)
@@ -384,5 +360,5 @@ if ($id > 0)
$db->close();
llxFooter('$Date: 2011/07/31 23:57:01 $');
llxFooter('$Date: 2011/08/14 02:11:46 $');
?>

View File

@@ -19,7 +19,7 @@
* \file htdocs/projet/contact.php
* \ingroup project
* \brief Onglet de gestion des contacts du projet
* \version $Id: contact.php,v 1.28 2011/07/31 23:23:39 eldy Exp $
* \version $Id: contact.php,v 1.29 2011/08/14 02:11:15 eldy Exp $
*/
require("../main.inc.php");
@@ -77,31 +77,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->projet->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateline' && $user->rights->projet->creer)
{
$project = new Project($db);
if ($project->fetch($projectid))
{
$contact = $project->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $project->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
}
else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->projet->creer)
@@ -415,5 +390,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date: 2011/07/31 23:23:39 $');
llxFooter('$Date: 2011/08/14 02:11:15 $');
?>

View File

@@ -21,7 +21,7 @@
* \file htdocs/projet/tasks/contact.php
* \ingroup project
* \brief Actors of a task
* \version $Id: contact.php,v 1.22 2011/07/31 23:23:36 eldy Exp $
* \version $Id: contact.php,v 1.23 2011/08/14 02:11:46 eldy Exp $
*/
require ("../../main.inc.php");
@@ -78,31 +78,6 @@ if ($_POST["action"] == 'addcontact' && $user->rights->projet->creer)
}
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateline' && $user->rights->projet->creer)
{
$task = new Task($db);
if ($task->fetch($taskid))
{
$contact = $task->detail_contact($_POST["elrowid"]);
$type = $_POST["type"];
$statut = $contact->statut;
$result = $task->update_contact($_POST["elrowid"], $statut, $type);
if ($result >= 0)
{
$db->commit();
} else
{
dol_print_error($db, "result=$result");
$db->rollback();
}
}
else
{
dol_print_error($db);
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->projet->creer)
@@ -416,5 +391,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date: 2011/07/31 23:23:36 $ - $Revision: 1.22 $');
llxFooter('$Date: 2011/08/14 02:11:46 $ - $Revision: 1.23 $');
?>