当前位置: 首页>>代码示例>>PHP>>正文


PHP check_version函数代码示例

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


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

示例1: unhtmlentities

function unhtmlentities($string)
{
    if (check_version(PHP_VERSION, "4.3.0")) {
        return html_entity_decode($string);
    } else {
        // replace numeric entities
        $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
        $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
        // replace literal entities
        $trans_tbl = get_html_translation_table(HTML_ENTITIES);
        $trans_tbl = array_flip($trans_tbl);
        return strtr($string, $trans_tbl);
    }
}
开发者ID:utilo-web-app-development,项目名称:REZERVI,代码行数:14,代码来源:mail.inc.php

示例2: check_version

<?php 
} else {
    ?>
        <script type="text/javascript">
          //<![CDATA[
          $(document).ready(function()
          {
            $('#php_ini_list, #php_ini_header').hide();
          });
          //--]]>
        </script>
<?php 
}
if ($this->startup->site_config->allow_version_check) {
    $this->load->helper('admin/version');
    $latest_version = check_version();
    if (strcmp($latest_version, "Unknown") === 0) {
        $msg = lang("Unknown Version.");
    } else {
        $msg = $this->functions->parse_version($latest_version);
    }
    if ($this->functions->compare_version(XU_VERSION, $latest_version)) {
        ?>
        <h3><?php 
        echo lang('Upgrade Available');
        ?>
</h3>
        <span class="alert">
          <?php 
        echo lang('Important Upgrade Available');
        ?>
开发者ID:rexcarnation,项目名称:XtraUpload-1,代码行数:31,代码来源:home.php

示例3: print_header

function print_header($ctrl)
{
    check_version();
    //Check to make sure the browser is supported
    /* * * MOBILE FORMATTING AND FAVICON * * */
    $additional = "";
    //Additional things we'll be adding to the header
    //If the device is mobile...
    if (is_mobile()) {
        //...use a mobile stylesheet
        $additional .= "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"/scripts/css/mob/mobile.css\">";
    }
    //Changes favicon URL based on browser
    if (strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "safari")) {
        $additional .= "<link rel=\"SHORTCUT ICON\" href=\"/favicon.ico?v=2\" />";
    } else {
        $additional .= "<link rel=\"SHORTCUT ICON\" href=\"/favicon.ico\" />";
    }
    /* * * MAIN BANNER CONTENTS * * */
    $banner_contents = "";
    //If we aren't on the homepage..
    if (getcwd() !== $_SERVER["DOC_ROOT"]) {
        //Create a 'return home' or 'return to feed' button
        $text = "Return Home";
        //If we're logged in...
        if (isset($_SESSION["userid"])) {
            //...it'll be 'return to feed'
            $text = "Return to Feed";
        }
        //Add this to our banner
        $banner_contents .= "<div onclick=\"window.location='/';\" class=\"backbtn\">{$text}</div>";
    } else {
        //Make it the logo
        $banner_contents .= "<div id=\"logo\"><a href=\"/\"><img src=\"/img/logo.png\"></a></div>";
        //If we aren't logged in...
        if (!isset($_SESSION["userid"])) {
            //Display that text that shows how many members we have
            //Connect to MySQL
            $con = mysqli_connect(host(), username(), password(), mainDb());
            //Get the user count (not possible through API)
            $query = mysqli_query($con, "SELECT COUNT(*) AS count FROM `usr`");
            //Get the number of users
            $user_count = mysqli_fetch_array($query);
            $user_count = $user_count[0];
            $all_items = new Item(array("action" => "get"));
            $items_array = $all_items->run(true);
            $item_count = count($items_array);
            //...add it to the banner
            $banner_contents .= "<div id=\"subtxt\">Now with {$user_count} members worldwide.</div>";
            //Close the connection
            mysqli_close($con);
        }
    }
    $add_box = "";
    //If we are going to show the login/profile panel...
    if ($ctrl) {
        //If the user is logged in
        if (isset($_SESSION["userid"])) {
            //Print their control panel and search box
            $banner_contents .= get_search_box();
            $banner_contents .= get_profile_box($_SESSION["userid"]);
            //$add_box 		 .= get_add_box();
        } else {
            //Print the login box
            $banner_contents .= get_login_box();
        }
    }
    $user_menu = get_user_menu();
    /* * * MAIN HEADER * * */
    $header = <<<HEAD
\t\t\t\t\t<meta http-equiv="X-UA-Compatible" content="IE=edge" />
\t\t\t\t\t<meta name="viewport" content="width=device-width, initial-scale=1.0" />
\t\t\t\t\t<meta name="description" content="eDart is a first-of-its-kind, completely web-based, universal trading application for WPI students." /> 
\t\t\t\t\t<meta name="keywords" content="edart,beta,bartering,tradegrouper,trade,trading,tradby,college,worcester,polytechnic,institute,wpi,2013,free,online,database" /> 
\t\t\t\t\t<meta name="robots" content="index, follow" /> 
\t\t\t\t\t<meta name="Headline" content="Welcome to eDart!">
\t\t\t\t\t<meta name="CPS_SITE_NAME" content="Welcome to eDart!">
\t\t\t\t\t<meta property="og:title" content="eDart is a first-of-its-kind, completely web-based, universal trading application for WPI students."> 
\t\t\t\t\t<meta property="og:type" content="website"> 
\t\t\t\t\t<meta property="og:description" content="eDart is a first-of-its-kind, completely web-based, universal trading application for WPI students.">
\t\t\t\t\t<meta property="og:site_name" content="eDart">
\t\t\t\t\t<meta charset="UTF-8">

\t\t\t\t\t<noscript>
\t\t\t\t\t\t<meta http-equiv="refresh" content="0;URL=/noscript.php">
\t\t\t\t\t</noscript>

\t\t\t\t\t<link rel="stylesheet" type="text/css" media="screen" href="/files/fonts/Vegur/stylesheet.css">
\t\t\t\t\t<link rel="stylesheet" type="text/css" media="screen" href="/files/fonts/Titillium/stylesheet.css">
\t\t\t\t\t<link rel="stylesheet" type="text/css" media="screen" href="/lib/min/?g=css">

\t\t\t\t\t<script>
\t\t\t\t\t\tdocument.cookie='';

\t\t\t\t\t\t(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
\t\t\t\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
\t\t\t\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
\t\t\t\t\t\t})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

\t\t\t\t\t\tga('create', 'UA-44057002-1', 'wewanttotrade.com');
//.........这里部分代码省略.........
开发者ID:Nickersoft,项目名称:eDart,代码行数:101,代码来源:print.php

示例4: getVersionNotification

/**
 * Get new version notification
 *
 * @return null|array
 */
function getVersionNotification()
{
    $message = null;
    $firstTimeVersionCheck = false;
    if (isset($_SESSION['first_version_check'])) {
        $firstTimeVersionCheck = true;
        unset($_SESSION['first_version_check']);
    }
    // only notify the user every 30 day.
    $data = check_version($firstTimeVersionCheck);
    $session_key = 'version_last_check';
    $lastCheckTime = isset($_SESSION[$session_key]) ? $_SESSION[$session_key] : false;
    if ($lastCheckTime && $lastCheckTime + 30 * DAY_IN_SECONDS > gmdate('U')) {
        return $message;
    }
    $_SESSION[$session_key] = gmdate('U');
    if ($data['outdated'] == true) {
        $message = ['title' => __t('version_outdated_title'), 'text' => __t('version_outdated_text_x', ['installed_version' => DIRECTUS_VERSION, 'current_version' => $data['current_version']])];
    }
    return $message;
}
开发者ID:jel-massih,项目名称:directus,代码行数:26,代码来源:index.php

示例5: check_installation

    include 'sql/updatedump.inc.php';
    for ($i = 0; $i < @count($query); $i++) {
        $db->direct_query($query[$i]);
        echo '<b>' . $query[$i] . '</b><br>';
    }
    if ($myversion == $thisversion) {
        echo 'Complete, now to <b><a href="?step=3">step 3</a></b>';
    } else {
        echo '<script type="text/javascript">window.location = "?step=2";</script>';
        echo '<noscript>Javascript is disabled please <a href="?step=2">refresh the page</a></noscript>';
    }
}
if ($step == 3) {
    $check = check_installation();
    $thisversion = this_version();
    $myversion = check_version();
    if (!$check) {
        echo print_header(true);
        echo '<p>It seems you don\'t currently have a version of WeBid installed we recommend you do a <b><a href="install.php">fresh install</a></b></p>';
        exit;
    }
    include $main_path . 'common.php';
    echo print_header(true);
    include $include_path . 'functions_rebuild.inc.php';
    echo '<p>Rebuilding membertypes...</p>';
    rebuild_table_file('membertypes');
    echo '<p>Rebuilding countries...</p>';
    rebuild_html_file('countries');
    echo '<p>Rebuilding categories...</p>';
    $catscontrol = new MPTTcategories();
    rebuild_cat_file();
开发者ID:laughingpain,项目名称:WeBid,代码行数:31,代码来源:update.php

示例6: getVersionNotification

/**
 * Get new version notification
 *
 * @return null|array
 */
function getVersionNotification()
{
    $message = null;
    $data = check_version(isset($_SESSION['first_version_check']));
    unset($_SESSION['first_version_check']);
    if ($data['outdated'] == true) {
        $message = ['title' => __t('version_outdated_title'), 'text' => __t('version_outdated_text_x', ['installed_version' => DIRECTUS_VERSION, 'current_version' => $data['current_version']])];
    }
    return $message;
}
开发者ID:YounessTayer,项目名称:directus,代码行数:15,代码来源:index.php

示例7: dirname

    $pivot_path = dirname(realpath(__FILE__)) . "/";
}
$pivot_path = str_replace("\\", "/", $pivot_path);
// Include some other files
require_once $pivot_path . 'pvlib.php';
require_once $pivot_path . 'pvdisp.php';
require_once $pivot_path . 'modules/module_db.php';
require_once $pivot_path . 'modules/module_i18n.php';
require_once $pivot_path . 'modules/module_lang.php';
require_once $pivot_path . 'modules/module_parser.php';
require_once $pivot_path . 'modules/module_ipblock.php';
require_once $pivot_path . 'modules/module_spamkiller.php';
require_once $pivot_path . 'modules/module_snippets.php';
require_once $pivot_path . 'modules/module_tags.php';
// Check if the current php version is at least 4.1.0..
if (!check_version(PHP_VERSION, "4.1.0")) {
    echo "<p>Your PHP version is: " . PHP_VERSION . ".<br /> Pivot requires at least PHP version 4.1.0 to run properly!</p>\n\n";
    die;
}
// Start the timer:
$starttime = getmicrotime();
GetSettings();
/**
 * If debug is set, include the file..
 */
