* * 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.php3"); llxHeader(); $db = new Db(); function do_upload ($socid) { global $uploadfile, $uploadfile_size; global $local_file, $error_msg; if ( $uploadfile == "none" ) { $error_msg = "You did not specify a file for uploading."; return; } if ( $uploadfile_size > 2000000 ) { $error_msg = "Sorry, your file is too large."; return; } $soc_dir = SOCIETE_DOCUMENT_DIR . "/" . $socid; if (! is_dir($soc_dir)) { mkdir($soc_dir); } $upload_dir = "/tmp"; $local_file = SOCIETE_DOCUMENT_DIR . "/" . $socid . "/"; move_uploaded_file ( $userfile, $local_file ); print $HTTP_POST_FILES['uploadfile']['name']; } if ( $error_msg ) { echo "$error_msg

"; } if ( $sendit ) { do_upload ($socid); } /* * * Mode fiche * * */ if ($socid > 0) { $societe = new Societe($db, $socid); $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.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM societe as s, c_stcomm as st, c_typent as t, c_effectif as e "; $sql .= " WHERE s.fk_stcomm=st.id AND s.fk_typent = t.id AND s.fk_effectif = e.id"; $result = $db->query($sql); if ($result) { $objsoc = $db->fetch_object(0); $dac = strftime("%Y-%m-%d %H:%M", time()); if ($errmesg) { print "$errmesg
"; } /* * */ print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print "
Fiche client : $objsoc->nom
idp&action=add_bookmark\">[Bookmark]idp&action=create\">[Projet]idp&action=create\">[Propal]idp\">Notes[idp&action=edit\">Editer]
"; /* * * */ print "\n"; print "\n"; print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
Type $objsoc->typentEffectif$objsoc->effectif
Tel $objsoc->tel fax$objsoc->fax 
Ville".nl2br($objsoc->address)."
$objsoc->cp $objsoc->ville
sirensiren\">$objsoc->siren prefix"; if ($objsoc->prefix_comm) { print $objsoc->prefix_comm; } else { print "[idp&action=attribute_prefix\">Attribuer]"; } print "
Siteurl\">$objsoc->url 
"; /* * */ print "
"; echo '
'; print ''; print ''; print '

'; print ''; print '
'; print '
'; } else { print $db->error() . "
" . $sql; } } else { print "Erreur"; } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>