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


PHP Client::charger_ref方法代码示例

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


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

示例1: supprimer

function supprimer($ref)
{
    $client = new Client();
    $client->charger_ref($ref);
    $client->delete();
    ActionsModules::instance()->appel_module("supcli", $client);
    redirige("client.php");
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:8,代码来源:client_visualiser.php

示例2: Client

<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_clients")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$client = new Client();
if (!$request->get("ref") || !$client->charger_ref($request->get("ref"))) {
    redirige('client.php');
}
$errorCode = 0;
try {
    ActionsAdminClient::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::CLIENT_ADD_ADRESS:
            $addError = 1;
            break;
        case TheliaAdminException::CLIENT_ADRESS_EDIT_ERROR:
            $editAddressError[$request->get("id")] = 1;
            break;
    }
}
$raisondesc = new Raisondesc($client->raison);
if ($client->parrain) {
    $parrain = new Client();
    $parrain->charger_id($client->parrain);
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:client_visualiser.php

示例3: Client

if (!est_autorise("acces_clients")) {
    exit;
}
if (!isset($action)) {
    $action = "";
}
if (!isset($page)) {
    $page = 0;
}
require_once "liste/client.php";
?>

<?php 
if ($action == "supprimer") {
    $tempcli = new Client();
    $tempcli->charger_ref($ref);
    ActionsModules::instance()->appel_module("supcli", $tempcli);
    $tempcli->delete();
}
?>

<?php 
$client = new Client();
if ($page == "") {
    $page = 1;
}
$query = "select count(*) from {$client->table}";
$resul = mysql_query($query, $client->link);
$num = mysql_result($resul, 0);
$nbpage = 20;
$totnbpage = ceil($num / 20);
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:client.php

示例4: Client

<?php

require_once "auth.php";
if (!est_autorise("acces_commandes")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$client = new Client();
$client->charger_ref($ref_client);
$paysFacturation = new Paysdesc();
$paysLivraison = new Paysdesc();
$raisonFacturation = new Raisondesc();
$raisonLivraison = new Raisondesc();
try {
    ActionsAdminOrder::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::ORDER_ADD_ERROR:
            $createError = 1;
            break;
        case TheliaAdminException::EMAIL_FORMAT_ERROR:
            $createError = 1;
            $emailBadFormat = 1;
            break;
        case TheliaAdminException::EMAIL_ALREADY_EXISTS:
            $createError = 1;
            $emailAlreadyExists = 1;
            break;
    }
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:commande_creer.php

示例5: Client

/*      but WITHOUT ANY WARRANTY; without even the implied warranty of               */
/*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                */
/*      GNU General Public License for more details.                                 */
/*                                                                                   */
/*      You should have received a copy of the GNU General Public License            */
/*      along with this program.  If not, see <http://www.gnu.org/licenses/>.        */
/*                                                                                   */
/*************************************************************************************/
require_once "pre.php";
require_once "auth.php";
if (!est_autorise("acces_clients")) {
    exit;
}
require_once "../fonctions/divers.php";
$client = new Client();
$client->charger_ref($ref);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <?php 
require_once "title.php";
?>
</head>

<body>
	<div id="wrapper">
		<div id="subwrapper">

    		<?php 
$menu = "client";
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:client_modifier.php

示例6: Client

 $client->adresse2 = strip_tags($adresse2);
 $client->adresse3 = strip_tags($adresse3);
 $client->cpostal = strip_tags($cpostal);
 $client->ville = strip_tags($ville);
 $client->siret = strip_tags($siret);
 $client->intracom = strip_tags($intracom);
 $client->pays = strip_tags($pays);
 $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");
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:client_creer.php

示例7: createOrder

 public function createOrder($facturation_raison, $facturation_entreprise, $facturation_nom, $facturation_prenom, $facturation_adresse1, $facturation_adresse2, $facturation_adresse3, $facturation_cpostal, $facturation_ville, $facturation_tel, $facturation_pays, $livraison_raison, $livraison_entreprise, $livraison_nom, $livraison_prenom, $livraison_adresse1, $livraison_adresse2, $livraison_adresse3, $livraison_cpostal, $livraison_ville, $livraison_tel, $livraison_pays, $type_paiement, $type_transport, $fraisport, $remise, $client_selected, $ref_client, $email, \Panier $panier, $applyClientDiscount, $callMail, $callPayment)
 {
     $client = new Client();
     if ($client_selected == 1) {
         $clientOK = $client->charger_ref($ref_client);
     } else {
         if ($email != '' && $client->charger_mail($email)) {
             $existeDeja = 1;
         } elseif ($email != '' && !filter_var($email, FILTER_VALIDATE_EMAIL)) {
             $badFormat = 1;
         } else {
             $client->email = $email;
             $client->raison = $facturation_raison;
             $client->entreprise = $facturation_entreprise;
             $client->prenom = $facturation_prenom;
             $client->nom = $facturation_nom;
             $client->adresse1 = $facturation_adresse1;
             $client->adresse2 = $facturation_adresse2;
             $client->adresse3 = $facturation_adresse3;
             $client->cpostal = $facturation_cpostal;
             $client->ville = $facturation_ville;
             $client->tel = $facturation_tel;
             $client->pays = $facturation_pays;
             $pass = genpass(8);
             $client->motdepasse = $pass;
         }
     }
     $facturationAddress = new Venteadr();
     $facturationAddress->raison = $facturation_raison;
     $facturationAddress->entreprise = $facturation_entreprise;
     $facturationAddress->prenom = $facturation_prenom;
     $facturationAddress->nom = $facturation_nom;
     $facturationAddress->adresse1 = $facturation_adresse1;
     $facturationAddress->adresse2 = $facturation_adresse2;
     $facturationAddress->adresse3 = $facturation_adresse3;
     $facturationAddress->cpostal = $facturation_cpostal;
     $facturationAddress->ville = $facturation_ville;
     $facturationAddress->tel = $facturation_tel;
     $facturationAddress->pays = $facturation_pays;
     $livraisonAddress = new Venteadr();
     $livraisonAddress->raison = $livraison_raison;
     $livraisonAddress->entreprise = $livraison_entreprise;
     $livraisonAddress->prenom = $livraison_prenom;
     $livraisonAddress->nom = $livraison_nom;
     $livraisonAddress->adresse1 = $livraison_adresse1;
     $livraisonAddress->adresse2 = $livraison_adresse2;
     $livraisonAddress->adresse3 = $livraison_adresse3;
     $livraisonAddress->cpostal = $livraison_cpostal;
     $livraisonAddress->ville = $livraison_ville;
     $livraisonAddress->tel = $livraison_tel;
     $livraisonAddress->pays = $livraison_pays;
     $order = new Commande();
     $order->date = date("Y-m-d H:i:s");
     $order->livraison = "L" . date("ymdHis") . strtoupper(ereg_caracspec(substr($client->prenom, 0, 3)));
     $order->transport = $type_transport;
     $order->paiement = $type_paiement;
     $order->statut = Commande::NONPAYE;
     $order->transaction = genid($order->id, 6);
     $module_paiement = new Modules();
     $module_paiement->charger_id($type_paiement);
     if ($facturationAddress->raison != "" && $facturationAddress->prenom != "" && $facturationAddress->nom != "" && $facturationAddress->adresse1 != "" && $facturationAddress->cpostal != "" && $facturationAddress->ville != "" && $facturationAddress->pays != "" && $livraisonAddress->raison != "" && $livraisonAddress->prenom != "" && $livraisonAddress->nom != "" && $livraisonAddress->adresse1 != "" && $livraisonAddress->cpostal != "" && $livraisonAddress->ville != "" && $livraisonAddress->pays != "" && $order->transport != "" && is_numeric($fraisport) && $fraisport >= 0 && is_numeric($remise) && $remise >= 0 && $module_paiement->actif && $order->paiement != "" && $panier->nbart > 0 && ($clientOK || $client_selected != 1 && !$existeDeja && !$badFormat) && $email != '') {
         $facturationAddress->id = $facturationAddress->add();
         $livraisonAddress->id = $livraisonAddress->add();
         if (!$client->id) {
             $client->crypter();
             $client->id = $client->add();
             $client->ref = date("ymdHi") . genid($client->id, 6);
             $client->maj();
             ClientAdmin::getInstance()->sendMailCreation($client, $pass);
         }
         $devise = ActionsDevises::instance()->get_devise_courante();
         $order->adrfact = $facturationAddress->id;
         $order->adrlivr = $livraisonAddress->id;
         $order->client = $client->id;
         $order->devise = $devise->id;
         $order->taux = $devise->taux;
         $order->lang = ActionsLang::instance()->get_id_langue_courante();
         $order->id = $order->add();
         $order->ref = "C" . date("ymdHi") . genid($order->id, 6);
         $order->maj();
         $total = 0;
         foreach ($panier->tabarticle as $pos => $article) {
             $venteprod = new Venteprod();
             $dectexte = "\n";
             $stock = new Stock();
             foreach ($article->perso as $perso) {
                 $declinaison = new Declinaison();
                 $declinaisondesc = new Declinaisondesc();
                 if (is_numeric($perso->valeur) && ActionsModules::instance()->instancier($module_paiement->nom)->defalqcmd) {
                     // diminution des stocks de déclinaison si on est sur un module de paiement qui défalque de suite
                     $stock->charger($perso->valeur, $article->produit->id);
                     $stock->valeur -= $article->quantite;
                     $stock->maj();
                 }
                 $declinaison->charger($perso->declinaison);
                 $declinaisondesc->charger($declinaison->id);
                 // recup valeur declidisp ou string
                 if ($declinaison->isDeclidisp($perso->declinaison)) {
                     $declidisp = new Declidisp();
                     $declidispdesc = new Declidispdesc();
//.........这里部分代码省略.........
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:101,代码来源:OrderAdmin.class.php

示例8: Modules

/*      along with this program.  If not, see <http://www.gnu.org/licenses/>.        */
/*                                                                                   */
/*************************************************************************************/
require_once "pre.php";
require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_commandes")) {
    exit;
}
if (isset($_POST["action"]) && $_POST["action"] == "ajouter") {
    $total = 0;
    $poids = 0;
    $modules = new Modules();
    $modules->charger_id($type_paiement);
    $client = new Client();
    $client->charger_ref($id_client);
    $nbart = $_SESSION["commande"]->nbart;
    $sessionventeprod = $_SESSION["commande"]->venteprod;
    $commande = new Commande();
    $commande->client = $client->id;
    $commande->transport = $type_livraison;
    $commande->paiement = $type_paiement;
    $commande->statut = Commande::NONPAYE;
    $adr = new Venteadr();
    $adr->raison = $client->raison;
    $adr->entreprise = $client->entreprise;
    $adr->nom = $client->nom;
    $adr->prenom = $client->prenom;
    $adr->adresse1 = $client->adresse1;
    $adr->adresse2 = $client->adresse2;
    $adr->adresse3 = $client->adresse3;
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:commande_creer.php


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