if ($Cfg['debug'] == 1) {
    require_once $pivot_path . 'modules/module_debug.php';
} else {
    error_reporting(E_ERROR);
    function debug()
    {
开发者ID:wborbajr,项目名称:TecnodataApp,代码行数:31,代码来源:pv_core.php

示例8: define_user

function define_user()
{
    global $conn;
    if (isset($_SESSION['cmt_login']) && $_SESSION['cmt_login'] === true) {
        check_version();
        $sql = "SELECT * FROM " . $_SESSION['TABLE_PREFIX'] . "cmt_accounts WHERE id = '" . $_SESSION['cmt_id'] . "' AND c_active='1'";
        $result = db_mysql_query($sql, $conn);
        if (db_mysql_num_rows($result)) {
            $arr = db_mysql_fetch_array($result);
            define('CMT_USER_ID', $arr['id']);
            define('CMT_USER_FIRST_NAME', $arr['first_name']);
            define('CMT_USER_LAST_NAME', $arr['last_name']);
            define('CMT_USER_LANGUAGE', $arr['language']);
            $sql_sub = "SELECT value FROM " . $_SESSION['TABLE_PREFIX'] . "cmt_settings WHERE title = 'default_modul' AND c_active = '1'";
            $result_sub = db_mysql_query($sql_sub, $conn);
            if (db_mysql_num_rows($result_sub)) {
                $arr_sub = db_mysql_fetch_array($result_sub);
                define('CMT_DEFAULT_MODUL', $arr_sub['value']);
            }
        } else {
            $_SESSION['cmt_login'] = false;
        }
    }
    if (!defined('CMT_USER_LANGUAGE')) {
        define('CMT_USER_LANGUAGE', 'en');
    }
}
开发者ID:entire-media,项目名称:comator,代码行数:27,代码来源:predo.inc.php

示例9: isset

<?php

require 'config.php';
require 'language/' . DEFAULT_LANGUAGE . '/language.php';
require 'includes/functions.php';
require 'includes/db/' . DB_TYPE . '/query_factory.php';
$context_ref = isset($_GET['idx']) ? $_GET['idx'] : '';
// Load db class
$db = new queryFactory();
if (!$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE)) {
    echo $db->show_error() . '<br />';
    die(NO_CONNECT_DB);
}
$current = check_version();
// make sure db is current with latest information files
$result = false;
if ($context_ref) {
    $result = $db->Execute("select doc_url from " . DB_PREFIX . "zh_search where doc_pos = '" . $context_ref . "'");
}
$start_page = !$result ? DOC_ROOT_URL . '/' . DOC_HOME_PAGE : $result->fields['doc_url'];
//$start_page = DOC_ROOT_URL . '/' . DOC_HOME_PAGE;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php 
echo HEADING_TITLE;
?>
</title>
<link rel="stylesheet" href="css/phreehelp.css">
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:index.php

示例10: anchor

              <?php 
        echo anchor('admin/extend/turn_off/' . $name, '<img src="' . base_url() . 'assets/images/icons/on_16.png" alt="" class="">');
        ?>
 
<?php 
    } else {
        ?>
              <?php 
        echo anchor('admin/extend/turn_on/' . $name, '<img src="' . base_url() . 'assets/images/icons/off_16.png" alt="" class="">');
        ?>
 
<?php 
    }
    if ($this->startup->site_config->allow_version_check && isset($plugin->version->latest_link)) {
        $this->load->helper('admin/version');
        $latest_version = check_version($plugin->version->latest_link);
        if ($plugin->version->local < $latest_version && $latest_version != false) {
            $imgsrc = '<img src="' . base_url() . 'assets/images/icons/certificate_16.png" alt="" class="nb" title="' . sprintf(lang('New Version Available: v%s'), $this->functions->parse_version($latest_version, false)) . '">';
            ?>
              <?php 
            echo anchor($plugin->version->download_link, $imgsrc, array('rel' => 'external'));
        }
    }
    ?>
              <?php 
    echo anchor('admin/extend/remove/' . $name, '<img src="' . base_url() . 'assets/images/icons/trash_16.png" alt="" class="nb">');
    ?>
            </td>
          </tr>
