Пример #1
0
    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 content items
     * @param array An array of content objects
     */
    function showContent(&$rows, $section, &$lists, $search, $pageNav, $all = NULL, $redirect)
    {
        global $my, $acl, $database, $mosConfig_offset;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php?option=com_content" method="post" name="adminForm">

		<table class="adminheading">
		<tr>
			<th class="edit" rowspan="2" nowrap="nowrap">
			<?php 
        if ($all) {
            ?>
				Administrar Itens de Conteúdo  <small><small>[ Seção: Todas ]</small></small>
				<?php 
        } else {
            ?>
				Administrar Itens de Conteúdo <small><small>[ Seção: <?php 
            echo $section->title;
            ?>
 ]</small></small>
				<?php 
        }
        ?>
			</th>
			<?php 
        if ($all) {
            ?>
				<td align="right" rowspan="2" valign="top">
				<?php 
            echo $lists['sectionid'];
            ?>
				</td>
				<?php 
        }
        ?>
			<td align="right" valign="top">
			<?php 
        echo $lists['catid'];
        ?>
			</td>
			<td valign="top">
			<?php 
        echo $lists['authorid'];
        ?>
			</td>
		</tr>
		<tr>
			<td align="right">
			Filtro:
			</td>
			<td>
			<input type="text" name="search" value="<?php 
        echo htmlspecialchars($search);
        ?>
" class="text_area" onChange="document.adminForm.submit();" />
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="5">
			nº
			</th>
			<th width="5">
			<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title">
			Título
			</th>
			<th width="5%">
			Publicado
			</th>
			<th nowrap="nowrap" width="5%">
			Página Inicial
			</th>
			<th colspan="2" align="center" 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 >
			Acesso 
			</th>
			<th width="2%">
			ID
			</th>
			<?php 
        if ($all) {
            ?>
				<th align="left">
				Seção
				</th>
				<?php 
        }
        ?>
			<th align="left">
			Categoria 
			</th>
			<th align="left">
			Autor
			</th>
			<th align="center" width="10">
			Data
			</th>
		  </tr>
		<?php 
        $k = 0;
        $nullDate = $database->getNullDate();
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            mosMakeHtmlSafe($row);
            $link = 'index2.php?option=com_content&sectionid=' . $redirect . '&task=edit&hidemainmenu=1&id=' . $row->id;
            $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->sectionid;
            $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id=' . $row->catid;
            $now = _CURRENT_SERVER_TIME;
            if ($now <= $row->publish_up && $row->state == 1) {
                // Published
                $img = 'publish_y.png';
                $alt = 'Publicado';
            } else {
                if (($now <= $row->publish_down || $row->publish_down == $nullDate) && $row->state == 1) {
                    // Pending
                    $img = 'publish_g.png';
                    $alt = 'Publicado';
                } else {
                    if ($now > $row->publish_down && $row->state == 1) {
                        // Expired
                        $img = 'publish_r.png';
                        $alt = 'Expirado';
                    } elseif ($row->state == 0) {
                        // Unpublished
                        $img = 'publish_x.png';
                        $alt = 'Despublicado';
                    }
                }
            }
            // correct times to include server offset info
            $row->publish_up = mosFormatDate($row->publish_up, _CURRENT_SERVER_TIME_FORMAT);
            if (trim($row->publish_down) == $nullDate || trim($row->publish_down) == '' || trim($row->publish_down) == '-') {
                $row->publish_down = 'Nunca';
            }
            $row->publish_down = mosFormatDate($row->publish_down, _CURRENT_SERVER_TIME_FORMAT);
            $times = '';
            if ($row->publish_up == $nullDate) {
                $times .= "<tr><td>Início: Sempre</td></tr>";
            } else {
                $times .= "<tr><td>Início: {$row->publish_up}</td></tr>";
            }
            if ($row->publish_down == $nullDate || $row->publish_down == 'Nunca') {
                $times .= "<tr><td>Fim: Não Expira</td></tr>";
            } else {
                $times .= "<tr><td>Final: {$row->publish_down}</td></tr>";
            }
            if ($acl->acl_check('administration', 'manage', 'users', $my->usertype, 'components', 'com_users')) {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id=' . $row->created_by;
                    $author = '<a href="' . $linkA . '" title="Editar Usuário">' . $row->author . '</a>';
                }
            } else {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $author = $row->author;
                }
            }
            $date = mosFormatDate($row->created, '%x');
            $access = mosCommonHTML::AccessProcessing($row, $i);
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
">
				<td>
				<?php 
            echo $pageNav->rowNumber($i);
            ?>
				</td>
				<td align="center">
				<?php 
            echo $checked;
            ?>
				</td>
				<td>
				<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                echo $row->title;
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="Editar Conteúdo">
					<?php 
                echo $row->title;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<?php 
            if ($times) {
                ?>
					<td align="center">
					<a href="javascript: void(0);" onMouseOver="return overlib('<table><?php 
                echo $times;
                ?>
</table>', CAPTION, 'Informação da Publicação', BELOW, RIGHT);" onMouseOut="return nd();" onclick="return listItemTask('cb<?php 
                echo $i;
                ?>
','<?php 
                echo $row->state ? "unpublish" : "publish";
                ?>
')">
					<img src="images/<?php 
                echo $img;
                ?>
" width="12" height="12" border="0" alt="<?php 
                echo $alt;
                ?>
" />
					</a>
					</td>
					<?php 
            }
            ?>
				<td align="center">
				<a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','toggle_frontpage')">
				<img src="images/<?php 
            echo $row->frontpage ? 'tick.png' : 'publish_x.png';
            ?>
