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


PHP Client::existe方法代码示例

本文整理汇总了PHP中Client::existe方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::existe方法的具体用法?PHP Client::existe怎么用?PHP Client::existe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Client的用法示例。


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

示例1: modifier

function modifier($raison, $entreprise, $siret, $intracom, $nom, $prenom, $adresse1, $adresse2, $adresse3, $cpostal, $ville, $pays, $telfixe, $telport, $email, $pourcentage, $ref, $type)
{
    $client = new Client();
    $client->charger_ref($ref);
    $client->pourcentage = $pourcentage;
    $client->raison = $raison;
    $client->entreprise = $entreprise;
    $client->siret = $siret;
    $client->intracom = $intracom;
    $client->nom = $nom;
    $client->prenom = $prenom;
    $client->adresse1 = $adresse1;
    $client->adresse2 = $adresse2;
    $client->adresse3 = $adresse3;
    $client->cpostal = $cpostal;
    $client->ville = $ville;
    $client->pays = $pays;
    $client->telfixe = $telfixe;
    $client->telport = $telport;
    $client->pourcentage = $pourcentage;
    if ($type != "") {
        $client->type = 1;
    } else {
        $client->type = 0;
    }
    if (filter_var($email, FILTER_VALIDATE_EMAIL) && $email != $client->email && !$client->existe($email)) {
        $client->email = strip_tags($email);
    }
    $client->maj();
    ActionsModules::instance()->appel_module("modcli", $client);
    redirige("client_visualiser.php?ref=" . $ref);
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:32,代码来源:client_visualiser.php

示例2: Client

 $client->pourcentage = strip_tags($pourcentage);
 if ($type == "on") {
     $client->type = 1;
 } else {
     $client->type = 0;
 }
 $client->lang = ActionsLang::instance()->get_id_langue_courante();
 $parrain = new Client();
 if ($parrain->charger_ref($id_parrain)) {
     $client->parrain = $parrain->id;
 } else {
     $parrain = 0;
 }
 $client->motdepasse = genpass(8);
 $pass = $client->motdepasse;
 if ($client->raison != "" && $client->prenom != "" && $client->nom != "" && $client->email != "" && $client->motdepasse != "" && $client->email && !$client->existe($email1) && $client->adresse1 != "" && $client->cpostal != "" && $client->ville != "" && $client->pays != "") {
     $client->crypter();
     $client->add();
     $raisondesc = new Raisondesc($client->raison, ActionsLang::instance()->get_id_langue_courante());
     $paysdesc = new Paysdesc();
     $paysdesc->charger($client->pays);
     $rec = $client->charger_mail($client->email);
     $message = new Message();
     $message->charger("creation_client");
     $messagedesc = new Messagedesc();
     $messagedesc->charger($message->id);
     $nomsite = new Variable("nomsite");
     $urlsite = new Variable("urlsite");
     $emailcontact = new Variable("emailcontact");
     $messagedesc->description = str_replace("__NOMSITE__", $nomsite->valeur, $messagedesc->description);
     $messagedesc->description = str_replace("__EMAIL__", $client->email, $messagedesc->description);
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:client_creer.php

示例3: modifiercompte

function modifiercompte($raison, $entreprise, $siret, $intracom, $prenom, $nom, $adresse1, $adresse2, $adresse3, $cpostal, $ville, $pays, $telfixe, $telport, $email1, $email2, $motdepasse1, $motdepasse2, $obligetel = 0, $urlok = "", $urlerr = "")
{
    $client = new Client();
    $client->charger_id($_SESSION['navig']->client->id);
    if ($motdepasse1 == "") {
        $client->id = $_SESSION['navig']->client->id;
        $client->raison = strip_tags($raison);
        $client->siret = strip_tags($siret);
        $client->intracom = strip_tags($intracom);
        $client->entreprise = strip_tags($entreprise);
        $client->nom = strip_tags($nom);
        $client->prenom = strip_tags($prenom);
        $client->telfixe = strip_tags($telfixe);
        $client->telport = strip_tags($telport);
        $errEmail = 0;
        if ($email1 != $client->email) {
            $test = new Client();
            if ($test->existe($email1)) {
                $errEmail = 1;
            }
        }
        if ($email1 == $email2 && $email1 != "" && filter_var($email1, FILTER_VALIDATE_EMAIL)) {
            $client->email = strip_tags($email1);
        } else {
            $client->email = "";
        }
        $client->adresse1 = strip_tags($adresse1);
        $client->adresse2 = strip_tags($adresse2);
        $client->adresse3 = strip_tags($adresse3);
        $client->cpostal = strip_tags($cpostal);
        $client->ville = strip_tags($ville);
        $client->pays = strip_tags($pays);
        $client->motdepasse = $_SESSION['navig']->client->motdepasse;
        $_SESSION['navig']->formcli = $client;
        $obligeok = 1;
        switch ($obligetel) {
            case 0:
                $obligeok = 1;
                break;
            case 1:
                if ($client->telfixe == "") {
                    $obligeok = 0;
                }
                break;
            case 2:
                if ($client->telport == "") {
                    $obligeok = 0;
                }
                break;
            case 3:
                if ($client->telfixe == "" && $client->telport == "") {
                    $obligeok = 0;
                }
                break;
            case 4:
                if ($client->telfixe == "" || $client->telport == "") {
                    $obligeok = 0;
                }
                break;
            default:
                $obligeok = 1;
        }
        ActionsModules::instance()->appel_module("avantmodifcompte");
        if ($client->raison != "" && $client->prenom != "" && $client->nom != "" && $client->email != "" && $client->email && $client->adresse1 != "" && $client->cpostal != "" && $client->ville != "" && $client->pays != "" && $obligeok && !$errEmail) {
            $client->maj();
            $_SESSION['navig']->client = $client;
            ActionsModules::instance()->appel_module("apresmodifcompte", $client);
            redirige_action($urlok, $_SESSION['navig']->urlpageret);
        } else {
            redirige_action($urlerr, urlfond("compte_modifiererr", "errform=1"));
        }
    } else {
        modifiermotdepasse($motdepasse1, $motdepasse2, $urlok, $urlerr);
    }
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:75,代码来源:action.php

示例4: Client

 function traitement_formulaire_client(&$res)
 {
     require_once __DIR__ . "/Raison.class.php";
     // L'existence de l'email
     if ($_SESSION['navig']->formcli->email != "") {
         $client = new Client();
         if ($client->existe($_SESSION['navig']->formcli->email)) {
             $res = preg_replace("/\\#EXISTE\\[([^]]*)\\]/", "\\1", $res);
         }
     }
     $res = preg_replace("/\\#EXISTE\\[[^]]*\\]/", "", $res);
     // Les infos stockées en session
     $mapping = array('RAISONID' => 'raison', 'PRENOM' => 'prenom', 'NOM' => 'nom', 'ENTREPRISE' => 'entreprise', 'SIRET' => 'siret', 'INTRACOM' => 'intracom', 'ADRESSE1' => 'adresse1', 'ADRESSE2' => 'adresse2', 'ADRESSE3' => 'adresse3', 'CPOSTAL' => 'cpostal', 'VILLE' => 'ville', 'PAYS' => 'pays', 'EMAIL' => 'email', 'MOTDEPASSE' => 'motdepasse', 'TELFIXE' => 'telfixe', 'TELPORT' => 'telport');
     $res = $this->controle_formulaire($_SESSION['navig']->formcli, $mapping, $res);
     // Le parrain
     $tmpparrain = new Client();
     $tmpparrain->charger_id($_SESSION['navig']->formcli->parrain);
     $res = str_replace("#PARRAIN", $tmpparrain->email, $res);
     // Les RAISONn et CHECKn
     $raisons = CacheBase::getCache()->query("select id from " . Raison::TABLE);
     if ($raisons) {
         foreach ($raisons as $raison) {
             $sel = $_SESSION['navig']->formcli->raison == $raison->id;
             $res = str_replace("#RAISON{$raison->id}", $sel ? 'selected="selected"' : '', $res);
             $res = str_replace("#CHECK{$raison->id}", $sel ? 'checked="checked"' : '', $res);
         }
     }
     // Compatibilité < 1.5.2
     if ($_SESSION['navig']->formcli->raison == "") {
         $res = str_replace("#RAISON0", $_SESSION['navig']->formcli->raison == "" ? 'selected="selected"' : '', $res);
     }
     return $res;
 }
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:33,代码来源:Parseur.class.php

示例5: Client

            $clientToAdd->adresse2 = strip_tags($adresse2);
            $clientToAdd->adresse3 = strip_tags($adresse3);
            $clientToAdd->cpostal = strip_tags($cpostal);
            $clientToAdd->ville = strip_tags($ville);
            $clientToAdd->siret = strip_tags($siret);
            $clientToAdd->intracom = strip_tags($intracom);
            $clientToAdd->pays = strip_tags($pays);
            $clientToAdd->type = $type == 'on' ? 1 : 0;
            $clientToAdd->lang = ActionsLang::instance()->get_id_langue_courante();
            $clientMentor = new Client();
            if ($clientMentor->charger_mail($parrain)) {
                $clientToAdd->parrain = $clientMentor->id;
            }
            $pass = genpass(8);
            $clientToAdd->motdepasse = $pass;
            if ($clientToAdd->raison != "" && $clientToAdd->prenom != "" && $clientToAdd->nom != "" && $clientToAdd->email != "" && $clientToAdd->motdepasse != "" && $clientToAdd->email && !$clientToAdd->existe($email) && $clientToAdd->adresse1 != "" && $clientToAdd->cpostal != "" && $clientToAdd->ville != "" && $clientToAdd->pays != "" && $clientMentor->email == $parrain) {
                $clientToAdd->crypter();
                $clientToAdd->id = $clientToAdd->add();
                $clientToAdd->ref = date("ymdHi") . genid($clientToAdd->id, 6);
                $clientToAdd->maj();
                ClientAdmin::getInstance()->sendMailCreation($clientToAdd, $pass);
                ActionsModules::instance()->appel_module("ajoutclient", $clientToAdd);
                redirige('client_visualiser.php?ref=' . $clientToAdd->ref);
            } else {
                $adderror = 1;
            }
            break;
    }
}
if (!isset($page)) {
    $page = 0;
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:client.php


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