<?php 
}
开发者ID:rexcarnation,项目名称:XtraUpload-1,代码行数:31,代码来源:view.php

示例11: check_version

        }
        // same major - check ninor
        if ($minorC > $minorR) {
            return true;
        }
        if ($minorC < $minorR) {
            return false;
        }
        // and same minor
        if ($editC >= $editR) {
            return true;
        }
        return false;
    }
}
$___php5 = check_version(phpversion(), "5.0.0");
# -===============================================-
#           NEW MYSQLI CLIENT LIBRARY
# -===============================================-
if (function_exists('mysqli_get_client_info')) {
    if (file_exists("mysql.class.4.php")) {
        rename("mysql.class.4.php", "disabled/mysql.class.4.php");
    }
    if (!class_exists("MySQL") && $___php5 == true) {
        class MySQL
        {
            protected $querys;
            protected $ask;
            protected $fetch_array;
            protected $fetch_object;
            protected $fetch_assoc;
开发者ID:mndrwd,项目名称:freedomeditor,代码行数:31,代码来源:mysql.class.5.php

示例12: gContacts_fatal_error

 /**
  *	gContacts_fatal_error
  *
  *	gContacts Fatal Error Handling function
  **/
 function gContacts_fatal_error()
 {
     global $version;
     $version = check_version($version);
     $error = error_get_last();
     if ($error['type'] > 0) {
         new Error($version, 16, $error["message"], $error['file'], $error['line'], null, 'gContacts_fatal_error');
         return true;
     }
 }
开发者ID:sirpros,项目名称:gContacts,代码行数:15,代码来源:gContacts_functions.php

示例13: check_pivot_version

/**
 * Checks if the version of Pivot is as required.
 *
 * The required version must be given in the format "x.y.z" where (x, y, z)
 * are numbers in [0-9]. ("z" may be left out and is then assumed to be 0.)
 *
 * @param string $requiredversion
 * @return boolean
 */
function check_pivot_version($requiredversion)
{
    global $build;
    preg_match("/[^\\d]*([\\d.-]*).*/", $build, $match);
    $buildversion = $match[1];
    list($majorB, $minorB, $editB) = split('[/.-]', $buildversion);
    list($majorR, $minorR, $editR) = split('[/.-]', $requiredversion);
    if (!isset($editB)) {
        $editB = 0;
    }
    if (!isset($editR)) {
        $editR = 0;
    }
    $buildversion = implode(".", array($majorB, $minorB, $editB));
    $requiredversion = implode(".", array($majorR, $minorR, $editR));
    return check_version($buildversion, $requiredversion);
}
开发者ID:wborbajr,项目名称:TecnodataApp,代码行数:26,代码来源:pvlib.php

示例14: wpadm_plugins


//.........这里部分代码省略.........
                    } else {
                        content.hide('slow');
                    }
                })
            })
            function showRegistartion(show)
            {
                if (show) {
                    jQuery('.cfTabsContainer').show('slow');
                } else {
                    jQuery('.cfTabsContainer').hide('slow');
                }
            }
        </script>

        <div class="clear" style="margin-bottom: 50px;"></div>
        <table class="wp-list-table widefat fixed" >
            <thead>
                <tr>
                    <th></th>
                    <th>Recommended value</th>
                    <th>Your value</th>
                    <th>Status</th>
                </tr>
            </thead>
            <tbody>  
                <tr>
                    <th scope="row">PHP Version</th>
                    <td><?php 
        echo PHP_VERSION_DEFAULT;
        ?>
 or greater</td>
                    <td><?php 
        echo check_version($phpVersion, PHP_VERSION_DEFAULT) === false ? '<span style="color:#fb8004;font-weight:bold;">' . $phpVersion . '</span>' : $phpVersion;
        ?>
