Exemple #1
0
 public function __toString()
 {
     $hiddenFields = "";
     if ($this->cols == 2 or $this->cols == 1) {
         foreach ($this->fields as $k => $v) {
             if (isset($this->spaceLines[$v])) {
                 $this->table->addRow(array("<hr />"));
                 #$this->table->addRowStyle("font-weight:bold;");
                 #$this->table->addCellStyle(1, "padding-top:20px;");
                 $this->table->addRowColspan(1, 2);
                 $this->table->addRowClass("FormSeparatorWithoutLabel");
             }
             if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
                 $this->table->addRow(array($this->spaces[$v]));
                 #$this->table->addRowStyle("font-weight:bold;");
                 #$this->table->addCellStyle(1, "padding-top:20px;");
                 $this->table->addRowColspan(1, 2);
                 $this->table->addRowClass("FormSeparatorWithLabel");
             }
             if (isset($this->spaces[$v]) and $this->spaces[$v] == "") {
                 $this->table->addRow(array(""));
                 $this->table->addRowClass("backgroundColor0");
                 $this->table->addRowColspan(1, 2);
                 $this->table->addRowClass("FormSeparatorWithoutLabel");
             }
             $Input = $this->getInput($v);
             $B = $this->getCustomButton($v, $Input);
             if (is_object($Input) and $Input instanceof HTMLInput) {
                 $InputS = $Input->__toString();
                 $this->callbacks .= $Input->getCallback();
             } else {
                 $InputS = $Input;
             }
             if (!isset($this->types[$v]) or $this->types[$v] != "hidden") {
                 if ($this->cols == 2) {
                     $this->table->addLV((isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)) . ($this->printColon ? ":" : ""), $B . $InputS . (isset($this->descriptionField[$v]) ? "<br /><small style=\"color:grey;\">" . $this->descriptionField[$v] . "</small>" : ""));
                 }
                 if ($this->cols == 1) {
                     $this->table->addRow("<label " . ($this->cols == 1 ? "style=\"width:100%;\"" : "") . ">" . (isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)) . ":</label>");
                     $this->table->addRowClass("backgroundColor3");
                     $this->table->addRow($B . $InputS . (isset($this->descriptionField[$v]) ? "<br /><small style=\"color:grey;\">" . $this->descriptionField[$v] . "</small>" : ""));
                     $this->table->addRowClass("backgroundColor0");
                 }
                 if (isset($this->inputLineSyles[$v])) {
                     $this->table->addRowStyle($this->inputLineSyles[$v]);
                 }
             } else {
                 $hiddenFields .= $InputS;
             }
         }
     }
     if ($this->cols == 4) {
         $row = array();
         foreach ($this->fields as $k => $v) {
             $Input = $this->getInput($v);
             if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
                 $hiddenFields .= $Input;
                 continue;
             }
             if (isset($this->spaces[$v])) {
                 if ($this->spaces[$v] == "") {
                     if (count($row) == 0) {
                         $this->table->addRow(array("", "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                     if (count($row) == 2) {
                         $row[] = "";
                         $row[] = "";
                         $this->table->addRow($row);
                         $row = array();
                         $this->table->addRow(array("", "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                 } else {
                     if (count($row) == 0) {
                         $this->table->addRow(array($this->spaces[$v], "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                     if (count($row) == 2) {
                         $row[] = "";
                         $row[] = "";
                         $this->table->addRow($row);
                         $row = array();
                         $this->table->addRow(array($this->spaces[$v], "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                 }
                 #$this->table->addRow($row);
                 #$row = array();
             }
             $B = $this->getCustomButton($v, $Input);
             $row[] = "<label>" . (isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)) . ":</label>";
             $row[] = $B . $Input . (isset($this->descriptionField[$v]) ? "<br /><small style=\"color:grey;\">" . $this->descriptionField[$v] . "</small>" : "");
             /*if(!isset($this->types[$v]) OR $this->types[$v] != "hidden"){
             					$this->table->addLV(
             						(isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)).":",
             						$B.$Input);
             
             					if(isset($this->inputLineSyles[$v]))
             						$this->table->addRowStyle($this->inputLineSyles[$v]);
             				}
             				else $hiddenFields .= $Input;*/
             if (count($row) == 4) {
                 $this->table->addRow($row);
                 $row = array();
             }
         }
         if (count($row) == 2) {
             $row[] = "";
             $row[] = "";
             $this->table->addRow($row);
         }
     }
     foreach ($this->endLV as $k => $v) {
         $this->table->addLV($v[0], $v[1]);
     }
     if ($this->saveMode != null) {
         switch ($this->saveMode) {
             case "custom":
                 $this->table->addRow(array($this->saveButtonCustom));
                 $this->table->addRowColspan(1, $this->cols);
                 break;
             case "class":
                 $S = $this->saveButton();
                 $this->table->addRow(array($S));
                 $this->table->addRowColspan(1, $this->cols);
                 break;
             case "multiCMS":
                 $S = new HTMLInput("submitForm", "submit", $this->saveButtonLabel);
                 if ($this->saveButtonBGIcon != "") {
                     $S->style("background-image:url({$this->saveButtonBGIcon});background-position:98% 50%;background-repeat:no-repeat;");
                 }
                 if ($this->saveButtonSubmit != null) {
                     $S->onclick(str_replace("/*CALLBACKS*/", $this->callbacks, $this->saveButtonSubmit));
                 }
                 $action = new HTMLInput("action", "hidden", $this->saveAction);
                 $handler = new HTMLInput("HandlerName", "hidden", $this->saveClass);
                 $return = new HTMLInput("returnP", "hidden", "/" . $_GET["permalink"]);
                 if ($this->cols > 1) {
                     $this->table->addRow(array("", $S . $action . $handler . $return));
                 } else {
                     $this->table->addRow(array($S . $action . $handler . $return));
                 }
                 break;
             case "rmeP":
                 $S = new HTMLInput("submitForm", "button", $this->saveButtonLabel);
                 if ($this->saveButtonBGIcon != "") {
                     $S->style("background-image:url({$this->saveButtonBGIcon});background-position:98% 50%;background-repeat:no-repeat;");
                 }
                 $S->onclick(($this->saveButtonConfirm != null ? "if(confirm('" . $this->saveButtonConfirm . "')) " : "") . $this->saveButtonSubmit);
                 $S->setClass("submitFormButton borderColor1");
                 $C = "";
                 if ($this->abortButton != null) {
                     $C = new HTMLInput("abortForm", "button", $this->abortButton[0]);
                     if ($this->abortButton[2] != null) {
                         $C->style("background-image:url({$this->abortButton[2]});background-position:98% 50%;background-repeat:no-repeat;");
                     }
                     $C->onclick($this->abortButton[1]);
                     $C->setClass("abortFormButton borderColor1");
                 }
                 $this->table->addRow(array($S . $C));
                 $this->table->addRowColspan(1, 2);
                 break;
             case "Bericht":
                 $S = new HTMLInput("submitForm", "button", $this->saveButtonLabel);
                 if ($this->saveButtonBGIcon != "") {
                     $S->style("background-image:url({$this->saveButtonBGIcon});background-position:98% 50%;background-repeat:no-repeat;");
                 }
                 $S->onclick($this->saveButtonOnclick);
                 $this->table->addRow(array($S));
                 $this->table->addRowColspan(1, 2);
                 break;
         }
     }
     $html = "";
     if ($this->formTag) {
         $html .= "\n\t<form\n\t\tid=\"{$this->id}\"\n\t\t" . ($this->action != null ? "action=\"{$this->action}\"" : "") . "\n\t\t" . ($this->method != null ? "method=\"{$this->method}\"" : "") . "\n\t\t" . ($this->enctype != null ? "enctype=\"{$this->enctype}\"" : "") . "\n\t\t" . ($this->onSubmit != null ? "onsubmit=\"{$this->onSubmit}\"" : "") . "\n\t\t" . ($this->style != null ? "style=\"{$this->style}\"" : "") . ">";
     }
     $html .= $this->table;
     $html .= $hiddenFields;
     if ($this->formTag) {
         $html .= "\n\t</form>";
     }
     return $html . ($this->appendJs != "" ? OnEvent::script($this->appendJs) : "") . ($this->useRecentlyChanged ? GUIFactory::editFormOnchangeTest($this->id) : "");
 }
Exemple #2
0
 function getCartHTML($previewMode = false)
 {
     $payVia = "";
     if (count($this->payment) > 0) {
         $payVia = "&payVia='+CookieCart.getPayVia()+'";
     }
     #parameters: 'formID=nix&HandlerName=CookieCartHandler&artikelid='+id+'&action=delete&type='+type,
     if ($this->cookie != "") {
         $html = "\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tvar CookieCart = {\n\t\t\t\t\t\t\tjoinFormFields: function(formID){\n\t\t\t\t\t\t\t\tsetString = '';\n\t\t\t\t\t\t\t\tfor(i = 0;i < \$(formID).elements.length;i++) {\n\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].type == 'button') continue;\n\n\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].type == 'radio'){\n\t\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].checked) setString += '&'+\$(formID).elements[i].name+'='+encodeURIComponent(\$(formID).elements[i].value);\n\t\t\t\t\t\t\t\t\t} else if(\$(formID).elements[i].type == 'checkbox'){\n\t\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].checked) setString += '&'+\$(formID).elements[i].name+'=1';\n\t\t\t\t\t\t\t\t\t\telse setString += '&'+\$(formID).elements[i].name+'=0';\n\t\t\t\t\t\t\t\t\t} else if(\$(formID).elements[i].type == 'select-multiple'){\n\t\t\t\t\t\t\t\t\t\tsetString += '&'+\$(formID).elements[i].name+'=';\n\t\t\t\t\t\t\t\t\t\tsubString = '';\n\t\t\t\t\t\t\t\t\t\tfor(j = 0; j < \$(formID).elements[i].length; j++)\n\t\t\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].options[j].selected) subString += (subString != '' ? ';:;' : '')+\$(formID).elements[i].options[j].value;\n\n\t\t\t\t\t\t\t\t\t\tsetString += subString;\n\n\t\t\t\t\t\t\t\t\t} else setString += '&'+\$(formID).elements[i].name+'='+encodeURIComponent(\$(formID).elements[i].value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn setString;\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tgetPayVia: function(){\n\t\t\t\t\t\t\t\tfor(i = 0;i < \$('cart').payVia.length; i++)\n\t\t\t\t\t\t\t\t\tif(\$('cart').payVia[i].checked) return \$('cart').payVia[i].value;\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tdeleteMe: function(id, type){\n\t\t\t\t\t\t\t\tnew Ajax.Request('/index.php', {\n\t\t\t\t\t\t\t\t\tmethod:'post',\n\t\t\t\t\t\t\t\t\tparameters:'r=" . mt_rand(0, 10000) . "&formID=nix&HandlerName=CookieCartHandler&artikelid='+id+'&action=delete&type='+type,\n\t\t\t\t\t\t\t\t\tonSuccess: function(transport){\n\t\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\t\t\t}});\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\torderNow: function(){\n\t\t\t\t\t\t\t\t\$('cart').action.value = 'order';\n\n\t\t\t\t\t\t\t\t//if(confirm('Jetzt kaufen?'))\n\t\t\t\t\t\t\t\tnew Ajax.Request('/index.php', {\n\t\t\t\t\t\t\t\t\tmethod:'post',\n\t\t\t\t\t\t\t\t\tparameters: 'r=" . mt_rand(0, 10000) . "&formID=nix&HandlerName=CookieCartHandler{$payVia}'+CookieCart.joinFormFields('cart'),\n\t\t\t\t\t\t\t\t\tonSuccess: function(transport){\n\t\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\t\t\t}});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdateAmounts: function(){\n\t\t\t\t\t\t\t\tmultiCMS.formHandler('cart', function(transport){\n\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tinsertCoupon: function(){\n\t\t\t\t\t\t\t\tif(\$('CouponCode').value == '') {\n\t\t\t\t\t\t\t\t\talert('Bitte geben Sie einen Gutscheincode ein!');\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tnew Ajax.Request('/index.php', {\n\t\t\t\t\t\t\t\t\tmethod:'post',\n\t\t\t\t\t\t\t\t\tparameters: 'r=" . mt_rand(0, 10000) . "&formID=nix&HandlerName=CookieCartHandler&action=insertCoupon&couponCode='+encodeURIComponent(\$('CouponCode').value),\n\t\t\t\t\t\t\t\t\tonSuccess: function(transport){\n\t\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.reload();}});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t-->\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t\t#CookieCart .CookieCartBorderColor td {\n\t\t\t\t\t\tborder-width:0px;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t#CookieCart table th {\n\t\t\t\t\t\ttext-align:left;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t\n\t\t\t\t<form " . (!$previewMode ? "id=\"cart\"" : "") . " onsubmit=\"return false;\">";
     }
     $tab = $this->table;
     $tab->addHeaderRow(array("", "Menge", "Artikel", "Einzelpreis", "Gesamtpreis", ""));
     #$tab->addColStyle(2, "text-align:right;");
     $tab->addColStyle(4, "text-align:right;");
     $tab->addColStyle(5, "text-align:right;");
     $tab->addColStyle(6, "text-align:right;");
     $steuern = array();
     $gesamt = 0;
     $netto = 0;
     $i = 0;
     if ($this->cookie != "") {
         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;
             }
             $steuern[$A->getA()->{$mwst}] += $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100) * $t[1];
             $gesamt += $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1) * $t[1];
             $netto += $A->getA()->{$preis} * 1 * $t[1];
             $image = $this->invokeParser($this->imagePathCallback[$num], $t[0], $A);
             if ($image != "") {
                 $parsedImage = "<img src=\"{$image}\" />";
             } else {
                 $parsedImage = "";
             }
             if ($this->imageParser != null) {
                 $parsedImage = $this->invokeParser($this->imageParser[$num], $t[0], $A);
             }
             #"<input type=\"input\" style=\"text-align:right;width:60px;\" name=\"amountOf_$t[0]_$t[2]\" value=\"$t[1]\" onkeydown=\"if(event.keyCode == 13) CookieCart.updateAmounts();\" />"
             $IMenge = new HTMLInput("amountOf_{$t['0']}_{$t['2']}", "text", $t[1]);
             $IMenge->style("text-align:right;width:60px;");
             $IMenge->onEnter("CookieCart.updateAmounts();");
             if ($t[2] == "CookieCart" and $t[0] == "1") {
                 $IMenge = $t[1];
             }
             $tab->addRow(array($parsedImage, !$previewMode ? $IMenge : "{$t['1']}", $A->getA()->{$name} . ((isset($A->getA()->{$artikelnummer}) and $A->getA()->{$artikelnummer} != "") ? "<br /><small>Art.Nr. " . $A->getA()->{$artikelnummer} . "</small>" : ""), Util::formatCurrency("de_DE", $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1), true) . "<br /><small>" . Util::formatNumber("de_DE", $A->getA()->{$mwst} * 1, 2, true, false) . "%</small>", Util::formatCurrency("de_DE", $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1) * $t[1], true), !$previewMode ? "<img style=\"cursor:pointer;\" onclick=\"CookieCart.deleteMe('{$t[0]}','{$t['2']}');\" alt=\"Artikel aus Warenkorb löschen\" title=\"Artikel aus Warenkorb löschen\" src=\"{$this->trashImage}\" />" : ""));
             $tab->addCellStyle(1, "vertical-align:top;");
             $tab->addCellStyle(2, "vertical-align:middle;");
             $tab->addCellStyle(3, "vertical-align:middle;");
             $i++;
         }
         if ($this->versandkostenBrutto != null) {
             $tab->addRow(array("", "1", $this->versandkostenBrutto[0], Util::formatCurrency("de_DE", $this->versandkostenBrutto[1], true), Util::formatCurrency("de_DE", $this->versandkostenBrutto[1], true)));
             $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 != "" ? "<br />" : "") . "" . Util::formatNumber("de_DE", $key * 1, 2, true, false) . "%: " . Util::formatCurrency("de_DE", $value, true);
         }
         $tab->addRow(array(!$previewMode ? "\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvalue=\"Mengen speichern\"\n\t\t\t\t\t\t\t\tonclick=\"CookieCart.updateAmounts();\"\n\t\t\t\t\t\t\t/>" : "", "", "", "Gesamt Netto", Util::formatCurrency("de_DE", $netto, true), ""));
         $tab->addCellStyle(1, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(2, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(3, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(4, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(5, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(6, "border-top-width:1px;border-top-style:solid;");
         $tab->addRowClass("CookieCartBorderColor");
         $tab->addRowColspan(1, 3);
         $tab->addRow(array("", "", "", "Gesamt MwSt", $s, ""));
         $tab->addRow(array("", "", "", "Gesamt", Util::formatCurrency("de_DE", $gesamt, true), ""));
         $tab->addCellStyle(4, "font-weight:bold;border-top-style:solid;border-top-width:1px;");
         $tab->addCellStyle(5, "font-weight:bold;border-top-style:solid;border-top-width:1px;");
         $tab->addRowClass("CookieCartBorderColor");
         #$tab->addCellStyle(2, "text-align:right;");
         if (!$previewMode) {
             $coupon = "";
             if ($this->couponCallback !== null) {
                 $showCouponField = $this->invokeParser($this->couponCallback, "showCouponField", null);
                 if ($showCouponField === true) {
                     $CI = new HTMLInput("CouponCode");
                     $CI->id("CouponCode");
                     $CI->onEnter("CookieCart.insertCoupon();");
                     $CB = new HTMLInput("CouponInsert", "button", "Gutschein einlösen");
                     $CB->style("margin-top:5px;");
                     $CB->onclick("CookieCart.insertCoupon();");
                 } else {
                     $CI = "";
                     $CB = $showCouponField;
                 }
                 $coupon = "<div class=\"CookieCartCoupon\"><p><b>Gutschein-Code:</b><br />{$CI}<br>{$CB}</p></div>";
             }
             $tab->addRow(array($coupon, "", ""));
             $tab->addRowStyle("height:30px;");
             $tab->addRowColspan(1, 4);
         }
         if (count($this->payment) > 0 and !$previewMode and $this->payNowButton == null) {
             $pay = "";
             foreach ($this->payment as $k => $v) {
                 if ($pay != "") {
                     $pay .= "<br /><br />";
                 }
                 switch ($v) {
                     case "PayPal":
                         $pay .= "<input name=\"payVia\" value=\"{$v}\" type=\"radio\" " . ($pay == "" ? "checked=\"checked\"" : "") . " />\n\t\t\t\t\t\t\t<img src=\"https://www.paypal.com/de_DE/DE/i/logo/logo_80x35.gif\" alt=\"PayPal\">";
                         break;
                     case "Überweisung":
                         $pay .= "<input name=\"payVia\" value=\"{$v}\" type=\"radio\" " . ($pay == "" ? "checked=\"checked\"" : "") . " /> Überweisung";
                         break;
                     case "Kreditkarte":
                         $pay .= "<input name=\"payVia\" value=\"{$v}\" type=\"radio\" " . ($pay == "" ? "checked=\"checked\"" : "") . " /> Kreditkarte";
                         break;
                 }
             }
             $tab->addRow(array("", "", "", "Zahlung via", "{$pay}"));
             $tab->addCellStyle(4, "vertical-align:top;");
             $tab->addRow(array("", "", "", "", ""));
             $tab->addRowStyle("height:30px;");
         }
         if (!$previewMode and $this->payNowButton === null) {
             $tab->addRow(array("", "", "", "\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvalue=\"Jetzt verbindlich bestellen\"\n\t\t\t\t\t\t\t\tstyle=\"border-color:green;width:220px;height:30px;color:green;\"\n\t\t\t\t\t\t\t\tonclick=\"CookieCart.orderNow();\"\n\t\t\t\t\t\t\t/>"));
             $tab->addRowColspan(4, 3);
         } elseif (!$previewMode and $this->payNowButton != null and $this->payNowButton != "") {
             $tab->addRow(array("<a href=\"{$this->payNowURL}\"><img alt=\"jetzt Bezahlen\" title=\"jetzt Bezahlen\" src=\"{$this->payNowButton}\" /></a>"));
             $tab->addRowColspan(1, 6);
             $tab->addCellStyle(1, "text-align:right;");
         }
         $html .= $tab->getHTML();
         $html .= "<input type=\"hidden\" name=\"returnP\" value=\"{$_GET['p']}\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"HandlerName\" value=\"CookieCartHandler\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"updateAll\" />\n\t\t\t\t</form>";
     } else {
         $html = "<p>Ihr Warenkorb enthält keine Artikel.</p>";
     }
     $_SESSION["CookieCart"] = $this;
     $this->elementPointer = 0;
     /*echo "<pre>";
     		echo $this->getCartText(false);
     		echo "</pre>";*/
     return "<div id=\"CookieCart\">" . $html . "</div>";
 }
Exemple #3
0
}
if (isset($_GET["getLink"]) and isset($_GET["fromPage"]) or isset($_GET["manualDL"])) {
    if (isset($_GET["manualDL"])) {
        $result = $RSF->download($_GET["manualDL"]);
        $dled = $_GET["manualDL"];
    } else {
        $result = $Adapter->download($RSF, $_GET["getLink"], $_GET["fromPage"]);
        $dled = $_GET["getLink"];
    }
    if ($result !== true) {
        $ILink = new HTMLInput("manualDL");
        $ILink->id("manualDL");
        $ILink->style("border:1px solid grey;width:400px;padding:2px;");
        $IGo = new HTMLInput("go", "button", "Go");
        $IGo->style("border:1px solid grey;margin-left:10px;padding:2px;");
        $IGo->onclick("if(document.getElementById('manualDL').value != '') document.location.href='?RSSFilterID={$_GET['RSSFilterID']}&manualDL='+document.getElementById('manualDL').value; else alert('Please input a link!');");
        $html = emoFatalError($result[0] . "</h1><p>Look for <b>" . basename($dled) . "</b></p><p>Please input the link here: " . $ILink . $IGo . "</p><h1>", $result[1], "trinityDB automatic downloader", false, false);
        $html = str_replace("<!-- MORE SPACE -->", "<iframe src=\"{$_GET['fromPage']}\" style=\"width:100%;border:0px;height:550px;margin-top:5px;\"></iframe>", $html);
        die($html);
    } else {
        echo "<!DOCTYPE html>\n\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t\t<meta charset=\"utf-8\" />\n\t\t\t\t<title>trinityDB automatic downloader</title>" . RSSFilter::getStyle() . "\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<div class=\"backgroundColor0\">\n\t\t\t\t\t<h1>Download OK</h1>\n\t\t\t\t\t<p>" . basename($dled) . "</p>\n\t\t\t\t\t<p>From <a href=\"{$_GET['fromPage']}\">{$_GET['fromPage']}</a></p>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>";
    }
    exit;
}
$tvdbUnavailable = false;
$tvdb = new thetvdbcomAdapter();
$nonupdated = 0;
try {
    $nonupdated = $tvdb->update();
} catch (Exception $ex) {
    $tvdbUnavailable = $ex->getMessage();