Esthetic : add a button to close the warning for info

This commit is contained in:
Dany De Bontridder 2015-08-13 10:38:14 +02:00
parent b047cf5966
commit 170f7ee675
3 changed files with 15 additions and 6 deletions

View file

@ -30,7 +30,6 @@ require_once NOALYSS_INCLUDE.'/function_javascript.php';
@html_page_start($_SESSION['g_theme']);
$rep=new Database();
include_once NOALYSS_INCLUDE.'/class_user.php';
$User=new User($rep);
$User->Check();
@ -87,10 +86,13 @@ if ( $User->Admin() == 1)
if (SITE_UPDATE !="") {
$update=@file_get_contents(SITE_UPDATE);
if ($update > $version_noalyss ) {
echo '<div class="inner_box" style="width:25%;margin-left:10%;margin-top:3px;">';
echo '<div id="version_div" class="inner_box" style="width:25%;margin-left:10%;margin-top:3px;">';
echo '<p class="notice">';
echo "Mise à jour disponible de NOALYSS version actuelle : $update votre version $version_noalyss";
echo '</p>';
echo '<p style="text-align:center"> <a class="button" onclick="document.body.removeChild(document.getElementById(\'version_div\'))">'.
_('Fermer').
"</a></p>";
echo '</div>';
}
}
@ -179,6 +181,7 @@ echo $res;
<P>
</P>
</div>
<?php
html_page_stop();
?>

View file

@ -217,10 +217,14 @@ class Extension extends Menu_Ref_sql
$update = @file_get_contents(SITE_UPDATE_PLUGIN);
if ($update > $version_plugin)
{
echo '<div class="inner_box" style="position:absolute;zindex:2;top:5px;left:360px">';
echo '<div id="version_plugin_div_id" class="inner_box" style="position:absolute;zindex:2;top:5px;left:37.5%;width:25%">';
echo '<p class="notice">';
echo "Mise à jour disponible des plugins pour NOALYSS, version actuelle : $update votre version $version_plugin";
echo '</p>';
echo '<p style="text-align:center">'.
'<a id="version_plugin_button" class="button" onclick="$(\'version_plugin_div_id\').remove()">'.
_('Fermer').
"</a></p>";
echo '</div>';
}
}

View file

@ -79,7 +79,7 @@ define ('SMALLX','&#x2D5D;');
define ('SVNINFO',6815);
define ('SVNINFO',6700);
if ( ! defined ('DEBUG')) {
define ("DEBUG",false);
}
@ -91,8 +91,10 @@ $version_noalyss=SVNINFO;
// If you don't want to be notified of the update
// define ("SITE_UPDATE",'');
define ("SITE_UPDATE",'http://www.noalyss.eu/last_version.txt');
define ("SITE_UPDATE_PLUGIN",'http://www.noalyss.eu/plugin_last_version.txt');
if ( !defined("SITE_UPDATE"))
define ("SITE_UPDATE",'http://www.noalyss.eu/last_version.txt');
if ( !defined("SITE_UPDATE_PLUGIN"))
define ("SITE_UPDATE_PLUGIN",'http://www.noalyss.eu/plugin_last_version.txt');
define ("DBVERSION",118);