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


PHP Zone::charger方法代码示例

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


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

示例1: port

function port($type = 0, $_pays = false, $_cpostal = "")
{
    if ($_SESSION['navig']->commande->transport == "" && !$type) {
        return -1;
    }
    if ($_SESSION['navig']->adresse != 0) {
        $chadr = 1;
    } else {
        $chadr = 0;
    }
    $modules = new Modules();
    if (!$type) {
        $modules->charger_id($_SESSION['navig']->commande->transport);
    } else {
        $modules->charger_id($type);
    }
    if ($modules->type != Modules::TRANSPORT || !$modules->actif) {
        return -1;
    }
    $p = new Pays();
    if ($chadr) {
        $adr = new adresse();
        $adr->charger($_SESSION['navig']->adresse);
        $p->charger($adr->pays);
        $cpostal = $adr->cpostal;
    } else {
        $p->charger($_SESSION['navig']->client->pays);
        $cpostal = $_SESSION['navig']->client->cpostal;
    }
    // Prise en compte des infos passée, si aucune des infos précédentes n'est pertinente.
    if (empty($p->id) && $_pays) {
        $p->charger($_pays);
    }
    if (empty($cpostal) && $_cpostal != "") {
        $cpostal = $_cpostal;
    }
    $zone = new Zone();
    $zone->charger($p->zone);
    try {
        $port = ActionsModules::instance()->instancier($modules->nom);
        $port->nbart = $_SESSION['navig']->panier->nbart();
        $port->poids = $_SESSION['navig']->panier->poids();
        $port->total = $_SESSION['navig']->panier->total();
        $port->zone = $p->zone;
        $port->pays = $p->id;
        $port->unitetr = $zone->unite;
        $port->cpostal = $cpostal;
        $frais = $port->calcule();
        ActionsModules::instance()->appel_module("port", $frais);
        return $frais;
    } catch (exception $e) {
        return -1;
    }
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:54,代码来源:port.php

示例2: Client

// Compatibilité 1.4 -> On utilise le modèle PDF si il existe
if (file_exists(__DIR__ . '/modeles/facture.php')) {
    include_once __DIR__ . "/../../classes/Commande.class.php";
    include_once __DIR__ . "/../../classes/Client.class.php";
    include_once __DIR__ . "/../../classes/Venteprod.class.php";
    include_once __DIR__ . "/../../classes/Produit.class.php";
    include_once __DIR__ . "/../../classes/Adresse.class.php";
    include_once __DIR__ . "/../../classes/Zone.class.php";
    include_once __DIR__ . "/../../classes/Pays.class.php";
    include_once __DIR__ . "/../../fonctions/divers.php";
    $client = new Client();
    $client->charger_id($commande->client);
    $pays = new Pays();
    $pays->charger($client->pays);
    $zone = new Zone();
    $zone->charger($pays->zone);
    include_once __DIR__ . "/modeles/facture.php";
    $facture = new Facture();
    $facture->creer($_GET['ref']);
    exit;
}
// Le moteur ne sortira pas le contenu de $res
$sortie = false;
// Le fond est le template de facture.
$reptpl = __DIR__ . "/template/";
$fond = "facture.html";
$lang = $commande->lang;
// Compatibilité avec le moteur.
$_REQUEST['commande'] = $_GET['ref'];
require_once __DIR__ . "/../../fonctions/moteur.php";
require_once __DIR__ . "/../../classes/Pdf.class.php";
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:facture.php

示例3: modifier_transports

function modifier_transports($idtransport)
{
    $transzone = new Transzone();
    $zone = new Zone();
    $tr = new Modules();
    if ($tr->charger_id($_GET['id'])) {
        $zone = new Zone();
        ?>
		<div class="entete_liste_config" style="margin-top:15px;">
			<div class="titre"><?php 
        echo trad('MODIFICATION_TRANSPORT', 'admin') . ' ' . ActionsAdminModules::instance()->lire_titre_module($tr);
        ?>
</div>
		</div>

		<ul class="ligne1">
			<li style="width:250px;">
				<select class="form_select" id="zone">
				<?php 
        $query = "select * from {$zone->table}";
        $resul = $transzone->query($query);
        while ($resul && ($row = $transzone->fetch_object($resul))) {
            $test = new Transzone();
            if (!$test->charger($idtransport, $row->id)) {
                ?>
		     	<option value="<?php 
                echo $row->id;
                ?>
"><?php 
                echo $row->nom;
                ?>
</option>
		     	<?php 
            }
        }
        ?>
				</select>
			</li>
			<li><a href="javascript:ajouter($('#zone').val())"><?php 
        echo trad('AJOUTER_ZONE', 'admin');
        ?>
</a></li>
		</ul>

		<?php 
        $query = "select * from {$transzone->table} where transport=\"" . $idtransport . "\"";
        $resul = $transzone->query($query);
        $i = 0;
        while ($resul && ($row = $transzone->fetch_object($resul))) {
            $zone = new Zone();
            $zone->charger($row->zone);
            $fond = "ligne_" . ($i++ % 2 ? "fonce" : "claire") . "_BlocDescription";
            ?>
			<ul class="<?php 
            echo $fond;
            ?>
">
					<li style="width:492px;"><?php 
            echo $zone->nom;
            ?>
</li>
					<li style="width:32px;"><a href="javascript:supprimer(<?php 
            echo $row->id;
            ?>
)"><?php 
            echo trad('Supprimer', 'admin');
            ?>
</a></li>
			</ul>
			<?php 
        }
    }
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:73,代码来源:transport.php

示例4: modifier_pays_zone

function modifier_pays_zone($idzone)
{
    $zone = new Zone();
    $zone->charger($idzone);
    $pays = new Pays();
    $query = "select * from {$pays->table} where zone=\"-1\"";
    $resul = $pays->query($query);
    ?>
	<div class="entete_liste_config" style="margin-top:15px;">
		<div class="titre"><?php 
    echo trad('MODIFICATION_ZONE', 'admin');
    ?>
</div>
	</div>

	<ul class="ligne1">
		<li style="width:250px;">
			<select class="form_select" id="pays">
			<?php 
    while ($resul && ($row = $pays->fetch_object($resul))) {
        $paysdesc = new Paysdesc();
        if ($paysdesc->charger($row->id)) {
            ?>
	     	<option value="<?php 
            echo $paysdesc->pays;
            ?>
"><?php 
            echo $paysdesc->titre;
            ?>
</option>
			<?php 
        }
    }
    ?>
			</select>
		</li>
		<li><a href="javascript:ajouter($('#pays').val())"><?php 
    echo trad('AJOUTER_PAYS', 'admin');
    ?>
</a></li>
	</ul>

<?php 
    $pays = new Pays();
    $query = "select * from {$pays->table} where zone=\"" . $idzone . "\"";
    $resul = $pays->query($query);
    while ($resul && ($row = $pays->fetch_object($resul))) {
        $paysdesc = new Paysdesc();
        $paysdesc->charger($row->id);
        $fond = "ligne_" . ($i++ % 2 ? "fonce" : "claire") . "_BlocDescription";
        ?>
		<ul class="<?php 
        echo $fond;
        ?>
">
			<li style="width:492px;"><?php 
        echo $paysdesc->titre;
        ?>
</li>
			<li style="width:32px;"><a href="javascript:supprimer(<?php 
        echo $row->id;
        ?>
)"><?php 
        echo trad('Supprimer', 'admin');
        ?>
</a></li>
		</ul>
<?php 
    }
    ?>
	<ul class="ligne1">
			<li><?php 
    echo trad('Forfait transport: ', 'admin');
    ?>
<input type="text" class="form_inputtext" id="forfait" onclick="this.value=''" value="<?php 
    echo htmlspecialchars($zone->unite);
    ?>
" /></li>
			<li><a href="javascript:forfait($('#forfait').val())"><?php 
    echo trad('VALIDER', 'admin');
    ?>
</a></li>
	</ul>
<?php 
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:85,代码来源:zone.php

示例5: bouclePanier

function bouclePanier($texte, $args)
{
    $deb = lireTag($args, "deb", "int");
    $fin = lireTag($args, "fin", "int");
    $dernier = lireTag($args, "dernier", "int");
    $ref = lireTag($args, "ref", "string");
    $parent = lireTag($args, "parent", "int+-");
    if (!$deb) {
        $deb = 0;
    }
    if (!$fin) {
        $fin = $_SESSION['navig']->panier->nbart;
    }
    if ($dernier == 1) {
        $deb = $_SESSION['navig']->panier->nbart - 1;
    }
    $total = 0;
    $res = "";
    if (!$_SESSION['navig']->panier->nbart) {
        return;
    }
    for ($i = $deb; $i < $fin; $i++) {
        $article =& $_SESSION['navig']->panier->tabarticle[$i];
        if ($ref != "" && $article->produit->ref != $ref) {
            continue;
        }
        $ceParent = $article->parent;
        if ($ceParent === '') {
            $ceParent = -1;
        }
        if ($parent != "" && $ceParent != $parent) {
            continue;
        }
        $plus = $article->quantite + 1;
        $moins = $article->quantite - 1;
        if ($moins == 0) {
            $moins++;
        }
        $quantite = $article->quantite;
        $tva = $article->produit->tva;
        if (!$article->produit->promo) {
            $prix = $article->produit->prix - $article->produit->prix * $_SESSION['navig']->client->pourcentage / 100;
        } else {
            $prix = $article->produit->prix2 - $article->produit->prix2 * $_SESSION['navig']->client->pourcentage / 100;
        }
        $prixht = $prix / (1 + $tva / 100);
        $totalht = $prixht * $quantite;
        $total = $prix * $quantite;
        $port = port();
        if ($port < 0) {
            $port = 0;
        }
        $totcmdport = $total + $port;
        $totsansport = $_SESSION['navig']->panier->total();
        $pays = new Pays();
        $pays->charger($_SESSION['navig']->client->pays);
        $zone = new Zone();
        $zone->charger($pays->zone);
        $portht = $port * 100 / (100 + $tva);
        $totcmdportht = $totcmdport * 100 / (100 + $tva);
        $totsansportht = $totsansport * 100 / (100 + $tva);
        $declidisp = new Declidisp();
        $declidispdesc = new Declidispdesc();
        $declinaison = new Declinaison();
        $declinaisondesc = new Declinaisondesc();
        $dectexte = "";
        $decval = "";
        if ($_SESSION['navig']->adresse) {
            $adr = new Adresse();
            $adr->charger($_SESSION['navig']->adresse);
            $idpays = $adr->pays;
        } else {
            $idpays = $_SESSION['navig']->client->pays;
        }
        $pays = new Pays();
        $pays->charger($idpays);
        $val = "";
        for ($compt = 0; $compt < count($article->perso); $compt++) {
            $tperso = $article->perso[$compt];
            $declinaison->charger($tperso->declinaison);
            // recup valeur declidisp ou string
            if ($declinaison->isDeclidisp($tperso->declinaison)) {
                $declidisp->charger($tperso->valeur);
                $declidispdesc->charger_declidisp($declidisp->id);
                $val = $declidispdesc->titre . " ";
            } else {
                $val = $tperso->valeur . " ";
            }
            // recup declinaison associee
            $declinaisondesc->charger($tperso->declinaison);
            $dectexte .= $declinaisondesc->titre . " " . $val . " ";
            $decval .= $val . " ";
        }
        if ($pays->tva != "" && !$pays->tva) {
            $prix = $prixht;
            $total = $totalht;
        }
        $temp = str_replace("#REF", $article->produit->ref, $texte);
        $temp = str_replace("#TITRE", $article->produitdesc->titre, $temp);
        $temp = str_replace("#QUANTITE", "{$quantite}", $temp);
//.........这里部分代码省略.........
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:101,代码来源:boucles.php

示例6: Zone

if (!est_autorise("acces_configuration")) {
    exit;
}
require_once "../fonctions/divers.php";
require_once "liste/zone.php";
if ($_POST['action'] == "ajouter" && $_POST['nomzone'] != "") {
    $zone = new Zone();
    $zone->nom = $_POST['nomzone'];
    $id = $zone->add();
} else {
    if ($_GET['action'] == "supprimer" && $_GET['id'] != "") {
        $zone = new Zone();
        $pays = new Pays();
        $query = "update {$pays->table} set zone=\"-1\" where zone=\"" . $_GET['id'] . "\"";
        $resul = mysql_query($query, $pays->link);
        $zone->charger($_GET['id']);
        $zone->delete();
    }
}
if ($_REQUEST['id'] != "") {
    $id = $_REQUEST['id'];
}
?>
<!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";
require_once "js/zone.php";
?>
</head>
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:zone.php

示例7: redirige

<?php

require_once __DIR__ . "/../auth.php";
require_once __DIR__ . "/../../fonctions/divers.php";
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
if ($request->isXmlHttpRequest() === false) {
    redirige("../accueil.php");
}
if (!est_autorise("acces_configuration")) {
    exit;
}
header('Content-Type: text/html; charset=utf-8');
if ($request->query->get('action') == "forfait" && $request->query->get('valeur', "") != "") {
    $zone = new Zone();
    $zone->charger($request->query->get('id'));
    $zone->unite = $request->query->get('valeur');
    $zone->maj();
    echo 1;
} else {
    if ($request->query->get('action') == "ajouter" && $request->query->get('pays', "") != "") {
        $pays = new Pays();
        $query = "update {$pays->table} set zone='" . $request->query->get('id') . "' where id=\"" . $request->query->get('pays') . "\"";
        $resul = $pays->query($query);
        echo 1;
    } else {
        if ($request->query->get('action') == "supprimer" && $request->query->get('pays', "") != "") {
            $pays = new Pays();
            $query = "update {$pays->table} set zone='-1' where id=\"" . $request->query->get('pays') . "\"";
            $resul = $pays->query($query);
            echo 1;
        }
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:31,代码来源:zone.php


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