Ejemplo n.º 1
0
 function CheckedOutProcessing(&$row, $i)
 {
     if (JCOMMENTS_JVERSION == '1.5') {
         return JHTML::_('grid.checkedout', $row, $i);
     }
     return mosCommonHTML::CheckedOutProcessing($row, $i);
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
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 
    }
Ejemplo n.º 4
0
    public static function showClients(&$rows, &$pageNav, $option)
    {
        global $my;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>
			Banner Client Manager
			</th>
		</tr>
		</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 align="left" nowrap="nowrap">
			Client Name
			</th>
			<th align="left" nowrap="nowrap">
			Contact
			</th>
			<th align="center" nowrap="nowrap">
			No. of Active Banners
			</th>
			<th align="center" nowrap="nowrap">
			Client ID
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            mosMakeHtmlSafe($row);
            $row->id = $row->cid;
            $link = 'index2.php?option=com_banners&task=editclientA&hidemainmenu=1&id=' . $row->id;
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
">
				<td width="20" align="center">
				<?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;
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="Edit Banner Client">
					<?php 
                echo $row->name;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<td width="35%">
				<?php 
            echo $row->contact;
            ?>
				</td>
				<td width="15%" align="center">
				<?php 
            echo $row->bid;
            ?>
				</td>
				<td width="15%" align="center">
				<?php 
            echo $row->cid;
            ?>
				</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="listclients" />
		<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 
    }
