/** * Writes a list of the categories for a section * @param array An array of category objects * @param string The name of the category section */ function show(&$rows, $scope, $myid, &$pageNav, $option) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="sections"> Administrar Seções </th> </tr> </table> <table class="adminlist"> <tr> <th width="20"> nº </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Nome da Seção </th> <th width="10%"> Publicado </th> <th colspan="2" width="5%"> Reordenar </th> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a> </th> <th width="8%"> Acesso </th> <th width="12%" nowrap="nowrap"> ID da Seção </th> <th width="12%" nowrap="nowrap"> Categorias </th> <th width="12%" nowrap="nowrap"> Ativo </th> <th width="12%" nowrap="nowrap"> Lixeira </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_sections&scope=content&task=editA&hidemainmenu=1&id=' . $row->id; $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td width="20" align="right"> <?php echo $pageNav->rowNumber($i); ?> </td> <td width="20"> <?php echo $checked; ?> </td> <td width="35%"> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->name . " ( " . $row->title . " )"; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->name . " ( " . $row->title . " )"; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td align="center"> <?php echo $row->id; ?> </td> <td align="center"> <?php echo $row->categories; ?> </td> <td align="center"> <?php echo $row->active; ?> </td> <td align="center"> <?php echo $row->trash; ?> </td> <?php $k = 1 - $k; ?> </tr> <?php } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="scope" value="<?php echo $scope; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="chosen" value="" /> <input type="hidden" name="act" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
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&client=admin&task=editA&hidemainmenu=1&id={$id}"; echo DOCMAN_Utils::mosToolTip(_DML_EDIT_THIS_MODULE, '', '', 'edit.png', '', $href); $href = "index2.php?option=com_docman&section=modules&task=unpublish&moduleid={$id}&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&section=modules&task=orderup&moduleid={$id}&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&section=modules&task=orderdown&moduleid={$id}&redirect=index2.php%3foption%3d{$option}"; echo DOCMAN_Utils::mosToolTip(_DML_ORDER_THIS_MODULE, '', '', '../../../administrator/images/downarrow.png', '', $href); ?> </div><?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 $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('&', '&', $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('&', '&', $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 }
/** * 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('&', '&', $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('&', '&', $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 }
/** * 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&task=edit&id=' . $row->id . $row->Itemid_link . '&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 }
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"> </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 }
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 }
function userEdit($row, $option, $submitvalue, &$params) { global $mosConfig_absolute_path, $mosConfig_frontend_userparams; require_once $mosConfig_absolute_path . '/includes/HTML_toolbar.php'; // used for spoof hardening $validate = josSpoofValue(); mosCommonHTML::loadOverlib(); ?> <script language="javascript" type="text/javascript"> function submitbutton( pressbutton ) { var form = document.mosUserForm; var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i"); if (pressbutton == 'cancel') { form.task.value = 'cancel'; form.submit(); return; } // do field validation if (form.name.value == "") { alert( "<?php echo addslashes(_REGWARN_NAME); ?> " ); } else if (form.username.value == "") { alert( "<?php echo addslashes(_REGWARN_UNAME); ?> " ); } else if (r.exec(form.username.value) || form.username.value.length < 3) { alert( "<?php printf(addslashes(_VALID_AZ09), addslashes(_PROMPT_UNAME), 4); ?> " ); } else if (form.email.value == "") { alert( "<?php echo addslashes(_REGWARN_MAIL); ?> " ); } else if ((form.password.value != "") && (form.password.value != form.verifyPass.value)){ alert( "<?php echo addslashes(_REGWARN_VPASS2); ?> " ); } else if (r.exec(form.password.value)) { alert( "<?php printf(addslashes(_VALID_AZ09), addslashes(_REGISTER_PASS), 4); ?> " ); } else { form.submit(); } } </script> <form action="index.php" method="post" name="mosUserForm"> <div class="componentheading"> <?php echo _EDIT_TITLE; ?> </div> <div style="float: right;"> <?php mosToolBar::startTable(); mosToolBar::spacer(); mosToolBar::save(); mosToolBar::cancel(); mosToolBar::endtable(); ?> </div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td width=85> <?php echo _YOUR_NAME; ?> </td> <td> <input class="inputbox" type="text" name="name" value="<?php echo $row->name; ?> " size="40" /> </td> </tr> <tr> <td> <?php echo _EMAIL; ?> </td> <td> <input class="inputbox" type="text" name="email" value="<?php echo $row->email; ?> " size="40" /> </td> </tr> <tr> <td> <?php echo _UNAME; ?> </td> <td> <input class="inputbox" type="text" name="username" value="<?php echo $row->username; ?> " size="40" /> </td> </tr> <tr> <td> <?php echo _PASS; ?> </td> <td> <input class="inputbox" type="password" name="password" value="" size="40" /> </td> </tr> <tr> <td> <?php echo _VPASS; ?> </td> <td> <input class="inputbox" type="password" name="verifyPass" size="40" /> </td> </tr> <?php if ($mosConfig_frontend_userparams == '1' || $mosConfig_frontend_userparams == 1 || $mosConfig_frontend_userparams == NULL) { ?> <tr> <td colspan="2"> <?php echo $params->render('params'); ?> </td> </tr> <?php } ?> </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="saveUserEdit" /> <input type="hidden" name="<?php echo $validate; ?> " value="1" /> </form> <?php }
public static function edit(&$row, &$images, &$lists, &$params, $option, &$menus) { global $database; mosMakeHtmlSafe($row); $create_date = null; $mod_date = null; $nullDate = $database->getNullDate(); if ($row->created != $nullDate) { $create_date = mosFormatDate($row->created, '%A, %d %B %Y %H:%M', '0'); } 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 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) . "' );\t"; } } ?> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if ( pressbutton ==' resethits' ) { if (confirm('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( "Please select a Menu" ); return; } else if ( form.link_name.value == "" ) { alert( "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( "Content item must have a title" ); } else if (trim(form.name.value) == ""){ alert( "Content item must have a name" ); } else { if ( form.reset_hits.checked ) { form.hits.value = 0; } else { } <?php getEditorContents('editor1', 'introtext'); ?> submitform( pressbutton ); } } </script> <table class="adminheading"> <tr> <th class="edit"> Static Content Item: <small> <?php echo $row->id ? 'Edit' : 'New'; ?> </small> </th> </tr> </table> <form action="index2.php" method="post" name="adminForm"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td width="60%" valign="top"> <table class="adminform"> <tr> <th colspan="3"> Item Details </th> </tr> <tr> <td align="left"> 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"> 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"> Text: (required)<br /> <?php // parameters : areaname, content, hidden field, width, height, rows, cols editorArea('editor1', $row->introtext, 'introtext', '100%;', '500', '75', '50'); ?> </td> </tr> </table> </td> <td width="40%" valign="top"> <?php $tabs->startPane("content-pane"); $tabs->startTab("Publishing", "publish-page"); ?> <table class="adminform"> <tr> <th colspan="2"> Publishing Info </th> </tr> <tr> <td valign="top" align="right" width="120"> State: </td> <td> <?php echo $row->state > 0 ? 'Published' : 'Draft Unpublished'; ?> </td> </tr> <tr> <td valign="top" align="right"> Published: </td> <td> <input type="checkbox" name="published" value="1" <?php echo $row->state ? 'checked="checked"' : ''; ?> /> </td> </tr> <tr> <td valign="top" align="right"> Access Level: </td> <td> <?php echo $lists['access']; ?> </td> </tr> <tr> <td valign="top" align="right"> 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"> Change Creator: </td> <td> <?php echo $lists['created_by']; ?> </td> </tr> <tr> <td valign="top" align="right"> 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 align="right"> Start Publishing: </td> <td> <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 align="right"> Finish Publishing: </td> <td> <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" width="100%"> <?php if ($row->id) { ?> <tr> <td> <strong>Content ID:</strong> </td> <td> <?php echo $row->id; ?> </td> </tr> <?php } ?> <tr> <td width="120" valign="top" align="right"> <strong>State</strong> </td> <td> <?php echo $row->state > 0 ? 'Published' : ($row->state < 0 ? 'Archived' : 'Draft Unpublished'); ?> </td> </tr> <tr> <td valign="top" align="right"> <strong>Hits</strong> </td> <td> <?php echo $row->hits; ?> <div <?php echo $visibility; ?> > <input name="reset_hits" type="button" class="button" value="Reset Hit Count" onClick="submitbutton('resethits');"> </div> </td> </tr> <tr> <td valign="top" align="right"> <strong>Version</strong> </td> <td> <?php echo $row->version; ?> times </td> </tr> <tr> <td valign="top" align="right"> <strong>Created</strong> </td> <td> <?php if (!$create_date) { ?> New document <?php } else { echo $create_date; } ?> </td> </tr> <tr> <td valign="top" align="right"> <strong>Last Modified</strong> </td> <td> <?php if (!$mod_date) { ?> Not modified <?php } else { echo $mod_date; ?> <br /> <?php echo $row->modifier; } ?> </td> </tr> <tr> <td valign="top" align="right"> <strong>Expires</strong> </td> <td> <?php echo "{$row->publish_down}"; ?> </td> </tr> </table> <?php $tabs->endTab(); $tabs->startTab("Images", "images-page"); ?> <table class="adminform"> <tr> <th colspan="2"> MOSImage Control </th> </tr> <tr> <td colspan="2"> <table width="100%"> <tr> <td width="48%" valign="top"> <div align="center"> Gallery Images: <br /> <?php echo $lists['imagefiles']; ?> </div> </td> <td width="2%"> <input class="button" type="button" value=">>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" title="Add"/> <br/> <input class="button" type="button" value="<<" onclick="delSelectedFromList('adminForm','imagelist')" title="Remove"/> </td> <td width="48%"> <div align="center"> Content Images: <br /> <?php echo $lists['imagelist']; ?> <br /> <input class="button" type="button" value="Up" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" /> <input class="button" type="button" value="Down" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" /> </div> </td> </tr> </table> Sub-folder: <?php echo $lists['folders']; ?> </td> </tr> <tr valign="top"> <td> <div align="center"> Sample Image:<br/> <img name="view_imagefiles" src="../images/M_images/blank.png" width="100" /> </div> </td> <td valign="top"> <div align="center"> Active Image:<br/> <img name="view_imagelist" src="../images/M_images/blank.png" width="100" /> </div> </td> </tr> <tr> <td> Edit the image selected: <table> <tr> <td align="right"> Source </td> <td> <input type="text" name= "_source" value="" /> </td> </tr> <tr> <td align="right"> Align </td> <td> <?php echo $lists['_align']; ?> </td> </tr> <tr> <td align="right"> Alt Text </td> <td> <input type="text" name="_alt" value="" /> </td> </tr> <tr> <td align="right"> Border </td> <td> <input type="text" name="_border" value="" size="3" maxlength="1" /> </td> </tr> <tr> <td align="right"> Caption: </td> <td> <input class="text_area" type="text" name="_caption" value="" size="30" /> </td> </tr> <tr> <td align="right"> Caption Position: </td> <td> <?php echo $lists['_caption_position']; ?> </td> </tr> <tr> <td align="right"> Caption Align: </td> <td> <?php echo $lists['_caption_align']; ?> </td> </tr> <tr> <td align="right"> 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="Apply" onClick="applyImageProps()" /> </td> </tr> </table> </td> </tr> </table> <?php $tabs->endTab(); $tabs->startTab("Parameters", "params-page"); ?> <table class="adminform"> <tr> <th colspan="2"> Parameter Control </th> </tr> <tr> <td> <?php echo $params->render(); ?> </td> </tr> </table> <?php $tabs->endTab(); $tabs->startTab("Meta Info", "metadata-page"); ?> <table class="adminform"> <tr> <th colspan="2"> Meta Data </th> </tr> <tr> <td align="left"> Description:<br /> <textarea class="inputbox" cols="40" rows="5" name="metadesc" style="width:300px"><?php echo str_replace('&', '&', $row->metadesc); ?> </textarea> </td> </tr> <tr> <td align="left"> Keywords:<br /> <textarea class="inputbox" cols="40" rows="5" name="metakey" style="width:300px"><?php echo str_replace('&', '&', $row->metakey); ?> </textarea> </td> </tr> </table> <?php $tabs->endTab(); $tabs->startTab("Link to Menu", "link-page"); ?> <table class="adminform"> <tr> <th colspan="2"> Link to Menu </th> </tr> <tr> <td colspan="2"> This will create a 'Link - Static Content' in the menu you select <br /><br /> </td> </tr> <tr> <td valign="top" width="90px"> Select a Menu </td> <td> <?php echo $lists['menuselect']; ?> </td> </tr> <tr> <td valign="top" width="90px"> 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="Link to Menu" onClick="submitbutton('menulink');" /> </td> </tr> <tr> <th colspan="2"> Existing Menu Links </th> </tr> <?php if ($menus == NULL) { ?> <tr> <td colspan="2"> None </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="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="" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
public static function showSearches(&$rows, $pageNav, $option, $task, $showResults) { global $mainframe; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminheading"> <tr> <th class="searchtext"> Search Engine Text : <span class="componentheading">logging is : <?php echo $mainframe->getCfg('enable_log_searches') ? '<b><font color="green">Enabled</font></b>' : '<b><font color="red">Disabled</font></b>'; ?> </span> </th> <td align="right"> <?php if (!$showResults) { echo mosWarning('Activating this can dramatically slow and even lock your site as it is a highly query intensive operation'); } ?> </td> <td align="right"> <?php if ($showResults) { ?> <input name="search_results" type="button" class="button" value="Hide Search Results" onclick="submitbutton('searches');"> <?php } else { ?> <input name="search_results" type="button" class="button" value="Show Search Results" onclick="submitbutton('searchesresults');"> <?php } ?> </td> </tr> </table> <table class="adminlist"> <tr> <th style="text-align:right" width="10"> # </th> <th class="title"> Search Text </th> <th nowrap="nowrap"> Times Requested </th> <?php if ($showResults) { ?> <th nowrap="nowrap"> Results Returned </th> <?php } ?> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; ?> <tr class="row<?php echo $k; ?> "> <td align="right"> <?php echo $i + 1 + $pageNav->limitstart; ?> </td> <td align="left"> <?php echo $row->search_term; ?> </td> <td align="center"> <?php echo $row->hits; ?> </td> <?php if ($showResults) { ?> <td align="center"> <?php echo $row->returns; ?> </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="<?php echo $task; ?> " /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
/** * Writes a list of the categories for a section * @param array An array of category objects * @param string The name of the category section */ function show(&$rows, $section, $section_name, &$pageNav, &$lists, $type) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <?php if ($section == 'content') { ?> <th class="categories"> Administrar Categoria <small><small>[ Conteúdo: Todos ]</small></small> </th> <td width="right"> <?php echo $lists['sectionid']; ?> </td> <?php } else { if (is_numeric($section)) { $query = 'com_content§ionid=' . $section; } else { if ($section == 'com_contact_details') { $query = 'com_contact'; } else { $query = $section; } } ?> <th class="categories"> Administrar Categoria <small><small>[ <?php echo $section_name; ?> ]</small></small> </th> <?php } ?> </tr> </table> <table class="adminlist"> <tr> <th width="10" align="left"> nº </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Nome Categoria </th> <th width="10%"> Publicado </th> <?php if ($section != 'content') { ?> <th colspan="2" width="5%"> Reordenar </th> <?php } ?> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Salvar Ordem" /></a> </th> <th width="10%"> Acesso </th> <?php if ($section == 'content') { ?> <th width="12%" align="left"> Seção </th> <?php } ?> <th width="5%" nowrap="nowrap"> ID da Categoria </th> <?php if ($type == 'content') { ?> <th width="5%"> Ativo </th> <th width="5%"> Lixeira </th> <?php } else { ?> <th width="20%"> </th> <?php } ?> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->section; $link = 'index2.php?option=com_categories§ion=' . $section . '&task=editA&hidemainmenu=1&id=' . $row->id; if ($row->checked_out_contact_category) { $row->checked_out = $row->checked_out_contact_category; } $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out_contact_category && $row->checked_out_contact_category != $my->id) { echo stripslashes($row->name) . ' ( ' . stripslashes($row->title) . ' )'; } else { ?> <a href="<?php echo $link; ?> "> <?php echo stripslashes($row->name) . ' ( ' . stripslashes($row->title) . ' )'; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <?php if ($section != 'content') { ?> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <?php } ?> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <?php if ($section == 'content') { ?> <td align="left"> <a href="<?php echo $row->sect_link; ?> " title="Editar Seção"> <?php echo $row->section_name; ?> </a> </td> <?php } ?> <td align="center"> <?php echo $row->id; ?> </td> <?php if ($type == 'content') { ?> <td align="center"> <?php echo $row->active; ?> </td> <td align="center"> <?php echo $row->trash; ?> </td> <?php } else { ?> <td> </td> <?php } $k = 1 - $k; ?> </tr> <?php } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="com_categories" /> <input type="hidden" name="section" value="<?php echo $section; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="chosen" value="" /> <input type="hidden" name="act" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="type" value="<?php echo $type; ?> " /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
function formStart($title = '', $html = 0, $javascriptType = '') { if (!$GLOBALS[ACA . 'disabletooltip']) { if (ACA_CMSTYPE) { // joomla 15 $my =& JFactory::getUser(); JHTML::_('behavior.tooltip'); } else { //joomla 1x mosCommonHTML::loadOverlib(); global $my; } //endif } ?> <script language="javascript" type="text/javascript"> <?php switch ($javascriptType) { case 'name_email': ?> function submitbutton(task) { var form = document.mosForm; if (form.name.value == "") { alert( "<?php echo addslashes(_ACA_REGWARN_NAME); ?> " ); } else if (form.email.value == "") { alert( "<?php echo addslashes(_ACA_REGWARN_MAIL); ?> " ); } else { form.task.value = task; form.submit(); } } <?php break; case 'edit_mailing': break; case 'show_mailing': ?> function checkcid(myField) { myField.checked = true; isChecked(true); } <?php break; case 'unsubscribe': ?> function submitbutton(task) { var form = document.mosForm; form.task.value = task; form.submit(); } <?php break; case 'cron': ?> function submitbutton(task) { var form = document.mosForm; if (form.siteurl.value.length < 14) { alert( "<?php echo addslashes(_ACA_CRON_SITE_URL); ?> " ); } else { form.task.value = task; form.submit(); } } <?php break; default: ?> function submitbutton(task) { var form = document.mosForm; form.task.value = task; form.submit(); } <?php break; } ?> </script> <link rel="stylesheet" href="components/com_acajoom/css/acajoom.css" type="text/css" > <!-- <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> --> <div class="componentheading"><?php echo $title; ?> </div> <?php }
/** * Writes a list of the content items * @param array An array of content objects */ function showList(&$rows, $search, $pageNav, $option, $lists) { global $my, $acl, $database; mosCommonHTML::loadOverlib(); $nullDate = $database->getNullDate(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="frontpage" rowspan="2"> Administrar Página Principal </th> <td width="right"> <?php echo $lists['sectionid']; ?> </td> <td width="right"> <?php echo $lists['catid']; ?> </td> <td width="right"> <?php echo $lists['authorid']; ?> </td> </tr> <tr> <td align="right" colspan="2"> Filtro: </td> <td> <input type="text" name="search" value="<?php echo htmlspecialchars($search); ?> " class="text_area" onChange="document.adminForm.submit();" /> </td> </tr> </table> <table class="adminlist"> <tr> <th width="5"> nº </th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Título </th> <th width="10%" nowrap="nowrap"> Publicado </th> <th colspan="2" nowrap="nowrap" width="5%"> Reordenar </th> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Salvar Ordem" /></a> </th> <th width="8%" nowrap="nowrap"> Acesso </th> <th width="10%" align="left"> Seções </th> <th width="10%" align="left"> Categoria </th> <th width="10%" align="left"> Autor </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_content§ionid=0&task=edit&hidemainmenu=1&id=' . $row->id; $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id=' . $row->sectionid; $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id=' . $row->catid; $now = _CURRENT_SERVER_TIME; if ($now <= $row->publish_up && $row->state == '1') { $img = 'publish_y.png'; $alt = 'Publicado'; } else { if (($now <= $row->publish_down || $row->publish_down == $nullDate) && $row->state == '1') { $img = 'publish_g.png'; $alt = 'Publicado'; } else { if ($now > $row->publish_down && $row->state == '1') { $img = 'publish_r.png'; $alt = 'Expirado'; } elseif ($row->state == "0") { $img = "publish_x.png"; $alt = 'Despublicado'; } } } $times = ''; if (isset($row->publish_up)) { if ($row->publish_up == $nullDate) { $times .= '<tr><td>Início: Sempre</td></tr>'; } else { $times .= '<tr><td>Início: ' . $row->publish_up . '</td></tr>'; } } if (isset($row->publish_down)) { if ($row->publish_down == $nullDate) { $times .= '<tr><td>Fim: Não Expira</td></tr>'; } else { $times .= '<tr><td>Fim: ' . $row->publish_down . '</td></tr>'; } } $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); if ($acl->acl_check('administration', 'manage', 'users', $my->usertype, 'components', 'com_users')) { if ($row->created_by_alias) { $author = $row->created_by_alias; } else { $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id=' . $row->created_by; $author = '<a href="' . $linkA . '" title="Editar Usuário">' . $row->author . '</a>'; } } else { if ($row->created_by_alias) { $author = $row->created_by_alias; } else { $author = $row->author; } } ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->title; } else { ?> <a href="<?php echo $link; ?> " title="Editar Conteúdo"> <?php echo $row->title; ?> </a> <?php } ?> </td> <?php if ($times) { ?> <td align="center"> <a href="javascript: void(0);" onmouseover="return overlib('<table><?php echo $times; ?> </table>', CAPTION, 'Informações da Publicação', BELOW, RIGHT);" onMouseOut="return nd();" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $row->state ? "despublicar" : "publicar"; ?> ')"> <img src="images/<?php echo $img; ?> " width="12" height="12" border="0" alt="<?php echo $alt; ?> " /> </a> </td> <?php } ?> <td> <?php echo $pageNav->orderUpIcon($i); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->fpordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td> <a href="<?php echo $row->sect_link; ?> " title="Editar Seção"> <?php echo $row->sect_name; ?> </a> </td> <td> <a href="<?php echo $row->cat_link; ?> " title="Editar Categoria"> <?php echo $row->name; ?> </a> </td> <td> <?php echo $author; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); mosCommonHTML::ContentLegend(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
public static function showPolls(&$rows, &$pageNav, $option) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th>Poll Manager</th> </tr> </table> <table class="adminlist"> <tr> <th width="5"> # </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?> );" /> </th> <th align="left"> Poll Title </th> <th width="10%" align="center"> Published </th> <th width="10%" align="center"> Options </th> <th width="10%" align="center"> Lag </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_poll&task=editA&hidemainmenu=1&id=' . $row->id; $task = $row->published ? 'unpublish' : 'publish'; $img = $row->published ? 'publish_g.png' : 'publish_x.png'; $alt = $row->published ? 'Published' : 'Unpublished'; $checked = mosCommonHTML::CheckedOutProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td> <?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <a href="<?php echo $link; ?> " title="Edit Poll"> <?php echo $row->title; ?> </a> </td> <td align="center"> <a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $task; ?> ')"> <img src="images/<?php echo $img; ?> " width="12" height="12" border="0" alt="<?php echo $alt; ?> " /> </a> </td> <td align="center"> <?php echo $row->numoptions; ?> </td> <td align="center"> <?php echo $row->lag; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0"> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
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&task=registers'; } else { $linkme = 'index.php?option=com_registration&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; }
function import($action, $lists) { ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (form.importfile.value == "") { alert( "<?php echo addslashes(_ACA_SELECT_FILE) . ' ' . addslashes(_ACA_MENU_IMPORT) . '!'; ?> " ); } else { submitform(pressbutton); } } </script> <form action="index2.php?option=com_acajoom&act=<?php echo $action; ?> &listid=<?php echo $listId; ?> " method="post" name="adminForm" enctype="multipart/form-data" > <input type="hidden" name="task" value="" /> <table cellpadding="0" cellspacing="0" align="center" class="acajoomcss"> <tr> <th><?php echo _ACA_IMPORT_TIPS; ?> </th> </tr> <tr> <td> <br /> <?php echo _ACA_SELECT_IMPORT_FILE . ' :'; ?> <input type="file" name="importfile" class="inputbox" /> </td> </tr> </table> <?php mosCommonHTML::loadOverlib(); echo '<br /><br /><table>'; echo '<tr><th colspan="2">'; echo _ACA_LIST_IMPORT; echo '</th></tr>'; $i = 0; foreach ($lists as $list) { $i++; echo '<tr><td width="40">'; echo "\n" . '<input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" />'; echo "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; echo '</td><td>'; echo "\n" . '<span class="aca_list_name onClick=\'return false;\'">' . compa::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, '#', 1) . '</span>'; echo "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="0" />'; echo '</td></tr>'; } echo '<tr><td colspan="2"><center><input type="button" value="Import" class="button" onclick="submitbutton(\'doImport\')" /></center></td></tr>'; echo '</table></form>'; }
/** * @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%"> </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) { ?> <?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 { ?> <?php } ?> </td> <?php } else { ?> <td align="center"> <?php if ($row->published == 1) { ?> <img src="images/tick.png" alt="Padrão"> <?php } else { ?> <?php } ?> </td> <td align="center"> <?php if ($row->assigned == 1) { ?> <img src="images/tick.png" alt="Atribuído" /> <?php } else { ?> <?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 }
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§ion=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 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§ion=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; ?> [ <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 }
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('&', '&', $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('&', '&', $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 }
echo T_('You must provide a character encoding.'); ?> " ); } 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(); ?>
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 }
/** * Writes a list of the defined modules * @param array An array of category objects */ function showMambots(&$rows, $client, &$pageNav, $option, &$lists, $search) { global $my; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="modules"> Administrar Plugins <small><small>[ <?php echo $client == 'admin' ? 'Administração' : 'Site'; ?> ]</small></small> </th> <td> Filtro: </td> <td> <input type="text" name="search" value="<?php echo htmlspecialchars($search); ?> " class="text_area" onChange="document.adminForm.submit();" /> </td> <td width="right"> <?php echo $lists['type']; ?> </td> </tr> </table> <table class="adminlist"> <tr> <th width="20">nº</th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th class="title"> Nome do Plugin </th> <th nowrap="nowrap" width="10%"> Publicado </th> <th colspan="2" nowrap="nowrap" width="5%"> Reordenar </th> <th width="2%"> Ordem </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count($rows) - 1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Salvar Ordem" /></a> </th> <th nowrap="nowrap" width="10%"> Acessos </th> <th nowrap="nowrap" align="left" width="10%"> Tipo </th> <th nowrap="nowrap" align="left" width="10%"> Arquivo </th> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; mosMakeHtmlSafe($row); $link = 'index2.php?option=com_mambots&client=' . $client . '&task=editA&hidemainmenu=1&id=' . $row->id; $access = mosCommonHTML::AccessProcessing($row, $i); $checked = mosCommonHTML::CheckedOutProcessing($row, $i); $published = mosCommonHTML::PublishedProcessing($row, $i); ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="right"><?php echo $pageNav->rowNumber($i); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ($row->checked_out && $row->checked_out != $my->id) { echo $row->name; } else { ?> <a href="<?php echo $link; ?> "> <?php echo $row->name; ?> </a> <?php } ?> </td> <td align="center"> <?php echo $published; ?> </td> <td> <?php echo $pageNav->orderUpIcon($i, $row->folder == @$rows[$i - 1]->folder && $row->ordering > -10000 && $row->ordering < 10000); ?> </td> <td> <?php echo $pageNav->orderDownIcon($i, $n, $row->folder == @$rows[$i + 1]->folder && $row->ordering > -10000 && $row->ordering < 10000); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access; ?> </td> <td align="left" nowrap="nowrap"> <?php echo $row->folder; ?> </td> <td align="left" nowrap="nowrap"> <?php echo $row->element; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="client" value="<?php echo $client; ?> " /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }
function 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 }
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§ion=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; ?> [ <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 }
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 }
/** * 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 }
/** * 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'] . " " . 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 }
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 showSearches(&$rows, $pageNav, $option, $task, $showResults) { global $mainframe; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminheading"> <tr> <th class="searchtext"> Texto no sistema de busca: <span class="componentheading">Status: <?php echo $mainframe->getCfg('enable_log_searches') ? '<b><font color="green">Ativado</font></b>' : '<b><font color="red">Desativado</font></b>'; ?> </span> </th> <td align="right"> <?php if (!$showResults) { echo mosWarning('Ativando isto podem reduzir a velocidade dramaticamente e até mesmo fecha seu local como é um altamente questão operação intensiva'); } ?> </td> <td align="right"> <?php if ($showResults) { ?> <input name="search_results" type="button" class="button" value="Ocultar Resultados das Pesquisas" onclick="submitbutton('searches');"> <?php } else { ?> <input name="search_results" type="button" class="button" value="Exibir Resultados das Pesquisas" onclick="submitbutton('searchesresults');"> <?php } ?> </td> </tr> </table> <table class="adminlist"> <tr> <th style="text-align:right" width="10"> nº </th> <th class="title"> Texto Pesquisado </th> <th nowrap="nowrap"> Qtd. pesquisas </th> <?php if ($showResults) { ?> <th nowrap="nowrap"> Resultados Obtidos </th> <?php } ?> </tr> <?php $k = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; ?> <tr class="row<?php echo $k; ?> "> <td align="right"> <?php echo $i + 1 + $pageNav->limitstart; ?> </td> <td align="left"> <?php echo $row->search_term; ?> </td> <td align="center"> <?php echo $row->hits; ?> </td> <?php if ($showResults) { ?> <td align="center"> <?php echo $row->returns; ?> </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="<?php echo $task; ?> " /> <input type="hidden" name="<?php echo josSpoofValue(); ?> " value="1" /> </form> <?php }