1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
include("config/configuration.php");
// définition d'une classe prospect
class prospect {
// Définition des propriété de la classe
public $propetat_prospect; // etat du prospect
public $propnom_societe; // Nom de la société
public $propnom_contact; //Nom du contact
public $propadresse; // Adresse de la société
public $propcode_postal; // code postale de la société
public $propville_societe; // Ville de la société
public $proptel_fixe; // Fixe de la société
public $propfax; // fax de la société
public $propportable; // telephone_portable de la société
public $propdept; // Départemant du prospect
public $propedition; // édition concerné
public $propemail; // Email de la société
public $propremarque; // remarque concernant l'entretiens
public $propdomaine; // nom de domaine
public $propurl_site; // adresse internet de leur site
public $propnote_site; // note du site
public $propcommentaire_site; // Commentaire du site web
public $propdate_deb_hebergement; // date du début de l'hebergement
public $propdate_fin_hebergement; // date de fin de l'hbergement
// constructeur permettant de crée le prospect dans la classe
function __construct($etat,$nom_societe,$nom_contact,$adresse,$code_postal,$ville_societe,$tel_fixe,$fax,$portable,$email,$remarque,$domaine,$url,$note,$commentaire_site,$date_deb_hebergement,$date_fin_hebergement)
{
$this->propetat_prospect=$etat;
$this->propnom_societe=$nom_societe;
$this->propnom_contact=$nom_contact;
$this->propadresse=$adresse;
$this->propcode_postal=$code_postal;
$this->propville_societe=$ville_societe;
$this->proptel_fixe=$tel_fixe;
$this->propfax=$fax;
$this->propportable=$portable;
$this->propemail=$email;
$this->propremarque=$remarque;
$this->propdomaine=$domaine;
$this->propurl_site=$url;
$this->propnote_site=$note;
$this->propcommentaire_site=$commentaire_site;
$this->propdate_deb_hebergement=$date_deb_hebergement;
$this->propdate_fin_hebergement=$date_fin_hebergement;
}
function verification_doublon($nom_societe) {
$sql_recherche=" SELECT * FROM societe WHERE nom_societe=$nom_societe";
$result_recherche=mysql_query($sql_recherche) or die (mysql_error());
$nb_result=mysql_num_row($result_recherche);
if($nb_result!=0)
{
header("Locaton : erreur.php");
}
}
// Méthode permettant d'ajouter un prospect dans la base de donnée
function ajout_prospect($etat,$nom_societe,$nom_contact,$adresse,$code_postal,$ville_societe,$tel_fixe,$fax,$portable,$email,$remarque,$domaine,$url,$note,$commentaire_site,$date_deb_hebergement,$date_fin_hebergement)
{
$sql="INSERT INTO societe (id_etat,nom_societe,nom_responsable_societe,adresse_societe,code_pos_societe,ville_societe,tel_fixe_societe,fax_societe,tel_protable_societe,email_societe,remarque_entretiens,domaine_site_societe,url_site_societe,note_site,commentaire_site,date_debut_hebergement,date_fin_hebergement)";
$sql.=" VALUES('".$etat."','".$nom_societe."','".$nom_contact."','".$adresse."','".$code_postal."','".$ville_societe."','".$tel_fixe."','".$fax."','".$portable."','".$email."','".$remarque."','".$domaine."','".$url."','".$note."','".$commentaire_site."','".$date_deb_hebergement."','".$date_fin_hebergement."')";
$result=mysql_query($sql) or die(mysql_error());
}
// Méthode permettant d'ajouter à la table de liaison du département et de la societe
function ajout_date($dept,$date_rappel,$date_signature) {
$sql=" SELECT MAX( num_societe ) FROM societe ";
$last_num_societe=mysql_query($sql) or die( mysql_error());
$sql="INSERT INTO publie (id_dept,num_societe,date_rappel,date_signature)";
$sql.=" VALUES ('".$dept."','".$last_num_societe."','".$date_rappel."','".$date_signature."')";
//echo "greg";
} |
Partager