示例#1
0
文件: index.php 项目: jewelhuq/okatea
		#roundabout-wrapper {
			float: left;
			width: 70%;
		}
	');
}
# En-tête
require OKT_ADMIN_HEADER_FILE;
?>

<?php 
# updates notifications
if ($okt->config->update_enabled && $okt->checkPerm('is_superadmin') && is_readable(OKT_DIGESTS)) {
    $updater = new oktUpdate($okt->config->update_url, 'okatea', $okt->config->update_type, OKT_CACHE_PATH . '/versions');
    $new_v = $updater->check(util::getVersion());
    if ($updater->getNotify() && $new_v) {
        # locales
        l10n::set(OKT_LOCALES_PATH . '/' . $okt->user->language . '/admin.update');
        echo '<div id="updates-notifications"><h3>' . __('c_a_update') . '</h3>' . '<p>' . sprintf(__('c_a_update_okatea_%s_available'), $new_v) . '</p><ul>' . '<li><strong><a href="configuration.php?action=update">' . sprintf(__('c_a_update_upgrade_now'), $new_v) . '</a></strong></li>' . '<li><a href="configuration.php?action=update&amp;hide_msg=1">' . __('c_a_update_remind_later') . '</a></li></ul></div>';
    }
}
?>

<div class="ui-helper-clearfix">
	<?php 
