PHPIndex

This page lists files in the current directory. You can view content, get download/execute commands for Wget, Curl, or PowerShell, or filter the list using wildcards (e.g., `*.sh`).

cleanup.php
wget 'https://sme10.lists2.roe3.org/guppy/install/cleanup.php'
View Content
<?php
/*******************************************************************************
 *   Prepare Empty Database
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2020) : initial release
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../');
$selskin = 'no_skin';
include CHEMIN.'inc/includes.inc';
include $lng.'-install.inc';
include 'func_install.php';

$form  = import('form');
$doing = import('doing');


if (empty($form)) {
    DisplayHeader();
	echo '
<p style="text-align:center;">
  <a href="Javascript: window.location=\'cleanup.php?lng='.$lang[0].'\';">
    <i class="flg-'.$lang[0].'" title="'.$lang[0].'"></i>
  </a>
  &nbsp;&nbsp;&nbsp;&nbsp;
  <a href="Javascript: window.location=\'cleanup.php?lng='.$lang[1].'\';">
    <i class="flg-'.$lang[1].'" title="'.$lang[1].'"></i>
  </a>
</p>';
	DisplayTitre($clean[16], $clean[17].'<br /><br />'.$clean[3]);
	echo '
<form name="instal0" action="cleanup.php?lng='.$lng.'" method="post">
  <input type="hidden" name="form" value="1"/>
  <div style="text-align:center;">'.SubmitButton($clean[4]).'&nbsp;&nbsp;
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="window.location=\'install.php?lng='.$lng.'&form=1\';">'.$clean[0].'</button>
  </div>
</form>';
} elseif ($form == '1') {
    DisplayHeader();
	DisplayTitre($clean[18], $clean[19]);
	echo '
<form name="instal1" action="cleanup.php?lng='.$lng.'" method="post">
  <input type="hidden" name="form" value="2"/>
  <div style="text-align:center;">'.SubmitButton($clean[4]).'&nbsp;&nbsp;
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="window.location=\'install.php?lng='.$lng.'&form=1\';">'.$clean[0].'</button>
  </div>
</form>';
} elseif ($form == '2') {
	if (empty($doing)) {
        DisplayHeader('cleanup.php?lng='.$lng.'&form=2&doing=1');
		CleanDataRep();
		DisplayProcess($clean[18], $clean[20], $clean[21]);
	} elseif ($doing == '1') {
        DisplayHeader('cleanup.php?lng='.$lng.'&form=2&doing=2');
		PrepareDataRep();
		DisplayProcess($clean[18], $clean[20], $clean[21].'<br />'.$clean[22]);
	} elseif ($doing == '2') {
        DisplayHeader('cleanup.php?lng='.$lng.'&form=3');
		DisplayProcess($clean[18], $clean[23], $clean[21].'<br />'.$clean[22]);
	}
} elseif ($form == '3') {
    $DBversion = '';
    include CONFIGREP.'dbversion.php';
    $version = $DBversion;
    if (is_file(CHEMIN.DATAREP.'dbversion.php')) include CHEMIN.DATAREP.'dbversion.php';
    DisplayHeader();
	DisplayTitre($clean[16], $clean[24]);
    if ($version == $DBversion) {
	   echo '
<form name="instal3" action="install.php?lng='.$lng.'" method="post">
  <div style="text-align:center;">'.SubmitButton($clean[25]).'&nbsp;&nbsp;
  </div>
</form>';
    } else {
	   echo '
<form name="instal3" action="migrate46.php?lng='.$lng.'" method="post">
  <div style="text-align:center;">'.SubmitButton($clean[25]).'&nbsp;&nbsp;
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="window.location=\'install.php?lng='.$lng.'&form=1\';">'.$clean[0].'</button>
  </div>
</form>';
    }
}

DisplayFooter();
?>
correctiondata.php
wget 'https://sme10.lists2.roe3.org/guppy/install/correctiondata.php'
View Content
<?php
header("Pragma: no-cache");
define('CHEMIN', '../');
include CHEMIN.'inc/includes.inc';
include CHEMIN.'admin/hpage.inc';
$fctwri = NULL;
$lng      = import('lng', 'GET');
if ($lng == '') $lng = $lang[0];

include CHEMIN.'inc/lang/'.$lng.'-admin.inc';
$qtitle= 'CORRECTION Des datas contenant iframe avec sandbox</strong>';
htable($qtitle, '100%');
echo '
<center>
<p><strong>CORRECTION Des datas contenant iframe avec sandbox</strong></p>
<div style="margin-top:40px;padding-top:20px;width:600px;background-color:#eee;">';
$motcherch = array('allow-presentation', 'allow-top-navigation', 'allow-scripts', 'allow-downloads', 'allow-popups');
$nobretot = count($motcherch);
$ok = "non";
if(isset($_POST['submit']))
	{
		echo "<p><strong>Correction en cours</strong><br /><br />";
		$n = 0; 
		$x = 0;
		$dbw    = SelectDBFieldsByNotStatus(ReadDBFields(DOCID),'d');
		for ($i = 0; $i < count($dbw); $i++) 
		{
			ReadDoc($dbw[$i][1]);
			$id = $dbw[$i][1];
			$x++;
			$modif = 0;
			if (str_contains($fieldc1, '<iframe') && str_contains($fieldc1, 'sandbox=')) {
				$contenu = stripslashes($fieldc1);
				for ($j =0; $j< $nobretot; $j++)
				{
					if (str_contains($contenu, $motcherch[$j])) {
						$contenu = str_replace(' allow-', 'allow-', $contenu);
						$contenu = str_replace($motcherch[$j], "", $contenu);
					}
				}
					$contenu = stripslashes($contenu);
					$contenu = str_replace('sandbox=""', '', $contenu);
					$fieldc1 = $contenu;
					$modif = 1;	
			}	
			if (str_contains($fieldc2, '<iframe') && str_contains($fieldc2, 'sandbox=')) {
				for ($j =0; $j< $nobretot; $j++)
				{
					if (str_contains($contenu, $motcherch[$j])) {
						$contenu = str_replace(' allow-', 'allow-', $contenu);
						$contenu = str_replace($motcherch[$j], "", $contenu);
					}
				}
					$contenu = stripslashes($contenu);
					$contenu = str_replace('sandbox=""', '', $contenu);
					$fieldc2 = $contenu;
					$modif = 2;
	
			}						
		    if ($modif != 0)
			{
				    $data[0] = $type;
					$data[1] = $id;
					$data[2] = $status;
					$data[3] = $creadate;
					$data[4] = $moddate;
					$data[5] = $author;
					$data[6] = $email;
					$data[7] = $fielda1;
					$data[8]  = $fielda2;
					$data[9]  = $fieldb1;
					$data[10] = $fieldb2;
					$data[11] = $fieldc1;
					$data[12] = $fieldc2;
					$data[13] = $fieldd1;
					$data[14] = $fieldd2;
					$data[15] = $fieldweb;
					$data[16] = $fieldmail;
					$data[17] = $fieldmod; 
					ActionOnFields('mod', $data);
					echo 'Nom doc: '.$id.' rectifié <br />';
					$n++;
			}

		}
		$ok = "oui";
		echo "<br /><br />----------<br /><strong>".$x." fichiers vérifiés, ".$n." fichiers rectifiés</strong><br />----------<br /></p>\n";       
	}

if ($ok == "non") {
    echo '
<strong><u>ATTENTION</strong></u><br /><br />
<p style="color:red"><strong>Il s\'agit d\'une correction des données !!!</strong></p><br /><br />
Ce script permet <u>seulement</u> de mettre en conformité la balise iframe avec sandbox5<br /><br />
Il ne fait <u>que</u> supprimer sandbox avec les attributs<br /><br />'."\n";

    echo '
<p align="center"><br />Corriger vos datas maintenant?<br />
<form name="migrer" action="correctiondata.php" method="POST">
<input type="submit" name="submit" value="Oui" />
<input type="reset" name="reset" value="Non" />
</form>'."\n";
}
echo '
<p align="center"><a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'">'.$admin[22].'</a> || <b><a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&logout=1">'.$admin[19].'</a></b></p>';
btable();

include CHEMIN.'admin/bpage.inc';
?>
delete.php
wget 'https://sme10.lists2.roe3.org/guppy/install/delete.php'
View Content
<?php
/*******************************************************************************
 *   Delete Install script
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2020) : initial release
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../');
$selskin = 'no_skin';
include CHEMIN.'inc/includes.inc';
include $lng.'-install.inc';
include 'func_install.php';

$form = import('form', 'POST');


if (empty($form)) {
    DisplayHeader();
	echo '
<p style="text-align:center;">
  <a href="Javascript: window.location=\'delete.php?lng='.$lang[0].'\';">
    <img src="'.CHEMIN.'inc/lang/'.$lang[0].'.gif" width="24" height="16" border="0"/>
  </a>
  &nbsp;&nbsp;&nbsp;&nbsp;
  <a href="Javascript: window.location=\'delete.php?lng='.$lang[1].'\';">
    <img src="'.CHEMIN.'inc/lang/'.$lang[1].'.gif" width="24" height="16" border="0"/>
  </a>
</p>';
	DisplayTitre($clean[10], $clean[11].'<br /><br />'.$clean[3]);
	echo '
<form name="instal0" action="delete.php?lng='.$lng.'" method="post">
  <input type="hidden" name="form" value="1"/>
  <div style="text-align:center;">'.SubmitButton($clean[4]).'&nbsp;&nbsp;
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="javascript:history.back();">'.$clean[0].'</button>
  </div>
</form>';
} elseif ($form == '1') {
    DisplayHeader();
	DisplayTitre($clean[12], $clean[13]);
	echo '
<form name="instal1" action="delete.php?lng='.$lng.'" method="post">
  <input type="hidden" name="form" value="2"/>
  <div style="text-align:center;">'.SubmitButton($clean[4]).'&nbsp;&nbsp;
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="window.location=\'install.php?lng='.$lng.'&form=1\';">'.$clean[0].'</button>
  </div>
</form>';
} elseif ($form == '2') {
	if (empty($doing)) {
		DisplayHeader(CHEMIN.'index.php?lng='.$lng);
		EraseInstall();
		DisplayProcess($clean[12], $clean[14], $clean[15]);
	}
} else {
    DisplayHeader('index.php?lng='.$lng);
}

DisplayFooter();
?>
en-install.inc
wget 'https://sme10.lists2.roe3.org/guppy/install/en-install.inc'
View Content
<?php
/*******************************************************************************
 *   Install Language Strings
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2020) : initial release
 ******************************************************************************/

