mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
First public release of MyAAC
This commit is contained in:
40
system/pages/admin/version.php
Normal file
40
system/pages/admin/version.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Version check
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.0.1
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Version check';
|
||||
|
||||
// fetch version
|
||||
//$file = @fopen('http://my-aac.org/VERSION', 'r') or die('Error while fetching version.');
|
||||
//$myaac_version = fgets($file);
|
||||
$myaac_version = file_get_contents('http://my-aac.org/VERSION');
|
||||
|
||||
// compare them
|
||||
if(version_compare($myaac_version, MYAAC_VERSION) <= 0)
|
||||
echo '<p class="success">MyAAC latest version is ' . $myaac_version . '. You\'re using the latest version.</p>';
|
||||
else
|
||||
echo '<p class="warning">You\'re using outdated version.<br/>
|
||||
Your version: <b>' . MYAAC_VERSION . '</b><br/>
|
||||
Latest version: <b>' . $myaac_version . '</b><br/>
|
||||
Download available at: <a href="http://my-aac.org" target="_blank">www.my-aac.org</a></p>';
|
||||
|
||||
/*
|
||||
function version_revert($version)
|
||||
{
|
||||
$major = floor($version / 10000);
|
||||
$version -= $major * 10000;
|
||||
|
||||
$minor = floor($version / 100);
|
||||
$version -= $minor * 100;
|
||||
|
||||
$release = $version;
|
||||
return $major . '.' . $minor . '.' . $release;
|
||||
}*/
|
||||
?>
|
Reference in New Issue
Block a user