Esempio n. 1
0
 function normal($params)
 {
     //$headerAcajoom = '<link rel="stylesheet" href="' . $GLOBALS['mosConfig_live_site']. '/components/com_acajoom/css/acajoom.css" type="text/css" />';
     //$mainframe->addCustomHeadTag($headerAcajoom);
     $this->shownamefield = $params->get('shownamefield', 0);
     $this->receivehtmldefault = $params->get('receivehtmldefault', 1);
     $this->showreceivehtml = $params->get('showreceivehtml', 0);
     $this->listIds = $params->get('listids', 0);
     $this->linear = $params->get('linear', 0);
     $this->fieldsize = $params->get('fieldsize', 10);
     $this->introtext = $params->get('introtext', '');
     $this->redirectURL = str_replace('&', '&amp;', $params->get('red_url', ''));
     $this->showListName = $params->get('showlistname', 1);
     $this->buttonUnregistered = $params->get('button_text', _ACA_MOD_SUBSCRIBE);
     $this->imgUnregistered = $params->get('button_img', null);
     $this->buttonRegistered = $params->get('button_text_change', _ACA_CHANGE_SUBSCRIPTIONS);
     $this->imgRegistered = $params->get('button_img_change', null);
     $this->moduleclass_sfx = $params->get('moduleclass_sfx', '');
     $this->mod_align = $params->get('mod_align', '');
     $this->posttext = $params->get('posttext', '');
     $this->defaultchecked = $params->get('defaultchecked', 1);
     $this->lists = lists::getSpecifiedLists($this->listIds);
     $this->_html = '<!--  Beginning Module : ' . acajoom::version() . '   -->' . "\n\r";
     $this->_html .= $this->create();
     $this->_html .= '<!--  End Module : ' . acajoom::version() . '   -->' . "\n\r";
     $this->_html .= acajoom::noShow();
     return $this->_html;
 }
Esempio n. 2
0
 function processConfirmationEmail($subscriberId, $listSub)
 {
     $status = true;
     $qid[0] = $subscriberId;
     $receiver = subscribers::getSubscribersFromId($qid, false);
     $listIds = implode(",", $listSub);
     $lists = lists::getSpecifiedLists($listIds, false);
     $message = '';
     foreach ($lists as $list) {
         $Sub_TAG = '';
         if (substr_count($list->subscribemessage, '[CONFIRM]') < 1) {
             $Sub_TAG = '[CONFIRM]';
         }
         $mailing = null;
         if (empty($list->subscribemessage)) {
             $list->subscribemessage = '    ';
         }
         $mailing->subject = _ACA_SUBSCRIBE_SUBJECT_MESS;
         $mailing->htmlcontent = $list->subscribemessage . $Sub_TAG;
         $mailing->textonly = $list->subscribemessage . $Sub_TAG;
         $mailing->fromname = $list->sendername;
         $mailing->fromemail = $list->senderemail;
         $mailing->frombounce = $list->bounceadres;
         $mailing->id = 0;
         $mailing->issue_nb = 0;
         $mailing->images = '';
         $mailing->attachments = '';
         if (!acajoom_mail::sendOne($mailing, $receiver, $list, $message)) {
             $status = false;
         }
         $erro = 'Could not send the confirmation email, for list #:' . $list->id . ' , please contact the webmaster!';
         break;
     }
     return $status;
 }
Esempio n. 3
0
 function getDisplayRegistration($tab, $user, $ui)
 {
     if (ACA_CMSTYPE) {
         // joomla 15
         $my =& JFactory::getUser();
     } else {
         //joomla 1x
         global $my;
     }
     //endif
     require_once ACA_JPATH_ROOT_NO_ADMIN . '/administrator/components/com_acajoom/classes/class.acajoom.php';
     $html = '';
     if ($GLOBALS['aca_cb_plugin'] == '1') {
         $lists = lists::getSpecifiedLists($GLOBALS['aca_cb_listIds'], false);
         if (!empty($lists)) {
             $i = 0;
             $accessLevel = 18;
             //default access level jack 31
             $htmlOK = false;
             if (!empty($GLOBALS['aca_cb_intro'])) {
                 $html .= '<tr><td class="titleCell" colspan="2">' . $GLOBALS['aca_cb_intro'] . '</td></tr>';
             }
             if ($GLOBALS['aca_cb_showname']) {
                 foreach ($lists as $list) {
                     $i++;
                     $subscribed = 0;
                     if ($list->html == 1) {
                         $htmlOK = true;
                     }
                     $checked = $GLOBALS['aca_cb_checkLists'];
                     if ($list->hidden == 1) {
                         $subscriber->blacklist = 0;
                         if ($checked != 0) {
                             $checkedPrint = ' checked="checked" ';
                         } else {
                             $checkedPrint = '';
                         }
                         $html .= '<tr>';
                         if ($GLOBALS['aca_cb_checkLists'] == 1) {
                             $text = "\n" . '<td class="titleCell" style="text-align: right;"><input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" checked="checked" /></td>';
                         } else {
                             $text = "\n" . '<td class="titleCell" style="text-align: right;"><input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" ' . $checkedPrint . ' /></td>';
                         }
                         $text .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                         $text .= "\n" . '<td class="fieldCell"><span class="aca_list_name" onclick=\'return false;\'>' . compa::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, '#', 1) . '</span></td>';
                         $html .= $text;
                         $html .= '</tr>';
                     } else {
                         $html .= '<input type="hidden"  value=1 name="subscribed[' . $i . ']" />';
                         $html .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                     }
                     $html .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />';
                 }
             } else {
                 foreach ($lists as $list) {
                     $i++;
                     $html .= '<input type="hidden"  value="1" name="subscribed[' . $i . ']" />';
                     $html .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                     $html .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />';
                     if ($list->html == 1) {
                         $htmlOK = true;
                     }
                 }
             }
             $checked = $GLOBALS['aca_cb_defaultHTML'];
             if ($htmlOK) {
                 if ($GLOBALS['aca_cb_showHTML']) {
                     $html .= '<tr>';
                     if ($checked != 0) {
                         $checkedPrint = ' checked="checked" ';
                     } else {
                         $checkedPrint = '';
                     }
                     $text = '<td class="titleCell" style="text-align: right;"><input type="checkbox" class="inputbox" value="1" name="receive_html" ' . $checkedPrint . ' /></td>';
                     $text .= '<td class="fieldCell">' . _ACA_RECEIVE_HTML . '</td>';
                     $html .= acajoom::printLine(false, $text);
                     $html .= '</tr>';
                 } else {
                     $html .= '<input type="hidden" value="' . $checked . '" name="receive_html" />' . "\n";
                 }
             } else {
                 $html .= '<input type="hidden" value="' . $checked . '" name="receive_html" />' . "\n";
             }
         } else {
             $html = '<input type="hidden" value="' . $GLOBALS['aca_cb_defaultHTML'] . '" name="receive_html" />' . "\n";
         }
     } else {
         $html = '<input type="hidden" value="' . $GLOBALS['aca_cb_defaultHTML'] . '" name="receive_html" />' . "\n";
     }
     return $html;
 }