function editSubscriber($subscriber, $listings, $queues, $forms, $access = false, $frontEnd = false, $cb = false)
 {
     global $my, $mainframe;
     mosCommonHTML::loadOverlib();
     $lists['receive_html'] = mosHTML::yesnoRadioList('receive_html', 'class="inputbox"', $subscriber->receive_html);
     $lists['confirmed'] = mosHTML::yesnoRadioList('confirmed', 'class="inputbox"', $subscriber->confirmed);
     $lists['blacklist'] = mosHTML::yesnoRadioList('blacklist', 'class="inputbox"', $subscriber->blacklist);
     $br = "\n\r";
     $html = $forms['main'];
     $html .= '<div style="width:100%; align:left;">' . $br;
     $html .= '<fieldset class="acajoomcss" style="padding: 10px; text-align: left">' . $br;
     $html .= '<legend><strong>' . _ACA_SUB_INFO . '</strong></legend>' . $br;
     $html .= '<table cellpadding="0" cellspacing="0" align="center">' . $br;
     $text = str_replace('"', '&quot;', $subscriber->name);
     if (function_exists('htmlspecialchars_decode')) {
         $text = htmlspecialchars_decode($text, ENT_NOQUOTES);
     } elseif (function_exists('html_entity_decode')) {
         $text = html_entity_decode($text, ENT_NOQUOTES);
     }
     if (!$cb) {
         $html .= acajoom::miseEnHTML(_ACA_INPUT_NAME, _ACA_INPUT_NAME_TIPS, '<input type="text" name="name" size="30" value="' . $text . '" class="inputbox" />');
         $html .= acajoom::miseEnHTML(_ACA_INPUT_EMAIL, _ACA_INPUT_EMAIL_TIPS, '<input type="text" name="email" size="30" class="inputbox" value="' . $subscriber->email . ' "  />');
     } else {
         $html .= '<input type="hidden" name="cb_integration" value="1"  />';
     }
     $html .= acajoom::miseEnHTML(_ACA_RECEIVE_HTML, _ACA_RECEIVE_HTML_TIPS, $lists['receive_html']);
     if ($GLOBALS[ACA . 'time_zone'] == 1) {
         $html .= acajoom::miseEnHTML(_ACA_TIME_ZONE_ASK, _ACA_TIME_ZONE_ASK_TIPS, ' <input type="text" name="timezone" size="30" class="inputbox" value="' . $subscriber->timezone . '"  />');
     } else {
         $html .= '<input type="hidden" name="timezone" value="' . $subscriber->timezone . '"  />';
     }
     if ($access) {
         if ($subscriber->user_id == 0) {
             $html .= acajoom::miseEnHTML(_ACA_CONFIRMED, '', $lists['confirmed']);
         } else {
             if (!$cb or !$mainframe->isAdmin()) {
                 $html .= '<input type="hidden" name="confirmed" value="' . $subscriber->confirmed . '" />';
             }
         }
         $html .= acajoom::miseEnHTML(_ACA_BLACK_LIST, '', $lists['blacklist']);
         $html .= acajoom::miseEnHTML(_ACA_REGISTRATION_DATE, '', $subscriber->subscribe_date);
         $html .= acajoom::miseEnHTML(_ACA_USER_ID, '', $subscriber->user_id);
     } else {
         $html .= '<input type="hidden" name="confirmed" value="' . $subscriber->confirmed . '" />';
         $html .= '<input type="hidden" name="blacklist" value="' . $subscriber->blacklist . '" />';
     }
     $html .= '</table>';
     $html .= '</fieldset></div>';
     $html .= subscribersHTML::showSubscriberLists($subscriber, $listings, $queues, $frontEnd, $access);
     return $html;
 }
Ejemplo n.º 2
0
 function showSubscriberLists($subscriberId, $action)
 {
     $lists = lists::getLists(0, 0, $subscriberId, '', false, true, false);
     if ($subscriberId == 0) {
         $subscriber = '';
         $queues = '';
         subscribersHTML::showSubscriberLists($subscriber, $lists, $queues, true);
     } else {
         frontEnd::subscriptions($subscriberId, 0, 'save');
     }
     return true;
 }