'; } } } if ($erreurs != "") { $erreurs = "Mails non valides : " . $erreurs; } return $erreurs; } /////////////// //purpose : configuration des mails a envoyer //utilisé dans pro/questionnaire_confirmation.php //params : /// $maillist : liste de mail /////////////// function save_mails($maillist) { $mailarray = split(";",$maillist); global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; for($i=0;$i 0 : text, 1 :html /// $message: corps du message, format: string /////////////// function SendMail($to,$subject,$from,$reply_to,$content_type,$message) { //construction du header if ($content_type == 1) { $content_type = 'Content-Type: text/html; charset="iso-8859-1"'."\n"; } else { $content_type = 'Content-Type: text/plain; charset="iso-8859-1"'."\n"; } $header = "From: ". $from ."\r\n"; $header .= "Reply-To: " . $reply_to . "\r\n"; $header .= $content_type; //envoi du mail if (mail($to,$subject,$message,$header)) { return true; } else { return false; } } /////////////// //purpose : affiche un graph sous forme d'histogramme; //params : /// $width = entier, largeur du graph; /// $height = entier, hauteur du graph; /// $r,$g,$b = entiers (0,255), valeurs rgb de la couleur des barres; /// $valeurs = array d'entiers, valeurs a afficher; /// $legende = NULL ou array de string, legendes en abscisse /// !!!!!si non nul, legende DOIT avoir le meme nombre d'entrées que valeurs!!!!!!! /////////////// function Affiche_Graph($width,$height,$r,$g,$b,$valeurs,$legende) { $adresse = "../images/graph_create.php?"; $adresse = $adresse . "width=" . urlencode(serialize($width)); $adresse = $adresse . "&height=" . urlencode(serialize($height)); $adresse = $adresse . "&r=" . urlencode(serialize($r)); $adresse = $adresse . "&g=" . urlencode(serialize($g)); $adresse = $adresse . "&b=" . urlencode(serialize($b)); $adresse = $adresse . "&valeurs=" . urlencode(serialize($valeurs)); $adresse = $adresse . "&legende=" . urlencode(serialize($legende)); echo ""; } function Affiche_Graph_visite($width,$height,$r,$g,$b,$valeurs,$legende) { $adresse = "../images/graph_create_visite.php?"; $adresse = $adresse . "width=" . urlencode(serialize($width)); $adresse = $adresse . "&height=" . urlencode(serialize($height)); $adresse = $adresse . "&r=" . urlencode(serialize($r)); $adresse = $adresse . "&g=" . urlencode(serialize($g)); $adresse = $adresse . "&b=" . urlencode(serialize($b)); $adresse = $adresse . "&valeurs=" . urlencode(serialize($valeurs)); $adresse = $adresse . "&legende=" . urlencode(serialize($legende)); echo ""; } //a retravailler une fois les bases remplies /////////////// //purpose : configuration des mails a envoyer //utilisé dans pro/questionnaire_confirmation.php //params : /// $maillist : liste de mail /////////////// function get_histoForGraph($query) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $result = mysql_query($query, $connNote) or die(mysql_error()); $i = 0; while($row_result = mysql_fetch_assoc($result)) { $tmpresult[$i] = intval($row_result['nbr']); $i++; } return $tmpresult; } ////// genere mot de passe aléatoire function setRand($length) { $length = (int)$length; $this->string = ''; $letters = 'aAbBCDeEFgGhHJKLmMnNpPqQRsStTuVwWXYZz2345679'; $number = strlen($letters); for($i = 0; $i < $length; $i++) { $this->string .= $letters{mt_rand(0, $number - 1)}; } return $this->string; } /////récupération IDmarchand depuis variable de session function getMarchandidFromSessvar() { /*global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); if (isset($_SESSION['MM_Username'])) { $query = "SELECT MA_MARCHAND_ID FROM marchand, contact WHERE MA_CONTACT_ID = CO_CONTACT_ID AND CO_CONTACT_EMAIL = '" . $_SESSION['MM_Username'] . "'"; $result = mysql_query($query, $connNote) or die(mysql_error()); $rowresult = mysql_fetch_assoc($result); return $rowresult['MA_MARCHAND_ID']; } */ return $_SESSION['MM_UserID']; } /////Fonctions de calculs de notation function getMarchandGlobalnote($marchandid) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $query = "SELECT AVG(LR_LISTEREPONSE_NOTE) as note FROM listereponse ,reponse WHERE `RE_MARCHAND_ID` = " . $marchandid . " AND `LR_REPONSE_ID` = `RE_REPONSE_ID` AND `LR_LISTEREPONSE_NOTE` != 6"; $result = mysql_query($query, $connNote) or die(mysql_error()); $row_result = mysql_fetch_assoc($result); return $row_result['note']; } function getMarchandGlobalRubriquenote($marchandid,$rubriqueid) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $query = "SELECT AVG(LR_LISTEREPONSE_NOTE) as note FROM listereponse ,reponse, question WHERE `RE_MARCHAND_ID` = " . $marchandid . " AND `LR_REPONSE_ID` = `RE_REPONSE_ID` AND `QE_QUESTION_ID` = `LR_QUESTION_ID` AND `QE_RUBRIQUE_ID` = " . $rubriqueid . " AND `LR_LISTEREPONSE_NOTE` != 6"; $result = mysql_query($query, $connNote) or die(mysql_error()); $row_result = mysql_fetch_assoc($result); return $row_result['note']; } function getMarchandGlobalQuestionnote($marchandid,$questionid) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $query = "SELECT AVG(LR_LISTEREPONSE_NOTE) as note FROM listereponse ,reponse WHERE `RE_MARCHAND_ID` = " . $marchandid . " AND `LR_REPONSE_ID` = `RE_REPONSE_ID` AND `LR_QUESTION_ID` = " . $questionid . " AND `LR_LISTEREPONSE_NOTE` != 6"; $result = mysql_query($query, $connNote) or die(mysql_error()); $row_result = mysql_fetch_assoc($result); return $row_result['note']; } function getQuestionnaireNote($questionnaireID) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $query = "SELECT AVG(LR_LISTEREPONSE_NOTE) as note FROM listereponse ,reponse WHERE `RE_QUESTIONNAIRE_ID` = " . $questionnaireID . " AND `LR_REPONSE_ID` = `RE_REPONSE_ID` AND `LR_LISTEREPONSE_NOTE` != 6 GROUP BY LR_QUESTION_ID"; $result = mysql_query($query, $connNote) or die(mysql_error()); $row_result = mysql_fetch_assoc($result); return $row_result['note']; } function getQuestionnaireRubriqueNote($questionnaireID,$rubriqueid) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $query = "SELECT AVG(LR_LISTEREPONSE_NOTE) as note FROM listereponse ,reponse, question WHERE `RE_QUESTIONNAIRE_ID` = " . $questionnaireID . " AND `LR_REPONSE_ID` = `RE_REPONSE_ID` AND `QE_QUESTION_ID` = `LR_QUESTION_ID` AND `QE_RUBRIQUE_ID` = " . $rubriqueid . " AND `LR_LISTEREPONSE_NOTE` != 6 GROUP BY LR_QUESTION_ID"; $result = mysql_query($query, $connNote) or die(mysql_error()); $row_result = mysql_fetch_assoc($result); return $row_result['note']; } function getQuestionnaireQuestionNote($questionnaireID,$questionid) { global $hostname_connNote, $database_connNote ,$username_connNote ,$password_connNote,$connNote; mysql_select_db($database_connNote, $connNote); $query = "SELECT AVG(LR_LISTEREPONSE_NOTE) as note FROM listereponse ,reponse WHERE `RE_QUESTIONNAIRE_ID` = " . $questionnaireID . " AND `LR_REPONSE_ID` = `RE_REPONSE_ID` AND `LR_QUESTION_ID` = " . $questionid . " AND `LR_LISTEREPONSE_NOTE` != 6 GROUP BY LR_QUESTION_ID"; $result = mysql_query($query, $connNote) or die(mysql_error()); $row_result = mysql_fetch_assoc($result); return $row_result['note']; } ?> NOTE COMPTA choisir son expert comptable
 

Moteur de recherche :
>>Recherche avancée

 Première page - Page précédente -