• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getVersion函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getVersion函数的典型用法代码示例。如果您正苦于以下问题:PHP getVersion函数的具体用法?PHP getVersion怎么用?PHP getVersion使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getVersion函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: userman_configpageinit

function userman_configpageinit($pagename)
{
    global $currentcomponent;
    global $amp_conf;
    $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
    $extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : null;
    $extension = isset($_REQUEST['extension']) ? $_REQUEST['extension'] : null;
    $tech_hardware = isset($_REQUEST['tech_hardware']) ? $_REQUEST['tech_hardware'] : null;
    if (version_compare_freepbx(getVersion(), '12.0', '<') && $pagename == 'userman') {
        $userman = setup_userman();
        $userman->doConfigPageInit($_REQUEST['display']);
    }
    // We only want to hook 'users' or 'extensions' pages.
    if ($pagename != 'users' && $pagename != 'extensions') {
        return true;
    }
    //$currentcomponent->addprocessfunc('userman_configprocess', 1);
    if ($tech_hardware != null || $extdisplay != '' || $pagename == 'users' || $action == 'add') {
        // On a 'new' user, 'tech_hardware' is set, and there's no extension. Hook into the page.
        if ($tech_hardware != null) {
            userman_applyhooks();
        } elseif ($action == 'add') {
            $currentcomponent->addprocessfunc('userman_configprocess', 1);
        } elseif ($extdisplay != '' || $pagename == 'users') {
            // We're now viewing an extension, so we need to display _and_ process.
            userman_applyhooks();
            $currentcomponent->addprocessfunc('userman_configprocess', 1);
        }
    }
}
开发者ID:umjinsun12,项目名称:dngshin,代码行数:30,代码来源:guihooks.php


示例2: checkAllUpdate

 public static function checkAllUpdate($_filter = '', $_findNewObject = true)
 {
     $findCore = false;
     $marketObject = array('logical_id' => array(), 'version' => array());
     if ($_findNewObject) {
         self::findNewUpdateObject();
     }
     $updates = self::all($_filter);
     if (is_array($updates)) {
         foreach (self::all($_filter) as $update) {
             if ($update->getType() == 'core') {
                 if ($findCore) {
                     $update->remove();
                     continue;
                 }
                 $findCore = true;
                 $update->setType('core');
                 $update->setLogicalId('jeedom');
                 if (method_exists('jeedom', 'version')) {
                     $update->setLocalVersion(jeedom::version());
                 } else {
                     $update->setLocalVersion(getVersion('jeedom'));
                 }
                 $update->save();
                 $update->checkUpdate();
             } else {
                 if ($update->getStatus() != 'hold') {
                     $marketObject['logical_id'][] = array('logicalId' => $update->getLogicalId(), 'type' => $update->getType());
                     $marketObject['version'][] = $update->getConfiguration('version', 'stable');
                     $marketObject[$update->getType() . $update->getLogicalId()] = $update;
                 }
             }
         }
     }
     if (!$findCore) {
         $update = new update();
         $update->setType('core');
         $update->setLogicalId('jeedom');
         if (method_exists('jeedom', 'version')) {
             $update->setLocalVersion(jeedom::version());
         } else {
             $update->setLocalVersion(getVersion('jeedom'));
         }
         $update->save();
         $update->checkUpdate();
     }
     $markets_infos = market::getInfo($marketObject['logical_id'], $marketObject['version']);
     foreach ($markets_infos as $logicalId => $market_info) {
         $update = $marketObject[$logicalId];
         if (is_object($update)) {
             $update->setStatus($market_info['status']);
             $update->setConfiguration('market_owner', $market_info['market_owner']);
             $update->setConfiguration('market', $market_info['market']);
             $update->setRemoteVersion($market_info['datetime']);
             $update->save();
         }
     }
     config::save('update::lastCheck', date('Y-m-d H:i:s'));
 }
开发者ID:GaelGRIFFON,项目名称:core,代码行数:59,代码来源:update.class.php


示例3: startup

 /**
  * startup
  */
 public function startup()
 {
     $this->clear();
     $this->out("<info>Welcome to baserCMS v" . getVersion() . " Console</info>");
     $this->hr();
     $this->out('App : ' . APP_DIR);
     $this->out('Path: ' . APP);
     $this->hr();
 }
开发者ID:baserproject,项目名称:basercms,代码行数:12,代码来源:BcAppShell.php


示例4: com_install

