/administrator/components/com_joomfish/admin.joomfish.html.php
PHP | 2289 lines | 1990 code | 127 blank | 172 comment | 170 complexity | 7e640c34ac6a01ed7899f76a5a2b757c MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
Large files files are truncated, but you can click here to view the full file
- <?php
- /**
- * Joom!Fish - Multi Lingual extention and translation manager for Joomla!
- * Copyright (C) 2003-2007 Think Network GmbH, Munich
- *
- * All rights reserved. The Joom!Fish project is a set of extentions for
- * the content management system Joomla!. It enables Joomla!
- * to manage multi lingual sites especially in all dynamic information
- * which are stored in the database.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
- *
- * The "GNU General Public License" (GPL) is available at
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * -----------------------------------------------------------------------------
- * $Id: admin.joomfish.html.php 749 2007-11-11 01:02:32Z apostolov $
- *
- */
- defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
- $adminPath = dirname( __FILE__);
- define('JFCPANEL_NEWS', 4);
- define('JFCPANEL_UNPUBLISHED', 2);
- define('JFCPANEL_STATE', 1);
- /**
- * Method to translate with a pre_reg function call
- *
- * @param array $matches
- * @return string
- */
- function jfTranslate($matches){
- $translation = JText::_($matches[1]);
- return $translation;
- }
- class HTML_joomfish {
- /**
- * Creates the CPanel for the Joom!Fish component
- * @param array status informations for the panel
- */
- function showCPanel( $panelStates, $contentInfo ) {
- global $act, $task, $option, $mosConfig_live_site, $mosConfig_absolute_path, $joomFishManager;
- HTML_joomfish::_header()
- ?>
- <tr>
- <td width="55%" valign="top">
- <div id="cpanel">
- <?php
- $link = 'index2.php?option=com_joomfish&task=overview&act=translate';
- HTML_joomfish::_quickiconButton( $link, 'addedit.png', JText::_('Translation') );
- $link = 'index2.php?option=com_joomfish&task=overview&act=orphans';
- HTML_joomfish::_quickiconButton( $link, 'query.png', JText::_('Orphans') );
- $link = 'index2.php?option=com_joomfish&task=overview&act=manage';
- HTML_joomfish::_quickiconButton( $link, 'menu.png', JText::_('Manage Translations') );
- $link = 'index2.php?option=com_joomfish&task=show&act=help';
- HTML_joomfish::_quickiconButton( $link, 'support.png', JText::_('HELP AND HOWTO') );
- echo '<div style="clear: both;" />';
- $link = 'index2.php?option=com_joomfish&task=show&act=config_component&hidemainmenu=1';
- HTML_joomfish::_quickiconButton( $link, 'config.png', JText::_('Configuration') );
- $link = 'index2.php?option=com_joomfish&task=show&act=config_language&hidemainmenu=1';
- HTML_joomfish::_quickiconButton( $link, 'langmanager.png', JText::_('Language Configuration') );
- $link = 'index2.php?option=com_joomfish&task=show&act=config_elements';
- HTML_joomfish::_quickiconButton( $link, 'cpanel.png', JText::_('Content elements') );
- $link = 'index2.php?option=com_joomfish&task=show&act=credits';
- HTML_joomfish::_quickiconButton( $link, 'credits.png', JText::_('About and Credits') );
- ?>
- </div>
- </td>
- <td width="45%" valign="top">
- <div style="width: 100%;">
- <?php
- // Prepare formating for the output of the state
- $stateRows = array();
- $alertState = false;
- $alertContent = false;
- foreach ($panelStates as $key => $state ) {
- if( ereg( '_state', $key ) ) {
- if( !$state ) {
- $alertState = true;
- }
- $stateHeader = substr($key, 0, strpos($key, '_'));
- $stateGroups[$stateHeader] = $panelStates[$stateHeader];
- } elseif ( ereg( 'mbf', $key )) {
- if( $state == 2 ) {
- $panelStates [ $key . '_href' ] = "";
- $panelStates[ $key . '_text' ] = JText::_('INSTAL_UPGRADED');
- } elseif($state == 1) {
- $panelStates[ $key . '_href' ] = "$mosConfig_live_site/administrator/index2.php?option=com_joomfish&task=show&act=upgrade_install&hidemainmenu=1";
- $panelStates[ $key . '_text' ] = JText::_('INSTAL_NOT_UPGRADED');
- $alertState = true;
- }
- }
- }
- if( array_key_exists('unpublished', $contentInfo) && is_array($contentInfo['unpublished']) ) {
- $alertContent = true;
- }
- $publishedTabs = $joomFishManager->getCfg('showCPanels');
- // Tabs
- $tabs = new mosTabs(1);
- $tabs->startPane( 'modules-jfcpane' );
- $tabs->startTab( JText::_('Information'), 'jfinformation' );
- $sysInfo = $panelStates['system'];
- ?>
- <table class="adminlist" border="1">
- <tr><th><JText>JOOMFISH_TITLE</JText></th></tr>
- <tr><td><?php JText::printf('INFORMATION_TEXT', $sysInfo['translations']);?></tr>
- <tr><td><?php echo JText::_('INFORMATION_SHOP');?></td></tr>
- <tr><td><p><?php JText::printf ('INFORMATION_DONATE', intval($sysInfo['translations']) *0.10);?></p>
- <div align="center">
- <iframe src="<?php echo $mosConfig_live_site;?>/administrator/components/com_joomfish/donate.php?translations=<?php echo intval($sysInfo['translations']);?>" frameborder="0" style='border:0px;height:80px;width:180px;overflow:hidden;'></iframe>
- </div>
- </td></tr>
- </table>
- <?php
- $tabs->endTab();
- if( $publishedTabs & JFCPANEL_NEWS ) {
- $tabs->startTab( JText::_('News'), 'jfnews' );
- require_once($mosConfig_absolute_path . "/includes/domit/xml_domit_rss_lite.php");
- $cacheDir = $mosConfig_absolute_path . "/cache/";
- $LitePath = $mosConfig_absolute_path . "/includes/Cache/Lite.php";
- @$rss = &new xml_domit_rss_document_lite();
- $rss->useCacheLite(true, $LitePath, $cacheDir, 86400 );
- $rss->loadRSS('http://www.joomfish.net/rss-feed/extension-news/');
- ?>
- <table class="adminlist">
- <?php
- if( $rss->getChannelCount() == 0 ) {
- ?>
- <tr>
- <th colspan="3"><JText>Joom!Fish news</JText></th>
- </tr>
- <tr>
- <td colspan="3"><JText>NEWS_INTRODUCTION</JText></td>
- </tr>
- <?php
- } else {
- $k=0;
- $channel = &$rss->getChannel(0);
- ?>
- <tr>
- <th colspan="3"><a href="<?php echo $channel->getLink() ?>" target="_blank"><?php echo $channel->getTitle()?></a></th>
- </tr>
- <tr>
- <td colspan="3"><JText>NEWS_INTRODUCTION</JText></td>
- </tr>
- <?php
- $numItems = $channel->getItemCount();
- if( !$numItems ) {
- ?>
- <tr><th><JText>No news items found</JText></th></tr><?php
- } else {
- $numItems = ($numItems > 5) ? 5 : $numItems;
- for( $j = 0; $j < $numItems; $j++ ) {
- $item = & $channel->getItem($j);?>
- <tr><td class="row<?php echo $k;?>">
- <a href="<?php echo $item->getLink()?>" target="_blank"><?php echo $item->getTitle()?></a><?php
- if( $description = HTML_joomfish::_truncateString($item->getDescription(), 500) ) {?>
- <br /><?php echo $description?><?php
- }?>
- </td></tr><?php
- }
- }
- $k = 1 - $k;
- }
- ?>
- </table>
- <?php
- $tabs->endTab();
- }
- if( $publishedTabs & JFCPANEL_UNPUBLISHED || $alertContent ) {
- $tabTitle = $alertContent==true ? '<span style="color: red; font-weight: bold;">' .JText::_('TITLE_UNPUBLISHED'). '</span>' : JText::_('TITLE_UNPUBLISHED');
- $tabs->startTab( $tabTitle, 'jfcontentstate' );
- ?>
- <table class="adminlist" border="1">
- <tr>
- <th><JText>UNPUBLISHED CONTENT ELEMENTS</JText></th>
- <th style="text-align: center;"><JText>Language</JText></th>
- <th style="text-align: center;"><JText>Publish</JText></th>
- </tr>
- <?php
- $k=0;
- if( $alertContent ) {
- $curReftable = '';
- foreach ($contentInfo['unpublished'] as $ceInfo ) {
- $contentElement = $joomFishManager->getContentElement( $ceInfo['catid'] );
- // Trap for content elements that may have been removed
- if (is_null($contentElement)){
- $name = "<span style='font-style:italic'>".JText::sprintf("CONTENT_ELEMENT_MISSING",$ceInfo["reference_table"])."</span>";
- }
- else {
- $name = $contentElement->Name;
- }
- if ($ceInfo["reference_table"] != $curReftable){
- $curReftable = $ceInfo["reference_table"];
- $k=0;
- ?>
- <tr><td colspan="3"><strong><?php echo $name;?></strong></td></tr>
- <?php
- }
- $contentObject = new ContentObject( $ceInfo['language_id'], $contentElement );
- $contentObject->loadFromContentID($ceInfo['reference_id']);
- $link = 'index2.php?option=com_joomfish&task=edit&&act=translate&&catid=' .$ceInfo['catid']. '&cid[]=0|' .$ceInfo['reference_id'].'|'.$ceInfo['language_id'];
- $hrefEdit = "<a href='".$link."'>".$contentObject->title. "</a>";
- $link = 'index2.php?option=com_joomfish&task=publish&&act=translate&&catid=' .$ceInfo['catid']. '&cid[]=0|' .$ceInfo['reference_id'].'|'.$ceInfo['language_id'];
- $hrefPublish = '<a href="'.$link.'"><img src="images/publish_x.png" width="12" height="12" border="0" alt="" /></a>';
- ?>
- <tr class="row<?php echo $k;?>">
- <td align="left"><?php echo $hrefEdit;?></td>
- <td style="text-align: center;"><?php echo $ceInfo['language'];?></td>
- <td style="text-align: center;"><?php echo $hrefPublish;?></td>
- </tr>
- <?php
- $k = 1 - $k;
- }
- } else {
- ?>
- <tr class="row0">
- <td colspan="3"><JText>No unpublished translations found</JText></td>
- </tr>
- <?php
- }
- ?>
- </table>
- <?php
- $tabs->endTab();
- }
- if( $publishedTabs & JFCPANEL_STATE || $alertState ) {
- $tabTitle = $alertState==true ? '<span style="color: red; font-weight: bold;">' .JText::_('System State'). '</span>' : JText::_('System State');
- $tabs->startTab( $tabTitle, 'jfsystemstate' );
- ?>
- <table class="adminlist">
- <?php
- foreach ($stateGroups as $key=>$stateRow) {
- ?>
- <tr>
- <th colspan="3"><JText><?php echo $key. ' state';?></JText></th>
- </tr>
- <?php
- $k=0;
- foreach ($stateRow as $row) {
- ?>
- <tr class="row<?php echo $k;?>">
- <td><?php
- if( $row->link != '' ) {
- $row->description = '<a href="' .$row->link. '">' .$row->description. '</a>';
- }
- echo $row->description;
- ?></td>
- <td colspan="2"><?php echo $row->resultText;?></td>
- <?php
- $k = 1 - $k;
- }
- }
- ?>
- <?php if( key_exists( 'mbfInstall', $panelStates ) && $panelStates['mbfInstall'] != 0 ) { ?>
- <tr>
- <th colspan="3"><JText>Translation State</JText></th>
- </tr>
- <tr class="row">
- <td><JText>Mambelfish Install</JText></td>
- <td><?php echo $panelStates['mbfInstall_text' ];?></td>
- <td><?php if( $panelStates[ 'mbfInstall_href' ] != "" ) : ?>
- <a href="<?php echo $panelStates[ 'mbfInstall_href' ];?>"><img src="<?php echo $mosConfig_live_site;?>/administrator/images/dbrestore.png" border="0" alt="<?php echo JText::_('UPGRADE_INSTALLATION');?>" /></a>
- <?php endif; ?>
- </td>
- </tr>
- <?php } ?>
- </table>
- <?php
- $tabs->endTab();
- }
- $tabs->endPane();
- ?>
- </div>
- </td>
- </tr>
- <?php
- HTML_joomfish::_JoomlaFooter( '', $act, $option );
- }
- /**
- * Method to show the component configuration
- *
- * @param object $joomfishManager
- * @param array $languageList
- */
- function showComponentConfiguration( $joomfishManager, $languageList) {
- global $act, $task, $option, $database, $mosConfig_lang, $mosConfig_live_site;
- HTML_joomfish::_JoomlaHeader( JText::_('PREF_TITLE'), 'config');
- ?>
- <tr>
- <th colspan="3"><JText>Component Configuration</JText></th>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>Component Admin Interface Language</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $frmField = mosHTML::selectList( $languageList, 'frmComponentAdminLanguage', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'componentAdminLang' ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top">
- <?php $tip = JText::_('COMPONENT_CONFIGURATION_HELP');
- echo mosToolTip( $tip );
- ?>
- </td>
- </tr>
- <tr>
- <th colspan="3"><JText>SHOWIF</JText></th>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>No Translation available</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $options[] = mosHTML::makeOption( '0', JText::_('Original content') );
- $options[] = mosHTML::makeOption( '1', JText::_('Placeholder') );
- $options[] = mosHTML::makeOption( '2', JText::_('Original with info') ); // activated mic
- $options[] = mosHTML::makeOption( '3', JText::_('Original with alt') );
- $frmField = mosHTML::selectList( $options, 'frmTranslationMode', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'noTranslation' ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top">
- <?php $tip = JText::_('NOTRANSLATION_HELP');
- echo mosToolTip( $tip );
- ?>
- </td>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>Placeholder</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <input type="text" name="frmTranslationDefaultText" size="75" value="<?php echo $joomfishManager->getCfg('defaultText');?>" />
- </td>
- <td align="left">
- <?php
- $tip = JText::_('TRANS_DEFAULT_HELP');
- echo mosToolTip( $tip );
- ?>
- </td>
- </tr>
- <tr>
- <th colspan="3"><JText>Managing translations</JText></th>
- </tr>
- <tr>
- <td width="20%" align="left" valign="top"><strong><JText>Store original version as</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $options = array();
- $options[] = mosHTML::makeOption( 'md5', JText::_( 'MD5 key only' ) );
- $options[] = mosHTML::makeOption( 'both', JText::_('MD5 key and clear text') );
- $frmField = mosHTML::selectList( $options, 'frmStorageOfOriginal', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'storageOfOriginal' ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top"> <?php
- $tip = JText::_('MNGORIGINAL_HELP');
- echo mosToolTip( $tip );
- ?>
- </td>
- </tr>
- <tr>
- <th colspan="3"><JText>Access Preferences</JText></th>
- </tr>
- <tr>
- <td width="20%" align="left" valign="top"><strong><JText>Frontend publish</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $options = array();
- $options[] = mosHTML::makeOption( '0', JText::_('Noone'));
- $options[] = mosHTML::makeOption( '1', JText::_('Publishers') );
- $frmField = mosHTML::selectList( $options, 'frmPublish', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'frontEndPublish' ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top"> <?php
- $tip = JText::_('FEPUBLISH_HELP');
- echo mosToolTip( $tip );
- ?>
- </tr>
- <tr>
- <th colspan="3"><JText>Inactive Language Preview Preference</JText></th>
- </tr>
- <tr>
- <td width="20%" align="left" valign="top"><strong><JText>Enable inactive languages for managers and above</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $options = array();
- $options[] = mosHTML::makeOption( '0', JText::_('No'));
- $options[] = mosHTML::makeOption( '1', JText::_('Yes') );
- $frmField = mosHTML::selectList( $options, 'frmFrontEndPreview', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'frontEndPreview' ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top"> <?php
- $tip = JText::_('PREVIEW_HELP');
- echo mosToolTip( $tip );
- ?>
- </tr>
- <tr>
- <th colspan="3"><JText>Control Panel Moduls</JText></th>
- </tr>
- <tr>
- <td width="20%" align="left" valign="top"><strong><JText>Which modules are active on the control panel</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $cpanelModules = $joomfishManager->getCfg( 'showCPanels' );
- ?>
- <select name="frmShowCPanels[]" class="inputbox" size="3" multiple>
- <option value="<?php echo JFCPANEL_NEWS;?>" <?php echo ($cpanelModules & JFCPANEL_NEWS) ? 'SELECTED' : '';?>><JText>News</JText></option>
- <option value="<?php echo JFCPANEL_UNPUBLISHED;?>" <?php echo ($cpanelModules & JFCPANEL_UNPUBLISHED) ? 'SELECTED' : '';?>><JText>TITLE_UNPUBLISHED</JText></option>
- <option value="<?php echo JFCPANEL_STATE;?>" <?php echo ($cpanelModules & JFCPANEL_STATE) ? 'SELECTED' : '';?>><JText>TITLE_STATE</JText></option>
- </select>
- </td>
- <td align="left" valign="top"> <?php
- $tip = JText::_('CPANEL_HELP');
- echo mosToolTip( $tip );
- ?>
- </tr>
- <tr>
- <th colspan="3"><JText>Advanced Users Only - Experimental Query Analysis Caching</JText></th>
- </tr>
- <tr>
- <td width="20%" align="left" valign="top"><strong><JText>Enable experimental query analysis caching</JText></strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $options = array();
- $options[] = mosHTML::makeOption( '0', JText::_('No'));
- $options[] = mosHTML::makeOption( '1', JText::_('Yes') );
- $frmField = mosHTML::selectList( $options, 'qacaching', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'qacaching',0 ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top"> <?php
- $tip = JText::_('QA_CACHING_HELP');
- echo mosToolTip( $tip );
- ?>
- </tr>
- <tr>
- <td width="20%" align="left" valign="top"><strong><JText>Enable query analysis logging</JText> (<a href="<?php echo $mosConfig_live_site."/administrator/components/com_joomfish/qalog.txt"?>">qalog.txt</a>)</strong></td>
- <td width="20%" align="left" valign="top">
- <?php
- $options = array();
- $options[] = mosHTML::makeOption( '0', JText::_('No'));
- $options[] = mosHTML::makeOption( '1', JText::_('Yes') );
- $frmField = mosHTML::selectList( $options, 'qalogging', 'class="inputbox" size="1"', 'value', 'text', $joomfishManager->getCfg( 'qalogging',0 ) );
- echo $frmField;
- ?>
- </td>
- <td align="left" valign="top"> <?php
- $tip = JText::_('QA_LOGGING_HELP');
- echo mosToolTip( $tip );
- ?>
- </tr>
- <?php
- HTML_joomfish::_JoomlaFooter('show', $act, $option);
- }
- /**
- * This method creates the output for the language configuration
- *
- * @param class $joomfishManager
- * @param array $languageList
- */
- function showLanguageConfiguration( $joomfishManager, $languageList) {
- global $act, $task, $option, $database, $mosConfig_lang, $mosConfig_live_site;
- HTML_joomfish::_JoomlaHeader( JText::_('Language Title'), 'langmanager' );
- ?>
- <tr>
- <td width="30%" align="left" valign="top"><strong><JText>Default Language</JText></strong></td>
- <td align="left" valign="top"><strong style="color: red;"><?php echo $mosConfig_lang;?></strong> <JText>DEFAULT_LANGUAGE_HELP</JText></td>
- </tr>
- <tr>
- <td width="30%" align="left" valign="top"><strong><JText>Component Admin Interface Language</JText></strong></td>
- <td><JText>LANGUAGE_HELP</JText></td>
- <tr>
- <td align="center" valign="top" colspan="2">
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <th class="title"> </th>
- <th class="title" width="20%" align="left"><JText>TITLE_NAME</JText>
- <?php
- $tip = JText::_('NAME_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- <th width="5%" align="left"><JText>TITLE_ACTIVE</JText></th>
- <th width="10%" nowrap="nowrap" align="left"><JText>TITLE_ISOCODE</JText>
- <?php
- $tip = JText::_('ISOCODE_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- <th width="10%" nowrap="nowrap" align="left"><JText>TITLE_SHORTCODE</JText>
- <?php
- $tip = JText::_('SHORTCODE_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- <th width="15%" nowrap="nowrap" align="left"><JText>TITLE_JOOMLA</JText></th>
- <th nowrap="nowrap" align="left"><JText>TITLE_FALLBACK</JText>
- <?php
- $tip = JText::_('FALLBACK_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- <th width="30%" nowrap="nowrap" align="left"><JText>TITLE_IMAGE</JText>
- <?php
- $tip = JText::_('IMAGES_DIR_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- <th nowrap="nowrap" align="left"><JText>TITLE_ORDER</JText>
- <?php
- $tip = JText::_('ORDER_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- <th nowrap="nowrap" align="left"><JText>TITLE_CONFIG</JText>
- <?php
- $tip = JText::_('CONFIG_HELP');
- echo mosToolTip( $tip );
- ?>
- </th>
- </tr>
- <?php
- $k=0;
- $i=0;
- reset($languageList);
- foreach ($languageList as $language ) { ?>
- <tr class="<?php echo 'row' . $k; ?>">
- <td align="center">
- <input type="hidden" name="frmLanguageID[]" value="<?php echo $language->id; ?>" />
- <?php if ( $mosConfig_lang != $language->code ) : ?>
- <input type="checkbox" name="frmLanguageDelete[]" value="<?php echo $language->id; ?>" onclick="isChecked(this.checked);" />
- <?php endif;?>
- </td>
- <td><input type="text" name="frmLanguageName[]" value="<?php echo $language->name; ?>" size="30" maxlength="100" /></td>
- <td align="center"><input type="checkbox" name="frmLanguageActive[]"<?php echo $language->active==1 ? ' checked' : ''; ?> value="<?php echo $language->id; ?>" /></td>
- <td><input type="text" name="frmLanguageISO[]" value="<?php echo $language->iso; ?>" size="10" maxlength="20" /></td>
- <td><input type="text" name="frmLanguageShortCode[]" value="<?php echo $language->shortcode; ?>" size="10" maxlength="20" /></td>
- <td><input type="text" name="frmLanguageCode[]" value="<?php echo $language->code; ?>" size="13" maxlength="20" /></td>
- <td><input type="text" name="frmLanguageFallbackCode[]" value="<?php echo $language->fallback_code; ?>" size="10" maxlength="20" /></td>
- <td nowrap="nowrap">
- <input type="text" name="frmLanguageImage[]" value="<?php echo $language->image; ?>" size="30" />
- <?php
- // new by mic
- if( !empty( $language->image ) || !empty( $language->shortcode ) ) {
- if( eregi( '/', $language->image ) ) {
- $flag_image_src = $language->image;
- }else{
- $flag_image_src = $mosConfig_live_site
- . '/components/com_joomfish/images/flags/' . $language->shortcode . '.gif';
- } ?>
-
- <img src="<?php echo $flag_image_src; ?>" alt="<?php echo $language->name; ?>" title="<?php echo $language->name; ?>" width="20" height="14" border="0" />
- <?php
- } ?>
- </td>
- <td><input type="text" name="frmLanguageOrder[]" value="<?php echo $language->ordering; ?>" size="5" maxlength="5" /></td>
- <td align="center"><input type="hidden" name="frmLanguageParams[]" value="<?php echo $language->params; ?>" />
- <a href="index2.php?option=com_joomfish&task=edit&act=translateConfig&hidemainmenu=1&lang=<?php echo $language->id;?>"><img src="<?php echo $mosConfig_live_site;?>/images/M_images/edit.png" alt="<?php echo _E_EDIT;?>" border="0" /></a></td>
- <?php
- $k = 1 - $k;
- $i++;
- }
- ?>
- </tr>
- </table>
- </td>
- </tr>
- <?php
- HTML_joomfish::_JoomlaFooter('show', $act, $option);
- }
- function showElementOverview( $joomfishManager, $pageNav ) {
- global $my, $act, $task, $database, $mosConfig_live_site;
- $filterOptions = '';
- $filterOptions .= '<td nowrap align="center">' .JText::_('DISPLAY'). ':<br/>' .$pageNav->getLimitBox(). '</td>';
- HTML_joomfish::_JoomlaHeader( JText::_('Content elements'), 'cpanel', $filterOptions );
- ?>
- </table>
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <td>
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminList">
- <tr>
- <th width="20" nowrap> </th>
- <th class="title" width="35%" align="left"><JText>TITLE_NAME</JText></th>
- <th width="15%" align="left"><JText>TITLE_AUTHOR</JText></th>
- <th width="15%" nowrap="nowrap" align="left"><JText>TITLE_VERSION</JText></th>
- <th nowrap="nowrap" align="left"><JText>TITLE_DESCRIPTION</JText></th>
- </tr>
- <?php
- $elements = $joomfishManager->getContentElements();
- $k=0;
- $i=0;
- $element_values = array_values($elements);
- for ( $i=$pageNav->limitstart; $i<$pageNav->limitstart + $pageNav->limit && $i<$pageNav->total; $i++ ) {
- $element = $element_values[$i];
- $key = $element->referenceInformation['tablename'];
- ?>
- <tr class="<?php echo "row$k"; ?>">
- <td width="20">
- <?php if ($element->checked_out && $element->checked_out != $my->id) { ?>
-
- <?php } else { ?>
- <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $key; ?>" onclick="isChecked(this.checked);" />
- <?php } ?>
- </td>
- <td>
- <a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $element->Name; ?></a>
- </td>
- <td><?php echo $element->Author ? $element->Author : ' '; ?></td>
- <td><?php echo $element->Version ? $element->Version : ' '; ?></td>
- <td><?php echo $element->Description ? $element->Description : ' '; ?></td>
- <?php
- $k = 1 - $k;
- }
- ?>
- </tr>
- <tr>
- <th align="center" colspan="5"><?php echo $pageNav->writePagesLinks(); ?></th>
- </tr>
- <tr>
- <td align="center" colspan="5"><?php echo $pageNav->writePagesCounter(); ?></td>
- </tr>
- </table>
- </td>
- </tr>
- <?php
- HTML_joomfish::_JoomlaFooter($task, 'config_elements');
- }
- function showElementConfiguration( $joomfishManager, $id ) {
- global $my, $act, $task, $database, $option, $mosConfig_live_site;
- HTML_joomfish::_JoomlaHeader( JText::_('Content elements'), 'joomfish', '', false );
- $contentElement = $joomfishManager->getContentElement( $id );
- ?>
- <table class="adminform">
- <tr>
- <td width="100%">
- <?php
- $tabs = new mosTabs(0);
- $tabs->startPane("contentelements");
- $tabs->startTab(JText::_('CONFIGURATION'),"ElementConfig-page");
- ?>
- <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminForm">
- <tr>
- <th colspan="3"><JText>General information</JText></th>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>TITLE_NAME</JText></strong></td>
- <td width="20%" align="left" valign="top"><?php echo $contentElement->Name;?></td>
- <td align="left"></td>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>TITLE_AUTHOR</JText></strong></td>
- <td width="20%" align="left" valign="top"><?php echo $contentElement->Author;?></td>
- <td align="left"></td>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>TITLE_VERSION</JText></strong></td>
- <td width="20%" align="left" valign="top"><?php echo $contentElement->Version;?></td>
- <td align="left"></td>
- </tr>
- <tr align="center" valign="middle">
- <td width="30%" align="left" valign="top"><strong><JText>TITLE_DESCRIPTION</JText></strong></td>
- <td width="20%" align="left" valign="top"><?php echo $contentElement->Description;?></td>
- <td align="left"></td>
- </tr>
- </table>
- <?php
- $tabs->endTab();
- $tabs->startTab(JText::_('DB Reference'),"ElementReference-page");
- $contentTable = $contentElement->getTable();
- ?>
- <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminForm">
- <tr>
- <th colspan="2"><JText>DATABASE_INFORMATION</JText></th>
- </tr>
- <tr align="center" valign="middle">
- <td width="15%" align="left" valign="top"><strong><JText>DATABASETABLE</JText></strong><br /><JText>DATABASETABLE_HELP</JText></td>
- <td width="60%" align="left" valign="top"><?php echo $contentTable->Name;?></td>
- </tr>
- <tr align="center" valign="middle">
- <td width="15%" align="left" valign="top"><strong><JText>DATABASEFIELDS</JText></strong><br /><JText>DATABASEFIELDS_HELP</JText></td>
- <td width="60%" align="left" valign="top">
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <th><JText>DBFIELDNAME</JText></th>
- <th><JText>DBFIELDTYPE</JText></th>
- <th><JText>DBFIELDLABLE</JText></th>
- <th><JText>TRANSLATE</JText></th>
- </tr>
- <?php
- $k=0;
- foreach( $contentTable->Fields as $tableField ) {
- ?>
- <tr class="<?php echo "row$k"; ?>">
- <td><?php echo $tableField->Name ? $tableField->Name : " ";?></td>
- <td><?php echo $tableField->Type ? $tableField->Type : " ";?></td>
- <td><?php echo $tableField->Lable ? $tableField->Lable : " ";?></td>
- <td><?php echo $tableField->Translate ? _CMN_YES : _CMN_NO;?></td>
- </tr>
- <?php
- $k=1-$k;
- }
- ?>
- </table>
- <?php
- ?>
- </td>
- </tr>
- </table>
- <?php
- $tabs->endTab();
- $tabs->startTab(JText::_('Sample data'),"ElementSamples-page");
- $contentTable = $contentElement->getTable();
- ?>
- <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminForm">
- <tr>
- <th><JText>Sample data</JText></th>
- </tr>
- <tr align="center" valign="middle">
- <td width="100%" align="center" valign="top">
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <?php
- $sqlFields = "";
- foreach( $contentTable->Fields as $tableField ) {
- if( $sqlFields!='' ) $sqlFields .= ',';
- $sqlFields .= '`' .$tableField->Name. '`';
- ?>
- <th nowrap><?php echo $tableField->Lable;?></th>
- <?php
- }
- ?>
- </tr>
- <?php
- $k=0;
- $idname = $joomfishManager->getPrimaryKey($contentTable->Name);
- $sql = "SELECT $sqlFields"
- . "\nFROM #__" .$contentTable->Name
- . "\nORDER BY $idname limit 0,10";
- $database->setQuery( $sql );
- $rows = $database->loadObjectList();
- if( $rows != null ) {
- foreach ($rows as $row) {
- ?>
- <tr class="<?php echo "row$k"; ?>">
- <?php
- foreach( $contentTable->Fields as $tableField ) {
- $fieldName = $tableField->Name;
- $fieldValue = $row->$fieldName;
- if( $tableField->Type='htmltext' ) {
- $fieldValue = htmlspecialchars( $fieldValue );
- }
- if( $fieldValue=='' ) $fieldValue=" ";
- if( strlen($fieldValue) > 97 ) {
- $fieldValue = substr( $fieldValue, 0, 100) . '...';
- }
- ?>
- <td valign="top"><?php echo $fieldValue;?></td>
- <?php
- }
- ?>
- </tr>
- <?php
- $k=1-$k;
- }
- }
- ?>
- </table>
- <?php
- ?>
- </td>
- </tr>
- </table>
- <?php
- $tabs->endTab();
- $tabs->endPane();
- ?>
- </td></tr>
- <?php
- HTML_joomfish::_JoomlaFooter('', $task, $option);
- }
- /**
- * shows the element installer dialog
- */
- function showContentElementInstaller( $cefiles=null, $message=null ) {
- global $task, $act, $option;
- HTML_joomfish::_pageHeader();
- ?>
- <form enctype="multipart/form-data" action="index2.php" method="post" name="filename">
- <table class="adminheading">
- <tr>
- <th class="install"><JText>Install</JText> <JText>Content Elements</JText></th>
- </tr>
- </table>
- <?php if( $message != null ) : ?>
- <div class="message"><?php echo $message;?></div>
- <?php endif; ?>
- <table class="adminform">
- <tr>
- <th><JText>Upload XML file</JText></th>
- </tr>
- <tr>
- <td align="left"><JText>File name</JText>:
- <input class="text_area" name="userfile" type="file" size="70"/>
- <input class="button" type="submit" value="<?php echo JText::_('Upload file and install');?>" />
- </td>
- </tr>
- </table>
- <input type="hidden" name="task" value="uploadfile"/>
- <input type="hidden" name="act" value="config_elements"/>
- <input type="hidden" name="option" value="com_joomfish"/>
- </form>
- <p> </p>
- <?php if( $cefiles != null ) { ?>
- <form action="index2.php" method="post" name="adminForm">
- <table class="adminheading">
- <tr>
- <th class="install"><JText>Content Elements</JText></th>
- </tr>
- </table>
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <th width="20" nowrap> </th>
- <th class="title" width="35%" align="left"><JText>TITLE_NAME</JText></th>
- <th width="15%" align="left"><JText>TITLE_AUTHOR</JText></th>
- <th width="15%" nowrap="nowrap" align="left"><JText>TITLE_VERSION</JText></th>
- <th nowrap="nowrap" align="left"><JText>TITLE_DESCRIPTION</JText></th>
- </tr>
- <?php
- $k=0;
- $i=0;
- foreach (array_values($cefiles) as $element ) {
- $key = $element->referenceInformation['tablename'];
- ?>
- <tr class="<?php echo "row$k"; ?>">
- <td width="20">
- <?php if ($element->checked_out && $element->checked_out != $my->id) { ?>
-
- <?php } else { ?>
- <input type="radio" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $key; ?>" onclick="isChecked(this.checked);">
- <?php } ?>
- </td>
- <td><?php echo $element->Name; ?></td>
- <td><?php echo $element->Author ? $element->Author : ' '; ?></td>
- <td><?php echo $element->Version ? $element->Version : ' '; ?></td>
- <td><?php echo $element->Description ? $element->Description : ' '; ?></td>
- </tr>
- <?php
- $k = 1 - $k;
- $i++;
- }
- } else {
- ?>
- <tr><td class="small">
- There are no custom elements installed
- </td></tr>
- <?php
- }
- ?>
- </table>
- <input type="hidden" name="task" value="" />
- <input type="hidden" name="act" value="config_elements" />
- <input type="hidden" name="boxchecked" value="0" />
- <input type="hidden" name="option" value="<?php echo $option;?>" />
- </form>
- <table width="100%" border="0">
- <tr>
- <td width="99%" align="right" valign="top">
- <?php
- $x = "@";
- $y="Support";
- $z="JoomFish.net";
- $mail=$y.$x.$z;
- ?><div align="center"><span class="smallgrey">Joom!Fish Version <?php echo JoomFishManager::getVersionFooter();?>, © 2003-2007 Copyright by <a href="http://www.ThinkNetwork.com" target="_blank" class="smallgrey">Think Network</a> under <a href="index2.php?option=com_joomfish&task=showInformation&fileCode=license" class="smallgrey">Open Source License.</a> Contact: <?php echo mosHTML::emailCloaking( $mail, 0);?></span></div>
- </td>
- </tr>
- </table>
- <?php
- HTML_joomfish::_pageFooter();
- }
- /**
- * shows the translation overview
- *
- * @param array $rows of rows within this particular overview
- * @param array $search of search parameters
- * @param object $pageNav of page navigation information
- * @param array $langlist of languages available
- * @param array $clist of content element files
- * @param array $catid of selected id's
- * @param int $language_id of the current language
- * @param array $filterlist of additional filter settings
- */
- function showTranslationOverview( $rows, $search, $pageNav, $langlist, $clist, $catid , $language_id, $filterlist=array()) {
- global $my, $act, $task, $database, $option, $mosConfig_live_site;
- $filterOptions = '<td align="right"><table><tr>';
- $filterOptions .= '<td nowrap align="center">' .JText::_('Display'). ':<br/>' .$pageNav->getLimitBox(). '</td>';
- $filterOptions .= '<td nowrap align="center">' .JText::_('Languages'). ':<br/>' .$langlist. '</td>';
- $filterOptions .= '<td nowrap align="center">' .JText::_('Content elements'). ':<br/>' .$clist. '</td>';
- $filterOptions .= '</tr></table>';
- if (isset($filterlist) && count($filterlist)>0){
- $filterOptions .= '<table><tr>';
- foreach ($filterlist as $fl){
- if (is_array($fl)) $filterOptions .= "<td nowrap align='center'>".$fl["title"].":<br/>".$fl["html"]."</td>";
- }
- $filterOptions .= '</tr></table>';
- }
- HTML_joomfish::_JoomlaHeader( JText::_('TITLE_TRANSLATION'), 'edit', $filterOptions );
- ?>
- </table>
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th>
- <th class="title" width="20%" align="left" nowrap="nowrap"><JText>TITLE</JText></th>
- <th width="10%" align="left" nowrap="nowrap"><JText>Language</JText></th>
- <th width="20%" align="left" nowrap="nowrap"><JText>TITLE_TRANSLATION</JText></th>
- <th width="15%" align="left" nowrap="nowrap"><JText>TITLE_DATECHANGED</JText></th>
- <th width="15%" nowrap="nowrap" align="center"><JText>TITLE_STATE</JText></th>
- <th align="center" nowrap="nowrap"><JText>TITLE_PUBLISHED</JText></th>
- </tr>
- <?php
- if( !isset($catid) || $catid == "" || $language_id==-1) {
- ?>
- <tr><td colspan="8"><p><JText>NOELEMENT_SELECTED</JText></p></td></tr>
- <?php
- }
- else {
- ?>
- <?php
- $k=0;
- $i=0;
- foreach ($rows as $row ) {
- ?>
- <tr class="<?php echo "row$k"; ?>">
- <td width="20">
- <?php if ($row->checked_out && $row->checked_out != $my->id) { ?>
-
- <?php } else { ?>
- <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->translation_id."|".$row->id."|".$row->language_id; ?>" onclick="isChecked(this.checked);" />
- <?php } ?>
- </td>
- <td>
- <a href="#edit" onclick="hideMainMenu(); return listItemTask('cb<?php echo $i;?>','edit');"><?php echo $row->title; ?></a>
- </td>
- <td nowrap><?php echo $row->language ? $row->language : JText::_('NOTRANSLATIONYET') ; ?></td>
- <td><?php echo $row->titleTranslation ? $row->titleTranslation : ' '; ?></td>
- <td><?php echo $row->lastchanged ? strftime("%A, %d %B %Y %H:%M",strtotime($row->lastchanged)):"";?></td>
- <?php
- switch( $row->state ) {
- case 1:
- $img = 'status_g.png';
- break;
- case 0:
- $img = 'status_y.png';
- break;
- case -1:
- default:
- $img = 'status_r.png';
- break;
- }
- ?>
- <td align="center"><img src="components/com_joomfish/images/<?php echo $img;?>" width="12" height="12" border="0" alt="" /></td>
- <?php
- if (isset($row->published) && $row->published) {
- $img = 'publish_g.png';
- } else {
- $img = 'publish_x.png';
- }
- $href='';
- if( $row->state>=0 ) {
- $href = '<a href="javascript: void(0);" ';
- $href .= 'onclick="return listItemTask(\'cb' .$i. '\',\'' .($row->published ? 'unpublish' : 'publish'). '\')">';
- $href .= '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />';
- $href .= '</a>';
- }
- else {
- $href = '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />';
- }
- ?>
- <td align="center"><?php echo $href;?></td>
- <?php
- $k = 1 - $k;
- $i++;
- }
- ?>
- </tr>
- <tr>
- <th align="center" colspan="10">
- <?php echo $pageNav->writePagesLinks(); ?></th>
- </tr>
- <tr>
- <td align="center" colspan="10"> <?php echo $pageNav->writePagesCounter(); ?></td>
- </tr>
- </table>
- <br />
- <table cellspacing="0" cellpadding="4" border="0" align="center">
- <tr align="center">
- <td> <img src="components/com_joomfish/images/status_g.png" width="12" height="12" border=0 alt="<JText>STATE_OK</JText>" />
- </td>
- <td> <JText>TRANSLATION_UPTODATE</JText> |</td>
- <td> <img src="components/com_joomfish/images/status_y.png" width="12" height="12" border=0 alt="<JText>STATE_CHANGED</JText>" />
- </td>
- <td> <JText>TRANSLATION_INCOMPLETE</JText> |</td>
- <td> <img src="components/com_joomfish/images/status_r.png" width="12" height="12" border=0 alt="<JText>STATE_NOTEXISTING</JText>" />
- </td>
- <td> <JText>TRANSLATION_NOT_EXISTING</JText></td>
- </tr>
- <tr align="center">
- <td> <img src="images/publish_g.png" width="12" height="12" border=0 alt="Translation visible" />
- </td>
- <td> <JText>TRANSLATION_PUBLISHED</JText> |</td>
- <td> <img src="images/publish_x.png" width="12" height="12" border=0 alt="Finished" />
- </td>
- <td> <JText>TRANSLATION_NOT_PUBLISHED</JText></td>
- <td>
- </td>
- <td><JText>STATE_TOGGLE</JText></td>
- </tr>
- <?php } ?>
- <?php
- HTML_joomfish::_JoomlaFooter( 'overview', $act, $option);
- }
- /**
- * shows the overview of orphan translations
- *
- * @param unknown_type $rows
- * @param unknown_type $search
- * @param unknown_type $pageNav
- * @param unknown_type $langlist
- * @param unknown_type $clist
- * @param unknown_type $catid
- * @param unknown_type $language_id
- * @param unknown_type $filterlist
- */
- function showOrphanOverview( $rows, $search, $pageNav, $langlist="", $clist, $catid , $language_id, $filterlist=array()) {
- global $my, $act, $task, $database, $option, $mosConfig_live_site;
- $filterOptions = '<td align="right"><table><tr>';
- $filterOptions .= '<td nowrap align="center">' .JText::_('DISPLAY'). ':<br/>' .$pageNav->getLimitBox(). '</td>';
- if (strlen($langlist)>0) $filterOptions .= '<td nowrap align="center">' .JText::_('Languages'). ':<br/>' .$langlist. '</td>';
- $filterOptions .= '<td nowrap align="center">' .JText::_('Content elements'). ':<br/>' .$clist. '</td>';
- $filterOptions .= '</tr></table>';
- if (isset($filterlist) && count($filterlist)>0){
- $filterOptions .= '<table><tr>';
- foreach ($filterlist as $fl){
- if (is_array($fl)) $filterOptions .= "<td nowrap align='center'>".$fl["title"].":<br/>".$fl["html"]."</td>";
- }
- $filterOptions .= '</tr></table>';
- }
- HTML_joomfish::_JoomlaHeader( JText::_('CLEANUP ORPHANS'), 'orphan', $filterOptions );
- ?>
- </table>
- <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
- <tr>
- <th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th>
- <th class="title" width="20%" align="left" nowrap="nowrap"><JText>TITLE</JText></th>
- <th width="10%" align="left" nowrap="nowrap"><JText>Language</JText></th>
- <th width="20%" align="left" nowrap="nowrap"><JText>TITLE_TRANSLATION</JText></th>
- <th width="15%" align="left" nowrap="nowrap"><JText>TITLE_DATECHANGED</JText></th>
- <th width="15%" nowrap="nowrap" align="center"><JText>TITLE_STATE</JText></th>
- <th align="center" nowrap="nowrap"><JText>TITLE_PUBLISHED</JText></th>
- </tr>
- <?php
- if( !isset($catid) || $catid == "" ) {
- ?>
- <tr><td colspan="8"><p><JText>NOELEMENT_SELECTED</JText></p></td></tr>
- <?php
- }
- else {
- ?>
- <?php
- $k=0;
- $i=0;
- foreach ($rows as $row ) {
- ?>
- <tr class="<?php echo "row$k"; ?>">
- <td width="20">
- <?php if ($row->checked_out && $row->checked_out != $my->id) { ?>
-
- <?php } else { ?>
- <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->jfc_id."|".$row->jfc_refid."|".$row->language_id; ?>" onclick="isChecked(this.checked);" />
- <?php } ?>
- </td>
- <td>
- <a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $row->title; ?></a>
- </td>
- <td nowrap><?php echo $row->language ? $row->language : JText::_('NOTRANSLATIONYET'); ?></td>
- <td><?php echo $row->titleTranslation ? $row->titleTranslation : ' '; ?></td>
- <td><?php echo $row->lastchanged ? strftime("%A, %d %B %Y %H:%M",strtotime($row->lastchanged)):"";?></td>
- <?php
- switch( $row->state ) {
- case 1:
- $img = 'status_g.png';
- break;
- case 0:
- $img = 'status_y.png';
- break;
- case -1:
- default:
- $img = 'status_r.png';
- break;
- }
- ?>
- <td align="center"><img src="components/com_joomfish/images/<?php echo $img;?>" width="12" height="12" border="0" alt="" /></td>
- <?php
- if (isset($row->published) && $row->published) {
- $img = 'publish_g.png';
- } else {
- $img = 'publish_x.png';
- }
- $href='';
- if( $row->state>=0 ) {
- $href = '<a href="javascript: void(0);" ';
- $href .= 'onclick="return listItemTask(\'cb' .$i. '\',\'' .($row->published ? 'unpublish' : 'publish'). '\')">';
- $href .= '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />';
- $href .= '</a>';
- }
- else {
- $href = '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />';
- }
- ?>
- <td align="center"><?php echo $href;?></td>
- <?php
- $k = 1 - $k;
- $i++;
- ?>
- </tr>
- <?php }?>
- <tr>
- <th align="center" colspan="10"> <?php echo $pageNav->writePagesLinks(); ?></th>
- </tr>
- <tr>
- <td align="center" colspan="10"> <?php echo $pageNav->writePagesCounter(); ?></td>
- </tr>
- </table>
- <br />
- <table cellspacing="0" cellpadding="4" border="0" align="center">
- <tr align="center">
- <td> <img src="components/com_joomfish/images/status_g.png" width="12" height="12" border=0 alt="<JText>STATE_OK</JText>" />
- </td>
- <td> <JText>TRANSLATION_UPTODATE</JText> |</td>
- <td> <img src="components/com_joomfish/images/status_y.png" width="12" height="12" border=0 alt="<JText>STATE_CHANGED</JText>" />
- </td>
- <td> <JText>TRANSLATION_INCOMPLETE</JText> |</td>
- <td> <img src="components/com_joomfish/images/status_r.png" width="12" height="12" border=0 alt="<JText>STATE_NOTEXISTING</JText>" />
- </td>
- <td> <JText>TRANSLATION_NOT_EXISTING</JText></td>
- </tr>
- <tr align="center">
- <td> <img src="images/publish_g.png" width="12" height="12" border=0 alt="Translation visible" />
- </td>
- <td> <JText>TRANSLATION_PUBLISHED</JText> |</td>
- <td> <img src="images/publish_x.png" width="12" height="12" border=0 alt="Finished" />
- </td>
- <td> <JText>TRANSLATION_NOT_PUBLISHED</JText> </td>
- <td>
- </td>
- <td> <JText>STATE_TOGGLE</JText> </td>
- </tr>
- <?php } ?>
- <?php
- HTML_joomfish::_JoomlaFooter('overview', $act, $option);
- }
- /**
- * shows the overview of the check
- *
- * @param unknown_type $rows
- * @param unknown_type $search
- * @param unknown_type $pageNav
- * @param unknown_type $langlist
- * @param unknown_type $clist
- * @param unknown_type $catid
- * @param unknown_type $language_id
- * @param unknown_type $filterlist
- */
- function showManagementOverview($type='' ) {
- global $act, $task, $option, $mosConfig_live_site;
- ?>
- <script language="javascript" type="text/javascript">
- function updateResultDiv( resultInfo, type ) {
- resultDiv = document.getElementById("manage_results");
- if( type == 'div' ) {
- resultDiv.innerHTML = resultInfo.innerHTML;
- } else {
- resultDiv.innerHTML = resultInfo;
- }
- }
- function executeCopyOriginal( toLanguage, confirmCheck, copyCat ) {
- if( toLanguage == null || toLanguage.value == -1 ) return;
- var link = 'index3.php?option=com_joomfish&task=copy&act=manage&type=original_language&phase=2';
- if( confirmCheck.checked == true ) {
- if( !window.confirm( '<?php echo JText::_('CONFIRM_COPY_TO', true);?>' ) ) return;
- link += '&overwrite=1';
- } else {
- link += '&overwrite=0';
- }
- link += '&language_id=' +toLanguage.value;
- // adding all requested catids to one string
- var catString = '';
- for(var i=0; i<copyCat.length; i++) {
- if( copyCat[i].value != null && copyCat[i].checked == true ) {
- if(catString != '') {
- catString += ',';
- }
- catString += copyCat[i].value;
- }
- }
- link += '&state_catid=' + catString;
- ajaxFrame = document.getElementById("ajaxFrame");
- ajaxFrame.contentDocument.location.href = link;
- }
- </script>
- <?php
- HTML_joomfish::_JoomlaHeader( JText::_('TITLE_Management'), 'check', '' );
- ?>
- <tr>
- <td width="35%" valign="top">
- <div id="cpanel">
- <?php
- $link = 'index3.php?option=com_joomfish&taskā¦
Large files files are truncated, but you can click here to view the full file