Ejemplo n.º 5
0
function checkedOut($row, $i)
{
    if (getPlatform() == CMS_JOOMLA15) {
        return JHTML::_('grid.checkedout', $row, $i);
    } else {
        return mosCommonHTML::CheckedOutProcessing($row, $i);
    }
}
Ejemplo n.º 6
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 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 showNewsFeeds(&$rows, &$lists, $pageNav, $option)
    {
        global $my, $mosConfig_cachepath;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>
			Administrar Notícias Externas
			</th>
			<td width="right">
			<?php 
        echo $lists['category'];
        ?>
			</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">
			Fonte da Notícia
			</th>
			<th width="5%">
			Publicado
			</th>
			<th colspan="2" width="5%">
			Reordenar
			</th>
			<th class="title" width="20%">
			Categoria
			</th>
			<th width="5%" nowrap="nowrap">
			Artigos
			</th>
			<th width="10%">
			Duração de Cache (seg)
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            mosMakeHtmlSafe($row);
            $link = 'index2.php?option=com_newsfeeds&task=editA&hidemainmenu=1&id=' . $row->id;
            $img = $row->published ? 'tick.png' : 'publish_x.png';
            $task = $row->published ? 'unpublish' : 'publish';
            $alt = $row->published ? 'Publicado' : 'Despublicado';
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            $row->cat_link = 'index2.php?option=com_categories&section=com_newsfeeds&task=editA&hidemainmenu=1&id=' . $row->catid;
            ?>
			<tr class="<?php 
            echo 'row' . $k;
            ?>
">
				<td align="center">
				<?php 
            echo $pageNav->rowNumber($i);
            ?>
				</td>
				<td>
				<?php 
            echo $checked;
            ?>
				</td>
				<td>
				<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                ?>
					<?php 
                echo $row->name;
                ?>
					&nbsp;[ <i>Confirmado</i> ]
					<?php 
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="Editar fonte da notícia">
					<?php 
                echo $row->name;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<td width="10%" align="center">
				<a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')">
				<img src="images/<?php 
            echo $img;
            ?>
" border="0" alt="<?php 
            echo $alt;
            ?>
" />
				</a>
				</td>
				<td align="center">
				<?php 
            echo $pageNav->orderUpIcon($i);
            ?>
				</td>
				<td align="center">
				<?php 
            echo $pageNav->orderDownIcon($i, $n);
            ?>
				</td>
				<td>
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="Editar Categoria">
				<?php 
            echo $row->catname;
            ?>
				</a>
				</td>
				<td align="center">
				<?php 
            echo $row->numarticles;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->cache_time;
            ?>
				</td>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>
		<?php 
        echo $pageNav->getListFooter();
        ?>

		<table class="adminform">
		<tr>
			<td>
				<table align="center">
				<?php 
        $visible = 0;
        // check to hide certain paths if not super admin
        if ($my->gid == 25) {
            $visible = 1;
        }
        mosHTML::writableCell($mosConfig_cachepath, 0, '<strong>Diretório do cache</strong> ', $visible);
        ?>
				</table>
			</td>
		</tr>
		</table>

		<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="hidemainmenu" value="0">
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
Ejemplo n.º 9
0
    public static function showPolls(&$rows, &$pageNav, $option)
    {
        global $my;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>Poll Manager</th>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="5">
			#
			</th>
			<th width="20">
			<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th align="left">
			Poll Title
			</th>
			<th width="10%" align="center">
			Published
			</th>
			<th width="10%" align="center">
			Options
			</th>
			<th width="10%" align="center">
			Lag
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            mosMakeHtmlSafe($row);
            $link = 'index2.php?option=com_poll&task=editA&hidemainmenu=1&id=' . $row->id;
            $task = $row->published ? 'unpublish' : 'publish';
            $img = $row->published ? 'publish_g.png' : 'publish_x.png';
            $alt = $row->published ? 'Published' : 'Unpublished';
            $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 Poll">
				<?php 
            echo $row->title;
            ?>
				</a>
				</td>
				<td align="center">
				<a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')">
				<img src="images/<?php 
            echo $img;
            ?>
" width="12" height="12" border="0" alt="<?php 
            echo $alt;
            ?>
" />
				</a>
				</td>
				<td align="center">
				<?php 
            echo $row->numoptions;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->lag;
            ?>
				</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="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, $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 
    }
Ejemplo n.º 11
0
 function show($option, $task, $rows, $pageNav, $search)
 {
     global $my, $mosConfig_live_site;
     mosCommonHTML::loadOverlib();
     echo "<form action=\"index2.php\" method=\"post\" name=\"adminForm\">";
     echo "<table class=\"adminheading\">";
     echo "<tr><th class=\"addedit\" rowspan=\"2\">" . _RDRSS_ITEM . "</th>";
     echo "<td colspan=\"2\" align=\"right\"></td></tr>";
     echo "<tr><td>Filter:</td><td> <input type=\"text\" name=\"search\" value=\"" . $search . "\" class=\"text_area\" onChange=\"document.adminForm.submit();\" />";
     echo "</td></tr></table>";
     echo "<table class=\"adminlist\"><tr>";
     echo "<th width=\"5\">";
     echo "<input type=\"checkbox\" name=\"toggle\" value=\"\" onClick=\"checkAll(" . count($rows) . ");\" />";
     echo "</th><th class=\"title\" >" . _RDRSS_NAME;
     echo "</th><th class=\"title\" >" . _RDRSS_URL;
     echo "</th><th class=\"title\" >" . _RDRSS_PUBLISHED;
     echo "</th><th class=\"title\" >" . _RDRSS_ID;
     echo "</th></tr>";
     $k = 0;
     for ($i = 0, $n = count($rows); $i < $n; $i++) {
         $row =& $rows[$i];
         $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
         $link = 'index2.php?option=' . $option . '&amp;task=edit&amp;hidemainmenu=1&amp;id=' . $row->id;
         if ($row->published) {
             $img = 'publish_g.png';
             $alt = _RDRSS_PUBLISHED;
             $todo = 'unpublish';
         } else {
             $img = 'publish_x.png';
             $alt = _RDRSS_UNPUBLISHED;
             $todo = 'publish';
         }
         echo "<tr class=\"row" . $k . "\"><td>";
         echo $checked;
         echo "</td><td>";
         if ($row->checked_out && $row->checked_out != $my->id) {
             echo $row->name;
         } else {
             echo '<a href="' . $link . '" title="' . $row->name . '">';
             echo htmlspecialchars($row->name, ENT_QUOTES);
             echo "</a>";
         }
         echo "</td>";
         echo "<td>";
         echo $mosConfig_live_site . '/index.php?option=com_rd_rss&amp;id=' . $row->id;
         echo "</td>";
         echo "<td>";
         echo "<a href=\"javascript: void(0);\"  onClick=\"return listItemTask('cb{$i}','{$todo}')\">";
         echo "<img src=\"images/{$img}\" width=\"12\" height=\"12\" border=\"0\" alt=\"{$alt}\" />";
         echo "</td>";
         echo "<td>";
         echo $row->id;
         echo "</td>";
         echo "</tr>";
         $k = 1 - $k;
     }
     echo "</table>";
     echo $pageNav->getListFooter();
     echo "<input type=\"hidden\" name=\"option\" value=\"" . $option . "\" />";
     echo "<input type=\"hidden\" name=\"task\" value=\"\" />";
     echo "<input type=\"hidden\" name=\"boxchecked\" value=\"0\" />";
     echo "<input type=\"hidden\" name=\"hidemainmenu\" value=\"0\" />";
     echo "</form><br />";
 }
Ejemplo n.º 12
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 
    }