function com_install()
{
    $db =& JFactory::getDBO();
    $ver = getVersion();
    $error = false;
    $sqlDir = JPATH_ADMINISTRATOR . DS . "components" . DS . "com_webmapplus" . DS . "install" . DS;
    $sql = "";
    if ($ver == false) {
        echo "Installing clean database...";
        $sql .= file_get_contents($sqlDir . "install.sql");
    } elseif ($ver[1] == 5 || $ver[1] == 2 && $ver[2] == 5) {
        echo "N/A.<br />";
        return true;
        //Short circuit because we are already at latest version
    } else {
        echo "Upgrade Database from version " . implode('.', $ver) . "...";
        $sqlDir .= "upgrade" . DS;
        switch ($ver[1]) {
            case 0:
                $sql .= file_get_contents($sqlDir . "1.0-1.1.0-upgrade.sql");
            case 1:
                if ($ver[2] == 0 || $ver[1] == 0) {
                    $sql .= file_get_contents($sqlDir . "1.1-1.1.3-upgrade.sql");
                    $sql .= file_get_contents($sqlDir . "1.1-1.2.0-upgrade.sql");
                }
            case 2:
                if ($ver[2] >= 5) {
                } elseif ($ver[2] != 4 && $ver[2] >= 1) {
                    $sql .= file_get_contents($sqlDir . "1.2.1-1.2.4-upgrade.sql");
                } elseif ($ver[2] == 0) {
                    $sql .= file_get_contents($sqlDir . "1.2.0-1.2.1-upgrade.sql");
                    $sql .= file_get_contents($sqlDir . "1.2.1-1.2.4-upgrade.sql");
                }
                break;
        }
        $sql .= file_get_contents($sqlDir . "1.2.4-1.2.5-upgrade.sql");
    }
    $sql = preg_replace('#/\\*(.*?)\\*/#sm', '', $sql);
    $sql = $db->splitSql($sql);
    foreach ($sql as $stmt) {
        $stmt = trim($stmt);
        if ($stmt != "" && $stmt[0] != "#" && substr($stmt, 0, 2) != "--") {
            $db->setQuery($stmt);
            $result = $db->query();
            if (!$result) {
                echo "<br />" . JText::_("Install Error") . ": " . $db->ErrorMsg() . "<br />";
                $error = true;
            }
        }
    }
    echo "Done!<br /> Executed " . count($sql) . " SQL statements. <br />";
    return !$error;
}
开发者ID:notWood,项目名称:webmapplus,代码行数:53,代码来源:install.webmapplus.php


示例5: step1

function step1()
{
    $options = array('http' => array('user_agent' => $_SERVER['HTTP_USER_AGENT']));
    $context = stream_context_create($options);
    $branches = json_decode(file_get_contents('https://api.github.com/repos/Team-Quantum/QuantumCMS/branches', false, $context));
    echo '<b>Please select the branch you want to install:</b><br /><br />';
    echo '<form method="get">';
    echo '<select name="branch">';
    foreach ($branches as $branch) {
        echo '<option value="' . $branch->name . '">' . $branch->name . ' (' . getVersion($branch->commit->sha) . ')' . '</option>';
    }
    echo '</select><br /><br />';
    echo '<input type="hidden" name="step" value="2" />';
    echo '<input class="btn btn-default" type="submit" value="Download" />';
    echo '</form>';
}
开发者ID:Team-Quantum,项目名称:QuantumCMS,代码行数:16,代码来源:install.php


示例6: __construct

 /**
  * Constructor
  *
  * Initializes the boundary strings and part counters
  */
 public function __construct()
 {
     global $conf;
     $server = parse_url(DOKU_URL, PHP_URL_HOST);
     $this->partid = md5(uniqid(rand(), true)) . '@' . $server;
     $this->boundary = '----------' . md5(uniqid(rand(), true));
     $listid = join('.', array_reverse(explode('/', DOKU_BASE))) . $server;
     $listid = strtolower(trim($listid, '.'));
     $this->allowhtml = (bool) $conf['htmlmail'];
     // add some default headers for mailfiltering FS#2247
     $this->setHeader('X-Mailer', 'DokuWiki ' . getVersion());
     $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']);
     $this->setHeader('X-DokuWiki-Title', $conf['title']);
     $this->setHeader('X-DokuWiki-Server', $server);
     $this->setHeader('X-Auto-Response-Suppress', 'OOF');
     $this->setHeader('List-Id', $conf['title'] . ' <' . $listid . '>');
 }
开发者ID:nextghost,项目名称:dokuwiki,代码行数:22,代码来源:Mailer.class.php