if (stristr($_SERVER['SCRIPT_NAME'], 'en-install.inc')) {
    header('location:../index.php');
    die();
}

$version = MP_VERSION;

$clean[0] = 'No...';
$clean[1] = 'INSTALL OR MIGRATE GUPPY';
$clean[2] = '
<div style="text-align:center;">This script is ment:</div>
<ul>
  <li>or for clearing the demo database shipped with GuppY version '.$version.' and for preparing your empty database</li>
  <li>or to load the data from your locally saved site\'s kits</li>
</ul>
<div style="text-align:center;">
  Once you will have executed one of these two operations, you will be proposed to remove this install script from your server,
  <br />which is a MUST to avoid bad people from corrupting your GuppY web site.
</div>';
$clean[3] = '
<div style="text-align:center;">
  <u>IMPORTANT:</u> make sure that you carefully read the <a href="../documentation/readme.html" target="_blank">readme.html</a> file (I even advise you to print it) before going on.
</div>';
$clean[3] = '
<div style="text-align:left;padding:0 64px;">
  <u><b>IMPORTANT :</b></u> read full
  <ul>
    <li>In the event of a migration, have you backed up your online site to your hard drive ?</li>
	<li>have you validated the site configurations, especially <b>General Setup</b> and <b>Services config</b> ?</li>
	<li>part of the structure of your site will be modified:
	  <ul>
	    <li>reorganization of the data in the data directory</li>
		<li>the skins will be as far as possible adapted to the new GuppY grid.</li>
	  </ul>
	</li>
  </ul>
</div>';
$clean[4] = 'Let\'s go!';
$clean[5] = '
<div style="text-align:center;">You are in <b>version %s</b> of Guppy.<br /><br />Choose what you want to do:</div>';
$clean[6] = 'Clean install';
$clean[7] = 'Data migration from your site to version 5';
$clean[8] = 'Deletion of install files';
$clean[9] = 'Go back to the home page of your site';
$clean[10] = 'DELETE INSTALL FILES OF GUPPY';
$clean[11] = '
<div style="text-align:center;">This script is ment:</div>
<ul>
  <li> to remove this install script from your server, which is a MUST to avoid bad people from corrupting your GuppY web site</li>
</ul>';
$clean[12] = 'Deletion of the install directory';
$clean[13] = '
<div style="text-align:center;">You are about to launch the deletion of the install files of GuppY.</div>';
$clean[14] = '
<div style="text-align:center;">Deletion of the install directory ON GOING.</div>';
$clean[15] = '
<div style="text-align:center;">Step #1/1 : Deletion of the install directory DONE.</div>';
$clean[16] = 'INSTALL GUPPY IN VERSION '.$version;
$clean[17] = '<div style="text-align:center;">This script is ment:</div><ul><li>for clearing the demo database shipped with GuppY version '.$version.' and for preparing your empty database</li></ul>';
$clean[18] = 'Clean install';
$clean[19] = '<div style="text-align:center;">You are about to launch a clean install.</div>';
$clean[20] = '<div style="text-align:center;">Clean install ON GOING.</div>';
$clean[21] = '<div style="text-align:center;">Step #1/2: Database deleted.</div>';
$clean[22] = '<div style="text-align:center;">Step #2/2: Empty database created.</div>';
$clean[23] = '<div style="text-align:center;">Clean install DONE.</div>';
$clean[24] = '<div style="text-align:center;">The install in version '.$version.' of GuppY is now over.</div>';
$clean[25] = 'Next';
$clean[26] = 'MIGRATE GUPPY TO VERSION '.$version;
$clean[27] = '<div style="text-align:center;">This script is ment:</div><ul><li>for migrating to GuppY version '.$version.' from a version 4.6</li></ul>';
$clean[28] = 'Migration to version '.$version;
$clean[29] = '<div style="text-align:center;">You are about to launch a migration to version '.$version.'</div>';
$clean[30] = '<div style="text-align:center;">Migration to version '.$version.' ON GOING.<br />ATTENTION! This process can be lengthy.</div>';
$clean[31] = 'Please enter the full name of the root folder of your backed up site<br />(ex: c:\name-of-my-backup-folder\)<br />(Don\'t forget the \ at the end.)';
$clean[32] = '<div style="text-align:center;">Removal of the obsolete files ON GOING.</div>';
$clean[33] = '<div style="text-align:left;">Step #1/11 : Folder admin/plugins done.</div>';
$clean[34] = '<div style="text-align:center;">Migration to version '.$version.' DONE.</div>';
$clean[35] = '<div style="text-align:left;">Step #2/11  : Folder data/dbdocs done.</div>';
$clean[36] = 'Please enter the name of your skin';
$clean[37] = '<div style="text-align:left;">Step #3/11  : Folder data/plugins done.</div>';
$clean[38] = '<div style="text-align:left;">Step #4/11  : Folder data/users done.</div>';
$clean[39] = '<div style="text-align:left;">Step #5/11  : Folder documentation/plugins done.</div>';
$clean[40] = '
<div class="bord notice" style="text-align:center;width:420px;margin:auto;padding:20px;font-size:2em;"><strong>Have you backed up your site?</strong></div>';
$clean[41] = 'Yes, I have saved the site, we can go';
$clean[42] = 'Whoops! I forgot, I back away...';
$clean[43] = '<div style="text-align:left;">Step #6/11  : Folder file done.</div>';
$clean[44] = '<div style="text-align:left;">Step #7/11  : Folder img done.</div>';
$clean[45] = '<div style="text-align:left;">Step #8/11  : Folder pages done.</div>';
$clean[46] = '<div style="text-align:left;">Step #9/11  : Folder photo done.</div>';
$clean[47] = '<div style="text-align:left;">Step #10/11 : Folder plugins done.</div>';
$clean[48] = '<div style="text-align:left;">Step #11/11 : Folder skins done.</div>';
$clean[49] = '<div style="text-align:left;">ERROR! Migrating to '.$version.' version. DISCONTINUED.</div>';

