diff options
Diffstat (limited to 'admin')
-rw-r--r-- | admin/WebConsole/barramenu.php | 2 | ||||
-rw-r--r-- | admin/WebConsole/index.php | 17 | ||||
-rw-r--r-- | admin/WebConsole/nada.php | 9 | ||||
-rw-r--r-- | admin/WebConsole/principal/acercade.php | 18 |
4 files changed, 32 insertions, 14 deletions
diff --git a/admin/WebConsole/barramenu.php b/admin/WebConsole/barramenu.php index d6561cfc..dfb618ed 100644 --- a/admin/WebConsole/barramenu.php +++ b/admin/WebConsole/barramenu.php @@ -13,7 +13,7 @@ if(stripos($device,'iphone') !== false ){$device="iphone";} elseif (stripos($device,'ipad') !== false) {$device="ipad";} elseif (stripos($device,'android') !== false){$device="android";} else{$device=0;} -$version=exec("cat /opt/opengnsys/doc/VERSION.txt"); +$version=@json_decode(file_get_contents("/opt/opengnsys/doc/VERSION.json"))->version; if(preg_match("/1.0.4/",$version) == TRUE ){$version=4;} // ******************************************************************************************************** include_once("./includes/ctrlacc.php"); diff --git a/admin/WebConsole/index.php b/admin/WebConsole/index.php index f416b7f3..2b522d59 100644 --- a/admin/WebConsole/index.php +++ b/admin/WebConsole/index.php @@ -120,15 +120,20 @@ function PulsaEnter(oEvento){ </form> </div> <div class="pie"> +<span><a href="https://opengnsys.es/"> <?php -// Añadir versión y URL al proyecto. -$versionfile="../doc/VERSION.txt"; -if (file_exists ($versionfile)) { - echo '<span><a href="https://opengnsys.es/">'; - include ($versionfile); - echo '</a></span>'; +// Añadir versión en el enlace a la URL del proyecto. +$data = json_decode(@file_get_contents(__DIR__ . '/../doc/VERSION.json')); +if (empty($data->project)) { + echo "OpenGnsys"; +} else { + echo @$data->project.' ' + .@$data->version.' ' + .(isset($data->codename) ? '('.$data->codename.') ' : '') + .@$data->release; } ?> +</a></span> <form action="#" name="lang" method="post"> <?php echo HTMLSELECT($cmd,0,'idiomas',$idi,'nemonico','descripcion',80); ?> <button type="submit"><?php echo $TbMsg["ACCESS_CHOOSE"]; ?></button> diff --git a/admin/WebConsole/nada.php b/admin/WebConsole/nada.php index 52d0d028..84e7b490 100644 --- a/admin/WebConsole/nada.php +++ b/admin/WebConsole/nada.php @@ -152,6 +152,13 @@ $vernav=end($buscavernav); if ($device == "ipad" || $device == "iphone" || $device == "android" ) { +$data = json_decode(@file_get_contents(__DIR__ . '/../doc/VERSION.json')); +if (empty($data->project)) { + $version = "OpenGnsys"; +} else { + $version = @$data->project.' ' . @$data->version.' ' + . (isset($data->codename) ? '('.$data->codename.') ' : '') . @$data->release; +} ?> <html> <head> @@ -168,7 +175,7 @@ if ($device == "ipad" || $device == "iphone" || $device == "android" ) <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php echo $TbMsg[0] ;?></font></SPAN></td> </tr> <tr> - <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php $versionfile="../doc/VERSION.txt";if (file_exists ($versionfile)){include ($versionfile);} ;?></font></SPAN></td> + <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php echo $version; ?></font></SPAN></td> </tr> <tr> <td colspan="3" align="center"> </td> diff --git a/admin/WebConsole/principal/acercade.php b/admin/WebConsole/principal/acercade.php index 2981ce0e..f95e07c1 100644 --- a/admin/WebConsole/principal/acercade.php +++ b/admin/WebConsole/principal/acercade.php @@ -24,10 +24,15 @@ include_once("../idiomas/php/".$idioma."/acercade_".$idioma.".php"); <p> <?php // Añadir versión. -$versionfile="../../doc/VERSION.txt"; -if (file_exists ($versionfile)) - include ($versionfile); - +$data = json_decode(@file_get_contents(__DIR__ . '/../../doc/VERSION.json')); +if (empty($data->project)) { + echo "OpenGnsys"; +} else { + echo @$data->project.' ' + .@$data->version.' ' + .(isset($data->codename) ? '(<a href="'.@$data->definition.'" target="_blank">'.$data->codename.'</a>) ' : '') + .@$data->release; +} ?> </p> <?php @@ -129,8 +134,9 @@ fclose($crearficheroinicio); <p><?php if (file_exists ($changelogfile)){ system("cp ../../doc/$buschangelog ../api"); - echo "<strong><a href='../api/$buschangelog' target='_blank'>".$TbMsg["CHANGE"]."</a></strong>"; - include ($versionfile);} + echo "<strong><a href='../api/$buschangelog' target='_blank'>".$TbMsg["CHANGE"]."</a></strong>" + .@$data->project.' '.@$data->version.' '.(isset($data->codename)?'('.$data->codename.')':''); + } ?></p> <p><?php echo "<strong><a href='$ficheroinicio' target='_blank'>".$TbMsg["MANUAL"]."</a></strong>";?></p> |