" width="12" height="12" border="0" alt="<?php 
            echo $row->frontpage ? 'Sim' : 'Não';
            ?>
" />
				</a>
				</td>
				<td align="right">
				<?php 
            echo $pageNav->orderUpIcon($i, $row->catid == @$rows[$i - 1]->catid);
            ?>
				</td>
				<td align="left">
				<?php 
            echo $pageNav->orderDownIcon($i, $n, $row->catid == @$rows[$i + 1]->catid);
            ?>
				</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">
				<?php 
            echo $row->id;
            ?>
				</td>
				<?php 
            if ($all) {
                ?>
					<td align="left">
					<a href="<?php 
                echo $row->sect_link;
                ?>
" title="Editar Seção">
					<?php 
                echo $row->section_name;
                ?>
					</a>
					</td>
					<?php 
            }
            ?>
				<td align="left">
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="Editar Categoria">
				<?php 
            echo $row->name;
            ?>
				</a>
				</td>
				<td align="left">
				<?php 
            echo $author;
            ?>
				</td>
				<td align="left">
				<?php 
            echo $date;
            ?>
				</td>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>

		<?php 
        echo $pageNav->getListFooter();
        ?>
		<?php 
        mosCommonHTML::ContentLegend();
        ?>

		<input type="hidden" name="option" value="com_content" />
		<input type="hidden" name="sectionid" value="<?php 
        echo $section->id;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