?>
fr-install.inc
wget 'https://sme10.lists2.roe3.org/guppy/install/fr-install.inc'
View Content
<?php
/*******************************************************************************
 *   Install Language Strings
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2020) : initial release
 ******************************************************************************/

if (stristr($_SERVER['SCRIPT_NAME'], 'fr-install.inc')) {
    header('location:../index.php');
    die();
}

$version = MP_VERSION;

$clean[0] = 'Non...';
$clean[1] = 'INSTALLATION OU MIGRATION DE GUPPY';
$clean[2] = '
<div style="text-align:center;">Ce script permet :</div>
<ul>
  <li>ou bien de vider la base de données de démonstration livrée avec GuppY version '.$version.' et de préparer votre base de données vierge</li>
  <li>ou bien de migrer les données de nécessaires de votre site sauvegardé en local</li>
</ul>
<div style="text-align:center;">
  Une fois l\'une de ces opérations réalisée, il vous sera proposé de supprimer ce script d\'installation de votre serveur,
  <br />opération INDISPENSABLE pour éviter que des personnes indélicates ne viennent corrompre votre site GuppY.
</div>';
$clean[3] = '
<div style="text-align:left;padding:0 64px;">
  <u><b>IMPORTANT :</b></u> à lire entièrement
  <ul>
    <li>dans le cas d\une migration, avez-vous sauvegardé votre site en ligne sur votre disque dur ?</li>
	<li>avez-vous validé les configurations du site, en particulier <b>Config générale</b> et <b>Config services</b> ?</li>
	<li>une partie de la structure de votre site sera modifiée :
	  <ul>
	    <li>réorganisation des données dans le répertoire data</li>
		<li>les skins seront dans la mesure du possible adaptées à la nouvelle grille de GuppY</li>
	  </ul>
	</li>
  </ul>
</div>';
$clean[4] = 'Allons-y !';
$clean[5] = '
<div style="text-align:center;">
  Vous êtes en <b>version %s</b> de Guppy.<br /><br />Choisissez ce que vous désirez faire :
</div>';
$clean[6] = 'Installation propre &nbsp;(effacement de la base de démonstration)';
$clean[7] = 'Migration des données de votre site en version 5';
$clean[8] = 'Suppression des fichiers d\'installation/migration';
$clean[9] = 'Retour à la page d\'accueil de votre site';
$clean[10] = 'SUPPRESSION DES FICHIERS D\'INSTALLATION DE GUPPY';
$clean[11] = '
<div style="text-align:center;">Ce script permet :</div>
<ul>
  <li> de supprimer ce script d\'installation de votre serveur, opération INDISPENSABLE pour éviter que des personnes indélicates ne viennent corrompre votre site GuppY</li>
</ul>';
$clean[12] = 'Suppression des fichiers d\'installation';
$clean[13] = '
<div style="text-align:center;">Vous êtes sur le point de supprimer les fichiers d\'installation de GuppY.</div>';
$clean[14] = '
<div style="text-align:center;">Suppression du répertoire d\'installation EN COURS.</div>';
$clean[15] = '
<div style="text-align:center;">Etape n°1/1 : Suppression du répertoire d\'installation TERMINEE.</div>';
$clean[16] = 'INSTALLATION DE GUPPY EN VERSION '.$version;
$clean[17] = '<div style="text-align:center;">Ce script permet :</div><ul><li>de vider la base de données de démonstration livrée avec GuppY version '.$version.' et de préparer votre base de données vierge</li></ul>';
$clean[18] = 'Installation propre';
$clean[19] = '<div style="text-align:center;">Vous êtes  sur le point de lancer une installation propre.</div>';
$clean[20] = '<div style="text-align:center;">Installation propre EN COURS.</div>';
$clean[21] = '<div style="text-align:center;">Etape n° 1/2 : Base de données supprimée.</div>';
$clean[22] = '<div style="text-align:center;">Etape n° 2/2 : Base de données vierge créée.</div>';
$clean[23] = '<div style="text-align:center;">Installation propre TERMINEE.</div>';
$clean[24] = '<div style="text-align:center;">L\'installation en version '.$version.' de GuppY est maintenant terminée.</div>';
$clean[25] = 'Suivant';
$clean[26] = 'MIGRATION DE VOTRE GUPPY VERSION 5 EN VERSION '.$version;
$clean[27] = '<div style="text-align:center;">Ce script permet :</div><ul><li>de migrer à la version '.$version.' de GuppY à partir d\'une version 5</li></ul>';
$clean[28] = '<div style="text-align:center;">Migration à la version '.$version.'</div>';
$clean[29] = '<div style="text-align:center;">Vous êtes sur le point de lancer une migration à la version '.$version.'</div>';
$clean[30] = '<div style="text-align:center;">Migration à la version '.$version.' EN COURS.<br />ATTENTION ! Cette opération peut être longue.</div>';
$clean[31] = 'Veuillez saisir le nom complet du dossier racine de votre site sauvegardé<br />(ex: c:\nom-du-dossier-de-ma-sauvegarde\)<br />(ne pas oublier le \ à la fin)';
$clean[32] = '<div style="text-align:center;">Suppression des fichiers obsolétes EN COURS.</div>';
$clean[33] = '<div style="text-align:left;">Etape n°1/11  : Dossier admin/plugins terminé.</div>';
$clean[34] = '<div style="text-align:center;">Migration à la version '.$version.' TERMINEE.</div>';
$clean[35] = '<div style="text-align:left;">Etape n°2/11  : Dossier data/dbdocs terminé.</div>';
$clean[36] = 'Veuillez saisir le nom de la skin utilisée';
$clean[37] = '<div style="text-align:left;">Etape n°3/11  : Dossier data/plugins terminé.</div>';
$clean[38] = '<div style="text-align:left;">Etape n°4/11  : Dossier data/users terminé.</div>';
$clean[39] = '<div style="text-align:left;">Etape n°5/11  : Dossier documentation/plugins terminé.</div>';
$clean[40] = '
<div class="bord notice" style="text-align:center;width:420px;margin:auto;padding:20px;font-size:2em;"><strong>Avez-vous sauvegardé votre site ?</strong></div>';
$clean[41] = 'Oui, j\'ai bien sauvegardé le site, on peut y aller';
$clean[42] = 'Oups ! j\'ai oublié, je sauvegarde de suite...';
$clean[43] = '<div style="text-align:left;">Etape n°6/11  : Dossier file terminé.</div>';
$clean[44] = '<div style="text-align:left;">Etape n°7/11  : Dossier img terminé.</div>';
$clean[45] = '<div style="text-align:left;">Etape n°8/11  : Dossier pages terminé.</div>';
$clean[46] = '<div style="text-align:left;">Etape n°9/11  : Dossier photo terminé.</div>';
$clean[47] = '<div style="text-align:left;">Etape n°10/11 : Dossier plugins terminé.</div>';
$clean[48] = '<div style="text-align:left;">Etape n°11/11 : Dossier skins terminé.</div>';
$clean[49] = '<div style="text-align:left;">ERREUR! Migration à la version '.$version.' ABANDONNEE.</div>';

