public static function showSubscribersFE($listId = 0, $action, $task, $front = false) { $my = JFactory::getUser(); if (empty($my->id)) { return true; } $userId = JRequest::getVar('userid', 0); $Itemid = JRequest::getInt('Itemid'); $listId = JRequest::getvar('listid', 0); $linkForm = 'option=' . JNEWS_OPTION; $linkForm = jNews_Tools::completeLink($linkForm, false, false); $linkForm = '#'; $mainLink = JRoute::_('index.php?option=' . JNEWS_OPTION); $forms['main'] = "<form action='{$mainLink}' method='post' name='adminForm' enctype='multipart/form-data' onsubmit='submitbutton();return false;' id=\"adminForm\">"; // menu cpanel $menuCpanel = new stdClass(); $menuCpanel->popup = new stdClass(); $menuCpanel->popup->isPop = false; $menuCpanel->popup->isPop = false; $menuCpanel->link = $linkForm; $menuCpanel->action = 'cpanel'; $menuCpanel->onclick = new stdClass(); $menuCpanel->onclick->custom = true; $menuCpanel->onclick->js = "javascript: submitbutton('cpanel')"; $menuCpanel->title = _JNEWS_MENU_CPANEL; $linkDelete = 'option=' . JNEWS_OPTION . '&act=subscribers&task=delete'; $linkDelete = jNews_Tools::completeLink($linkDelete, false, false); $menuDelete = new stdClass(); $menuDelete->popup = new stdClass(); $menuDelete->popup->isPop = false; $menuDelete->link = '#'; $menuDelete->action = 'delete'; $menuDelete->onclick = new stdClass(); $menuDelete->onclick->custom = true; if (version_compare(JVERSION, '1.6.0', '<')) { //j15 $menuDelete->onclick->js = "javascript:if(document.adminForm.boxchecked.value==0){alert('Please make a selection from the list to delete');}else{ hideMainMenu(); submitbutton('delete')}"; } else { $menuDelete->onclick->js = "javascript:if(document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list');}else{ Joomla.submitbutton('delete')}"; } $menuDelete->title = _JNEWS_DELETE; $linkImport = 'option=' . JNEWS_OPTION . '&act=subscribers&task=import'; $linkImport = jNews_Tools::completeLink($linkImport, false); $menuImport = new stdClass(); $menuImport->popup = new stdClass(); $menuImport->popup->isPop = false; $menuImport->link = '#'; $menuImport->action = 'import'; $menuImport->onclick = new stdClass(); $menuImport->onclick->custom = true; $menuImport->onclick->js = "javascript: submitbutton('import')"; $menuImport->title = "Import"; $linkNew = 'option=' . JNEWS_OPTION . '&act=subscribers&task=new'; $linkNew = jNews_Tools::completeLink($linkNew, false); $menuNew = new stdClass(); $menuNew->popup = new stdClass(); $menuNew->popup->isPop = false; $menuNew->link = '#'; $menuNew->action = 'new'; $menuNew->onclick = new stdClass(); $menuNew->onclick->custom = false; $menuNew->onclick->js = ''; $menuNew->title = 'Add'; $linkSave = 'option=' . JNEWS_OPTION . '&act=subscribers&task=doNew'; $linkSave = jNews_Tools::completeLink($linkSave, false); $menuSave = new stdClass(); $menuSave->popup = new stdClass(); $menuSave->popup->isPop = false; $menuSave->link = '#'; $menuSave->action = 'doNew'; $menuSave->onclick = new stdClass(); $menuSave->onclick->custom = false; $menuSave->onclick->js = ''; $menuSave->title = _JNEWS_SAVE; $linkUpdateOne = 'option=' . JNEWS_OPTION . '&act=subscribers&task=updateOneSub'; $linkUpdateOne = jNews_Tools::completeLink($linkUpdateOne, false); $menuUpdateOne = new stdClass(); $menuUpdateOne->popup = new stdClass(); $menuUpdateOne->popup->isPop = false; $menuUpdateOne->link = '#'; $menuUpdateOne->action = 'updateOneSub'; $menuUpdateOne->onclick = new stdClass(); $menuUpdateOne->onclick->custom = true; $menuUpdateOne->onclick->js = "javascript: submitbutton('updateOneSub')"; $menuUpdateOne->title = "Update"; $menuBack = new stdClass(); $menuBack->popup = new stdClass(); $menuBack->popup->isPop = false; $menuBack->link = '#'; $menuBack->action = 'back'; $menuBack->onclick = new stdClass(); $menuBack->onclick->custom = true; $menuBack->onclick->js = 'javascript:history.go(-1)'; $menuBack->title = _JNEWS_MENU_BACK; $menuDivider = new stdClass(); $menuDivider->divider = true; $menuA = array(); if (@(include_once JNEWSPATH_ADMIN . 'social' . DS . 'class.social.php')) { if (class_exists('jNews_Social') && $task != 'import' && $task != 'show' && $task != 'new') { $menuA['delete'] = $menuDelete; $menuA['import'] = $menuImport; $menuA['new'] = $menuNew; } if (class_exists('jNews_Social') && $task == 'show') { $menuA['updateOneSub'] = $menuUpdateOne; } if (class_exists('jNews_Social') && $task == 'new') { $menuA['doNew'] = $menuSave; } } $menuA['cpanel'] = $menuCpanel; frontHTML::formStart(_JNEWS_SUBSCRIBERS, 0, '', $menuA); $go[] = jnews::makeObj('list_id', 18); $go[] = jnews::makeObj('itemid', $Itemid); $go[] = jnews::makeObj('act', $action); //$go[] = jnews::makeObj('task', ''); frontHTML::FEmenu(); $cid = JRequest::getVar('cid', 0); require_once JNEWSPATH_ADMIN . 'controllers' . DS . 'subscribers.jnews.php'; require_once JNEWSPATH_ADMIN . 'views' . DS . 'subscribers.jnews.html.php'; subscribers($action, $task, $userId, $listId, $cid, true); frontHTML::formEndFN(null, $go); return true; }
$mailingId = mosGetParam($_REQUEST, 'mailingid', 0); $listId = mosGetParam($_REQUEST, 'listid', 0); $listType = mosGetParam($_REQUEST, 'listype', 0); $cid = mosGetParam($_REQUEST, 'cid', array()); if (!is_array($cid)) { $cid = array(0); } if (!function_exists('sefRelToAbs')) { @(include_once $GLOBALS['mosConfig_absolute_path'] . '/includes/sef.php'); } switch ($action) { case 'list': lists($action, $task, $listId, $listType); break; case 'subscribers': subscribers($action, $task, $userid, $listId, $cid); break; case 'mailing': mailing($action, $task, $listId, $listType, $mailingId, $message); break; case 'statistics': statistics($listId, $listType, $mailingId, $message, $task, $action); break; case 'configuration': if ($GLOBALS[ACA . 'integration'] == '0' or $GLOBALS[ACA . 'cb_integration'] == '0') { $xf = new xonfig(); if (acajoom::checkCB()) { $xf->loadConfig(); } } configuration($action, $task);