/**
  * Détermine si un utilisateur est admin 
  * @return renvoie true si l'utilisateur est admin 
  */
 function estAdmin()
 {
     $row = SelectSimple("admin", "if_utilisateur", "iduti", $this->id);
     if ($row[0]) {
         return true;
     }
 }
 function enleverPhoto()
 {
     //suppression dans la table d'association paragraphe-image
     mysql_query("DELETE FROM if_para_photo WHERE numparaphoto='{$this->numparaphoto}'");
     //$result=mysql_query("SELECT numparaphoto FROM if_para_photo WHERE numphoto='$this->numphoto' AND numparaphoto!='$this->numparaphoto'");
     $numparaphoto = SelectSimple("numparaphoto", "if_para_photo", "numphoto", $this->numphoto, "AND numparaphoto!='{$this->numparaphoto}'");
     if (!$numparaphoto) {
         $supPhoto = new Photo();
         $supPhoto->numphoto = $this->numphoto;
         $supPhoto->modif = "o";
         $supPhoto->supprimerPhoto();
     }
 }
				} // fin if ($divflotte)
				?>
				<!-- Affichage contenu non dynamique-->
				<p>Nous répondons aux besoins de formation des techniciens et des ingénieurs de la filière porcine et des éleveurs spécialisés par une adaptation permanente de notre programme annuel de formation et par la mise en place de formations intra-entreprises après analyse des besoins spécifiques des équipes à former.<br />&nbsp;<br />&nbsp;</p>
				<table width="550" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td class="positionnement"><h4>Rechercher une formation</h4></td>
                    <td>&nbsp;</td>
                    <td><h4>Prochaines sessions </h4></td>
                  </tr>
                  <tr>
                    <td class="positionnement">
					<select name="selectDom" class="public" OnChange="location='index.php?numpage=<?=$numpage?>&spec=<?=$spec?>&numrub=<?=$numrub?>&numcateg=<?=$numcateg?>&numsscateg=<?=$numsscateg?>&lg=<?=$lg?>&dom='+this.value">
				   <option value="">S&eacute;lectionner un thème</option>  
				   <?php
				   $numr=SelectSimple("numrub","if_rubrique","1","1"," AND nom LIKE 'domaines d\'Expertise'");//numro de la rubrique correspondant  "Domaine d'expertise"
				   $domaines=new ListeMenus(); 
				   $domaines->type="categorie";
				   $domaines->nomkey="numcateg";
				   $domaines->numfkey=$numr; 
				   $domaines->lg=$lg;  
				   $domaines->afficherListeMenus();	  
				   foreach ($domaines as $menus) {
				   ?>
				   	 <option value="<?=$menus->nummenu?>" <?php if ($menus->nummenu==$dom) echo "selected='selected'";?>><?=$menus->nomMenu?></option>  
				   <?php
				   }//fin du foreach
				   ?>
				</select>
				<br />
				<?php
示例#4
0
&amp;touteladoc=o">Afficher toutes les documentations</a>   </li>
   <li>
   <label>Par thème :</label>
   <select name="selectDom" class="public" OnChange="location='index.php?id=<?php 
echo $id;
?>
&cnx=<?php 
echo $cnx;
?>
&pg_admin=<?php 
echo $pg_admin;
?>
&dom='+this.value">
				   <option value="">S&eacute;lectionner un thème</option>  
				   <?php 
$numr = SelectSimple("numrub", "if_rubrique", "1", "1", " AND nom LIKE 'domaines d\\'Expertise'");
//numro de la rubrique correspondant  "Domaine d'expertise"
$domaines = new ListeMenus();
$domaines->type = "categorie";
$domaines->nomkey = "numcateg";
$domaines->numfkey = $numr;
$domaines->lg = $lg;
$domaines->afficherListeMenus();
foreach ($domaines as $menus) {
    ?>
				   	 <option value="<?php 
    echo $menus->nummenu;
    ?>
" <?php 
    if ($menus->nummenu == $dom) {
        echo "selected='selected'";
示例#5
0
 /**
  * Affiche la rubrique
  */
 function afficheRub()
 {
     $row = SelectSimple("numrub", "if_rubrique", "ordre", "1", " AND zone='2'");
     $this->nummenu = $row[0];
 }
        }
    }
    ?>
</td>
						<td width="380"><strong><?php 
    if ($dom) {
        echo SelectSimple('nom', 'if_categorie', 'numcateg', $dom);
    } else {
        if ($rech) {
            echo stripslashes($rech);
        } else {
            if ($rechauteur) {
                echo Majuscules($rechauteur);
            } else {
                if ($type_doc) {
                    echo SelectSimple("nom", "if_type_doc", "type_doc", $type_doc);
                }
            }
        }
    }
    ?>