?>
func_install.php
wget 'https://sme10.lists2.roe3.org/guppy/install/func_install.php'
View Content
<?php
/*******************************************************************************
 *   Functions Install
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2020) : initial release
 ******************************************************************************/

if (stristr($_SERVER['SCRIPT_NAME'], 'func_install.php')) {
  header('location:../index.php');
  die();
}

function DisplayHeader($refreshUrl = NULL) {
	global $meskin, $clean, $charset;
	echo '
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'.$clean[1].'</title>
<meta http-equiv="content-type" content="text/html; charset='.$charset.'" />';
    if (isset($refreshUrl) && '' != $refreshUrl) {
        echo '
<meta http-equiv="Refresh" content="2;URL='.str_replace('&', '&amp;', $refreshUrl).'">';
    }
	if (file_exists($meskin."style.css")) {
		echo '
<link type="text/css" rel="stylesheet" href="'.$meskin.'style.css" />';
	}
	else {
		echo '
<link type="text/css" rel="stylesheet" href="no_skin/style.css" />';
	}
	echo '
<link rel="stylesheet" href="'.CHEMIN.'inc/lang/flags.css" />
<link rel="stylesheet" href="'.CHEMIN.'inc/img/general/general.css" />
</head>
<body bgcolor="#FFFFFF">
<p style="text-align:center;"><i class="gen-gylogo"></i></p>';
}

function DisplayFooter() {
	echo '
<p style="text-align:center;">&nbsp;</p>
<p style="text-align:center;">GuppY v'.MP_VERSION.'<br />CeCILL free Licence - © '.MP_COPYRIGHT.'</p>
</body>
</html>';
}

function DisplayTitre($titre, $texte) {
	echo '
<div style="text-align:center;"><h3>'.$titre.'</h3></div>
<div style="width:1024px;margin:auto;">
  <table style="width:90%;margin:auto;">
    <tr>
	  <td class="quest"><br />'.$texte.'<br /></td>
	</tr>
  </table>
</div>
<br />';
}

function DisplayProcess($titre, $processus, $resultat) {
	DisplayTitre($titre, $processus);
	echo '
<p style="text-align:center;">&nbsp;</p>
<table style="width:480px;margin:auto;">
  <tr><td bgcolor="#FF9933" style="padding-left:10px;"><br />'.$resultat.'<br /></td></tr>
</table>';
}

function EraseInstall() {
	$dossier = opendir(CHEMIN.'install/');
	while ($fichier = readdir($dossier)) {
		if (is_file(CHEMIN.'install/'.$fichier)) {
			SetChmod(CHEMIN.'install/'.$fichier);
			@unlink(CHEMIN.'install/'.$fichier);
		}
	}
	closedir($dossier);
	SetChmod(CHEMIN.'install');
	SetChmod(CHEMIN.'install');
	@rmdir(CHEMIN.'install');
	if (file_exists(CHEMIN.'data/chk_install.dtb')) {
		SetChmod(CHEMIN.'data/chk_install.dtb');
		@unlink(CHEMIN.'data/chk_install.dtb');
	}
	if (file_exists(CHEMIN.'data/config/chk_install.dtb')) {
		SetChmod(CHEMIN.'data/config/chk_install.dtb');
		@unlink(CHEMIN.'data/config/chk_install.dtb');
	}
}

function CleanDataRep() {
	set_time_limit(0);
	
	RecursiveDeleteDir(CACHEREP);
	RecursiveDeleteDir(DOCSREP);
	RecursiveDeleteDir(STATSREP);
	$files = scandir(PHOTOREP);
	foreach ($files as $file) {
		if (substr($file, 0, 4) == 'gal_') {
			RecursiveRemoteDir(PHOTOREP.$file); 
		}
	}
}

