public function __construct(&$params, FoxMessageBoard &$messageboard) { parent::__construct($params, $messageboard); $this->ValidateEmail(); // email can have text without being valid // Load resources only once static $resources = true; if ($resources) { // The easy way to include chosen. It taunts the page source with tons of embedded javascripts. // JHtml::_("jquery.framework"); // jquery // JHtml::_('behavior.framework', true); // mootools // JHtml::_('formbehavior.chosen', 'select'); // chosen // We need jQuery to be loaded before our scripts JHtml::_("jquery.framework"); $foxDocument = FoxDocument::getInstance(); $foxDocument->addResource(array("root" => "components", "filename" => "foxtext", "type" => "js")); // Prevent further load of the same resources $resources = false; } $this->isvalid = intval($this->ValidateForm()); // Are all fields valid? $lang_handler = new FLangHandler(); if ($lang_handler->HasMessages()) { $messageboard->Append($lang_handler->GetMessages(), FoxMessageBoard::warning); } $conflict = new FoxConflicting(); if ($conflict->HasMessages()) { $messageboard->Append($conflict->GetMessages(), FoxMessageBoard::warning); } }
public function __construct(&$params, FoxMessageBoard &$messageboard) { parent::__construct($params, $messageboard); $this->ValidateEmail(); // email can have text without being valid // Load required js only once if (!isset($GLOBALS[$GLOBALS["ext_name"] . '_js_loaded'])) { // The easy way to include chosen. It taunts the page source with tons of embedded javascripts. // JHtml::_("jquery.framework"); // jquery // JHtml::_('behavior.framework', true); // mootools // JHtml::_('formbehavior.chosen', 'select'); // chosen // We need jQuery to be loaded before our scripts JHtml::_("jquery.framework"); $foxDocument = FoxDocument::getInstance(); $min = JFactory::getConfig()->get("debug") ? "" : ".min"; $foxDocument->addResource(array("root" => "components", "filename" => "jtext", "type" => "js")); $foxDocument->addScript(JUri::base(true) . "/components/" . $GLOBALS["com_name"] . "/js/fileuploader" . $min . ".js"); $document = JFactory::getDocument(); // chosen.jquery requires core for Joomla.JText $uncompressed = JFactory::getConfig()->get("debug") ? "-uncompressed" : ""; $document->addScript(JUri::base(true) . "/media/system/js/core" . $uncompressed . ".js"); $document->addScript(JUri::base(true) . "/media/jui/js/chosen.jquery" . $min . ".js"); $GLOBALS[$GLOBALS["ext_name"] . '_js_loaded'] = true; } $this->isvalid = intval($this->ValidateForm()); // Are all fields valid? $lang_handler = new FLangHandler(); if ($lang_handler->HasMessages()) { $messageboard->Append($lang_handler->GetMessages(), FoxMessageBoard::warning); } $conflict = new FoxConflicting(); if ($conflict->HasMessages()) { $messageboard->Append($conflict->GetMessages(), FoxMessageBoard::warning); } }
public function __construct(&$params, &$messages, $fieldsbuilder) { parent::__construct($params, $messages); $this->Name = "FAntispam"; $this->FieldsBuilder = $fieldsbuilder; $this->isvalid = intval($this->ValidateForSpam($fieldsbuilder)); }
public function __construct(&$params, FoxMessageBoard &$messageboard, &$fieldsbuilder) { parent::__construct($params, $messageboard); $this->FieldsBuilder = $fieldsbuilder; $this->logger = new FLogger(); $this->load_newsletter_config(); $this->load_newsletter_lists(); }
public function __construct(&$params, &$messages) { parent::__construct($params, $messages); $this->Name = "FSubmitter"; // count($_POST): // 0 -> no submitted // 1 -> submitted, but $_FILES exceeds server limits, and is been resetted // 1+ -> submittend. We can try to validate fields. $this->isvalid = count($_POST) > 1 && isset($_POST[$this->GetId()]); }
public function __construct(&$params, FoxMessageBoard &$messageboard) { parent::__construct($params, $messageboard); $this->Name = "FCaptcha"; // Read captcha value submitted $this->Fields['Value'] = $this->FaultTolerance(JRequest::getVar("fcaptcha", NULL, 'POST')); // Read from the session $this->Fields['Secret'] = $this->FaultTolerance($this->session->get("captcha_answer", "", $this->namespace)); // Check if the answer if correct $this->isvalid = intval($this->Validate()); }
public function __construct(&$params, FoxMessageBoard &$messageboard, &$fieldsbuilder) { //$this->Params = & $params; //$this->MessageBoard = & $messageboard; parent::__construct($params, $messageboard); /* JLog::addLogger(array( 'text_file' => 'foxcontact.log.php', "text_entry_format" => "{DATE}\t{TIME}\t{PRIORITY}\t{CATEGORY}\t{MESSAGE}" )); */ $this->FieldsBuilder = $fieldsbuilder; $this->Logger = new FLogger(); // Read attachments file list from the session $this->FileList = $this->session->get("filelist", array(), $this->namespace); }
public function __construct(&$params, &$messages) { parent::__construct($params, $messages); $this->Name = "FCaptcha"; // Read captcha value submitted $this->Fields['Value'] = $this->FaultTolerance(JRequest::getVar("fcaptcha", NULL, 'POST')); // Read captcha answer $jsession = JFactory::getSession(); $this->fsession = new FSession($jsession->getId(), $this->Application->cid, $this->Application->mid); $this->Fields['Secret'] = $this->FaultTolerance($this->fsession->Load('captcha_answer')); /* // Reset captcha solution in the session after read it, avoiding that a f****d lamer // abuse of the *same session* without request the captcha again, to send tons of email $fsession->PurgeValue("captcha_answer"); // Do not purge it any more to keep a good answer if other fields are wrong. // However, purge it after email sent, avoiding the lamer above use the same value to send other email */ // Check if the answer if correct $this->isvalid = intval($this->Validate()); }
public function __construct(&$params, FoxMessageBoard &$messageboard, &$fieldsbuilder) { parent::__construct($params, $messageboard); /* JLog::addLogger(array( 'text_file' => 'foxcontact.log.php', "text_entry_format" => "{DATE}\t{TIME}\t{PRIORITY}\t{CATEGORY}\t{MESSAGE}" )); */ $this->FieldsBuilder = $fieldsbuilder; $this->Logger = new FLogger(); // Read attachments file list from the session $jsession = JFactory::getSession(); $this->FSession = new FSession($jsession->getId(), $this->Application->cid, $this->Application->mid); $data = $this->FSession->Load('filelist'); // Read the list from the session if ($data) { $this->FileList = explode("|", $data); } else { $this->FileList = array(); } }
public function __construct(&$params, &$messages) { parent::__construct($params, $messages); $this->Name = "FFieldPump"; $this->ValidateEmail(); // email can have text without being valid // Show checkboxes javascript in <head> section as a source if (!isset($GLOBALS[$GLOBALS["ext_name"] . '_checkbox_js_loaded'])) { $this->js_load("fcheckbox-min.js", 1, 0); $GLOBALS[$GLOBALS["ext_name"] . '_checkbox_js_loaded'] = true; } // Show dropdown javascript in <head> section as a source if (!isset($GLOBALS[$GLOBALS["ext_name"] . '_dropdown_js_loaded'])) { $this->js_load("dropdown-min.js", 1, 0); $GLOBALS[$GLOBALS["ext_name"] . '_dropdown_js_loaded'] = true; } $this->isvalid = intval($this->ValidateForm()); // Are all fields valid? $lang_handler = new FLangHandler(); if ($lang_handler->HasMessages()) { $messages += $lang_handler->GetMessages(); } }
public function __construct(&$params, FoxMessageBoard &$messageboard) { parent::__construct($params, $messageboard); $this->Name = "FFilePump"; $this->isvalid = intval($this->DoUpload()); }
public function __construct(&$params, &$messages) { parent::__construct($params, $messages); $this->Name = "FAjaxFilePump"; $this->isvalid = true; }
public function __construct(&$params, FoxMessageBoard &$messageboard) { parent::__construct($params, $messageboard); $this->Name = "FAjaxFilePump"; $this->isvalid = true; }