Exemplo n.º 1
0
 function saveConfig($config)
 {
     $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__);
     $configKeys = array_keys($config);
     $size = sizeof($configKeys);
     for ($index = 0; $index < $size; $index++) {
         if (get_magic_quotes_gpc()) {
             $key = stripslashes($configKeys[$index]);
             $text = stripslashes($config[$configKeys[$index]]);
         } else {
             $key = $configKeys[$index];
             $text = $config[$configKeys[$index]];
         }
         $key = stripslashes($key);
         $key = str_replace("'", "", $key);
         if ($key == 'token_new' && !empty($text)) {
             $key = 'token';
             $erro->ck = $this->update('license', '');
         }
         if ($key == 'license1') {
             $text = trim($text);
             $key = 'license';
         }
         if (isset($GLOBALS[ACA . $key]) and $GLOBALS[ACA . $key] != $text) {
             if ($key == 'token') {
                 $code = auto::getToken($text);
             }
             $erro->ck = $this->update($key, $text);
         }
         $erro->E(__LINE__, '9010', $config);
     }
     if (class_exists('auto')) {
         auto::good();
     }
     return $erro->R();
 }
Exemplo n.º 2
0
 function deleteSubsQueue($subscriber_id, $listId)
 {
     if (ACA_CMSTYPE) {
         $database =& JFactory::getDBO();
     } else {
         global $database;
     }
     //endif
     $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__);
     if ($subscriber_id > 0) {
         $query = 'DELETE FROM `#__acajoom_queue` WHERE `subscriber_id` = ' . $subscriber_id;
         if ($listId > 0) {
             $query .= ' AND `list_id` =' . $listId;
         }
         $database->setQuery($query);
         $database->query();
         $erro->err = $database->getErrorMsg();
         $erro->E(__LINE__, '8539', $database);
     }
     return $erro->R();
 }
Exemplo n.º 3
0
 function remove($subscriberId, $cle = '', $listId)
 {
     $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__);
     if (!empty($subscriberId) and !empty($cle) and $listId > 0) {
         $qid[0] = $subscriberId;
         $subscriber = subscribers::getSubscribersFromId($qid, false);
         if (md5($subscriber->email) == $cle) {
             $suscription = new stdClass();
             $suscription->user_id = $subscriberId;
             $suscription->sub_list_id[1] = $listId;
             $suscription->subscribed[1] = 0;
             $suscription->acc_level[1] = 0;
             $erro->ck = queue::updateSuscription($suscription);
             $erro->Eck(__LINE__, '8277');
             $list = lists::getOneList($listId);
             if ($list->unsubscribesend == 1) {
                 $erro->err = acajoom_mail::sendUnsubcribeEmail($subscriberId, $list);
                 $erro->E(__LINE__, '8278');
             }
         }
     }
     return $erro->R();
 }
Exemplo n.º 4
0
 function deleteSubscriber($subId)
 {
     global $database;
     $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__);
     $query = 'DELETE FROM `#__acajoom_subscribers` WHERE `id` = ' . $subId;
     $database->setQuery($query);
     $database->query();
     $erro->err = $database->getErrorMsg();
     if ($erro->E(__LINE__, '8625', $database)) {
         $xf = new xonfig();
         $xf->plus('act_totalsubcribers0', -1);
     }
     return $erro->R();
 }