</strong></td>
					  </tr>
					  <tr>
						<td><?php 
    if ($dom) {
        echo "Affiner par sous thème : ";
    }
    ?>
</td>
						<td>
示例#7
0
 /**
  * Affiche les infos de la br&egrave;ve
  */
 function infosBreve()
 {
     $row = SelectMultiple("if_v_breve", "numpara", $this->numpara);
     $this->titrePara = miseEnForme($row["titre"]);
     $this->contenuPara = miseEnForme($row["contenu"]);
     $this->date_breve = date("d/m/Y", $row["date"]);
     $this->datebrut = $row["date"];
     $this->numpays = $row["numpays"];
     $this->nom_pays = SelectSimple("pays", "if_pays", "numpays", $row["numpays"]);
     $this->source = $row["source"];
 }
示例#8
0
 /**
  * Liste les informations du client
  */
 function infosClient()
 {
     $row = SelectMultiple("if_bo_client", "numclient", $this->numclient);
     $this->raison = $row["raison"];
     $this->nom = $row["nom"];
     $this->prenom = $row["prenom"];
     $this->pwd = easy($row["pwd"], "d");
     $this->email = $row["email"];
     $this->civilite = $row["civilite"];
     $this->fonction = $row["fonction"];
     $this->adr1 = $row["adr1"];
     $this->adr2 = $row["adr2"];
     $this->cp = $row["cp"];
     $this->ville = $row["ville"];
     $this->pays = $row["numpays"];
     $this->nompays = utf8_encode(SelectSimple("pays", "if_pays", "numpays", $this->pays));
     $this->tel = $row["tel"];
     $this->gsm = $row["gsm"];
     $this->fax = $row["fax"];
     $this->actif = $row["actif"];
     $this->amont = $row["amont"];
     $this->aval = $row["aval"];
 }
 function infosDoc()
 {
     $row = SelectMultiple("if_v_doc", "numpara", $this->numpara);
     $this->titrePara = miseEnForme($row["titre"]);
     $this->contenuPara = miseEnForme($row["contenu"]);
     $this->type_doc = $row["type_doc"];
     $this->nom_type_doc = SelectSimple("nom", "if_type_doc", "type_doc", $row["type_doc"]);
     $this->titre_en = miseEnForme($row["titre_en"]);
     $this->contenu_en = miseEnForme($row["contenu_en"]);
     $this->auteur = $row["auteur"];
     $this->ref_biblio = $row["ref_biblio"];
     if ($row["date"]) {
         $this->date = date("d/m/Y", $row["date"]);
         $this->date_brute = $row["date"];
     }
     $this->date_libre = $row["date_libre"];
     //annee fabriquee a la volee
     if ($row["date_libre"]) {
         $this->anneeDoc = substr($row["date_libre"], 0, 4);
     } else {
         if ($row["date"]) {
             $this->anneeDoc = date("Y", $row["date"]);
         }
     }
     $this->reference = $row["reference"];
     $this->keyw = $row["keyw"];
     $this->tarif = $row["tarif"];
     $this->poids = $row["poids"];
     $this->pwd = $row["pwd"];
     $this->acces_res = $row["acces_res"];
     $this->une = $row["une"];
     $this->publiee = $row["publiee"];
 }
示例#10
0
 /**
  * Liste les articles de la formation 
  * @return renvoie un tableau contenant tous les articles de la formation
  */
 function listerArticlesForm()
 {
     $list_article = array();
     $result = mysql_query("SELECT * FROM if_bo_detail WHERE numcom='{$this->numcom}'");
     while ($row = mysql_fetch_array($result)) {
         $article["numdetail"] = $row["numdetail"];
         $article["numcom"] = $row["numcom"];
         $article["numpara"] = $row["numpara"];
         $article["designation"] = $row["designation"];
         $article["montantTTC"] = SelectSimple("montantTTC", "if_bo_com", "numcom", $this->numcom);
         $list_article[] = $article;
     }
     return $list_article;
 }
示例#11
0
 /**
  * liste les inscrits
  * @return renvoie un tableau contenant les infos des inscrits
  */
 function listerInscrits()
 {
     $list_inscrits = array();
     $result = mysql_query("SELECT if_bo_detail.numcom FROM if_bo_detail, if_formations WHERE if_bo_detail.numpara='{$this->numpara}' AND if_bo_detail.numpara=if_formations.numpara AND sur_mesure='o' AND validee!='o' GROUP BY if_bo_detail.numcom");
     while ($row = mysql_fetch_row($result)) {
         // Recherche des articles
         $lePanier = new Panier();
         $lePanier->numcom = $row[0];
         $listeArt = $lePanier->listerArticlesForm();
         //Infos sur le client
         $inscrit = new Client();
         $inscrit->numclient = SelectSimple("numclient", "if_bo_com", "numcom", $row[0]);
         $inscrit->infosClient();
         $list_inscrits[] = array($inscrit, $listeArt);
     }
     return $list_inscrits;
 }
