当前位置: 首页>>代码示例>>PHP>>正文


PHP eko函数代码示例

本文整理汇总了PHP中eko函数的典型用法代码示例。如果您正苦于以下问题:PHP eko函数的具体用法?PHP eko怎么用?PHP eko使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了eko函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Init_NetForce_Data_Base

function Init_NetForce_Data_Base($formx)
{
    global $session;
    $id_instance = $formx->getIdInstance();
    //eko ($id_instance);
    $idu = $formx->getVar('ids');
    //eko ($idu);
    $idpatient = $session->getNavi(2);
    //eko ($idpatient);
    $req = new clResultQuery();
    $param = array();
    $param['cw'] = "where idpatient='" . $idpatient . "'";
    $param['table'] = PPRESENTS;
    $res = $req->Execute("Fichier", "getPatients", $param, "ResultQuery");
    //$idpatient = $res['idpatient'][0] ;
    //eko ( $res ) ;
    $param['idu'] = $idu;
    $res = $req->Execute("Fichier", "netForceDataBase_getAllFormulaire_ids", $param, "ResultQuery");
    eko($res[INDIC_SVC][15]);
    $liste = array();
    for ($i = 0; $i <= $res[INDIC_SVC][2]; $i++) {
        $liste[utf8_encode($res["id_instance"][$i])] = $res["dt_creation"][$i] . " --- " . $res["libelle"][$i];
    }
    //header ( 'Location:index.php?navi=TGlzdGVfUHJlc2VudHM=' ) ;
    eko($liste);
    return $liste;
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:27,代码来源:Init_NetForce_Data_Base.php

示例2: getOption

 function getOption($nom)
 {
     if (DEBUGOPTION) {
         eko("<br />Option appelée : \"{$nom}\", valeur : \"" . $this->options["{$nom}"] . "\"<br />");
     }
     return isset($this->options["{$nom}"]) ? $this->options["{$nom}"] : '';
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:7,代码来源:XhamOptions.php

示例3: myErrorHandlerXhamV1

function myErrorHandlerXhamV1($errno, $errstr, $errfile, $errline, $jambon)
{
    global $errs;
    //si dans bloc sans erreurs
    if ($errs->inCatch) {
        return;
    }
    switch ($errno) {
        case E_PARSE:
            $errs->addErreur("parse error");
            $errs->end();
            break;
        case E_ERROR:
            $errs->addErreur("<b>PHP ERREUR</b> [{$errno}] {$errstrbr} />Erreur fatale à la ligne {$errline} dans le fichier {$errfile}");
            break;
        case E_WARNING:
            $errs->whereAmI();
            $errs->addErreur("<b>PHP ALERTE</b> [{$errno}] {$errstr} in file {$errfile} at line {$errline}<br />\n");
            break;
        case E_NOTICE:
            if (!defined("NONOTICE") or !NONOTICE) {
                eko("<b>NOTICE</b> [{$errno}] {$errstr} in file {$errfile} at line {$errline}<br />\n");
            }
            break;
        case 2048:
            //$errs->addErreur ("Non-static method should not be called statically (Avertissement non bloquant que vous n'auriez pas si DB testait les releases de php en dev avant de les mettre en prod.)") ;
            $errs->addErreur("Type d'erreur inconnu : [{$errno}] {$errstr} in file {$errfile} at line {$errline}<br />\n");
            break;
        default:
            $errs->addErreur("Type d'erreur inconnu : [{$errno}] {$errstr} in file {$errfile} at line {$errline}<br />\n");
            break;
    }
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:33,代码来源:clErreurs.php

示例4: Init_Dossier_AEV_Situation_33

function Init_Dossier_AEV_Situation_33($formx)
{
    // Efface les anciens fichiers Formulaire_AEV
    //$AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));
    //$formx->setVar('L_AEV_Situation',$situation);
    $ids = $formx->getIDS();
    $id_instance = $formx->getIdInstance();
    $idu = $formx->getVar('ids');
    eko($ids);
    eko($id_instance);
    eko($idu);
    // On va supprimer tous les fichiers Dossier_Colectomie_Periode_P1 de la table formx
    // $requete=new clRequete(BDD,TABLEFORMX,$param);
    // $sql=$requete->delRecord("idformx='Dossier_Colectomie_Periode_P1' and ids='".$ids."'");
    //$param[nomitem] = addslashes(stripslashes($this->getMedecin ( ))) ;
    //$req = new clResultQuery ;
    //$res = $req -> Execute ( "Fichier", "getMatriculeMedecin", $param, "ResultQuery" ) ;
    $item = utf8_decode($formx->getVar('L_AEV_Date_Accident_Situation_33'));
    if ($item == "") {
        $formx->setVar('L_AEV_Date_Accident_Situation_33', date("d") . "-" . date("m") . "-" . date("Y"));
    }
    $item = utf8_decode($formx->getVar('L_AEV_Heure_Accident_Situation_33'));
    if ($item == "") {
        $formx->setVar('L_AEV_Heure_Accident_Situation_33', date("H") . ":" . date("i"));
    }
    $item = utf8_decode($formx->getVar('L_AEV_Complement_Situation_33'));
    if ($item == "") {
        $formx->setVar('L_AEV_Complement_Situation_33', "");
    }
    return "O";
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:31,代码来源:Init_Dossier_AEV_Situation_33.php

示例5: Test_AEV_Situation_6

function Test_AEV_Situation_6($formx)
{
    // On determine dans quelle situation on se trouve
    $AEV_Type = utf8_decode($formx->getFormVar('AEV_Situation'));
    if ((int) $AEV_Type == 6) {
        eko("1");
        return true;
    } else {
        eko("0");
        return false;
    }
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:12,代码来源:Test_AEV_Situation_6.php

示例6: getAffichage

 function getAffichage()
 {
     global $session;
     global $nbRequetes;
     global $tpRequetes;
     if ($session->getUid() == "" or $session->getUid() == "") {
         $messagerie = new clMessagerie();
         //eko ( "Tu es dborel !" ) ;
         $this->af .= $messagerie->getAffichage();
     }
     if (DEBUGSQL) {
         eko("{$nbRequetes} requêtes en " . $tpRequetes . "s");
     }
     return $this->af;
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:15,代码来源:clNavigation.php

示例7: Calcul_IMC

function Calcul_IMC($formx)
{
    $poids = utf8_decode($formx->getFormVar('Val_ESIGNES_Poids'));
    $taille = utf8_decode($formx->getFormVar('Val_ESIGNES_Taille'));
    eko($taille);
    eko($poids);
    $taille = str_replace(",", ".", $taille);
    $poids = str_replace(",", ".", $poids);
    $taille = str_replace("m", ".", $taille);
    eko($taille);
    eko($poids);
    if ($taille > 0 && $poids > 0) {
        return number_format($poids / ($taille * $taille), 2);
    }
    return "0";
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:16,代码来源:Calcul_IMC.php

示例8: Test_Cond_F_Formulaire_Radio_Partie_Radio

function Test_Cond_F_Formulaire_Radio_Partie_Radio($formx)
{
    $Val_F_RADIO_CoteDroit = utf8_decode($formx->getFormVar('Val_F_RADIO_CoteDroit'));
    $Val_F_RADIO_CoteGauche = utf8_decode($formx->getFormVar('Val_F_RADIO_CoteGauche'));
    $Val_F_RADIO_Centre = utf8_decode($formx->getFormVar('Val_F_RADIO_Centre'));
    $Val = utf8_decode($formx->getFormVar('Val_F_RADIO_Test_Validation'));
    eko($Val_F_RADIO_CoteDroit);
    eko($Val_F_RADIO_CoteGauche);
    eko($Val_F_RADIO_Centre);
    eko("id=" . $Val);
    if (strcmp($Val_F_RADIO_CoteDroit, "") == 0 and strcmp($Val_F_RADIO_CoteGauche, "") == 0 and strcmp($Val_F_RADIO_Centre, "") == 0) {
        $formx->setVar('L_Val_F_RADIO_Test_Validation', "pas ok");
        return utf8_encode("pas ok");
    } else {
        $formx->setVar('L_Val_F_RADIO_Test_Validation', "ok");
        return utf8_encode("ok");
    }
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:18,代码来源:Test_Cond_F_Formulaire_Radio_Partie_Radio.php

示例9: SendMessage

 public function SendMessage($message)
 {
     $start = chr(11);
     $stop = chr(28);
     $stop1 = chr(13);
     $crlf = chr(13);
     $message = $start . $message . $stop . $stop1;
     if (($socket = socket_create(AF_INET, SOCK_STREAM, 0)) == false) {
         $result = "NACK-0-" . socket_strerror(socket_last_error());
         return $result;
     }
     $this->SetNetworkParams($socket, $this->socktimeout);
     if (($result = socket_connect($socket, $this->host, $this->port)) == false) {
         $result = "NACK-2-" . socket_strerror(socket_last_error());
         return $result;
     }
     if (socket_write($socket, $message, strlen($message)) == false) {
         $result = "NACK-3-" . socket_strerror(socket_last_error());
         return $result;
     }
     if (($result = socket_read($socket, 1024)) == false) {
         $result = "NACK-4-" . socket_strerror(socket_last_error());
         eko($result);
         return $result;
     }
     // eko ( $result ) ;
     socket_shutdown($socket, 2);
     socket_close($socket);
     $result = trim($result);
     $result = substr($result, 0, strlen($result) - 1);
     $pos = strpos($result, $this->wACK, 0);
     if ($pos == 0) {
         $result = "NACK";
     } else {
         $result = "ACK";
     }
     return $result;
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:38,代码来源:cRPC.php

示例10: genMenu

 function genMenu()
 {
     global $xham;
     $this->menuAuth = $this->getFormulaire();
     $menu = "";
     $this->genTabMenu();
     $tab = $this->tabMenu['menu'];
     while (list($key, $val) = each($tab)) {
         $faux = 0;
         if ($this->resMenu['noption'][$val]) {
             if ($xham->getOption($this->resMenu['noption'][$val]) != $this->resMenu['valeur'][$val]) {
                 eko("Option fausse");
                 $faux = 1;
             }
         }
         //Modif EC pour recherche du droit d'écriture de type lib_droit:droit
         $tabReg = array();
         if (ereg('^(.*):(.*)$', $this->resMenu['droit'][$val], $tabReg)) {
             $libdroit = $tabReg[1];
             $droit = $tabReg[2];
         } else {
             $libdroit = $this->resMenu['droit'][$val];
             $droit = 'r';
         }
         if (!$xham->getDroit($libdroit, $droit)) {
             $faux = 1;
         }
         if ($this->resMenu['libelle'][$val] == "Accueil") {
             $faux = 0;
         }
         if (!$faux) {
             $menu .= $this->genItem($this->resMenu['libelle'][$val], $this->resMenu['cle'][$val], $this->resMenu['idunique'][$val]);
         }
     }
     // On renvoie le menu ainsi construit.
     return $menu;
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:37,代码来源:XhamMenu.php

示例11: uoiRecord

 function uoiRecord($cwi = 'jambon')
 {
     global $xham;
     $debut = $this->temps();
     $tmp = explode('=', $cwi);
     $cle = trim($tmp[0]);
     $data = $this->formatData();
     $requete_test = "select {$cle} from " . $this->table . " where " . $cwi;
     //eko($requete_test);
     //$result = @mysql_select_db ( $value_config[db] ) ;
     $res = mysql_query($requete_test);
     $nb_occ = mysql_num_rows($res);
     if ($nb_occ > 0) {
         if ($cwi != "") {
             $cw = " where {$cwi}";
         }
         reset($data);
         if (!isset($set)) {
             $set = '';
         }
         while (list($key, $val) = each($data)) {
             $set .= $key . "=" . $val . " ,";
         }
         $set = substr($set, 0, strlen($set) - 1);
         $update = "update " . $this->table . " set " . $set . $cw;
         //print "<br/>".$update."<br/>" ;
         //mysql ( $this->db, $update ) ;
         mysql_query($update);
         $sql['errno'] = mysql_errno();
         $sql['error'] = mysql_error();
         $sql['affected_rows'] = mysql_affected_rows();
         $sql['requete'] = $update;
         //print $update ;
     } else {
         $tmp = explode('=', $cwi);
         $tmp[0] = trim($tmp[0]);
         $tmp[1] = trim($tmp[1]);
         if (!isset($data[$tmp[0]])) {
             $data[$tmp[0]] = $tmp[1];
         }
         reset($data);
         //print afftab($data);
         $values = '';
         $cols = '';
         while (list($key, $val) = each($data)) {
             $cols .= $key . ",";
             $values .= $val . ",";
         }
         $cols = substr($cols, 0, strlen($cols) - 1);
         $values = substr($values, 0, strlen($values) - 1);
         $insertion = "insert into " . $this->table . "(" . $cols . ") values (" . $values . ")";
         //print "<br/>".$insertion."<br/>" ;
         //mysql ( $this->db, $insertion ) ;
         mysql_query($insertion);
         $sql['errno'] = mysql_errno();
         $sql['error'] = mysql_error();
         $sql['affected_rows'] = mysql_affected_rows();
         $sql['requete'] = $insertion;
         if ($sql['error'] and isset($xham)) {
             $xham->addErreur("clRequete : " . $sql['error'] . "<br/>Requête : " . $sql['requete']);
         }
     }
     $fin = $this->temps();
     $total = $fin - $debut;
     $total = substr($total, 0, 8);
     if (DEBUGSQL) {
         eko("Temps d'exécution de la requête : {$total} ({$requete})");
     }
     $xham->nbRequetes++;
     $xham->tpRequetes += $total;
     return $sql;
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:72,代码来源:XhamRequete.php

示例12: Init_Formulaire_AEV

function Init_Formulaire_AEV($formx)
{
    // On determine dans quelle situation on se trouve
    $AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));
    $AEV_Exposition_Sang = utf8_decode($formx->getFormVar('AEV_Exposition_Sang'));
    $AEV_Exposition_Sexuelle = utf8_decode($formx->getFormVar('AEV_Exposition_Sexuelle'));
    $AEV_Exposition_Drogue = utf8_decode($formx->getFormVar('AEV_Exposition_Drogue'));
    $AEV_Source = utf8_decode($formx->getFormVar('AEV_Source'));
    //eko($AEV_Type);
    //eko($AEV_Exposition_Sang);
    //eko($AEV_Exposition_Sexuelle);
    //eko($AEV_Exposition_Drogue);
    eko($AEV_Source);
    switch ($AEV_Type) {
        case "Expositions au sang":
            if ($AEV_Exposition_Sang == "Important") {
                if ($AEV_Source == "Infecté par le VIH") {
                    $situation = 1;
                }
                if ($AEV_Source == "Infecté par le VHC") {
                    $situation = 10;
                }
                if ($AEV_Source == "Infecté par le VIH et VHC") {
                    $situation = 19;
                }
                if ($AEV_Source == "De sérologie inconnue") {
                    $situation = 28;
                }
            }
            if ($AEV_Exposition_Sang == "Intermédiaire") {
                if ($AEV_Source == "Infecté par le VIH") {
                    $situation = 2;
                }
                if ($AEV_Source == "Infecté par le VHC") {
                    $situation = 11;
                }
                if ($AEV_Source == "Infecté par le VIH et VHC") {
                    $situation = 20;
                }
                if ($AEV_Source == "De sérologie inconnue") {
                    $situation = 29;
                }
            }
            if ($AEV_Exposition_Sang == "Minime") {
                if ($AEV_Source == "Infecté par le VIH") {
                    $situation = 3;
                }
                if ($AEV_Source == "Infecté par le VHC") {
                    $situation = 12;
                }
                if ($AEV_Source == "Infecté par le VIH et VHC") {
                    $situation = 21;
                }
                if ($AEV_Source == "De sérologie inconnue") {
                    $situation = 30;
                }
            }
            $dossier = $AEV_Type . " Risque " . $AEV_Exposition_Sang . " " . $AEV_Source;
            break;
        case "Expositions sexuelles":
            if ($AEV_Exposition_Sexuelle == "Rapports anaux") {
                if ($AEV_Source == "Infecté par le VIH") {
                    $situation = 4;
                }
                if ($AEV_Source == "Infecté par le VHC") {
                    $situation = 13;
                }
                if ($AEV_Source == "Infecté par le VIH et VHC") {
                    $situation = 22;
                }
                if ($AEV_Source == "De sérologie inconnue") {
                    $situation = 31;
                }
            }
            if ($AEV_Exposition_Sexuelle == "Rapports vaginaux") {
                if ($AEV_Source == "Infecté par le VIH") {
                    $situation = 5;
                }
                if ($AEV_Source == "Infecté par le VHC") {
                    $situation = 14;
                }
                if ($AEV_Source == "Infecté par le VIH et VHC") {
                    $situation = 23;
                }
                if ($AEV_Source == "De sérologie inconnue") {
                    $situation = 32;
                }
            }
            if ($AEV_Exposition_Sexuelle == "Fellation réceptive avec éjaculation") {
                if ($AEV_Source == "Infecté par le VIH") {
                    $situation = 6;
                }
                if ($AEV_Source == "Infecté par le VHC") {
                    $situation = 15;
                }
                if ($AEV_Source == "Infecté par le VIH et VHC") {
                    $situation = 24;
                }
                if ($AEV_Source == "De sérologie inconnue") {
                    $situation = 33;
//.........这里部分代码省略.........
开发者ID:jeromecc,项目名称:tuv2,代码行数:101,代码来源:Init_Formulaire_AEV.php

示例13: filtreRecherche


//.........这里部分代码省略.........
       $this->filtre = "WHERE nom LIKE '".$_SESSION['valeurNom']."%' AND dt_sortie LIKE '".$dateVal->getDate("Y-m-d")."%'" ;
     } elseif ( $_SESSION['valeurNom'] ) {
       $this->filtre = "WHERE nom LIKE '".$_SESSION['valeurNom']."%'" ;
     } elseif ( $_SESSION['valeurDate'] ) {
       $this->filtre = "WHERE dt_sortie LIKE '".$dateVal->getDate("Y-m-d")."%'" ;
     } else {
       $this->message = "<br /><br /><font color=\"red\">Aucun filtre n'a été saisi. Aucun résultat ne sera renvoyé.</font>" ;
       $this->filtre = "WHERE idpatient<0" ;
     } 
     */
     $this->filtre = "WHERE ";
     if ($_SESSION['valeurILP']) {
         $this->filtre .= " (ilp='" . $_SESSION['valeurILP'] . "' OR idu='" . $_SESSION['valeurILP'] . "') ";
     }
     if ($_SESSION['valeurSej']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " nsej='" . $_SESSION['valeurSej'] . "' ";
         } else {
             $this->filtre .= " AND nsej='" . $_SESSION['valeurSej'] . "' ";
         }
     }
     if ($_SESSION['valeurIDP']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " idpatient='" . $_SESSION['valeurIDP'] . "' ";
         } else {
             $this->filtre .= " AND idpatient='" . $_SESSION['valeurIDP'] . "' ";
         }
     }
     if ($_SESSION['valeurNom']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " (nom LIKE '" . $_SESSION['valeurNom'] . "%' OR prenom LIKE '" . $_SESSION['valeurNom'] . "%') ";
         } else {
             $this->filtre .= " AND (nom LIKE '" . $_SESSION['valeurNom'] . "%' OR prenom LIKE '" . $_SESSION['valeurNom'] . "%') ";
         }
     }
     if ($_SESSION['valeurDate']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " dt_sortie LIKE '" . $dateVal->getDate("Y-m-d") . "%' ";
         } else {
             $this->filtre .= " AND dt_sortie LIKE '" . $dateVal->getDate("Y-m-d") . "%' ";
         }
     }
     if ($_SESSION['valeurPrenom']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " prenom LIKE '" . $_SESSION['valeurPrenom'] . "%' ";
         } else {
             $this->filtre .= " AND prenom LIKE '" . $_SESSION['valeurPrenom'] . "%' ";
         }
     }
     if ($_SESSION['valeurMedecin']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " medecin_urgences LIKE '" . $_SESSION['valeurMedecin'] . "%' ";
         } else {
             $this->filtre .= " AND medecin_urgences LIKE '" . $_SESSION['valeurMedecin'] . "%' ";
         }
     }
     if ($_SESSION['valeurIDE']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " ide LIKE '" . $_SESSION['valeurIDE'] . "%' ";
         } else {
             $this->filtre .= " AND ide LIKE '" . $_SESSION['valeurIDE'] . "%' ";
         }
     }
     if ($_SESSION['valeurDiag']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " diagnostic_libelle LIKE '" . $_SESSION['valeurDiag'] . "%' ";
         } else {
             $this->filtre .= " AND diagnostic_libelle LIKE '" . $_SESSION['valeurDiag'] . "%' ";
         }
     }
     if ($_SESSION['valeurDateAdm']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " dt_admission LIKE '" . $dateAdmVal->getDate("Y-m-d") . "%' ";
         } else {
             $this->filtre .= " AND dt_admission LIKE '" . $dateAdmVal->getDate("Y-m-d") . "%' ";
         }
     }
     if ($_SESSION['valeurDestConf']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " dest_attendue='" . $_SESSION['valeurDestConf'] . "' ";
         } else {
             $this->filtre .= " AND dest_attendue='" . $_SESSION['valeurDestConf'] . "' ";
         }
     }
     if ($_SESSION['valeurFormulaire']) {
         if ($this->filtre == "WHERE ") {
             $this->filtre .= " idformx='" . $_SESSION['valeurFormulaire'] . "' AND ids=idu ";
         } else {
             $this->filtre .= " AND idformx='" . $_SESSION['valeurFormulaire'] . "' AND ids=idu ";
         }
     }
     if ($this->filtre == "WHERE ") {
         $this->message = "<br /><br /><font color=\"red\">Aucun filtre n'a été saisi. Aucun résultat ne sera renvoyé.</font>";
         $this->filtre = "WHERE idpatient<0";
     }
     eko($this->filtre);
     $mod->MxText("message", $this->message);
     // Récupération du code HTML généré.
     $this->af .= $mod->MxWrite("1");
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:101,代码来源:clListesPatients.php

示例14: sendXham

 function sendXham()
 {
     global $options;
     $mime = "";
     // parametres optionnels
     //if ( $options->getOption('SMTP_BCC') )
     //  	$mime .= "cc: ".$options->getOption('SMTP_BCC')."\n" ;
     //$mime .=  "To: ".$this->to. "\n";
     if (!empty($this->headers)) {
         $mime .= $this->headers . "\n";
     }
     if (!empty($this->body)) {
         $this->attach($this->body, "", "text/plain");
     }
     // entete MIME
     if ($options->getOption('SMTP_BCC')) {
         $mime .= "CC: " . $options->getOption('SMTP_BCC') . "\n";
     }
     if (!empty($this->from)) {
         $mime .= "From: " . $this->from . "\n";
     }
     $mime .= "MIME-Version: 1.0\n" . $this->build_multipart();
     //$mime  = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n";
     eko($mime);
     // Envoi du mail.
     if ($options->getOption('SMTP_Type') == 'autreAvecAuth') {
         $auth = 1;
     } else {
         $auth = 0;
     }
     if ($options->getOption('SMTP_Type') == 'localhost' or !$options->getOption('SMTP_Type')) {
         return mail($this->to, $this->subject, "", $mime);
     } else {
         //eko ( $this->to ) ;
         return sock_mail($auth, $this->to, $this->subject, $this->body, $mime, Erreurs_MailApp);
     }
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:37,代码来源:mime_mail.php

示例15: tarifsNGAP

 function tarifsNGAP()
 {
     global $session;
     //On a lancer le rapatriement des tarifs depuis Pastel
     if ($_POST['imgCalcul_x'] and $session->getDroit("CCAM_TarifsNGAP", "w")) {
         $req = new clResultQuery();
         $res = $req->Execute("Fichier", "Tarifs_getTarifNGAP", array(), "ResultQuery");
         eko($res);
         $mail = "";
         for ($i = 0; isset($res[LC][$i]); $i++) {
             $lc = $res[LC][$i];
             unset($param);
             //if ($res[TARIF][$i]!="0"){ // code de Christophe Boulet
             if ($res[TARIF][$i] >= 0) {
                 // modification François Derock
                 $param[tarif] = str_replace(",", ".", $res[TARIF][$i]);
                 $req = new clResultQuery();
                 unset($paramRq);
                 $paramRq[cw] = "lc='{$lc}'";
                 $res2 = $req->Execute("Fichier", "CCAM_getLC", $paramRq, "ResultQuery");
                 //eko($res2[INDIC_SVC]);
                 if ($res2[INDIC_SVC][2]) {
                     $requete = new clRequete(CCAM_BDD, "ccam_lettres_cle", $param);
                     $retourRequete = $requete->updRecord("lc='{$lc}'");
                 } else {
                     $param[lc] = $param[lcNat] = $lc;
                     $requete = new clRequete(CCAM_BDD, "ccam_lettres_cle", $param);
                     $retourRequete = $requete->addRecord();
                 }
             } else {
                 $mail .= "{$lc}, ";
             }
         }
         if ($mail) {
             $mail = substr($mail, 0, -2);
             $content_type = "Content-Type: text/html; charset=\"iso-8859-1\"";
             $head = "From: " . Erreurs_MailApp . "\n" . $content_type . "\n";
             $sujetMail = "Terminal des urgences : Mise à jour des tarifs des lettres-clé NGAP";
             $txtMsg = "<b>Anomalie : </b>La mise à jour des tarifs (source PASTEL) renvoit '0' pour les lettres-clé suivantes : {$mail}<br>\r\n\t\t\t==> Les tarifs n'ont pas été mis à jour pour ces lettres-clés<p>\r\n\t\t\t<i>Ce mail est envoyé automatiquement</i>";
             mail(Erreurs_Mail . "," . Erreurs_Mail_WebMaster, $sujetMail, $txtMsg, $head);
             //
             $retourInfos[erreur] = "Certains tarifs sont à '0' dans PASTEL. Un mail de synthèse a été envoyé. Leur mise à jour a été annulée.";
         } else {
             $content_type = "Content-Type: text/html; charset=\"iso-8859-1\"";
             $head = "From: " . Erreurs_MailApp . "\n" . $content_type . "\n";
             $sujetMail = "Terminal des urgences : Mise à jour des tarifs des lettres-clé NGAP";
             $txtMsg = "Les correspondances nationales et les tarifs ont été mis à jour à partir des données PASTEL<p>\r\n\t\t<i>Ce mail est envoyé automatiquement</i>";
             mail(Erreurs_Mail . "," . Erreurs_Mail_WebMaster, $sujetMail, $txtMsg, $head);
             //
             $retourInfos[infos] = "Les correspondances nationales et les tarifs ont été mis à jour à partir des données PASTEL";
         }
     }
     //On a validé les modifications
     if ($_POST['imgValider_x'] and $session->getDroit("CCAM_TarifsNGAP", "w")) {
         $req = new clResultQuery();
         unset($paramRq);
         $paramRq[cw] = "lc!=''";
         $res = $req->Execute("Fichier", "CCAM_getLC", $paramRq, "ResultQuery");
         //eko($res[INDIC_SVC]);
         for ($i = 0; isset($res[lc][$i]); $i++) {
             $lc = $res[lc][$i];
             $varLC = "LC_" . $lc;
             $tarifLC = "tarif_" . $lc;
             unset($param);
             $param[lcNat] = $_POST[$varLC];
             $param[tarif] = str_replace(",", ".", $_POST[$tarifLC]);
             $requete = new clRequete(CCAM_BDD, "ccam_lettres_cle", $param);
             $retourRequete = $requete->updRecord("lc='{$lc}'");
         }
         $retourInfos[infos] = "Les correspondances nationales et les tarifs ont été modifiés";
     }
     // Appel du template
     $mod = new ModeliXe("CCAM_TarifsNGAP.mxt");
     $mod->SetModeliXe();
     if ($retourInfos[infos]) {
         $this->infos = $retourInfos[infos];
     } elseif ($retourInfos[erreur]) {
         $this->erreurs = $retourInfos[erreur];
     }
     if ($session->getDroit("CCAM_TarifsNGAP", "w")) {
         if (!$_POST['imgModifier_x']) {
             $mod->MxFormField("modifier.imgModifier", "image", "imgModifier", "", "src=\"" . URLIMG . "modifier2.gif\" align=\"abscenter\" \r\n\t\t\ttitle=\"Modifier les correspondances nationales et les tarifs\"");
             $mod->MxFormField("maj.imgCalcul", "image", "imgCalcul", "", "src=\"" . URLIMG . "calculer.gif\" align=\"abscenter\" \r\n\t\t\ttitle=\"Rapatrier les tarifs depuis PASTEL\"");
             $mod->MxBloc("valider", "delete");
         } else {
             $mod->MxFormField("valider.imgValider", "image", "imgValider", "", "src=\"" . URLIMG . "Ok.gif\" align=\"abscenter\" \r\n\t\t\ttitle=\"Valider les modifications\"");
             $mod->MxFormField("valider.imgAnnuler", "image", "imgAnnuler", "", "src=\"" . URLIMG . "annuler2.gif\" align=\"abscenter\" \r\n\t\t\ttitle=\"Annuler les modifications\"");
             $mod->MxBloc("maj", "delete");
             $mod->MxBloc("modifier", "delete");
         }
     } else {
         $mod->MxBloc("modifier", "delete");
         $mod->MxBloc("valider", "delete");
         $mod->MxBloc("maj", "delete");
     }
     $req = new clResultQuery();
     unset($paramRq);
     $paramRq[cw] = "lc!=''";
     $res = $req->Execute("Fichier", "CCAM_getLC", $paramRq, "ResultQuery");
     //eko($res[INDIC_SVC]);
//.........这里部分代码省略.........
开发者ID:jeromecc,项目名称:tuv2,代码行数:101,代码来源:clCCAMTarifsNGAP.php


注:本文中的eko函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。