From 10ada99869f75481f8c3384ea18efa0b4e4dbadd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Dec 2004 20:08:31 +0000 Subject: [PATCH] =?UTF-8?q?Qual:=20Suppression=20de=202=20fichiers=20plus?= =?UTF-8?q?=20utilis=E9s=20suite=20=E0=20la=20nouvelle=20gestion=20des=20c?= =?UTF-8?q?ontacts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/people.php | 265 -------------------------------------- htdocs/fourn/people.php | 272 ---------------------------------------- 2 files changed, 537 deletions(-) delete mode 100644 htdocs/comm/people.php delete mode 100644 htdocs/fourn/people.php diff --git a/htdocs/comm/people.php b/htdocs/comm/people.php deleted file mode 100644 index 862332c27be..00000000000 --- a/htdocs/comm/people.php +++ /dev/null @@ -1,265 +0,0 @@ - - * Copyright (C) 2004 Laurent Destailleur - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * - */ -require("./pre.inc.php"); -require("../contact.class.php"); - -$user->getrights('propale'); -$user->getrights('fichinter'); -$user->getrights('commande'); -$user->getrights('projet'); - - -if ($sortorder == "") -{ - $sortfield="lower(s.nom)"; - $sortorder="ASC"; -} - -if ($action == 'create_user') -{ - // Recuperation contact actuel - $contact = new Contact($db); - $result = $contact->fetch($_GET["contactid"]); - - // Creation user - $nuser = new User($db); - $nuser->nom = $contact->nom; - $nuser->prenom = $contact->prenom; - $nuser->create_from_contact($contact); -} - -if ($action == 'update') -{ - // Recuperation contact actuel - $contact = new Contact($db); - $contact->fetch($_POST["contactid"]); - - // Modification contact - $contact->nom = $_POST["name"]; - $contact->prenom = $_POST["firstname"]; - $contact->poste = $_POST["poste"]; - $contact->phone = $_POST["phone"]; - $contact->fax = $_POST["fax"]; - $contact->email = $_POST["email"]; - $contact->note = $_POST["note"]; - - $contact->update($_POST["contactid"]); -} - -/* - * - * - */ - -llxHeader(); - -if ($_GET["socid"] > 0) -{ - - $sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.cp,s.ville, s.note"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st "; - $sql .= " WHERE s.fk_stcomm=st.id"; - $sql .= " AND s.idp = ".$_GET["socid"]; - - - $result = $db->query($sql); - - if ($result) - { - $objsoc = $db->fetch_object($result); - - /* - * - * - */ - print_fiche_titre ("Contact société : idp\">$objsoc->nom"); - /* - * - */ - - if ($objsoc->note) - { - print ''; - print ""; - print "
".nl2br($objsoc->note)."
"; - } - - } - else - { - print $db->error(); - } - - print '

'; - - print ""; - print ""; - print ""; - - $sql = "SELECT p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.fk_user "; - $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p WHERE p.fk_soc = $objsoc->idp"; - - if ($contactid) - { - $sql .= " AND p.idp = $contactid"; - } - - $sql .= " ORDER by p.datec"; - $result = $db->query($sql); - $i = 0 ; $num = $db->num_rows(); $tag = True; - - while ($i < $num) - { - $obj = $db->fetch_object(); - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $i++; - $tag = !$tag; - } - if ($contactid) - { - if ($obj->fk_user) - { - print ''; - } - else - { - print ''; - print ''; - } - } - - print "
Prénom NomPosteTelFaxEmail
$obj->firstname $obj->name$obj->poste $obj->phone $obj->fax email\">$obj->email 
LoginFiche
LoginPas de compteCréer un compte
"; - - - /* - * - * Edition du contact - * - */ - if ($action == 'editcontact') - { - $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note"; - $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p WHERE p.idp = $contactid"; - $result = $db->query($sql); - $num = $db->num_rows(); - - if ( $num >0 ) - { - $obj = $db->fetch_object(); - } - - print "

"; - print ''; - print ""; - print '
'; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ''; - print ''; - - print "
Nomname\">Prenomfirstname\">
Posteposte\">
Telphone\">Faxfax\">
Emailemail\">
Note
"; - print "
"; - } - - /* - * - * - * - *if (defined("MAIN_MODULE_FICHEINTER") && MAIN_MODULE_FICHEINTER) - * { - * print "

"; - * print_titre("Fiche d'intervention"); - * } - * - * - * - */ - - print '

'; - - print ""; - print ""; - - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $objsoc->idp "; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action "; - - if ($contactid) - { - $sql .= " AND fk_contact = $contactid"; - } - $sql .= " ORDER BY a.datea DESC, a.id DESC"; - - if ( $db->query($sql) ) - { - $i = 0 ; $num = $db->num_rows(); $tag = True; - while ($i < $num) - { - $obj = $db->fetch_object(); - $var=!$var; - print ""; - - print ""; - if ($obj->propalrowid) - { - print ""; - } - else - { - print ""; - } - - print ""; - print "\n"; - $i++; - $tag = !$tag; - } - } - else - { - print ''; - } - print "
ActionFaxEmail
". strftime("%d %b %Y %H:%M", $obj->da) ."propalrowid\">$obj->libelle$obj->libelle$obj->code 
' . $db->error() . '
"; - -} -else -{ - print "Error"; -} - -$db->close(); - -llxFooter("Dernière modification $Date$ révision $Revision$"); -?> diff --git a/htdocs/fourn/people.php b/htdocs/fourn/people.php deleted file mode 100644 index daa667e3049..00000000000 --- a/htdocs/fourn/people.php +++ /dev/null @@ -1,272 +0,0 @@ - - * Copyright (C) 2003 Éric Seigne - * Copyright (C) 2004 Laurent Destailleur - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - * - */ -require("./pre.inc.php"); - -if ($sortorder == "") -{ - $sortfield="lower(s.nom)"; - $sortorder="ASC"; -} - -$active["1"] = "Offres en ligne"; -$active["-1"] = "Moderation"; -$active["-2"] = "Refusées"; -$active["0"] = "Rédaction"; -$active["-3"] = "Désactivées"; -$active["-4"] = "Supprimées"; - -$yn["t"] = "oui"; -$yn["f"] = "non"; -$deacmeth["b"] = "robots"; - -if ($action == 'add') { - - $email = trim($email); - - if (strlen(trim($name)) + strlen(trim($firstname)) > 0) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc,name, firstname, poste, phone,fax,email) "; - $sql .= " VALUES (now(),$socid,'$name','$firstname','$poste','$phone','$fax','$email')"; - $result = $db->query($sql); - if ($result) { - Header("Location: fiche.php?socid=$socid"); - } - } -} -if ($action == 'update') { - if (strlen(trim($name)) + strlen(trim($firstname)) > 0) { - - $email = trim($email); - - $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople set name='$name', firstname='$firstname', poste='$poste', phone='$phone',fax='$fax',email='$email', note='$note'"; - $sql .= " WHERE idp=$contactid"; - $result = $db->query($sql); - if ($result) { - Header("Location: fiche.php?socid=$socid"); - } - } -} - -llxHeader(); - -if ($page == -1) { $page = 0 ; } -$limit = 26; -$offset = $limit * $page ; -$pageprev = $page - 1; -$pagenext = $page + 1; - -if ($socid > 0) { - - $sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.cp,s.ville, s.note"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st "; - $sql .= " WHERE s.fk_stcomm=st.id"; - - if ($to == 'next') { - $sql .= " AND s.idp > $socid ORDER BY idp ASC LIMIT 1"; - } else { - $sql .= " AND s.idp = $socid"; - } - - $result = $db->query($sql); - - if ($result) { - $objsoc = $db->fetch_object($result); - - /* - * - * - */ - print "\n"; - print ""; - print ""; - print '
Contacts pour la société : idp\">$objsoc->nom
[Ajouter un contact]
'; - - print "


"; - print "\n"; - print "\n"; - print "\n"; - print "
"; - print "tel : $objsoc->tel
"; - print "fax : $objsoc->fax
"; - print "$objsoc->cp $objsoc->ville
"; - if ($objsoc->url) { - print "url\">$objsoc->url
"; - } - - print "
"; - - print "
"; - - /* - * - */ - - - print ""; - print ""; - print "
".nl2br($objsoc->note)."
"; - - } else { - print $db->error(); - } - - print "

"; - - print ""; - print ""; - print ""; - - $sql = "SELECT p.name, p.firstname, p.poste, p.phone, p.fax, p.email "; - $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p WHERE p.fk_soc = $objsoc->idp"; - - if ($contactid) { - $sql .= " AND p.idp = $contactid"; - } - $sql .= " ORDER by p.datec"; - $result = $db->query($sql); - $i = 0 ; $num = $db->num_rows(); $var = True; - - while ($i < $num) - { - $obj = $db->fetch_object(); - $var != $var; - print ""; - - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $i++; - $tag = !$tag; - } - print "
Prénom NomPosteTelFaxEmail
$obj->firstname $obj->name$obj->poste $obj->phone $obj->fax email\">$obj->email 
"; - - - if ($action == 'addcontact') { - $langs->load("companies"); - - print "

"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "
".$langs->trans("AddContact")."
NomPrenom
Poste
TelFax
Email
"; - print "trans("Add")."\">"; - print "
"; - } - /* - * - * Edition du contact - * - */ - if ($action == 'editcontact') { - $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note"; - $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p WHERE p.idp = $contactid"; - $result = $db->query($sql); - $num = $db->num_rows(); - if ( $num >0 ) { - $obj = $db->fetch_object(); - } - - print "
"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ''; - print "
Numéro$obj->idp
Nomname\">Prenomfirstname\">
Posteposte\">
Telphone\">Faxfax\">
Emailemail\">
Note
"; - print ""; - print "
"; - } - - /* - * - * - */ - print "

"; - - print ""; - print ""; - - - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $objsoc->idp "; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action "; - - if ($contactid) { - $sql .= " AND fk_contact = $contactid"; - } - $sql .= " ORDER BY a.datea DESC, a.id DESC"; - - if ( $db->query($sql) ) { - $i = 0 ; $num = $db->num_rows(); $tag = True; - while ($i < $num) { - $obj = $db->fetch_object(); - if ($tag) { - print ""; - } else { - print ""; - } - print ""; - if ($obj->propalrowid) { - print ""; - } else { - print ""; - } - - print ""; - print "\n"; - $i++; - $tag = !$tag; - } - } else { - print ''; - } - print "
ActionFaxEmail
". strftime("%d %b %Y %H:%M", $obj->da) ."propalrowid\">$obj->libelle$obj->libelle$obj->code 
' . $db->error() . '
"; - - - - -} else { - print "Error"; -} -$db->free(); -$db->close(); - -llxFooter("Dernière modification $Date$ révision $Revision$"); -?>