示例#12
0
 /**
  *  Recherche le num&eacute;ro de la page sp&eacute;cifique
  *  @param $nom_fichier prend en argument le nom de fichier associ&eacute;
  *  @see Page#infosPage()
  */
 function pageSpecifique($nom_fichier)
 {
     $nump = SelectSimple("numpage", "if_page", "specifique", $nom_fichier);
     $this->numpage = $nump;
     $this->infosPage();
 }
示例#13
0
 /**
  * R&eacute;cup&egrave;re les infos de livraison
  */
 function infosLivraison()
 {
     $row = SelectMultiple("if_bo_livfact", "numlivfact", $this->numlivfact);
     $this->nom_f = $row["nom_f"];
     $this->prenom_f = $row["prenom_f"];
     $this->tel_f = $row["tel_f"];
     $this->fax_f = $row["fax_f"];
     $this->raison_f = $row["raison_f"];
     $this->adr1_f = $row["adr1_f"];
     $this->adr2_f = $row["adr2_f"];
     $this->cp_f = $row["cp_f"];
     $this->ville_f = $row["ville_f"];
     $this->pays_f = $row["numpays_f"];
     $this->nompays_f = utf8_encode(SelectSimple("pays", "if_pays", "numpays", $this->pays_f));
     $this->nom_l = $row["nom_l"];
     $this->prenom_l = $row["prenom_l"];
     $this->tel_l = $row["tel_l"];
     $this->fax_l = $row["fax_l"];
     $this->raison_l = $row["raison_l"];
     $this->adr1_l = $row["adr1_l"];
     $this->adr2_l = $row["adr2_l"];
     $this->cp_l = $row["cp_l"];
     $this->ville_l = $row["ville_l"];
     $this->pays_l = $row["numpays_l"];
     $this->nompays_l = utf8_encode(SelectSimple("pays", "if_pays", "numpays", $this->pays_l));
 }