Ejemplo n.º 13
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 
    }
Ejemplo n.º 14
0
    function showWeblinks($option, &$rows, &$lists, &$search, &$pageNav)
    {
        global $my;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>
			<?php 
        echo T_('Web Link Manager');
        ?>
			</th>
			<td>
			<?php 
        echo T_('Filter:');
        ?>
			</td>
			<td>
			<input type="text" name="search" value="<?php 
        echo $search;
        ?>
" class="text_area" onChange="document.adminForm.submit();" />
			</td>
			<td width="right">
			<?php 
        echo $lists['catid'];
        ?>
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="5">
			#
			</th>
			<th width="20">
			<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 width="5%">
			<?php 
        echo T_('Approved');
        ?>
			</th>
			<th colspan="2" width="5%">
			<?php 
        echo T_('Reorder');
        ?>
			</th>
			<th width="25%" align="left">
			<?php 
        echo T_('Category');
        ?>
			</th>
			<th width="5%">
			<?php 
        echo T_('Hits');
        ?>
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            $link = 'index2.php?option=com_weblinks&task=editA&hidemainmenu=1&id=' . $row->id;
            $task = $row->published ? 'unpublish' : 'publish';
            $img = $row->published ? 'publish_g.png' : 'publish_x.png';
            $alt = $row->published ? 'Published' : 'Unpublished';
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            $row->cat_link = 'index2.php?option=com_categories&section=com_weblinks&task=editA&hidemainmenu=1&id=' . $row->catid;
            ?>
			<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 stripslashes($row->title);
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="<?php 
                echo T_('Edit Weblinks');
                ?>
">
					<?php 
                echo stripslashes($row->title);
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<td align="center">
				<a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')">
				<img src="images/<?php 
            echo $img;
            ?>
" width="12" height="12" border="0" alt="<?php 
            echo $alt;
            ?>
" />
				</a>
				</td>
				<?php 
            if ($row->approved) {
                ?>
					<td align="center">
					<img src="images/tick.png">
					</td>
					<?php 
            } else {
                ?>
					<td align="center">
					</td>
					<?php 
            }
            ?>
				<td>
				<?php 
            echo $pageNav->orderUpIcon($i, $row->catid == @$rows[$i - 1]->catid);
            ?>
				</td>
      			<td>
				<?php 
            echo $pageNav->orderDownIcon($i, $n, $row->catid == @$rows[$i + 1]->catid);
            ?>
				</td>
				<td>
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="<?php 
            echo T_('Edit Category');
            ?>
">
				<?php 
            echo $row->category;
            ?>
				</a>
				</td>
				<td align="center">
				<?php 
            echo $row->hits;
            ?>
				</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="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0">
		</form>
		<?php 
    }
Ejemplo n.º 15
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 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 
    }