示例7: render

 /**
  * Create output
  */
 function render($format, &$renderer, $data)
 {
     if ($format == 'xhtml') {
         //handle various info stuff
         switch ($data[0]) {
             case 'version':
                 $renderer->doc .= getVersion();
                 break;
             case 'syntaxmodes':
                 $renderer->doc .= $this->_syntaxmodes_xhtml();
                 break;
             case 'syntaxtypes':
                 $renderer->doc .= $this->_syntaxtypes_xhtml();
                 break;
             case 'syntaxplugins':
                 $this->_plugins_xhtml('syntax', $renderer);
                 break;
             case 'adminplugins':
                 $this->_plugins_xhtml('admin', $renderer);
                 break;
             case 'actionplugins':
                 $this->_plugins_xhtml('action', $renderer);
                 break;
             case 'rendererplugins':
                 $this->_plugins_xhtml('renderer', $renderer);
                 break;
             case 'helperplugins':
                 $this->_plugins_xhtml('helper', $renderer);
                 break;
             case 'helpermethods':
                 $this->_helpermethods_xhtml($renderer);
                 break;
             default:
                 $renderer->doc .= "no info about " . htmlspecialchars($data[0]);
         }
         return true;
     }
     return false;
 }
开发者ID:rezlemic,项目名称:dokuwiki-jQuery,代码行数:42,代码来源:syntax.php


示例8: getURL

function getURL($type, $version = 0)
{
    global $siteId, $token;
    $monthAgo = date('Y-m-d', strtotime('-1 month'));
    switch ($type) {
        case 'installs':
            return 'http://stats.getnightingale.com/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=' . $siteId . '&language=' . $lang . '&token_auth=' . $token . '&period=day&date=' . $monthAgo . ',today&format=JSON&segment=customVariableValue1==install';
        case 'downloads':
            return 'http://stats.getnightingale.com/?module=API&method=VisitsSummary.getVisits&idSite=2&language=' . $lang . '&token_auth=' . $token . '&period=day&date=' . $monthAgo . ',today&format=JSON&segment=visitConvertedGoalId==1';
        case 'infiniteInstalls':
            return 'http://stats.getnightingale.com/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=' . $siteId . '&language=' . $lang . '&token_auth=' . $token . '&period=day&date=2014-01-12,today&format=JSON&segment=customVariableValue1==install;customVariableValue2==' . $version;
        case 'updates':
            return 'http://stats.getnightingale.com/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=' . $siteId . '&language=' . $lang . '&token_auth=' . $token . '&period=day&date=' . $monthAgo . ',today&format=JSON&segment=customVariableValue1==upgrade';
        case 'infiniteUpdates':
            return 'http://stats.getnightingale.com/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=' . $siteId . '&language=' . $lang . '&token_auth=' . $token . '&period=day&date=2014-01-12,today&format=JSON&segment=customVariableValue1==upgrade;customVariableValue2==' . $version;
        case 'versionGraph':
            return 'http://stats.getnightingale.com/?module=API&method=CustomVariables.getCustomVariables&idSite=' . $siteId . '&language=' . $lang . '&token_auth=' . $token . '&period=day&date=' . $monthAgo . ',today&flat=1&format=JSON&filter_pattern_recursive=Version*';
        case 'osDistribution':
            return 'http://stats.getnightingale.com/?module=API&method=DevicesDetection.getOsFamilies&idSite=' . $siteId . '&language=' . $lang . '&token_auth=' . $token . '&period=range&date=2014-01-12,today&format=JSON&segment=customVariableValue2==' . getVersion();
        default:
            return '';
    }
}
开发者ID:nightingale-media-player,项目名称:nightingale-website,代码行数:23,代码来源:get_json.php


示例9: getHeader

<?php

getHeader();
Posts::handleSiteViewsStatic();
?>
    <div align="center" class="col-xs-12 col-sm-12 col-md-2 col-lg-2 col-md-offset-1 col-lg-offset-1">
        <a class="btn btn-warning btn-lg"><i class="mdi mdi-download"></i>&nbsp;Download</a>
        <span class="help-block">v.<?php 
echo getVersion();
?>
 Alpha</span>
    </div>

    <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
        <article class="post">
            <a href="submit.php"><h3 align="center" style="font-weight: bold;">Submit Page</h3></a>
            <p>You have been redirected here from a submit form in our website.</p>
            <span>Please confirm that you want to complete the action.</span><br><br>
            <span>Action: <?php 
echo 'action';
?>
</span>
            <br><br>
        </article>
    </div>
<?php 
getFooter();
开发者ID:VSG24,项目名称:ccms,代码行数:27,代码来源:submit.php


