Location: PHPKode > projects > injooosm > administrator/components/com_injooosm/views/config/tmpl/default.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: default.php 2010-01-30 14:03:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage backend
 * @license GNU/GPL
 * @filesource
 *
 */

defined('_JEXEC') or die('Restricted access');

// toolbar
JToolBarHelper::title(JText::_('OSM_CONFIG'), 'generic.png');
JToolBarHelper::back($alt= 'Back', $href= 'javascript:history.back();');
JToolBarHelper::save('saveconfig', 'Save', 'save.png' );

jimport('joomla.html.pane');
JHTML::_('behavior.tooltip');
?>
<form action="" method="post" name="adminForm" id="adminForm" class="adminForm">
    <?php
	$tabs	=& JPane::getInstance('tabs');

// Hauptkonfiguration BEGIN
	echo $tabs->startPane('configuration');
	echo $tabs->startPanel(JText::_('OSM_MAINCONF'), 'mainconfig');
    ?>
    <table class="admintable">
	<tbody>
	    <tr>
		<td><?php echo (JText::_( 'OSM_MAPSERVICE' ));?>
		</td>
		<td>
<?php

if((!$this->config->apikey) AND ($this->config->map == "google")) {
	echo ("    <div style=\"color: #c00; background: #E6C0C0 url(templates/khepri/images/notice-alert.png) 4px top no-repeat; border-top: 3px solid #DE7A7B; border-bottom: 3px solid #DE7A7B; padding:10px; font-size:1.2em; font-weight:bold;\">\n");
echo ("                    <div style=\"padding-left:50px\">\n");
}
echo ("<select name=\"map\" size=\"3\">
                            <option value=\"disabled\" ");
if($this->config->map == "disabled")
	echo ("selected=selected");
echo (">".JText::_('OSM_NOSERVICE')."</option>
                            <option value=\"google\" ");
if($this->config->map == "google")
	echo ("selected=selected");
echo (">".JText::_('OSM_MAPGOOGLE')."</option>
                            <option value=\"osm\" ");
if($this->config->map == "osm")
	echo ("selected=selected");