Ejemplo n.º 17
0
    function JLMS_showPlans($rows, $pageNav, $option)
    {
        global $my;
        JHTML::_('behavior.tooltip');
        ?>
		<script language="javascript" type="text/javascript">
		<!--
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'delete_plan') {
				submitform( pressbutton );
				return;
			}
			else {
				submitform( pressbutton );
				return;
			}
		}
		
		<?php 
        if (JLMS_J16version()) {
            ?>
		Joomla.submitbutton = submitbutton;
		<?php 
        }
        ?>
		//-->
		</script>		
		<form action="index.php" method="post" name="adminForm">		
		<table width="100%" >
			<tr>
				<td valign="top" width="220">
				<div>
					<?php 
        echo joomla_lms_adm_html::JLMS_menu();
        ?>
				</div>
				</td>
				<td valign="top">				
					<?php 
        if (!class_exists('JToolBarHelper')) {
            ?>
					<table class="adminheading" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<th class="categories">
						<?php 
            echo _JOOMLMS_COMP_NAME;
            ?>
: <small><?php 
            echo _JLMS_PLANS;
            ?>
</small>
						</th>
					</tr>
					</table>
					<?php 
        }
        ?>
				
					<table width="100%" border="0">
					<tr>
						<td valign="top">
							<table class="adminlist">
							<thead>
							<tr>
								<th width="20">#</th>
								<th width="20" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" /></th>
								<th class="title"><?php 
        echo _JLMS_NAME;
        ?>
</th>
								<th class="title"><?php 
        echo _JLMS_PUBLISHED;
        ?>
</th>								
								<th class="title"><?php 
        echo _JLMS_PLANS_TRIAL_P1;
        ?>
</th>								
								<th class="title"><?php 
        echo _JLMS_PLANS_TRIAL_P2;
        ?>
</th>								
								<th class="title"><?php 
        echo _JLMS_PLANS_REGULAR_P;
        ?>
</th>								
								<th class="title"><?php 
        echo _JLMS_PLANS_RECR_TIMES;
        ?>
</th>								
							</tr>	
							</thead>
							<tfoot>
							<tr>
								<td colspan="10">
									<?php 
        echo $pageNav->getListFooter();
        ?>
								</td>
							</tr>
							</tfoot>
							<tbody>
							<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row = $rows[$i];
            $link = 'index.php?option=com_joomla_lms&task=editA_plan&hidemainmenu=1&id=' . $row->id;
            $row->editor = '';
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            $src = $row->src ? '<img src="' . ADMIN_IMAGES_PATH . 'tick.png" border="0" alt="Yes" />' : '<img src="' . ADMIN_IMAGES_PATH . 'publish_x.png" border="0" alt="Yes" />';
            $sra = $row->sra ? '<img src="' . ADMIN_IMAGES_PATH . 'tick.png" border="0" alt="Yes" />' : '<img src="' . ADMIN_IMAGES_PATH . 'publish_x.png" border="0" alt="Yes" />';
            $img = $row->published ? 'tick.png' : 'publish_x.png';
            $task = $row->published ? 'unpublish_plan' : 'publish_plan';
            $alt = $row->published ? _JLMS_PUBLISHED : _JLMS_UNPUBLISHED;
            ?>
								<tr class="<?php 
            echo "row{$k}";
            ?>
">

									<td><?php 
            echo $pageNav->rowNumber($i);
            ?>
</td>

									<td><?php 
            echo $checked;
            ?>
</td>

									<td align="left">
									<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                echo $row->name;
            } else {
                ?>
										<a href="<?php 
                echo $link;
                ?>
" title="<?php 
                echo _JLMS_PLANS_EDIT_PLAN;
                ?>
"><?php 
                echo $row->name;
                ?>
</a>
										<?php 
            }
            ?>
									</td>
									
									<td><a href="javascript: void(0);" onClick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')">
										<img src="<?php 
            echo ADMIN_IMAGES_PATH . $img;
            ?>
" border="0" alt="<?php 
            echo $alt;
            ?>