Пример #3
0
    /**
     * Writes a list of the content items
     * @param array An array of content objects
     */
    function showContent(&$rows, $section, &$lists, $search, $pageNav, $all = NULL, $redirect)
    {
        global $my, $acl;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">

		<table class="adminheading">
		<tr>
			<th class="edit" rowspan="2" nowrap>
			<?php 
        if ($all) {
            ?>
				<?php 
            echo T_('Content Items Manager');
            ?>
 <small><small>[ <?php 
            echo T_('Section: All');
            ?>
 ]</small></small>
				<?php 
        } else {
            ?>
				<?php 
            echo T_('Content Items Manager');
            ?>
 <small><small>[ <?php 
            echo T_('Section:');
            ?>
 <?php 
            echo $section->title;
            ?>
 ]</small></small>
				<?php 
        }
        ?>
			</th>
			<?php 
        if ($all) {
            ?>
				<td width="right" rowspan="2" valign="top">
				<?php 
            echo $lists['sectionid'];
            ?>
				</td>
				<?php 
        }
        ?>
			<td width="right" valign="top">
			<?php 
        echo $lists['catid'];
        ?>
			</td>
			<td width="right" valign="top">
			<?php 
        echo $lists['authorid'];
        ?>
			</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="5">
			#
			</th>
			<th width="5">
			<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title">
			<?php 
        echo T_('Title');
        ?>
			</th>
			<th width="5%">
			<?php 
        echo T_('Published');
        ?>
			</th>
			<th nowrap="nowrap" width="5%">
			<?php 
        echo T_('Front Page');
        ?>
			</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>
			<th >
			<?php 
        echo T_('Access');
        ?>
			</th>
			<th width="2%">
			<?php 
        echo T_('ID');
        ?>
			</th>
			<?php 
        if ($all) {
            ?>
				<th align="left">
				<?php 
            echo T_('Section');
            ?>
				</th>
				<?php 
        }
        ?>
			<th align="left">
			<?php 
        echo T_('Category');
        ?>
			</th>
			<th align="left">
			<?php 
        echo T_('Author');
        ?>
			</th>
			<th align="center" width="10">
			<?php 
        echo T_('Date');
        ?>
			</th>
		  </tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            $link = 'index2.php?option=com_content&sectionid=' . $redirect . '&task=edit&hidemainmenu=1&id=' . $row->id;
            $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->sectionid;
            $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id=' . $row->catid;
            $now = date("Y-m-d H:i:s");
            if ($now <= $row->publish_up && $row->state == "1") {
                $img = 'publish_y.png';
                $alt = T_('Published');
            } else {
                if (($now <= $row->publish_down || $row->publish_down == "0000-00-00 00:00:00") && $row->state == "1") {
                    $img = 'publish_g.png';
                    $alt = T_('Published');
                } else {
                    if ($now > $row->publish_down && $row->state == "1") {
                        $img = 'publish_r.png';
                        $alt = T_('Expired');
                    } elseif ($row->state == "0") {
                        $img = "publish_x.png";
                        $alt = T_('Unpublished');
                    }
                }
            }
            $times = '';
            if (isset($row->publish_up)) {
                if ($row->publish_up == '0000-00-00 00:00:00') {
                    $times .= "<tr><td>" . T_('Start:') . " " . T_('Always') . "</td></tr>";
                } else {
                    $times .= "<tr><td>" . T_('Start:') . " {$row->publish_up}</td></tr>";
                }
            }
            if (isset($row->publish_down)) {
                if ($row->publish_down == '0000-00-00 00:00:00') {
                    $times .= "<tr><td>" . T_('Finish:') . " " . T_('No Expiry') . "</td></tr>";
                } else {
                    $times .= "<tr><td>" . T_('Finish:') . " {$row->publish_down}</td></tr>";
                }
            }
            if ($acl->acl_check('administration', 'manage', 'users', $my->usertype, 'components', 'com_users')) {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id=' . $row->created_by;
                    $author = '<a href="' . $linkA . '" title="' . T_('Edit User') . '">' . $row->author . '</a>';
                }
            } else {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $author = $row->author;
                }
            }
            $date = mosFormatDate($row->created, '%x');
            $access = mosCommonHTML::AccessProcessing($row, $i);
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
">
				<td>
				<?php 
            echo $pageNav->rowNumber($i);
            ?>
				</td>
				<td align="center">
				<?php 
            echo $checked;
            ?>
				</td>
				<td>
				<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                echo $row->title;
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="<?php 
                echo T_('Edit Content');
                ?>
">
					<?php 
                echo htmlspecialchars($row->title, ENT_QUOTES);
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<?php 
            if ($times) {
                ?>
					<td align="center">
					<a href="javascript: void(0);" onMouseOver="return overlib('<table><?php 
                echo $times;
                ?>
</table>', CAPTION, '<?php 
                echo T_('Publish Information');
                ?>
', BELOW, RIGHT);" onMouseOut="return nd();" onClick="return listItemTask('cb<?php 
                echo $i;
                ?>
','<?php 
                echo $row->state ? "unpublish" : "publish";
                ?>
')">
					<img src="images/<?php 
                echo $img;
                ?>
" width="12" height="12" border="0" alt="<?php 
                echo $alt;
                ?>
" />
					</a>
					</td>
					<?php 
            }
            ?>
				<td align="center">
				<a href="javascript: void(0);" onClick="return listItemTask('cb<?php 
            echo $i;
            ?>
','toggle_frontpage')">
				<img src="images/<?php 
            echo $row->frontpage ? 'tick.png' : 'publish_x.png';
            ?>
" width="12" height="12" border="0" alt="<?php 
            echo $row->frontpage ? T_('Yes') : T_('No');
            ?>
