コード例 #1
0
ファイル: class.module.php プロジェクト: naka211/kkvn
 /**
  *
  * display in the module when registered
  */
 function forLoggedIn($Itemid)
 {
     $HTML = '';
     $checked = $this->receivehtmldefault;
     if ($this->showreceivehtml) {
         $checkedPrint = $checked != 0 ? 'checked="checked"' : '';
         $text = '<input id="wz_2" type="checkbox" class="inputbox" value="1" name="receive_html" ' . $checkedPrint . ' />';
         $text .= ' <span class="receiveHTML">' . _JNEWS_RECEIVE_HTML . '</span>';
         $HTML .= jnews::printLine($this->linear, $text);
     } else {
         $HTML .= '<input id="wz_2" type="hidden" value="' . $checked . '" name="receive_html" />' . "\n";
     }
     $my = JFactory::getUser();
     $subscriber = jNews_Subscribers::getSubscriberInfoFromUserId($my->id);
     //get the user subscriber info
     if ($GLOBALS[JNEWS . 'show_unsubscribe_all']) {
         if ($subscriber) {
             $link = 'option=' . JNEWS_OPTION . '&act=unsubscribeall&subscriber=' . $subscriber->id . '&Itemid=' . $Itemid;
             $link = jNews_Tools::completeLink($link, false);
             $text = '<span class="aca_list_name"><a href="' . $link . '">' . _JNEWS_UNSUBSCRIBE_ALL . '</a></span>';
             $HTML .= jnews::printLine($this->linear, $text);
         }
     }
     $HTML .= $this->_showButton(true);
     return $HTML;
 }
コード例 #2
0
ファイル: jnews_cb.php プロジェクト: naka211/kkvn
 function getDisplayRegistration($tab, $user, $ui)
 {
     $my = JFactory::getUser();
     require_once JNEWS_JPATH_ROOT_NO_ADMIN . DS . 'administrator' . DS . 'components' . DS . JNEWS_OPTION . DS . 'classes' . DS . 'class.jnews.php';
     require_once JNEWS_JPATH_ROOT_NO_ADMIN . DS . 'administrator' . DS . 'components' . DS . JNEWS_OPTION . DS . 'classes' . DS . 'class.lists.php';
     $html = '';
     if ($GLOBALS['jnews_cb_plugin'] == '1') {
         $lists = jNews_Lists::getSpecifiedLists($GLOBALS['jnews_cb_listIds'], false);
         if (!empty($lists)) {
             $i = 0;
             $accessLevel = 18;
             //default access level jack 31
             $htmlOK = false;
             if (!empty($GLOBALS['jnews_cb_intro'])) {
                 $html .= '<tr><td class="titleCell" colspan="2">' . $GLOBALS['jnews_cb_intro'] . '</td></tr>';
             }
             if ($GLOBALS['jnews_cb_showname']) {
                 foreach ($lists as $list) {
                     $i++;
                     $subscribed = 0;
                     if ($list->html == 1) {
                         $htmlOK = true;
                     }
                     $checked = $GLOBALS['jnews_cb_checkLists'];
                     if ($list->hidden == 1) {
                         $subscriber->blacklist = 0;
                         if ($checked != 0) {
                             $checkedPrint = ' checked="checked" ';
                         } else {
                             $checkedPrint = '';
                         }
                         $html .= '<tr>';
                         if ($GLOBALS['jnews_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;\'>' . jNews_Tools::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['jnews_cb_defaultHTML'];
             if ($htmlOK) {
                 if ($GLOBALS['jnews_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">' . _JNEWS_RECEIVE_HTML . '</td>';
                     $html .= jnews::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['jnews_cb_defaultHTML'] . '" name="receive_html" />' . "\n";
         }
     } else {
         $html = '<input type="hidden" value="' . $GLOBALS['jnews_cb_defaultHTML'] . '" name="receive_html" />' . "\n";
     }
     return $html;
 }