" />
										</a>
									</td>
																		
									<td><?php 
            if ($row->p1) {
                echo $row->p1;
                if ($row->t1 == 'D') {
                    echo ' ' . _JLMS_PLANS_DAYS;
                }
                if ($row->t1 == 'W') {
                    echo ' ' . _JLMS_PLANS_WEEKS;
                }
                if ($row->t1 == 'M') {
                    echo ' ' . _JLMS_PLANS_MONTHS;
                }
                if ($row->t1 == 'Y') {
                    echo ' ' . _JLMS_PLANS_YEARS;
                }
            }
            ?>
									</td>
																		
									<td><?php 
            if ($row->p2) {
                echo $row->p2;
                if ($row->t2 == 'D') {
                    echo ' ' . _JLMS_PLANS_DAYS;
                }
                if ($row->t2 == 'W') {
                    echo ' ' . _JLMS_PLANS_WEEKS;
                }
                if ($row->t2 == 'M') {
                    echo ' ' . _JLMS_PLANS_MONTHS;
                }
                if ($row->t2 == 'Y') {
                    echo ' ' . _JLMS_PLANS_YEARS;
                }
            }
            ?>
									</td>
																		
									<td><?php 
            if ($row->p3) {
                echo $row->p3;
                if ($row->t3 == 'D') {
                    echo ' ' . _JLMS_PLANS_DAYS;
                }
                if ($row->t3 == 'W') {
                    echo ' ' . _JLMS_PLANS_WEEKS;
                }
                if ($row->t3 == 'M') {
                    echo ' ' . _JLMS_PLANS_MONTHS;
                }
                if ($row->t3 == 'Y') {
                    echo ' ' . _JLMS_PLANS_YEARS;
                }
            }
            ?>
									</td>									
									<td><?php 
            echo $row->srt ? $row->srt : '';
            ?>
</td>
								</tr>
								<?php 
            $k = 1 - $k;
        }
        ?>
														
							</tbody>
							</table>					
						</td>
					</tr>
					</table>
			</td>
		</tr>
		</table>		
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="plans" />
		<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 
    }