" />
				</a>
				</td>
				<td align="right">
				<?php 
            echo $pageNav->orderUpIcon($i, $row->catid == @$rows[$i - 1]->catid);
            ?>
				</td>
				<td align="left">
				<?php 
            echo $pageNav->orderDownIcon($i, $n, $row->catid == @$rows[$i + 1]->catid);
            ?>
				</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">
				<?php 
            echo $row->id;
            ?>
				</td>
				<?php 
            if ($all) {
                ?>
					<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="left">
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="<?php 
            echo T_('Edit Category');
            ?>
">
				<?php 
            echo $row->name;
            ?>
				</a>
				</td>
				<td align="left">
				<?php 
            echo $author;
            ?>
				</td>
				<td align="left">
				<?php 
            echo $date;
            ?>
				</td>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>

		<?php 
        echo $pageNav->getListFooter();
        ?>
		<?php 
        mosCommonHTML::ContentLegend();
        ?>

		<input type="hidden" name="option" value="com_content" />
		<input type="hidden" name="sectionid" value="<?php 
        echo $section->id;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		</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 
    }
Пример #5
0
    function showApplications(&$rows, &$pageNav, $option, &$lists)
    {
        mosCommonHTML::loadOverlib();
        ?>
        <form action="index2.php?option=com_jumi" method="post" name="adminForm">

        <table class="adminheading">
            <tr>
                <th rowspan="2" nowrap="nowrap">
                    Jumi Applications Manager
                </th>
                <td align="right" rowspan="2" valign="top">
                    <?php 
        echo $lists['state'];
        ?>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Filter:
                    <input type="text" name="search" id="search" value="<?php 
        echo $lists['search'];
        ?>
" class="text_area" onchange="document.adminForm.submit();" />
                    <button onclick="this.form.submit();">Go</button>
                    <button onclick="document.getElementById('search').value='';this.form.submit();">Reset</button>
                </td>
            </tr>
        </table>

        <table class="adminlist">
            <tr>
                <th width="1%">
                    #
                </th>
                <th width="2%">
                    <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
                </th>
                <th align="center">
                    Title
                </th>
                <th width="30%" align="center">
                    Path
                </th>
                <th width="8%" align="center">
                    Published
                </th>
                <th width="12%" align="center">
                    Access
                </th>
                <th width="1%" nowrap="nowrap">
                    ID
                </th>
            </tr>
            <?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            $link = 'index2.php?option=com_jumi&task=edit&hidemainmenu=1&cid[]=' . $row->id;
            $access = mosCommonHTML::AccessProcessing($row, $i);
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            ?>
                <tr class="<?php 
            echo "row{$k}";
            ?>
">
                    <td>
                        <?php 
            echo $pageNav->rowNumber($i);
            ?>
                    </td>
                    <td>
                        <?php 
            echo $checked;
            ?>
                    </td>
                    <td>
                        <a href="<?php 
            echo $link;
            ?>
" title="Edit Application"><?php 
            echo $row->title;
            ?>
</a>
                    </td>
                    <td align="center">
                        <?php 
            echo $row->path;
            ?>
                    </td>
                    <td align="center">
                        <a href="javascript:void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $row->published == '0' ? 'publish' : 'unpublish';
            ?>
')">
                            <img src="images/<?php 
            echo $row->published == '0' ? 'publish_x.png' : 'publish_g.png';
            ?>
" width="12" height="12" border="0" alt="<?php 
            echo $row->published == '0' ? 'Unpublished' : 'Published';
            ?>
" />
                        </a>
                    </td>
                    <td align="center">
                        <?php 
            echo $access;
            ?>
                    </td>
                    <td align="center">
                        <?php 
            echo $row->id;
            ?>
                    </td>
                </tr>
                <?php 
            $k = 1 - $k;
        }
        ?>
        </table>

        <?php 
        echo $pageNav->getListFooter();
        ?>

        <input type="hidden" name="option" value="com_jumi" />
        <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 
    }
