Example #1
0
 public function __construct(&$params, B2JMessageBoard &$messageboard, $fieldsbuilder)
 {
     parent::__construct($params, $messageboard);
     $this->Name = "B2JAntispam";
     $this->FieldsBuilder = $fieldsbuilder;
     $this->isvalid = intval($this->ValidateForSpam($fieldsbuilder));
 }
Example #2
0
 public function __construct(&$params, B2JMessageBoard &$messageboard, &$fieldsbuilder)
 {
     parent::__construct($params, $messageboard);
     $this->Name = "B2JSubmitter";
     $this->isvalid = count($_POST) > 1 && isset($_POST[$this->GetId()]);
     $this->fieldsbuilder = $fieldsbuilder;
 }
Example #3
0
 public function __construct(&$params, B2JMessageBoard &$messageboard)
 {
     parent::__construct($params, $messageboard);
     $this->Name = "B2JCaptcha";
     $this->Fields['Value'] = $this->FaultTolerance(JRequest::getVar("b2jcaptcha", NULL, 'POST'));
     $jsession = JFactory::getSession();
     $this->b2jsession = new B2JSession($jsession->getId(), $this->Application->b2jcomid, $this->Application->b2jmoduleid, $this->Application->bid);
     $this->Fields['Secret'] = $this->FaultTolerance($this->b2jsession->Load('captcha_answer'));
     $this->isvalid = intval($this->Validate());
 }
Example #4
0
 public function __construct(&$params, B2JMessageBoard &$messageboard, &$fieldsbuilder)
 {
     parent::__construct($params, $messageboard);
     $this->FieldsBuilder = $fieldsbuilder;
     $this->Logger = new B2JLogger();
     $jsession = JFactory::getSession();
     $this->B2JSession = new B2JSession($jsession->getId(), $this->Application->b2jcomid, $this->Application->b2jmoduleid, $this->Application->bid);
     $data = $this->B2JSession->Load('filelist');
     if ($data) {
         $this->FileList = explode("|", $data);
     } else {
         $this->FileList = array();
     }
 }
Example #5
0
 public function __construct(&$params, B2JMessageBoard &$messageboard)
 {
     parent::__construct($params, $messageboard);
     $this->senderEmail = $this->getSenderEmail();
     if (!isset($GLOBALS[$GLOBALS["ext_name"] . '_js_loaded'])) {
         $min = JFactory::getConfig()->get("debug") ? "" : ".min";
         JHtml::_("jquery.framework");
         $document = JFactory::getDocument();
         $document->addScript(JRoute::_("index.php?option=" . $GLOBALS["com_name"] . "&view=loader&owner=" . $this->Application->owner . "&id=" . $this->Application->oid . "&type=js&filename=jtext"));
         $document->addScript(JUri::base(true) . "/components/" . $GLOBALS["com_name"] . "/js/fileuploader.js");
         $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");
         $document->addScript(JUri::base(true) . "/components/" . $GLOBALS["com_name"] . "/js/glDatePicker.js");
         $document->addScript(JUri::base(true) . "/components/" . $GLOBALS["com_name"] . "/js/chosen.jquery.js");
         $GLOBALS[$GLOBALS["ext_name"] . '_js_loaded'] = true;
     }
     $this->isvalid = intval($this->ValidateForm());
     // show lang notice
     $config = JComponentHelper::getParams("com_b2jcontact");
     $front_notis = $config->get('front_notis');
     if (isset($front_notis)) {
         if ($front_notis == 1) {
             $notice = true;
         } else {
             $notice = false;
         }
     } else {
         $notice = true;
     }
     if ($notice) {
         $lang_handler = new B2JLangHandler();
         if ($lang_handler->HasMessages()) {
             $message = array();
             $message[] = 'Thank you for using B2J Contact!';
             $langMeesages = $lang_handler->GetMessages();
             foreach ($langMeesages as $langMes) {
                 $message[] = $langMes;
             }
             $message[] = "Join B2J Contact Translation group on <a target='_blank' href='http://www.transifex.com/projects/p/b2j-contact/'>Transifex</a>. You may turn this message off from the Global Configurations of the component.";
             $messageboard->Append($message, B2JMessageBoard::warning);
         }
     }
     // show lang notice
 }
Example #6
0
 public function __construct(&$params, B2JMessageBoard &$messageboard)
 {
     parent::__construct($params, $messageboard);
     $this->Name = "FAjaxFilePump";
     $this->isvalid = true;
 }
Example #7
0
 public function __construct(&$params, B2JMessageBoard &$messageboard)
 {
     parent::__construct($params, $messageboard);
     $this->Name = "FFilePump";
     $this->isvalid = intval($this->DoUpload());
 }