function EnvoiMailCommandeCheque($numcommande, $email, $montant)
{
    if (!is_numeric($numcommande)) {
        return false;
    } else {
        $date = date("d/m/Y", time());
        //recup de la commande - on ne peut pas utiliser nos objets
        $result = mysql_query("SELECT * FROM if_bo_com WHERE numcom='" . $numcommande . "'");
        $laCommande = mysql_fetch_array($result);
        //recup de la commande - on ne peut pas utiliser nos objets
        $result = mysql_query("SELECT * FROM if_bo_client WHERE numclient='" . $laCommande["numclient"] . "'");
        $leClient = mysql_fetch_array($result);
        /*
        $laCommande=new Commande();
        $laCommande->numcom->$numcommande;
        $laCommande->infosCommande();
        
        $leClient=new Client();
        $leClient->numclient->$laCommande->numclient;
        $leClient->infosClient();
        */
        $corps .= "\nCOMMANDE IFIP - Institut du Porc\n\n";
        $corps .= "Bonjour " . $leClient["prenom"] . " " . $leClient["nom"] . ",\n\nNous avons bien enregistré votre ";
        $corps .= "commande n°" . $numcommande . " sur le site de l'Ifip Institut du Porc et vous en remercions.\n";
        $corps .= "Vous trouverez ci-dessous le détail de votre commande ainsi que les informations pour procéder au règlement.\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $corps .= "DETAIL DE VOTRE COMMANDE\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $result = mysql_query("SELECT * FROM if_bo_detail WHERE numcom='{$numcommande}'");
        while ($detail = mysql_fetch_array($result)) {
            $numpara = $detail["numpara"];
            $numarticle = $detail["numarticle"];
            if ($numpara) {
                $titre = SelectSimple("titre", "if_paragraphe", "numpara", $numpara, "");
            }
            if ($numarticle) {
                $titre = SelectSimple("libelle", "if_articles", "numarticle", $numarticle, "");
            }
            $corps .= $titre . " - " . $detail["prix_vente"] . " euros - qte : " . $detail["qte"] . "\n";
        }
        $corps .= "----------------------------------------------------------------------------------\n";
        $corps .= "Commande N° " . $numcommande . "\n";
        $corps .= "Livraison " . $laCommande["fraisPort"] . " euros\n";
        $corps .= "Total " . $laCommande["montantTTC"] . " euros\n\n";
        $corps .= "Mode de paiement : chèque bancaire\n";
        $corps .= "Veuillez adresser un chèque d'un montant de\n";
        $corps .= miseEnFormeNombre($montant);
        $corps .= "€ à l'adresse suivante :\n";
        $corps .= "<strong>Ifip\t-\tInstitut\tdu\tporc</strong>\n";
        $corps .= "Service Editions\n";
        $corps .= "A l'attention de Brigitte Laval\n";
        $corps .= "149 rue de Bercy\n";
        $corps .= "75595 Paris Cedex 12\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $corps .= "\\Adresse e-mail : " . $email . "\n";
        $corps .= "Vous pouvez suivre en ligne l'évolution de votre commande en vous connectant à la rubrique Mon Compte.\n ";
        $corps .= "accessible en haut et à droite de toutes les pages du site.\n ";
        $corps .= "Un mail de validation vous sera automatiquement envoyé à réception de votre chèque.\n\n ";
        $corps .= "\nCordialement\n";
        $corps .= "\nBrigitte Laval, IFIP\n";
        $corps .= "\nTél. 01 40 04 53 72\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $recipients = $email;
        $From = "Ifip<*****@*****.**>";
        $Bcc = "";
        $To = $recipients;
        $ReturnPath = $From;
        $ReplyTo = $From;
        $Subject = "Votre commande IFIP (n°" . $numcommande . ")";
        EnvoiMail($recipients, $From, $Bcc, $To, $ReturnPath, $ReplyTo, $Subject, $corps);
        $recipients = "*****@*****.**";
        $From = "Ifip<*****@*****.**>";
        $Bcc = "";
        $To = $recipients;
        $ReturnPath = $From;
        $ReplyTo = $From;
        $Subject = "Copie commande IFIP (n°" . $numcommande . ")";
        EnvoiMail($recipients, $From, $Bcc, $To, $ReturnPath, $ReplyTo, $Subject, $corps);
        return true;
    }
}
function EnvoiMailDevis($numcommande, $email, $montant)
{
    if (!is_numeric($numcommande)) {
        return false;
    } else {
        $date = date("d/m/Y", time());
        //recup de la commande - on ne peut pas utiliser nos objets
        $result = mysql_query("SELECT * FROM if_bo_com WHERE numcom='" . $numcommande . "'");
        $laCommande = mysql_fetch_array($result);
        //recup du client
        $result = mysql_query("SELECT * FROM if_bo_client WHERE numclient='" . $laCommande["numclient"] . "'");
        $leClient = mysql_fetch_array($result);
        //recup des infos de livraison
        $result = mysql_query("SELECT * FROM if_bo_livfact WHERE numlivfact='" . $laCommande["numlivfact"] . "'");
        $laLivraison = mysql_fetch_array($result);
        $corps .= "\nCOMMANDE IFIP - Institut du Porc - " . $date . "\n\n";
        $corps .= "Bonjour " . $leClient["prenom"] . " " . $leClient["nom"] . ",\n\nNous avons bien enregistré votre ";
        $corps .= "demande de devis n°" . $numcommande . " sur le site de l'Ifip Institut du Porc et vous en remercions.\n";
        $corps .= "Brigitte Laval vous contactera directement par retour de mail afin de vous préciser les frais de livraison ";
        $corps .= "sur le pays : " . utf8_encode(SelectSimple("pays", "if_pays", "numpays", $laCommande["numpays"], "")) . "\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $corps .= "DETAIL DE VOTRE DEMANDE n° " . $numcommande . " en date du " . $date . "\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $result = mysql_query("SELECT * FROM if_bo_detail WHERE numcom='{$numcommande}'");
        while ($detail = mysql_fetch_array($result)) {
            $numpara = $detail["numpara"];
            $numarticle = $detail["numarticle"];
            if ($numpara) {
                $titre = SelectSimple("titre", "if_paragraphe", "numpara", $numpara, "");
            }
            if ($numarticle) {
                $titre = SelectSimple("libelle", "if_articles", "numarticle", $numarticle, "");
            }
            $corps .= $titre . " - " . $detail["prix_vente"] . " euros - qte : " . $detail["qte"] . "\n";
        }
        $corps .= "----------------------------------------------------------------------------------\n";
        $corps .= "Demande N° " . $numcommande . "\n";
        $corps .= "Livraison en cours de chiffrage\n";
        $corps .= "Total " . $laCommande["montantTTC"] . " euros\n\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $corps .= "\\Adresse e-mail : " . $email . "\n";
        $corps .= "\nLIVRAISON : \n";
        $corps .= $laLivraison["prenom_l"] . " " . $laLivraison["nom_l"] . "\n";
        if ($laLivraison["raison_l"]) {
            $corps .= $laLivraison["raison_l"] . "\n";
        }
        $corps .= $laLivraison["adr1_l"] . "\n";
        if ($laLivraison["adr2_l"]) {
            $corps .= $laLivraison["adr2_l"] . "\n";
        }
        $corps .= $laLivraison["cp_l"] . " " . $laLivraison["ville_l"] . "\n";
        $corps .= utf8_encode(SelectSimple("pays", "if_pays", "numpays", $laLivraison["numpays_l"], "")) . "\n";
        $corps .= "Tél. " . $laLivraison["tel_l"] . "\n";
        $corps .= "Fax. " . $laLivraison["fax_l"] . "\n";
        $corps .= "\nFACTURATION : \n";
        $corps .= $laLivraison["prenom_f"] . " " . $laLivraison["nom_f"] . "\n";
        if ($laLivraison["raison_f"]) {
            $corps .= $laLivraison["raison_f"] . "\n";
        }
        $corps .= $laLivraison["adr1_f"] . "\n";
        if ($laLivraison["adr2_f"]) {
            $corps .= $laLivraison["adr2_f"] . "\n";
        }
        $corps .= $laLivraison["cp_f"] . " " . $laLivraison["ville_f"] . "\n";
        $corps .= utf8_encode(SelectSimple("pays", "if_pays", "numpays", $laLivraison["numpays_f"], "")) . "\n";
        $corps .= "Tél. " . $laLivraison["tel_f"] . "\n";
        $corps .= "Fax. " . $laLivraison["fax_f"] . "\n";
        $corps .= "\n";
        $corps .= "\nCordialement\n";
        $corps .= "\nBrigitte Laval, IFIP\n";
        $corps .= "Tél. 01 40 04 53 72\n";
        $corps .= "----------------------------------------------------------------------------------\n";
        $recipients = $email;
        $From = "Ifip Institut du Porc<*****@*****.**>";
        $Bcc = "";
        $To = $recipients;
        $ReturnPath = $From;
        $ReplyTo = $From;
        $Subject = "Votre demande de devis IFIP (n°" . $numcommande . ")";
        EnvoiMail($recipients, $From, $Bcc, $To, $ReturnPath, $ReplyTo, $Subject, $corps);
        $recipients = "brigitte.laval@ifip.asso.fr,henriette.cuny@croisix.net";
        //$recipients="*****@*****.**";
        $From = "Ifip Institut du Porc<*****@*****.**>";
        $Bcc = "";
        $To = $recipients;
        $ReturnPath = $From;
        $ReplyTo = $From;
        $Subject = "Copie demande de devis (n°" . $numcommande . ")";
        EnvoiMail($recipients, $From, $Bcc, $To, $ReturnPath, $ReplyTo, $Subject, $corps);
        return true;
    }
}
示例#16
0
     			$laComValide->numcom=$_SESSION['numcom'];
     			$laComValide->numclient=$_SESSION['numclient'];		
     											
     			$clientValide=new Client();
        			$clientValide->numclient=$_SESSION['numclient'];
        			$clientValide->infosClient(); 
     											
     			EnvoiMailCommande($laComValide->numcom,$clientValide->email,'');
     			$laComValide->supprimerCommande();		
     		}*/
 } else {
     // fin if ($auto)
     $laComValide = new Commande();
     $laComValide->numcom = $ref;
     $clientValide = new Client();
     $clientValide->numclient = SelectSimple("numclient", "if_bo_com", "numcom", $ref, "");
     $clientValide->infosClient();
     EnvoiMailCommande($laComValide->numcom, $clientValide->email, '');
     //$laComValide->supprimerCommande();
     $laComValide->erreur = "oui";
     $laComValide->validerCommandeCBErreur();
 }
 //Les infos concernant le panier (total du panier HT, total du panier TTC) sont dans l'objet Panier (classe Panier.inc.php) pour les docs et dans l'objet Commande (classe Commande.inc.php pour les formations) - voir Reglement par chèque ci- dessous
 /* * Achat de docs
 			$lePanier=new Panier();
 			$lePanier->numcom=$_SESSION['numcom'];
 			$lePanier->infosPanier();
 			$montantHT=lePanier->totalHT;
 			$montantTTC=$lePanier->totalTTC;
 			$laCom= new Commande();
 			$laCom->numcom=$_SESSION['numcom'];