本文整理汇总了PHP中util::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP util::getVersion方法的具体用法?PHP util::getVersion怎么用?PHP util::getVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类util
的用法示例。
在下文中一共展示了util::getVersion方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: oktUpdate
#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&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: getRepositoryInfos
/**
* 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;
}
}
示例3: displayPublicAdminBar
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 : ' . $aExecInfos['execTime'] . ' s'), array('intitle' => 'Mémoire utilisée par PHP : ' . $aExecInfos['memUsage']), array('intitle' => 'Pic mémoire allouée par PHP : ' . $aExecInfos['peakUsage']), array('intitle' => 'Router lang : ' . $okt->router->getLanguage()), array('intitle' => 'Router path : ' . $okt->router->getPath()), array('intitle' => 'Router route ID : ' . $okt->router->getFindedRouteId())));
if (!empty($okt->page->module)) {
$aSecondaryAdminBar[1000]['items'][] = array('intitle' => '$okt->page->module : ' . $okt->page->module);
}
if (!empty($okt->page->action)) {
$aSecondaryAdminBar[1000]['items'][] = array('intitle' => '$okt->page->action : ' . $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) {
//.........这里部分代码省略.........
示例4:
<?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: checkList
----------------------------------------------------------*/
# 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: ArrayObject
*/
?>
</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