noalyss Version-9
upgrade-core.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * PhpCompta is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with PhpCompta; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
21
22if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
23if ( ! defined ('ALLOWED_ADMIN')) { die (_('Non autorisé'));}
26/**
27 * @file
28 * @brief
29 */
30printf (_(" La version de votre installation est %s "),$version_noalyss);
31
33$xml=$core->getContent();
34/*
35 * If xml is null , it means it was not possible to get the file , could be
36 * a network problem or a misconfiguration
37 */
38if ( $xml == NULL) {
39 echo '<h2 class="error">';
40 printf (_("Désolé , impossible de se connecter au serveur %s"),
41 NOALYSS_PACKAGE_REPOSITORY);
42 echo '</h2>';
43 return;
44
45}
46printf(h1(_("Version %s du %s")),$xml->core->version,$xml->core->date);
47echo '<p>';
48echo $xml->core->description;
49echo '</p>';
50
51if ( $xml->core->version <= $version_noalyss) {
52 echo '<p>';
53 echo _("Votre version est à jour");
54 echo '</p>';
55 return;
56}
57
58$js="onclick='UpgradeCore()'";
59
60echo HtmlInput::button("upgrade",_("Mise à jour de votre système"),$js);
61?>
62<div id="info_admin">
63
64</div>
65<script>
66 function UpgradeCore()
67 {
68 progress_bar_start('upgradeCore');
69 new Ajax.Updater("info_admin","ajax_misc.php",{
70 method:'POST',
71 parameters:{op:"upgradeCore",gDossier:0,task_id:'upgradeCore'
72 }
73 }
74 );
75 }
76 </script>
h1($p_string, $p_class="")
Definition: ac_common.php:72
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
static echo_file($msg, $print=true)
display the file
Definition: dbg.php:88
connect to NOALYSS_PACKAGE and fetch the file web.xml , it displays content of this file ,...
if( $xml->core->version<=$version_noalyss) $js
$xml
$core
global $version_noalyss