%PDF- %PDF-
Direktori : /home/eirtvhdf/www/testbeta-atif/mail/ |
Current File : /home/eirtvhdf/www/testbeta-atif/mail/form.config.php |
<?php namespace JF; /** Copyright 2018 JQueryForm.com License: http://www.jqueryform.com/license.php FormID: eirtech-cform Date: 2018-10-23 15:23:57 Version: v2.1.4 Generated by http://www.jqueryform.com PHP 5.3+ is required. If mailgun is used AND the form has file upload field, PHP 5.5+ is required. */ class Config { private static $config; public static function getConfig( $decode = true ){ self::$config = self::_getConfig( $decode ); self::overwriteConfig(); return self::$config; } private static function _getConfig( $decode = true ){ ob_start(); // --------------------------------------------------------------------- // JSON format config // Note: please make a copy before you edit config manually // --------------------------------------------------------------------- /**JSON_START**/ ?> { "formId": "eirtech-cform", "email": { "to": "akhan_24@hotmail.com", "cc": "", "bcc": "", "subject": "{f4}", "template": "" }, "admin": { "users": "admin:8a302", "dataDelivery": "emailAndFile" }, "thankyou": { "url": "", "message": "", "seconds": "10" }, "autoResponse": { "includeAttachments": true, "subject": "", "template": "" }, "seo": { "trackerId": "", "title": "", "description": "", "keywords": "", "author": "" }, "mailer": "local", "smtp": { "host": "", "user": "", "password": "" }, "mailgun": { "domain": "", "apiKey": "", "fromEmail": "", "fromName": "" }, "styles": { "iCheck": { "enabled": true, "skin": "flat", "colorScheme": "black" }, "Select2": { "enabled": true } }, "logics": [], "fields": [ { "label": "Your Name", "field_type": "name", "field_options": { "size": "small", "sender": "fullname", "images": { "urls": "", "slideshow": false }, "validators": { "required": { "enabled": true } }, "placeholder": "Your Name", "addon": { "leftIcon": "glyphicon glyphicon-user" } }, "id": "f1", "cid": "c1", "labelHide": true }, { "label": "Email", "field_type": "email", "field_options": { "size": "small", "sender": true, "images": { "urls": "", "slideshow": false }, "validators": { "email": { "enabled": true }, "required": { "enabled": true } }, "addon": { "leftIcon": "glyphicon glyphicon-envelope", "leftText": "" }, "placeholder": "Email" }, "id": "f2", "cid": "c2", "labelHide": true }, { "label": "Subject", "field_type": "name", "field_options": { "size": "small", "sender": "", "images": { "urls": "", "slideshow": false }, "validators": { "required": { "enabled": true } }, "placeholder": "Subject", "addon": { "leftIcon": "glyphicon glyphicon-pencil" } }, "cid": "c28", "id": "f4", "labelHide": true }, { "label": "Comments", "field_type": "paragraph", "field_options": { "images": { "urls": "", "slideshow": false }, "validators": { "required": { "enabled": true } }, "addon": { "leftIcon": "glyphicon glyphicon-edit" }, "placeholder": "Comments" }, "id": "f3", "cid": "c3", "labelHide": true }, { "label": "Submit Button", "field_type": "submit", "required": true, "field_options": { "page": { "title": "Submit", "labelPrev": "< Back", "showPageNumnber": false, "pageNumberText": "{page} \/ {total}" }, "images": { "urls": "", "slideshow": false } }, "labelHide": true, "submit": { "label": "", "icon": "", "checkRequiredFields": "" }, "id": "f0", "cid": "c0" } ], "gdpr": { "consentFieldId": "", "saveData": "no" }, "licenseKey": "" } <?php /**JSON_END**/ $json = ob_get_clean() ; return $decode ? json_decode( trim($json), true ) : $json; } // end of getConfig() private static function getValue( $fieldId, $default = NULL ){ return isset( $_POST[$fieldId] ) ? $_POST[$fieldId] : $default ; } private static function overwriteConfig(){ //self::get_to(); } private static function get_to(){ $value = self::getValue( 'c25' ); $to = array( 'Option 1' => 'a@a.com', 'Option 2' => 'b@b.com', 'Option 3' => 'c@c.com', ); if( isset( $to[$value] ) ){ self::$config['email']['to'] = $to[ $value ]; }; } } // end of Config class