function CreateInitStruct($meskin) {
    $mettre = '<?php
if (stristr($_SERVER["SCRIPT_NAME"], "confweb.inc")) {
    header("location:../index.php");
    die();
}

$site[4]  = stripslashes("1");  // Nouvelles sur la page d\'accueil
$site[20] = stripslashes("2"); // Messages Forum sur la page d\'accueil
// site[21] = stripslashes(""); // Inutilisé
$site[29] = stripslashes("80"); // Hauteur en pixels des nouvelles en page d\'accueil
$site[33] = stripslashes("80"); // Hauteur en pixels des billets en page d\'accueil
$site[34] = stripslashes("80"); // Hauteur en pixels des posts du forum en direct
$site[31] = stripslashes("1"); // Billets du blog sur la page d\'accueil

$serviz[28]  = stripslashes("on");  // Préférences visiteurs
$serviz[38]  = stripslashes("on");  // RSS News ON / OFF
$serviz[74]  = stripslashes("on"); // Cacher les boîtes en page d\'accueil

// Configurations accueil et pages secondaires
// $xposbox["E"][LS]
$xposbox["E"]["LS"][0] = stripslashes("");
$xposbox["E"]["LS"][1] = stripslashes("");
$xposbox["E"]["LS"][2] = stripslashes("");

// $xposbox["E"][L]
$xposbox["E"]["L"][0] = stripslashes("");
$xposbox["E"]["L"][1] = stripslashes("");
$xposbox["E"]["L"][2] = stripslashes("");

// $xposbox["E"][C]
$xposbox["E"]["C"][0] = stripslashes("");
$xposbox["E"]["C"][1] = stripslashes("");
$xposbox["E"]["C"][2] = stripslashes("");

// $xposbox["E"][R]
$xposbox["E"]["R"][0] = stripslashes("");
$xposbox["E"]["R"][1] = stripslashes("");
$xposbox["E"]["R"][2] = stripslashes("");

// $xposbox["E"][RS]
$xposbox["E"]["RS"][0] = stripslashes("");
$xposbox["E"]["RS"][1] = stripslashes("");
$xposbox["E"]["RS"][2] = stripslashes("");

// $xposbox["B"][L]
$xposbox["B"]["L"][0] = stripslashes("||fbox_blogcat");
$xposbox["B"]["L"][1] = stripslashes("||fbox_bloglast");
$xposbox["B"]["L"][2] = stripslashes("||fbox_blogcom");
$xposbox["B"]["L"][3] = stripslashes("||fbox_blogcal");
$xposbox["B"]["L"][4] = stripslashes("");
$xposbox["B"]["L"][5] = stripslashes("");

// $xposbox["B"][R]
$xposbox["B"]["R"][0] = stripslashes("");
$xposbox["B"]["R"][1] = stripslashes("");
$xposbox["B"]["R"][2] = stripslashes("");
$xposbox["B"]["R"][3] = stripslashes("");
$xposbox["B"]["R"][4] = stripslashes("");
$xposbox["B"]["R"][5] = stripslashes("");

// NE PAS SUPPRIMER $templates[0]
$templates[0] = stripslashes("Principale");
//////////////////// Principale ////////////////////
// $xposbox[Principale][L]
$xposbox[0]["L"][0] = stripslashes("");
$xposbox[0]["L"][1] = stripslashes("");
$xposbox[0]["L"][2] = stripslashes("");
$xposbox[0]["L"][3] = stripslashes("");
$xposbox[0]["L"][4] = stripslashes("");
$xposbox[0]["L"][5] = stripslashes("");
$xposbox[0]["L"][6] = stripslashes("");
$xposbox[0]["L"][7] = stripslashes("");
$xposbox[0]["L"][8] = stripslashes("");

// $xposbox[Principale][R]
$xposbox[0]["R"][0] = stripslashes("");
$xposbox[0]["R"][1] = stripslashes("");
$xposbox[0]["R"][2] = stripslashes("");
$xposbox[0]["R"][3] = stripslashes("");
$xposbox[0]["R"][4] = stripslashes("");
$xposbox[0]["R"][5] = stripslashes("");
$xposbox[0]["R"][6] = stripslashes("");
$xposbox[0]["R"][7] = stripslashes("");
$xposbox[0]["R"][8] = stripslashes("");

// $xposbox[Principale][A]
$xposbox[0]["A"][0] = stripslashes("");
$xposbox[0]["A"][1] = stripslashes("");

// $xposbox[Principale][U]
$xposbox[0]["U"][0] = stripslashes("");
$xposbox[0]["U"][1] = stripslashes("");

// $xposbox[Principale][T][LS]
$xposbox[0]["T"]["LS"][0] = stripslashes("||fbox_empty||W3");
$xposbox[0]["T"]["LS"][1] = stripslashes("");
$xposbox[0]["T"]["LS"][2] = stripslashes("");
$xposbox[0]["T"]["LS"][3] = stripslashes("");
$xposbox[0]["T"]["LS"][4] = stripslashes("");

// $xposbox[Principale][T][L]
$xposbox[0]["T"]["L"][0] = stripslashes("");
$xposbox[0]["T"]["L"][1] = stripslashes("");
$xposbox[0]["T"]["L"][2] = stripslashes("");
$xposbox[0]["T"]["L"][3] = stripslashes("");
$xposbox[0]["T"]["L"][4] = stripslashes("");

// $xposbox[Principale][T][C]
$xposbox[0]["T"]["C"][0] = stripslashes("||fbox_empty||W4");
$xposbox[0]["T"]["C"][1] = stripslashes("");
$xposbox[0]["T"]["C"][2] = stripslashes("");
$xposbox[0]["T"]["C"][3] = stripslashes("");
$xposbox[0]["T"]["C"][4] = stripslashes("");

// $xposbox[Principale][T][R]
$xposbox[0]["T"]["R"][0] = stripslashes("");
$xposbox[0]["T"]["R"][1] = stripslashes("");
$xposbox[0]["T"]["R"][2] = stripslashes("");
$xposbox[0]["T"]["R"][3] = stripslashes("");
$xposbox[0]["T"]["R"][4] = stripslashes("");

// $xposbox[Principale][T][RS]
$xposbox[0]["T"]["RS"][0] = stripslashes("||fbox_sidemenu||W5");
$xposbox[0]["T"]["RS"][1] = stripslashes("");
$xposbox[0]["T"]["RS"][2] = stripslashes("");
$xposbox[0]["T"]["RS"][3] = stripslashes("");
$xposbox[0]["T"]["RS"][4] = stripslashes("");

// $xposbox[Principale][B][LS]
$xposbox[0]["B"]["LS"][0] = stripslashes("");
$xposbox[0]["B"]["LS"][1] = stripslashes("");
$xposbox[0]["B"]["LS"][2] = stripslashes("");

// $xposbox[Principale][B][L]
$xposbox[0]["B"]["L"][0] = stripslashes("");
$xposbox[0]["B"]["L"][1] = stripslashes("");
$xposbox[0]["B"]["L"][2] = stripslashes("");

// $xposbox[Principale][B][C]
$xposbox[0]["B"]["C"][0] = stripslashes("");
$xposbox[0]["B"]["C"][1] = stripslashes("");
$xposbox[0]["B"]["C"][2] = stripslashes("");

// $xposbox[Principale][B][R]
$xposbox[0]["B"]["R"][0] = stripslashes("");
$xposbox[0]["B"]["R"][1] = stripslashes("");
$xposbox[0]["B"]["R"][2] = stripslashes("");

// $xposbox[Principale][B][RS]
$xposbox[0]["B"]["RS"][0] = stripslashes("");
$xposbox[0]["B"]["RS"][1] = stripslashes("");
$xposbox[0]["B"]["RS"][2] = stripslashes("");

?>
';
    WriteFullDB($meskin.'confweb.inc', $mettre);
}

function PrepareDataRep() {
    include CONFIG;
	set_time_limit(0);
	
	$index = array(ADMNOTES, NEWSLET_LIST, NEWSLET_WAIT, GROUPS, MEMBERS, GROUPSNWL, MEMBERSNWL, GROUPSCOL, MEMBERSCOL, 
                   DOCID, DOCDATES, CHILDREN, DBAGENDA, DBART, DBBLOG, DBNEWS, DBDNLOAD, DBFAQ, DBFORUMCAT, 
                   DBFORUM, DBTHREAD, DBLINKS, DBPHOTO, DBREACT, DBREBLOG, DBRSS, DBBSS, DBFREEBOX, DBMENUBOX, DBOPTMENU, 
				   DBMENUICO, DBSOCNET, DOCIDARCH, DBAGENDAARCHDATE, DBAGENDAARCH, DBBLOGARCHDATE, DBBLOGARCH, 
				   DBREBLOGARCH, DBNEWSARCHDATE, DBNEWSARCH, DBFORUMARCHDATE, DBFORUMARCH, DBTHREADARCH, 
				   DBIPSTATS, DBLOGBOOK, DBKEYWORDS, DBDDMENUBOX, DBOPTDDMENU);

	foreach($index as $idx) WriteFullDB($idx, '');
    
    CreateInitStruct('../skins/'.$page[14].'/');
	
	WriteFullDB(DBLOGDATE, date('d/m/y'));
	WriteFullDB(DBLOGSTATS, date('d/m/y').';0;');
	
	WriteCounter(NEXTID, 0);
	WriteCounter(NEXTIDBK, 0);
	WriteCounter(DBFORUMCOUNTER, 0);
	WriteCounter(DBCOUNTER, 0);
	WriteCounter(DBSTATS, 1);
	WriteCounter(DBSTATSBK, 1);

	$dbt = array();
	$dbt = InitDBlog(1);
	$dbt[0][0] = (integer) date("H");
	WriteDBFields(DBLOGH,$dbt);
	$dbt = array();
	$dbt = InitDBlog(24);
	$dbt[0][0] = (integer) date("d");
	WriteDBFields(DBLOGD,$dbt);
	$dbt = array();
	$dbt = InitDBlog(31);
	$dbt[0][0] = (integer) date("m");
	WriteDBFields(DBLOGM,$dbt);
	$dbt = array();
	$dbt = InitDBlog(12);
	$dbt[0][0] = (integer) date("Y");
	WriteDBFields(DBLOGY,$dbt);
}