# lecteur de flux d'actualités
if ($okt->config->news_feed['enabled'] && $feed_success) {
    ?>

	<div id="news_feed_list">
示例#2
0
 /**
  * Retourne les informations d'un dépôt de themes donné.
  *
  * @param array $repository_url
  * @return array
  */
 protected function getRepositoryInfos($repository_url)
 {
     try {
         $repository_url = str_replace('%VERSION%', util::getVersion(), $repository_url);
         $path = '';
         $client = netHttp::initClient($repository_url, $path);
         if ($client !== false) {
             $client->setTimeout(4);
             $client->setUserAgent($_SERVER['HTTP_USER_AGENT']);
             $client->get($path);
             return $this->readRepositoryInfos($client->getContent());
         }
     } catch (Exception $e) {
         return false;
     }
 }
    public static function displayPublicAdminBar($okt)
    {
        $aBasesUrl = new ArrayObject();
        $aPrimaryAdminBar = new ArrayObject();
        $aSecondaryAdminBar = new ArrayObject();
        $aBasesUrl['admin'] = $okt->config->app_path . OKT_ADMIN_DIR;
        $aBasesUrl['logout'] = $aBasesUrl['admin'] . '/index.php?logout=1';
        $aBasesUrl['profil'] = $aBasesUrl['admin'];
        # -- CORE TRIGGER : publicAdminBarBeforeDefaultsItems
        $okt->triggers->callTrigger('publicAdminBarBeforeDefaultsItems', $okt, $aPrimaryAdminBar, $aSecondaryAdminBar, $aBasesUrl);
        # éléments première barre
        $aPrimaryAdminBar[10] = array('intitle' => '<img src="' . OKT_PUBLIC_URL . '/img/notify/error.png" width="22" height="22" alt="' . __('c_c_warning') . '" />', 'items' => array());
        $aPrimaryAdminBar[100] = array('href' => $aBasesUrl['admin'], 'intitle' => __('c_c_administration'));
        $aPrimaryAdminBar[200] = array('intitle' => __('c_c_action_Add'), 'items' => array());
        # éléments seconde barre
        $aSecondaryAdminBar[100] = array('href' => $aBasesUrl['profil'], 'intitle' => sprintf(__('c_c_user_hello_%s'), html::escapeHTML(oktAuth::getUserCN($okt->user->username, $okt->user->lastname, $okt->user->firstname))));
        if (!$okt->languages->unique) {
            $iStartIdx = 150;
            foreach ($okt->languages->list as $aLanguage) {
                if ($aLanguage['code'] == $okt->user->language) {
                    continue;
                }
                $aSecondaryAdminBar[$iStartIdx++] = array('href' => html::escapeHTML($okt->config->app_path . $aLanguage['code'] . '/'), 'title' => html::escapeHTML($aLanguage['title']), 'intitle' => '<img src="' . OKT_PUBLIC_URL . '/img/flags/' . $aLanguage['img'] . '" alt="' . html::escapeHTML($aLanguage['title']) . '" />');
            }
        }
        $aSecondaryAdminBar[200] = array('href' => $aBasesUrl['logout'], 'intitle' => __('c_c_user_log_off_action'));
        # infos super-admin
        if ($okt->checkPerm('is_superadmin')) {
            # avertissement nouvelle version disponible
            if ($okt->config->update_enabled && is_readable(OKT_DIGESTS)) {
                $updater = new oktUpdate($okt->config->update_url, 'okatea', $okt->config->update_type, OKT_CACHE_PATH . '/versions');
                $new_v = $updater->check(util::getVersion());
                if ($updater->getNotify() && $new_v) {
                    # locales
                    l10n::set(OKT_LOCALES_PATH . '/' . $okt->user->language . '/admin.update');
                    $aPrimaryAdminBar[10]['items'][100] = array('href' => $aBasesUrl['admin'] . '/configuration.php?action=update', 'intitle' => sprintf(__('c_a_update_okatea_%s_available'), $new_v));
                }
            }
            # avertissement mode maintenance est activé sur la partie publique
            if ($okt->config->public_maintenance_mode) {
                $aPrimaryAdminBar[10]['items'][300] = array('href' => $aBasesUrl['admin'] . '/configuration.php?action=advanced#tab_others', 'intitle' => sprintf(__('c_a_public_maintenance_mode_enabled'), $new_v));
            }
            # avertissement mode maintenance est activé sur l'admin
            if ($okt->config->admin_maintenance_mode) {
                $aPrimaryAdminBar[10]['items'][400] = array('href' => $aBasesUrl['admin'] . '/configuration.php?action=advanced#tab_others', 'intitle' => sprintf(__('c_a_admin_maintenance_mode_enabled'), $new_v));
            }
            # info execution
            $aExecInfos = array();
            $aExecInfos['execTime'] = util::getExecutionTime();
            if (OKT_XDEBUG) {
                $aExecInfos['memUsage'] = util::l10nFileSize(xdebug_memory_usage());
                $aExecInfos['peakUsage'] = util::l10nFileSize(xdebug_peak_memory_usage());
            } else {
                $aExecInfos['memUsage'] = util::l10nFileSize(memory_get_usage());
                $aExecInfos['peakUsage'] = util::l10nFileSize(memory_get_peak_usage());
            }
            $aSecondaryAdminBar[1000] = array('title' => $aExecInfos['execTime'] . ' s - ' . $aExecInfos['memUsage'], 'intitle' => '<img src="' . OKT_PUBLIC_URL . '/img/ico/terminal.gif" width="16" height="16" alt="" />', 'items' => array(array('intitle' => 'Temps d\'execution du script&nbsp;: ' . $aExecInfos['execTime'] . ' s'), array('intitle' => 'Mémoire utilisée par PHP&nbsp;: ' . $aExecInfos['memUsage']), array('intitle' => 'Pic mémoire allouée par PHP&nbsp;: ' . $aExecInfos['peakUsage']), array('intitle' => 'Router lang&nbsp;: ' . $okt->router->getLanguage()), array('intitle' => 'Router path&nbsp;: ' . $okt->router->getPath()), array('intitle' => 'Router route ID&nbsp;: ' . $okt->router->getFindedRouteId())));
            if (!empty($okt->page->module)) {
                $aSecondaryAdminBar[1000]['items'][] = array('intitle' => '$okt->page->module&nbsp;: ' . $okt->page->module);
            }
            if (!empty($okt->page->action)) {
                $aSecondaryAdminBar[1000]['items'][] = array('intitle' => '$okt->page->action&nbsp;: ' . $okt->page->action);
            }
        }
        # -- CORE TRIGGER : publicAdminBarItems
        $okt->triggers->callTrigger('publicAdminBarItems', $okt, $aPrimaryAdminBar, $aSecondaryAdminBar, $aBasesUrl);
        # sort items of by keys
        $aPrimaryAdminBar->ksort();
        $aSecondaryAdminBar->ksort();
        # remove empty values of admins bars
        $aPrimaryAdminBar = array_filter((array) $aPrimaryAdminBar);
        $aSecondaryAdminBar = array_filter((array) $aSecondaryAdminBar);
        # reverse sedond bar items
        $aSecondaryAdminBar = array_reverse($aSecondaryAdminBar);
        $class = '';
        ?>
		<div id="oktadminbar" class="<?php 
        echo $class;
        ?>
" role="navigation">
			<a class="screen-reader-shortcut" href="#okt-toolbar" tabindex="1"><?php 
        _e('Skip to toolbar');
        ?>
			</a>
			<div class="quicklinks" id="okt-toolbar" role="navigation"
				aria-label="<?php 
        echo util::escapeAttrHTML(__('Top navigation toolbar.'));
        ?>
"
				tabindex="0">
				<ul class="ab-top-menu">
					<?php 
        foreach ($aPrimaryAdminBar as $aPrimaryItem) {
            echo self::getItems($aPrimaryItem);
        }
        ?>
				</ul>
				<ul class="ab-top-secondary ab-top-menu">
					<?php 
        foreach ($aSecondaryAdminBar as $aSecondaryItem) {
            echo self::getItems($aSecondaryItem);
        }
        ?>
				</ul>
			</div>
			<a class="screen-reader-shortcut"
				href="<?php 
        echo $aBasesUrl['logout'];
        ?>
"><?php 
        _e('c_c_user_log_off_action');
        ?>
			</a>
		</div>
		<?php 
    }
示例#4
0
<?php

/**
 * L'en-tête
 *
 * @addtogroup Okatea
 * @subpackage 		Install interface
 *
 */
$oktVersion = util::getVersion();
$oktRevision = util::getRevision();
?>
<!DOCTYPE html>
<html class="" lang="<?php 
echo $_SESSION['okt_install_language'];
?>
">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Script-Type" content="text/javascript" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
	<meta http-equiv="Content-Language" content="<?php 
echo $_SESSION['okt_install_language'];
?>
" />

	<title><?php 
_e('i_' . $_SESSION['okt_install_process_type'] . '_interface');
?>
 - Okatea <?php 
if ($oktVersion) {
示例#5
0
----------------------------------------------------------*/
# mise à jour de la base de données
if (!empty($_GET['update_db'])) {
    $oChecklist = new checkList();
    oktUpdate::dbUpdate($oChecklist);
    # log admin
    $okt->logAdmin->warning(array('code' => 21, 'message' => 'DB CORE'));
}
if (!defined('OKT_BACKUP_PATH')) {
    define('OKT_BACKUP_PATH', OKT_ROOT_PATH);
}
$digest_is_readable = is_readable(OKT_DIGESTS);
if (!$digest_is_readable && empty($_GET['update_db'])) {
    $okt->error->set(__('c_a_update_unable_read_digests'));
}
$okatea_version = util::getVersion();
$updater = new oktUpdate($okt->config->update_url, 'okatea', $okt->config->update_type, OKT_CACHE_PATH . '/versions');
$new_v = $updater->check($okatea_version);
$zip_file = $new_v ? OKT_BACKUP_PATH . '/' . basename($updater->getFileURL()) : '';
/* Traitements
----------------------------------------------------------*/
# Hide "update me" message
if (!empty($_GET['hide_msg'])) {
    $updater->setNotify(false);
    http::redirect('index.php');
}
$p_url = 'configuration.php?action=update&do_not_check=' . (!empty($_GET['do_not_check']) ? '1' : '0');
$step = isset($_GET['step']) ? $_GET['step'] : '';
$step = in_array($step, array('check', 'download', 'backup', 'unzip', 'done')) ? $step : '';
$archives = array();
foreach (files::scanDir(OKT_BACKUP_PATH) as $v) {
示例#6
0
 */
?>
	</section><!-- #content -->
</div><!-- #main -->

<nav><?php 
echo $mainMenuHtml['html'];
?>
</nav>

<?php 
# init footer content
$aFooterContent = new ArrayObject();
$aFooterContent[10] = sprintf(__('c_c_proudly_propulsed_%s'), '<a href="http://okatea.org/">Okatea</a>');
if (OKT_DEBUG) {
    $aFooterContent[20] = util::getVersion();
}
# -- CORE TRIGGER : adminFooterContent
$okt->triggers->callTrigger('adminFooterContent', $okt, $aFooterContent);
# sort items of footer content
$aFooterContent->ksort();
# remove empty values of footer content
$aFooterContent = array_filter((array) $aFooterContent);
?>
<footer>
	<p id="footer" class="clearb ui-widget ui-corner-all ui-state-default">
	<img src="<?php 
echo OKT_PUBLIC_URL;
?>
/img/ajax-loader/big-circle-ball.gif" alt="" class="preload" />
	<?php