echo (">".JText::_('OSM_MAPOSM')."</option>
                    </select>\n");
if((!$this->config->apikey) AND ($this->config->map == "google")) {
	echo ("</div><br /><div align=\"center\">".JText::_('OSM_NO_APIKEY')."</div>\n");

	echo ("</div>");}

?>
		</td>
            </tr>
        <tr>
                <td><?php echo JText::_( 'OSM_IMAGETYPES' ); ?></td>
                <td><input type="text" name="type" value="<?php echo $this->config->type; ?>" size="30" /></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_SIZE_DESC'); ?>"><?php echo JText::_( 'OSM_IMAGESIZE' ); ?></span></td>
                <td><input type="text" name="max_size" value="<?php echo $this->config->max_size; ?>" size="20" /></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_GID_DESC'); ?>"><?php echo JText::_('OSM_USERS'); ?></span></td>
                <td><?php echo $this->lists['gid']; ?></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_ACCESS'); ?>"><?php echo JText::_('OSM_ACCESS'); ?></span></td>
                <td><?php echo $this->lists['access']; ?></td>
            </tr>
            <tr>
                <td colspan="2"><b><?php echo JText::_('OSM_TERMS'); ?></b></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_TERMS_USE'); ?>"><?php echo JText::_('OSM_TERMS_USE'); ?></span></td>
                <td>
                    <select name="terms" size="2">
                            <option value="1" <?php if($this->config->terms == "1") echo "selected=selected"; ?> ><?php echo JText::_('yes'); ?></option>
                            <option value="0" <?php if($this->config->terms == "0") echo "selected=selected"; ?> ><?php echo JText::_('no'); ?></option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_TERMS'); ?>"><?php echo JText::_('OSM_TERMS'); ?></span></td>
                <td><?php echo $this->lists['content']; ?></td>
            </tr>
            <tr>
                <td colspan="2"><b><?php echo JText::_('OSM_INTEGRATION'); ?></b></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_PROFILEEXT'); ?>"><?php echo JText::_('OSM_PROFILEEXT'); ?></span></td>
                <td>
                    <select name="profile" size="1">
                            <option value="0" <?php if($this->config->profile == "0") echo "selected=selected"; ?> ><?php echo JText::_('OSM_NO_PROFILE'); ?></option>
                            <option value="cb" <?php if($this->config->profile == "cb") echo "selected=selected"; ?> >Community Builder</option>
                            <option value="js" <?php if($this->config->profile == "js") echo "selected=selected"; ?> >JomSocial</option>
                            <option value="ku" <?php if($this->config->profile == "ku") echo "selected=selected"; ?> >Kunena</option>
                    </select>
                </td>
            </tr>
        </tbody>
    </table>
    <?php
	echo $tabs->endPanel();
// Hauptkonfiguration END

// Googlekonfiguration BEGIN
	if($this->config->map == "google") {
		echo $tabs->startPanel(JText::_('OSM_GOOGLECONF'), 'mainconfig');
    ?>
    <table class="admintable">
        <tbody>
            <tr<?php
if(!$this->config->apikey)
	echo (" bgcolor=\"#FFD0D0\"");
?>>
                <td><?php echo JText::_( 'OSM_GOOGLE_API_CODE' ); ?></td>
                <td><input type="text" name="apikey" value="<?php echo $this->config->apikey; ?>" size="60" /></td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_MAP_TYPE'); ?></td>
                <td><select name="map_type">
                        <option value=""><?php echo JText::_('OSM_SELECT'); ?></option>
                        <option value="0" <?php if($this->config->map_type == 0): echo "selected='selected'"; endif; ?> ><?php echo JText::_('OSM_STANDARDMAP'); ?></option>
                        <option value="1" <?php if($this->config->map_type == 1): echo "selected='selected'"; endif; ?> ><?php echo JText::_('OSM_SATELITEMAP'); ?></option>
                        <option value="2" <?php if($this->config->map_type == 2): echo "selected='selected'"; endif; ?> ><?php echo JText::_('OSM_HYBRIDMAP'); ?></option>
                        <option value="3" <?php if($this->config->map_type == 3): echo "selected='selected'"; endif; ?> ><?php echo JText::_('OSM_PHYSICALMAP'); ?></option>
                    </select></td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_UNIT'); ?></td>
                <td><?php echo $this->lists['unit']; ?></td>
            </tr>
        </tbody>
    </table>
    <?php
}
    echo $tabs->endPanel();
// Googlekonfiguration END

// OSMkonfiguration BEGIN
{
if($this->config->map == "osm") {
	$osm_allow_map = $this->config->osm_allow_map;
	$osm_allow_map_default		= $osm_allow_map[9];
	echo $tabs->startPanel(JText::_('OSM_OSMCONF'), 'mainconfig');

    ?>
    <table class="admintable">
        <tbody>
        <tr>
		<td colspan="3"><b><?php echo JText::_('OSM_MAP_LAYER'); ?></b></td>
        </tr>
<?php
// ToDo: Hillshade einbinden: http://www.osm-wms.de/
// nasaglobalmosaic tot?
	$available_osm_maps = array(
		"mapnik",
		"osmarender",
		"cyclemap",
 		"nasaglobalmosaic",
	);
	$i=0;
	foreach ($available_osm_maps as $map) {
		${"osm_allow_map_".$i} = $osm_allow_map[$i];
?>
            <tr>
                <td><?php echo JText::_('OSM_ALLOW_OSM_'.strtoupper($map)); ?></td><td>
                    <select name="osm_allow_map_<?php echo ($i); ?>" size="2">
                            <option value="1" <?php if(${"osm_allow_map_".$i} == "1") echo "selected=selected"; ?> ><?php echo JText::_('yes'); ?></option>
                            <option value="0" <?php if(${"osm_allow_map_".$i} == "0") echo "selected=selected"; ?> ><?php echo JText::_('no'); ?></option>
                    </select>
		</td>
		<td><?php echo JText::_('OSM_INFO_OSM_'.strtoupper($map)); ?></td>
            </tr>
<?php		$i++;
	}
?>
            <tr>
                <td><?php echo JText::_('OSM_ALLOW_OSM_DEFAULT'); ?></td>
                <td><?php echo $this->lists['osm_default_map']; ?></td>
		<td><?php echo JText::_('OSM_INFO_OSM_DEFAULT'); ?></td>
            </tr>
<!--            <tr>
		<td colspan="3">
			<h2>
				<?php // echo JText::_(''); ?>
			</h2>
		</td>
            </tr>-->
        </tbody>
    </table>
    <?php
	echo $tabs->endPanel();
}
}
// OSMkonfiguration END

// Anzeigeoptionen BEGIN
    echo $tabs->startPanel(JText::_('OSM_DISPLAY'), 'display');
    ?>
    <table class="admintable">
        <tbody>
            <tr>
                <td><?php echo JText::_('OSM_TEMPLATE'); ?></td>
                <td><?php echo $this->lists['tmpl']; ?></td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_SORT'); ?></td>
                <td><input type="text" name="sort" value="<?php echo $this->config->sort; ?>" size="20" /></td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_MAPWIDTH'); ?></td>
                <td><input type="text" name="map_width" value="<?php echo $this->config->map_width; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_MAPHEIGHT'); ?></td>
                <td><input type="text" name="map_height" value="<?php echo $this->config->map_height; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td colspan="2"><b><?php echo JText::_('OSM_CHARTS_PROFILE'); ?></b></td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_CHARTWIDTH'); ?></td>
                <td><input type="text" name="charts_width" value="<?php echo $this->config->charts_width; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_CHARTHEIGTH'); ?></td>
                <td><input type="text" name="charts_height" value="<?php echo $this->config->charts_height; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_CHARTLINEC'); ?></td>
                <td>#<input type="text" name="charts_linec" value="<?php echo $this->config->charts_linec; ?>" size="20" /></td>
            </tr>
            <tr>
                <td><?php echo JText::_('OSM_CHARTBG'); ?></td>
                <td>#<input type="text" name="charts_bg" value="<?php echo $this->config->charts_bg; ?>" size="20" /></td>
            </tr>
        </tbody>
    </table>
    <?php
    echo $tabs->endPanel();
// Anzeigeoptionen END

// Kommentare BEGIN
    echo $tabs->startPanel(JText::_('OSM_COMMENTS'), 'display');
    ?>
    <table class="admintable">
        <tr>
            <td valign="top"><?php echo JText::_('OSM_ACTIVATE_COMMENTS'); ?></td>
            <td><?php echo $this->lists['comments']; ?></td>
        </tr>
        <tr>
            <td valign="top"><?php echo JText::_('OSM_COMMENT_WHO'); ?></td>
            <td><?php echo $this->lists['who']; ?></td>
        </tr>
        <tr>
            <td valign="top"><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_INFORM_AUTOR'); ?>"><?php echo JText::_('OSM_INFORM_AUTOR'); ?></span></td>
            <td><?php echo $this->lists['inform']; ?></td>
        </tr>
        <tr>
            <td valign="top"><span class="hasTip" title="<?php echo JText::_('OSM_TT_TITLE'); ?> :: <?php echo JText::_('OSM_TT_CAPTCHA'); ?>"><?php echo JText::_('OSM_CAPTCHA'); ?></span></td>
            <td><?php echo $this->lists['captcha']; ?><div><?php echo JText::_('OSM_OST_CAPTCHA')." ".$this->captcha; ?></div></td>     
        </tr>
        <tr>
            <td valign="top"><?php echo JText::_('OSM_ORDERING'); ?></td>
            <td><?php echo $this->lists['order']; ?></td>
        </tr>
    </table>
    <?php
    echo $tabs->endPanel();
// Kommentare BEGIN

    echo $tabs->endPane();
    echo JHTML::_( 'form.token' );
    ?>
    <input type="hidden" name="option" value="com_injooosm" />
    <input type="hidden" name="id" value="1" />
    <input type="hidden" name="task" value="" />
</form>
Return current item: injooosm