public static function _($type) { $type = preg_replace('#[^A-Z0-9_\\.]#i', '', $type); $args = func_get_args(); array_shift($args); $item = $args[0]; $i = $args[1]; $prefix = isset($args[2]) ? $args[2] : null; $result = ''; switch ($type) { case 'grid.id': if (JCOMMENTS_JVERSION == '1.0') { $result = mosHTML::idBox($i, $item->id); } elseif (JCOMMENTS_JVERSION == '1.7') { $result = JHTML::_('grid.id', $i, $item->id); } else { $result = JHtml::_('grid.id', $i, $item->id); } break; case 'grid.checkedout': if (JCOMMENTS_JVERSION == '1.0') { $result = mosCommonHTML::CheckedOutProcessing($item, $i); } elseif (JCOMMENTS_JVERSION == '1.7') { $result = JHTML::_('grid.checkedout', $item, $i); } else { $result = JHtml::_('grid.checkedout', $item, $i); } break; case 'grid.published': if (JCOMMENTS_JVERSION == '1.0') { $result = mosCommonHTML::PublishedProcessing($item, $i); } elseif (JCOMMENTS_JVERSION == '1.7') { $result = JHTML::_('grid.published', $item, $i, 'tick.png', 'publish_x.png', $prefix); } else { $result = JHtml::_('grid.published', $item, $i, 'tick.png', 'publish_x.png', $prefix); } break; } return $result; }
public static function showMenusections($rows, $pageNav, $search, $levellist, $menutype, $option) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="menus"> Menu Manager <small><small>[ <?php echo $menutype; ?> ]</small></small> </th> <td nowrap="nowrap"> Max Levels </td> <td> <?php echo $levellist; ?> </td> <td> Filter: </td> <td> <input type="text" name="search" value="<?php echo htmlspecialchars($search); ?> " class="inputbox" onChange="document.adminForm.submit();" /> </td> </tr> <?php if ($menutype == 'mainmenu') { ?> <tr> <td align="right" nowrap="nowrap" style="color: red; font-weight: normal;" colspan="5"> <?php echo _MAINMENU_DEL; ?> <br/> <span style="color: black;"> <?php echo _MAINMENU_HOME; ?> </span> </td> </tr> <?php } ?> </table> <table class="adminlist"> <tr> <th width="20"> # </th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title" width="40%"> Menu Item </th> <th width="5%"> Published </th> <th colspan="2" width="5%"> Reorder </th> <th width="2%"> Order </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a> </th> <th width="10%"> Access </th> <th> Itemid </th> <th width="35%" align="left"> Type </th> <th> CID </th> </tr> <?php $k = 0; $i = 0; $n = count($rows); foreach ($rows as $row) { mosMakeHtmlSafe($row, ENT_QUOTES, 'treename'); $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $i + 1 + $pageNav->limitstart; ?> </td> <td> <?php echo $checked; ?> </td> <td nowrap="nowrap"> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->treename; } else { $link = 'index2.php?option=com_menus&menutype=' . $row->menutype . '&task=edit&id=' . $row->id . '&hidemainmenu=1'; ?> <a href="<?php echo $link; ?> "> <?php echo $row->treename; ?> </a> <?php } ?> </td> <td width="10%" align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td align="center"> <?php echo $row->id; ?> </td> <td align="left"> <span class="editlinktip"> <?php echo mosToolTip($row->descrip, '', 280, 'tooltip.png', $row->type, $row->edit); ?> </span> </td> <td align="center"> <?php echo $row->componentid; ?> </td> </tr> <?php $k = 1 - $k; $i++; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="menutype" value="<?php echo $menutype; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
/** * Writes a list of the defined modules * @param array An array of category objects */ function showMambots(&$rows, $client, &$pageNav, $option, &$lists, $search) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="modules"> Administrar Plugins <small><small>[ <?php echo $client == 'admin' ? 'Administração' : 'Site'; ?> ]</small></small> </th> <td> Filtro: </td> <td> <input type="text" name="search" value="<?php echo htmlspecialchars($search); ?> " class="text_area" onChange="document.adminForm.submit();" /> </td> <td width="right"> <?php echo $lists['type']; ?> </td> </tr> </table> <table class="adminlist"> <tr> <th width="20">nº</th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Nome do Plugin </th> <th nowrap="nowrap" width="10%"> Publicado </th> <th colspan="2" nowrap="nowrap" width="5%"> Reordenar </th> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Salvar Ordem" /></a> </th> <th nowrap="nowrap" width="10%"> Acessos </th> <th nowrap="nowrap" align="left" width="10%"> Tipo </th> <th nowrap="nowrap" align="left" width="10%"> Arquivo </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_mambots&client=' . $client . '&task=editA&hidemainmenu=1&id=' . $row->id; $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="right"><?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->name; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->name; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i, $row->folder == @$rows[$i - 1]->folder && $row->ordering > -10000 && $row->ordering < 10000); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n, $row->folder == @$rows[$i + 1]->folder && $row->ordering > -10000 && $row->ordering < 10000); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td align="left" nowrap="nowrap"> <?php echo $row->folder; ?> </td> <td align="left" nowrap="nowrap"> <?php echo $row->element; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="client" value="<?php echo $client; ?> " /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
function JLMS_showMenuManage($menus, $option, $pageNav, $menutype, &$lists, &$JLMS_config) { global $JLMS_CONFIG; JHTML::_('behavior.tooltip'); require_once JPATH_SITE . '/components/com_joomla_lms/languages/english/main.lang.php'; ?> <form action="index.php" method="post" name="adminForm"> <table width="100%"> <tr> <td width="220" valign="top"> <div> <?php echo joomla_lms_adm_html::JLMS_menu(); ?> </div> </td> <td valign="top" align="right"> <?php if (!class_exists('JToolBarHelper')) { ?> <table class="adminheading" width="30%"> <tr> <th class="menus"><?php echo _JOOMLMS_COMP_NAME; ?> : <small> <?php echo _JLMS_MENUM; ?> <?php switch ($menutype) { case -1: echo _JLMS_MENUM_GUEST_M; break; case 0: echo _JLMS_MENUM_HOMEPAGE_M; break; case 1: echo _JLMS_MENUM_TEACHER_M; break; case 2: echo _JLMS_MENUM_STUDENT_M; break; case 6: echo _JLMS_MENUM_CEO_PARENT_M; break; } ?> </small> </th> <td align="right"> <table class="adminlist"><tr class="row1"> <td><?php echo _JLMS_MENUM_SELECT_M_TYPE; ?> :</td> <td><?php echo $lists['menutype']; ?> </td> </tr></table> </td> </tr> </table> <?php } else { ?> <table cellpadding="0" cellspacing="0" border="0" style="width: 15%;" class="adminlist"> <tr class="row1"> <td nowrap="nowrap" style="padding-right: 5px;"><?php echo _JLMS_MENUM_SELECT_M_TYPE; ?> :</td> <td><?php echo $lists['menutype']; ?> </td> </tr> </table> <?php } ?> <table class="adminlist"> <thead> <tr> <th width="1%"> # </th> <th width="1%"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($menus); ?> );" /> </th> <th class="title" width="5%"> <?php echo _JLMS_MENUM_M_IMAGE; ?> </th> <th class="title" width="50%"> <?php echo _JLMS_MENUM_M_ITEM; ?> </th> <th width="10%"> <?php echo _JLMS_PUBLISHED; ?> </th> <th colspan="2" width="1%"> <?php echo _JLMS_REORDER; ?> </th> <th width="1%"> <?php echo _JLMS_ORDER; ?> </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($menus) - 1; ?> )"><img src="<?php echo ADMIN_IMAGES_PATH; ?> filesave.png" border="0" alt="<?php echo _JLMS_MENUM_SAVE_ORDER; ?> " /></a> </th> <th align="center" width="2%"> <?php echo _JLMS_ID_ITEM; ?> </th> </tr> </thead> <tbody> <?php $disabled_ex = 0; $k = 0; $i = 0; $n = count($menus); foreach ($menus as $menu) { if ($menu->task == 'view_all_notices' && !$JLMS_CONFIG->get('flms_integration', 0)) { } else { //$checked //$access = mosCommonHTML::AccessProcessing( $row, $i ); $checked = mosHTML::idBox($i, $menu->id); $published = mosCommonHTML::PublishedProcessing($menu, $i); $img_published = $menu->published ? 'tick.png' : 'publish_x.png'; $task_published = $menu->published ? 'unpublish_menu' : 'publish_menu'; $alt_published = $menu->published ? 'Published' : 'Unpublished'; $disabled = 0; if ($menu->lang_var == '_JLMS_TOOLBAR_CHAT' && !$JLMS_config->chat_enable) { $disabled = 1; } elseif ($menu->lang_var == '_JLMS_TOOLBAR_TRACK' && !$JLMS_config->tracking_enable) { $disabled = 1; } elseif ($menu->lang_var == '_JLMS_TOOLBAR_CONF' && !$JLMS_config->conference_enable) { $disabled = 1; } elseif ($menu->lang_var == '_JLMS_TOOLBAR_QUIZZES' && !$JLMS_config->plugin_quiz) { $disabled = 1; } elseif ($menu->lang_var == '_JLMS_TOOLBAR_FORUM' && !$JLMS_config->plugin_forum) { $disabled = 1; } if ($disabled == 1) { $disabled_ex = 1; $img_published = 'disabled.png'; $alt_published = 'Disabled'; echo '<input type="checkbox" id="cb' . $i . '" name="cid[]" value="' . $menu->id . '" style="visibility:hidden" onclick="isChecked(this.checked);" />'; $checked = "<img src='" . ADMIN_IMAGES_PATH . "checked_out.png' border='0' alt='" . $alt_published . "' />"; } ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"> <?php echo $i + 1; ?> </td> <td align="center"> <?php echo $checked; ?> </td> <td nowrap="nowrap" align="center"> <?php if ($menu->is_separator) { echo "---"; } else { echo "<img src='" . JURI::root() . "components/com_joomla_lms/lms_images/toolbar/" . $menu->image . "' alt='" . $JLMS_LANGUAGE[$menu->lang_var] . "' title='" . $JLMS_LANGUAGE[$menu->lang_var] . "' width='16' height = '16' />"; } ?> </td> <td nowrap="nowrap"> <?php if ($menu->is_separator == 1) { echo _JLMS_SEPARATOR; } else { echo $JLMS_LANGUAGE[$menu->lang_var]; } ?> </td> <td width="10%" align="center"> <?php if ($img_published == 'disabled.png') { ?> <img src="<?php echo ADMIN_IMAGES_PATH . $img_published; ?> " border="0" alt="<?php echo $alt_published; ?> " title="<?php echo $alt_published; ?> " /> <?php } else { ?> <a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $task_published; ?> ')"> <img src="<?php echo ADMIN_IMAGES_PATH . $img_published; ?> " border="0" alt="<?php echo $alt_published; ?> " title="<?php echo $alt_published; ?> " /> </a> <?php } ?> </td> <td class="order"> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td class="order"> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $menu->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"><?php echo isset($menu->id) && $menu->id ? $menu->id : '-'; ?> </td> </tr> <?php $k = 1 - $k; $i++; } } ?> </tbody> <?php if ($disabled_ex) { ?> <tfoot> <tr> <td colspan="10"><img src='<?php echo ADMIN_IMAGES_PATH; ?> checked_out.png' border='0' alt='' /> - <?php echo _JLMS_MENUM_MSG_MARKED_ITEMS; ?> </td> </tr> </tfoot> <?php } ?> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="menu_manage" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> </td> </tr> </table> </form> <?php }
/** * Writes a list of the defined modules * @param array An array of category objects */ function showModules(&$rows, $myid, $client, &$pageNav, $option, &$lists, $search) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="modules" rowspan="2"> <?php echo T_('Module Manager'); ?> <small><small>[ <?php echo $client == 'admin' ? T_('Administrator') : T_('Site'); ?> ]</small></small> </th> <td width="right"> <?php echo $lists['position']; ?> </td> <td width="right"> <?php echo $lists['type']; ?> </td> </tr> <tr> <td align="right"> <?php echo T_('Filter:'); ?> </td> <td> <input type="text" name="search" value="<?php echo $search; ?> " class="text_area" onChange="document.adminForm.submit();" /> </td> </tr> </table> <table class="adminlist"> <tr> <th width="20px">#</th> <th width="20px"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> <?php echo T_('Module Name'); ?> </th> <th nowrap="nowrap" width="10%"> <?php echo T_('Published'); ?> </th> <th colspan="2" align="center" width="5%"> <?php echo T_('Reorder'); ?> </th> <th width="2%"> <?php echo T_('Order'); ?> </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo T_('Save Order'); ?> " /></a> </th> <?php if (!$client) { ?> <th nowrap="nowrap" width="7%"> <?php echo T_('Access'); ?> </th> <?php } ?> <th nowrap="nowrap" width="7%"> <?php echo T_('Position'); ?> </th> <th nowrap="nowrap" width="5%"> <?php echo T_('Pages'); ?> </th> <th nowrap="nowrap" width="5%"> <?php echo T_('ID'); ?> </th> <th nowrap="nowrap" width="10%" align="left"> <?php echo T_('Type'); ?> </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $link = 'index2.php?option=com_modules&client=' . $client . '&task=editA&hidemainmenu=1&id=' . $row->id; $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="right"> <?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->title; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->title; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i, $row->position == @$rows[$i - 1]->position); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n, $row->position == @$rows[$i + 1]->position); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <?php if (!$client) { ?> <td align="center"> <?php echo $access; ?> </td> <?php } ?> <td align="center"> <?php echo $row->position; ?> </td> <td align="center"> <?php if (is_null($row->pages)) { echo T_('None'); } else { if ($row->pages > 0) { echo T_('Varies'); } else { echo T_('All'); } } ?> </td> <td align="center"> <?php echo $row->id; ?> </td> <td align="left"> <?php echo $row->module ? $row->module : T_("User"); ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="client" value="<?php echo $client; ?> " /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> </form> <?php }
/** * Writes a list of the categories for a section * @param array An array of category objects * @param string The name of the category section */ function show(&$rows, $section, $section_name, &$pageNav, &$lists, $type) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <?php if ($section == 'content') { ?> <th class="categories"> Administrar Categoria <small><small>[ Conteúdo: Todos ]</small></small> </th> <td width="right"> <?php echo $lists['sectionid']; ?> </td> <?php } else { if (is_numeric($section)) { $query = 'com_content§ionid=' . $section; } else { if ($section == 'com_contact_details') { $query = 'com_contact'; } else { $query = $section; } } ?> <th class="categories"> Administrar Categoria <small><small>[ <?php echo $section_name; ?> ]</small></small> </th> <?php } ?> </tr> </table> <table class="adminlist"> <tr> <th width="10" align="left"> nº </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Nome Categoria </th> <th width="10%"> Publicado </th> <?php if ($section != 'content') { ?> <th colspan="2" width="5%"> Reordenar </th> <?php } ?> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Salvar Ordem" /></a> </th> <th width="10%"> Acesso </th> <?php if ($section == 'content') { ?> <th width="12%" align="left"> Seção </th> <?php } ?> <th width="5%" nowrap="nowrap"> ID da Categoria </th> <?php if ($type == 'content') { ?> <th width="5%"> Ativo </th> <th width="5%"> Lixeira </th> <?php } else { ?> <th width="20%"> </th> <?php } ?> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->section; $link = 'index2.php?option=com_categories§ion=' . $section . '&task=editA&hidemainmenu=1&id=' . $row->id; if ($row->checked_out_contact_category) { $row->checked_out = $row->checked_out_contact_category; } $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out_contact_category && $row->checked_out_contact_category != $my->id) { echo stripslashes($row->name) . ' ( ' . stripslashes($row->title) . ' )'; } else { ?> <a href="<?php echo $link; ?> "> <?php echo stripslashes($row->name) . ' ( ' . stripslashes($row->title) . ' )'; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <?php if ($section != 'content') { ?> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <?php } ?> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <?php if ($section == 'content') { ?> <td align="left"> <a href="<?php echo $row->sect_link; ?> " title="Editar Seção"> <?php echo $row->section_name; ?> </a> </td> <?php } ?> <td align="center"> <?php echo $row->id; ?> </td> <?php if ($type == 'content') { ?> <td align="center"> <?php echo $row->active; ?> </td> <td align="center"> <?php echo $row->trash; ?> </td> <?php } else { ?> <td> </td> <?php } $k = 1 - $k; ?> </tr> <?php } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="com_categories" /> <input type="hidden" name="section" value="<?php echo $section; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="chosen" value="" /> <input type="hidden" name="act" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="type" value="<?php echo $type; ?> " /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
/** * Writes a list of the categories for a section * @param array An array of category objects * @param string The name of the category section */ function show(&$rows, $scope, $myid, &$pageNav, $option) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="sections"> Administrar Seções </th> </tr> </table> <table class="adminlist"> <tr> <th width="20"> nº </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Nome da Seção </th> <th width="10%"> Publicado </th> <th colspan="2" width="5%"> Reordenar </th> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a> </th> <th width="8%"> Acesso </th> <th width="12%" nowrap="nowrap"> ID da Seção </th> <th width="12%" nowrap="nowrap"> Categorias </th> <th width="12%" nowrap="nowrap"> Ativo </th> <th width="12%" nowrap="nowrap"> Lixeira </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_sections&scope=content&task=editA&hidemainmenu=1&id=' . $row->id; $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td width="20" align="right"> <?php echo $pageNav->rowNumber($i); ?> </td> <td width="20"> <?php echo $checked; ?> </td> <td width="35%"> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->name . " ( " . $row->title . " )"; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->name . " ( " . $row->title . " )"; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td align="center"> <?php echo $row->id; ?> </td> <td align="center"> <?php echo $row->categories; ?> </td> <td align="center"> <?php echo $row->active; ?> </td> <td align="center"> <?php echo $row->trash; ?> </td> <?php $k = 1 - $k; ?> </tr> <?php } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="scope" value="<?php echo $scope; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="chosen" value="" /> <input type="hidden" name="act" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
/** * Writes a list of the categories for a section * @param array An array of category objects * @param string The name of the category section */ function show(&$rows, $section, $section_name, &$pageNav, &$lists, $type) { global $my, $mosConfig_live_site; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <?php if ($section == 'content') { ?> <th class="categories"> <?php echo T_('Category Manager'); ?> <small><small>[ <?php echo T_('Content: All'); ?> ]</small></small> </th> <td width="right"> <?php echo $lists['sectionid']; ?> </td> <?php } else { if (is_numeric($section)) { $query = 'com_content§ionid=' . $section; } else { if ($section == 'com_contact_details') { $query = 'com_contact'; } else { $query = $section; } } ?> <th class="categories"> <?php echo T_('Category Manager'); ?> <small><small>[ <?php echo $section_name; ?> ]</small></small> </th> <?php } ?> </tr> </table> <table class="adminlist"> <tr> <th width="10" align="left"> # </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> <?php echo T_('Category Name'); ?> </th> <th width="10%"> <?php echo T_('Published'); ?> </th> <?php if ($section != 'content') { ?> <th colspan="2" width="5%"> <?php echo T_('Reorder'); ?> </th> <?php } ?> <th width="2%"> <?php echo T_('Order'); ?> </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo T_('Save Order'); ?> " /></a> </th> <th width="10%"> <?php echo T_('Access'); ?> </th> <?php if ($section == 'content') { ?> <th width="12%" align="left"> <?php echo T_('Section'); ?> </th> <?php } ?> <th width="5%" nowrap> <?php echo T_('Category ID'); ?> </th> <?php if ($type == 'content') { ?> <th width="5%"> # <?php echo T_('Active'); ?> </th> <th width="5%"> # <?php echo T_('Trash'); ?> </th> <?php } else { ?> <th width="20%"> </th> <?php } ?> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->section; $link = 'index2.php?option=com_categories§ion=' . $section . '&task=editA&hidemainmenu=1&id=' . $row->id; $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out_contact_category && $row->checked_out_contact_category != $my->id) { echo $row->name . ' ( ' . $row->title . ' )'; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->name . ' ( ' . $row->title . ' )'; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <?php if ($section != 'content') { ?> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <?php } ?> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <?php if ($section == 'content') { ?> <td align="left"> <a href="<?php echo $row->sect_link; ?> " title="<?php echo T_('Edit Section'); ?> "> <?php echo $row->section_name; ?> </a> </td> <?php } ?> <td align="center"> <?php echo $row->id; ?> </td> <?php if ($type == 'content') { ?> <td align="center"> <?php echo $row->active; ?> </td> <td align="center"> <?php echo $row->trash; ?> </td> <?php } else { ?> <td> </td> <?php } $k = 1 - $k; ?> </tr> <?php } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="com_categories" /> <input type="hidden" name="section" value="<?php echo $section; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="chosen" value="" /> <input type="hidden" name="act" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="type" value="<?php echo $type; ?> " /> <input type="hidden" name="hidemainmenu" value="0" /> </form> <?php }
function showMenusections($rows, $pageNav, $search, $levellist, $menutype, $option) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="menus"> <?php printf(T_('Menu Manager <small><small>[ %s ]</small></small>'), $menutype); ?> </th> <td nowrap="true"> <?php echo T_('Max Levels'); ?> </td> <td> <?php echo $levellist; ?> </td> <td> <?php echo T_('Filter:'); ?> </td> <td> <input type="text" name="search" value="<?php echo $search; ?> " class="inputbox" /> </td> </tr> <?php if ($menutype == 'mainmenu') { ?> <tr> <td align="right" nowrap style="color: red; font-weight: normal;" colspan="5"> * <?php echo T_('You cannot `delete` this menu as it is required for the proper operation of Mambo'); ?> * <br /> <span style="color: black;"> * <?php echo T_('The 1st Published item in this menu [mainmenu] is the default `Homepage` for the site'); ?> * </span> </td> </tr> <?php } ?> </table> <table class="adminlist"> <tr> <th width="20"> # </th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title" width="40%"> <?php echo T_('Menu Item'); ?> </th> <th width="5%"> <?php echo T_('Published'); ?> </th> <th colspan="2" width="5%"> <?php echo T_('Reorder'); ?> </th> <th width="2%"> <?php echo T_('Order'); ?> </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo T_('Save Order'); ?> " /></a> </th> <th width="10%"> <?php echo T_('Access'); ?> </th> <th> <?php echo T_('Itemid'); ?> </th> <th width="35%" align="left"> <?php echo T_('Type'); ?> </th> <th> <?php echo T_('CID'); ?> </th> </tr> <?php $k = 0; $i = 0; $n = count($rows); foreach ($rows as $row) { $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $i + 1 + $pageNav->limitstart; ?> </td> <td> <?php echo $checked; ?> </td> <td nowrap="nowrap"> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->treename; } else { $link = 'index2.php?option=com_menus&menutype=' . $row->menutype . '&task=edit&id=' . $row->id . '&hidemainmenu=1'; ?> <a href="<?php echo $link; ?> "> <?php echo $row->treename; ?> </a> <?php } ?> </td> <td width="10%" align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td align="center"> <?php echo $row->id; ?> </td> <td align="left"> <?php echo mosToolTip($row->descrip, '', 280, 'tooltip.png', $row->type, $row->edit); ?> </td> <td align="center"> <?php echo $row->componentid; ?> </td> </tr> <?php $k = 1 - $k; $i++; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="menutype" value="<?php echo $menutype; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> </form> <?php }