</td>
                    <td><?php 
        echo check_version($phpVersion, PHP_VERSION_DEFAULT) ? '<span style="color:green;font-weight:bold;">OK</span>' : '<span style="color:#fb8004;font-weight:bold;">Please update your PHP version to get it working correctly</span>';
        ?>
</td>
                </tr>
                <tr>
                    <th scope="row">MySQL Version</th>
                    <td><?php 
        echo MYSQL_VERSION_DEFAULT;
        ?>
 or greater</td>
                    <td><?php 
        echo check_version($mysqlVersion, MYSQL_VERSION_DEFAULT) === false ? '<span style="color:#fb8004;font-weight:bold;">' . $mysqlVersion . '</span>' : $mysqlVersion;
        ?>
</td>
                    <td><?php 
        echo check_version($mysqlVersion, MYSQL_VERSION_DEFAULT) ? '<span style="color:green;font-weight:bold;">OK</span>' : '<span style="color:#fb8004;font-weight:bold;">Please update your MySQL version to get it working correctly</span>';
        ?>
</td>
                </tr>
                <tr>
                    <th scope="row">Max Execution Time</th>
                    <td><?php 
        echo $newMaxExecutionTime;
        ?>
</td>
                    <td><?php 
        echo $upMaxExecutionTime == 0 ? '<span style="color:#fb8004;font-weight:bold;">' . $maxExecutionTime . '</span>' : $maxExecutionTime;
        ?>
