Beispiel #1
0
 function CheckedOutProcessing(&$row, $i)
 {
     if (JCOMMENTS_JVERSION == '1.5') {
         return JHTML::_('grid.checkedout', $row, $i);
     }
     return mosCommonHTML::CheckedOutProcessing($row, $i);
 }
Beispiel #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;
 }
    /**
     * Writes the edit form for new and existing content item
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosContent The category object
     * @param string The html for the groups select list
     */
    function editContent(&$row, $section, &$lists, &$sectioncategories, &$images, &$params, $option, $redirect, &$menus)
    {
        global $database;
        mosMakeHtmlSafe($row);
        $nullDate = $database->getNullDate();
        $create_date = null;
        if ($row->created != $nullDate) {
            $create_date = mosFormatDate($row->created, '%A, %d %B %Y %H:%M', '0');
        }
        $mod_date = null;
        if ($row->modified != $nullDate) {
            $mod_date = mosFormatDate($row->modified, '%A, %d %B %Y %H:%M', '0');
        }
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visibility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		<!--
		var sectioncategories = new Array;
		<?php 
        $i = 0;
        foreach ($sectioncategories as $k => $items) {
            foreach ($items as $v) {
                echo "sectioncategories[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->id) . "','" . addslashes($v->name) . "' );\t";
            }
        }
        ?>

		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes(ampReplace($v->value)) . "','" . addslashes(ampReplace($v->text)) . "' );\t";
            }
        }
        ?>

		function submitbutton(pressbutton) {
			var form = document.adminForm;

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "Selecione um menu" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "Por favor, informe um nome para este item do menu" );
					return;
				}
			}

			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// assemble the images back into one field
			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			// do field validation
			if (form.title.value == ""){
				alert( "Item de conteúdo deve ter um título" );
			} else if (form.sectionid.value == "-1"){
				alert( "Você deve selecionar uma seção." );
			} else if (form.catid.value == "-1"){
				alert( "Você deve selecionar uma categoria." );
 			} else if (form.catid.value == ""){
 				alert( "Você deve selecionar uma categoria." );
			} else {
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				<?php 
        getEditorContents('editor2', 'fulltext');
        ?>
				submitform( pressbutton );
			}
		}
		//-->
		</script>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="edit">
			Itens de Conteúdo:
			<small>
			<?php 
        echo $row->id ? 'Editar' : 'Novo';
        ?>
			</small>
			<?php 
        if ($row->id) {
            ?>
				<small><small>
				[ Seção: <?php 
            echo $section;
            ?>
 ]
				</small></small>
				<?php 
        }
        ?>
			</th>
		</tr>
		</table>

		<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td width="60%" valign="top">
				<table width="100%" class="adminform">
				<tr>
					<td width="100%">
						<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tr>
							<th colspan="4">
							Detalhes do Item
							</th>
						</tr>
						<tr>
							<td>
							Título:
							</td>
							<td>
							<input class="text_area" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
							</td>
							<td>
							Seção:
							</td>
							<td>
							<?php 
        echo $lists['sectionid'];
        ?>
							</td>
						</tr>
						<tr>
							<td>
							Sub-Título:
							</td>
							<td>
							<input name="title_alias" type="text" class="text_area" id="title_alias" value="<?php 
        echo $row->title_alias;
        ?>
" size="30" maxlength="100" />
							</td>
							<td>
							Categoria:
							</td>
							<td>
							<?php 
        echo $lists['catid'];
        ?>
							</td>
						</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="100%">
					Texto de Introdução: (necessário)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '350', '75', '20');
        ?>
					</td>
				</tr>
				<tr>
					<td width="100%">
					Texto principal: (opcional)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor2', $row->fulltext, 'fulltext', '100%;', '400', '75', '30');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top" width="40%">
				<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab("Publicação", "publish-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Info da Publicação
					</th>
				</tr>
				<tr>
					<td valign="top" align="right" width="120">
					Exibir na Página Inicial:
					</td>
					<td>
					<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Publicado:
					</td>
					<td>
					<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Nível de Acesso:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Apelido do Autor:
					</td>
					<td>
					<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="text_area" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Alterar Autor:
					</td>
					<td>
					<?php 
        echo $lists['created_by'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">Ordem:</td>
					<td>
					<?php 
        echo $lists['ordering'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Alterar Data de Criação 
					</td>
					<td>
					<input class="text_area" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
					<input name="reset" type="reset" class="button" onclick="return showCalendar('created', 'y-mm-dd');" value="..." />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Início da Publicação:
					</td>
					<td>
					<input class="text_area" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Fim da Publicação:
					</td>
					<td>
					<input class="text_area" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');" />
					</td>
				</tr>
				</table>
				<br />
				<table class="adminform">
				<?php 
        if ($row->id) {
            ?>
					<tr>
						<td>
						<strong>ID do conteúdo:</strong>
						</td>
						<td>
						<?php 
            echo $row->id;
            ?>
						</td>
					</tr>
					<?php 
        }
        ?>
				<tr>
					<td width="120" valign="top" align="right">
					<strong>Estado:</strong>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? 'Publicado' : ($row->state < 0 ? 'Arquivado' : 'Rascunho não publicado');
        ?>
					</td>
				</tr>
				<tr >
					<td valign="top" align="right">
					<strong>
					Acessos
					</strong>:
					</td>
					<td>
					<?php 
        echo $row->hits;
        ?>
					<div <?php 
        echo $visibility;
        ?>
>
					<input name="reset_hits" type="button" class="button" value="Reiniciar Contagem" onclick="submitbutton('resethits');" />
					</div>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>
					Revisão
					</strong>:
					</td>
					<td>
					<?php 
        echo $row->version;
        ?>
 vez(es)
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>
					Criado
					</strong>
					</td>
					<td>
						<?php 
        if (!$create_date) {
            ?>
							Novo documento
							<?php 
        } else {
            echo $create_date;
        }
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>
					Última Alteração
					</strong>
					</td>
					<td>
						<?php 
        if (!$mod_date) {
            ?>
							Não alterado
							<?php 
        } else {
            echo $mod_date;
            ?>
							<br />
							<?php 
            echo $row->modifier;
        }
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Imagens", "images-page");
        ?>
				<table class="adminform" width="100%">
				<tr>
					<th colspan="2">
						Controle do MOSImage
					</th>
				</tr>
				<tr>
					<td colspan="2">
						<table width="100%">
						<tr>
							<td width="48%" valign="top">
								<div align="center">
									Imagens na Galeria:
									<br />
									<?php 
        echo $lists['imagefiles'];
        ?>
								</div>
							</td>
							<td width="2%">
								<input class="button" type="button" value=">>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" title="Adicionar"/>
								<br />
								<input class="button" type="button" value="<<" onclick="delSelectedFromList('adminForm','imagelist')" title="Remover"/>
							</td>
							<td width="48%">
								<div align="center">
									Imagens no Artigo:
									<br />
									<?php 
        echo $lists['imagelist'];
        ?>
									<br />
									<input class="button" type="button" value="Para cima" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
									<input class="button" type="button" value="Para baixo" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
								</div>
							</td>
						</tr>
						</table>
						Sub-pastas: <?php 
        echo $lists['folders'];
        ?>
					</td>
				</tr>
				<tr valign="top">
					<td>
						<div align="center">
							Imagem de amostra:<br/>
							<img name="view_imagefiles" src="../images/M_images/blank.png" alt="Imagem vazia padrão" width="100" />
						</div>
					</td>
					<td valign="top">
						<div align="center">
							Imagem Ativa:<br/>
							<img name="view_imagelist" src="../images/M_images/blank.png" alt="Imagem Ativa" width="100" />
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						Edite a imagem selecionada:
						<table>
						<tr>
							<td align="right">
							Fonte:
							</td>
							<td>
							<input class="text_area" type="text" name= "_source" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Alinhamento:
							</td>
							<td>
							<?php 
        echo $lists['_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Texto Alt:
							</td>
							<td>
							<input class="text_area" type="text" name="_alt" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Borda:
							</td>
							<td>
							<input class="text_area" type="text" name="_border" value="" size="3" maxlength="1" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Sub-Título:
							</td>
							<td>
							<input class="text_area" type="text" name="_caption" value="" size="30" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Posição do Sub-Título:
							</td>
							<td>
							<?php 
        echo $lists['_caption_position'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Alinhamento do Sub-Título:
							</td>
							<td>
							<?php 
        echo $lists['_caption_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Largura Sub-Título:
							</td>
							<td>
							<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
							<input class="button" type="button" value="Aplicar" onclick="applyImageProps()" />
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Parâmetros", "params-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Controle de Parâmetros
					</th>
				</tr>
				<tr>
					<td>
					Estes parâmetros somente controlam o que você vê quando clica para visualizar um item completamente
					<br /><br />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Meta dados", "metadata-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Meta Dados
					</th>
				</tr>
				<tr>
					<td>
					Descrição:
					<br />
					<textarea class="text_area" cols="30" rows="3" style="width: 350px; height: 50px" name="metadesc"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
					</td>
				</tr>
					<tr>
					<td>
					Palavras Chaves:
					<br />
					<textarea class="text_area" cols="30" rows="3" style="width: 350px; height: 50px" name="metakey"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td>
					<input type="button" class="button" value="Adicionar titulo Seção/Categoria/Título" onclick="f=document.adminForm;f.metakey.value=document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].text+', '+getSelectedText('adminForm','catid')+', '+f.title.value+f.metakey.value;" />
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Link para o Menu", "link-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Link para o Menu
					</th>
				</tr>
				<tr>
					<td colspan="2">
					Isto irá criar um 'Link - Item de Conteúdo' no menu que você selecionou 
					<br /><br />
					</td>
				</tr>
				<tr>
					<td valign="top" width="90">
					Selecione um Menu
					</td>
					<td>
					<?php 
        echo $lists['menuselect'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" width="90">
					Nome do Menu
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="30" />
					</td>
				</tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="Link para o Menu" onclick="submitbutton('menulink');" />
					</td>
				</tr>
				<tr>
					<th colspan="2">
					Links de Menu Existentes
					</th>
				</tr>
				<?php 
        if ($menus == NULL) {
            ?>
					<tr>
						<td colspan="2">
						Nenhum
						</td>
					</tr>
					<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
		<input type="hidden" name="mask" value="0" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="images" value="" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
Beispiel #4
0
    function getModuleButtons($name, $params = array())
    {
        if (defined('_DM_J15')) {
            // the buttons don't work in J15 yet
            return true;
        }
        global $mosConfig_live_site, $option;
        $id = DOCMAN_Utils::getModuleIdByName($name);
        mosCommonHTML::loadOverlib();
        ?>

        <div width="100%" align="right">
        <?php 
        $href = "index2.php?option=com_modules&amp;client=admin&amp;task=editA&amp;hidemainmenu=1&amp;id={$id}";
        echo DOCMAN_Utils::mosToolTip(_DML_EDIT_THIS_MODULE, '', '', 'edit.png', '', $href);
        $href = "index2.php?option=com_docman&amp;section=modules&amp;task=unpublish&amp;moduleid={$id}&amp;redirect=index2.php%3foption%3d{$option}";
        echo DOCMAN_Utils::mosToolTip(_DML_UNPUBLISH_THIS_MODULE, '', '', '../../../administrator/images/publish_x.png', '', $href);
        $href = "index2.php?option=com_docman&amp;section=modules&amp;task=orderup&amp;moduleid={$id}&amp;redirect=index2.php%3foption%3d{$option}";
        echo DOCMAN_Utils::mosToolTip(_DML_ORDER_THIS_MODULE, '', '', '../../../administrator/images/uparrow.png', '', $href);
        $href = "index2.php?option=com_docman&amp;section=modules&amp;task=orderdown&amp;moduleid={$id}&amp;redirect=index2.php%3foption%3d{$option}";
        echo DOCMAN_Utils::mosToolTip(_DML_ORDER_THIS_MODULE, '', '', '../../../administrator/images/downarrow.png', '', $href);
        ?>
        </div><?php 
    }
    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 
    }
    /**
     * Writes Edit icon that links to edit page
     */
    function EditIcon(&$row, &$params, &$access)
    {
        global $my;
        if ($params->get('popup')) {
            return;
        }
        if ($row->state < 0) {
            return;
        }
        if (!$access->canEdit && !($access->canEditOwn && $row->created_by == $my->id)) {
            return;
        }
        mosCommonHTML::loadOverlib();
        $link = 'index.php?option=com_content&amp;task=edit&amp;id=' . $row->id . $row->Itemid_link . '&amp;Returnid=' . $row->_Itemid;
        $image = mosAdminMenus::ImageCheck('edit.png', '/images/M_images/', NULL, NULL, _E_EDIT, _E_EDIT);
        if ($row->state == 0) {
            $overlib = _CMN_UNPUBLISHED;
        } else {
            $overlib = _CMN_PUBLISHED;
        }
        $date = mosFormatDate($row->created);
        $author = $row->created_by_alias ? $row->created_by_alias : $row->author;
        $overlib .= '<br />';
        $overlib .= $row->groups;
        $overlib .= '<br />';
        $overlib .= $date;
        $overlib .= '<br />';
        $overlib .= $author;
        ?>
		<a href="<?php 
        echo sefRelToAbs($link);
        ?>
" onmouseover="return overlib('<?php 
        echo $overlib;
        ?>
', CAPTION, '<?php 
        echo _E_EDIT;
        ?>
', BELOW, RIGHT);" onmouseout="return nd();">
			<?php 
        echo $image;
        ?>
</a>
		<?php 
    }
    /**
     * Writes the edit form for new and existing content item
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosContent The category object
     * @param string The html for the groups select list
     */
    function editContent(&$row, $section, &$lists, &$sectioncategories, &$images, &$params, $option, $redirect, &$menus)
    {
        global $mosConfig_live_site;
        mosMakeHtmlSafe($row);
        $create_date = null;
        if (intval($row->created) != 0) {
            $create_date = mosFormatDate($row->created, '%A, %d %B %Y %H:%M', '0');
        }
        $mod_date = null;
        if (intval($row->modified) != 0) {
            $mod_date = mosFormatDate($row->modified, '%A, %d %B %Y %H:%M', '0');
        }
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visbility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		<!--
		var sectioncategories = new Array;
		<?php 
        $i = 0;
        foreach ($sectioncategories as $k => $items) {
            foreach ($items as $v) {
                echo "sectioncategories[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\n\t\t";
            }
        }
        ?>

		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\n\t\t";
            }
        }
        ?>

		function submitbutton(pressbutton) {
			var form = document.adminForm;

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo T_('Please select a Menu');
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo T_('Please enter a Name for this menu item');
        ?>
" );
					return;
				}
			}

			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// assemble the images back into one field
			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			// do field validation
			if (form.title.value == ""){
				alert( "<?php 
        echo T_('Content item must have a title');
        ?>
" );
			} else if (form.sectionid.value == "-1"){
				alert( "<?php 
        echo T_('You must select a Section.');
        ?>
" );
			} else if (form.catid.value == "-1"){
				alert( "<?php 
        echo T_('You must select a Category.');
        ?>
" );
 			} else if (form.catid.value == ""){
 				alert( "<?php 
        echo T_('You must select a Category.');
        ?>
" );
			} else {
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				<?php 
        getEditorContents('editor2', 'fulltext');
        ?>
				submitform( pressbutton );
			}
		}
		
			// show / hide publishing information
			function displayParameterInfo()
			{
				
				if(document.getElementById('simpleediting').style.display == 'block')
				{
					document.getElementById('simpleediting').style.display = 'none';	
					document.getElementById('show').style.display = 'block';	
					document.getElementById('hide').style.display = 'none';
					document.adminForm.simple_editing.value ='on';
				}
				else
				{
					document.getElementById('simpleediting').style.display = 'block';
					document.getElementById('show').style.display = 'none';	
					document.getElementById('hide').style.display = 'block';
					document.adminForm.simple_editing.value ='off';
				}
				
			}
		//-->
		</script>
		
		<?php 
        if ($_SESSION['simple_editing'] == 'on') {
            $simpleediting = 'none';
            $simple = 'block';
            $advanced = 'none';
        } else {
            $advanced = 'block';
            $simple = 'none';
            $simpleediting = 'block';
        }
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<input type ="hidden" name="simple_editing" value='' />
		<table class="adminheading" border="1">
		<tr>
			<th class="edit">
			<?php 
        echo T_('Content Item:');
        ?>
			<small>
			<?php 
        echo $row->id ? T_('Edit') : T_('New');
        ?>
			</small>
			<?php 
        if ($row->id) {
            ?>
				<small><small>
				[ <?php 
            echo T_('Section:');
            ?>
 <?php 
            echo $section;
            ?>
 ]
				</small></small>
				<?php 
        }
        ?>
			
			</th>
		</tr>
		</table>
		<table width="100%">
			<tr>
				<td valign="top" align="right">
				<div id = "show" style="display:<?php 
        echo $simple;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Show Advanced Details');
        ?>
</a>
				</div>
				<div id = "hide" style="display:<?php 
        echo $advanced;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Hide Advanced Details');
        ?>
</a>
				</div>
				</td>
			</tr>
		</table>
		<table cellspacing="0" cellpadding="0" width="100%" >
		<tr>
			<td valign="top">
			
				<table width="100%" class="adminform">
				<tr>
					<td width="500">
						<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tr >
							<th colspan="4">
							<?php 
        echo T_('Item Details');
        ?>
							</th>
						</tr>
						<tr>
							<td>
							<?php 
        echo T_('Title:');
        ?>
							</td>
							<td>
							<input class="text_area" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
							</td>
							<td>
							<?php 
        echo T_('Section:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['sectionid'];
        ?>
							</td>
						</tr>
						<tr>
							<td>
							<?php 
        echo T_('Title Alias:');
        ?>
							</td>
							<td>
							<input name="title_alias" type="text" class="text_area" id="title_alias" value="<?php 
        echo $row->title_alias;
        ?>
" size="30" maxlength="100" />
							</td>
							<td>
							<?php 
        echo T_('Category:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['catid'];
        ?>
							</td>
						</tr>
						</table>
					</td>
				</tr>
			
				<tr>
					<td width="100%">
					<?php 
        echo T_('Intro Text:');
        ?>
 (<?php 
        echo T_('required');
        ?>
)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '200', '75', '20');
        ?>
					</td>
				</tr>
				<tr>
					<td width="100%">
					<?php 
        echo T_('Main Text:');
        ?>
 (<?php 
        echo T_('optional');
        ?>
)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor2', $row->fulltext, 'fulltext', '100%;', '350', '75', '30');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top" align="right">
			<div id="simpleediting" style="display:<?php 
        echo $simpleediting;
        ?>
">
			<table width="100%" >
				<tr>
					<td width="200">
			
						<table width="400">
						<tr>
							<td >
							<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab(T_("Publishing"), "publish-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Publishing Info');
        ?>
								</th>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Show on Frontpage:');
        ?>
								</td>
								<td>
								<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Published:');
        ?>
								</td>
								<td>
								<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Access Level:');
        ?>
								</td>
								<td>
								<?php 
        echo $lists['access'];
        ?>
 </td>
								</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Author Alias:');
        ?>
								</td>
								<td>
								<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="text_area" />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        // cause Mambo to be extremely slow w/ huge user table, comment out for now echo T_('Change Creator:');
        ?>
								</td>
								<td>
								<?php 
        // cause Mambo to be extremely slow w/ huge user table, comment out for now echo $lists['created_by'];
        ?>
 </td>
							</tr>
							<tr>
								<td valign="top" align="right"><?php 
        echo T_('Ordering:');
        ?>
</td>
								<td>
								<?php 
        echo $lists['ordering'];
        ?>
 </td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Override Created Date');
        ?>
								</td>
								<td>
								<input class="text_area" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
								<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="..." />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Start Publishing:');
        ?>
								</td>
								<td>
								<input class="text_area" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
								<input type="reset" class="button" value="..." onClick="return showCalendar('publish_up', 'y-mm-dd');" />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Finish Publishing:');
        ?>
								</td>
								<td>
								<input class="text_area" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
								<input type="reset" class="button" value="..." onClick="return showCalendar('publish_down', 'y-mm-dd');" />
								</td>
							</tr>
							</table>
							<br />
							<table class="adminform">
							<?php 
        if ($row->id) {
            ?>
								<tr>
									<td>
									<strong><?php 
            echo T_('Content ID:');
            ?>
</strong>
									</td>
									<td>
									<?php 
            echo $row->id;
            ?>
									</td>
								</tr>
								<?php 
        }
        ?>
							<tr>
								<td width="90px" valign="top" align="right">
								<strong><?php 
        echo T_('State:');
        ?>
</strong>
								</td>
								<td>
								<?php 
        echo $row->state > 0 ? T_('Published') : ($row->state < 0 ? T_('Archived') : T_('Draft Unpublished'));
        ?>
								</td>
							</tr>
							<tr >
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Hits');
        ?>
								</strong>:
								</td>
								<td>
								<?php 
        echo $row->hits;
        ?>
								<div <?php 
        echo $visibility;
        ?>
>
								<input name="reset_hits" type="button" class="button" value="<?php 
        echo T_('Reset Hit Count');
        ?>
" onClick="submitbutton('resethits');" />
								</div>
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Revised');
        ?>
								</strong>:
								</td>
								<td>
								<?php 
        echo $row->version;
        ?>
 <?php 
        echo T_('times');
        ?>
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Created');
        ?>
								</strong>
								</td>
								<td>
								<?php 
        echo $row->created ? "{$create_date}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->creator}" : "New document";
        ?>
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Last Modified');
        ?>
								</strong>
								</td>
								<td>
								<?php 
        echo $row->modified ? "{$mod_date}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->modifier}" : "Not modified";
        ?>
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Images"), "images-page");
        ?>
							<table class="adminform" width="100%">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('MOSImage Control');
        ?>
								</th>
							</tr>
							<tr>
								<td colspan="6"><?php 
        echo T_('Sub-folder:');
        ?>
 <?php 
        echo $lists['folders'];
        ?>
</td>
							</tr>
							<tr>
								<td>
								<?php 
        echo T_('Gallery Images:');
        ?>
								<br />
								<?php 
        echo $lists['imagefiles'];
        ?>
								</td>
								<td valign="top">
								<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
								</td>
							</tr>
							<tr>
								<td>
								<input class="button" type="button" value="<?php 
        echo T_('Add');
        ?>
" onClick="addSelectedToList('adminForm','imagefiles','imagelist')" />
								</td>
							</tr>
							<tr>
								<td>
								<?php 
        echo T_('Content Images:');
        ?>
								<br />
								<?php 
        echo $lists['imagelist'];
        ?>
								</td>
								<td valign="top">
								<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
								</td>
							</tr>
							<tr>
								<td>
								<input class="button" type="button" value="<?php 
        echo T_('up');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
								<input class="button" type="button" value="<?php 
        echo T_('down');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
								<input class="button" type="button" value="<?php 
        echo T_('remove');
        ?>
" onClick="delSelectedFromList('adminForm','imagelist')" />
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<?php 
        echo T_('Edit the image selected:');
        ?>
									<table>
									<tr>
										<td align="right">
										<?php 
        echo T_('Source:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name= "_source" value="" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Image Align:');
        ?>
										</td>
										<td>
										<?php 
        echo $lists['_align'];
        ?>
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Alt Text:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_alt" value="" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Border:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_border" value="" size="3" maxlength="1" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Caption:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_caption" value="" size="30" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Caption Position:');
        ?>
										</td>
										<td>
										<?php 
        echo $lists['_caption_position'];
        ?>
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Caption Align:');
        ?>
										</td>
										<td>
										<?php 
        echo $lists['_caption_align'];
        ?>
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Width:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
										</td>
									</tr>
									<tr>
										<td colspan="2">
										<input class="button" type="button" value="<?php 
        echo T_('Apply');
        ?>
" onClick="applyImageProps()" />
										</td>
									</tr>
									</table>
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Parameters"), "params-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Parameter Control');
        ?>
								</th>
							</tr>
							<tr>
								<td>
								* <?php 
        echo T_('These Parameters only control what you see when you click to view an item fully');
        ?>
 *
								<br /><br />
								</td>
							</tr>
							<tr>
								<td>
								<?php 
        echo $params->render();
        ?>
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Meta Info"), "metadata-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Meta Data');
        ?>
								</th>
							</tr>
							<tr>
								<td>
								<?php 
        echo T_('Description:');
        ?>
								<br />
								<textarea class="text_area" cols="30" rows="3" style="width:300px; height:50px" name="metadesc" width="500"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
								</td>
							</tr>
								<tr>
								<td>
								<?php 
        echo T_('Keywords:');
        ?>
								<br />
								<textarea class="text_area" cols="30" rows="3" style="width:300px; height:50px" name="metakey" width="500"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
								</td>
							</tr>
							<tr>
								<td>
								<input type="button" class="button" value="<?php 
        echo T_('Add Sect/Cat/Title');
        ?>
" onClick="f=document.adminForm;f.metakey.value=document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].text+', '+getSelectedText('adminForm','catid')+', '+f.title.value+f.metakey.value;" />
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Link to Menu"), "link-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Link to Menu');
        ?>
								</th>
							</tr>
							<tr>
								<td colspan="2">
								<?php 
        echo T_("This will create a 'Link - Content Item' in the menu you select");
        ?>
								<br /><br />
								</td>
							</tr>
							<tr>
								<td valign="top" width="90px">
								<?php 
        echo T_('Select a Menu');
        ?>
								</td>
								<td>
								<?php 
        echo $lists['menuselect'];
        ?>
								</td>
							</tr>
							<tr>
								<td valign="top" width="90px">
								<?php 
        echo T_('Menu Item Name');
        ?>
								</td>
								<td>
								<input type="text" name="link_name" class="inputbox" value="" size="30" />
								</td>
							</tr>
							<tr>
								<td>
								</td>
								<td>
								<input name="menu_link" type="button" class="button" value="<?php 
        echo T_('Link to Menu');
        ?>
" onClick="submitbutton('menulink');" />
								</td>
							</tr>
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Existing Menu Links');
        ?>
								</th>
							</tr>
							<?php 
        if ($menus == NULL) {
            ?>
								<tr>
									<td colspan="2">
									<?php 
            echo T_('None');
            ?>
									</td>
								</tr>
								<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
							<tr>
								<td colspan="2">
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
							</td>
						</tr>		
						</table>
					</td>
					</tr>
					</table>
					</div>
					</td>	
				</tr>
			</table>
			<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
			<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
			<input type="hidden" name="mask" value="0" />
			<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
			<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="images" value="" />
			<input type="hidden" name="hidemainmenu" value="0" />
			</form>
		</td>
	</tr>
</table>
		<?php 
    }
    public static function showNewsfeeds(&$newsfeed, $LitePath, $cacheDir, &$params)
    {
        ?>
		<table width="100%" class="contentpane<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<?php 
        if ($params->get('header')) {
            ?>
			<tr>
				<td class="componentheading<?php 
            echo $params->get('pageclass_sfx');
            ?>
" colspan="2">
				<?php 
            echo $params->get('header');
            ?>
				</td>
			</tr>
			<?php 
        }
        // full RSS parser used to access image information
        $rssDoc = new xml_domit_rss_document();
        $rssDoc->setRSSTimeout(5);
        $rssDoc->useCacheLite(true, $LitePath, $cacheDir, $newsfeed->cache_time);
        $success = $rssDoc->loadRSS($newsfeed->link);
        if ($success) {
            $totalChannels = $rssDoc->getChannelCount();
            for ($i = 0; $i < $totalChannels; $i++) {
                $currChannel =& $rssDoc->getChannel($i);
                $elements = $currChannel->getElementList();
                $descrip = 0;
                $iUrl = 0;
                foreach ($elements as $element) {
                    //image handling
                    if ($element == 'image') {
                        $image =& $currChannel->getElement(DOMIT_RSS_ELEMENT_IMAGE);
                        $iUrl = $image->getUrl();
                        $iTitle = $image->getTitle();
                    }
                    if ($element == 'description') {
                        $descrip = 1;
                        // hide com_rss descrip in 4.5.0 feeds
                        if ($currChannel->getDescription() == 'com_rss') {
                            $descrip = 0;
                        }
                    }
                }
                $feed_title = $currChannel->getTitle();
                $feed_title = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_title);
                ?>
				<tr>
					<td class="contentheading<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
						<a href="<?php 
                echo ampReplace($currChannel->getLink());
                ?>
" target="_blank">
							<?php 
                echo $feed_title;
                ?>
</a>
					</td>
				</tr>
				<?php 
                // feed description
                if ($descrip && $params->get('feed_descr')) {
                    $feed_descrip = $currChannel->getDescription();
                    $feed_descrip = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_descrip);
                    ?>
					<tr>
						<td>
						<?php 
                    echo $feed_descrip;
                    ?>
						<br />
						<br />
						</td>
					</tr>
					<?php 
                }
                // feed image
                if ($iUrl && $params->get('feed_image')) {
                    ?>
					<tr>
						<td>
						<img src="<?php 
                    echo $iUrl;
                    ?>
" alt="<?php 
                    echo $iTitle;
                    ?>
" />
						</td>
					</tr>
					<?php 
                }
                $actualItems = $currChannel->getItemCount();
                $setItems = $newsfeed->numarticles;
                if ($setItems > $actualItems) {
                    $totalItems = $actualItems;
                } else {
                    $totalItems = $setItems;
                }
                ?>
				<tr>
					<td>
					<ul>
						<?php 
                for ($j = 0; $j < $totalItems; $j++) {
                    $currItem =& $currChannel->getItem($j);
                    $item_title = $currItem->getTitle();
                    $item_title = mosCommonHTML::newsfeedEncoding($rssDoc, $item_title);
                    ?>
							<li>
								<?php 
                    // START fix for RSS enclosure tag url not showing
                    if ($currItem->getLink()) {
                        ?>
									<a href="<?php 
                        echo ampReplace($currItem->getLink());
                        ?>
" target="_blank">
										<?php 
                        echo $item_title;
                        ?>
</a>
									<?php 
                    } else {
                        if ($currItem->getEnclosure()) {
                            $enclosure = $currItem->getEnclosure();
                            $eUrl = $enclosure->getUrl();
                            ?>
									<a href="<?php 
                            echo ampReplace($eUrl);
                            ?>
" target="_blank">
										<?php 
                            echo $item_title;
                            ?>
</a>
									<?php 
                        } else {
                            if ($currItem->getEnclosure() && $currItem->getLink()) {
                                $enclosure = $currItem->getEnclosure();
                                $eUrl = $enclosure->getUrl();
                                ?>
									<a href="<?php 
                                echo ampReplace($currItem->getLink());
                                ?>
" target="_blank">
										<?php 
                                echo $item_title;
                                ?>
</a>
									<br />
									Link:
									<a href="<?php 
                                echo $eUrl;
                                ?>
" target="_blank">
										<?php 
                                echo ampReplace($eUrl);
                                ?>
</a>
									<?php 
                            }
                        }
                    }
                    // END fix for RSS enclosure tag url not showing
                    // item description
                    if ($params->get('item_descr')) {
                        $text = $currItem->getDescription();
                        $text = mosCommonHTML::newsfeedEncoding($rssDoc, $text);
                        $num = $params->get('word_count');
                        // word limit check
                        if ($num) {
                            $texts = explode(' ', $text);
                            $count = count($texts);
                            if ($count > $num) {
                                $text = '';
                                for ($i = 0; $i < $num; $i++) {
                                    $text .= ' ' . $texts[$i];
                                }
                                $text .= '...';
                            }
                        }
                        ?>
									<br />
									<?php 
                        echo $text;
                        ?>
									<br />
									<br />
									<?php 
                    }
                    ?>
							</li>
							<?php 
                }
                ?>
					</ul>
					</td>
				</tr>
				<tr>
					<td>
					<br />
					</td>
				</tr>
				<?php 
            }
        }
        ?>
		</table>
		<?php 
        // displays back button
        mosHTML::BackButton($params);
    }
Beispiel #9
0
    function editApplication(&$row)
    {
        mosMakeHtmlSafe($row);
        mosCommonHTML::loadOverlib();
        ?>
        <script language="javascript" type="text/javascript">
        function submitbutton(pressbutton) {
            var form = document.adminForm;
            if(pressbutton == 'cancel') {
                submitform(pressbutton);
                return;
            }

            // validation
            if(form.title.value == "")
                alert( "Application must have a title" );
            else if(form.custom_script.value == "" && form.path.value == "")
                alert( "You have to define a path to a script file OR write down a script" );
            else
                submitform(pressbutton);
        }
        </script>
        <form action="index2.php?option=com_jumi" method="post" name="adminForm">

        <table class="adminheading">
            <tr>
                <th class="edit">
                    Application Manager: <small><small>[ <?php 
        echo $row->title ? $row->title : 'New';
        ?>
 ]</small></small>
                </th>
            </tr>
        </table>

        <table class="adminform" width="100%">
            <tr>
                <td width="200" class="key">
                    <label for="title">
                        Title:
                    </label>
                </td>
                <td>
                    <input class="inputbox" type="text" name="title" id="title" size="60" value="<?php 
        echo @$row->title;
        ?>
" />
                </td>
            </tr>
            <tr>
                <td width="200" class="key">
                    <label for="alias">
                        Alias:
                    </label>
                </td>
                <td>
                    <input class="inputbox" type="text" name="alias" id="alias" size="60" value="<?php 
        echo @$row->alias;
        ?>
" />
                </td>
            </tr>
            <tr>
                <td class="key">
                    <label for="custom_script">
                        <span onMouseOver="return overlib('<table><tr><td>Put here any code you want to include like php, html or javascript.<td></tr></table>', CAPTION, 'Custom Script', BELOW, RIGHT);" onMouseOut="return nd();">Custom Script:</span>
                    </label>
                </td>
                <td>
                    <p><textarea name="custom_script" id="custom_script" cols="80" rows="10"><?php 
        echo @$row->custom_script;
        ?>
</textarea></p>
                </td>
            </tr>
            <tr>
                <td class="key">
                    <label for="path">
                        <span onMouseOver="return overlib('<table><tr><td>Pathname of the file to be included after the custom script. If you are using Jumi arguments in the included file just define $jumi[] array in Custom script above.<td></tr></table>', CAPTION, 'Pathname', BELOW, RIGHT);" onMouseOut="return nd();">Pathname:</span>
                    </label>
                </td>
                <td>
                    <input class="inputbox" type="text" name="path" id="path" size="60" value="<?php 
        echo @$row->path;
        ?>
" />
                </td>
            </tr>
        </table>

        <input type="hidden" name="option" value="com_jumi" />
        <input type="hidden" name="cid" value="<?php 
        echo @$row->id;
        ?>
" />
        <input type="hidden" name="mask" value="0" />
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="images" value="" />
        <input type="hidden" name="hidemainmenu" value="0" />
        <input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
        </form>
        <?php 
    }
    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 
    }
Beispiel #11
0
function loadCalendar()
{
    if (getPlatform() == CMS_JOOMLA15) {
        JHTML::_('behavior.calendar');
    } else {
        mosCommonHTML::loadCalendar();
    }
}
Beispiel #12
0
    /**
     * Writes a list of the content items
     * @param array An array of content objects
     */
    function showContent(&$rows, $section, &$lists, $search, $pageNav, $option, $all = NULL, $redirect)
    {
        global $my, $mosConfig_live_site, $adminLanguage;
        ?>
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<form action="index2.php" method="post" name="adminForm">

		<table class="adminheading">
		<tr>
			<?php 
        if ($all) {
            ?>
				<th class="edit">
				<?php 
            echo $adminLanguage->A_COMP_CONTENT_ALL_ITEMS;
            ?>
				</th>
				<?php 
        } else {
            ?>
				<th class="edit">
				<?php 
            echo $section->title;
            echo $adminLanguage->A_COMP_ITEMS;
            ?>
				</th>
				<?php 
        }
        ?>
			<td>
			<?php 
        echo $adminLanguage->A_COMP_FILTER;
        ?>
:
			</td>
			<td>
			<input type="text" name="search" value="<?php 
        echo $search;
        ?>
" class="text_area" onChange="document.adminForm.submit();" />
			</td>
			<?php 
        if ($all) {
            ?>
				<td width="right">
				<?php 
            echo $lists['sectionid'];
            ?>
				</td>
				<?php 
        }
        ?>
			<td width="right">
			<?php 
        echo $lists['catid'];
        ?>
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="5">
			<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title" width="30%">
			<?php 
        echo $adminLanguage->A_COMP_TITLE;
        ?>
			</th>
			<th width="5%">
			<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
			</th>
			<th nowrap="nowrap" width="5%">
			<?php 
        echo $adminLanguage->A_COMP_FRONT_PAGE;
        ?>
			</th>
			<th colspan="2" align="center" width="5%">
			<?php 
        echo $adminLanguage->A_COMP_REORDER;
        ?>
			</th>
			<th width="10%">
			<?php 
        echo $adminLanguage->A_COMP_ACCESS;
        ?>
			</th>
			<th width="2%">
			<?php 
        echo $adminLanguage->A_COMP_ID;
        ?>
			</th>
			<?php 
        if ($all) {
            ?>
				<th align="left">
				<?php 
            echo $adminLanguage->A_COMP_SECTION;
            ?>
				</th>
				<?php 
        }
        ?>
			<th align="left">
			<?php 
        echo $adminLanguage->A_COMP_CATEG;
        ?>
			</th>
			<th nowrap="nowrap">
			<?php 
        echo $adminLanguage->A_COMP_CHECKED_OUT;
        ?>
			</th>
		  </tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            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_content&sectionid=' . $redirect . '&task=edit&id=' . $row->id;
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
">
				<td>
				<?php 
            echo mosHTML::idBox($i, $row->id, $row->checked_out && $row->checked_out != $my->id);
            ?>
				</td>
				<td>
				<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                echo $row->title;
                ?>
 [ <i><?php 
                echo $adminLanguage->A_COMP_CHECKED_OUT;
                ?>
</i> ]
					<?php 
            } else {
                ?>
					<a href="<?php 
                echo $link;
                ?>
">
					<?php 
                echo $row->title;
                ?>
					</a>
					<?php 
            }
            ?>
				</td>
				<?php 
            $now = date("Y-m-d h:i:s");
            if ($now <= $row->publish_up && $row->state == "1") {
                $img = 'publish_y.png';
                $alt = $adminLanguage->A_COMP_PUBLISHED;
            } else {
                if (($now <= $row->publish_down || $row->publish_down == "0000-00-00 00:00:00") && $row->state == "1") {
                    $img = 'publish_g.png';
                    $alt = $adminLanguage->A_COMP_PUBLISHED;
                } else {
                    if ($now > $row->publish_down && $row->state == "1") {
                        $img = 'publish_r.png';
                        $alt = $adminLanguage->A_COMP_EXPIRED;
                    } elseif ($row->state == "0") {
                        $img = "publish_x.png";
                        $alt = $adminLanguage->A_COMP_UNPUBLISHED;
                    }
                }
            }
            $times = '';
            if (isset($row->publish_up)) {
                if ($row->publish_up == '0000-00-00 00:00:00') {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_START_ALWAYS . "</td></tr>";
                } else {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_START . ": " . $row->publish_up . "</td></tr>";
                }
            }
            if (isset($row->publish_down)) {
                if ($row->publish_down == '0000-00-00 00:00:00') {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_FIN_NOEXP . "</td></tr>";
                } else {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_FINISH . ": " . $row->publish_down . "</td></tr>";
                }
            }
            if ($times) {
                ?>
					<td align="center">
					<a href="javascript: void(0);" onMouseOver="return overlib('<table><?php 
                echo $times;
                ?>
</table>', CAPTION, '<?php 
                echo $adminLanguage->A_COMP_CONTENT_PUBLISH_INFO;
                ?>
', 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 ? $adminLanguage->A_COMP_YES : $adminLanguage->A_COMP_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">
				<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="left">
				<?php 
            echo $row->id;
            ?>
				</td>
				<?php 
            if ($all) {
                ?>
					<td align="left">
					<?php 
                echo $row->section_name;
                ?>
					</td>
					<?php 
            }
            ?>
				<td align="left">
				<?php 
            echo $row->name;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->checked_out ? $row->editor : "";
            ?>
				</td>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>
		<?php 
        echo $pageNav->getListFooter();
        ?>
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<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="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		</form>
		<br />

		<?php 
        mosCommonHTML::ContentLegend();
        ?>
		<script language="Javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
		<?php 
    }
Beispiel #13
0
 public static function modoutput_feed(&$module, &$params, $moduleclass_sfx)
 {
     global $mosConfig_absolute_path, $mosConfig_cachepath;
     // check if cache directory is writeable
     $cacheDir = $mosConfig_cachepath . '/';
     if (!is_writable($cacheDir)) {
         $module->content = 'Cache Directory Unwriteable';
         return;
     }
     $rssurl = $params->get('rssurl');
     $rssitems = $params->get('rssitems', 5);
     $rssdesc = $params->get('rssdesc', 1);
     $rssimage = $params->get('rssimage', 1);
     $rssitemdesc = $params->get('rssitemdesc', 1);
     $words = $params->def('word_count', 0);
     $rsstitle = $params->get('rsstitle', 1);
     $rsscache = $params->get('rsscache', 3600);
     $contentBuffer = '';
     $LitePath = $mosConfig_absolute_path . '/includes/Cache/Lite.php';
     require_once $mosConfig_absolute_path . '/includes/domit/xml_domit_rss.php';
     $rssDoc = new xml_domit_rss_document();
     $rssDoc->setRSSTimeout(2);
     $rssDoc->useCacheLite(true, $LitePath, $cacheDir, $rsscache);
     $success = $rssDoc->loadRSS($rssurl);
     if ($success) {
         $content_buffer = '';
         $totalChannels = $rssDoc->getChannelCount();
         for ($i = 0; $i < $totalChannels; $i++) {
             $currChannel =& $rssDoc->getChannel($i);
             $elements = $currChannel->getElementList();
             $iUrl = 0;
             foreach ($elements as $element) {
                 //image handling
                 if ($element == 'image') {
                     $image =& $currChannel->getElement(DOMIT_RSS_ELEMENT_IMAGE);
                     $iUrl = $image->getUrl();
                     $iTitle = $image->getTitle();
                 }
             }
             // feed title
             $content_buffer = '<table cellpadding="0" cellspacing="0" class="moduletable' . $moduleclass_sfx . '">' . "\n";
             if ($currChannel->getTitle() && $rsstitle) {
                 $feed_title = $currChannel->getTitle();
                 $feed_title = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_title);
                 $content_buffer .= "<tr>\n";
                 $content_buffer .= "\t<td>\n";
                 $content_buffer .= "\t\t<strong>\n";
                 $content_buffer .= "\t\t<a href=\"" . ampReplace($currChannel->getLink()) . "\" target=\"_blank\">\n";
                 $content_buffer .= $feed_title . "</a>\n";
                 $content_buffer .= "\t\t</strong>\n";
                 $content_buffer .= "\t</td>\n";
                 $content_buffer .= "</tr>\n";
             }
             // feed description
             if ($rssdesc) {
                 $feed_descrip = $currChannel->getDescription();
                 $feed_descrip = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_descrip);
                 $content_buffer .= "<tr>\n";
                 $content_buffer .= "\t<td>\n";
                 $content_buffer .= $feed_descrip;
                 $content_buffer .= "\t</td>\n";
                 $content_buffer .= "</tr>\n";
             }
             // feed image
             if ($rssimage && $iUrl) {
                 $content_buffer .= "<tr>\n";
                 $content_buffer .= "\t<td align=\"center\">\n";
                 $content_buffer .= "\t\t<image src=\"" . $iUrl . "\" alt=\"" . @$iTitle . "\"/>\n";
                 $content_buffer .= "\t</td>\n";
                 $content_buffer .= "</tr>\n";
             }
             $actualItems = $currChannel->getItemCount();
             $setItems = $rssitems;
             if ($setItems > $actualItems) {
                 $totalItems = $actualItems;
             } else {
                 $totalItems = $setItems;
             }
             $content_buffer .= "<tr>\n";
             $content_buffer .= "\t<td>\n";
             $content_buffer .= "\t\t<ul class=\"newsfeed" . $moduleclass_sfx . "\">\n";
             for ($j = 0; $j < $totalItems; $j++) {
                 $currItem =& $currChannel->getItem($j);
                 // item title
                 $item_title = $currItem->getTitle();
                 $item_title = mosCommonHTML::newsfeedEncoding($rssDoc, $item_title);
                 // START fix for RSS enclosure tag url not showing
                 $content_buffer .= "<li class=\"newsfeed" . $moduleclass_sfx . "\">\n";
                 $content_buffer .= "\t<strong>\n";
                 if ($currItem->getLink()) {
                     $content_buffer .= "        <a href=\"" . ampReplace($currItem->getLink()) . "\" target=\"_blank\">\n";
                     $content_buffer .= "      " . $item_title . "</a>\n";
                 } else {
                     if ($currItem->getEnclosure()) {
                         $enclosure = $currItem->getEnclosure();
                         $eUrl = $enclosure->getUrl();
                         $content_buffer .= "        <a href=\"" . ampReplace($eUrl) . "\" target=\"_blank\">\n";
                         $content_buffer .= "      " . $item_title . "</a>\n";
                     } else {
                         if ($currItem->getEnclosure() && $currItem->getLink()) {
                             $enclosure = $currItem->getEnclosure();
                             $eUrl = $enclosure->getUrl();
                             $content_buffer .= "        <a href=\"" . ampReplace($currItem->getLink()) . "\" target=\"_blank\">\n";
                             $content_buffer .= "      " . $item_title . "</a><br/>\n";
                             $content_buffer .= "        <a href=\"" . ampReplace($eUrl) . "\" target=\"_blank\"><u>Download</u></a>\n";
                         }
                     }
                 }
                 $content_buffer .= "\t</strong>\n";
                 // END fix for RSS enclosure tag url not showing
                 // item description
                 if ($rssitemdesc) {
                     // item description
                     $text = $currItem->getDescription();
                     $text = mosCommonHTML::newsfeedEncoding($rssDoc, $text);
                     // word limit check
                     if ($words) {
                         $texts = explode(' ', $text);
                         $count = count($texts);
                         if ($count > $words) {
                             $text = '';
                             for ($i = 0; $i < $words; $i++) {
                                 $text .= ' ' . $texts[$i];
                             }
                             $text .= '...';
                         }
                     }
                     $content_buffer .= "     <div>\n";
                     $content_buffer .= "        " . $text;
                     $content_buffer .= "\t\t</div>\n";
                 }
                 $content_buffer .= "</li>\n";
             }
             $content_buffer .= "    </ul>\n";
             $content_buffer .= "\t</td>\n";
             $content_buffer .= "</tr>\n";
             $content_buffer .= "</table>\n";
         }
         $module->content = $content_buffer;
     }
 }
    function edit(&$row, &$images, &$lists, &$params, $option, &$menus)
    {
        global $mosConfig_live_site;
        //mosMakeHtmlSafe( $row );
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visbility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "\n\tfolderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );";
            }
        }
        ?>
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton ==' resethits' ) {
				if (confirm('<?php 
        echo T_('Are you sure you want to reset the Hits to Zero? \\nAny unsaved changes to this content will be lost.');
        ?>
')){
					submitform( pressbutton );
					return;
				} else {
					return;
				}
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo T_('Please select a Menu');
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo T_('Please enter a Name for this menu item');
        ?>
" );
					return;
				}
			}

			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			try {
				document.adminForm.onsubmit();
			}
			catch(e){}
			if (trim(form.title.value) == ""){
				alert( "<?php 
        echo T_('Content item must have a title');
        ?>
" );
			} else if (trim(form.name.value) == ""){
				alert( "<?php 
        echo T_('Content item must have a name');
        ?>
" );
			} else {
				if ( form.reset_hits.checked ) {
					form.hits.value = 0;
				} else {
				}
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				submitform( pressbutton );
			}
		}
		
			// show / hide publishing information
			function displayParameterInfo()
			{
				
				if(document.getElementById('simpleediting').style.display == 'block')
				{
					document.getElementById('simpleediting').style.display = 'none';	
					document.getElementById('show').style.display = 'block';	
					document.getElementById('hide').style.display = 'none';
					document.adminForm.simple_editing.value ='on';
				}
				else
				{
					document.getElementById('simpleediting').style.display = 'block';
					document.getElementById('show').style.display = 'none';	
					document.getElementById('hide').style.display = 'block';
					document.adminForm.simple_editing.value ='off';
				}
				
			}
		</script>
		<?php 
        if ($_SESSION['simple_editing'] == 'on') {
            $simpleediting = 'none';
            $simple = 'block';
            $advanced = 'none';
        } else {
            $advanced = 'block';
            $simple = 'none';
            $simpleediting = 'block';
        }
        ?>
		<table class="adminheading">
		<tr>
			<th class="edit">
			<?php 
        echo T_('Static Content Item:');
        ?>
			<small>
			<?php 
        echo $row->id ? T_('Edit') : T_('New');
        ?>
			</small>
			</th>
		</tr>
		</table>
		<table width="100%">
			<tr>
				<td valign="top" align="right">
				<div id = "show" style="display:<?php 
        echo $simple;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Show Advanced Details');
        ?>
</a>
				</div>
				<div id = "hide" style="display:<?php 
        echo $advanced;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Hide Advanced Details');
        ?>
</a>
				</div>
				</td>
			</tr>
		</table>
		<form action="index2.php" method="post" name="adminForm">
		<input type ="hidden" name="simple_editing" value=''>
		
		<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
					<?php 
        echo T_('Item Details');
        ?>
					</th>
				<tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Title:');
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Title Alias:');
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="title_alias" size="30" maxlength="100" value="<?php 
        echo $row->title_alias;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="left" colspan="2">
					<?php 
        echo T_('Text: (required)');
        ?>
<br />
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '400', '65', '50');
        ?>
					</td>
				</tr>
				</table>
			</td>
			
			<td valign="top" align="right">
			<div id="simpleediting" style="display:<?php 
        echo $simpleediting;
        ?>
">
			<table width="100%" >
				<tr>
					<td width="200">
			
						<table width="400">
						<tr>
							<td >
				<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab(T_("Publishing"), "publish-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Publishing Info');
        ?>
					</th>
				<tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('State:');
        ?>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? 'Published' : 'Draft Unpublished';
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Published:');
        ?>
					</td>
					<td>
					<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Show on Frontpage:');
        ?>
					</td>
					<td>
					<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Access Level:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Author Alias:');
        ?>
					</td>
					<td>
					<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="inputbox" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Change Creator:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['created_by'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Override Created Date');
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
					<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="...">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
					<?php 
        echo T_('Start Publishing:');
        ?>
					</td>
					<td width="80%">
					<input class="inputbox" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
					<?php 
        echo T_('Finish Publishing:');
        ?>
					</td>
					<td width="80%">
					<input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');">
					</td>
				</tr>
				</table>
				<br />
				<table class="adminform">
				<?php 
        if ($row->id) {
            ?>
					<tr>
						<td>
						<strong><?php 
            echo T_('Content ID:');
            ?>
</strong>
						</td>
						<td>
						<?php 
            echo $row->id;
            ?>
						</td>
					</tr>
					<?php 
        }
        ?>
				<tr>
					<td width="90px" valign="top" align="right">
					<strong><?php 
        echo T_('State:');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? T_('Published') : ($row->state < 0 ? T_('Archived') : T_('Draft Unpublished'));
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Hits');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->hits;
        ?>
					<div <?php 
        echo $visibility;
        ?>
>
					<input name="reset_hits" type="button" class="button" value="<?php 
        echo T_('Reset Hit Count');
        ?>
" onClick="submitbutton('resethits');">
					</div>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Version');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo "{$row->version}";
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Created');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->created ? "{$row->created}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->creator}" : T_("New document");
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Last Modified');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->modified ? "{$row->modified}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->modifier}" : T_("Not modified");
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Expires');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo "{$row->publish_down}";
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Images"), "images-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('MOSImage Control');
        ?>
					</th>
				<tr>
				<tr>
					<td colspan="6">
					<?php 
        echo T_('Sub-folder:');
        ?>
 <?php 
        echo $lists['folders'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Gallery Images');
        ?>
					<br />
					<?php 
        echo $lists['imagefiles'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo T_('Add');
        ?>
" onClick="addSelectedToList('adminForm','imagefiles','imagelist')" />
					</td>
					<td valign="top">
					<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Content Images:');
        ?>
					<br />
					<?php 
        echo $lists['imagelist'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo T_('up');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
					<input class="button" type="button" value="<?php 
        echo T_('down');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
					<input class="button" type="button" value="<?php 
        echo T_('remove');
        ?>
" onClick="delSelectedFromList('adminForm','imagelist')" />
					</td>
					<td valign="top">
					<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Edit the image selected:');
        ?>
						<table>
						<tr>
							<td align="right">
							<?php 
        echo T_('Source');
        ?>
							</td>
							<td>
							<input type="text" name= "_source" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Align');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Alt Text');
        ?>
							</td>
							<td>
							<input type="text" name="_alt" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Border');
        ?>
							</td>
							<td>
							<input type="text" name="_border" value="" size="3" maxlength="1" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Caption:');
        ?>
							</td>
							<td>
							<input class="text_area" type="text" name="_caption" value="" size="30" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Caption Position:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_caption_position'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Caption Align:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_caption_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Width:');
        ?>
							</td>
							<td>
							<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
							<input class="button" type="button" value="<?php 
        echo T_('Apply');
        ?>
" onClick="applyImageProps()" />
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Parameters"), "params-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Parameter Control');
        ?>
					</th>
				<tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Meta Info"), "metadata-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Meta Data');
        ?>
					</th>
				<tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Description:');
        ?>
<br />
					<textarea class="inputbox" cols="40" rows="5" name="metadesc" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Keywords:');
        ?>
<br />
					<textarea class="inputbox" cols="40" rows="5" name="metakey" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Link to Menu"), "link-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Link to Menu');
        ?>
					</th>
				<tr>
				<tr>
					<td colspan="2">
					<?php 
        echo T_('This will create a "Link - Static Content" in the menu you select');
        ?>
					<br /><br />
					</td>
				<tr>
				<tr>
					<td valign="top" width="90px">
					<?php 
        echo T_('Select a Menu');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['menuselect'];
        ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="90px">
					<?php 
        echo T_('Menu Item Name');
        ?>
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="30" />
					</td>
				<tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="<?php 
        echo T_('Link to Menu');
        ?>
" onClick="submitbutton('menulink');" />
					</td>
				<tr>
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Existing Menu Links');
        ?>
					</th>
				</tr>
				<?php 
        if ($menus == NULL) {
            ?>
					<tr>
						<td colspan="2">
						<?php 
            echo T_('None');
            ?>
						</td>
					</tr>
					<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
		    	</td>
						</tr>
						
						</table>
					</td>
					</tr>
					</table>
					</div>
					</td>
					
				</tr>
			</table>
			
		</td>
	</tr>
</table>
		<input type="hidden" name="images" value="" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="hits" value="<?php 
        echo $row->hits;
        ?>
" />
		<input type="hidden" name="task" value="" />
		</form>
		<?php 
    }
    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 
    }
    function edit()
    {
        global $my, $mainframe, $database, $option, $priTask, $subTask;
        global $WBG_CONFIG, $wbGalleryDB_cat, $wbGallery_admin;
        mosCommonHTML::loadOverlib();
        ?>

    <form action="index2.php" method="post" name="adminForm" enctype="multipart/form-data">
      <table class="adminheading">
        <tr>
          <th class="config">
            <font size="+1">wbGallery</font><br/>
            Manage Configuration Options<br/>
            <a href="<?php 
        echo $mainframe->getCfg('live_site');
        ?>
/administrator/components/com_wbgallery/CHANGELOG.txt"
              target="_blank">[ View Change Log ]</a> in New Window
          </th>
        </tr>
      </table>
      <table width="100%" cellspacing="2" cellpadding="0">
        <tr><td valign="top">
          <table class="adminlist" width="100%" cellspacing="2" cellpadding="0">
            <tr>
              <th class="title" colspan="2">Resized Images - Large Format</th>
            </tr>
            <tr>
              <td>Resize Large:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[save_large]', '', $WBG_CONFIG->save_large);
        ?>

                <?php 
        echo mosToolTip('Should we Save the a Large Resized Image?', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Large Image Path:</td>
              <td><input type="text" name="wbgconf[path_large]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->path_large;
        ?>
" />
                <?php 
        echo mosToolTip('Path to Save a the Large Resized Images (with trailing slash)', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Large Width:</td>
              <td><input type="text" name="wbgconf[width_large]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->width_large;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Width of the Large Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Large Height:</td>
              <td><input type="text" name="wbgconf[height_large]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->height_large;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Height of the Large Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Large Image Quality:</td>
              <td><input type="text" name="wbgconf[quality_large]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->quality_large;
        ?>
" />
                <?php 
        echo mosToolTip('This is the Image Quality to use for Large Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <th class="title" colspan="2">Resized Images - Medium Format</th>
            </tr>
            <tr>
              <td>Resize Medium:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[save_medium]', '', $WBG_CONFIG->save_medium);
        ?>

                <?php 
        echo mosToolTip('Should we Save the a Medium Resized Image?', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Medium Image Path:</td>
              <td><input type="text" name="wbgconf[path_medium]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->path_medium;
        ?>
" />
                <?php 
        echo mosToolTip('Path to Save a the Medium Resized Images (with trailing slash)', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Medium Width:</td>
              <td><input type="text" name="wbgconf[width_medium]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->width_medium;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Width of the Medium Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Medium Height:</td>
              <td><input type="text" name="wbgconf[height_medium]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->height_medium;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Height of the Medium Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Medium Image Quality:</td>
              <td><input type="text" name="wbgconf[quality_medium]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->quality_medium;
        ?>
" />
                <?php 
        echo mosToolTip('This is the Image Quality to use for Medium Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <th class="title" colspan="2">Resized Images - Thumbnail Format</th>
            </tr>
            <tr>
              <td>Resize Thumbnail:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[save_thumb]', '', $WBG_CONFIG->save_thumb);
        ?>

                <?php 
        echo mosToolTip('Should we Save the a Thumbnail Resized Image?', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Thumbnail Image Path:</td>
              <td><input type="text" name="wbgconf[path_thumb]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->path_thumb;
        ?>
" />
                <?php 
        echo mosToolTip('Path to Save a the Thumbnail Resized Images (with trailing slash)', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Thumbnail Width:</td>
              <td><input type="text" name="wbgconf[width_thumb]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->width_thumb;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Width of the Thumbnail Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Thumbnail Height:</td>
              <td><input type="text" name="wbgconf[height_thumb]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->height_thumb;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Height of the Thumbnail Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Thumbnail Image Quality:</td>
              <td><input type="text" name="wbgconf[quality_thumb]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->quality_thumb;
        ?>
" />
                <?php 
        echo mosToolTip('This is the Image Quality to use for Thumbnail Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <th class="title" colspan="2">Resized Images - ThumbTack Format</th>
            </tr>
            <tr>
              <td>Resize ThumbTack:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[save_tack]', '', $WBG_CONFIG->save_tack);
        ?>

                <?php 
        echo mosToolTip('Should we Save the a ThumbTack Resized Image?', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>ThumbTack Image Path:</td>
              <td><input type="text" name="wbgconf[path_tack]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->path_tack;
        ?>
" />
                <?php 
        echo mosToolTip('Path to Save a the ThumbTack Resized Images (with trailing slash)', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>ThumbTack Width:</td>
              <td><input type="text" name="wbgconf[width_tack]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->width_tack;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Width of the ThumbTack Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>ThumbTack Height:</td>
              <td><input type="text" name="wbgconf[height_tack]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->height_tack;
        ?>
" />
                <?php 
        echo mosToolTip('Maxiumum Height of the ThumbTack Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>ThumbTack Image Quality:</td>
              <td><input type="text" name="wbgconf[quality_tack]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->quality_tack;
        ?>
" />
                <?php 
        echo mosToolTip('This is the Image Quality to use for ThumbTack Resized Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <th class="title" colspan="2">Original Images</th>
            </tr>
            <tr>
              <td width="200">Save Originals:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[save_original]', '', $WBG_CONFIG->save_original);
        ?>

                <?php 
        echo mosToolTip('Should we Save the Original Image?', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Images Path:</td>
              <td><input type="text" name="wbgconf[path_original]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->path_original;
        ?>
" />
                <?php 
        echo mosToolTip('Path to Save a Copy of the Original Images', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <th class="title" colspan="2">Image Processing Options</th>
            </tr>
            <tr>
              <td>Manage Memory:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[use_memManager]', '', $WBG_CONFIG->use_memManager);
        ?>

                <?php 
        echo mosToolTip('Should we Attempt to Manage the Server Memory when Processing Images? This feature attempts to allocate additional memory from the server when the image resize process is taking place.', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Use Image Magik:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[use_ImageMagik]', '', $WBG_CONFIG->use_ImageMagik);
        ?>

                <?php 
        echo mosToolTip('Should we Attempt to use the Image Magik Library for Image Processing? This is a SHELL command that will need to be installed if not already.', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Path to Image Magik:</td>
              <td><input type="text" name="wbgconf[path_ImageMagik]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->path_ImageMagik;
        ?>
" />
                <?php 
        echo mosToolTip('This is the PATH (with trailing slash) to the Image Magik script.', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <td>Image Magik Command:</td>
              <td><input type="text" name="wbgconf[file_ImageMagik]" class="text_area" size="30" value="<?php 
        echo $WBG_CONFIG->file_ImageMagik;
        ?>
" />
                <?php 
        echo mosToolTip('This is the SCRIPT FILENAME for the Image Magik script, located in the Image Magik Path.', 'Configuration Tip');
        ?>
</td>
            </tr>
            <tr>
              <th class="title" colspan="2">General Operation</th>
            </tr>
            <tr>
              <td>Show Copyright Footer:</td>
              <td><?php 
        echo mosHTML::yesnoRadioList('wbgconf[show_copyright]', '', $WBG_CONFIG->show_copyright);
        ?>

                <?php 
        echo mosToolTip('Will you Spread the Word and Keep the Copyright Footer Active?', 'Configuration Tip');
        ?>
</td>
            </tr>
          </table>
        </td><td valign="top">
          <table class="adminlist" width="100%" cellspacing="2" cellpadding="0">
            <tr>
              <th class="title" colspan="5">wbGallery Menu Items</th>
            </tr>
            <tr>
              <th>#</th>
              <th>Menu</th>
              <th>Type</th>
              <th>Title</th>
              <th>Itemid</th>
            </tr>
            <?php 
        $database->setQuery("SELECT * FROM #__menu WHERE `link` LIKE '%{$option}%'");
        $mRows = $database->loadObjectList();
        $count = 1;
        foreach ($mRows as $mRow) {
            $menuLink = 'index2.php?option=com_menus&menutype=' . $mRow->menutype;
            $itemLink = 'index2.php?option=com_menus&menutype=' . $mRow->menutype . '&task=edit&id=' . $mRow->id . '&hidemainmenu=1';
            $prevLink = $mainframe->getCfg('live_site') . '/' . $mRow->link;
            if ($mRow->type == 'components') {
                $prevLink .= '&Itemid=' . $mRow->id;
            }
            ?>

                <tr>
                  <td><?php 
            echo $count++;
            ?>
</td>
                  <td><a href="<?php 
            echo $menuLink;
            ?>
" target="_blank" alt="Manage Menu"><?php 
            echo $mRow->menutype;
            ?>
</a></td>
                  <td><?php 
            echo $mRow->type == 'components' ? 'Control' : 'Reference';
            ?>
</td>
                  <td><a href="<?php 
            echo $itemLink;
            ?>
" target="_blank" alt="Edit Menu Item"><?php 
            echo $mRow->name;
            ?>
</a></td>
                  <td><?php 
            echo $mRow->id;
            ?>
 <a href="<?php 
            echo $prevLink;
            ?>
" target="_blank" alt="Preview">[ show ]</a></td>
                </tr>
                <?php 
        }
        ?>

          </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" />
    </form>
    <?php 
    }
Beispiel #17
0
?>
" );
	    } else if (form.dateformat.value == "") {
	        alert( "<?php 
echo T_('You must provide a date format.');
?>
" );
	    }  else {
	        submitform( pressbutton );
	    }
	}
	</script>
<?php 
$tabs = new mosTabs(1);
mosCommonHTML::loadOverlib();
mosCommonHTML::loadCalendar();
?>
	
<table class="adminheading">
	<tr>
		<th class="langmanager">
		<?php 
echo T_('New Language');
?>
		</th>
		<td style="white-space: nowrap;text-align:right">
		<?php 
echo mosCurrentDate();
?>
   			
        </td>
    function controlPanel()
    {
        //hack for JOomla 13 ADRIEN
        unset($GLOBALS["task"]);
        unset($_REQUEST["task"]);
        ?>

<link rel="stylesheet" href="components/com_acajoom/cssadmin/acajoom.css" type="text/css" >
<div align="center" class="centermain">
<div id="acajoom">
		<table class="acajoomcss">
            <tr>
         	<td width="58%" valign="top">
				<?php 
        echo backHTML::iconsPanel();
        ?>
			</td>
			<td width="42%" valign="top">

			<div style="width=100%;">
			<form action="index2.php" method="post" name="adminForm">
			<?php 
        $tabs = new mosTabs(1);
        $tabs->startPane('acaControlPanel');
        $tabs->startTab(_ACA_MENU_TAB_SUM, "acaControlPanel.Summary");
        ?>
			<table class="acajoom_stats" style="text-align: left; width: 100%; " cellpadding="2" cellspacing="0">
			<tbody>
				<tr>
					 <th style="text-align: center;"><?php 
        echo '#';
        ?>
					 </th>
					 <th style="text-align: center;"><?php 
        echo _ACA_MENU_TAB_LIST;
        ?>
</th>
					 <th style="text-align: center;"><?php 
        echo _ACA_MENU_MAILING_TITLE;
        ?>
</th>
					 <th style="text-align: center;"><?php 
        echo _ACA_SENT_MAILING;
        ?>
</th>
					 <th style="text-align: center;"><?php 
        echo _ACA_DESC_SUBSCRIBERS;
        ?>
</th>
				</tr>
			 <?php 
        $html = '';
        $totalist = 0;
        $totalmail = 0;
        $totalsub = 0;
        $totalsent = 0;
        $nb = explode(',', $GLOBALS[ACA . 'activelist']);
        $size = sizeof($nb);
        for ($i = 0; $i < $size; $i++) {
            $index = $nb[$i];
            if ($GLOBALS[ACA . 'listshow' . $index] > 0 and $GLOBALS[ACA . 'listype' . $index] == 1) {
                $html .= '<tr>';
                $html .= '<td><b>' . @constant($GLOBALS[ACA . 'listnames' . $index]) . '</b></td>';
                $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'act_totallist' . $index] . ' </td>';
                $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'act_totalmailing' . $index] . ' </td>';
                $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'totalmailingsent' . $index] . ' </td>';
                $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'act_totalsubcribers' . $index] . ' </td>';
                $html .= '</tr>';
                $totalist = $totalist + $GLOBALS[ACA . 'act_totallist' . $index];
                $totalmail = $totalmail + $GLOBALS[ACA . 'act_totalmailing' . $index];
                $totalsent = $totalsent + $GLOBALS[ACA . 'totalmailingsent' . $index];
                if ($GLOBALS[ACA . 'act_totalsubcribers' . $index] < $totalsub) {
                    $totalsub = $GLOBALS[ACA . 'act_totalsubcribers' . $index];
                }
            }
        }
        $html .= '<tr>';
        $html .= '<td><b>' . _ACA_CP_TOTAL . '</b></td>';
        $html .= '<td style="text-align: center; ">' . $totalist . ' </td>';
        $html .= '<td style="text-align: center; ">' . $totalmail . ' </td>';
        $html .= '<td style="text-align: center; ">' . $totalsent . ' </td>';
        $html .= '<td style="text-align: center; ">' . $totalsub . ' </td>';
        $html .= '</tr>';
        echo $html;
        ?>
			 </tbody></table>
			 <br />
			<?php 
        if (class_exists('auto')) {
            echo auto::showQueue();
        }
        $tabs->endTab();
        $tabs->startTab(_ACA_MENU_SUBSCRIBERS, "acaControlPanel.Subscribers");
        $emailsearch = '';
        $listId = 0;
        $start = mosGetParam($_REQUEST, 'start', 0);
        $limit = mosGetParam($_REQUEST, 'limit', 15);
        $order = mosGetParam($_REQUEST, 'order', 'date');
        $total = 0;
        $subscribers = subscribers::getSubscribers($start, $limit, $emailsearch, $total, $listId, '', 1, 1, 'sub_dateD');
        mosCommonHTML::loadOverlib();
        ?>
			<script type="text/javascript">
				function checkcid(myField) {
					myField.checked = true;
					isChecked(true);
				}
			</script>
<!--			<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>  -->

			<form action="index2.php" method="post" name="adminForm">
				<input type="hidden" name="option" value="com_acajoom" />
				<input type="hidden" name="act" value="acajoom" />
				<input type="hidden" name="task" value="" />
				<input type="hidden" name="userid" value="" />
		    	<input type="hidden" name="boxchecked" value="0" />
				<input type="hidden" name="listid" value="<?php 
        echo $listId;
        ?>
" />
				<input type="hidden" name="start" value="<?php 
        echo $start;
        ?>
" />
				<input type="hidden" name="limit" value="<?php 
        echo $limit;
        ?>
" />
				<input type="hidden" name="emailsearch" value="<?php 
        echo $emailsearch;
        ?>
" />
			<table width="100%"  border="0" cellspacing="0" cellpadding="4" class="adminlist">
				<tr>
					<th class="title">#</th>
					<th class="title" style="text-align: left;"><?php 
        echo _ACA_INPUT_NAME;
        ?>
</th>
					<th class="title" style="text-align: left;"><?php 
        echo _ACA_INPUT_EMAIL;
        ?>
</th>
					<th class="title" style="text-align: center;"><?php 
        echo _ACA_SIGNUP_DATE;
        ?>
</th>
				</tr>

				<?php 
        $i = 0;
        foreach ($subscribers as $subscriber) {
            ?>
				<tr class="row<?php 
            echo $i++ % 2;
            ?>
">
					<td><?php 
            echo $i + $start;
            ?>
</td>
					<td style="text-align: left;">
					<a href="index2.php?option=com_acajoom&act=subscribers&task=show&userid=<?php 
            echo $subscriber->id;
            ?>
" >
					<?php 
            echo $subscriber->name;
            ?>
</a></td>
					<td style="text-align: left;"><?php 
            echo $subscriber->email;
            ?>
</td>
					<td style="text-align: center;"><?php 
            echo mosFormatDate($subscriber->subscribe_date, '%x');
            ?>
</td>
				</tr>
				<?php 
        }
        ?>
			</table>
			</form>
			<?php 
        backHTML::footerCounts($start, $limit, $emailsearch, $total, 4, '', $listId, '');
        $tabs->endTab();
        $tabs->startTab(_ACA_MENU_TAB_LIST, "acaControlPanel.Lists");
        $lists = lists::getLists(0, 0, 1, '', false, false, false);
        ?>
			<table class="adminlist">
				<tr>
					<th class="title">#</th>
					<th class="title" width="65%"  style="text-align: left;"><?php 
        echo _ACA_LIST_NAME;
        ?>
</th>
					<th class="title" width="25%"  style="text-align: left;"><?php 
        echo _ACA_LIST_TYPE;
        ?>
</th>
					<th class="title"  style="text-align: center;">#id</th>
				</tr>
			<?php 
        $i = 0;
        foreach ($lists as $list) {
            $i++;
            $link = 'index2.php?option=com_acajoom&act=mailing&task=show&listid=' . $list->id;
            ?>
				<tr>
					<td><?php 
            echo $i;
            ?>
</td>
					<td  style="text-align: left;">
						<a href="<?php 
            echo $link;
            ?>
">
							<?php 
            echo $list->list_name;
            ?>
</a>
					</td>
					<td  style="text-align: left;"><a href='index2.php?option=com_acajoom&act=mailing&listype=<?php 
            echo $list->list_type;
            ?>
'><?php 
            echo @constant($GLOBALS[ACA . 'listname' . $list->list_type]);
            ?>
</a></td>
					<td  style="text-align: center;"><?php 
            echo $list->id;
            ?>
</td>
					</tr>
			<?php 
        }
        ?>
			<tr>
				<th colspan="4">
				</th>
			</tr>
			</table>
			<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
			</form>
		</div>
		<div style="clear:both; float:left;">
		<?php 
        echo acajoom::printM('blue', _ACA_SERVER_LOCAL_TIME . ' :' . mosFormatDate(acajoom::getNow(), '%A, %d %B %Y %H:%M', 0));
        ?>
		</div>
   <td>
   </tr>
   </table>
   </div>
</div>
<?php 
    }
Beispiel #19
0
function mosLoadCustomModule(&$module, &$params)
{
    global $mosConfig_absolute_path, $mosConfig_cachepath;
    $rssurl = $params->get('rssurl', '');
    $rssitems = $params->get('rssitems', '');
    $rssdesc = $params->get('rssdesc', '');
    $moduleclass_sfx = $params->get('moduleclass_sfx', '');
    $rsscache = $params->get('rsscache', 3600);
    $cachePath = $mosConfig_cachepath . '/';
    echo '<table cellpadding="0" cellspacing="0" class="moduletable' . $moduleclass_sfx . '">';
    if ($module->content) {
        echo '<tr>';
        echo '<td>' . $module->content . '</td>';
        echo '</tr>';
    }
    // feed output
    if ($rssurl) {
        if (!is_writable($cachePath)) {
            echo '<tr>';
            echo '<td>Please make cache directory writable.</td>';
            echo '</tr>';
        } else {
            $LitePath = $mosConfig_absolute_path . '/includes/Cache/Lite.php';
            require_once $mosConfig_absolute_path . '/includes/domit/xml_domit_rss_lite.php';
            $rssDoc = new xml_domit_rss_document_lite();
            $rssDoc->setRSSTimeout(5);
            $rssDoc->useHTTPClient(true);
            $rssDoc->useCacheLite(true, $LitePath, $cachePath, $rsscache);
            $success = $rssDoc->loadRSS($rssurl);
            if ($success) {
                $totalChannels = $rssDoc->getChannelCount();
                for ($i = 0; $i < $totalChannels; $i++) {
                    $currChannel =& $rssDoc->getChannel($i);
                    $feed_title = $currChannel->getTitle();
                    $feed_title = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_title);
                    echo '<tr>';
                    echo '<td><strong><a href="' . $currChannel->getLink() . '" target="_child">';
                    echo $feed_title . '</a></strong></td>';
                    echo '</tr>';
                    if ($rssdesc) {
                        $feed_descrip = $currChannel->getDescription();
                        $feed_descrip = mosCommonHTML::newsfeedEncoding($rssDoc, $feed_descrip);
                        echo '<tr>';
                        echo '<td>' . $feed_descrip . '</td>';
                        echo '</tr>';
                    }
                    $actualItems = $currChannel->getItemCount();
                    $setItems = $rssitems;
                    if ($setItems > $actualItems) {
                        $totalItems = $actualItems;
                    } else {
                        $totalItems = $setItems;
                    }
                    for ($j = 0; $j < $totalItems; $j++) {
                        $currItem =& $currChannel->getItem($j);
                        $item_title = $currItem->getTitle();
                        $item_title = mosCommonHTML::newsfeedEncoding($rssDoc, $item_title);
                        $text = $currItem->getDescription();
                        $text = mosCommonHTML::newsfeedEncoding($rssDoc, $text);
                        echo '<tr>';
                        echo '<td><strong><a href="' . $currItem->getLink() . '" target="_child">';
                        echo $item_title . '</a></strong> - ' . $text . '</td>';
                        echo '</tr>';
                    }
                }
            }
        }
    }
    echo '</table>';
}
Beispiel #20
0
    /**
     * Writes the edit form for new and existing module
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosCategory The category object
     * @param array <p>The modules of the left side.  The array elements are in the form
     * <var>$leftorder[<i>order</i>] = <i>label</i></var>
     * where <i>order</i> is the module order from the db table and <i>label</i> is a
     * text label associciated with the order.</p>
     * @param array See notes for leftorder
     * @param array An array of select lists
     * @param object Parameters
     */
    function editModule(&$row, &$orders2, &$lists, &$params, $option)
    {
        global $mosConfig_live_site;
        $row->titleA = '';
        if ($row->id) {
            $row->titleA = '<small><small>[ ' . $row->title . ' ]</small></small>';
        }
        mosCommonHTML::loadOverlib();
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton) {
			if ( pressbutton == 'save' ) {
				if ( document.adminForm.title.value == "" ) {
					alert("<?php 
        echo T_('Module must have a title');
        ?>
");
					return;
				} else if ( (document.adminForm.access.value == 2) && (document.adminForm.elements['groups[]'].selectedIndex < 0) ) {
						alert("<?php 
        echo T_('Special Access groups required for access level Special');
        ?>
");
						return;
				}
			} else {
				<?php 
        if ($row->module == "") {
            getEditorContents('editor1', 'content');
        }
        ?>
				submitform(pressbutton);
			}
			submitform(pressbutton);
		}
		<!--
		var originalOrder = '<?php 
        echo $row->ordering;
        ?>
';
		var originalPos = '<?php 
        echo $row->position;
        ?>
';
		var orders = new Array();	// array in the format [key,value,text]
		<?php 
        $i = 0;
        foreach ($orders2 as $k => $items) {
            foreach ($items as $v) {
                echo "\n\torders[" . $i++ . "] = new Array( \"{$k}\",\"{$v->value}\",\"{$v->text}\" );";
            }
        }
        ?>
		//-->
		</script>
		<table class="adminheading">
		<tr>
			<th class="modules">
			<?php 
        echo $lists['client_id'] ? T_('Administrator') : T_('Site');
        ?>
			<?php 
        echo T_('Module:');
        ?>
			<small>
			<?php 
        echo $row->id ? T_('Edit') : T_('New');
        ?>
			</small>
			<?php 
        echo $row->titleA;
        ?>
			</th>
		</tr>
		</table>

		<form action="index2.php" method="post" name="adminForm">

		<table cellspacing="0" cellpadding="0" width="100%">
		<tr valign="top">
			<td width="60%">
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Details');
        ?>
					</th>
				</tr>
				<tr>
					<td width="100" align="left">
					<?php 
        echo T_('Title:');
        ?>
					</td>
					<td>
					<input class="text_area" type="text" name="title" size="35" value="<?php 
        echo $row->title;
        ?>
" />
					</td>
				</tr>
				<!-- START selectable pages -->
				<tr>
					<td width="100" align="left">
					<?php 
        echo T_('Show title:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['showtitle'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Position:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['position'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Module Order:');
        ?>
					</td>
					<td>
					<script language="javascript" type="text/javascript">
					<!--
					writeDynaList( 'class="inputbox" name="ordering" size="1"', orders, originalPos, originalPos, originalOrder );
					//-->
					</script>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Access Level:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Special Access:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['groups'] . "&nbsp;" . mosToolTip(T_('Special Access Groups'), T_('If Access Level is Special, only the selected groups will have access to the module'));
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo T_('Published:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['published'];
        ?>
					</td>
				</tr>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo T_('ID:');
        ?>
					</td>
					<td>
					<?php 
        echo $row->id;
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo T_('Description:');
        ?>
					</td>
					<td>
					<?php 
        echo $row->description;
        ?>
					</td>
				</tr>
				</table>

				<table class="adminform">
				<tr>
					<th >
					<?php 
        echo T_('Parameters');
        ?>
					</th>
				</tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td width="40%" >
				<table width="100%" class="adminform">
				<tr>
					<th>
					<?php 
        echo T_('Pages / Items');
        ?>
					</th>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Menu Item Link(s):');
        ?>
					<br />
					<?php 
        echo $lists['selections'];
        ?>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		<?php 
        if ($row->module == "") {
            ?>
			<tr>
				<td colspan="2">
						<table width="100%" class="adminform">
						<tr>
							<th colspan="2">
							<?php 
            echo T_('Custom Output');
            ?>
							</th>
						</tr>
						<tr>
							<td valign="top" align="left">
							<?php 
            echo T_('Content:');
            ?>
							</td>
							<td>
							<?php 
            // parameters : areaname, content, hidden field, width, height, rows, cols
            editorArea('editor1', $row->content, 'content', '700', '350', '95', '30');
            ?>
							</td>
						</tr>
						</table>
				</td>
			</tr>
			<?php 
        }
        ?>
		</table>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="original" value="<?php 
        echo $row->ordering;
        ?>
" />
		<input type="hidden" name="module" value="<?php 
        echo $row->module;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="client_id" value="<?php 
        echo $lists['client_id'];
        ?>
" />
		<?php 
        if ($row->client_id || $lists['client_id']) {
            echo '<input type="hidden" name="client" value="admin" />';
        }
        ?>
		</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 
    }
Beispiel #22
0
    function create()
    {
        global $my, $mainframe;
        $Itemid = $GLOBALS[ACA . 'itemidAca'];
        if (!empty($Itemid)) {
            $item = '&Itemid=' . $Itemid;
        } else {
            $item = '';
        }
        $hidden = '';
        $htmlOK = false;
        $h = '';
        if (!empty($this->lists)) {
            if ($my->id > 0) {
                $loggedin = true;
                $subscriber = subscribers::getSubscriberInfoFromUserId($my->id);
            } else {
                $loggedin = false;
            }
            if (!$loggedin and $GLOBALS[ACA . 'allow_unregistered'] and $this->num == 1) {
                $h .= '
				<script language="javascript" type="text/javascript">
					function submitacajoommod(formname) {
						var form = eval(\'document.\'+formname);' . 'var place = form.email.value.indexOf("@",1);' . 'var point = form.email.value.indexOf(".",place+1);';
                if ($this->shownamefield) {
                    $h .= '
						if (form.name.value == "" || form.name.value == "' . addslashes(_ACA_NAME) . '") {
							alert( "' . addslashes(_ACA_REGWARN_NAME) . '" );' . 'return false;
						} else
				';
                }
                $h .= ' if (form.email.value == "" || form.email.value == "' . addslashes(_ACA_EMAIL) . '") {' . 'alert( "' . addslashes(_ACA_REGWARN_MAIL) . '" );' . 'return false;
						} else {' . 'if ((place > -1)&&(form.email.value.length >2)&&(point > 1)){' . 'form.submit();' . 'return true;
							} ' . 'else {' . 'alert( "' . addslashes(_ACA_REGWARN_MAIL) . '" );' . 'return false;' . '}' . '}' . '}' . '</script>';
            }
            mosCommonHTML::loadOverlib();
            $h .= '<link rel="stylesheet" href="' . $GLOBALS['mosConfig_live_site'] . '/components/com_acajoom/css/acajoom.css" type="text/css" >';
            $linkForm = 'index.php?option=com_acajoom';
            if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) {
                $h .= '<form action="' . sefRelToAbs($linkForm) . '" method="post" name="modacajoomForm' . $this->num . '">
			<div class="' . $this->moduleclass_sfx . '" style="text-align:' . $this->mod_align . '">';
            } else {
                $h .= '<form action="' . $linkForm . '" method="post" name="modacajoomForm' . $this->num . '">
			<div class="' . $this->moduleclass_sfx . '" style="text-align:' . $this->mod_align . '">';
            }
            if (!empty($this->introtext)) {
                $text = '<span class="pretext' . $this->moduleclass_sfx . '">' . $this->introtext . '</span>';
                $h .= acajoom::printLine($this->linear, $text);
            }
            $i = 0;
            $accessLevel = 0;
            if ($loggedin) {
                $queues = queue::getSubscriberLists($subscriber->id);
            } else {
                $queues = '';
            }
            if ($this->showListName) {
                foreach ($this->lists as $list) {
                    $i++;
                    $subscribed = 0;
                    $accessLevel = 0;
                    if ($loggedin) {
                        if (!empty($queues)) {
                            foreach ($queues as $queue) {
                                if ($list->id == $queue->list_id) {
                                    $subscribed = 1;
                                    $accessLevel = $queue->acc_level;
                                }
                            }
                        }
                    }
                    if ($list->html == 1) {
                        $htmlOK = true;
                    }
                    $checked = 0;
                    if ($loggedin) {
                        $checked = $subscribed;
                    } else {
                        if ($this->defaultchecked) {
                            $checked = 1;
                        }
                        $subscriber->blacklist = 0;
                    }
                    if ($checked != 0) {
                        $checkedPrint = ' checked="checked" ';
                    } else {
                        $checkedPrint = '';
                    }
                    if ($list->hidden == 1) {
                        if ($subscriber->blacklist == 0) {
                            $text = "\n" . '<input id="wz_3' . $i . '" type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" ' . $checkedPrint . ' />';
                        } else {
                            $text = "\n" . '<input type="checkbox" class="inputbox" value="1" name="subscribedfake[' . $i . ']" ' . $checkedPrint . '  />';
                            $text .= "\n" . '<input type="hidden" value="0" name="subscribed[' . $i . ']"  />';
                        }
                        $text .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                        $link = ($list->list_type == '1' or $list->list_type == '7') && $GLOBALS[ACA . 'show_archive'] ? 'index.php?option=com_acajoom' . $item . '&act=mailing&task=archive&listid=' . $list->id . '&listype=' . $list->list_type : '#';
                        $text .= "\n" . '<span class="aca_list_name"';
                        if ($link == "#") {
                            $text .= " onClick='return false;' ";
                        }
                        $text .= '>' . compa::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, $link, 1) . '</span>';
                        $h .= acajoom::printLine($this->linear, $text);
                        $h .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />' . "\n\r";
                    } else {
                        if (!$loggedin) {
                            $h .= '<input type="hidden"  value="' . $checked . '" name="subscribed[' . $i . ']" />';
                            $h .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                        }
                    }
                }
            } else {
                foreach ($this->lists as $list) {
                    $i++;
                    $subscribed = 0;
                    $accessLevel = 0;
                    if ($loggedin) {
                        if (!empty($queues)) {
                            foreach ($queues as $queue) {
                                if ($list->id == $queue->list_id) {
                                    $subscribed = 1;
                                    $accessLevel = $queue->acc_level;
                                }
                            }
                        }
                    }
                    if ($list->html == 1) {
                        $htmlOK = true;
                    }
                    $checked = 0;
                    if ($loggedin) {
                        $checked = $subscribed;
                    } else {
                        if ($this->defaultchecked) {
                            $checked = 1;
                        }
                    }
                    $h .= '<input type="hidden"  value="' . $checked . '" name="subscribed[' . $i . ']" />';
                    $h .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                    $h .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />';
                    if ($list->html == 1) {
                        $htmlOK = true;
                    }
                }
            }
            if (!$loggedin) {
                if ($GLOBALS[ACA . 'allow_unregistered']) {
                    if ($this->shownamefield) {
                        $text = '<input id="wz_11" type="text" size="' . $this->fieldsize . '" value="' . addslashes(_ACA_NAME) . '" class="inputbox" name="name" onblur="if(this.value==\'\') this.value=\'' . addslashes(_ACA_NAME) . '\';" onfocus="if(this.value==\'' . addslashes(_ACA_NAME) . '\') this.value=\'\' ; " />';
                        $h .= acajoom::printLine($this->linear, $text);
                    } else {
                        $text = '<input id="wz_11" type="hidden" value="" name="name" />';
                    }
                    $text = '<input id="wz_12" type="text" size="' . $this->fieldsize . '" value="' . addslashes(_ACA_EMAIL) . '" class="inputbox" name="email" onblur="if(this.value==\'\') this.value=\'' . addslashes(_ACA_EMAIL) . '\';" onfocus="if(this.value==\'' . addslashes(_ACA_EMAIL) . '\') this.value=\'\' ; " />';
                    $h .= acajoom::printLine($this->linear, $text);
                } else {
                    $h .= acajoom::printLine($this->linear, acajoom::printM('green', _ACA_REGISTER_REQUIRED));
                    $text = _NO_ACCOUNT . " ";
                    if (isset($GLOBALS[ACA . 'cb_integration']) && $GLOBALS[ACA . 'cb_integration']) {
                        $linkme = 'index.php?option=com_comprofiler&amp;task=registers';
                    } else {
                        $linkme = 'index.php?option=com_registration&amp;task=register';
                    }
                    if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) {
                        $text .= '<a href="' . sefRelToAbs($linkme) . '">';
                    } else {
                        $text .= '<a href="' . $linkme . '">';
                    }
                    $text .= _CREATE_ACCOUNT . "</a>";
                    $h .= acajoom::printLine($this->linear, $text);
                    $htmlOK = false;
                }
            }
            if ($htmlOK) {
                if ($loggedin and !empty($subscriber)) {
                    $checked = $subscriber->receive_html;
                } else {
                    $checked = $this->receivehtmldefault;
                }
                if ($this->showreceivehtml) {
                    if ($checked != 0) {
                        $checkedPrint = ' checked="checked" ';
                    } else {
                        $checkedPrint = '';
                    }
                    $text = '<input id="wz_2" type="checkbox" class="inputbox" value="1" name="receive_html" ' . $checkedPrint . ' />';
                    $text .= ' ' . _ACA_RECEIVE_HTML;
                    $h .= acajoom::printLine($this->linear, $text);
                } else {
                    $hidden .= '<input id="wz_2" type="hidden" value="' . $checked . '" name="receive_html" />' . "\n";
                }
            } else {
                $hidden .= '<input id="wz_2" type="hidden" value="0" name="receive_html" />' . "\n";
            }
            if (!empty($this->posttext)) {
                $text = '<span class="postext' . $this->moduleclass_sfx . '">' . $this->posttext . '</span>';
                $h .= acajoom::printLine($this->linear, $text);
            }
            if (!$loggedin) {
                if ($GLOBALS[ACA . 'allow_unregistered']) {
                    if (isset($this->imgUnregistered)) {
                        $text = '<input id="aca_22" type="image" src="' . $this->imgUnregistered . '" value="' . $this->buttonUnregistered . '" alt="' . $this->buttonUnregistered . '" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />';
                    } else {
                        $text = '<input id="aca_22" type="button" value="' . $this->buttonUnregistered . '" class="button" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />';
                    }
                    $h .= acajoom::printLine($this->linear, $text);
                    $h .= '
					</div>
						<input type="hidden" name="act" value="subscribe" />
						<input type="hidden" name="redirectlink" value="' . $this->redirectURL . '" />
						<input type="hidden" name="listname" value="' . $this->showListName . '" />
					';
                } else {
                    $h .= '</div>';
                }
            } else {
                if (isset($this->notifType) and $subscribed) {
                    if (isset($this->imgUnregistered)) {
                        $text = '<input id="aca_22" type="image" src="' . $this->imgUnregistered . '" value="' . $this->buttonUnregistered . '" alt="' . $this->buttonUnregistered . '" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />';
                    } else {
                        $text = '<input id="aca_22" type="button" value="' . $this->buttonUnregistered . '" class="button" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />';
                    }
                    $h .= acajoom::printLine($this->linear, $text);
                    $h .= '
					</div>
						<input type="hidden" name="act" value="subscribe" />
						<input type="hidden" name="redirectlink" value="' . $this->redirectURL . '" />
						<input type="hidden" name="listname" value="' . $this->showListName . '" />
					';
                } else {
                    if (isset($this->imgRegistered)) {
                        $text = '<input id="aca_22" type="image" src="' . $this->imgRegistered . '" value="' . $this->buttonRegistered . '" alt="' . $this->buttonRegistered . '" name="' . $this->buttonRegistered . '">';
                    } else {
                        $text = '<input id="aca_22"  type="submit" value="' . $this->buttonRegistered . '" name="' . $this->buttonRegistered . '" class="button" />';
                    }
                    $h .= acajoom::printLine($this->linear, $text);
                    $h .= '
					</div>
						<input type="hidden" name="act" value="updatesubscription" />
						<input type="hidden" name="redirectlink" value="' . $this->redirectURL . '" />
						<input type="hidden" name="listname" value="' . $this->showListName . '" />
					';
                }
            }
            $h .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
            $h .= $hidden . '</form>';
        } else {
            $h .= acajoom::printM('blue', _ACA_LIST_NOT_AVAIL);
        }
        $this->_content = $h;
        return $h;
    }
Beispiel #23
0
 function CheckedOutProcessing(&$row, $i)
 {
     $my = mamboCore::get('currentUser');
     if ($row->checked_out) {
         $checked = mosCommonHTML::checkedOut($row);
     } else {
         $checked = mosHTML::idBox($i, $row->id, $row->checked_out && $row->checked_out != $my->id);
     }
     return $checked;
 }
    /**
     * @param array An array of data objects
     * @param object A page navigation object
     * @param string The option
     */
    function showTemplates(&$rows, &$pageNav, $option, $client)
    {
        global $my, $mosConfig_live_site;
        if (isset($row->authorUrl) && $row->authorUrl != '') {
            $row->authorUrl = str_replace('http://', '', $row->authorUrl);
        }
        mosCommonHTML::loadOverlib();
        ?>
		<script language="Javascript">
		<!--
		function showInfo(name, dir) {
			var pattern = /\b \b/ig;
			name = name.replace(pattern,'_');
			name = name.toLowerCase();
			if (document.adminForm.doPreview.checked) {
				var src = '<?php 
        echo $mosConfig_live_site . ($client == 'admin' ? '/administrator' : '');
        ?>
/templates/'+dir+'/template_thumbnail.png';
				var html=name;
				html = '<br /><img border="1" src="'+src+'" name="imagelib" alt="No preview available" width="206" height="145" />';
				return overlib(html, CAPTION, name)
			} else {
				return false;
			}
		}
		-->
		</script>

		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="templates">
			Administrar Temas <small><small>[ <?php 
        echo $client == 'admin' ? 'Administrator' : 'Site';
        ?>
 ]</small></small>
			</th>
			<td align="right" nowrap="nowrap">
			Visualisar Temas
			</td>
			<td align="right">
			<input type="checkbox" name="doPreview" checked="checked"/>
			</td>
		</tr>
		</table>
		<table class="adminlist">
		<tr>
			<th width="5%">Qtd.</th>
			<th width="5%">&nbsp;</th>
			<th width="25%" class="title">
			Nome
			</th>
			<?php 
        if ($client == 'admin') {
            ?>
				<th width="10%">
				Padrão
				</th>
				<?php 
        } else {
            ?>
				<th width="5%">
				Padrão
				</th>
				<th width="5%">
				Atribuído
				</th>
				<?php 
        }
        ?>
			<th width="20%" align="left">
			Autor
			</th>
			<th width="5%" align="center">
			Versão
			</th>
			<th width="10%" align="center">
			Data
			</th>
			<th width="20%" align="left">
			URL do Autor
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            ?>
			<tr class="<?php 
            echo 'row' . $k;
            ?>
">
				<td>
				<?php 
            echo $pageNav->rowNumber($i);
            ?>
				</td>
				<td>
				<?php 
            if ($row->checked_out && $row->checked_out != $my->id) {
                ?>
					&nbsp;
					<?php 
            } else {
                ?>
					<input type="radio" id="cb<?php 
                echo $i;
                ?>
" name="cid[]" value="<?php 
                echo $row->directory;
                ?>
" onClick="isChecked(this.checked);" />
					<?php 
            }
            ?>
				</td>
				<td>
				<a href="#info" onmouseover="showInfo('<?php 
            echo $row->name;
            ?>
','<?php 
            echo $row->directory;
            ?>
')" onmouseout="return nd();">
				<?php 
            echo $row->name;
            ?>
				</a>
				</td>
				<?php 
            if ($client == 'admin') {
                ?>
					<td align="center">
					<?php 
                if ($row->published == 1) {
                    ?>
					<img src="images/tick.png" alt="Publicado">
						<?php 
                } else {
                    ?>
						&nbsp;
						<?php 
                }
                ?>
					</td>
					<?php 
            } else {
                ?>
					<td align="center">
					<?php 
                if ($row->published == 1) {
                    ?>
						<img src="images/tick.png" alt="Padrão">
						<?php 
                } else {
                    ?>
						&nbsp;
						<?php 
                }
                ?>
					</td>
					<td align="center">
					<?php 
                if ($row->assigned == 1) {
                    ?>
						<img src="images/tick.png" alt="Atribuído" />
						<?php 
                } else {
                    ?>
						&nbsp;
						<?php 
                }
                ?>
					</td>
					<?php 
            }
            ?>
				<td>
				<?php 
            echo $row->authorEmail ? '<a href="mailto:' . $row->authorEmail . '">' . $row->author . '</a>' : $row->author;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->version;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->creationdate;
            ?>
				</td>
				<td>
				<a href="<?php 
            echo substr($row->authorUrl, 0, 7) == 'http://' ? $row->authorUrl : 'http://' . $row->authorUrl;
            ?>
" target="_blank">
				<?php 
            echo $row->authorUrl;
            ?>
				</a>
				</td>
			</tr>
			<?php 
        }
        ?>
		</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="client" value="<?php 
        echo $client;
        ?>
" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
Beispiel #25
0
    /**
     * Writes a list of the content items
     * @param array An array of content objects
     */
    function showList(&$rows, $search, $pageNav, $option)
    {
        global $my, $adminLanguage;
        global $mosConfig_live_site;
        ?>
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="frontpage">
			<?php 
        echo $adminLanguage->A_COMP_FRONT_PAGE_ITEMS;
        ?>
			</th>
			<td>
			<?php 
        echo $adminLanguage->A_COMP_FILTER;
        ?>
:
			</td>
			<td> 
			<input type="text" name="search" value="<?php 
        echo $search;
        ?>
" class="inputbox" onChange="document.adminForm.submit();" />
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<tr>
			<th width="20"> 
			<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
			</th>
			<th class="title" width="50%">
			<?php 
        echo $adminLanguage->A_COMP_TITLE;
        ?>
			</th>
			<th width="10%" nowrap="nowrap">
			<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
			</th>
			<th colspan="2" nowrap="nowrap">
			<?php 
        echo $adminLanguage->A_COMP_REORDER;
        ?>
			</th>
			<th width="10%" nowrap="nowrap">
			<?php 
        echo $adminLanguage->A_COMP_ACCESS;
        ?>
			</th>
			<th width="15%" align="left">
			<?php 
        echo $adminLanguage->A_COMP_CATEG;
        ?>
			</th>
			<th>
			<?php 
        echo $adminLanguage->A_COMP_FRONT_ORDER;
        ?>
			</th>
			<th width="10%" nowrap="nowrap">
			<?php 
        echo $adminLanguage->A_COMP_CHECKED_OUT;
        ?>
			</th>
		</tr>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
">
				<td width="20">
				<?php 
            echo mosHTML::idBox($i, $row->id, $row->checked_out && $row->checked_out != $my->id);
            ?>
				</td>
				<td>
				<?php 
            echo $row->title;
            ?>
 
				</td>
				<?php 
            $now = date("Y-m-d h:i:s");
            if ($now <= $row->publish_up && $row->state == "1") {
                $img = 'publish_y.png';
                $alt = $adminLanguage->A_COMP_PUBLISHED;
            } else {
                if (($now <= $row->publish_down || $row->publish_down == "0000-00-00 00:00:00") && $row->state == "1") {
                    $img = 'publish_g.png';
                    $alt = $adminLanguage->A_COMP_PUBLISHED;
                } else {
                    if ($now > $row->publish_down && $row->state == "1") {
                        $img = 'publish_r.png';
                        $alt = $adminLanguage->A_COMP_EXPIRED;
                    } elseif ($row->state == "0") {
                        $img = "publish_x.png";
                        $alt = $adminLanguage->A_COMP_UNPUBLISHED;
                    }
                }
            }
            $times = '';
            if (isset($row->publish_up)) {
                if ($row->publish_up == '0000-00-00 00:00:00') {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_START_ALWAYS . "</td></tr>";
                } else {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_START . ": " . $row->publish_up . "</td></tr>";
                }
            }
            if (isset($row->publish_down)) {
                if ($row->publish_down == '0000-00-00 00:00:00') {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_FIN_NOEXP . "</td></tr>";
                } else {
                    $times .= "<tr><td>" . $adminLanguage->A_COMP_CONTENT_FINISH . ": " . $row->publish_down . "</td></tr>";
                }
            }
            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>
				<?php 
            echo $pageNav->orderUpIcon($i);
            ?>
				</td>
				<td>
				<?php 
            echo $pageNav->orderDownIcon($i, $n);
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->groupname;
            ?>
				</td>
				<td>
				<?php 
            echo $row->name;
            ?>
				</td>
				<td align="center">
				<?php 
            echo $row->fpordering;
            ?>
				</td>
				<?php 
            if ($row->checked_out) {
                ?>
					<td align="center">
					<?php 
                echo $row->editor;
                ?>
					</td>
					<?php 
            } else {
                ?>
					<td align="center">&nbsp;</td>
					<?php 
            }
            ?>
			</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" />
		</form>
		<br />
	
		<?php 
        mosCommonHTML::ContentLegend();
        ?>
		<script language="Javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
		<?php 
    }
    function edituser(&$row, &$contact, &$lists, $option, $uid, &$params)
    {
        global $my, $acl;
        global $mosConfig_live_site;
        mosMakeHtmlSafe($row);
        $tabs = new mosTabs(0);
        mosCommonHTML::loadOverlib();
        $canBlockUser = $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'user properties', 'block_user');
        $canEmailEvents = $acl->acl_check('workflow', 'email_events', 'users', $acl->get_group_name($row->gid, 'ARO'));
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");

			// do field validation
			if (trim(form.name.value) == "") {
				alert( "Você deve informar um nome." );
			} else if (form.username.value == "") {
				alert( "Você deve informar o nome de usuário." );
			} else if (r.exec(form.username.value) || form.username.value.length < 3) {
				alert( "O nome de usuário contém caracteres inválidos ou é muito curto." );
			} else if (trim(form.email.value) == "") {
				alert( "Você deve informar um endereço de e-mail." );
			} else if (form.gid.value == "") {
				alert( "Você deve atribuir o usuário a um grupo." );
			} else if (trim(form.password.value) != "" && form.password.value != form.password2.value){
				alert( "Senhas não combinam." );
			} else if (form.gid.value == "29") {
				alert( "Por favor, selecione outro grupo pois `Public Frontend` não é uma opção selecionável" );
			} else if (form.gid.value == "30") {
				alert( "Por favor, selecione outro grupo pois `Public Backend` não é uma opção selecionável" );
			} else {
				submitform( pressbutton );
			}
		}

		function gotocontact( id ) {
			var form = document.adminForm;
			form.contact_id.value = id;
			submitform( 'contact' );
		}
		</script>
		<form action="index2.php" method="post" name="adminForm">

		<table class="adminheading">
		<tr>
			<th class="user">
			Usuário: <small><?php 
        echo $row->id ? 'Editar' : 'Adicionar';
        ?>
</small>
			</th>
		</tr>
		</table>

		<table width="100%">
		<tr>
			<td width="60%" valign="top">
				<table class="adminform">
				<tr>
					<th colspan="2">
					Detalhes do Usuário
					</th>
				</tr>
				<tr>
					<td width="130">
					Nome:
					</td>
					<td>
					<input type="text" name="name" class="inputbox" size="40" value="<?php 
        echo $row->name;
        ?>
" maxlength="50" />
					</td>
				</tr>
				<tr>
					<td>
					Nome de Usuário:
					</td>
					<td>
					<input type="text" name="username" class="inputbox" size="40" value="<?php 
        echo $row->username;
        ?>
" maxlength="25" />
					</td>
				<tr>
					<td>
					E-mail:
					</td>
					<td>
					<input class="inputbox" type="text" name="email" size="40" value="<?php 
        echo $row->email;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td>
					Nova Senha:
					</td>
					<td>
					<input class="inputbox" type="password" name="password" size="40" value="" />
					</td>
				</tr>
				<tr>
					<td>
					Verificação de Senha:
					</td>
					<td>
					<input class="inputbox" type="password" name="password2" size="40" value="" />
					</td>
				</tr>
				<tr>
					<td valign="top">
					Grupo:
					</td>
					<td>
					<?php 
        echo $lists['gid'];
        ?>
					</td>
				</tr>
				<?php 
        if ($canBlockUser) {
            ?>
					<tr>
						<td>
						Bloquear Usuário
						</td>
						<td>
						<?php 
            echo $lists['block'];
            ?>
						</td>
					</tr>
					<?php 
        }
        if ($canEmailEvents) {
            ?>
					<tr>
						<td>
						Receber E-mail do sistema
						</td>
						<td>
						<?php 
            echo $lists['sendEmail'];
            ?>
						</td>
					</tr>
					<?php 
        }
        if ($uid) {
            ?>
					<tr>
						<td>
						Data do Registro
						</td>
						<td>
						<?php 
            echo $row->registerDate;
            ?>
						</td>
					</tr>
				<tr>
					<td>
					Última Visita
					</td>
					<td>
					<?php 
            echo $row->lastvisitDate;
            ?>
					</td>
				</tr>
					<?php 
        }
        ?>
				<tr>
					<td colspan="2">&nbsp;

					</td>
				</tr>
				</table>
			</td>
			<td width="40%" valign="top">
				<table class="adminform">
				<tr>
					<th colspan="1">
					<?php 
        echo 'Parâmetros';
        ?>
					</th>
				</tr>
				<tr>
					<td>
					<?php 
        echo $params->render('params');
        ?>
					</td>
				</tr>
				</table>

				<?php 
        if (!$contact) {
            ?>
					<table class="adminform">
					<tr>
						<th>
						Infomações de Contato
						</th>
					</tr>
					<tr>
						<td>
						<br />
						Sem detalhes de contato associado para este usuário:
						<br />
						Veja 'Componentes -> Contato -> Administrar Contato' para detalhes.
						<br /><br />
						</td>
					</tr>
					</table>
					<?php 
        } else {
            ?>
					<table class="adminform">
					<tr>
						<th colspan="2">
						Informações de Contato
						</th>
					</tr>
					<tr>
						<td width="15%">
						Nome:
						</td>
						<td>
						<strong>
						<?php 
            echo $contact[0]->name;
            ?>
						</strong>
						</td>
					</tr>
					<tr>
						<td>
						Empresa:
						</td>
						<td >
						<strong>
						<?php 
            echo $contact[0]->con_position;
            ?>
						</strong>
						</td>
					</tr>
					<tr>
						<td>
						Telefone:
						</td>
						<td >
						<strong>
						<?php 
            echo $contact[0]->telephone;
            ?>
						</strong>
						</td>
					</tr>
					<tr>
						<td>
						Fax:
						</td>
						<td >
						<strong>
						<?php 
            echo $contact[0]->fax;
            ?>
						</strong>
						</td>
					</tr>
					<tr>
						<td></td>
						<td >
						<strong>
						<?php 
            echo $contact[0]->misc;
            ?>
						</strong>
						</td>
					</tr>
					<?php 
            if ($contact[0]->image) {
                ?>
						<tr>
							<td></td>
							<td valign="top">
							<img src="<?php 
                echo $mosConfig_live_site;
                ?>
/images/stories/<?php 
                echo $contact[0]->image;
                ?>
" align="middle" alt="Contato" />
							</td>
						</tr>
						<?php 
            }
            ?>
					<tr>
						<td colspan="2">
						<br /><br />
						<input class="button" type="button" value="change Contact Details" onclick="javascript: gotocontact( '<?php 
            echo $contact[0]->id;
            ?>
' )">
						<i>
						<br />
						'Componentes -> Contato -> Administrar Contatos'.
						</i>
						</td>
					</tr>
					</table>
					<?php 
        }
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="contact_id" value="" />
		<?php 
        if (!$canEmailEvents) {
            ?>
			<input type="hidden" name="sendEmail" value="0" />
			<?php 
        }
        ?>
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
    /**
     * Displays a selection list for menu item types
     */
    public static function addMenuItem(&$cid, $menutype, $option, $types_content, $types_component, $types_link, $types_other, $types_submit)
    {
        mosCommonHTML::loadOverlib();
        ?>
		<style type="text/css">
		fieldset {
			border: 1px solid #777;
		}
		legend {
			font-weight: bold;
		}
		</style>

		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="menus">
			New Menu Item
			</th>
			<td valign="bottom" nowrap="nowrap" style="color: red;">
			<?php 
        //echo _MENU_GROUP;
        ?>
			* Note that some menu types appear in more than one grouping, but they are still the same menu type.
			</td>
		</tr>
		</table>

		<table class="adminform">
		<tr>
			<td width="50%" valign="top">
				<fieldset>
					<legend>Content</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_content);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_content[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
				<fieldset>
					<legend>Miscellaneous</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_other);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_other[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
				<fieldset>
					<legend>Submit</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_submit);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_submit[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
			</td>
			<td width="50%" valign="top">
				<fieldset>
					<legend>Components</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_component);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_component[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
				<fieldset>
					<legend>Links</legend>
					<table class="adminform">
					<?php 
        $k = 0;
        $count = count($types_link);
        for ($i = 0; $i < $count; $i++) {
            $row =& $types_link[$i];
            $link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=edit&type=' . $row->type . '&hidemainmenu=1';
            HTML_menusections::htmlOptions($row, $link, $k, $i);
            $k = 1 - $k;
        }
        ?>
					</table>
				</fieldset>
			</td>
		</tr>
		</table>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="menutype" value="<?php 
        echo $menutype;
        ?>
" />
		<input type="hidden" name="task" value="edit" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
    function JLMS_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 
    }
    function draw_table_header()
    {
        mosCommonHTML::loadOverlib();
        ?>
		<script language="javascript" type="text/javascript">
		function dirup(){
			var urlquery=frames['imgManager'].location.search.substring(1);
			var curdir= urlquery.substring(urlquery.indexOf('listdir=')+8);
			var listdir=curdir.substring(0,curdir.lastIndexOf('/'));
			frames['imgManager'].location.href='index3.php?option=com_media&task=list&listdir=' + listdir;
		}
		</script>
		<div class="manager">
		<?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 
    }