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


PHP anyC::setLimitV3方法代码示例

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


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

示例1: getCartText

    public function getCartText($withPayPal = false)
    {
        $text = "";
        $paypalHTML = '<form id="formPayPal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
	<input type="hidden" name="cmd" value="_cart" />
	<input type="hidden" name="upload" value="1" />
	<input type="hidden" name="currency_code" value="EUR" />
	<input type="hidden" name="charset" value="utf-8" />
	<input type="hidden" name="invoice" value=";;;REPLACETHIS;;;" />
	<input type="hidden" name="business" value="' . $this->sellerEmail . '" />';
        $steuern = array();
        $gesamt = 0;
        $netto = 0;
        /*$c = $this->useClass;
        		
        		$mwst = $this->mwstField;
        		$name = $this->nameField;
        		$preis = $this->preisField;*/
        $i = 0;
        if ($this->cookie != "") {
            $text .= "\n        " . str_pad("Artikel", 40, " ") . " MwSt      Preis            Gesamt\n-------------------------------------------------------------------------------------------";
            while ($t = $this->getNextElement()) {
                $num = array_search($t[2], $this->useClass);
                if ($t[2] != "CookieCart") {
                    $c = $this->useClass[$num];
                    $A = new $c($t[0], false);
                    $A->loadMe();
                    $mwst = $this->mwstField[$num];
                    $name = $this->nameField[$num];
                    $preis = $this->preisField[$num];
                    $artikelnummer = $this->artikelnummerField[$num];
                } else {
                    $A = $this;
                    $this->PostenID = $t[0];
                    $mwst = "mwst";
                    $name = "artikelname";
                    $preis = "preis";
                    $artikelnummer = "artikelnummer";
                }
                try {
                    new Staffelpreis(-1);
                    if (class_exists("Staffelpreis")) {
                        $ac = new anyC();
                        $ac->setCollectionOf("Staffelpreis");
                        $ac->addAssocV3("StaffelpreisClass", "=", $this->useClass);
                        $ac->addAssocV3("StaffelpreisClassID", "=", $t[0]);
                        $ac->addAssocV3("StaffelpreisAmount", "<=", $t[1]);
                        $ac->addOrderV3("StaffelpreisAmount", "DESC");
                        $ac->setLimitV3("1");
                        $ac2 = $ac->getNextEntry();
                        if ($ac2 != null) {
                            $A->changeA($preis, $ac2->A("StaffelpreisPrice"));
                        }
                    }
                } catch (Exception $e) {
                }
                if (!isset($steuern[$A->getA()->{$mwst}])) {
                    $steuern[$A->getA()->{$mwst}] = 0;
                }
                $gesamt += $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1) * $t[1];
                $netto += $A->getA()->{$preis} * 1 * $t[1];
                $steuern[$A->getA()->{$mwst}] += $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100) * $t[1];
                #$image = $this->invokeParser($this->imagePathCallback, $t[0], $A);
                $tName = str_pad(substr($A->getA()->{$name}, 0, 38), 40, " ", STR_PAD_RIGHT);
                $tName .= str_pad("", Util::countUmlaute($tName), " ");
                $brutto = $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1) * $t[1];
                $this->sum += $brutto;
                $this->count += $t[1];
                $text .= "\n" . str_pad($t[1], 5, " ", STR_PAD_LEFT) . " x " . $tName . "|" . str_pad(Util::formatNumber("de_DE", $A->getA()->{$mwst} * 1, 2, true, false), 7, " ", STR_PAD_LEFT) . "% |" . str_pad(Util::conv_euro8(Util::formatCurrency("de_DE", $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1), true)), 15, " ", STR_PAD_LEFT) . " |" . str_pad(Util::conv_euro8(Util::formatCurrency("de_DE", $brutto, true)), 15, " ", STR_PAD_LEFT) . "";
                /**
                 * Artikelnummer in neuer Zeile
                 */
                if (isset($A->getA()->{$artikelnummer}) and $A->getA()->{$artikelnummer} != "") {
                    $text .= "\n" . str_pad("", 5, " ", STR_PAD_LEFT) . "   " . str_pad(substr("Art.Nr. " . $A->getA()->{$artikelnummer}, 0, 38), 40, " ", STR_PAD_RIGHT) . "|         |                |";
                }
                $i++;
                $ppName = str_replace(array("Ä", "Ö", "Ü", "ß", "ä", "ö", "ü"), array("Ae", "Oe", "Ue", "ss", "ae", "oe", "ue"), $tName);
                if ($t[2] == "CookieCart" and ($t[0] == "1" or $t[0] == "1010")) {
                    $paypalHTML .= '<input type="hidden" name="discount_amount_cart" value="' . abs($brutto) . '" />';
                } else {
                    $paypalHTML .= '
	<input type="hidden" name="item_name_' . $i . '" value="' . trim($ppName) . '"/ >
	<input type="hidden" name="amount_' . $i . '" value="' . Util::formatCurrency("en_GB", $brutto, false) . '" />';
                }
            }
            if ($this->versandkostenBrutto != null) {
                $tName = str_pad(substr($this->versandkostenBrutto[0], 0, 38), 40, " ", STR_PAD_RIGHT);
                $tName .= str_pad("", Util::countUmlaute($tName), " ");
                $text .= "\n" . str_pad("1", 5, " ", STR_PAD_LEFT) . " x " . $tName . "|" . str_pad(Util::formatNumber("de_DE", $this->versandkostenBrutto[2], 2, true, false), 7, " ", STR_PAD_LEFT) . "% |" . str_pad(Util::conv_euro8(Util::formatCurrency("de_DE", $this->versandkostenBrutto[1], true)), 15, " ", STR_PAD_LEFT) . " |" . str_pad(Util::conv_euro8(Util::formatCurrency("de_DE", $this->versandkostenBrutto[1], true)), 15, " ", STR_PAD_LEFT) . "";
                $gesamt += $this->versandkostenBrutto[1];
                $netto += Util::kRound($this->versandkostenBrutto[1] / ($this->versandkostenBrutto[2] + 100) * 100, 2);
                $steuern[number_format($this->versandkostenBrutto[2], 2)] += Util::kRound($this->versandkostenBrutto[1] / ($this->versandkostenBrutto[2] + 100) * $this->versandkostenBrutto[2], 2);
            }
            $s = "";
            foreach ($steuern as $key => $value) {
                $s .= ($s != "" ? "\n" : "") . "" . str_pad(Util::conv_euro8("Gesamt MwSt" . str_pad(Util::formatNumber("de_DE", $key * 1, 2, true, false), 7, " ", STR_PAD_LEFT) . "%: " . str_pad(Util::formatCurrency("de_DE", $value, true), 15, " ", STR_PAD_LEFT)), 91, " ", STR_PAD_LEFT);
            }
            $text .= "\n-------------------------------------------------------------------------------------------\n                                                        Gesamt Netto        " . str_pad(Util::conv_euro8(Util::formatCurrency("de_DE", $netto, true)), 15, " ", STR_PAD_LEFT) . "\n{$s}\n                                                      -------------------------------------\n                                                              Gesamt        " . str_pad(Util::conv_euro8(Util::formatCurrency("de_DE", $gesamt, true)), 15, " ", STR_PAD_LEFT);
        } else {
            $text = "Ihr Warenkorb enthält keine Artikel.";
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:fheME,代码行数:101,代码来源:CookieCart.class.php

示例2: useUser

 public function useUser($username = null)
 {
     $ac = new anyC();
     $ac->setCollectionOf("User");
     if ($username != null) {
         $ac->addAssocV3("username", "=", $username);
     }
     $ac->addAssocV3("isAdmin", "=", "0");
     $ac->setLimitV3("1");
     $u = $ac->getNextEntry();
     if ($u == null) {
         $this->errors[] = "100";
         return false;
     }
     return $this->login($u->A("username"), $u->A("SHApassword"), true);
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:16,代码来源:ExtConn.class.php

示例3: Download

 *  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/>.
 * 
 *  2007 - 2012, Rainer Furtmeier - Rainer@Furtmeier.de
 */
error_reporting(E_ALL);
require "./multiCMSData/connect.php";
if (isset($_GET["filedl"])) {
    $DL = new Download($_GET["filedl"]);
    $DL->makeDownload();
    header("Location: " . $DL->getA()->url);
    exit;
}
if (isset($_GET["newestdl"])) {
    $aC = new anyC();
    $aC->setCollectionOf("Download");
    $aC->addAssocV3("ContentID", "=", $_GET["newestdl"]);
    $aC->addOrderV3("datum", "DESC");
    $aC->setLimitV3("1");
    $DL = $aC->getNextEntry();
    $DL = new Download($DL->getID());
    if (!isset($_GET["getLink"])) {
        $DL->makeDownload();
        header("Location: " . $DL->getA()->url);
        exit;
    } else {
        die($DL->getA()->url);
    }
}
开发者ID:nemiah,项目名称:projectMankind,代码行数:31,代码来源:multiCMSDownload.php

示例4: setTimer

 public function setTimer($id, $action, $type, $stunden, $minuten, $deviceName)
 {
     if ($action == "setBPSValue") {
         $action = $_SESSION["BPS"]->getProperty("mFhemTimer", "FhemValue");
     }
     switch ($type) {
         case "D":
             $F = new Fhem($id);
             $F->loadMe();
             $S = new FhemServer($F->getA()->FhemServerID);
             $S->loadMe();
             break;
         case "P":
             $ac = new anyC();
             $ac->setCollectionOf("FhemPreset");
             $ac->addJoinV3("FhemServer", "FhemPresetServerID", "=", "FhemServerID");
             $ac->addAssocV3("FhemPresetID", "=", $id);
             $ac->setLimitV3("1");
             $S = $ac->getNextEntry();
             $action = "on";
             break;
     }
     try {
         $T = new Telnet($S->getA()->FhemServerIP, $S->getA()->FhemServerPort);
     } catch (NoServerConnectionException $e) {
         die("error:'The connection to the server with IP-address " . $S->getA()->FhemServerIP . " could not be established!'");
     }
     $T->fireAndForget("define a" . rand(10, 10000000) . " at " . ($stunden < 10 ? "0" : "") . "{$stunden}:" . ($minuten < 10 ? "0" : "") . "{$minuten}:00 set " . $deviceName . " {$action}");
     $T->disconnect();
 }
开发者ID:nemiah,项目名称:fheME,代码行数:30,代码来源:FhemControlGUI.class.php

示例5: update

 public function update($echo = false)
 {
     $oldest = new anyC();
     $oldest->setCollectionOf("Serie");
     $oldest->addOrderV3("lastupdate", "ASC");
     $oldest->addAssocV3("status", "=", "Continuing");
     $oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 3);
     $oldest->setLimitV3("2");
     while ($S = $oldest->getNextEntry()) {
         $this->download($S, $echo);
     }
     $oldest = new anyC();
     $oldest->setCollectionOf("Serie");
     $oldest->addOrderV3("lastupdate", "ASC");
     $oldest->addAssocV3("status", "=", "Ended");
     $oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 21);
     $oldest->setLimitV3("1");
     while ($S = $oldest->getNextEntry()) {
         $this->download($S, $echo);
     }
     $oldest = new anyC();
     $oldest->setCollectionOf("Serie");
     $oldest->addOrderV3("lastupdate", "ASC");
     $oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 3, "AND", "1");
     $oldest->addAssocV3("status", "=", "Continuing", "AND", "1");
     $oldest->addAssocV3("lastupdate", "<", time() - 3600 * 24 * 21, "OR", "2");
     $oldest->addAssocV3("status", "=", "Ended", "AND", "2");
     $oldest->lCV3();
     return $oldest->numLoaded();
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:30,代码来源:thetvdbcomAdapter.class.php


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