function com_install()
{
    include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_acymailing' . DS . 'helpers' . DS . 'helper.php';
    acymailing::increasePerf();
    $lang =& JFactory::getLanguage();
    $lang->load(ACYMAILING_COMPONENT, JPATH_SITE);
    $installClass = new acymailingInstall();
    $installClass->updateJoomailing();
    $installClass->addPref();
    $installClass->updatePref();
    $installClass->updateSQL();
    $installClass->displayInfo();
}
예제 #2
0
 function install()
 {
     acymailing::increasePerf();
     $newConfig = null;
     $newConfig->installcomplete = 1;
     $config = acymailing::config();
     $config->save($newConfig);
     $updateHelper = acymailing::get('helper.update');
     $updateHelper->installExtensions();
     $updateHelper->initList();
     $updateHelper->installNotifications();
     $updateHelper->installTemplates();
     $this->_iframe(ACYMAILING_UPDATEURL . 'install');
 }
예제 #3
0
 function queueHelper()
 {
     $this->config = acymailing::config();
     $this->subClass = acymailing::get('class.subscriber');
     $this->listsubClass = acymailing::get('class.listsub');
     $this->listsubClass->checkAccess = false;
     $this->send_limit = $this->config->get('queue_nbmail', 60);
     acymailing::increasePerf();
     @ini_set('default_socket_timeout', 10);
     @ignore_user_abort(true);
     $timelimit = ini_get('max_execution_time');
     if (!empty($timelimit)) {
         $this->stoptime = time() + $timelimit - 4;
     }
     $this->db =& JFactory::getDBO();
 }
예제 #4
0
 function process()
 {
     acymailing::increasePerf();
     $config = acymailing::config();
     $bounceClass = acymailing::get('helper.bounce');
     $bounceClass->report = true;
     if (!$bounceClass->init()) {
         return;
     }
     if (!$bounceClass->connect()) {
         acymailing::display($bounceClass->getErrors(), 'error');
         return;
     }
     acymailing::display(JText::sprintf('BOUNCE_CONNECT_SUCC', $config->get('bounce_username')), 'success');
     $nbMessages = $bounceClass->getNBMessages();
     acymailing::display(JText::sprintf('NB_MAIL_MAILBOX', $nbMessages), 'info');
     if (empty($nbMessages)) {
         return;
     }
     $bounceClass->handleMessages();
     $bounceClass->close();
 }
예제 #5
0
파일: data.php 프로젝트: bizanto/Hooked
 function doexport()
 {
     if (!$this->isAllowed('subscriber', 'export')) {
         return;
     }
     JRequest::checkToken() or die('Invalid Token');
     acymailing::increasePerf();
     $filtersExport = JRequest::getVar('exportfilter');
     $listsToExport = JRequest::getVar('exportlists');
     $fieldsToExport = JRequest::getVar('exportdata');
     $inseparator = JRequest::getString('exportseparator');
     if (!in_array($inseparator, array(',', ';'))) {
         $inseparator = ';';
     }
     $exportLists = array();
     if (!empty($filtersExport['subscribed'])) {
         foreach ($listsToExport as $listid => $checked) {
             if (!empty($checked)) {
                 $exportLists[] = (int) $listid;
             }
         }
     }
     $exportFields = array();
     foreach ($fieldsToExport as $fieldName => $checked) {
         if (!empty($checked)) {
             $exportFields[] = acymailing::secureField($fieldName);
         }
     }
     $where = array();
     if (empty($exportLists)) {
         $querySelect = 'SELECT s.`' . implode('`,s.`', $exportFields) . '` FROM ' . acymailing::table('subscriber') . ' as s';
     } else {
         $querySelect = 'SELECT DISTINCT s.`' . implode('`,s.`', $exportFields) . '` FROM ' . acymailing::table('listsub') . ' as a LEFT JOIN ' . acymailing::table('subscriber') . ' as s on a.subid = s.subid';
         $where[] = 'a.listid IN (' . implode(',', $exportLists) . ')';
         $where[] = 'a.status = 1';
     }
     if (!empty($filtersExport['confirmed'])) {
         $where[] = 's.confirmed = 1';
     }
     if (!empty($filtersExport['registered'])) {
         $where[] = 's.userid > 0';
     }
     if (JRequest::getInt('sessionvalues') and !empty($_SESSION['acymailing']['exportusers'])) {
         $where[] = 's.subid IN (' . implode(',', $_SESSION['acymailing']['exportusers']) . ')';
     }
     $query = $querySelect;
     if (!empty($where)) {
         $query .= ' WHERE (' . implode(') AND (', $where) . ')';
     }
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $allData = $db->loadAssocList();
     $exportFormat = JRequest::getString('exportformat');
     $encodingClass = acymailing::get('helper.encoding');
     @ob_clean();
     header("Pragma: public");
     header("Expires: 0");
     // set expiration time
     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
     header("Content-Type: application/force-download");
     header("Content-Type: application/octet-stream");
     header("Content-Type: application/download");
     header("Content-Disposition: attachment; filename=acymailingexport.csv;");
     header("Content-Transfer-Encoding: binary");
     $eol = "\r\n";
     $before = '"';
     $separator = '"' . $inseparator . '"';
     $after = '"';
     echo $before . implode($separator, $exportFields) . $after . $eol;
     for ($i = 0, $a = count($allData); $i < $a; $i++) {
         if (!empty($allData[$i]['created'])) {
             $allData[$i]['created'] = acymailing::getDate($allData[$i]['created'], '%Y-%m-%d %H:%M:%S');
         }
         echo $before . $encodingClass->change(implode($separator, $allData[$i]), 'UTF-8', $exportFormat) . $after . $eol;
     }
     exit;
 }
예제 #6
0
파일: import.php 프로젝트: bizanto/Hooked
 function importHelper()
 {
     acymailing::increasePerf();
     $this->db =& JFactory::getDBO();
 }