public static function show($lists) { if (JCOMMENTS_JVERSION != '1.0') { ?> <script type="text/javascript"> <!-- function tableOrdering(order, dir, task) { var form = document.adminForm; form.filter_order.value = order; form.filter_order_Dir.value = dir; document.adminForm.submit(task); } //--> </script> <?php } ?> <form action="<?php echo JCOMMENTS_INDEX; ?> " method="post" name="adminForm" id="adminForm"> <table class="adminheading" width="100%"> <tr> <?php if (JCOMMENTS_JVERSION == '1.0') { ?> <th style="background-image: none; padding: 0;"><img src="components/com_jcomments/assets/icon-48-blacklist.png" width="48" height="48" align="middle" alt="<?php echo JText::_('A_BLACKLIST'); ?> " /> <?php echo JText::_('A_BLACKLIST'); ?> </th> <?php } ?> <td nowrap="nowrap" align="left" width="50%"> <label for="search"><?php echo JText::_('A_FILTER'); ?> :</label> <input type="text" name="search" id="search" value="<?php echo $lists['search']; ?> " class="text_area" onchange="document.adminForm.submit();" /> <button onclick="this.form.submit();"><?php echo JText::_('A_FILTER_APPLY'); ?> </button> <button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo JText::_('A_FILTER_RESET'); ?> </button> </td> <td nowrap="nowrap" align="right" width="50%"></td> </tr> </table> <table class="adminlist" cellspacing="1"> <thead> <tr> <th width="1%"><input type="checkbox" id="toggle" name="toggle" value="" onclick="checkAll(<?php echo count($lists['rows']); ?> );" /></th> <?php if (JCOMMENTS_JVERSION == '1.0') { ?> <th width="10%" align="left" nowrap="nowrap"><?php echo JText::_('A_BLACKLIST_IP'); ?> </th> <th width="20%" align="left"><?php echo JText::_('A_BLACKLIST_REASON'); ?> </th> <th width="60%" align="left"><?php echo JText::_('A_BLACKLIST_NOTES'); ?> </th> <th width="10%" align="left"><?php echo JText::_('A_BLACKLIST_CREATED'); ?> </th> <?php } else { ?> <th width="10%" align="left" nowrap="nowrap"><?php echo JHTML::_('grid.sort', 'A_BLACKLIST_IP', 'bl.ip', $lists['order_Dir'], $lists['order']); ?> </th> <th width="20%" align="left"><?php echo JHTML::_('grid.sort', 'A_BLACKLIST_REASON', 'bl.reason', $lists['order_Dir'], $lists['order']); ?> </th> <th width="60%" align="left"><?php echo JHTML::_('grid.sort', 'A_BLACKLIST_NOTES', 'bl.notes', $lists['order_Dir'], $lists['order']); ?> </th> <th width="10%" align="left"><?php echo JHTML::_('grid.sort', 'A_BLACKLIST_CREATED', 'bl.created', $lists['order_Dir'], $lists['order']); ?> </th> <?php } ?> </tr> </thead> <tbody> <?php for ($i = 0, $k = 0, $n = count($lists['rows']); $i < $n; $i++) { $row =& $lists['rows'][$i]; $link = JCOMMENTS_INDEX . '?option=com_jcomments&task=blacklist.edit&hidemainmenu=1&cid=' . $row->id; ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"><?php echo JCommentsHTML::_('grid.checkedout', $row, $i); ?> </td> <td align="left"><a href="<?php echo $link; ?> " title="<?php echo JText::_('A_EDIT'); ?> "><?php echo $row->ip; ?> </a></td> <td align="left"><?php echo $row->reason; ?> </td> <td align="left"><?php echo $row->notes; ?> </td> <td align="center"><?php echo $row->created; ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> <tfoot> <tr> <td colspan="15"><?php echo $lists['pageNav']->getListFooter(); ?> </td> </tr> </tfoot> </table> <input type="hidden" name="option" value="com_jcomments" /> <input type="hidden" name="task" value="blacklist" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?> " /> <input type="hidden" name="filter_order_Dir" value="" /> <?php echo JCommentsSecurity::formToken(); ?> </form> <?php }
public static function show($lists) { $filter = ''; $filterClear = ''; if (isset($lists['fog'])) { $filter .= ' ' . $lists['fog']; $filterClear .= "document.getElementById('fog').value='';"; } if (isset($lists['flang'])) { $filter .= ' ' . $lists['flang']; $filterClear .= "document.getElementById('flang').value='';"; } if (isset($lists['foid'])) { $filter .= ' ' . $lists['foid']; $filterClear .= "document.getElementById('foid').value='';"; } if (isset($lists['fauthor']) && $lists['fauthor'] != '') { $filter .= ' ' . $lists['fauthor']; $filterClear .= "document.getElementById('fauthor').value='';"; } if (isset($lists['fstate'])) { $filter .= ' ' . $lists['fstate']; $filterClear .= "document.getElementById('fstate').value='';\n"; } if (JCOMMENTS_JVERSION != '1.0') { ?> <script type="text/javascript"> <!-- function tableOrdering(order, dir, task) { var form = document.adminForm; form.filter_order.value = order; form.filter_order_Dir.value = dir; document.adminForm.submit(task); } //--> </script> <?php } ?> <form action="<?php echo JCOMMENTS_INDEX; ?> " method="post" name="adminForm" id="adminForm"> <table class="adminheading" width="100%"> <tr> <?php if (JCOMMENTS_JVERSION == '1.0') { ?> <th style="background-image: none; padding: 0;"><img src="components/com_jcomments/assets/icon-48-subscriptions.png" width="48" height="48" align="middle" alt="<?php echo JText::_('A_SUBSCRIPTIONS'); ?> " /> <?php echo JText::_('A_SUBSCRIPTIONS'); ?> </th> <?php } ?> <td nowrap="nowrap" align="left" width="50%"> <label for="search"><?php echo JText::_('A_FILTER'); ?> :</label> <input type="text" name="search" id="search" value="<?php echo $lists['search']; ?> " class="text_area" onchange="document.adminForm.submit();" /> <button onclick="this.form.submit();"><?php echo JText::_('A_FILTER_APPLY'); ?> </button> <button onclick="document.getElementById('search').value='';<?php echo $filterClear; ?> this.form.submit();"><?php echo JText::_('A_FILTER_RESET'); ?> </button> </td> <td nowrap="nowrap" align="right" width="50%"> <?php if (trim($filter) != '') { echo $filter; } ?> </td> </tr> </table> <table class="adminlist jgrid" cellspacing="1"> <thead> <tr> <th width="1%"><input type="checkbox" id="toggle" name="toggle" value="" onclick="checkAll(<?php echo count($lists['rows']); ?> );" /></th> <?php if (JCOMMENTS_JVERSION == '1.0') { ?> <th width="20%" align="left" nowrap="nowrap"><?php echo JText::_('A_SUBSCRIPTION_NAME'); ?> </th> <th width="20%" align="left"><?php echo JText::_('A_SUBSCRIPTION_EMAIL'); ?> </th> <th width="40%" align="left"><?php echo JText::_('A_COMMENT_OBJECT_TITLE'); ?> </th> <th width="10%" align="left"><?php echo JText::_('A_COMPONENT'); ?> </th> <th width="10%" nowrap="nowrap"><?php echo JText::_('A_PUBLISHING'); ?> </th> <?php } else { ?> <th width="20%" align="left" nowrap="nowrap"><?php echo JHTML::_('grid.sort', 'A_SUBSCRIPTION_NAME', 'js.name', $lists['order_Dir'], $lists['order']); ?> </th> <th width="20%" align="left"><?php echo JHTML::_('grid.sort', 'A_SUBSCRIPTION_EMAIL', 'js.email', $lists['order_Dir'], $lists['order']); ?> </th> <th width="40%" align="left"><?php echo JText::_('A_COMMENT_OBJECT_TITLE'); ?> </th> <th width="10%" align="left"><?php echo JHTML::_('grid.sort', 'A_COMPONENT', 'js.object_group', $lists['order_Dir'], $lists['order']); ?> </th> <th width="10%" nowrap="nowrap"><?php echo JHTML::_('grid.sort', 'A_PUBLISHING', 'js.published', $lists['order_Dir'], $lists['order']); ?> </th> <?php } ?> </tr> </thead> <tbody> <?php for ($i = 0, $k = 0, $n = count($lists['rows']); $i < $n; $i++) { $row =& $lists['rows'][$i]; $row->title = JCommentsBackendObjectHelper::getTitle($row->object_id, $row->object_group, $row->lang); $row->link = JCommentsBackendObjectHelper::getLink($row->object_id, $row->object_group, $row->lang); $link = JCOMMENTS_INDEX . '?option=com_jcomments&task=subscription.edit&hidemainmenu=1&cid=' . $row->id; ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"><?php echo JCommentsHTML::_('grid.id', $row, $i); ?> </td> <td align="left"><a href="<?php echo $link; ?> " title="<?php echo JText::_('A_EDIT'); ?> "><?php echo $row->name; ?> </a></td> <td align="left"><?php echo $row->email; ?> </td> <td align="left"><a href="<?php echo $row->link; ?> " title="<?php echo htmlspecialchars($row->title); ?> " target="_blank"><?php echo $row->title; ?> </a></td> <td align="left">[<?php echo $row->object_group; ?> ]</td> <td align="center"><?php echo JCommentsHTML::_('grid.published', $row, $i, 'subscription.'); ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> <tfoot> <tr> <td colspan="15"><?php echo $lists['pageNav']->getListFooter(); ?> </td> </tr> </tfoot> </table> <input type="hidden" name="option" value="com_jcomments" /> <input type="hidden" name="task" value="subscriptions" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?> " /> <input type="hidden" name="filter_order_Dir" value="" /> <?php echo JCommentsSecurity::formToken(); ?> </form> <?php }
public static function show($lists) { $app = JCommentsFactory::getApplication('administrator'); include_once JCOMMENTS_HELPERS . DS . 'system.php'; $link = JCommentsSystemPluginHelper::getCSS(); if (JCOMMENTS_JVERSION == '1.0') { $app->addCustomHeadTag('<link href="' . $link . '" rel="stylesheet" type="text/css" />'); } else { $document = JFactory::getDocument(); $document->addStyleSheet($link); } ?> <form action="<?php echo JCOMMENTS_INDEX; ?> " method="post" name="adminForm" id="adminForm"> <table class="adminheading"> <tr> <?php if (JCOMMENTS_JVERSION == '1.0') { ?> <th style="background-image: none; padding: 0;"><img src="components/com_jcomments/assets/icon-48-custombbcodes.png" width="48" height="48" align="middle" alt="<?php echo JText::_('A_CUSTOM_BBCODE'); ?> " /> <?php echo JText::_('A_CUSTOM_BBCODE'); ?> </th> <?php } ?> <td nowrap="nowrap" align="right"></td> </tr> </table> <table id="jc" class="adminlist" cellspacing="1"> <thead> <tr> <th width="1%"><input type="checkbox" id="toggle" name="toggle" value="" onclick="checkAll(<?php echo count($lists['rows']); ?> );" /></th> <th width="30%" align="left" nowrap="nowrap"><?php echo JText::_('A_CUSTOM_BBCODE_NAME'); ?> </th> <th width="50%" class="title"><?php echo JText::_('A_CUSTOM_BBCODE_PATTERN'); ?> </th> <th width="16" align="center"><?php echo JText::_('A_CUSTOM_BBCODE_BUTTON_ICON'); ?> </th> <th width="4%"><?php echo JText::_('A_ORDERING'); ?> </th> <th width="5%"><?php echo JText::_('A_CUSTOM_BBCODE_BUTTON'); ?> </th> <th width="5%"><?php echo JText::_('A_PUBLISHING'); ?> </th> </tr> </thead> <tbody> <?php for ($i = 0, $k = 0, $n = count($lists['rows']); $i < $n; $i++) { $row =& $lists['rows'][$i]; $buttonStateTask = $row->button_enabled ? 'custombbcodes.disable_button' : 'custombbcodes.enable_button'; if (JCOMMENTS_JVERSION == '1.7') { $buttonStateClass = $row->button_enabled ? 'publish' : 'unpublish'; $buttonStateText = $row->button_enabled ? JText::_('JENABLED') : JText::_('JDISABLED'); $buttonStateTitle = addslashes(htmlspecialchars($buttonStateText, ENT_COMPAT, 'UTF-8')); $buttonState = '<span class="state ' . $buttonStateClass . '"><span class="text">' . $buttonStateText . '</span></span>'; } else { $buttonStateTitle = $row->button_enabled ? JText::_('A_DISABLE') : JText::_('A_ENABLE'); $buttonState = '<img src="images/' . ($row->button_enabled ? 'tick.png' : 'publish_x.png') . '" border="0" alt="' . $buttonStateTitle . '" />'; } $icon = ''; if ($row->button_image != '') { $icon = '<img src="' . $app->getCfg('live_site') . '/' . $row->button_image . '" alt="' . $row->name . '" />'; } else { if ($row->button_css != '') { $icon = '<span class="bbcode" style="width: 23px;"><a href="#" onclick="return false;" class="' . $row->button_css . '"></a></span>'; } } $link = JCOMMENTS_INDEX . '?option=com_jcomments&task=custombbcodes.edit&hidemainmenu=1&cid=' . $row->id; ?> <tr valign="middle" class="<?php echo "row{$k}"; ?> "> <td align="center"><?php echo JCommentsHTML::_('grid.id', $row, $i); ?> </td> <td align="left"><a href="<?php echo $link; ?> " title="<?php echo JText::_('A_EDIT'); ?> "><?php echo $row->name; ?> </a></td> <td align="left"><?php echo $row->simple_pattern; ?> </td> <td align="center"><?php echo $icon; ?> </td> <td class="order" align="center"> <span><?php echo $lists['pageNav']->orderUpIcon($i, true, 'custombbcodes.orderup'); ?> </span> <span><?php echo $lists['pageNav']->orderDownIcon($i, $n, true, 'custombbcodes.orderdown'); ?> </span> </td> <td align="center"><a class="jgrid" href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $buttonStateTask; ?> ')" title="<?php echo $buttonStateTitle; ?> "><?php echo $buttonState; ?> </a></td> <td align="center"><?php echo JCommentsHTML::_('grid.published', $row, $i, 'custombbcodes.'); ?> </td> </tr> <?php $k = 1 - $k; } ?> </tbody> <tfoot> <tr> <td colspan="15"><?php echo $lists['pageNav']->getListFooter(); ?> </td> </tr> </tfoot> </table> <input type="hidden" name="option" value="com_jcomments" /> <input type="hidden" name="task" value="custombbcodes" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <?php echo JCommentsSecurity::formToken(); ?> </form> <?php }