createHidden('time', '', 'time'); $time = $form->getElementValue('time'); if(!$time) { $time = time(); } $form->setDefaultValue('time', $time); $form->setCheckData('time', array('type' => \Validate::$VALIDATE_NUMBER, 'empty' => false, 'min' => time() - 3600, 'max' => time() - 10)); $form->setErrorData('time', array(\Validate::$ERROR_NOTNUMBER => _("Formzustand ungültig"), \Validate::$ERROR_EMPTY => _("Formzustand ungültig"), \Validate::$ERROR_MIN => _("Formzustand ungültig"), \Validate::$ERROR_MAX => _("Formzustand ungültig")) ); #storeselect $form->createSelectBox('storeSelect', 'storeSelect'); $form->addOption('storeSelect', '', '-- Bitte einen Store wählen --', true); if(defined('STORE_STATES') && STORE_STATES !== '') { $states = explode(',', STORE_STATES); $states[] = 'COMING_SOON'; $showStores = \DBFGN\Shop::getActiveShopsBySystem(SYSTEMID, false, 'zip ASC', $states); } else { $showStores = \DBFGN\Shop::getActiveShopsBySystem(SYSTEMID, false, 'zip ASC'); } foreach($showStores as $store){ $vals = ''; $h2ort = ($store->town_extra) ? ($store->town.' '.$store->town_extra) : $store->town; $vals = $store->zip.' '.$h2ort.', '.$store->street.' '.$store->house_no; $form->addOption('storeSelect', $vals, $vals); $range[] = $vals;} $form->setCheckData('storeSelect', array('type' => \Validate::$VALIDATE_STRING, 'empty' => false, 'range' => $range)); $form->setErrorData('storeSelect', array(\Validate::$ERROR_NOTSTRING => _("Filialauswahl ist ungültig"), \Validate::$ERROR_EMPTY => _("Filialauswahl darf nicht leer sein"), \Validate::$ERROR_RANGE => _("Filialauswahl ist ungültig"))); #deliverytime $form->createRadioContainer('deliveryTime', '','rowContent radio deliveryTime'); $form->setRequired('deliveryTime'); $form->addRadio('deliveryTime', 'Sehr gut','deliveryTime1','20-30 min','radioDIV topdown first'); $form->addRadio('deliveryTime', 'Gut','deliveryTime2','30-40 min','radioDIV topdown second'); $form->addRadio('deliveryTime', 'Geht so','deliveryTime3','40-50 min','radioDIV topdown third'); $form->addRadio('deliveryTime', 'Mies','deliveryTime4','über 50 min','radioDIV topdown fourth'); #politenessPhone $form->createRadioContainer('politenessPhone', 'Freundlichkeit am Telefon','rowContent full radio withDesc'); $form->setRequired('politenessPhone'); $form->addRadio('politenessPhone', 'Sehr gut','politenessPhone1','','radioDIV first'); $form->addRadio('politenessPhone', 'Gut','politenessPhone2','','radioDIV second'); $form->addRadio('politenessPhone', 'Geht so','politenessPhone3','','radioDIV third'); $form->addRadio('politenessPhone', 'Mies','politenessPhone4','','radioDIV fourth'); #politenessDriver $form->createRadioContainer('politenessDriver', 'Freundlichkeit des Lieferanten','rowContent full radio withDesc'); $form->setRequired('politenessDriver'); $form->addRadio('politenessDriver', 'Sehr gut','politenessDriver1','','radioDIV first'); $form->addRadio('politenessDriver', 'Gut','politenessDriver2','','radioDIV second'); $form->addRadio('politenessDriver', 'Geht so','politenessDriver3','','radioDIV third'); $form->addRadio('politenessDriver', 'Mies','politenessDriver4','','radioDIV fourth'); #taste $form->createRadioContainer('taste', 'Geschmack','rowContent full radio withDesc'); $form->setRequired('taste'); $form->addRadio('taste', 'Sehr gut','taste1','','radioDIV first'); $form->addRadio('taste', 'Gut','taste2','','radioDIV second'); $form->addRadio('taste', 'Geht so','taste3','','radioDIV third'); $form->addRadio('taste', 'Mies','taste4','','radioDIV fourth'); #look $form->createRadioContainer('look', 'Optik','rowContent full radio withDesc'); $form->setRequired('look'); $form->addRadio('look', 'Sehr gut','look1','','radioDIV first'); $form->addRadio('look', 'Gut','look2','','radioDIV second'); $form->addRadio('look', 'Geht so','look3','','radioDIV third'); $form->addRadio('look', 'Mies','look4','','radioDIV fourth'); #freshness $form->createRadioContainer('freshness', 'Temperatur','rowContent full radio withDesc'); $form->setRequired('freshness'); $form->addRadio('freshness', 'Sehr gut','freshness1','','radioDIV first'); $form->addRadio('freshness', 'Gut','freshness2','','radioDIV second'); $form->addRadio('freshness', 'Geht so','freshness3','','radioDIV third'); $form->addRadio('freshness', 'Mies','freshness4','','radioDIV fourth'); #first + lastname $form->createTextfield('firstname', 'firstname','Vorname*'); $form->setRequired('firstname'); $form->setMaxlen('firstname', 255); $form->createTextfield('lastname', 'lastname','Name*'); $form->setRequired('lastname'); $form->setMaxlen('lastname', 255); #zip + town $form->createTextfield('zip', 'zip','PLZ: *','textfield','textfieldwrapper addressboxCol first smallLeft'); $form->setRequired('zip'); $form->setMaxlen('zip', 255); $form->createTextfield('town', 'town','Ort: *','textfield','textfieldwrapper addComma addressboxCol bigRight'); $form->setRequired('town'); $form->setMaxlen('town', 255); #street + houseno $form->createTextfield('street', 'street','Strasse:','textfield','textfieldwrapper addressboxCol bigLeft'); $form->setMaxlen('street', 255); $form->createTextfield('houseno', 'houseno','Nr:','textfield','textfieldwrapper addComma addressboxCol smallRight'); $form->setMaxlen('houseno', 255); #email $form->createEMail('email', 'email','Ihre E-Mail-Adresse: *'); $form->setRequired('email'); #remark $form->createTextArea('remark', 'remark','Schreib uns Deine persönliche Meinung (max. 2000 Zeichen) ','textarea','textareawrapper',NULL,NULL,'AUTO','BOTTOM','TOP','AUTO',false,false,'error','labelTextarea',2000); ### //Bot-Check $form->createTextfield('familienstand', 'kontakt_familienstand','Familienstand:'); $form->setDivClass('kontakt_familienstand', 'optional'); $form->setCheckData('kontakt_familienstand', array('type' => \Validate::$VALIDATE_STRING, 'empty' => true, 'regexp' => '/^$/')); $form->setErrorData('kontakt_familienstand', array(\Validate::$ERROR_NOTSTRING => _("Formzustand ungültig"), \Validate::$ERROR_REGEXP => _("Formzustand ungültig"))); $ret = $form->validate(); if($ret === true){ $successMessage = true; $message = new MessageManager($ratingFile); $recipient = (defined('RATE_EMAIL') && RATE_EMAIL)? RATE_EMAIL : 'kunden@frischergehts.net'; $message->setRecipient($recipient); $sender = (defined('RATE_SENDER') && RATE_SENDER)? RATE_SENDER : 'rating@pizzamax.de'; $message->setSender($sender); $message->setSubject("Feedback via Lob- und Kritikformular"); $message->setTemplate(\SystemInit::searchFile('rating/tpl_mail.html')); $message->parse('NAME', $form->getElementValue('firstname')." ".$form->getElementValue('lastname')); $message->parse('EMAIL',$form->getElementValue('email')); $message->parse('ADDRESS',$form->getElementValue('street').' '.$form->getElementValue('houseno')); $message->parse('TOWN',$form->getElementValue('zip').', '.$form->getElementValue('town')); $message->parse('STORESELECT',$form->getElementValue('storeSelect')); $message->parse('DELIVERYTIME',$form->getElementValue('deliveryTime')); $message->parse('POLITENESSPHONE',$form->getElementValue('politenessPhone')); $message->parse('POLITENESSDRIVER',$form->getElementValue('politenessDriver')); $message->parse('TASTE',$form->getElementValue('taste')); $message->parse('LOOK',$form->getElementValue('look')); $message->parse('FRESHNESS',$form->getElementValue('freshness')); $message->parse('REMARK',$form->getElementValue('remark')); $success = $message->sendEMail(); if($success === true){ // Formular leeren $form->clearElement('firstname'); $form->clearElement('lastname'); $form->clearElement('email'); $form->clearElement('street'); $form->clearElement('houseno'); $form->clearElement('zip'); $form->clearElement('town'); $form->clearElement('storeSelect'); $form->clearElement('deliveryTime'); $form->clearElement('politenessPhone'); $form->clearElement('politenessDriver'); $form->clearElement('taste'); $form->clearElement('look'); $form->clearElement('freshness'); $form->clearElement('remark'); $successMessage = true; } else { $errorMessage = true; } } elseif($ret === false){// damit Hinweisfeld nicht beim ersten Aufruf angezeigt wird $errors = $form->getElementErrors(); } ###schreiben### $tplContent->parse("TIME", $form->getElementHTML('time')); $tplContent->parse("STORES", $form->getElementHTML('storeSelect')); $tplContent->parse("DELIVERYTIME", $form->getElementHTML('deliveryTime')); $tplContent->parse("POLITENESSPHONE", $form->getElementHTML('politenessPhone')); $tplContent->parse("POLITENESSDRIVER", $form->getElementHTML('politenessDriver')); $tplContent->parse("TASTE", $form->getElementHTML('taste')); $tplContent->parse("LOOK", $form->getElementHTML('look')); $tplContent->parse("FRESHNESS", $form->getElementHTML('freshness')); $tplContent->parse("FIRSTNAME", $form->getElementHTML('firstname')); $tplContent->parse("LASTNAME", $form->getElementHTML('lastname')); $tplContent->parse("STREET", $form->getElementHTML('street')); $tplContent->parse("HOUSENO", $form->getElementHTML('houseno')); $tplContent->parse("ZIP", $form->getElementHTML('zip')); $tplContent->parse("TOWN", $form->getElementHTML('town')); $tplContent->parse("EMAIL", $form->getElementHTML('email')); $tplContent->parse("REMARK", $form->getElementHTML('remark')); $tplContent->parse("SPAMBOT", $form->getElementHTML('kontakt_familienstand')); if($errorMessage === true){ $tplContent->parse('AJAX_CONTENT',$tplError->getTemplate()); $tplContent->parse('POPOUT_VISIBLE','visible'); } if($successMessage === true){ $tplContent->parse('AJAX_CONTENT',$tplSuccess->getTemplate()); $tplContent->parse('POPOUT_VISIBLE','visible'); } if($successMessage !== true ){ #$tplContent->parse('FEEDBACK_FORM',$tplFeedbackForm->getTemplate()); } ?> Pizza Max - Ihr Lieferdienst in Berlin. Einfach online Pizza und Pasta bestellen und liefern lassen.
Feedback

Feedback

Der Pizza Max Newsletter

Mit unserem Newsletter wirst Du immer als Erster über neue Aktionen, Gutscheine oder Neuigkeiten rund um Pizza Max informiert. Melde Dich kostenlos an und geniesse viele Vorteile!

Pizza Max als App und auf Facebook

Icon Google Play Icon Apple Appstore Icon Facebook