?>
init.inc
wget 'https://sme10.lists2.roe3.org/guppy/install/init.inc'
View Content
<?php
/*******************************************************************************
 *   Install initialization
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of Jean-Michel Misrachi and the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.10 (September 22, 2022) : correction $cryptpass
 ******************************************************************************/

if (stristr($_SERVER['SCRIPT_NAME'], 'init.inc')) {
    header('location:../index.php');
    die();
}

$ctrl_spam = import('code_pseudo', 'POST');
$apseudo   = trim(import('apseudo', 'POST'));
$apseudo   = 1 == preg_match('/^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/', $apseudo) ? $apseudo : '';
$apass     = import('apass', 'POST', '');
$apass     = !ctrlPasswordOK($apass) ? '' : $apass;
$aemail    = checkEmail(CutLongWord(import('aemail', 'POST', '')));
if (!empty($apseudo) && !empty($apass) && !empty($aemail) && empty($ctrl_spam)) {
//    $cryptpass = crypt($uuid);
		$apachepassword  = Md5Crypt::apache ($uuid, $salt ='');
		$cryptpass     = $apachepassword;
    if (is_file(CHEMIN.'data/config/.htpasswd')) {
        $htpasswd = @file(CHEMIN.'data/config/.htpasswd');
        $protoht  = trim($htpasswd[0]);
        if (!empty($protoht)) $cryptpass = $protoht == '#:0-1-0' ? gy_crypt(CRYPT_KEY, $uuid) : crypt($uuid);
    }
    $userdb        = array();
    $userdb[0][0]  = md5($apass);
 //   $userdb[0][1]  = crypt($apass);
	$userdb[0][1]  =$cryptpass;
    $userdb[1][0]  = '0';
    $userdb[1][1]  = $lng;   
    $userdb[1][2]  = $apseudo;
    $userdb[1][3]  = $aemail;
    $userdb[1][4]  = '';
    $userdb[1][5]  = '';
    $userdb[1][6]  = '';
    $userdb[1][7]  = '';
    $userdb[1][8]  = md5($apass);
    $userdb[1][9]  = '';
    $userdb[1][10] = '';
    $userdb[1][11] = '';
    $userdb[1][12] = '';
    $userdb[1][13] = 'on';
    $userdb[1][14] = GetCurrentDateTime();
    $userdb[1][15] = GetCurrentDateTime();
    $userdb[1][16] = '';
    $userdb[1][17] = '';
    $userdb[1][18] = '';
    $userdb[1][19] = '';
    $userdb[1][20] = '';
    $userdb[1][21] = '';
    $userdb[1][22] = '';
    $userdb[1][23] = '';
    $userdb[1][24] = '';
    $userdb[1][25] = '';
    $userdb[1][26] = '';
    $userdb[1][27] = '';
    $userdb[1][28] = date('Ymd');
    $userdb[1][29] = '';
    $userdb[1][30] = '';
    $userdb[1][31] = 'ok';
    $userdb[2][0]  = $apseudo.CONNECTOR.GetCurrentDateTime().CONNECTOR.'&nbsp; '.$web[253].' '
        .sprintf($web[167], stripslashes($site[($lang[0] == $lng ? 0 : 11)]), $upseudo).CONNECTOR.'new'
        .CONNECTOR.CONNECTOR.CONNECTOR.CONNECTOR.$serviz[43].CONNECTOR.substr($page[23], 4);
    WriteDBFields(MSGREP.$apseudo.DBEXT, $userdb);
    include CONFIG;
    $dirname    = dirname($_SERVER['PHP_SELF']);
    $dirname    = substr($dirname, -1) == '/' ? $dirname : $dirname.'/';
    $site[3]    = (is_ssl() ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$dirname;
    $serviz[31] = $apseudo;
    include 'admin/inc/confupdt.inc';
    if (isset($_COOKIE[POST_COOKIE])) @setcookie(POST_COOKIE, '', -1, '/', $_DOMAIN, $_SECURE, $_HTTPONLY);
    echo BeginJavascript().'window.location="'.CHEMIN.'connect.php?lng='.$lng.'#z2";'.EndJavascript();
}
echo '
<style>
.modal {
  display: block;
  position: fixed;
  z-index: 99;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: yellow;
  text-align: left;
  width: 420px;
  max-width: 85%;
  margin: auto;
  padding: 10px 20px;
  border: 2px solid #888;
}
.title { margin: 30px 20px; }
.height { margin-top: 8px; }
.usr-password {
  font-size: 9px;
  text-transform: uppercase;
  position: absolute;
  cursor: pointer;
  margin: 6px 0 0 -20px;
}
.infomodal {
  color: #FF0000;
  font-weight: bold;
  text-align: center;
}
.pass button.btn { font-size: 1.62rem; }
.user .input-group-text {
  font-size: 16px;
  line-height: 0.6;
  margin-top: 4px;
}
.menuicon_flag { z-index: 0; }
</style>

<script>
$(document).ready(function(){
  $("#testuid").on("keyup", function(e) {
    var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\\\W).*$", "ig");
    var mediumRegex = new RegExp("^(?=.{8,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");
    var okRegex = new RegExp("(?=.{8,}).*", "g");
    if (okRegex.test($(this).val()) === false) {
      $("#testuid-strength").removeClass().addClass("alert alert-error").html("'.$help[21].'");
    } else if (strongRegex.test($(this).val())) {
      $("#testuid-strength").removeClass().addClass("alert alert-success").html("'.$help[22].'");
    } else if (mediumRegex.test($(this).val())) {
      $("#testuid-strength").removeClass().addClass("alert alert-info").html("'.$help[23].'");
    } else {
      $("#testuid-strength").removeClass().addClass("alert alert-error").html("'.$help[24].'");
    }
    return true;
  });
});
function VerifyFormAdmin() {
	var sto = "";
	var erreur = false;
	var pass   = document.useradmin.apass.value;
	var pass2  = document.useradmin.apass2.value;
	regexp = /^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/;
	if (!regexp.test(document.useradmin.apseudo.value)) {
		sto += "  - '.str_replace('"', '\"', stripslashes($web[266])).'\n";
		document.useradmin.apseudo.className = "errorInputText form-control";
		erreur = true;
	}
    regexp = /^\S{8,40}$/;
    if (!regexp.test(pass) || pass.length < 8) {
      sto += "  - '.str_replace('"', '\"', stripslashes($web[302])).'\n";
      document.useradmin.apass.className = "errorInputText form-control";
      erreur = true;
    }
	if (pass != pass2) {
		sto += "  - '.str_replace('"', '\"', stripslashes($web[466])).'\n";
		document.useradmin.apass.className = "errorInputText form-control";
		document.useradmin.apass2.className = "errorInputText form-control";
		erreur = true;
	}
	regexp = /^[^\.\s]+(\.[^\.\s]+)*@[^\.\s]+(\.[^\.\s]+)+$/;
	if (!regexp.test(document.useradmin.aemail.value)) {
		sto += "  - '.str_replace('"', '\"', stripslashes($web[42])).'\n";
		document.useradmin.aemail.className = "errorInputText form-control";
		erreur = true;
	}
	if (erreur) {
        sto = "'.str_replace('"', '\"', stripslashes($web[265])).'\n\n" + sto;
		alert(sto);
		return false;
	}
}
</script>';
$slng = strpos($endurl, '?lng=') > 0 || strpos($endurl, '&lng=') > 0 ? '' : 'lng='.$lng;
if ($slng != '') $endurl .= (strpos($endurl, '?') > 0) ? '&'.$slng : '?'.$slng;
$flagurl = str_replace('&', '&amp;', $endurl);
if ($lng == $lang[0]) $flagurl = str_replace('lng='.$lang[0], 'lng='.$lang[1], $flagurl); 
if ($lng == $lang[1]) $flagurl = str_replace('lng='.$lang[1], 'lng='.$lang[0], $flagurl); 
$flags = '
  <script>
    $(document).ready(function(){
      $(\'.menuiconflag\').popover({
        title:"'.$web[87].'",
        content:"'.($lng == $lang[0] ? $web[555].': <b>'.$lang[1].'</b>' : $web[556].': <b>'.$lang[0].'</b>').'",
        trigger:"hover",
        placement:"auto",
        html:true
      });
    });
  </script>
  <div class="menuIcons_flag">
    <a href="'.$flagurl.(strpos($flagurl, 'index.php') > 0 || strpos($flagurl, $urlrw[0]) > 0 ? '' 
        : $z2).'" class="menuiconflag" title="'.$web[87].'">
      <i class="flg-'.($lng == $lang[0] ? $lang[1] : $lang[0]).'" title="'.($lng == $lang[0] ? $lang[1] : $lang[0]).'"></i>
    </a>
  </div>';