</td>
开发者ID:derwegas,项目名称:strubbelkinder,代码行数:67,代码来源:wpadm.server.main.class.php

示例15: substr

require_once "../config.php";
include "includes/admin_functions.php";
if (is_file("../sales_config.php")) {
    include "../sales_config.php";
}
//sales option?
$sales_option = "";
if (is_file("../picturelib_config.php")) {
    include "../picturelib_config.php";
}
$menusep = " || ";
//menu separator
$redirect = "";
$url_to_start = substr($url_to_start, 0, strpos($url_to_start, $admin_dir) - 1);
//check version vs current code, to see if we need updates
$ver_check = check_version(NULL, NULL);
if ($ver_check !== false) {
    //handle the procedure to notify admin of updates or need to run upgrade procedure. warn about plugins and modules
}
#  Connect to DB        - might do to just drop it in a function file
#################################################################################################
mysql_connect($db_server, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
#  Functions
#################################################################################################
#  Header
//TODO: Move this to header.php and/or header.tpl
#################################################################################################
echo "<html>\n";
echo " <head>\n";
echo "  <title>Logix Classifieds-AdminPanel</title>\n";
开发者ID:BackupTheBerlios,项目名称:logixclassified-svn,代码行数:31,代码来源:admin.php


注:本文中的check_version函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。