Ejemplo n.º 19
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 content items
     * @param array An array of content objects
     */
    public static function showContent(&$rows, &$pageNav, $option, $search, &$lists)
    {
        global $my, $acl, $database;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">

		<table class="adminheading">
		<tr>
			<th class="edit">
			Static Content Manager
			</th>
			<td>
			Filter:&nbsp;
			</td>
			<td>
			<input type="text" name="search" value="<?php 
        echo htmlspecialchars($search);
        ?>
" class="text_area" onChange="document.adminForm.submit();" />
			</td>
			<td>
			&nbsp;&nbsp;&nbsp;Order:&nbsp;
			</td>
			<td>
			<?php 
        echo $lists['order'];
        ?>
			</td>
			<td width="right">
			<?php 
        echo $lists['authorid'];
        ?>
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="5">
			#
			</th>
			<th width="5px">
			<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title">
			Title
			</th>
			<th width="5%">
			Published
			</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 width="5%">
			ID
			</th>
			<th width="1%" align="left">
			Links
			</th>
			<th width="20%" align="left">
			Author
			</th>
			<th align="center" width="10">
			Date
			</th>
		</tr>
		<?php 
        $k = 0;
        $nullDate = $database->getNullDate();
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            mosMakeHtmlSafe($row);
            $now = _CURRENT_SERVER_TIME;
            if ($now <= $row->publish_up && $row->state == 1) {
                // Published
                $img = 'publish_y.png';
                $alt = 'Published';
            } else {
                if (($now <= $row->publish_down || $row->publish_down == $nullDate) && $row->state == 1) {
                    // Pending
                    $img = 'publish_g.png';
                    $alt = 'Published';
                } else {
                    if ($now > $row->publish_down && $row->state == 1) {
                        // Expired
                        $img = 'publish_r.png';
                        $alt = 'Expired';
                    } elseif ($row->state == 0) {
                        // Unpublished
                        $img = 'publish_x.png';
                        $alt = 'Unpublished';
                    }
                }
            }
            // 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 = 'Never';
            }
            $row->publish_down = mosFormatDate($row->publish_down, _CURRENT_SERVER_TIME_FORMAT);
            $times = '';
            if ($row->publish_up == $nullDate) {
                $times .= "<tr><td>Start: Always</td></tr>";
            } else {
                $times .= "<tr><td>Start: {$row->publish_up}</td></tr>";
            }
            if ($row->publish_down == $nullDate || $row->publish_down == 'Never') {
                $times .= "<tr><td>Finish: No Expiry</td></tr>";
            } else {
                $times .= "<tr><td>Finish: {$row->publish_down}</td></tr>";
            }
            if (!$row->access) {
                $color_access = 'style="color: green;"';
                $task_access = 'accessregistered';
            } else {
                if ($row->access == 1) {
                    $color_access = 'style="color: red;"';
                    $task_access = 'accessspecial';
                } else {
                    $color_access = 'style="color: black;"';
                    $task_access = 'accesspublic';
                }
            }
            $link = 'index2.php?option=com_typedcontent&task=edit&hidemainmenu=1&id=' . $row->id;
            $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="Edit User">' . $row->creator . '</a>';
                }
            } else {
                if ($row->created_by_alias) {
                    $author = $row->created_by_alias;
                } else {
                    $author = $row->creator;
                }
            }
            $date = mosFormatDate($row->created, '%x');
            ?>
			<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;
                if ($row->title_alias) {
                    echo ' (<i>' . $row->title_alias . '</i>)';
                }
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="Edit Static Content">
					<?php 
                echo $row->title;
                if ($row->title_alias) {
                    echo ' (<i>' . $row->title_alias . '</i>)';
                }
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<?php 
            if ($times) {
                ?>
					<td align="center">
					<a href="javascript: void(0);" onMouseOver="return overlib('<table><?php 
                echo $times;
                ?>
</table>', CAPTION, '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" 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">
				<a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task_access;
            ?>
')" <?php 
            echo $color_access;
            ?>
>
				<?php 
            echo $row->groupname;
            ?>
				</a>
				</td>
				<td align="center">
				<?php 
            echo $row->id;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->links;
            ?>
				</td>
				<td align="left">
				<?php 
            echo $author;
            ?>
				</td>
				<td>
				<?php 
            echo $date;
            ?>
				</td>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>

		<?php 
        echo $pageNav->getListFooter();
        ?>
		<?php 
        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="hidemainmenu" value="0" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
Ejemplo n.º 21
0
    function showNewsFeeds(&$rows, &$lists, $pageNav, $option)
    {
        global $my;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>
			<?php 
        echo T_('News Feed Manager');
        ?>
			</th>
			<td width="right">
			<?php 
        echo $lists['category'];
        ?>
			</td>
		</tr>
		</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">
			<?php 
        echo T_('News Feed');
        ?>
			</th>
			<th width="5%">
			<?php 
        echo T_('Published');
        ?>
			</th>
			<th colspan="2" width="5%">
			<?php 
        echo T_('Reorder');
        ?>
			</th>
			<th class="title" width="20%">
			<?php 
        echo T_('Category');
        ?>
			</th>
			<th width="5%" nowrap="nowrap">
			<?php 
        echo T_('# Articles');
        ?>
			</th>
			<th width="10%">
			<?php 
        echo T_('Cache time');
        ?>
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            $link = 'index2.php?option=com_newsfeeds&task=editA&hidemainmenu=1&id=' . $row->id;
            $img = $row->published ? 'tick.png' : 'publish_x.png';
            $task = $row->published ? 'unpublish' : 'publish';
            $alt = $row->published ? 'Published' : 'Unpublished';
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            $row->cat_link = 'index2.php?option=com_categories&section=com_newsfeeds&task=editA&hidemainmenu=1&id=' . $row->catid;
            ?>
			<tr class="<?php 
            echo 'row' . $k;
            ?>
">
				<td align="center">
				<?php 
            echo $pageNav->rowNumber($i);
            ?>
				</td>
				<td>
				<?php 
            echo $checked;
            ?>
				</td>
				<td>
				<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                ?>
					<?php 
                echo $row->name;
                ?>
					&nbsp;[ <i><?php 
                echo T_('Checked Out');
                ?>
</i> ]
					<?php 
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="<?php 
                echo T_('Edit News Feed');
                ?>
">
					<?php 
                echo $row->name;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<td width="10%" align="center">
				<a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')">
				<img src="images/<?php 
            echo $img;
            ?>
" border="0" alt="<?php 
            echo $alt;
            ?>
" />
				</a>
				</td>
				<td align="center">
				<?php 
            echo $pageNav->orderUpIcon($i);
            ?>
				</td>
				<td align="center">
				<?php 
            echo $pageNav->orderDownIcon($i, $n);
            ?>
				</td>
				<td>
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="<?php 
            echo T_('Edit Category');
            ?>
">
				<?php 
            echo $row->catname;
            ?>
				</a>
				</td>
				<td align="center">
				<?php 
            echo $row->numarticles;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->cache_time;
            ?>
				</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="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0">
		</form>
		<?php 
    }
Ejemplo n.º 22
0
    public static function showContacts(&$rows, &$pageNav, $search, $option, &$lists)
    {
        global $my;
        mosCommonHTML::loadOverlib();
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>
			Contact Manager
			</th>
			<td>
			Filter:
			</td>
			<td>
			<input type="text" name="search" value="<?php 
        echo htmlspecialchars($search);
        ?>
" class="inputbox" onChange="document.adminForm.submit();" />
			</td>
			<td width="right">
			<?php 
        echo $lists['catid'];
        ?>
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="20">
			#
			</th>
			<th width="20" class="title">
			<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title">
			Name
			</th>
			<th width="5%" class="title" nowrap="nowrap">
			Published
			</th>
			<th colspan="2" nowrap="nowrap" width="5%">
			Reorder
			</th>
			<th width="15%" align="left">
			Category
			</th>
			<th class="title" nowrap="nowrap" width="15%">
			Linked to User
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row = $rows[$i];
            mosMakeHtmlSafe($row);
            $link = 'index2.php?option=com_contact&task=editA&hidemainmenu=1&id=' . $row->id;
            $img = $row->published ? 'tick.png' : 'publish_x.png';
            $task = $row->published ? 'unpublish' : 'publish';
            $alt = $row->published ? 'Published' : 'Unpublished';
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            $row->cat_link = 'index2.php?option=com_categories&section=com_contact_details&task=editA&hidemainmenu=1&id=' . $row->catid;
            $row->user_link = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id=' . $row->user_id;
            ?>
			<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->name;
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
" title="Edit Contact">
					<?php 
                echo $row->name;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<td align="center">
				<a href="javascript: void(0);" onClick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')">
				<img src="images/<?php 
            echo $img;
            ?>
" width="12" height="12" border="0" alt="<?php 
            echo $alt;
            ?>
" />
				</a>
				</td>
				<td>
				<?php 
            echo $pageNav->orderUpIcon($i, $row->catid == @$rows[$i - 1]->catid);
            ?>
				</td>
				<td>
				<?php 
            echo $pageNav->orderDownIcon($i, $n, $row->catid == @$rows[$i + 1]->catid);
            ?>
				</td>
				<td>
				<a href="<?php 
            echo $row->cat_link;
            ?>
" title="Edit Category">
				<?php 
            echo $row->category;
            ?>
				</a>
				</td>
				<td>
				<a href="<?php 
            echo $row->user_link;
            ?>
" title="Edit User">
				<?php 
            echo $row->user;
            ?>
				</a>
				</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="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 
    }
Ejemplo n.º 24
0
    function manage($rows, $pageNav, $lists)
    {
        global $my, $mainframe, $database, $option, $priTask, $subTask;
        global $WBG_CONFIG, $wbGalleryDB_cat;
        ?>
    <script language="Javascript">
      function saveOrderX(n) {
        checAllX(n);
      }
      function checAllX( n ) {
        for ( var j = 0; j <= n; j++ ) {
          box = eval( "document.adminForm.cb" + j );
          if ( box ) {
            if ( box.checked == false ) {
              box.checked = true;
            }
          } else {
            alert("You cannot change the order of items, as an item in the list is `Checked Out`");
            return;
          }
        }
        submitform('category.order');
      }
    </script>
    <form action="index2.php" method="post" name="adminForm">
      <table class="adminheading">
      <tr>
        <th class="categories" valign="top">
          <font size="+1">wbGallery</font><br/>
          Manage Collection Categories
        </th>
        <td nowrap="nowrap">Filter Category: <?php 
        echo $lists['p_cid'];
        ?>
</td>
      </tr>
      </table>
      <table class="adminlist">
      <tr>
        <th width="5%" align="left">#</th>
        <th width="5%"><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php 
        echo count($rows);
        ?>
);" /></th>
        <th width="60%">Category Name</th>
        <th width="5%" nowrap>Total Images</th>
        <th width="5%">Published</th>
        <th colspan="2" width="5%">Reorder</th>
        <th width="5%">Order</th>
        <th width="5%"><a href="javascript: saveOrderX(<?php 
        echo count($rows) - 1;
        ?>
)"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a></th>
        <th width="5%" nowrap>Category ID</th>
      </tr>
      <?php 
        // Ordering Calculations & Review
        $nChildren = $sChildren = array('0' => 0);
        foreach ($rows as $row) {
            if ($row->parent_id == 0) {
                $nChildren[0]++;
            }
        }
        // Loop through Categories
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            $link = 'index2.php?option=' . $option . '&task=category.edit&hidemainmenu=1&cid=' . $row->id;
            $showLink = 'index2.php?option=' . $option . '&task=image&cat_id=' . $row->id;
            $checked = mosCommonHTML::CheckedOutProcessing($row, $i);
            $sChildren[$row->parent_id]++;
            if (!array_key_exists($row->id, $nChildren)) {
                $nChildren[$row->id] = $row->_children;
            }
            $orderOk = array_key_exists($row->parent_id, $nChildren) ? $nChildren[$row->parent_id] > 1 : 0;
            $orderHead = $sChildren[$row->parent_id] == 1 && $nChildren[$row->parent_id] > 1;
            $orderTail = $sChildren[$row->parent_id] >= $nChildren[$row->parent_id];
            ?>
        <tr class="<?php 
            echo "row{$k}";
            ?>
">
          <td><?php 
            echo $pageNav->rowNumber($i);
            ?>
</td>
          <td><?php 
            echo $checked;
            ?>
</td>
          <td><a href="<?php 
            echo $link;
            ?>
"><?php 
            echo stripslashes($row->name) . ' ( ' . stripslashes($row->title) . ' )';
            ?>
 </a></td>
          <td align="center"><?php 
            echo $row->_images;
            ?>
 <a href="<?php 
            echo $showLink;
            ?>
">[ show ]</a></td>
          <td align="center"><a href="javascript:void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $row->published ? 'category.unpublish' : 'category.publish';
            ?>
')">
            <img src="images/<?php 
            echo $row->published ? "tick.png" : "publish_x.png";
            ?>
" border="0" /></a></td>
          <td align="center"><?php 
            echo $pageNav->orderUpIcon($i, $orderOk && !$orderHead, 'category.orderup');
            ?>
</td>
          <td align="center"><?php 
            echo $pageNav->orderDownIcon($i, $n, $orderOk && !$orderTail, 'category.orderdown');
            ?>
</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 $row->id;
            ?>
</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="<?php 
        echo $priTask;
        ?>
" />
      <input type="hidden" name="boxchecked" value="0" />
      <input type="hidden" name="hidemainmenu" value="0" />
    </form>
    <?php 
    }