Пример #6
0
    /**
     * 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&sectionid=' . $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&section=' . $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 content items
     * @param array An array of content objects
     */
    function showList(&$rows, $search, $pageNav, $option, $lists)
    {
        global $my, $acl, $database;
        mosCommonHTML::loadOverlib();
        $nullDate = $database->getNullDate();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="frontpage" rowspan="2">
			Administrar Página Principal
			</th>
			<td width="right">
			<?php 
        echo $lists['sectionid'];
        ?>
			</td>
			<td width="right">
			<?php 
        echo $lists['catid'];
        ?>
			</td>
			<td width="right">
			<?php 
        echo $lists['authorid'];
        ?>
			</td>
		</tr>
		<tr>
			<td align="right" colspan="2">
			Filtro:
			</td>
			<td>
			<input type="text" name="search" value="<?php 
        echo htmlspecialchars($search);
        ?>
" class="text_area" onChange="document.adminForm.submit();" />
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="5">
			nº
			</th>
			<th width="20">
			<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title">
			Título
			</th>
			<th width="10%" nowrap="nowrap">
			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 width="8%" nowrap="nowrap">
			Acesso
			</th>
			<th width="10%" align="left">
			Seções
			</th>
			<th width="10%" align="left">
			Categoria
			</th>
			<th width="10%" align="left">
			Autor
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            mosMakeHtmlSafe($row);
            $link = 'index2.php?option=com_content&sectionid=0&task=edit&hidemainmenu=1&id=' . $row->id;
            $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->sectionid;
            $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id=' . $row->catid;
            $now = _CURRENT_SERVER_TIME;
            if ($now <= $row->publish_up && $row->state == '1') {
                $img = 'publish_y.png';
                $alt = 'Publicado';
            } else {
                if (($now <= $row->publish_down || $row->publish_down == $nullDate) && $row->state == '1') {
                    $img = 'publish_g.png';
                    $alt = 'Publicado';
                } else {
                    if ($now > $row->publish_down && $row->state == '1') {
                        $img = 'publish_r.png';
                        $alt = 'Expirado';
                    } elseif ($row->state == "0") {
                        $img = "publish_x.png";
                        $alt = 'Despublicado';
                    }
                }
            }
            $times = '';
            if (isset($row->publish_up)) {
                if ($row->publish_up == $nullDate) {
                    $times .= '<tr><td>Início: Sempre</td></tr>';
                } else {
                    $times .= '<tr><td>Início: ' . $row->publish_up . '</td></tr>';
                }
            }
            if (isset($row->publish_down)) {
                if ($row->publish_down == $nullDate) {
                    $times .= '<tr><td>Fim: Não Expira</td></tr>';
                } else {
                    $times .= '<tr><td>Fim: ' . $row->publish_down . '</td></tr>';
                }
            }
            $access = mosCommonHTML::AccessProcessing($row, $i);
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            if ($acl->acl_check('administration', 'manage', 'users', $my->usertype, 'components', 'com_users')) {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id=' . $row->created_by;
                    $author = '<a href="' . $linkA . '" title="Editar Usuário">' . $row->author . '</a>';
                }
            } else {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $author = $row->author;
                }
            }
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
">
				<td>
				<?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;
                ?>
" title="Editar Conteúdo">
					<?php 
                echo $row->title;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<?php 
            if ($times) {
                ?>
					<td align="center">
					<a href="javascript: void(0);" onmouseover="return overlib('<table><?php 
                echo $times;
                ?>
</table>', CAPTION, 'Informações da Publicação', BELOW, RIGHT);" onMouseOut="return nd();" onclick="return listItemTask('cb<?php 
                echo $i;
                ?>
','<?php 
                echo $row->state ? "despublicar" : "publicar";
                ?>
')">
					<img src="images/<?php 
                echo $img;
                ?>
" width="12" height="12" border="0" alt="<?php 
                echo $alt;
                ?>
" />
					</a>
					</td>
					<?php 
            }
            ?>
				<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->fpordering;
            ?>
" class="text_area" style="text-align: center" />
				</td>
				<td align="center">
				<?php 
            echo $access;
            ?>
				</td>
				<td>
				<a href="<?php 
            echo $row->sect_link;
            ?>
" title="Editar Seção">
				<?php 
            echo $row->sect_name;
            ?>
				</a>
				</td>
				<td>
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="Editar Categoria">
				<?php 
            echo $row->name;
            ?>
				</a>
				</td>
				<td>
				<?php 
            echo $author;
            ?>
				</td>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>

		<?php 
        echo $pageNav->getListFooter();
        mosCommonHTML::ContentLegend();
        ?>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" 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 
    }
Пример #10
0
    /**
     * 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&sectionid=' . $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&section=' . $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 
    }
Пример #11
0
    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 
    }