[ Index ]
 

Code source de SPIP Agora 1.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Agora1-4/ecrire/ -> upgrade.php (source)

   1  <?php
   2  /*****************************************************
   3  * This file is part of Agora, web based content management system.
   4  *
   5  * Agora is free software; you can redistribute it and/or modify
   6  * it under the terms of the GNU General Public License as published by
   7  * the Free Software Foundation; version 2 of the License.
   8  *
   9  * Agora is distributed in the hope that it will be useful,
  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  * GNU General Public License for more details (file "COPYING").
  13  *
  14  * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière.
  15  * List of authors detailed in "copyright_fr.html" file.
  16  * E-mail : agora@sig.premier-ministre.gouv.fr
  17  * Web site : http://www.agora.gouv.fr
  18  *****************************************************/
  19  include  ("inc_version.php");
  20  
  21  include_ecrire  ("inc_presentation.php");
  22  include_ecrire  ("inc_auth.php");
  23  include_ecrire  ("inc_admin.php");
  24  include_ecrire  ("inc_acces.php");
  25  include_ecrire  ("inc_meta.php");
  26  include_ecrire  ("inc_config.php");
  27  include_ecrire  ("inc_texte.php");
  28  include_ecrire  ("inc_filtres.php");
  29  
  30  // Si reinstallation necessaire, message ad hoc
  31  /*
  32  if ($reinstall == 'oui') {
  33      //if (!file_exists("inc_connect.php")) {
  34      if (!file_exists(dirname(__FILE__)."/include/bd/inc_config_metier.php")) {
  35          Header("Location: install.php");
  36          exit;
  37      }
  38  
  39      @copy("inc_connect.php", "inc_connect_install.php");
  40  
  41      install_debut_html(_T('titre_page_upgrade'));
  42      echo "<p><b>"._T('texte_nouvelle_version_spip_1')."</b><p> ";
  43      echo _T('texte_nouvelle_version_spip_2');
  44  
  45      $link = new Link();
  46      echo "<p><div align='right'>";
  47      echo $link->getForm('get');
  48      echo "<input type='submit' name='submit' value=\""._T('bouton_relancer_installation')."\" class='fondl'>";
  49      echo "</form>\n";
  50  
  51      install_fin_html();
  52      exit;
  53  }
  54  */
  55  
  56  $upgrade_titre = _T('info_mise_a_niveau_base');
  57  
  58  // Commentaire standard upgrade
  59  $commentaire = _T('texte_mise_a_niveau_base_1');
  60  
  61  // Erreur downgrade (cas de double installation de fichiers SPIP sur une meme base)
  62  /***** Modification elebescond@clever-age.com *******/
  63  if ($agora_version < (double)lire_meta('version_installee'))
  64      $commentaire = _T('info_mise_a_niveau_base_2');
  65  
  66  // Qu'est-ce que tu fais ici?
  67  if ($agora_version == (double)lire_meta('version_installee')) {
  68      @header ("Location: index.php");
  69      exit;
  70  }
  71  /*
  72  if ($spip_version < (double) lire_meta('version_installee'))
  73      $commentaire = _T('info_mise_a_niveau_base_2');
  74  
  75  // Qu'est-ce que tu fais ici?
  76  if ($spip_version == (double) lire_meta('version_installee')) {
  77      @header("Location: index.php");
  78      exit;
  79  }
  80  */
  81  /***** Fin modification elebescond@clever-age.com *******/
  82  debut_admin($upgrade_titre, $commentaire);
  83  include_ecrire  ("inc_base.php");
  84  maj_base();
  85  /*
  86  include_ecrire ("inc_base.php");
  87  
  88  creer_base();
  89  maj_base();
  90  ecrire_acces();
  91  
  92  init_config();
  93  */
  94  /***** Fin modification elebescond@clever-age.com *******/
  95  
  96  $hash = calculer_action_auteur("purger_cache");
  97  $redirect = rawurlencode("index.php");
  98  
  99  fin_admin ($upgrade_titre);
 100  
 101  @header ("Location: ../spip_cache.php?purger_cache=oui&id_auteur=$connect_id_auteur&hash=$hash&redirect=$redirect");
 102  ?>


Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7