Example #1
0
 function display($tpl = null)
 {
     $test = JRequest::getVar('test');
     if ($test > 0) {
         return $this->TestAccount($test);
     }
     JToolBarHelper::title(JText::_('TICKET_EMAIL_ACCOUNT_MANAGER'), 'fss_emailaccounts');
     JToolBarHelper::custom('log', 'html', 'html', 'View Log', false);
     JToolBarHelper::deleteList();
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     JToolBarHelper::cancel('cancellist');
     FSSAdminHelper::DoSubToolbar();
     $task = JRequest::GetVar('task');
     if ($task == "log") {
         return $this->ViewLog();
     }
     $lists = $this->get('Lists');
     $document = JFactory::getDocument();
     //JHTML::_( 'behavior.mootools' );
     //$document->addStyleSheet( JURI::base() . 'components/com_fss/assets/slimbox/slimbox.css' );
     //$document->addScript( JURI::base() .'components/com_fss/assets/slimbox/slimbox.js');
     $pubslihed = array();
     $pubslihed[] = JHTML::_('select.option', '-1', JText::_('Is_Published'), 'id', 'title');
     $pubslihed[] = JHTML::_('select.option', '1', JText::_('Published'), 'id', 'title');
     $pubslihed[] = JHTML::_('select.option', '0', JText::_('Unpublished'), 'id', 'title');
     $lists['published'] = JHTML::_('select.genericlist', $pubslihed, 'ispublished', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'id', 'title', $lists['ispublished']);
     $this->lists = $lists;
     $this->data = $this->get('Data');
     $this->pagination = $this->get('Pagination');
     $this->imap_ok = function_exists("imap_open");
     $this->ini_location = $this->GetINILocation();
     parent::display($tpl);
 }
 function serverImport()
 {
     if (!igGeneralHelper::authorise('core.admin')) {
         return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
     }
     $filePathRaw = JRequest::GetVar('path');
     $filePath = str_replace('*', '\\', $filePathRaw);
     if (!($fileData = igFileHelper::processImportedImage($filePath))) {
         return false;
     }
     $model = $this->getModel();
     if (!$model->store($fileData)) {
         echo $model->getError();
         return false;
     }
     echo 1;
 }
Example #3
0
 function testdates()
 {
     // test the 4 date formats
     $date = time();
     $result = array();
     $result['date_dt_short'] = $this->testdate($date, JRequest::GetVar('date_dt_short'));
     $result['date_dt_long'] = $this->testdate($date, JRequest::GetVar('date_dt_long'));
     $result['date_d_short'] = $this->testdate($date, JRequest::GetVar('date_d_short'));
     $result['date_d_long'] = $this->testdate($date, JRequest::GetVar('date_d_long'));
     $result['timezone_offset'] = $this->testdate($date, 'Y-m-d H:i:s');
     echo json_encode($result);
     exit;
 }
Example #4
0
 function testdates()
 {
     // test the 4 date formats
     $date = time();
     $result = array();
     $offset = (int) JRequest::GetVar('offset');
     FSS_Settings::set('timezone_offset', $offset);
     $date_dt_short = JRequest::GetVar('date_dt_short');
     if ($date_dt_short == "") {
         $date_dt_short = JText::_('DATE_FORMAT_LC4') . ', H:i';
     }
     $result['date_dt_short'] = $this->testdate($date, $date_dt_short);
     $date_dt_long = JRequest::GetVar('date_dt_long');
     if ($date_dt_long == "") {
         $date_dt_long = JText::_('DATE_FORMAT_LC3') . ', H:i';
     }
     $result['date_dt_long'] = $this->testdate($date, $date_dt_long);
     $date_d_short = JRequest::GetVar('date_d_short');
     if ($date_d_short == "") {
         $date_d_short = JText::_('DATE_FORMAT_LC4');
     }
     $result['date_d_short'] = $this->testdate($date, $date_d_short);
     $date_d_long = JRequest::GetVar('date_d_long');
     if ($date_d_long == "") {
         $date_d_long = JText::_('DATE_FORMAT_LC3');
     }
     $result['date_d_long'] = $this->testdate($date, $date_d_long);
     $result['timezone_offset'] = $this->testdate($date, 'Y-m-d H:i:s');
     echo json_encode($result);
     exit;
 }
Example #5
0
 function pluginForm()
 {
     $plugin = JRequest::GetVar('plugin', '');
     if ($plugin == "") {
         exit;
     }
     $plugin = FSSCF::get_plugin($plugin);
     echo $plugin->DisplaySettings(null);
     exit;
 }