$titre0 = 'Saisissez ici les identifiants qui seront ceux de l\'administrateur principal';
$titre1 = 'Enter here the IDs that will be those of the main administrator';
$after0 = 'Après validation de vos identifiants vous serez redirigé(e) vers le formulaire de connexion. Il faudra ensuite compléter votre compte.';
$after1 = 'After validating your login details you will be redirected to the login form. You will then need to complete your account.';
echo '
<div id="adminModal" class="modal">
  <div class="modal-content">'.$flags.'
    <h2 class="title text-center">'.($lng == $lang[0] ? $titre0 : $titre1).'</h2>
    <fieldset class="w-100 m-auto">
      <form name="useradmin" action="#" method="post" onsubmit="return VerifyFormAdmin(); return false;">
        <input type="hidden" name="validForm" value="send" />
        <div class="w-100 height">
          &bull; '.($lng == $lang[0] ? 'Votre pseudo' : 'Your login name').' :
          <span class="d-none"><input type="text" name="code_pseudo" value="" /></span>
        </div>
        <div class="user w-90 input-group mb-3">
          <div class="input-group-prepend">
            <span class="input-group-text"><i class="far fa-user"></i></span>
          </div>
          <input type="text" class="texte form-control" name="apseudo" value="'.$apseudo.'" />
        </div>
        <div class="w-100">
		  <div class="" id="testuid-strength"></div>
        </div>
        <div class="w-100 height">&bull; '.$web[300].' :</div>
        <div class="w-80 pass">
          <input data-toggle="password" id="testuid" class="texte form-control" type="password" name="apass" value="'.$apass.'" data-message="" />
        </div>
        <div class="w-100 height">&bull; '.$web[467].' :</div>
        <div class="w-80 pass">
          <input data-toggle="password" id="confirmuid" class="texte form-control" type="password" name="apass2" value="'.$apass2.'" data-message="" />
        </div>
        <div class="w-100 height">&bull; '.$web[50].'</div>
        <div class="user w-90 input-group mb-3">
          <div class="input-group-prepend">
            <span class="input-group-text"><i class="fas fa-at"></i></span>
          </div>
          <input type="text" class="texte form-control" name="aemail" value="'.$aemail.'" />
        </div>
        <p class="infomodal">'.($lng == $lang[0] ? $after0 : $after1).'</p>
        <p class="text-center">'.SubmitButton($web[154]).'</p>
      </form>
    </fieldset>
    <p></p>
  </div>
</div>';
?>
install.php
wget 'https://sme10.lists2.roe3.org/guppy/install/install.php'
View Content
<?php
/*******************************************************************************
 *   Install - GuppY PHP Script
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2020) : initial release
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../');
$selskin = 'no_skin';
include CHEMIN.'inc/includes.inc';
include $lng.'-install.inc';
include 'func_install.php';

include CONFIGREP.'dbversion.php';
$version = $DBversion;

$form = import('form');

if (empty($form)) {
	DisplayHeader();
	echo '
<p style="text-align:center;">
  <a href="Javascript: window.location=\'install.php?lng='.$lang[0].'\';">
    <i class="flg-'.$lang[0].'" title="'.$lang[0].'"></i>
  </a>
  &nbsp;&nbsp;&nbsp;&nbsp;
  <a href="Javascript: window.location=\'install.php?lng='.$lang[1].'\';">
    <i class="flg-'.$lang[1].'" title="'.$lang[1].'"></i>
  </a>
</p>';
	DisplayTitre($clean[1], $clean[2].'<br /><br />'.$clean[3]);
	echo '
  <form name="instal0" action="install.php?lng='.$lng.'" method="post">
    <input type="hidden" name="form" value="1"/>
    <div style="text-align:center;">'.SubmitButton($clean[4]).'</div>
  </form>
</div>';
} elseif ($form == '1') {
	DisplayHeader();
	DisplayTitre($clean[1], sprintf($clean[5], MP_VERSION));
	echo '
<form name="instal1" action="install.php?lng='.$lng.'" method="post">
  <table class="quest" style="width:480px;margin:auto;">';
	echo '
	<tr><td><label><input type="radio" name="form" value="2"/>&nbsp;&nbsp;'.$clean[6].'</label></td></tr>
	<tr><td>&nbsp;</td>';
	echo '
	<tr><td><label><input type="radio" name="form" value="3"/>&nbsp;&nbsp;'.$clean[7].'</label></td></tr>
	<tr><td>&nbsp;</td>';
	echo '
	<tr><td><label><input type="radio" name="form" value="4"/>&nbsp;&nbsp;'.$clean[8].'</label></td></tr>
	<tr><td>&nbsp;</td>
	<tr><td><hr /><label><input type="radio" name="form" value="5"/>&nbsp;&nbsp;'.$clean[9].'</label></td></tr>
	<tr><td>&nbsp;</td>
  </table>
  <div style="text-align:center;"><br />'.SubmitButton($clean[4]).'</div>
</form>';
} elseif ($form == '2') {
	DisplayHeader('cleanup.php?lng='.$lng);
    exit();
} elseif ($form == '3') {
	DisplayHeader('migrate50.php?lng='.$lng);
	exit();
} elseif ($form == '4') {
	DisplayHeader('delete.php?lng='.$lng);
    exit();
} else {
	DisplayHeader(CHEMIN.'index.php?lng='.$lng);
    exit();
}

DisplayFooter();
?>
migrate50.php
wget 'https://sme10.lists2.roe3.org/guppy/install/migrate50.php'
View Content
<?php
/*******************************************************************************
 *   Migrate from previous version 5
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2020 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = https://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V6 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.17 (December 14, 2024) : modify migration copy selected skins
 ******************************************************************************/