示例10: getVersion

            $pattern = $filename;
        }
    }
} else {
    $indir = INSTALLDIR;
}
function getVersion()
{
    // define('GNUSOCIAL_VERSION', '0.9.1');
    $source = file_get_contents(INSTALLDIR . '/lib/common.php');
    if (preg_match('/^\\s*define\\s*\\(\\s*[\'"]GNUSOCIAL_VERSION[\'"]\\s*,\\s*[\'"](.*)[\'"]\\s*\\)\\s*;/m', $source, $matches)) {
        return $matches[1];
    }
    return 'unknown';
}
$replacements = array('%%version%%' => getVersion(), '%%indir%%' => $indir, '%%pattern%%' => $pattern, '%%outdir%%' => $outdir, '%%htmlout%%' => $outdir, '%%exclude%%' => $exclude);
var_dump($replacements);
$template = file_get_contents(dirname(__FILE__) . '/doxygen.tmpl');
$template = strtr($template, $replacements);
$templateFile = tempnam(sys_get_temp_dir(), 'statusnet-doxygen');
file_put_contents($templateFile, $template);
$cmd = "doxygen " . escapeshellarg($templateFile);
$retval = 0;
passthru($cmd, $retval);
if ($retval == 0) {
    echo "Done!\n";
    unlink($templateFile);
    exit(0);
} else {
    echo "Failed! Doxygen config left in {$templateFile}\n";
    exit($retval);
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:31,代码来源:docgen.php


示例11: getPluginInfo

 /**
  * プラグイン情報を取得する
  *
  * @param array $datas プラグインのデータ配列
  * @param string $file プラグインファイルのパス
  * @return array
  */
 public function getPluginInfo($datas, $file)
 {
     $plugin = basename($file);
     $pluginData = array();
     $exists = false;
     foreach ($datas as $data) {
         if ($plugin == $data['Plugin']['name']) {
             $pluginData = $data;
             $exists = true;
             break;
         }
     }
     // プラグインのバージョンを取得
     $corePlugins = Configure::read('BcApp.corePlugins');
     $core = false;
     if (in_array($plugin, $corePlugins)) {
         $core = true;
         $version = getVersion();
     } else {
         $version = getVersion($plugin);
     }
     // 設定ファイル読み込み
     $title = $description = $author = $url = $adminLink = '';
     // TODO 互換性のため古いパスも対応
     $oldAppConfigPath = $file . DS . 'Config' . DS . 'config.php';
     $appConfigPath = $file . DS . 'config.php';
     if (!file_exists($appConfigPath)) {
         $appConfigPath = $oldAppConfigPath;
     }
     if (file_exists($appConfigPath)) {
         include $appConfigPath;
     } elseif (file_exists($oldAppConfigPath)) {
         include $oldAppConfigPath;
     }
     if (isset($title)) {
         $pluginData['Plugin']['title'] = $title;
     }
     if (isset($description)) {
         $pluginData['Plugin']['description'] = $description;
     }
     if (isset($author)) {
         $pluginData['Plugin']['author'] = $author;
     }
     if (isset($url)) {
         $pluginData['Plugin']['url'] = $url;
     }
     $pluginData['Plugin']['update'] = false;
     $pluginData['Plugin']['old_version'] = false;
     $pluginData['Plugin']['core'] = $core;
     if ($exists) {
         if (isset($adminLink)) {
             $pluginData['Plugin']['admin_link'] = $adminLink;
         }
         // バージョンにBaserから始まるプラグイン名が入っている場合は古いバージョン
         if (!$pluginData['Plugin']['version'] && preg_match('/^Baser[a-zA-Z]+\\s([0-9\\.]+)$/', $version, $matches)) {
             $pluginData['Plugin']['version'] = $matches[1];
             $pluginData['Plugin']['old_version'] = true;
         } elseif (verpoint($pluginData['Plugin']['version']) < verpoint($version) && !in_array($pluginData['Plugin']['name'], Configure::read('BcApp.corePlugins'))) {
             $pluginData['Plugin']['update'] = true;
         }
         $pluginData['Plugin']['registered'] = true;
     } else {
         // バージョンにBaserから始まるプラグイン名が入っている場合は古いバージョン
         if (preg_match('/^Baser[a-zA-Z]+\\s([0-9\\.]+)$/', $version, $matches)) {
             $version = $matches[1];
             $pluginData['Plugin']['old_version'] = true;
         }
         $pluginData['Plugin']['id'] = '';
         $pluginData['Plugin']['name'] = $plugin;
         $pluginData['Plugin']['created'] = '';
         $pluginData['Plugin']['version'] = $version;
         $pluginData['Plugin']['status'] = false;
         $pluginData['Plugin']['modified'] = '';
         $pluginData['Plugin']['admin_link'] = '';
         $pluginData['Plugin']['registered'] = false;
     }
     return $pluginData;
 }
开发者ID:naow9y,项目名称:basercms,代码行数:85,代码来源:Plugin.php


示例12: html_admin

/**
 * List available Administration Tasks
 *
 * @author Andreas Gohr <[email protected]>
 * @author Håkan Sandell <[email protected]>
 */
function html_admin()
{
    global $ID;
    global $INFO;
    global $conf;
    /** @var DokuWiki_Auth_Plugin $auth */
    global $auth;
    // build menu of admin functions from the plugins that handle them
    $pluginlist = plugin_list('admin');
    $menu = array();
    foreach ($pluginlist as $p) {
        /** @var DokuWiki_Admin_Plugin $obj */
        if (($obj = plugin_load('admin', $p)) === null) {
            continue;
        }
        // check permissions
        if ($obj->forAdminOnly() && !$INFO['isadmin']) {
            continue;
        }
        $menu[$p] = array('plugin' => $p, 'prompt' => $obj->getMenuText($conf['lang']), 'sort' => $obj->getMenuSort());
    }
    // data security check
    // simple check if the 'savedir' is relative and accessible when appended to DOKU_URL
    // it verifies either:
    //   'savedir' has been moved elsewhere, or
    //   has protection to prevent the webserver serving files from it
    if (substr($conf['savedir'], 0, 2) == './') {
        echo '<a style="border:none; float:right;"
                href="http://www.dokuwiki.org/security#web_access_security">
                <img src="' . DOKU_URL . $conf['savedir'] . '/security.png" alt="Your data directory seems to be protected properly."
                onerror="this.parentNode.style.display=\'none\'" /></a>';
    }
    print p_locale_xhtml('admin');
    // Admin Tasks
    if ($INFO['isadmin']) {
        ptln('<ul class="admin_tasks">');
        if ($menu['usermanager'] && $auth && $auth->canDo('getUsers')) {
            ptln('  <li class="admin_usermanager"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'usermanager')) . '">' . $menu['usermanager']['prompt'] . '</a></div></li>');
        }
        unset($menu['usermanager']);
        if ($menu['acl']) {
            ptln('  <li class="admin_acl"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'acl')) . '">' . $menu['acl']['prompt'] . '</a></div></li>');
        }
        unset($menu['acl']);
        if ($menu['extension']) {
            ptln('  <li class="admin_plugin"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'extension')) . '">' . $menu['extension']['prompt'] . '</a></div></li>');
        }
        unset($menu['extension']);
        if ($menu['config']) {
            ptln('  <li class="admin_config"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'config')) . '">' . $menu['config']['prompt'] . '</a></div></li>');
        }
        unset($menu['config']);
        if ($menu['styling']) {
            ptln('  <li class="admin_styling"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'styling')) . '">' . $menu['styling']['prompt'] . '</a></div></li>');
        }
        unset($menu['styling']);
    }
    ptln('</ul>');
    // Manager Tasks
    ptln('<ul class="admin_tasks">');
    if ($menu['revert']) {
        ptln('  <li class="admin_revert"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'revert')) . '">' . $menu['revert']['prompt'] . '</a></div></li>');
    }
    unset($menu['revert']);
    if ($menu['popularity']) {
        ptln('  <li class="admin_popularity"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'popularity')) . '">' . $menu['popularity']['prompt'] . '</a></div></li>');
    }
    unset($menu['popularity']);
    // print DokuWiki version:
    ptln('</ul>');
    echo '<div id="admin__version">';
    echo getVersion();
    echo '</div>';
    // print the rest as sorted list
    if (count($menu)) {
        // sort by name, then sort
        usort($menu, function ($a, $b) {
            $strcmp = strcasecmp($a['prompt'], $b['prompt']);
            if ($strcmp != 0) {
                return $strcmp;
            }
            if ($a['sort'] == $b['sort']) {
                return 0;
            }
            return $a['sort'] < $b['sort'] ? -1 : 1;
        });
        // output the menu
        ptln('<div class="clearer"></div>');
        print p_locale_xhtml('adminplugins');
        ptln('<ul>');
        foreach ($menu as $item) {
            if (!$item['prompt']) {
                continue;
            }
//.........这里部分代码省略.........
开发者ID:evacomaroski,项目名称:dokuwiki,代码行数:101,代码来源:html.php


示例13: _step_unpack

 /**
  * Unpack the tarball
  *
  * @return bool
  */
 private function _step_unpack()
 {
     $this->_say('<b>' . $this->getLang('pk_extract') . '</b>');
     @set_time_limit(120);
     @ignore_user_abort();
     try {
         $tar = new VerboseTar();
         $tar->open($this->tgzfile);
         $tar->extract($this->tgzdir, 1);
         $tar->close();
     } catch (Exception $e) {
         $this->_warn($e->getMessage());
         $this->_warn($this->getLang('pk_fail'));
         return false;
     }
     $this->_say($this->getLang('pk_done'));
     $this->_say($this->getLang('pk_version'), hsc(file_get_contents($this->tgzdir . '/VERSION')), getVersion());
     return true;
 }
开发者ID:Verber,项目名称:dokuwiki-plugin-upgrade,代码行数:24,代码来源:admin.php


示例14: mysql_query

            $berhasil++;
        } else {
            //echo "Error Insert data to new table";
            $gagal++;
        }
    }
    //Endwhile
    echo "<p>Horreee.. !! Data Kas berhasil di upgrade. Berhasil di transfer {$berhasil} item, Gagal di transfer {$gagal} item. Selesai</p>";
    if ($berhasil != 0) {
        $finish_query = mysql_query("DROP TABLE buku, kas, pinjaman,tempo");
        //Daffuk we
        if ($finish_query) {
            catat("SISTEM", "Berhasil Upgrade ke versi " . getVersion());
            echo "<a href='?upgrade=finish' class='btn btn-success'>Selesai >></a>";
        } else {
            echo "Unable to drop old tables, do it manualy :D<br>" . mysql_error();
        }
    }
    exit(0);
} elseif ($mode == 'finish') {
    echo "<h1>Horeee..</h1><p>Versi Libska berhasil di update, versi saat ini adalah " . getVersion() . ".<br>Silahkan hapus / rename folder upgrade pada direktori utama :D.</p>";
    echo "<a href='../index.php?upgrade=selesai' class='btn'>Kembali Ke laptop >></a>";
}
?>
            
        </div>
    </div>
</body>
</html>
<?php 
putus();
开发者ID:nsalam,项目名称:Libska,代码行数:31,代码来源:upgrade.php


示例15: getVersion

 function getVersion()
 {
     return getVersion();
 }
开发者ID:neosunchess,项目名称:dokuwiki,代码行数:4,代码来源:RemoteAPICore.php


示例16: install

 /**
  * Installs or upgrades a module from it's directory
  * Checks dependencies, and enables
  * @param string   The name of the module to install
  * @param bool     If true, skips status and dependency checks
  * @return mixed   True if succesful, array of error messages if not succesful
  */
 function install($modulename, $force = false)
 {
     $this->modDepends = array();
     $this->notFound = false;
     global $db, $amp_conf;
     set_time_limit($this->maxTimeLimit);
     $modules = $this->getinfo($modulename);
     // make sure we have a directory, to begin with
     $dir = $amp_conf['AMPWEBROOT'] . '/admin/modules/' . $modulename;
     if (!is_dir($dir)) {
         $this->notFound = true;
         return array(_("Cannot find module"));
     }
     // read the module.xml file
     $modules = $this->getinfo($modulename);
     if (!isset($modules[$modulename])) {
         return array(_("Could not read module.xml"));
     }
     // don't force this bit - we can't install a broken module (missing files)
     if ($modules[$modulename]['status'] == MODULE_STATUS_BROKEN) {
         return array(_("Module " . $modules[$modulename]['rawname'] . " is broken and cannot be installed. You should try to download it again."));
     }
     $mod = FreePBX::GPG()->verifyModule($modulename);
     $revoked = $mod['status'] & GPG::STATE_REVOKED;
     if ($revoked) {
         return array(_("Module " . $modulename . " has a revoked signature and cannot be installed"));
     }
     if (!$force) {
         if (!in_array($modules[$modulename]['status'], array(MODULE_STATUS_ENABLED, MODULE_STATUS_NOTINSTALLED, MODULE_STATUS_NEEDUPGRADE))) {
             //return array(_("This module is already installed."));
             // This isn't really an error, we just exit
             return true;
         }
         // check dependencies
         if (is_array($errors = $this->checkdepends($modules[$modulename]))) {
             return $errors;
         }
     }
     // Check if another module wants this install to be rejected
     // The module must have a callback: [modulename]_module_install_check_callback() that takes
     // a single modules array from module_getinfo() about the module to be installed
     // and it must pass back boolean true if the installation can proceed, or a message
     // indicating why the installation must fail
     //
     $rejects = array();
     //We need to include developer files before the callback happens during an install
     if (!$this->_runscripts_include($modules, 'install')) {
         return array(_("Failed to run installation scripts"));
     }
     foreach (mod_func_iterator('module_install_check_callback', $modules) as $mod => $res) {
         if ($res !== true) {
             $rejects[] = $res;
         }
     }
     if (!empty($rejects)) {
         return $rejects;
     }
     //Developer mode, remind them they need to run install_amp manually
     //run this before the install scripts below because they end up removing install.php...yup
     if ($modulename == 'framework' && !file_exists($dir . '/install.php')) {
         out(_("Framework has been detected as being in Developer mode, Please make sure to run './install_amp --update-links' manually so that any database or system settings can be updated"));
     }
     // run the scripts
     if (!$this->_runscripts($modulename, 'install', $modules)) {
         return array(_("Failed to run installation scripts"));
     }
     if ($modules[$modulename]['status'] == MODULE_STATUS_NOTINSTALLED) {
         // customize INSERT query
         $sql = "INSERT INTO modules (modulename, version, enabled) values ('" . $db->escapeSimple($modules[$modulename]['rawname']) . "','" . $db->escapeSimple($modules[$modulename]['version']) . "', 1);";
     } else {
         // just need to update the version
         $sql = "UPDATE modules SET version='" . $db->escapeSimple($modules[$modulename]['version']) . "' WHERE modulename = '" . $db->escapeSimple($modules[$modulename]['rawname']) . "'";
     }
     // run query
     $results = $db->query($sql);
     if (DB::IsError($results)) {
         return array(sprintf(_("Error updating database. Command was: %s; error was: %s "), $sql, $results->getMessage()));
     }
     // If module is framework then update the framework version
     // normally this is done inside of the funky upgrade script runner but we are changing this now as
     // framework and freepbx versions are the same
     if ($modulename == 'framework' && !empty($modules[$modulename]['version']) && getVersion() != $modules[$modulename]['version']) {
         out(sprintf(_("Framework Detected, Setting FreePBX Version to %s"), $modules[$modulename]['version']));
         $sql = "UPDATE admin SET value = '" . $db->escapeSimple($modules[$modulename]['version']) . "' WHERE variable = 'version'";
         $result = $db->query($sql);
         if (DB::IsError($result)) {
             die($result->getMessage());
         }
         if (getVersion() != $modules[$modulename]['version']) {
             die(_('Internal Error. Function getVersion did not match the Framework version, even after it was suppose to be applied'));
         }
     }
     // module is now installed & enabled, invalidate the modulelist class since it is now stale
//.........这里部分代码省略.........
开发者ID:ntadmin,项目名称:framework,代码行数:101,代码来源:modulefunctions.class.php


示例17: DisplayUpdates

function DisplayUpdates()
{
    global $LNG;
    $Patchlevel = getVersion();
    $template = new template();
    $template->loadscript('update.js');
    $template->assign_vars(array('up_submit' => $LNG['up_submit'], 'up_version' => $LNG['up_version'], 'up_revision' => $LNG['up_revision'], 'up_add' => $LNG['up_add'], 'up_edit' => $LNG['up_edit'], 'up_del' => $LNG['up_del'], 'ml_from' => $LNG['ml_from'], 'up_aktuelle_updates' => $LNG['up_aktuelle_updates'], 'up_momentane_version' => $LNG['up_momentane_version'], 'up_alte_updates' => $LNG['up_alte_updates'], 'up_download' => $LNG['up_download_patch_files'], 'version' => implode('.', $Patchlevel), 'RevList' => json_encode(GetLogs(isset($_REQUEST['history']) ? 0 : $Patchlevel[2])), 'Rev' => $Patchlevel[2], 'canDownload' => function_exists('gzcompress')));
    $template->show('UpdatePage.tpl');
}
开发者ID:Decoder1978,项目名称:Xterium,代码行数:9,代码来源:ShowUpdatePage.php


示例18: html_admin

/**
 * List available Administration Tasks
 *
 * @author Andreas Gohr <[email protected]>
 * @author Håkan Sandell <[email protected]>
 */
function html_admin()
{
    global $ID;
    global $INFO;
    global $lang;
    global $conf;
    global $auth;
    // build menu of admin functions from the plugins that handle them
    $pluginlist = plugin_list('admin');
    $menu = array();
    foreach ($pluginlist as $p) {
        if (($obj =& plugin_load('admin', $p)) === null) {
            continue;
        }
        // check permissions
        if ($obj->forAdminOnly() && !$INFO['isadmin']) {
            continue;
        }
        $menu[$p] = array('plugin' => $p, 'prompt' => $obj->getMenuText($conf['lang']), 'sort' => $obj->getMenuSort());
    }
    // data security check
    // @todo: could be checked and only displayed if $conf['savedir'] is under the web root
    echo '<a style="border:none; float:right;"
            href="http://www.dokuwiki.org/security#web_access_security">
            <img src="data/security.png" alt="Your data directory seems to be protected properly."
             onerror="this.parentNode.style.display=\'none\'" /></a>';
    print p_locale_xhtml('admin');
    // Admin Tasks
    if ($INFO['isadmin']) {
        ptln('<ul class="admin_tasks">');
        if ($menu['usermanager'] && $auth && $auth->canDo('getUsers')) {
            ptln('  <li class="admin_usermanager"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'usermanager')) . '">' . $menu['usermanager']['prompt'] . '</a></div></li>');
        }
        unset($menu['usermanager']);
        if ($menu['acl']) {
            ptln('  <li class="admin_acl"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'acl')) . '">' . $menu['acl']['prompt'] . '</a></div></li>');
        }
        unset($menu['acl']);
        if ($menu['plugin']) {
            ptln('  <li class="admin_plugin"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'plugin')) . '">' . $menu['plugin']['prompt'] . '</a></div></li>');
        }
        unset($menu['plugin']);
        if ($menu['config']) {
            ptln('  <li class="admin_config"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'config')) . '">' . $menu['config']['prompt'] . '</a></div></li>');
        }
        unset($menu['config']);
    }
    ptln('</ul>');
    // Manager Tasks
    ptln('<ul class="admin_tasks">');
    if ($menu['revert']) {
        ptln('  <li class="admin_revert"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'revert')) . '">' . $menu['revert']['prompt'] . '</a></div></li>');
    }
    unset($menu['revert']);
    if ($menu['popularity']) {
        ptln('  <li class="admin_popularity"><div class="li">' . '<a href="' . wl($ID, array('do' => 'admin', 'page' => 'popularity')) . '">' . $menu['popularity']['prompt'] . '</a></div></li>');
    }
    unset($menu['popularity']);
    // print DokuWiki version:
    ptln('</ul>');
    echo '<div id="admin__version">';
    echo getVersion();
    echo '</div>';
    // print the rest as sorted list
    if (count($menu)) {
        usort($menu, 'p_sort_modes');
        // output the menu
        ptln('<div class="clearer"></div>');
        print p_locale_xhtml('adminplugins');
        ptln('<ul>');
        foreach ($menu as $item) {
            if (!$item['prompt']) {
                continue;
            }
            ptln('  <li><div class="li"><a href="' . wl($ID, 'do=admin&amp;page=' . $item['plugin']) . '">' . $item['prompt'] . '</a></div></li>');
        }
        ptln('</ul>');
    }
}
开发者ID:nefercheprure,项目名称:dokuwiki,代码行数:85,代码来源:html.php


示例19: getVersion

    echo '<p style="text-align:center; ">';
    echo JText::_('COM_JOOMLEAGUE_DB_UPDATE_INFO_UNKNOWN_ETC') . '<br />';
    echo JText::_('COM_JOOMLEAGUE_DB_UPDATE_INFO_JUST_INFOTEXT') . '<br />';
    echo '</p>';
}
echo '<hr>';
/**/
if (getUpdatePart() == 1) {
    echo '<p>';
    echo '<h3>';
    echo '<span style="color:orange">';
    echo JText::sprintf('COM_JOOMLEAGUE_DB_UPDATE_DELETE_WARNING', '</span><b><i><a href="index.php?option=com_user&task=logout">', '</i></b></a><span style="color:orange">');
    echo '</span>';
    echo '</h3>';
    echo '</p>';
    $JLTablesVersion = getVersion();
    if ($JLTablesVersion != '' && $JLTablesVersion < '0.93') {
        echo '<span style="color:red">';
        echo JText::_('COM_JOOMLEAGUE_DB_UPDATE_ATTENTION');
        echo '<br /><br />';
        echo JText::_('You are updating from an older release of JoomLeague than 0.93!');
        echo '<br />';
        echo JText::sprintf('Actually your JoomLeague-MYSQL-Tables are ready for JoomLeague v%1$s', '<b>' . $JLTablesVersion . '</b>');
        echo '<br />';
        echo JText::_('Update may not be completely sucessfull as we require JoomLeague-MYSQL-tables according to the release 0.93!');
        echo '</span><br />';
        echo '<span style="color:green">';
        echo JText::sprintf('It would be better to update your JoomLeague installation to v0.93 b 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getVersionedPath函数代码示例发布时间:2022-05-15
下一篇:
PHP getVendorName函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap