Beispiel #1
0
<?php

$_zp_script_timer['start'] = microtime();
// force UTF-8 Ø
require_once dirname(__FILE__) . '/zp-core/global-definitions.php';
define('OFFSET_PATH', 0);
require_once ZENFOLDER . "/template-functions.php";
checkInstall();
//$_zp_script_timer['require'] = microtime();
//rss feeds
if (isset($_GET['rss']) || isset($_GET['rss-news']) || isset($_GET['rss-comments'])) {
    require_once dirname(__FILE__) . '/' . ZENFOLDER . '/functions-rss.php';
    rssHitcounter();
    startRSSCache();
    //gallery RSS
    if (isset($_GET['rss'])) {
        if (!getOption('RSS_album_image')) {
            header("HTTP/1.0 404 Not Found");
            header("Status: 404 Not Found");
            include ZENFOLDER . '/404.php';
            exit;
        }
        require_once ZENFOLDER . '/' . PLUGIN_FOLDER . "/image_album_statistics.php";
        include dirname(__FILE__) . "/" . ZENFOLDER . '/rss/rss.php';
    }
    //Zenpage News RSS
    if (isset($_GET['rss-news'])) {
        if (!getOption('RSS_articles')) {
            header("HTTP/1.0 404 Not Found");
            header("Status: 404 Not Found");
            include ZENFOLDER . '/404.php';
/**
 * Standard admin pages checks
 * @param bit $rights
 * @param string $return--where to go after login
 */
function admin_securityChecks($rights, $return)
{
    global $_zp_current_admin_obj, $_zp_loggedin;
    checkInstall();
    httpsRedirect();
    if ($_zp_current_admin_obj) {
        if ($_zp_current_admin_obj->reset) {
            $_zp_loggedin = USER_RIGHTS;
        }
    }
    if (!zp_loggedin($rights)) {
        // prevent nefarious access to this page.
        $returnurl = urldecode($return);
        if (!zp_apply_filter('admin_allow_access', false, $returnurl)) {
            $uri = explode('?', $returnurl);
            header("HTTP/1.0 302 Found");
            header("Status: 302 Found");
            header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?from=' . $uri[0]);
            exitZP();
        }
    }
}
function left_menu_header($title = _COMMUNITY_ACL_COMP_NAME, $icon = 'static')
{
    global $option;
    $task = JRequest::getCmd('task');
    $mode = JRequest::getCmd('mode');
    $db =& JFactory::getDBO();
    $config = new CACL_config($db);
    $config->load();
    if ($mode == 'manage_users' && $task != 'help') {
        $task = $mode;
    }
    //JToolBarHelper::title( $title, $icon.'.png' );
    require_once _COMMUNITY_ACL_ADMIN_HOME . '/admin.community_acl.style.php';
    $show = 0;
    if ($task == 'config' || $task == 'synchronize') {
        $show = 0;
    } elseif ($task == 'language' || $task == 'language_files' || $task == 'edit_language') {
        $show = 1;
    } elseif ($task == 'manage_users' || $task == 'assign_users' || $task == 'unassign_users') {
        $show = 2;
    } elseif ($task == 'list_sites' || $task == 'site_edit' || $task == 'site_add') {
        $show = 3;
    } elseif ($task == 'list_groups' || $task == 'group_add' || $task == 'group_edit' || $mode == 'group_id') {
        $show = 4;
        if (!$config->synchronize) {
            $show = $show - 1;
        }
    } elseif ($task == 'list_roles' || $task == 'role_add' || $task == 'role_edit' || $mode == 'role_id') {
        $show = 5;
        if (!$config->synchronize) {
            $show = $show - 1;
        }
    } elseif ($task == 'list_functions' || $task == 'function_add' || $task == 'function_edit' || $task == 'set_functions') {
        $show = 6;
        if (!$config->synchronize) {
            $show = $show - 1;
        }
    } elseif ($task == 'help' || $task == 'support' || $task == 'faq' || $task == 'changelog' || $task == '' || $task == 'about' || $task == 'disclaimer' || $task == 'hacks') {
        $show = 7;
        if (!$config->synchronize) {
            $show = $show - 1;
        }
    }
    ?>
	<style type="text/css" >
		.icon-32-refresh 			{ background-image: url(<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/administrator/templates/khepri/images/toolbar/icon-32-refresh.png); }
	</style>
	<table width="100%">
		<tr>
			<td valign="top" width="220">
			<div>
	<script type="text/javascript" src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/administrator/components/<?php 
    echo $option;
    ?>
/js/jquery.pack.js"></script>
	<script type="text/javascript">
    /* <![CDATA[ */
		jQuery.noConflict();
		Window.onDomReady(function(){
		new Accordion($$('.panel h3.jpane-toggler'),
		$$('.panel div.jpane-slider'),
		{show:<?php 
    echo $show;
    ?>
,onActive: function(toggler, i)
		{ toggler.addClass('jpane-toggler-down');
			toggler.removeClass('jpane-toggler'); },
		onBackground: function(toggler, i)
			{ toggler.addClass('jpane-toggler'); toggler.removeClass('jpane-toggler-down'); },duration: 300,opacity: false}); });
    /* ]]> */
	</script>
	<table width="202px" height="100%" cellpadding="0" cellspacing="0" >
	<tr><td style="height:7px; width:200px;background:url(<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/administrator/components/<?php 
    echo $option;
    ?>
/images/top_menu_bg.jpg) no-repeat bottom left ">
	<img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/images/blank.png" alt="" />
	</td></tr>
	<tr>
		<td style="border-left:1px solid #cccccc;border-right:1px solid #cccccc; text-align:center;" align="center"><h3 style='margin:0; padding:0; padding-bottom:5px; color:#5c82c3;font-style:italic;'><?php 
    echo _COMMUNITY_ACL_COMP_NAME;
    ?>
</h3></td>
	</tr>
	<tr>
		<td style="border-left:1px solid #cccccc;border-right:1px solid #cccccc">
		<div id="content-pane" class="pane-sliders">
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel0">
				<span><?php 
    echo JText::_('Configuration');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/config.png" alt=""/></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=config"><?php 
    echo JText::_('Configuration');
    ?>
</a>
						</td>
					</tr>
					<?php 
    #VKS - Checks to see if Sychrionization is enabled, else it hids the submenu Synchronize
    if ($config->synchronize) {
        ?>
					<tr>
						<td width="16px"><img src="<?php 
        echo substr_replace(JURI::root(), '', -1, 1);
        ?>
/includes/js/ThemeOffice/controlpanel.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
        echo $option;
        ?>
&amp;task=synchronize"><?php 
        echo JText::_('Synchronize');
        ?>
</a>
						</td>
					</tr>
					<?php 
    }
    ?>
				</table>
				</div>
			</div>
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel1">
				<span><?php 
    echo JText::_('Language management');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/language.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=language"><?php 
    echo JText::_('List of languages');
    ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div>
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel2">
				<span><?php 
    echo JText::_('Users management');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/users.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;mode=manage_users"><?php 
    echo JText::_('User Manager');
    ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div>
			<?php 
    if ($config->synchronize) {
        ?>
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel3">
				<span><?php 
        echo JText::_('Sites management');
        ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
        echo substr_replace(JURI::root(), '', -1, 1);
        ?>
/includes/js/ThemeOffice/globe1.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
        echo $option;
        ?>
&amp;task=list_sites"><?php 
        echo JText::_('Sites management');
        ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div>
			<?php 
    }
    ?>
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel4">
				<span><?php 
    echo JText::_('Groups');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/content.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=list_groups"><?php 
    echo JText::_('List of groups');
    ?>
</a>
						</td>
					</tr>
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/add_section.png" alt="" /></td>
						<td class="title">
				<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=group_add"><?php 
    echo JText::_('New group');
    ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div>
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel5">
				<span><?php 
    echo JText::_('Roles');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/content.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=list_roles"><?php 
    echo JText::_('List of roles');
    ?>
</a>
						</td>
					</tr>
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/add_section.png" alt="" /></td>
						<td class="title">
				<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=role_add"><?php 
    echo JText::_('New role');
    ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div>
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel6">
				<span><?php 
    echo JText::_('Functions');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/content.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=list_functions"><?php 
    echo JText::_('List of functions');
    ?>
</a>
						</td>
					</tr>
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/add_section.png" alt="" /></td>
						<td class="title">
				<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=function_add"><?php 
    echo JText::_('New functions');
    ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div>
			<!--// <div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel7">
					<span><?php 
    echo JText::_('Hacks');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/document.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=hacks"><?php 
    echo JText::_('Hack');
    ?>
</a>
						</td>
					</tr>
				</table>
				</div>
			</div> //-->
			<div class="panel">
				<h3 class="jpane-toggler title" id="cpanel-panel8">
					<span><?php 
    echo JText::_('Help');
    ?>
</span>
				</h3>
				<div class="jpane-slider content">
				<table class="adminlist">
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/credits.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=about"><?php 
    echo JText::_('About');
    ?>
</a>
						</td>
					</tr>
					<?php 
    if (checkInstall() == false) {
        //Kobby Sam: hides the Patch menu when install is complete
        ?>
					<tr>
						<td width="16px"><img src="<?php 
        echo substr_replace(JURI::root(), '', -1, 1);
        ?>
/includes/js/ThemeOffice/document.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
        echo $option;
        ?>
&amp;task=hacks"><?php 
        echo JText::_('Patch');
        ?>
</a>
						</td>
					</tr>
					<?php 
    }
    ?>
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/document.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=disclaimer"><?php 
    echo JText::_('License');
    ?>
</a>
						</td>
					</tr>
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/help.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="index.php?option=<?php 
    echo $option;
    ?>
&amp;task=help"><?php 
    echo JText::_('Help');
    ?>
</a>
						</td>
					</tr>
					<tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/help.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="http://support.corephp.com/index.php?_m=knowledgebase&amp;_a=view&amp;parentcategoryid=2&amp;pcid=0&amp;nav=0" target="_blank" ><?php 
    echo JText::_('F.A.Q.');
    ?>
</a>
						</td>
					</tr>
					<!-- <tr>
						<td width="16px"><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/includes/js/ThemeOffice/help.png" alt="" /></td>
						<td class="title">
							<a class="menu_link" href="http://support.corephp.com" target="_blank"><?php 
    echo JText::_('Support');
    ?>
</a>
						</td>
					</tr> -->
				</table>
				</div>
			</div>
			<em></em><div class="clr"></div>
		</div>
	</td>
	</tr>
	<tr><td style="height:8px; width:200px;background:url(<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/administrator/components/<?php 
    echo $option;
    ?>
/images/bottom_menu_bg.jpg) no-repeat top left ">
		<br /><img src="<?php 
    echo substr_replace(JURI::root(), '', -1, 1);
    ?>
/images/blank.png" alt="" />
	</td></tr>
</table>
</div>
			</td>
			<td valign="top">
	<?php 
}
</option>
							<option value="ca">català</option>
							<option value="en">english</option>
							<option value="es">español</option>
							<option value="fr">fran&ccedil;ais</option>
							<option value="pt">portug&uuml;&eacute;s</option>				    </select>
				  </div>
				</div>

				</fieldset>
				</form>


		<div class="clear">
		<?php 
echo checkInstall($lang);
?>
		</div>


</div><!-- /.container -->
<div class="push"></div>
<!-- ###### Footer ###### -->
<div id="footer" class="footer">
      <div class="container">
		<a href="http://www.vocabularyserver.com/" title="TemaTres: vocabulary server"><img src="<?php 
echo T3_WEBPATH;
?>
/images/tematres-logo.gif"  alt="TemaTres"/></a>
		<strong><?php 
echo LABEL_Version;
/**
 * Standard admin pages checks
 * @param bit $rights
 * @param string $return--where to go after login
 */
function admin_securityChecks($rights, $return)
{
    global $_zp_current_admin_obj, $_zp_loggedin, $_zp_reset_admin;
    checkInstall();
    if (SERVER_PROTOCOL == 'https_admin') {
        // force https login
        if (!isset($_SERVER["HTTPS"])) {
            $redirect = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
            header("Location:{$redirect}");
            exit;
        }
    }
    if (!$_zp_reset_admin) {
        if (!zp_loggedin($rights)) {
            // prevent nefarious access to this page.
            $returnurl = urldecode($return);
            if (!zp_apply_filter('admin_allow_access', false, $returnurl)) {
                header("HTTP/1.0 302 Found");
                header("Status: 302 Found");
                header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?from=' . $return);
                exit;
            }
        }
    }
}