header("Pragma: no-cache");
define('CHEMIN', '../');
$selskin = 'no_skin';
include CHEMIN.'inc/includes.inc';
include $lng.'-install.inc';
include 'func_install.php';

$form    = import('form');
$doing   = import('doing');
$step    = import('step');
$dossier = import('dossier');
$nskin   = import('nskin');

if (empty($form)) {
	if (empty($doing)) {
        DisplayHeader();
        DisplayTitre($clean[26], $clean[29]);
        echo '
<form name="instal0" action="migrate50.php?lng='.$lng.'&amp;doing=1" method="post">
  <div style="text-align:center;">'.SubmitButton($clean[25]).'
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="window.location=\'install.php?lng='.$lng.'&form=1\';">'.$clean[0].'</button>
  </div>
</form>';
	} elseif ($doing == '1') {
        DisplayHeader();
        DisplayTitre($clean[26], $clean[29]);
        echo '
<form name="instal1" action="migrate50.php?lng='.$lng.'&doing=2" method="post">
  <div style="text-align:center;">'.$clean[31].'</div>
  <div style="text-align:center;"><input typ="text" name="dossier" class="form-control texte" size="45" /></div>
  <div style="text-align:center;">'.$clean[36].'</div>
  <div style="text-align:center;"><input typ="text" name="nskin" class="form-control texte" size="25" /></div>
  <div style="text-align:center;">'.SubmitButton($clean[25]).'
    <button type="reset" style="cursor:pointer;" title="'.$clean[0].'" onclick="window.location=\'install.php?lng='.$lng.'&form=1\';">'.$clean[0].'</button>
  </div>
</form>';
	} 
    elseif (is_dir($dossier)) {
        set_time_limit(0);
        if ($doing == '2') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=3');
            @RecursiveDeleteDir(CHEMIN.'admin/plugins');
            @recursiveCopy($dossier.'admin/plugins', CHEMIN.'admin/plugins');
            DisplayProcess($clean[26], $clean[30], $clean[33]);
        }
        elseif ($doing == '3') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=4');
            @RecursiveDeleteDir(CHEMIN.'data/dbdocs');
            @recursiveCopy($dossier.'data/dbdocs', CHEMIN.'data/dbdocs');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35]);
        }
        elseif ($doing == '4') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=5');
            @RecursiveDeleteDir(CHEMIN.'data/plugins');
            @recursiveCopy($dossier.'data/plugins', CHEMIN.'data/plugins');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37]);
        }
        elseif ($doing == '5') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=6');
            @RecursiveDeleteDir(CHEMIN.'data/users');
            @recursiveCopy($dossier.'data/users', CHEMIN.'data/users');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38]);
        }
        elseif ($doing == '6') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=7');        
            @RecursiveDeleteDir(CHEMIN.'documentation/plugins');
            @recursiveCopy($dossier.'documentation/plugins', CHEMIN.'documentation/plugins');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39]);
        }
        elseif ($doing == '7') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=8');        
            if (file_exists(CHEMIN.'file')) @RecursiveDeleteDir(CHEMIN.'file');
			if (file_exists($dossier.'file')) @recursiveCopy($dossier.'file', CHEMIN.'file');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39].$clean[43]);
        }
        elseif ($doing == '8') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=9');        
            @RecursiveDeleteDir(CHEMIN.'img');
            @recursiveCopy($dossier.'img', CHEMIN.'img');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39].$clean[43].$clean[44]);
        }
        elseif ($doing == '9') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=10');        
            @RecursiveDeleteDir(CHEMIN.'pages');
            @recursiveCopy($dossier.'pages', CHEMIN.'pages');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39].$clean[43].$clean[44].$clean[45]);
        }
        elseif ($doing == '10') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=11');        
            @RecursiveDeleteDir(CHEMIN.'photo');
            @recursiveCopy($dossier.'photo', CHEMIN.'photo');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39].$clean[43].$clean[44].$clean[45].$clean[46]);
        }
        elseif ($doing == '11') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=12');        
            @RecursiveDeleteDir(CHEMIN.'plugins');
            @recursiveCopy($dossier.'plugins', CHEMIN.'plugins');
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39].$clean[43].$clean[44].$clean[45].$clean[46].$clean[47]);
        }
        elseif ($doing == '12') {
            DisplayHeader('migrate50.php?lng='.$lng.'&dossier='.$dossier.'&doing=13');        
//            @recursiveCopy($dossier.'skins', CHEMIN.'skins');
			$files = scandir($dossier.'skins');
			foreach ($files as $file) {
				if (!file_exists(CHEMIN.'skins/'.$file)) {
					@recursiveCopy($dossier.'skins/'.$file, CHEMIN.'skins/'.$file); 
				}
			}
            if (@is_dir(CHEMIN.'skins/'.$nskin)) {
                include_once CONFIG;
                $page[14] = $nskin;
                include CHEMIN.'admin/inc/confupdt.inc';
            }
            $meskin = CHEMIN.'skins/';
			if (!isset($page[14]))  $page[14] = 'no_skin';
			if ($page[14] != '')  $meskin .= $page[14].'/';
			else $meskin .= 'no_skin/';
            if (is_dir($meskin)) {
                include $meskin.'confweb.inc';
                foreach (array('fbox_poll', 'fbox_news') as $fbox) {
                    foreach ($templates as $key=>$tmpl) {
                        foreach (array(BOX_LEFT, BOX_RIGHT, BOX_ABOVE, BOX_UNDER) as $subarray) {
                            for ($i = 0; $i < count($xposbox[$key][$subarray]) - 1; $i++) {
                                $str = $xposbox[$key][$subarray][$i];
                                $xposbox[$key][$subarray][$i] = (1 == preg_match('!^'.$fbox.'!', $str) ? '' : $str);
                            }
                        }
                        foreach (array(BOX_TOP, BOX_BOTTOM) as $array) {
                            foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $subarray) {
                                for ($i = 0; $i < count($xposbox[$key][$array][$subarray]) - 1; $i++) {
                                    $str = $xposbox[$key][$array][$subarray][$i];
                                    $xposbox[$key][$array][$subarray][$i] = (1 == preg_match('!^'.$fbox.'!', $str) ? '' : $str);
                                }
                            }
                        }
                    }
                }
                @include CHEMIN.'admin/inc/confweb.inc';
            }
            DisplayProcess($clean[26], $clean[30], $clean[33].$clean[35].$clean[37].$clean[38].$clean[39].$clean[43].$clean[44].$clean[45].$clean[46].$clean[47].$clean[48]);
        } 
        elseif ($doing == '13') {
            DisplayTitre($clean[26], $clean[34]);
            echo '
<form name="instal2" action="install.php?lng='.$lng.'&amp;form=1" method="post">
  <div style="text-align:center;">'.SubmitButton($clean[25]).'</div>
</form>';
        }
    } 
    else {
        DisplayTitre($clean[26], $clean[49]);
        echo '
<form name="instal2" action="install.php?lng='.$lng.'&amp;form=1" method="post">
  <div style="text-align:center;">'.SubmitButton($clean[25]).'</div>
</form>';
    }
}

DisplayFooter();
?>