function display($tpl = NULL) { if (!FSS_Permission::CanModerate()) { return FSS_Admin_Helper::NoPerm(); } $this->comments = new FSS_Comments(null, null); if ($this->comments->Process()) { return; } parent::display(); }
function display($tpl = null) { $layout = FSS_Input::getCmd('layout'); if ($layout == "support") { return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_support', false)); } if ($layout == "content") { return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_content', false)); } if ($layout == "moderate") { return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_moderate', false)); } if ($layout == "shortcut") { return JFactory::getApplication()->redirect(FSSRoute::_('index.php?option=com_fss&view=admin_shortcut', false)); } $can_view = false; $view = array(); if (FSS_Permission::PermAnyContent()) { $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_content', false); $can_view = true; } if (FSS_Permission::AdminGroups()) { $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_groups', false); $can_view = true; } if (FSS_Permission::auth("fss.reports", "com_fss.reports")) { $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_report', false); $can_view = true; } if (FSS_Permission::auth("fss.handler", "com_fss.support_admin")) { $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_support', false); $can_view = true; } if (FSS_Permission::CanModerate()) { $view[] = FSSRoute::_('index.php?option=com_fss&view=admin_moderate', false); $can_view = true; } if (!$can_view) { return FSS_Admin_Helper::NoPerm(); } // if only 1 section visible, then view that section only if (count($view) == 1) { $mainframe = JFactory::getApplication(); $link = reset($view); $mainframe->redirect($link); } $this->comments = new FSS_Comments(null, null); $this->artcounts = FSS_ContentEdit::getArticleCounts(); parent::display(); }
?> </a> <?php } ?> </div> <?php } ?> <?php } ?> <?php if (FSS_Permission::CanModerate() && !$params->get('hide_moderate')) { ?> <?php if (FSS_Permission::auth("fss.handler", "com_fss.support_admin") && !$params->get('hide_tickets')) { ?> <h4><?php echo JText::_("MODERATE"); ?> </h4> <?php } ?> <ul> <?php $comments->DisplayModStatus("modstatus_module.php");
'> <img src='<?php echo JURI::root(true); ?> /components/com_fss/assets/images/support/support_16.png'> <?php echo JText::_("SA_SUPPORT"); ?> </a> </li> <?php } ?> <?php if (FSS_Permission::CanModerate()) { ?> <li class="<?php if ($this->view == "admin_moderate") { echo "active"; } ?> "> <a href='<?php echo FSSRoute::_('index.php?option=com_fss&view=admin_moderate'); ?> '> <img src='<?php echo JURI::root(true); ?> /components/com_fss/assets/images/support/moderate_16.png'>
function __construct($parent) { $this->comments = $parent; $this->comments->use_comments = 1; $this->comments->showheader = 0; $this->comments->show_item_select = 1; $this->comments->use_email = FSS_Settings::get('test_use_email'); //FSJ_Settings::GetComponentSetting( fsj_get_com(), 'comments_email', 1 ); $this->comments->use_website = FSS_Settings::get('test_use_website'); //FSJ_Settings::GetComponentSetting( fsj_get_com(), 'comments_website', 1 ); //$this->comments->opt_display = 0; $this->comments->add_a_comment = JText::_('ADD_A_TESTIMONIAL'); $this->comments->post_comment = JText::_('POST_TESTIMONIAL'); $this->email_title = "A Testimonial"; $this->email_article_type = JText::_('PRODUCT'); $this->description = JText::_('TESTIMONIALS'); $this->descriptions = JText::_('TESTIMONIALS'); $this->long_desc = JText::_('TESTIMONIALS'); $this->article_link = "index.php?option=com_fss&view=test&prodid={id}"; if (FSS_Settings::get('test_allow_no_product')) { $this->item_select_default = JText::_('GENERAL_TESTIMONIAL'); } else { $this->item_select_default = JText::_('SELECT_PRODUCT'); $this->item_select_must_have = 1; } if (FSS_Settings::get('test_who_can_add') == "anyone") { $this->comments->can_add = 1; } else { if (FSS_Settings::get('test_who_can_add') == "moderators") { if (!FSS_Permission::CanModerate()) { $this->comments->can_add = 0; } } else { if (FSS_Settings::get('test_who_can_add') == "registered") { if (JFactory::getUser()->id == 0) { $this->comments->can_add = 0; } } else { // who can add is an ACL, so need to do the acl test //echo "Testimonials ACL : " . FSS_Settings::get('test_who_can_add') . "<br>"; $user = JFactory::getUser(); $authed = $user->getAuthorisedViewLevels(); if (!in_array(FSS_Settings::get('test_who_can_add'), $authed)) { $this->comments->can_add = 0; } else { $this->comments->can_add = 1; } } } } // set up moderation $commod = FSS_Settings::get('test_moderate'); $this->comments->moderate = 0; if ($commod == "all") { $this->comments->moderate = 1; } elseif ($commod == "guests") { if (JFactory::getUser()->id == 0) { $this->comments->moderate = 1; } } elseif ($commod == "registered") { if (!FSS_Permission::CanModerate()) { $this->comments->moderate = 1; } } if (FSS_Permission::CanModerate()) { $this->comments->moderate = 0; } $this->comments->dest_email = FSS_Settings::get('test_email_on_submit'); $this->table = "#__fss_prod"; $this->has_published = 1; $this->field_title = "title"; $this->field_id = "id"; }
function DoDeleteComment() { $commentid = FSS_Input::getInt('commentid', 0); if (!FSS_Permission::CanModerate()) { return; } if (!$commentid) { return; } $db = JFactory::getDBO(); $qry = "DELETE FROM #__fss_comments WHERE id = '" . FSSJ3Helper::getEscaped($db, $commentid) . "'"; $db->SetQuery($qry); $db->Query(); exit; return true; }
<?php /** * @package Freestyle Joomla * @author Freestyle Joomla * @copyright (C) 2013 Freestyle Joomla * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('_JEXEC') or die; if (!$this->parser) { $this->parser = new FSSParser(); $this->parser->Load($this->template, $this->template_type); } $this->parser->Clear(); $moderation = ""; if (FSS_Permission::CanModerate() && array_key_exists('id', $this->comment)) { $lbl_type = "success"; if ($this->comment['published'] == 0) { $lbl_type = "info"; } if ($this->comment['published'] == 2) { $lbl_type = "warning"; } $moderation .= '<span class="pull-right label label-' . $lbl_type . '">'; $show_tick = ""; $show_cross = ""; $show_delete = ""; $show_edit = ""; if ($this->comment['published'] == 1) { $show_tick = "style='display: none'"; $show_delete = "style='display: none'";
static function OnlyGroups() { if (!FSS_Permission::PermAnyContent() && !FSS_Permission::auth("fss.handler", "com_fss.support_admin") && !FSS_Permission::auth("fss.reports", "com_fss.reports") && !FSS_Permission::CanModerate()) { return true; } return false; }
require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'helper.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'comments.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'tickethelper.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'models' . DS . 'admin.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'models' . DS . 'ticket.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'support_ticket.php'; require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'permission.php'; $db = JFactory::getDBO(); $listtype = $params->get('listtype'); $tickets_user_only = $params->get('tickets_user_only'); $tickets_closed_status = $params->get('tickets_closed_status'); $tickets_archived_status = $params->get('tickets_archived_status'); $tickets_show_my_tickets = $params->get('tickets_show_my_tickets'); $tickets_open_ticket = $params->get('tickets_open_ticket'); if ($listtype == "admin" || $listtype == "") { if (FSS_Permission::CanModerate() || FSS_Permission::auth("fss.handler", "com_fss.support_admin")) { $model = new FssModelAdmin(); $comments = new FSS_Comments(null, null); $moderatecount = $comments->GetModerateTotal(); FSS_Helper::StylesAndJS(); require JModuleHelper::getLayoutPath('mod_fss_support'); } else { $module->showtitle = 0; $attribs['style'] = "hide_me"; } } else { if ($listtype == "user") { $user = JFactory::getUser(); if ($user->id > 0) { $model = new FssModelTicket(); FSS_Helper::StylesAndJS();
</div> <?php } ?> <div class="control-group <?php echo $this->errors['name'] ? 'error' : ''; ?> "> <label class="control-label"><?php echo JText::_('Name'); ?> </label> <div class="controls"> <?php if (!FSS_Permission::CanModerate() && $this->loggedin) { ?> <input name='name' type='hidden' id='comment_name' value='<?php echo FSS_Helper::escape($this->post['name']); ?> ' placeholder="<?php echo JText::_('Name'); ?> " required> <?php echo $this->post['name']; ?> <?php } else { ?> <input type="text" name='name' id='comment_name' value='<?php
</h4> <?php } ?> </p> </td> </tr> </table> </div> <?php } ?> <?php if (FSS_Permission::CanModerate() && FSS_Settings::Get('mainmenu_moderate')) { ?> <div class="<?php if ($this->info_well) { ?> well well-mini<?php } else { ?> margin-medium<?php } ?> fss_mainmenu_moderate_panel"> <table class="table-borderless"> <tr> <td valign="middle" width="52" style="vertical-align: middle;" class="hidden-phone">