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`).

codemirror
img
about.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/about.inc'
View Content
<?php
/*******************************************************************************
 *   About window
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[277];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[277], "100%");
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=946&mnuid=937&tconfig=0#z2').'</p>';
echo '
<div class="w-100 m-auto" style="max-width:640px;">
  <div class="row">
    <div class="col-md-4 text-center px-5" style="padding-right:10px;">
      <i class="gen-gylogo" title="Logo"></i>
    </div>
    <div class="col-md-8 text-left" style="font-size:14px;">
      <span style="font-size:20px;"><strong>GuppY v'.MP_VERSION.'</strong></span><br />
      '.MP_DATE.'<br />CeCILL Copyright&nbsp; <span style="font-size:14px;"><strong>&copy;</strong></span>&nbsp; '.MP_COPYRIGHT.' :
      <strong>Laurent Duveau</strong><br />
      Initiated by Laurent Duveau and Nicolas Alves<br />
	  V6 developed by Lud Bienaimé<br />
      &nbsp;&nbsp;&nbsp;with the participation of the GuppY Team
    </div>
  </div>
</div>
<br />
<p style="text-align:center;">GuppY\'s Web site&nbsp;:&nbsp;&nbsp;<a href="https://www.freeguppy.org/">https://www.freeguppy.org/</a></p>
<br />
<p style="text-align:center;"><strong>===&nbsp; Credits &nbsp;===</strong></p>
<div id="credit" class="rep w-98 m-auto text-left overflow-auto" style="max-width:640px;height:300px;">
The GuppY Team is made of real friendly
international people. Thanks to all of you guys!<br />
<br />
As many people have given a hand in this project,
I just cannot write something about all of them,
so <b>let me just focus on the team</b>
and <b>look at the scrolling area below.</b><br />
<br />
<strong>aldweb</strong> (that\'s me!, from France)<br />
- GuppY\'s creator and first developper.<br />
<br />
<strong>Saxbar</strong> (the "composer and musician" of php)<br />
- Saxbar, Since August 2011 all GuppY versions rose from his keyboard, developper GuppY 5.0<br />
  and this will not surprise you as computing, php and javascript writing <br />
  and last but not least music are his passions<br />
<br />  
<strong>JeandePeyrat</strong> (The "Servers\' servant!")<br />
- JeandePeyrat,  GuppY Team administrator, president of the association freeGuppY,<br />
  forum moderator,  freeGuppY servers maintenance has no secrets for Jean.<br />
<br />
<strong>Papinou</strong> (The "The wizard of CSS")<br />
- Papinou, administrator GuppY Team, Treasurer of the association freeGuppY,<br />
  forum moderator, interested in everything concerning CSS style sheets and not bad at all at English!<br />
<br />
<strong>Djchouix</strong> (The scientist)<br />
- Djchouix, a great developper working also noiselessy.<br />
  He is the author of the new editors of GuppY<br />
<br />
<strong>Corrector</strong> (The"king of translation")<br />
- Corrector, the English language is his second mother tongue, but the corrections<br />
  of the French language are also his line. He is especially hard on Frenglish.<br />
<br />
<strong>Sabine</strong> ("fairy design")<br />
- Sabine, in a jiffy you have an excellent design for a Guppy site and is in Quebec.<br />
  Check out the tutorial skins of 5.0.0 and you will be convinced!<br />
<br />
<strong>La Vache Qui Rêve</strong> (the dreaming cow! as she has named herself)<br />
- La Vache qui rêve, (GuppYed, tutos) GuppYed administrator and tutorials specialist<br />
  in addition to keeping our stable tidy.<br />
<br />
<strong>Fred68</strong> (GuppYed, tutos)<br />
- GuppYed administrator and  tutorials specialist, an excellent tutorial for CKEditor is one of his major works.<br />
<br />
<strong>Pascal31</strong> (GuppYLand)<br />
- GuppYLand administrator, designer of the homepage presentation.<br />
<br />
<strong>jerlal</strong> (GuppYLand)<br />
-  GuppYLand administrator, alpha versions beta-tester , or fierce squeak-buster ...<br />
<br />
Thanks to <strong>JeanMi</strong> for his help, for advice, for the solutions with perfect knowledge of GuppY!.<br />
<br />
Let\'s also thank all the GuppY Team, people who provided the GuppY Team with aid, nice comments and improvement ideas.<br />
<br />
</div>';
include CHEMIN.'admin/inc/generic.inc';
echo '
<p style="text-align:center;"><strong>===&nbsp; Licence &nbsp;===</strong></p>
<div id="licence" class="rep w-98 m-auto text-left overflow-auto p-4" style="max-width:640px;height:168px;">
This software is free, you can distribute it and/or
modify it accordingly to the CeCILL License.<br />
CEA  CNRS and INRIA, great French organizations released CeCILL in July 2004.
CeCILL is the first license defining the principles
of use and dissemination of Free Software in
conformance with French law, following the
principles of the GNU GPL.<br />
<br />
This software is distributed because it might be useful, but it comes WITHOUT ANY
WARRANTY OF ANY KIND, either expressed or implied,
including, but not limited to, the implied
warranties of merchantability and fitness for a
particular purpose. Please refer to
<a href="http://www.cecill.info/index.en.html" target="blank">http://www.cecill.info/index.en.html</a>
for more detailed information.<br />
<br />
You should have received a copy of the CeCILL free
 License at the same time you received this
software ; if this were not the case, please send
 an e-mail to "info@cecill.info".<br />
</div>';
include 'infos.inc'; 

btable();
include CHEMIN.'admin/bpage.inc';
?>
access.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/access.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Acces
 *******************************************************************************
 *   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"], "access.inc")) {
	header("location:../index.php");
	die();
}

include CHEMIN.'admin/hpage.inc';
htable($admin[848], "100%");

echo '
<p style="text-align:center">'.$admin[847].'<b> '.$nomzone.'</b><br /></p>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
admfunctions.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/admfunctions.php'
View Content
<?php
/*******************************************************************************
 *   Admin functions
 *******************************************************************************
 *   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.19 (August 26, 2024) : Function Tohelp modify
 ******************************************************************************/

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

/*******************************************************************************
 * function SelectTimeZone
 *
 * retourne le code HTML de la balise "select" permettant de choisir un TimeZone
 *
 * @param string $select_TZ   : nom du TimeZone sélectionné
 *     si vide alors remplacé par le TimeZone du serveur
 * @param string $select_name : valeur de l'attribut "name" de la balise "select"
 *     si vide alors remplacé par la chaine "TZ"
 * @param string $select_id   : valeur de l'attribut "id" de la balise "select"
 *     si vide alors remplacé par la chaine "TZ"
 * @param numeric $size       : valeur de l'attribut "size" de la balise "select"
 *     si vide ou incorrect alors la taille utilisée vaut 1
 * @return string             : retourne le code HTML de la balise "select"
 ******************************************************************************/
function SelectTimeZone($selected_TZ = '', $select_name = '', $select_id = '', $size = 1) {
    $select_TZ = empty($select_TZ) ? date_default_timezone_get() : $selected_TZ;
    $select_name = empty($select_name) ? 'TZ' : $select_name;
    $select_id = empty($select_id) ? 'TZ' : $select_id;
    $size = !empty($size) && is_numeric($size) && $size > 0 ? $size : 1;
    $list_TZ = version_compare(phpversion(), '5.2', '>=') ? DateTimeZone::listIdentifiers() : array($select_TZ);
    $html = '
<select class="form-control" id="'.$select_id.'" name="'.$select_name.'" size="'.$size.'" style="vertical-align:top">';
    $current_zone = '';
    foreach($list_TZ as $TZ) {
        $tmp = explode('/', $TZ);
        $zone = $tmp[0];
        $city = isset($tmp[1]) ? $tmp[1] : '';
        if ($current_zone == $zone) {
            $html .= '
    <option value="'.$TZ.'"'.Selected($selected_TZ == $TZ).'>'.$TZ.'</option>';
        } else {
            if (!empty($current_zone)) {
                $html .= '
  </optgroup>';
            }
            if (empty($city)) {
                $current_zone = '';
            } else {
                $current_zone = $zone;
                $html .= '
  <optgroup label="'.$current_zone.'">';
            }
            $html .= '
    <option value="'.$TZ.'"'.Selected($selected_TZ == $TZ).'>'.$TZ.'</option>';
        }
    }
    if (!empty($current_zone)) {
        $html .= '
  </optgroup>';
    }
    $html .= '
</select>';
    return $html;
}


/*******************************************************************************
 * $boxes est le tableau des boîtes disponibles
 *
 *  label    => nom de la boîte
 *  accept   => emplacements possibles pour cette boîte
 *              L(eft) R(ight)  : empacements latéraux
 *              T(op)           : emplacements en haut du site
 *              A(bove) U(nder) : emplacements au-dessus et au-dessous de la partie principale
 *              B(ottom)        : emplacements en bas du site
 *              E(ditorial)     : emplacements de la page Editorial
 *  include  => nom du fichier à inclure
 *  function => nom de la fonction à exécuter (facultatif)
 *  args => arguments (jusqu'à 5 séparés par une virgule) qui seront passés à la fonction
 ******************************************************************************/
$boxes = array(
    array( 'label'=>$admin[335]   ,'accept'=>'LRAUTBE'   ,'include'=>'' ,'function'=>''              ,'args'=>''),
    array( 'label'=>$admin[1543] ,'accept'=>'LRAUTBE'    ,'include'=>'' ,'function'=>'fbox_empty'    ,'args'=>''),
    array( 'label'=>$admin[364]   ,'accept'=>'LRAUTBE'   ,'include'=>'' ,'function'=>'fbox_search'   ,'args'=>''),
    array( 'label'=>$admin[364].' 2','accept'=>'LRAUTBE' ,'include'=>'' ,'function'=>'fbox_search2'  ,'args'=>''),
    array( 'label'=>$admin[1446] ,'accept'=>'LRTBE'      ,'include'=>'' ,'function'=>'fbox_contact'  ,'args'=>''),
    array( 'label'=>$admin[369]  ,'accept'=>'LRTB'       ,'include'=>'' ,'function'=>'fbox_count'    ,'args'=>''),
    array( 'label'=>$admin[450]  ,'accept'=>'LRTB'       ,'include'=>'' ,'function'=>'fbox_user'     ,'args'=>''),
    array( 'label'=>$admin[367]  ,'accept'=>'LRTB'       ,'include'=>'' ,'function'=>'fbox_webm'     ,'args'=>''),
    array( 'label'=>$admin[408]  ,'accept'=>'LRTB'       ,'include'=>'' ,'function'=>'fbox_cal'      ,'args'=>''),
    array( 'label'=>$admin[547]  ,'accept'=>'LRTB'       ,'include'=>'' ,'function'=>'fbox_newslet'  ,'args'=>''),
    array( 'label'=>$admin[1456] ,'accept'=>'LRAUTBE'    ,'include'=>'' ,'function'=>'fbox_photobox' ,'args'=>''),
    array( 'label'=>$admin[609]  ,'accept'=>'LRTBE'      ,'include'=>'' ,'function'=>'fbox_rss'      ,'args'=>''),
    array( 'label'=>$admin[876]  ,'accept'=>'LRTBE'      ,'include'=>'' ,'function'=>'fbox_menu'     ,'args'=>''),
    array( 'label'=>$admin[1766] ,'accept'=>'TB'         ,'include'=>'' ,'function'=>'fbox_sidemenu' ,'args'=>''),
    array( 'label'=>$admin[879]  ,'accept'=>'LRTBE'      ,'include'=>'' ,'function'=>'fbox_logo'     ,'args'=>''),
    array( 'label'=>$admin[6]    ,'accept'=>'LRAUTBE'    ,'include'=>'' ,'function'=>'fbox_cita'     ,'args'=>''),
    array( 'label'=>$admin[263]  ,'accept'=>'AUTBE'      ,'include'=>'' ,'function'=>'fbox_ban'      ,'args'=>''),
    array( 'label'=>$admin[466]  ,'accept'=>'E'          ,'include'=>'' ,'function'=>'fbox_forum'    ,'args'=>''),
    array( 'label'=>$admin[468]  ,'accept'=>'E'          ,'include'=>'' ,'function'=>'fbox_news'     ,'args'=>''),
    array( 'label'=>$admin[336]  ,'accept'=>'LRAUTBE'    ,'include'=>'' ,'function'=>'fbox_socnet'   ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[42] : $nom[43]).' - '.$admin[1672]
                                 ,'accept'=>'LRE'        ,'include'=>'' ,'function'=>'fbox_blogcat'  ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[42] : $nom[43]).' - '.$admin[1673]
                                 ,'accept'=>'LRE'        ,'include'=>'' ,'function'=>'fbox_bloglast' ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[42] : $nom[43]).' - '.$admin[1674]
                                 ,'accept'=>'LRE'        ,'include'=>'' ,'function'=>'fbox_blogcom'  ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[42] : $nom[43]).' - '.$admin[1675]
                                 ,'accept'=>'LRE'        ,'include'=>'' ,'function'=>'fbox_blogcal'  ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[42] : $nom[43]).' - '.$admin[1676]
                                 ,'accept'=>'LRE'        ,'include'=>'' ,'function'=>'fbox_blogrss'  ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[42] : $nom[43]).' - '.$admin[1675].' '.$admin[770]
                                 ,'accept'=>'LRE'        ,'include'=>'' ,'function'=>'fbox_blogarch' ,'args'=>''),
    array( 'label'=>$admin[779]  ,'accept'=>'E'          ,'include'=>'' ,'function'=>'fbox_blog'     ,'args'=>''),
    array( 'label'=>$admin[1668] ,'accept'=>'AUTB'       ,'include'=>'' ,'function'=>'fbox_ariane'   ,'args'=>''),
    array( 'label'=>$admin[1084] ,'accept'=>'LRAUTB'     ,'include'=>'' ,'function'=>'fbox_print'    ,'args'=>''),
    array( 'label'=>($lng == $lang[0] ? $nom[54] : $nom[55])
                                 ,'accept'=>'LRAUTBE'    ,'include'=>'' ,'function'=>'fbox_lastdoc'  ,'args'=>'')
    );

/*******************************************************************************
 * Fonction permettant de déclarer une boîte capable de prendre place dans un
 * des emplacements disponible
 *
 * @param string $label nom de la boîte
 * @param string $include chemin du fichier à inclure contenant la fonction
 * @param string $function nom de la fonction créant le code de la boite
 * @param mixed $args tableau ou chaine contenant les arguments à passer à la fonction
 * @param string $accept liste des emplacements pouvant recevoir la boite
 * @return void
 ******************************************************************************/
function AddBoxToBoxesList($label, $include, $function, $args = '', $accept = 'LRAUTBE') {
    global $boxes;
    $boxes[] = array(
        'label'     => $label,
        'include'   => $include,
        'function'  => $function,
        'args'      => is_array($args) ? implode(',', $args) : $args,
        'accept'    => empty($accept) ? 'LRAUTBE' : $accept
    );
}

/*******************************************************************************
 * Fonction ajoutant les boites libres à la liste des boites disponibles pour
 * les emplacements
 ******************************************************************************/
function AddFreeBoxes() {
    global $lng, $lang, $admin;
    $fbs = ReadDbFields(DBFREEBOX);
    foreach ($fbs as $fb) {
        $boxname = $lng == $lang[0] ? $fb[2] : $fb[3];
        if (empty($boxname)) $boxname = '&lt; '.$admin[1088].' &gt;';
        AddBoxToBoxesList(
            sprintf('FB %d : %s', $fb[4], $boxname),
            '',
            'fbox_freebox',
            $fb[4],
            $fb[0]
        );
    }
}

/*******************************************************************************
 * Fonction ajoutant les boites menus à la liste des boites disponibles pour
 * les emplacements
 ******************************************************************************/
function AddMenuBoxes() {
    global $lng, $lang, $admin;
    $mbs = ReadDbFields(DBMENUBOX);
    foreach ($mbs as $mb) {
        $boxname = $lng == $lang[0] ? $mb[2] : $mb[3];
        AddBoxToBoxesList(
            sprintf('MNU %d : %s', $mb[4], $boxname),
            '',
            'fbox_menubox',
            $mb[4],
            $mb[0]
        );
    }
}

/*******************************************************************************
 * Fonction ajoutant les boites menus déroulants à la liste des boites 
 * disponibles pour les emplacements
 ******************************************************************************/
function AddDDMenuBoxes() {
    global $lng, $lang, $admin;
    $mbs = ReadDbFields(DBDDMENUBOX);
    foreach ($mbs as $mb) {
        $boxname = $lng == $lang[0] ? $mb[2] : $mb[3];
        AddBoxToBoxesList(
            sprintf('%s %d : %s', $mb[1], $mb[4], $boxname),
            '',
            'fbox_ddmenubox',
            $mb[4],
            $mb[0]
        );
    }
}

/******************************************************************************/

function getLabelBox($boxes, $fct) {
	$args = '';
	$pos  = strrpos($fct, CONNECTOR);
	if ($pos > 0) {
		$args = substr($fct, $pos + 2);
		$fct  = substr($fct, 0, $pos);
	}
	$label = '';
    foreach ($boxes as $box) {
        if ($fct == $box['function'] && $args == $box['args']) {
            $label = $box['label'];
        }
    }
    return $label;
}

/******************************************************************************/

function WriteSelectBox($name, $value, $boxes, $center=false, $border=false, $wname='', $wvalue='') {
    $style = ' style="';
    if ($center && !$border) {
        $style .= 'text-align:center;"';
    } elseif (!$center && $border) {
        $style .= '" class="quest"';
    } elseif ($center && $border) {
        $style .= 'text-align:center;" class="quest"';
    } else {
        $style .= '"';
    }
    echo '
        <div '.$style.'>
          <div class="d-inline-block">
            <select class="form-control" name="'.$name.'" style="width:145px;">';
    foreach ($boxes as $label=>$code) {
        echo '
              <option value="'.$code.'"'.Selected($value == $code).'>'.$label.'</option>';
    }
    echo '
            </select>
          </div>';
	if (!empty($wname)) 
		echo '
          <div class="d-inline-block">
			&nbsp;&nbsp;L= <input name="'.$wname.'" class="texte" style="max-width:36px;" type="text" size="1" value="'.$wvalue.'" />
          </div>';
	echo '
        </div>';
}


/******************************************************************************/

function WriteColumnSelectBoxes($basename, $values, $boxes, $center=false, $border=false, $wbname='', $wbvalues=array()) {
    echo '
        <div style="text-align:center;padding:5px 1px;">';
    foreach($values as $key => $value) {
		$wbvalue = !empty($wbvalues) ? $wbvalues[$key] : '';
		$wname  = empty($wbname) ? '' : $wbname.'['.$key.']';
        echo WriteSelectBox($basename.'['.$key.']', $value, $boxes, $center, $border, $wname, $wbvalue);
    }
    echo '
        </div>';
}


/******************************************************************************/

function TestPosBoxes(&$box, $min, $free=0) {
    if ($free != 0) {
        /// on modifie le tableau pour qu'il y ait $free emplacements libres en fin de tableau
        $nfree = 0;
        foreach ($box as $item) {
            if ($item == '') $nfree++; else $nfree = 0;
        }
        if ($nfree < $free) {
            /// on ajoute les emplacements manquants
            while ($nfree < $free) {
                $box[] = '';
                $nfree++;
            }
        } elseif ($nfree > $free) {
            /// on supprime les emplacements surnuméraires
            while ($nfree > $free) {
                array_pop($box);
                $nfree--;
            }
        }
    }
    /// on ajoute des emplacements s'il ni en a pas le nombre minimal $min
    while(count($box) < $min) $box[] = '';
}


/******************************************************************************/

function TestSizeBoxes(&$box1, &$box2, &$box3 = NULL, &$box4 = NULL, &$box5 = NULL) {
    if (isset($box3)) {
        $max = max(count($box1), count($box2), count($box3));
        if (isset($box4)) $max = max($max, count($box4));
        if (isset($box5)) $max = max($max, count($box5));
        while (count($box1) < $max) $box1[] = '';
        while (count($box2) < $max) $box2[] = '';
        while (count($box3) < $max) $box3[] = '';
        if (isset($box4)) while (count($box4) < $max) $box4[] = '';
        if (isset($box5)) while (count($box5) < $max) $box5[] = '';
    } else {
        $max = max(count($box1), count($box2));
        while (count($box1) < $max) $box1[] = '';
        while (count($box2) < $max) $box2[] = '';
    }
}

/******************************************************************************/

function ToHelp($lng, $name, $hwin=700) {
	global $admin, $serviz;
	return '
<script>
var to = "";
var shref = "'.HLPREP.$lng.$name.'";
var rhref = "'.REMOTEHLP.$lng.$name.'";
function CreateHelp() {
	if (to == "on") whref = shref; else whref = rhref;
	wh = window.open(whref, \'help\', \'resizable=yes,status=no,location=no,toolbar=yes,menubar=no,scrollbars=yes,width=1100,height='.$hwin.',left=0,top=0\');
	wh.focus();
}
function OpenHelp() {
	if ((typeof(wh) == "undefined") || (wh.closed == true)) {
		CreateHelp();
	} else {
		wh.close();
		CreateHelp();
	}
	return;
}
</script>
<a href="'.REMOTEHLP.$lng.'-help-'.$name.'" onclick="OpenHelp(); return false;">
  <i class="fas fa-question-circle text-primary float-right c-pointer mr-2 mt-n3" style="font-size: 2.6rem;" title="'.$admin[1265].'"></i>
</a>';
}

/******************************************************************************/
	
function GetArtOptMenu($id, $typ) {
    global $lang, $lng, $admin, $userprefs, $fctwri;
	$oms = '';
    $cnt = 0;
	$dbw = SelectDBFieldsByField(ReadDBFields(DBARTMENU), 0, $id);
	if (count($dbw) > 0) {
		$opt  = 'Menu => '.$admin[1364];
		$lnks = '<span style="font-style:italic;font-size:11px;padding-bottom:6px;">'.$opt.'</span><br />';
		$w    = strlen($opt);
		foreach($dbw as $db) {
            if (file_exists(DBBASE.TestFileID($db[1]).INCEXT))
			{
				include DBBASE.TestFileID($db[1]).INCEXT;
				$temp   = explode('|', $author);
				$grpc   = isset($temp[1]) ? $temp[1] : '';
				$access = $grpc == '' ? ($temp[0] == $userprefs[1] || $fctwri == 'admin') : (isAccessGrantedCol($grpc) || $fctwri == 'admin');
				if (!$access) continue;
				$opt   = trim($db[$lng == $lang[0] ? 3 : 4].(empty($db[$lng == $lang[0] ? 5 : 6]) ? '' : ' => ').$db[$lng == $lang[0] ? 5 : 6]);
				$lnks .= '<a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=optmenu&amp;menubox='.$db[2].'&amp;form=2&amp;tri=-id&amp;id='.$db[1].'"><b>'.$opt.'</b></a><br />';
				$w     = max($w, strlen($opt));
				$cnt++;
			}
		}
	} else {
		$lnks = $admin[681].'<br />';
		$w    = strlen($lnks) + 4;
	}
	$lnks .= '
	<hr />
	<div style="padding:4px;margin-bottom:6px;background-color:#EFEFEF;">
	  <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=menubox&amp;act=1&amp;newopt=ok&amp;id='.$id.'&amp;typ='.$typ.'"><b>'.$admin[1225].'</b></a>
	</div>';
	$w     = max($w, strlen($admin[1225]));
	$oms = '
  <ul class="keyword keyword-horizontal">
	<li class="dir" style="margin:0 10px 0 5px;"><strong> '.$cnt.' </strong>
	  <ul>
	    <li style="width:'.($w * 7).'px;max-width:700px;">'.$lnks.'</li>
	  </ul>
	</li>
  </ul>';
	return $oms;
}

/******************************************************************************/

function ReadAuthorizedIndex($idx, $myname, $grpcol, $fctwri) {
    global $serviz;
    $ret = array();
    $dbx = ReadDBFields($idx);
	if (is_array($dbx)) 
	{
		foreach ($dbx as $db) {
			if (isset($db[4]) != '')
			{
				$id = TestFileID($db[4]);
				include(DBBASE.$id.INCEXT);
				$tmp    = explode('|', $author);
				$tmp[1] = !isset($tmp[1]) ? 'ALL' : $tmp[1];
				if ($tmp[0] == $myname || $tmp[1] == $grpcol || $fctwri != 'redac1' || ($serviz[31] != '' && $myname == $serviz[31]) || ($serviz[176] != '' && $myname == $serviz[176])) $ret[] = $db;
			}
		}
	}
    return $ret;
}

/******************************************************************************/

function ShowBlock($name, $items, $nbitem=7, $skintheme=NULL, $plug=false) {
    global $lng, $page, $admin, $serviz, $selskin, $userprefs, $sid;
    $tmp = '
<fieldset class="bg-white" style="margin:0 0 -10px 0; '.($plug ? 'width:100%; max-width:972px;' : 'max-width:'.(($nbitem+1)*136).'px;').'">';
    if (!empty($name)) $tmp .= legend($name);
    $admins = ReadDBFields(ADMINS);
    $ok     = true;
    foreach ($admins as $adm) {
        if ($adm[0] == $userprefs[1] && $adm[1] == 'redac2') $ok = false;
    }
	
    $skn = '';
    if (isset($skintheme) && $ok) {
        if (count($skintheme) > 1) {
            $tmp .= '
    <div class="text-center align-middle mb-3 py-1 text-white" style="background:#7F7F7F;">
      <form method="post" name="skin" action="admin.php?lng='.$lng.'">
        <div class="d-inline-block">'.$admin[725].' :</div>
        <div class="d-inline-block">
          <select name="selskin" class="form-control forum2" onchange="submit(); return true;">';
            foreach ($skintheme as $skin){
                $tmp .= '
            <option value="'.$skin.'"'.Selected($selskin == $skin).'>'.$skin.'</option>';
            }
            $tmp .= '
          </select>
        </div>
        <div class="d-inline-block">'.SubmitButton('Go').'</div>
      </form>
    </div>';
        } else {
            $tmp .= '
    <div class="forum2 text-center mb-3">'.$admin[725].' : <strong>'.$selskin.'</strong></div>';
        }
        $skn = '&amp;selskin='.$selskin;
    }

    $tmp .= '
  <style>
    .grp { max-width: 952px; }
    @media screen and (max-width: 952px), screen and (max-device-width: 952px) {
      .grp { min-width: 0; }
    }
  </style>
  <div class="grp w-100 my-0 mx-0 pt-2" style="max-width:'.($nbitem*($plug ? 136 : 136)).'px;">';
  
    foreach ($items as $item) {
		$src = !isset($item['src']) || empty($item['src']) ? $item['href'] : $item['src'];
		$hrf = (strpos($src, '/')  === false ? 'inc/img/admin/'.$src.'.gif' : $src);
		$txt = $item['txt'];
		if ($item['href'] == 'help') { 
			$hrf = REMOTEHLP.$lng.'&pg=944&mnuid=937&tconfig=0#z2" onclick="window.open(this.href, \'mainhlp\', 
              \'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=yes,dependent=no,
              width=720,height=700,left=0,top=0\'); return false;';
		} else 
			$hrf = 'admin.php?lng='.$lng.'&amp;pg='.$item['href'].$skn;
		$tmp .= '
    <div class="d-inline-block" style="float:left; width:136px; height:'.($plug ? 112 : 92).'px; text-align:center; padding:0 8px;">
      <a href="'.$hrf.'" title="'.str_replace('<br />', ' ', $txt).'">
        '.($plug 
          ? '<img src="'.$src.'" alt="'.$txt.'" title="'.str_replace('<br />', ' ', $txt).'" style="border-style:none;height:36px;" />' 
          : '<i class="adm-'.$src.'" title="'.str_replace('<br />', ' ', $txt).'"></i>').'
        <br />'.$txt.'
      </a>
    </div>';
    }

    $tmp .= '
  </div><div style="clear:both"></div>
</fieldset><br />';
    echo $tmp;
}

/******************************************************************************/

function SelectBoxes($boxes, $accept) {
    $tmp = array();
    foreach ($boxes as $box) {
        if (strpos($box['accept'], $accept) !== FALSE) {
            $label = $box['label'];
            $code = $box['include'];
            if (! empty($box['function'])) {
                $code .= CONNECTOR.$box['function'];
                if (! empty($box['args'])) {
                    $code .= CONNECTOR.$box['args'];
                }
            }
            $tmp[$label] = $code;
        }
    }
    return $tmp;
}

/******************************************************************************/

function MakeRadioGroup($groupe) {
    global $admin;
    foreach ($groupe as $index=>$element) {
        $present = $element[0];
        $futur   = $element[1];
        $id      = $element[2];
        switch ($present.$futur) {
        case "ai" :
            $img1  = 'on1';
            $img2  = 'off2';
            $title = $admin[32];
            break;
        case "ia" :
            $img1  = 'off1';
            $img2  = 'on2';
            $title = $admin[34];
            break;
        case "ad" :
            $img1  = 'supa1';
            $img2  = 'sup2';
            $title = $admin[31];
            break;
        case "id" :
            $img1  = 'supi1';
            $img2  = 'sup2';
            $title = $admin[31];
            break;
        case "ds" :
            $img1  = 'sup1';
            $img2  = 'sup2';
            $title = $admin[60];
            break;
        case "di" :
            $img1  = 'save1';
            $img2  = 'save2';
            $title = $admin[89];
            break;
        }
        $name1 = $futur . '_' . $id;
        echo ' <input type="hidden" style="display:inline-block;" name="'.$name1.'" id="'.$name1.'" value="" />';
        $args = '\'rb'.$id.'o\', \'rb'.$id.'x\', 0, '.count($groupe).', '.$index.', \'inline-block\'';
        $name = 'rb' . $id . 'o' . $index;
        echo '<i id="'.$name.'" class="c-pointer fadm-'.$img1.'" style="display:inline-block;" 
          onclick="ActiveMenu('.$args.'); ToggleValue(\''.$name1.'\');" title="'.$title.'"></i>';
        $args = '\'rb'.$id.'o\', \'rb'.$id.'x\', '.$index.', \'inline-block\'';
        $name = 'rb' . $id . 'x' . $index;
        echo '<i id="'.$name.'" class="c-pointer fadm-'.$img2.'" style="display:none;" 
          onclick="DesactiveItem('.$args.'); ToggleValue(\''.$name1.'\');" title="'.$title.'"></i>';
    }
}
?>
admin.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/admin.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Routine
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.16 (December 14, 2023) : Correction script
 ******************************************************************************/

if (stristr($_SERVER['SCRIPT_NAME'], 'admin.inc')) {
    header('location:../index.php');
    die();
}
if (import('action') == "news") {
    $titre1 = $titre2 = $contenu1 = $contenu2 = '';
    $slng    = $lng;
    $lng     = $lang[0];
    $datedeb = date('Ymd');
    include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
	include CHEMIN.'inc/lang/'.$lang[0].'-web'.INCEXT;
    $titre1   = sprintf($admin[1518], FormatDate($datedeb), $serviz[119]);
    $contenu1 = fbox_lastdoc('NWL');
    if (!empty($lang[1])) {
        $lng     = $lang[1];
        $datedeb = date('Ymd');
        include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
        $titre2   = sprintf($admin[1518], FormatDate($datedeb), $serviz[119]);
        $contenu2 = fbox_lastdoc('NWL');
    }
    $lng = $slng;
	include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
    
    $data     = array_fill(0, 17, '');
    $data[0]  = 'nl';
    $data[2]  = 'a';
    $data[3]  = $datedeb.'-';
    $data[5]  = $userprefs[1];
    $data[6]  = $userprefs[2];
    $data[9]  = $lng == $lang[0] ? $titre1 : $titre2;
    $data[10] = $lng == $lang[0] ? $titre2 : $titre1;
    $data[11] = $lng == $lang[0] ? $contenu1 : $contenu2;
    $data[12] = $lng == $lang[0] ? $contenu2 : $contenu1;
    $id       = ActionOnFields('add', $data);
    unset($data, $action);
}

include_once CHEMIN.'inc/func_groupscol.php';

$idpg      = import('idpg');
$id        = isset($id) ? $id : import('id');
$typ       = import('typ');
$form      = import('form');
$act       = import('act');
$add       = import('add');
$del       = import('del');
$mod       = import('mod');
$dup       = import('dup');
$tri       = import('tri');
$cat1      = import('cat1',     'POST', FALSE);
$cat2      = import('cat2',     'POST', FALSE);
$titre1    = import('titre1',   'POST', FALSE);
$titre2    = import('titre2',   'POST', FALSE);
$contenu1  = import('contenu1', 'POST', FALSE);
$contenu2  = import('contenu2', 'POST', FALSE);
$nouveau1  = import('nouveau1', 'POST', FALSE);
$nouveau2  = import('nouveau2', 'POST', FALSE);
$ancre     = import('ancre');
$fieldweb  = import('fieldweb');
$fieldmail = import('fieldmail', 'POST', true, '0');
$fieldmod  = import('fieldmod');
$pseudo1   = import('pseudo1');
$grpcol    = import('grpcol');
$email1    = import('email1');
$annee     = import('annee');
$mois      = import('mois');
$day       = import('day');
$status    = import('status');
$hh1       = import('hh1');
$mn1       = import('mn1');
$sth1      = import('sth1');
$hh2       = import('hh2');
$mn2       = import('mn2');
$sth2      = import('sth2');
$group     = import('group');
$cbrpt     = import('cbrpt');
$typrpt    = import('typrpt', 'POST', true, '0');
$drpt      = import('drpt');
$drpt      = $drpt == '' ? '1' : $drpt;
$wrpt      = import('wrpt');
$wrpt      = $wrpt == '' ? '1' : $wrpt;
$mrpt      = import('mrpt');
$mrpt      = $mrpt == '' ? '1' : $mrpt;
$dayrpt    = import('dayrpt', 'POST', true, '0');
$nodayrpt  = import('nodayrpt');
$torpt     = import('torpt', 'POST', FALSE);
$menubox   = import('menubox');
$ddmenubox = import('ddmenubox');
$majfile   = import('majfile');
$majfile2  = import('majfile2');
$datecrea  = import('datecrea');
$datemod   = import('datemod');
$datedeb   = import('datedeb');
$datefin   = import('datefin');
$svart     = import('svart');
$svart2    = import('svart2');
$tconfart  = import('tconfart');
$highart   = import('highart');
$okreact   = import('okreact');

$grpcols = ReadMembersCol();
$grpcol  = empty($grpcol) ? (isset($grpcols[$myname]) ? (isset($grpcols[$myname][0]) ? $grpcols[$myname][0] : '') : '') : $grpcol;

$erreur       = '';
$err_datedeb  = false;
$err_datefin  = false;
$err_pseudo1  = false;
$err_email1   = false;
$err_hhmn     = false;
$err_cat1     = false;
$err_cat2     = false;
$err_titre1   = false;
$err_titre2   = false;
$err_nouveau1 = false;
$err_nouveau2 = false;
if (!in_array($qtype, array(TYP_GUESTBK, TYP_FORUM, TYP_NWL,TYP_REACT, TYP_REBLOG, TYP_RULES, TYP_RSS, TYP_BSS, TYP_SOCNET))) {
	if ($datedeb != '') {
		$err_datedeb = 1 != preg_match('/^[0-9]{12,12}$/', $datedeb) && ($add == 1 || $mod == 1) ? true : false;
		$erreur     .= $err_datedeb ? '<li>'.$admin[1585].$admin[1407].$admin[1587].' => '.$admin[1409].'</li>': '';
	}
	if ($datefin != '') {
		$err_datefin = 1 != preg_match('/^[0-9]{12,12}$/', $datefin) && ($add == 1 || $mod == 1) ? true : false;
		$erreur     .= $err_datefin ? '<li>'.$admin[1585].$admin[1408].$admin[1587].' => '.$admin[1409].'</li>': '';
		$debdate     = $datedeb != '' ? $datedeb : date('Ymdhi');
		$err_datefin = $debdate >= $datefin && ($add == 1 || $mod == 1) ? true : false;
		$erreur     .= $err_datefin ? '<li>'.$admin[1585].$admin[1408].$admin[1587].' => '.$admin[1423].'</li>': '';
	}
}
if ($bname == 1) {
	$err_pseudo1 = 1 != preg_match('/^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/', $pseudo1) && ($add == 1 || $mod == 1) ? true : false;
	$erreur     .= $err_pseudo1 ? '<li>'.$admin[1588].'</li>': '';
}
if ($bemail == 1) {
	$err_email1 = 1 != preg_match('/^[^\.\s]+(\.[^\.\s]+)*@[^\.\s]+(\.[^\.\s]+)+$/', $email1) && ($add == 1 || $mod == 1) ? true : false;
	$erreur    .= $err_email1 ? '<li>'.$admin[544].'</li>': '';
}
if ($bcat == 1) {
	if ($qtype == TYP_AGENDA) {
        if ($site[22] == 'H3') {
			$sdh1 = $sdh2 = $shh1 = $shh2 = $smn1 = $smn2=0;
			if ($sth1 == 'PM') $sdh1 = 12;
			if ($sth2 == 'PM') $sdh2 = 12;
			if ($hh1 > '') $shh1 = (intval($hh1) + $sdh1) * 60;
			if ($mn1 > '') $shh1 = $shh1 + intval($mn1);
			$txt = $hh2.$mn2;
			if (txt == '') {
				$shh2 = $shh1;
			}
			else {
				if ($hh2 > '') $shh2 = (intval($hh2) + $sdh2) * 60; 
				if ($mn2 > '') $shh2 = $shh2 + intval($mn2);
			}
        } else {
			$sdh1 = $sdh2 = $shh1 = $shh2 = $smn1 = $smn2=0;
			$txt = '';
			if ($hh1 > '') $shh1 = intval($hh1) * 60;
			if ($mn1 > '') $shh1 = $shh1 + intval($mn1);
			$txt = $hh2.$mn2;
			if ($txt == '') {
				$shh2 = $shh1;
			}
			else {
				if ($hh2 > '') $shh2 = intval($hh2) * 60; 
				if ($mn2 > '') $shh2 = $shh2 + intval($mn2);
			}
        }
		$err_hhmn = $shh1 > $shh2 && ($add == 1 || $mod == 1) ? true : false;
		$erreur     .= $err_hhmn ? '<li>'.$admin[1592].'</li>': '';
	}
    if ($qtype == TYP_MENUICO) {
		$err_cat1 = 1 != preg_match('/^[a-zA-Z0-9_]{2,8}$/', $cat1) && ($add == 1 || $mod == 1) ? true : false;
		$erreur  .= $err_cat1 ? '<li>'.$admin[1585].$qcat.$admin[1586].'</li>': '';
	}
    if (($qtype == TYP_OPTDDMENU && $typmenu != 'DDL')) {
		$err_cat1 = 1 != preg_match('/^[0-9-]+$/', $cat1) && ($add == 1 || $mod == 1) ? true : false;
		$erreur  .= $err_cat1 ? '<li>'.$admin[1585].$qcat.$admin[1586].'</li>': '';
	}
    if ($qtype == TYP_BANNER || $qtype == TYP_RSS || $qtype == TYP_BSS) {
		$err_cat1 = 1 != preg_match('/[A-Za-z0-9.-_]/', $cat1) && ($add == 1 || $mod == 1) ? true : false;
		$erreur  .= $err_cat1 ? '<li>'.$admin[1585].$qcat.$admin[1587].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
		if ($lang[1] != '') {
			$err_cat2 = 1 != preg_match('/[A-Za-z0-9.-_]/', $cat2) && ($add == 1 || $mod == 1) ? true : false;
			$erreur  .= $err_cat2 ? '<li>'.$admin[1585].$qcat.$admin[1587].$admin[1178].'</li>': '';
		}
	}
}
if (($btitre == 1 && !in_array($qtype, array(TYP_GUESTBK, TYP_THINK, TYP_RECO))) || ($btitre == 2 && $qtype == TYP_FAQ)) { 
	if ($qtype == TYP_RSS || $qtype == TYP_BSS) {
		$err_titre1 = 1 != preg_match('/(ftp|http|https):\/\/[a-z0-9à-ö-]+(.[a-z0-9à-ö-]+)*(:[0-9]+)?(\/.*)?$/i', $titre1) && ($add == 1 || $mod == 1) ? true : false;
		$erreur    .= $err_titre1 ? '<li>'.$admin[1585].$qtitre.$admin[1587].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
		if ($lang[1] != '') {
			$err_titre2 = 1 != preg_match('/(ftp|http|https):\/\/[a-z0-9à-ö-]+(.[a-z0-9à-ö-]+)*(:[0-9]+)?(\/.*)?$/i', $titre2) && ($add == 1 || $mod == 1) ? true : false;
			$erreur    .= $err_titre2 ? '<li>'.$admin[1585].$qtitre.$admin[1587].$admin[1178].'</li>': '';
		}
	} else {
        $err_titre1 = empty($titre1) && ($add == 1 || $mod == 1) ? true : false;
        $erreur    .= $err_titre1 ? '<li>'.$admin[1585].$qtitre.$admin[1586].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
        if (!in_array($qtype, array(TYP_FORUM, TYP_SOCNET)) && $lang[1] != '') {
			$err_titre2 = empty($titre2) && ($add == 1 || $mod == 1) ? true : false;
			$erreur    .= $err_titre2 ? '<li>'.$admin[1585].$qtitre.$admin[1586].$admin[1178].'</li>': '';
		}
	}
}
if ($bnouveau == 1 && $qtype != TYP_MENUBOX && $qtype != TYP_DDMENUBOX && $qtype != TYP_FREEBOX) {
	if ($qtype == TYP_DNLOAD) $pattern = '/[A-Za-z0-9.-_]/';
	elseif ($qtype == TYP_LINKS) $pattern = '/(ftp|http|https):\/\/[a-z0-9à-ö-]+(.[a-z0-9à-ö-]+)*(:[0-9]+)?(\/.*)?$/i';
	elseif ($qtype == TYP_OPTMENU || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL')) $pattern = '/[a-z0-9à-ö.-_\|?]/';
	elseif ($qtype != TYP_ART) $pattern = '/[A-Za-z0-9.-_]/';
    if ($qtype != TYP_ART && $qtype != TYP_BANNER) {
		$err_nouveau1 = 1 != preg_match($pattern, $nouveau1) && ($add == 1 || $mod == 1) ? true : false;
		$erreur      .= $err_nouveau1 ? '<li>'.$admin[1585].$qnouveau.$admin[1587].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
		if ($lang[1] != '' && $qtype != TYP_SOCNET) {
			$err_nouveau2 = 1 != preg_match($pattern, $nouveau2) && ($add == 1 || $mod == 1) ? true : false;
			$erreur      .= $err_nouveau2 ? '<li>'.$admin[1585].$qnouveau.$admin[1587].$admin[1178].'</li>': '';
		}
	}
    if ($qtype != TYP_ART && $qtype != TYP_SOCNET) {
		if ($lang[1] != '') {
			$err_nouveau2 = 1 != preg_match($pattern, $nouveau2) && ($add == 1 || $mod == 1) ? true : false;
			$erreur      .= $err_nouveau1 ? '<li>'.$admin[1585].$qnouveau.$admin[1587].($lang[1] != '' ? $admin[1178] : '').'</li>': '';
		}
	}
    if ($qtype == TYP_BANNER) {
		$err_nouveau1 = empty($nouveau1) && ($add == 1 || $mod == 1) ? true : false;
		$erreur      .= $err_nouveau1 ? '<li>'.$admin[1585].$qnouveau.$admin[1586].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
		if ($lang[1] != '') {
			$err_nouveau2 = empty($nouveau2) && ($add == 1 || $mod == 1) ? true : false;
			$erreur      .= $err_nouveau2 ? '<li>'.$admin[1585].$qnouveau.$admin[1586].$admin[1178].'</li>': '';
		}
	}
}
if ($bnouveau == 1 && $qtype == TYP_FREEBOX) {
    $pattern      = '/[0-9]/';
    $fieldweb     = empty($fieldweb) ? 0 : $fieldweb;
	$err_fieldweb = 1 != preg_match($pattern, $fieldweb) && ($add == 1 || $mod == 1) ? true : false;
	$erreur      .= $err_fieldweb ? '<li>'.$admin[1585].$admin[1537].$admin[1587].'</li>': '';
}
if ($bnouveau == 1 && $qtype == TYP_ART) {
    $pattern      = '/[0-9]/';
    $highart      = empty($highart) ? '0' : $highart;
	$err_highart  = 1 != preg_match($pattern, $highart) && ($add == 1 || $mod == 1) ? true : false;
	$erreur      .= $err_highart ? '<li>'.$admin[1585].$admin[1537].$admin[1587].'</li>': '';
}
if ($add == 1 && !empty($erreur)) $form = 1;
if ($mod == 1 && !empty($erreur)) $form = 2;

function TimeInterval($h1, $m1, $s1, $h2, $m2, $s2) {
    global $site;
    if ($m1 < 0 || $m1 > 60) $m1 = 0;
    if ($m2 < 0 || $m2 > 60) $m2 = 0;
    if ($site[22] == 'H3') {
        if ($h1 < 0 || $h1 > 12) {
            $h1 = 0;
        }
        if ($h2 < 0 || $h2 > 12) {
            $h2 = 0;
        }
    } else {
        if ($h1 < 0 || $h1 > 24) {
            $h1 = 0;
        }
        if ($h2 < 0 || $h2 > 24) {
            $h2 = 0;
        }
        $s1 = $s2 = '';
    }
    if ($h1 == 0 && $m1 == 0) {
        $d1 = '';
    } else {
        $d1 = sprintf('%02d:%02d', $h1, $m1).$s1;
    }
    if ($h2 == 0 && $m2 == 0) {
        $d2 = '';
    } else {
        $d2 = sprintf('%02d:%02d', $h2, $m2).$s2;
    }
    return $d1.'-'.$d2;
}

function UpdateIndexMenuOption($typ, $art_id, $opt_id, $mnu_id, $nom1, $nom2) {
	$pos  = strpos($nom1, '-->');
	$nom1 = substr($nom1, ($pos !== false ? $pos + 3 : 0));
	$pos  = strpos($nom2, '-->');
	$nom2 = substr($nom2, ($pos !== false ? $pos + 3 : 0));
	
	$aroms  = ReadDBFields(DBARTMENU);
	$trouve = false;
	$nb     = count($aroms);
	if ($typ == TYP_MENUBOX) {
		for ($n = 0; $n < $nb; $n++) {
			if ($aroms[$n][2] == $mnu_id) {
				$aroms[$n][3] = $nom1;
				$aroms[$n][4] = $nom2;
			}
		}
		$trouve = true;
	} 
	else {
		for ($n = 0; $n < $nb; $n++) {
			if ($aroms[$n][1] == $opt_id) {
				$mnu = SelectDBFieldsByField(ReadDBFields(DBMENUBOX), 4, $mnu_id);
				$pos = strpos($mnu[0][2], '-->');
				$aroms[$n][3] = substr($mnu[0][2], ($pos !== false ? $pos + 3 : 0));
				$pos = strpos($mnu[0][3], '-->');
				$aroms[$n][4] = substr($mnu[0][3], ($pos !== false ? $pos + 3 : 0));
				$aroms[$n][0] = $art_id;
				$aroms[$n][2] = $mnu_id;
				$aroms[$n][5] = $nom1;
				$aroms[$n][6] = $nom2;
				$trouve = true;
				break;
			}
		}
	}
	if (!$trouve) {
		$mnu  = SelectDBFieldsByField(ReadDBFields(DBMENUBOX), 4, $mnu_id);
		$mnus2 = $mnus3 = '';
		if (strlen($mnu[0][2]) > 0)
		{
			$pos  = strpos($mnu[0][2], '-->');
			$mnu2 = substr($mnu[0][2], ($pos !== false ? $pos + 3 : 0));
			$pos  = strpos($mnu[0][3], '-->');
			$mnu3 = substr($mnu[0][3], ($pos !== false ? $pos + 3 : 0));
			$aroms[] = array($art_id, $opt_id, $mnu_id, $mnu2, $mnu3, $nom1, $nom2);
		}		
	}
	WriteDBFields(DBARTMENU, $aroms);
}

$keywords1 = $keywords2 = '';
if ($qtype == TYP_ART) {
	if ($form == 2) {
		$dbks = ReadDBFields(DBKEYWORDS);
		foreach ($dbks as $dbk) {
			if ($id == $dbk[0]) {
				$keywords1 = $dbk[3];
				$keywords2 = $dbk[4];
				break;
			}
		}
	}
}

if ($qtype == TYP_FORUM) {
    $dbcat = ReadDBFields(DBFORUMCAT);
    $ilng = ($lng == $lang[0] ? 1 : 2);
    for ($i = 0; $i < count($dbcat); $i++) {
        $dbfcat[$i][0] = $dbcat[$i][0];
        $dbfcat[$i][1] = $dbcat[$i][$ilng];
    }
    unset($dbcat);
}
require CHEMIN.'admin/editors/editors_functions.php';
$contenu1 = PathAbsoluteRelative($contenu1);
$contenu2 = PathAbsoluteRelative($contenu2);

$canduplicate = array('art', 'news', 'blog', 'dnload', 'links', 'faq', 'nwl', 'agenda', 'freebox', 'optmenu', 'optddmenu');
$jours        = array(0 => $admin[1162], $admin[1163], $admin[1164], $admin[1165], $admin[1166], $admin[1167], $admin[1168]);

if ($act == 'fast') {
    $dbids = explode(' ', trim(import('ids')));
    $data  = array();
    for ($ij = 0; $ij < count($dbids); $ij++) {
        $ii = $dbids[$ij];
        if (isset($_POST['a_'.$ii]) && $_POST['a_'.$ii] == 'on') {
            ActionOnFields('act', array($qtype, $ii, 'a'), FALSE);
        }
        elseif (isset($_POST['i_'.$ii]) && $_POST['i_'.$ii] == 'on') {
            ActionOnFields('act', array($qtype, $ii, 'i'), FALSE);
            if ($qtype == TYP_ART | $qtype == TYP_BLOG) DeactivateInCascade($qtype, $ii);
        }
        elseif (isset($_POST['d_'.$ii]) && $_POST['d_'.$ii] == 'on') {
            ActionOnFields('del', array($qtype, $ii), FALSE);
			if (in_array($qtype, array(TYP_ART, TYP_MENUBOX, TYP_OPTMENU))) {
				$idx   = $qtype == TYP_ART || $qtype == TYP_PHOTO ? 0 : ($qtype == TYP_MENUBOX ? 2 : 1);
				$aroms = ReadDBFields(DBARTMENU);
				$dbres = array();
				foreach ($aroms as $arom) 
					if ($arom[$idx] != $ii) $dbres[] = $arom;
				WriteDBFields(DBARTMENU, $dbres);
				unset($aroms, $dbres);
			}
        }
        UpdateSitemaps($qtype);
    }
    unset($dbids);
    ActionOnFields('reindex', array($qtype, 0));
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
		echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg='.$pg.'&tri='.$tri.'&idpg='.$idpg.'&form=0'.($qtype == TYP_OPTMENU ? '&menubox='.$menubox :'').($qtype == TYP_OPTDDMENU ? '&ddmenubox='.$ddmenubox :'').'"'.EndJavascript();
    }
}
elseif ($act == 'a' || $act == 'i') {
    ActionOnFields('act', array($qtype, $id, $act));
}
elseif (!empty($del)) {
    ActionOnFields('del', array($qtype, $del, 'd'));
}
elseif ($add == 1 && empty($erreur)) {
    $data[0] = $qtype;
    $data[1] = '';
    $data[2] = $status == 'on' ? 'a' : 'i';
    $data[3] = ($datedeb.$datefin == '') ? '' : $datedeb.'-'.$datefin;
    $data[4] = '';
    $data[5] = ($bname == 0 ? $myname : $pseudo1).(!empty($grpcol) ? '|'.$grpcol : '');
    $data[6] = $bemail == 0 ? $myemail : $email1;
    if ($qtype == TYP_FREEBOX || $qtype == TYP_MENUBOX || $qtype == TYP_DDMENUBOX) {
        $cat1 = isset($_POST['valid']) ? implode('', array_keys($_POST['valid'])) : '';
        if (empty($cat1)) {
            $cat1 = 'TLAEURB';
        }
    }
    $data[7] = ($qtype == TYP_BRUB ? $titre1 : $cat1);
    if ($qtype == TYP_AGENDA) {
        $cat2 = TimeInterval($hh1, $mn1, $sth1, $hh2, $mn2, $sth2);
    }
    $data[8]  = ($qtype == TYP_BRUB ? $titre2 : $cat2);
    $data[9]  = $titre1;
    $data[10] = $titre2;
    $data[11] = $qtype == TYP_OPTMENU || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL') || 
                $qtype == TYP_MENUICO || $qtype == TYP_SOCNET || $qtype == TYP_DDMENUBOX ? $contenu1 : putBR($contenu1);
    $data[12] = $qtype == TYP_OPTMENU || $qtype == TYP_MENUICO || $qtype == TYP_SOCNET || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL') ? $contenu2 : putBR($contenu2);
    $ancre    = $ancre == '' ? '' : '#'.$ancre;
    $slng     = (strpos($nouveau1, '?lng=') > 0 || strpos($nouveau1, '&lng=') > 0 || $site['URLR'] == 'on') ? '' : 'lng='.$lang[0];
    if ($slng != '') $slng .= (strpos($nouveau1, '?') > 0) ? '&'.$slng : '?'.$slng;
    $data[13] = $nouveau1.($qtype == TYP_OPTMENU ? (1 != preg_match('!http:|https:|&tconfig=!', $nouveau1) ? $slng.'&tconfig='.$fieldmail : '').$ancre : '');
    $slng     = (strpos($nouveau2, '?lng=') > 0 || strpos($nouveau2, '&lng=') > 0 || $site['URLR'] == 'on') ? '' : 'lng='.$lang[1];
    if ($slng != '') $slng .= (strpos($nouveau2, '?') > 0) ? '&'.$slng : '?'.$slng;
    $data[14] = $nouveau2.($qtype == TYP_OPTMENU ? (1 != preg_match('!http:|https:|&tconfig=!', $nouveau1) ? $slng.'&tconfig='.$fieldmail : '').$ancre : '');
	if ($qtype == TYP_OPTMENU) $fieldweb = $menubox;
	if ($qtype == TYP_OPTDDMENU) $fieldweb = $ddmenubox;
    $data[15] = $fieldweb;
	$tconf    = $qtype == TYP_ART ? $tconfart : $fieldmail;
    $data[16] = $qtype == TYP_ART ? $tconfart.'|'.$highart.'|'.$okreact : $fieldmail;
    $data[17] = $group;
    if ($qtype == TYP_AGENDA && $cbrpt == 'on' && $typrpt != '' && $torpt != '') {
        $d     = intval($day);
        $m     = intval($mois);
        $a     = intval($annee);
        $today = date('Ymd', mktime(0, 0, 0, $m, $d, $a));
        $dbto  = explode('-', $torpt);
        if (count($dbto) != 3) {
            $torpt = $today;
        } else {
            $at    = intval($dbto[0]);
            $mt    = intval($dbto[1]);
            $dt    = intval($dbto[2]);
            $torpt = substr('0000'.strval($at), -4).substr('00'.strval($mt), -2).substr('00'.strval($dt), -2);
        }
        if ($torpt > $today) {
            $id = ActionOnFields('add', $data);
            if ($typrpt == '0' && ($drpt % 7) == 0) { $typrpt = '1'; $wrpt = strval(intval($drpt / 7)); }
			@set_time_limit(0);
            do {
                $nbj = intval(date('t', mktime(0, 0, 0, $m, $d, $a)));
                switch ($typrpt) {
                case "0" :
                case "1" :
                    $t        = $typrpt == "0" ? intval($drpt) : intval($wrpt * 7); 
                    $d        = $d + $t;
                    $datenext = date('Ymd', mktime(0, 0, 0, $m, $d, $a));
                    break;
                case "2" :
                    $m        = $m + intval($mrpt);
                    $t        = intval(date('t', mktime(0, 0, 0, $m, $d, $a)));
                    $datenext = intval(date('Ymd', mktime(0, 0, 0, $m, $d, $a)));
                    break;
                case "3" :
                    $m++;
                    if ($m > 12) { $m = 1; $a++; }
                    $t  = intval(date('t', mktime(0, 0, 0, $m, $d, $a)));
                    $nd = 0;
                    for ($i = 1; $i <= $t; $i++) {
                        $dj       = date('w', mktime(0, 0, 0, $m, $i, $a));
                        $datenext = date('Ymd', mktime(0, 0, 0, $m, $i, $a));
                        if ($dj == $dayrpt) {
                            $nd++;
                            if ($nd == $nodayrpt) break;
                        }
                    }
                    break;
                }
                if (intval($datenext) > intval($torpt)) break;
                $data[7] = $datenext."0000";
                $data[9] = substr($datenext, 4, 2).substr($datenext, 0, 4);
                $id = ActionOnFields('add', $data);
            } while (intval($datenext) <= intval($torpt) - $t);
			@set_time_limit(120);
        }
    } else {
        $id   = ActionOnFields('add', $data);
		$oid  = $id;
		$ocol = $fieldweb;
		if ($qtype == TYP_OPTMENU && (strpos($nouveau1, 'articles.php') !== false || strpos($nouveau1, 'photorama2.php') !== false)) {
			$pos = strpos($nouveau1, 'pg=');
			$npg = $pos !== false ? substr($nouveau1, $pos + 3) : 0;
			$pos = strpos($npg, '&');
			$npg = $pos === false ? $npg : substr($npg, 0, $pos);
			UpdateIndexMenuOption($qtype, $npg, $oid, $fieldweb, $cat1, $cat2);
		}
        if ($qtype == TYP_ART && substr($nouveau1, 0, 3) == 'MNU') {
            $mnu_id   = substr($nouveau1, 4);
            $sconfig  = ($tconf == 'ALL' ? '' : '&tconfig='.$tconf);
            $iconf    = ($tconf == 'ALL' ? '1031' : '103');
            $sconf    = ($tconf == 'ALL' ? '' : '-'.$tconf);
			$url1     = 'articles.php?lng='.$lang[0].'&pg='.$oid.'&mnuid='.$mnu_id.$sconfig.$ancre.'||'.$lang[0].'-'.$urlrw[20].'-'.$iconf.'-'.$id.'-'.$mnu_id.$sconf.$ancre;
			$url2     = 'articles.php?lng='.$lang[1].'&pg='.$oid.'&mnuid='.$mnu_id.$sconfig.$ancre.'||'.$lang[1].'-'.$urlrw[20].'-'.$iconf.'-'.$id.'-'.$mnu_id.$sconf.$ancre;
            $data[0]  = TYP_OPTMENU;
			$data[3]  = ($datedeb.$datefin == '') ? '' : $datedeb.'-'.$datefin;
            $data[11] = '_SELF';
            $data[12] = $ocol;
            $data[13] = $url1;
            $data[14] = $url2;
            $data[15] = $mnu_id;
            $data[16] = $tconf;
            $id = ActionOnFields('add', $data);
			UpdateIndexMenuOption($qtype, $oid, $id, $mnu_id, $cat1, $cat2);
        }
		$id = $oid;
		if ($qtype == TYP_ART) {
			$keywords1 = import('keywords1');
			$keywords2 = import('keywords2');
			UpdateKeywords($id, $titre1, $titre2, $keywords1, $keywords2, $fieldmail);
		}
    }
    UpdateSitemaps($qtype);
    if ($dup == 2 || $cbrpt == 'on')
        $form = 2;
    else
		$form = import('retform') == 'on' || import('retform2') == 'on' ? 0 : 2;
	$dup = 0;
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
		echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg='.$pg.'&tri='.$tri.'&idpg='.$idpg.'&form='.$form.($qtype == TYP_OPTMENU ? '&menubox='.$menubox :'').($qtype == TYP_OPTDDMENU ? '&ddmenubox='.$ddmenubox :'').'&dup='.$dup.'&id='.$id.'"'.EndJavascript();
    }
}
elseif ($mod == 1 && empty($erreur)) {
    $data[0] = $qtype;
    $data[1] = $id;
    $data[2] = '';
    $data[3] = (($datecrea == $datedeb.'-'.$datefin) ? $datecrea : ($datedeb.$datefin == '' ? '' : $datedeb.'-'.$datefin));
    $data[4] = $majfile == 'on' || $majfile2 == 'on' ? ($datemod > $datedeb ? $datemod : $datedeb) : GetCurrentDateTime();
    $data[5] = ($bname == 0 ? $myname : $pseudo1).(!empty($grpcol) ? '|'.$grpcol : '');
    $data[6] = $bemail == 0 ? $myemail : $email1;
    if ($qtype == TYP_FREEBOX || $qtype == TYP_MENUBOX || $qtype == TYP_DDMENUBOX) {
        $xcat1 = empty($_POST['valid']) ? array() : $_POST['valid'];
        $cat1 = implode('', array_keys($xcat1));
        if (empty($cat1)) $cat1 = 'TLAEURB';
    }
    $data[7] = ($qtype == TYP_BRUB ? $titre1 : $cat1);
    if ($qtype == TYP_AGENDA) {
        $cat2 = TimeInterval($hh1, $mn1, $sth1, $hh2, $mn2, $sth2);
    }
    $data[8]  = ($qtype == TYP_BRUB ? $titre2 : $cat2);
    $data[9]  = $titre1;
    $data[10] = $titre2;
    $data[11] = $qtype == TYP_OPTMENU || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL') || 
                $qtype == TYP_MENUICO || $qtype == TYP_SOCNET || $qtype == TYP_DDMENUBOX ? $contenu1 : putBR($contenu1);
    $data[12] = $qtype == TYP_MENUICO || $qtype == TYP_SOCNET || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL') ? $contenu2 : putBR($contenu2);
    $ancre    = empty($ancre) ? '' : '#'.$ancre;
    $is_art   = strpos($nouveau1, 'articles.php') !== false;
    $is_photo = strpos($nouveau1, 'photorama2.php') !== false;
	if ($qtype == TYP_OPTMENU && ($is_art || $is_photo)) {
		$pos = strpos($nouveau1, 'pg=');
		$npg = $pos !== false ? substr($nouveau1, $pos + 3) : 0;
		$pos = strpos($npg, '&');
		$npg = $pos === false ? $npg : substr($npg, 0, $pos);
		if ($is_art) $nouveau1 = 'articles.php?lng='.$lang[0].'&pg='.$npg.'&mnuid='.$menubox.'&tconfig='.$fieldmail.$ancre.'||'.$lang[0].'-'.$urlrw[20].'-103-'.$npg.'-'.$menubox.'-'.$fieldmail;
		if ($is_photo) $nouveau1 = 'photorama2.php?lng='.$lang[0].'&pg='.$npg.'&mnuid='.$menubox.'&tconfig='.$fieldmail.$ancre.'||'.$lang[0].'-'.$urlrw[9].'-30-'.$npg.'-'.$menubox.'-'.$fieldmail;
		$art_id = $npg;
	}
    $mnu_id   = substr($nouveau1, 4);
    $data[13] = $nouveau1.($qtype == TYP_OPTMENU && 1 != preg_match('!http:|https:|&tconfig=!', $nouveau1) ? '&tconfig='.$fieldmail : '');
    $is_art   = strpos($nouveau2, 'articles.php') !== false;
    $is_photo = strpos($nouveau2, 'photorama2.php') !== false;
	if ($qtype == TYP_OPTMENU && ($is_art || $is_photo)) {
		$pos = strpos($nouveau2, 'pg=');
		$npg = $pos !== false ? substr($nouveau2, $pos + 3) : 0;
		$pos = strpos($npg, '&');
		$npg = $pos === false ? $npg : substr($npg, 0, $pos);
		if ($is_art) $nouveau2 = 'articles.php?lng='.$lang[1].'&pg='.$npg.'&mnuid='.$menubox.'&tconfig='.$fieldmail.$ancre.'||'.$lang[1].'-'.$urlrw[20].'-103-'.$npg.'-'.$menubox.'-'.$fieldmail;
		if ($is_photo) $nouveau2 = 'photorama2.php?lng='.$lang[1].'&pg='.$npg.'&mnuid='.$menubox.'&tconfig='.$fieldmail.$ancre.'||'.$lang[1].'-'.$urlrw[9].'-30-'.$npg.'-'.$menubox.'-'.$fieldmail;
	}
    $data[14] = $nouveau2.($qtype == TYP_OPTMENU && 1 != preg_match('!http:|https:|&tconfig=!', $nouveau2) ? '&tconfig='.$fieldmail : '');
	if ($qtype == TYP_OPTMENU) $fieldweb = $menubox;
	if ($qtype == TYP_OPTDDMENU) $fieldweb = $ddmenubox;
    $data[15] = $fieldweb;
	$tconf    = $qtype == TYP_ART ? $tconfart : $fieldmail;
    $data[16] = $qtype == TYP_ART ? $tconfart.'|'.$highart.'|'.$okreact : $fieldmail;
    $data[17] = $fieldmod; 
    if ($qtype == TYP_ART) {
		$idart = $id;
		$grp   = $fieldmod;
        ReadDoc($id);
        $old_mnu = $fieldd1;				
    }
    ActionOnFields('mod', $data);
	if ($qtype == TYP_OPTMENU && (strpos($nouveau1, 'articles.php') !== false || strpos($nouveau1, 'photorama2.php') !== false)) {
		UpdateIndexMenuOption($qtype, $art_id, $id, $menubox, $cat1, $cat2);
	}
	if ($qtype == TYP_MENUBOX) {
		UpdateIndexMenuOption($qtype, 0, 0, $id, $titre1, $titre2);
	}
    if ($qtype == TYP_ART) {
		$keywords1 = import('keywords1');
		$keywords2 = import('keywords2');
		UpdateKeywords($id, $titre1, $titre2, $keywords1, $keywords2, $fieldmail);
		$oid     = $id;
		$ocol    = $fieldweb;
        if ($dup == 1 && $qtype == TYP_ART && substr($nouveau1, 0, 3) == 'MNU') {
            $mnu_id   = substr($nouveau1, 4);
            $sconfig  = ($tconf == 'ALL' ? '' : '&tconfig='.$tconf);
            $iconf    = ($tconf == 'ALL' ? '1031' : '103');
            $sconf    = ($tconf == 'ALL' ? '' : '-'.$tconf);
			$url1     = 'articles.php?lng='.$lang[0].'&pg='.$oid.'&mnuid='.$mnu_id.$sconfig.$ancre.'||'.$lang[0].'-'.$urlrw[20].'-'.$iconf.'-'.$id.'-'.$mnu_id.$sconf.$ancre;
			$url2     = 'articles.php?lng='.$lang[1].'&pg='.$oid.'&mnuid='.$mnu_id.$sconfig.$ancre.'||'.$lang[1].'-'.$urlrw[20].'-'.$iconf.'-'.$id.'-'.$mnu_id.$sconf.$ancre;
            $data[0]  = TYP_OPTMENU;
			$data[2]  = 'a';
            $data[11] = '_SELF';
            $data[12] = $ocol;
            $data[13] = $url1;
            $data[14] = $url2;
            $data[15] = $mnu_id;
            $data[16] = $tconf;
            $id       = ActionOnFields('add', $data);
			UpdateIndexMenuOption($qtype, $oid, $id, $mnu_id, $cat1, $cat2);
			$dup = 0;
        }
		if ($mod == 1 && $qtype == TYP_ART && substr($nouveau1, 0, 3) == 'MNU')
		{
			$dbw = SelectDBFieldsByField(ReadDBFields(DBARTMENU), 0, $idart);
			if (count($dbw) < 1) 
			{
				$mnu_id   = substr($nouveau1, 4);
				$sconfig  = ($tconf == 'ALL' ? '' : '&tconfig='.$tconf);
				$iconf    = ($tconf == 'ALL' ? '1031' : '103');
				$sconf    = ($tconf == 'ALL' ? '' : '-'.$tconf);
				$url1     = 'articles.php?lng='.$lang[0].'&pg='.$oid.'&mnuid='.$mnu_id.$sconfig.$ancre.'||'.$lang[0].'-'.$urlrw[20].'-'.$iconf.'-'.$id.'-'.$mnu_id.$sconf.$ancre;
				$url2     = 'articles.php?lng='.$lang[1].'&pg='.$oid.'&mnuid='.$mnu_id.$sconfig.$ancre.'||'.$lang[1].'-'.$urlrw[20].'-'.$iconf.'-'.$id.'-'.$mnu_id.$sconf.$ancre;
				$data[0]  = TYP_OPTMENU;
				$data[2]  = 'a';
				$data[3]  = ($datedeb.$datefin == '') ? '' : $datedeb.'-'.$datefin;
				$data[11] = '_SELF';
				$data[12] = $ocol;
				$data[13] = $url1;
				$data[14] = $url2;
				$data[15] = $mnu_id;
				$data[16] = $tconf;
				$id = ActionOnFields('add', $data);
				UpdateIndexMenuOption($qtype, $oid, $id, $mnu_id, $cat1, $cat2);
	
			}
		}
		$id = $oid;
    }
    if ($qtype == TYP_RULES) {
        ReadDoc($id);
        $fieldc1 = addslashes(stripslashes($fieldc1));
        $fieldc2 = addslashes(stripslashes($fieldc2));
        $txt = "<?php
\$rule1 = stripslashes(\"$fieldc1\");
\$rule2 = stripslashes(\"$fieldc2\");
";
        WriteFullDB(DBRULES,$txt);
    }
    $form = import('retform') == 'on' || import('retform2') == 'on' ? 0 : 2;
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
		echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg='.$pg.'&tri='.$tri.'&idpg='.$idpg.'&form='.$form.($qtype == TYP_OPTMENU ? '&menubox='.$menubox :'').($qtype == TYP_OPTDDMENU ? '&ddmenubox='.$ddmenubox :'').'&id='.$id.'"'.EndJavascript();
    }
}

// notification de création ou modification à la supervision
if (($add == 1 || $mod == 1) && empty($erreur)) {
	switch ($qtype) {
	case TYP_ART :
		if ($svart == 'on' || $svart2 == 'on') {
			$eSub  = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' '.($add == 1 ? $admin[1448] : $admin[1449]);
			$eMsg  = $admin[1593].$userprefs[1].' ('.$userprefs[2].')<br />';
			$eMsg .= $admin[1594].$id.' - '.$admin[1598].($lng == $lang[0] ? $titre1 : $titre2).'<br />';
			$eMsg .= "<br />".$admin[1595].'<a href="'.$site[3]."admin/admin.php?lng=".$lng."&pg=art&form=2&id=".$id.'">'.$site[3]."admin/admin.php?lng=".$lng."&pg=art&form=2&id=".$id.'</a>';
			$maillist = GetListCollaboratorEmail(TYP_ART);
			eMailHtmlTo($eSub, $eMsg, trim(implode(' ', $maillist).' '.trim($supervision[10]).' '.$user[1]), $user[1]);
		}
		break;
	}
}

$pgreturn[TYP_AGENDA]    = 'agenda';
$pgreturn[TYP_ART]       = 'art';
$pgreturn[TYP_BANNER]    = 'banner';
$pgreturn[TYP_DNLOAD]    = 'dnload';
$pgreturn[TYP_FAQ]       = 'faq';
$pgreturn[TYP_FORUM]     = 'forum';
$pgreturn[TYP_FREEBOX]   = 'freebox';
$pgreturn[TYP_GUESTBK]   = 'guestbk';
$pgreturn[TYP_LINKS]     = 'links';
$pgreturn[TYP_NEWS]      = 'news';
$pgreturn[TYP_BLOG]      = 'blog';
$pgreturn[TYP_BRUB]      = 'brub';
$pgreturn[TYP_NWL]       = 'nwl';
$pgreturn[TYP_PHOTO]     = 'photo';
$pgreturn[TYP_REACT]     = 'react';
$pgreturn[TYP_REBLOG]    = 'reblog';
$pgreturn[TYP_RECO]      = 'reco';
$pgreturn[TYP_RULES]     = 'rules';
$pgreturn[TYP_RSS]       = 'rss';
$pgreturn[TYP_BSS]       = 'bss';
$pgreturn[TYP_THINK]     = 'think';
$pgreturn[TYP_MENUBOX]   = 'menu';
$pgreturn[TYP_OPTMENU]   = 'optmenu&amp;menubox='.$menubox;
$pgreturn[TYP_DDMENUBOX] = 'ddmenu';
$pgreturn[TYP_OPTDDMENU] = 'optddmenu&amp;ddmenubox='.$ddmenubox;
$pgreturn[TYP_MENUICO]   = 'menuico';
$pgreturn[TYP_SOCNET]    = 'socnet';

$headinc .= BeginJavascript().'
function setret2(form) {
  if (form.retform.checked) form.retform2.checked = "checked";
  if (!form.retform.checked) form.retform2.checked = "";
}
function setret(form) {
  if (form.retform2.checked) form.retform.checked = "checked";
  if (!form.retform2.checked) form.retform.checked = "";
}
function setmaj2(form) {
  if (form.majfile.checked) form.majfile2.checked = "checked";
  if (!form.majfile.checked) form.majfile2.checked = "";
}
function setmaj(form) {
  if (form.majfile2.checked) form.majfile.checked = "checked";
  if (!form.majfile2.checked) form.majfile.checked = "";
}
function setart2(form) {
  if (form.svart.checked) form.svart2.checked = "checked";
  if (!form.svart.checked) form.svart2.checked = "";
}
function setart(form) {
  if (form.svart2.checked) form.svart.checked = "checked";
  if (!form.svart2.checked) form.svart.checked = "";
}

function VerifyForm() {
    var sto    = "";
    var erreur = false;
    var lng2   = "'.$lang[1].'";
';
if ($bname == 1) {
    $headinc .= '
    if (document.adminsend.pseudo1.value == "") {
        sto += "  - '.addslashes($admin[1596]).'\n";
		document.adminsend.pseudo1.className = "errorInputText";
        erreur = true;
    } else {
        regexp = /^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/;
        if (!regexp.test(document.adminsend.pseudo1.value)) {
            sto += "  - '.addslashes($admin[1588]).'\n";
			document.adminsend.pseudo1.className = "errorInputText";
            erreur = true;
        }
    }';
}
if (!in_array($qtype, array(TYP_GUESTBK, TYP_FORUM, TYP_NWL,TYP_REACT, TYP_REBLOG, TYP_RULES, TYP_RSS, TYP_BSS, TYP_SOCNET))) {
    $headinc .= '
    if (document.adminsend.datedeb.value != "") {
		regexp = /^[0-9]{12,12}$/;
        if (!regexp.test(document.adminsend.datedeb.value)) {
            sto += "  - '.addslashes($admin[1585].$admin[1407].$admin[1587].' => '.$admin[1409]).'\n";
			document.adminsend.datedeb.className = "errorInputText";
            erreur = true;
        }
	}
    if (document.adminsend.datefin.value != "") {
		regexp = /^[0-9]{12,12}$/;
        if (!regexp.test(document.adminsend.datefin.value)) {
            sto += "  - '.addslashes($admin[1585].$admin[1408].$admin[1587].' => '.$admin[1409]).'\n";
			document.adminsend.datefin.className = "errorInputText";
            erreur = true;
        } else {
			var deb = "'.date('YmdHi').'";
			if (document.adminsend.datedeb.value != "") deb = document.adminsend.datedeb.value;
			if (document.adminsend.datefin.value <= deb) {
				sto += "  - '.addslashes($admin[1585].$admin[1408].$admin[1587].' => '.$admin[1423]).'\n";
				document.adminsend.datefin.className = "errorInputText";
				erreur = true;
			}
		}
	}';
}
if ($bemail == 1) {
    $headinc .= '
	regexp = /^[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]+)*@(([a-z0-9à-ö]([-a-z0-9à-ö]*[a-z0-9à-ö]+)?){1,63}\.)+([a-z0-9à-ö]([-a-z0-9à-ö]*[a-z0-9à-ö]+)?){2,63}$/i;
    if (!regexp.test(document.adminsend.email1.value)) {
        sto += "  - '.addslashes($admin[544]).'\n";
		document.adminsend.email1.className = "errorInputText";
        erreur = true;
    }';
}
if ($bcat == 1) {
    if ($qtype == TYP_AGENDA) {
        if ($site[22] == 'H3') {
            $headinc .= '
    var dh1=0, dh2=0, hh1=0, hh2=0, mn1=0, mn2=0;
    if (document.adminsend.sth1.value == "PM") dh1 = 12;
    if (document.adminsend.sth2.value == "PM") dh2 = 12;
    if (document.adminsend.hh1.value > "") hh1 = (parseInt(document.adminsend.hh1.value) + dh1) * 60;
    if (document.adminsend.mn1.value > "") hh1 = hh1 + parseInt(document.adminsend.mn1.value);
    txt = document.adminsend.hh2.value + document.adminsend.mn2.value;
    if (txt == "") {
        hh2 = hh1;
    }
    else {
        if (document.adminsend.hh2.value > "") hh2 = (parseInt(document.adminsend.hh2.value) + dh2) * 60; 
        if (document.adminsend.mn2.value > "") hh2 = hh2 + parseInt(document.adminsend.mn2.value);
    }';
        } else {
            $headinc .= '
    var hh1=0, hh2=0, mn1=0, mn2=0, txt="";
    if (document.adminsend.hh1.value > "") hh1 = parseInt(document.adminsend.hh1.value) * 60;
    if (document.adminsend.mn1.value > "") hh1 = hh1 + parseInt(document.adminsend.mn1.value);
    txt = document.adminsend.hh2.value + document.adminsend.mn2.value;
    if (txt == "") {
        hh2 = hh1;
    }
    else {
        if (document.adminsend.hh2.value > "") hh2 = parseInt(document.adminsend.hh2.value) * 60; 
        if (document.adminsend.mn2.value > "") hh2 = hh2 + parseInt(document.adminsend.mn2.value);
    }';
        }
        $headinc .= '
    if (hh1 > hh2) {
        sto += "  - '.addslashes($admin[1592]).'\n";
		document.adminsend.hh1.className = "errorInputText";
		document.adminsend.mn1.className = "errorInputText";
		document.adminsend.hh2.className = "errorInputText";
		document.adminsend.mn2.className = "errorInputText";
        erreur = true;
    }';
    }
    if ($qtype == TYP_BLOG) {
        $headinc .= '
    if (document.adminsend.cat1.value == "") {
        sto += "  - '.addslashes($admin[1597].$admin[1177]).'\n";
        document.adminsend.cat1.className = "errorInputText";
        erreur = true;
    }
    if (document.adminsend.cat2.value == "") {
        sto += "  - '.addslashes($admin[1597].$admin[1178]).'\n";
        document.adminsend.cat2.className = "errorInputText";
        erreur = true;
    }';
    }
    if ($qtype == TYP_MENUICO) {
        $headinc .= '
    regexp = /^[a-zA-Z0-9_]{2,8}$/;
    if (!regexp.test(document.adminsend.cat1.value)) {
        sto += "  - '.addslashes($admin[1585].$qcat.$admin[1586]).'\n";
		document.adminsend.cat1.className = "errorInputText";
        erreur = true;
    }';
    }
    if ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL') {
        $headinc .= '
    regexp = /^[-0-9]+$/;
    if (!regexp.test(document.adminsend.cat1.value)) {
        sto += "  - '.addslashes($admin[1585].$qcat.$admin[1587]).'\n";
		document.adminsend.cat1.className = "errorInputText";
        erreur = true;
    }';
    }
    if ($qtype == TYP_BANNER) {
        $headinc .= '
    regexp = /[-A-Za-z0-9._]/;
    if (!regexp.test(document.adminsend.cat1.value)) {
        sto += "  - '.addslashes($admin[1585].$qcat.$admin[1587].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.adminsend.cat1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        if (!regexp.test(document.adminsend.cat2.value)) {
            sto += "  - '.addslashes($admin[1585].$qcat.$admin[1587].$admin[1178]).'\n";
			document.adminsend.cat2.className = "errorInputText";
            erreur = true;
        }
    }';
    }
    if ($qtype == TYP_RSS || $qtype == TYP_BSS) {
        $headinc .= '
    var ct1 = document.adminsend.cat1.value;
    if (ct1.length < 3) {
        sto += "  - '.addslashes($admin[1585].$qcat.$admin[1587].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.adminsend.cat1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var ct2 = document.adminsend.cat2.value;
        if (ct2.length < 3) {
            sto += "  - '.addslashes($admin[1585].$qcat.$admin[1586].$admin[1178]).'\n";
			document.adminsend.cat2.className = "errorInputText";
            erreur = true;
        }
    }';
    }
}
if ($qtype == TYP_ART || $qtype == TYP_OPTMENU) {
    $headinc .= '
    var acr = document.adminsend.ancre.value;
    if (ancr > "") {
        regexp = /[-A-Za-z0-9._]/;
        if (!regexp.test(document.adminsend.ancre.value)) {
            sto += "  - '.addslashes($admin[1585].$admin[1534].$admin[1587]).'\n";
            document.adminsend.ancre.className = "errorInputText";
            erreur = true;
        }
    }';
}
if (($btitre == 1 && !in_array($qtype, array(TYP_GUESTBK, TYP_THINK, TYP_RECO))) || ($btitre == 2 && $qtype == TYP_FAQ)) { 
    if ($qtype == TYP_RSS || $qtype == TYP_BSS) {
        $headinc .= '
	regexp = /(ftp|http|https):\/\/[a-z0-9à-ö-]+(.[a-z0-9à-ö-]+)*(:[0-9]+)?(\/.*)?$/i;
    if (!regexp.test(document.adminsend.titre1.value)) {
        sto += "  - '.addslashes($admin[1585].$qtitre.$admin[1587].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.adminsend.titre1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "" && (document.adminsend.titre2.value != "") && (document.adminsend.titre2.value != "http://")) { 
        if (!regexp.test(document.adminsend.titre2.value)) {
            sto += "  - '.addslashes($admin[1585].$qtitre.$admin[1587].$admin[1178]).'\n";
			document.adminsend.titre2.className = "errorInputText";
            erreur = true;
        }
    }';
    } else {
        $headinc .= '
    var tit1 = document.adminsend.titre1.value;
    if (tit1.length < 1) {
        sto += "  - '.addslashes($admin[1585].$qtitre.$admin[1586].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.adminsend.titre1.className = "errorInputText";
        erreur = true;
    }';
        if (!in_array($qtype, array(TYP_FORUM, TYP_SOCNET))) {
            $headinc .= '
    if (lng2 > "") {
        var tit2 = document.adminsend.titre2.value;
        if (tit2.length < 1) {
            sto += "  - '.addslashes($admin[1585].$qtitre.$admin[1586].$admin[1178]).'\n";
			document.adminsend.titre2.className = "errorInputText";
            erreur = true;
        }
    }';
        }
    }
}
if ($bnouveau == 1 && $qtype != TYP_MENUBOX && $qtype != TYP_DDMENUBOX && $qtype != TYP_FREEBOX) {
    if ($qtype == TYP_DNLOAD)
        $headinc .= '
    regexp = /[A-Za-z0-9.-_]/;';
    elseif ($qtype == TYP_LINKS)
        $headinc .= '
	regexp = /(ftp|http|https):\/\/[a-z0-9à-ö-]+(.[a-z0-9à-ö-]+)*(:[0-9]+)?(\/.*)?$/i;';
    elseif ($qtype == TYP_OPTMENU || $qtype == TYP_OPTDDMENU)
        $headinc .= '
    regexp = /[a-z0-9à-ö.-_\|?]/;';
    elseif ($qtype != TYP_ART)
        $headinc .= '
    regexp = /[A-Za-z0-9.-_]/;';
    if ($qtype != TYP_ART && $qtype != TYP_BANNER)
        $headinc .= '
    if (!regexp.test(document.adminsend.nouveau1.value)) {
        sto += "  - '.addslashes($admin[1585].$qnouveau.$admin[1587].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.adminsend.nouveau1.className = "errorInputText";
        erreur = true;
    }';
    if ($qtype != TYP_ART && $qtype != TYP_SOCNET)
		$headinc .= '
    if (lng2 > "") {
        if (!regexp.test(document.adminsend.nouveau2.value)) {
            sto += "  - '.addslashes($admin[1585].$qnouveau.$admin[1587].$admin[1178]).'\n";
			document.adminsend.nouveau2.className = "errorInputText";
            erreur = true;
        }
    }';
    if ($qtype == TYP_BANNER) {
        $headinc .= '
    var nouv1 = document.adminsend.nouveau1.value;
    if (nouv1.length < 3) {
        sto += "  - '.addslashes($admin[1585].$qnouveau.$admin[1586].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.adminsend.nouveau1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var nouv2 = document.adminsend.nouveau2.value;
        if (nouv2.length < 3) {
            sto += "  - '.addslashes($admin[1585].$qnouveau.$admin[1586].$admin[1178]).'\n";
			document.adminsend.nouveau2.className = "errorInputText";
            erreur = true;
        }
    }';
	}
}
if ($bnouveau == 1 && $qtype == TYP_FREEBOX) {
    $headinc .= '
    regexp = /[0-9]/;
    fieldweb = document.adminsend.fieldweb.value;
    if (fieldweb > "") {
        if (!regexp.test(fieldweb)) {
            sto += "  - '.addslashes($admin[1585].$admin[1537].$admin[1587]).'\n";
            document.adminsend.fieldweb.className = "errorInputText";
            erreur = true;
        }
    }';
}
if ($bnouveau == 1 && $qtype == TYP_ART) {
    $headinc .= '
    regexp = /[0-9]/;
    highart = document.adminsend.highart.value;
    if (highart > "") {
        if (!regexp.test(highart)) {
            sto += "  - '.addslashes($admin[1585].$admin[1537].$admin[1587]).'\n";
            document.adminsend.highart.className = "errorInputText";
            erreur = true;
        }
    }';
}
$headinc .= '
    if (erreur == true) {
        sto = "'.addslashes($admin[1589]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $qtitle);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
$langue0 = $lang[0];
$langue1 = $lang[1];
if (in_array($qtype, array(TYP_ART, TYP_BLOG, TYP_FAQ, TYP_DNLOAD, TYP_LINKS, TYP_OPTMENU, TYP_OPTDDMENU, TYP_PHOTO))) {
    echo BeginJavascript().'
function set(form) {
  form.cat1.value = form.list1.value;
}
function set2(form) {
  selindex = form.list1.selectedIndex;
  form.cat1.value = form.list1.value;
  form.list2.selectedIndex = selindex;
  form.cat2.value = form.list2.value;
}
function set3(form) {
  selindex = form.list2.selectedIndex;
  form.cat2.value = form.list2.value;
  form.list1.selectedIndex = selindex;
  form.cat1.value = form.list1.value;
}
function reset(form) {
    form.list1.selectedIndex = 0;
}
function reset2(form) {
    form.list1.selectedIndex = 0;
    form.list2.selectedIndex = 0;
}
    '.EndJavascript();
}

$mem_lang = $lang;
if (in_array($qtype, array(TYP_GUESTBK, TYP_FORUM, TYP_REACT, TYP_REBLOG))) {
    $flag1 = '<i class="flg-lang align-middle" style="width:30px;height:20px;"></i>';
    $lang[0] = 'lang';
    $lang[1] = '';
}
else $lang = $mem_lang;
    
htable($qtitle, '100%');
if ($qformonly == 2) {
    $form = 2;
}
echo '
<div style="text-align:center;">';
if ($qintro != '') {
    echo $qintro.'
  <br />
  <hr />';
}
if ($qseeall != '') {
    if ($pgreturn[$qtype] == 'nwl' && empty($form))
        echo '
<form name="sellist" method="POST" action="admin.php?lng='.$lng.'&amp;pg=nwl&amp;action=news">
  <div style="text-align:center;">'.SubmitButton($admin[1517]).'</div>
</form>
<hr />';
    if ($qtype == TYP_OPTMENU) {
       echo '
  <a href="admin.php?lng='.$lng.'&amp;pg=menubox&amp;act=1">'.$admin[1235].'</a><br />';
    }
    if ($qtype == TYP_OPTDDMENU) {
       echo '
  <a href="admin.php?lng='.$lng.'&amp;pg=menubox&amp;act=2">'.$admin[1235].'</a><br />';
    }
    echo '
  <a href="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'&amp;tri='.$tri.'">'.$qseeall.'</a> ';
    if (in_array($pg, $canduplicate) && $form == 2) {
        if ($qtype == TYP_AGENDA) 
            echo '||
  <a href="admin.php?lng='.$lng.'&amp;pg=agenda&amp;tri='.$tri.'&amp;form=3&amp;idpg='.$idpg.'&amp;id='.$id.'&amp;dup=2">'.$admin[1522].' </a>';
        else
            echo '||
  <a href="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'&amp;form=2&amp;id='.$id.'&amp;dup=1">'.$admin[1522].' </a>';
    }
    if ($qwrite != '') {
        echo '||
  <a href="admin.php?lng='.$lng.'&amp;pg='. $pgreturn[$qtype].'&amp;tri='.$tri.'&amp;form='.(isset($qwriteform) ? $qwriteform : '1').'">'.$qwrite.'</a>';
    }
    echo '
  <br />
  <hr />
  ';
}

################################################################################
if (empty($form)) {
	@set_time_limit(0);
    if (empty($tri)) {
        $tri = '-id';
    }
    if ($qtype == TYP_OPTMENU) {
        $dbw    = SelectDBFieldsByNotStatus(SelectDBFieldsByType(ReadDBFields(DOCID),$qtype),'d');
        $dbwork = array();
        for ($i = 0; $i < count($dbw); $i++) {
            ReadDoc($dbw[$i][1]);
            if ($fieldweb == $menubox) {
                $dbwork[] = $dbw[$i];
            }
        }
	}
    elseif ($qtype == TYP_OPTDDMENU) {
        $dbw    = SelectDBFieldsByNotStatus(SelectDBFieldsByType(ReadDBFields(DOCID),$qtype),'d');
        $dbwork = array();
        for ($i = 0; $i < count($dbw); $i++) {
            ReadDoc($dbw[$i][1]);
            if ($fieldweb == $ddmenubox) {
                $dbwork[] = $dbw[$i];
            }
        }
    } else {
        $dbwork = SelectDBFieldsByNotStatus(SelectDBFieldsByType(ReadDBFields(DOCID),$qtype),'d');
    }	
    @rsort($dbwork);
    $tmpi   = 0;
    $tmp[0] = array();
    $tmp[1] = array();
    $tmp[2] = array();
    $tmp[3] = array();
    $tmp[4] = array();
	$tmp[5] = array();
	$tmp[6] = array();
	$tmp[7] = array();
	$tmp[8] = array();
    $mbs    = ReadDbFields(DBMENUBOX);
    $flng   = ($lng == $mem_lang[0]);
    $format_nextid = '%'.ceil(log10(ReadCounter(NEXTID))).'u';
    $format_fr     = '%'.ceil(log10(ReadCounter(DBFORUMCOUNTER))).'u';
    for ($i = 0; $i < count($dbwork); $i++) {
        ReadDoc($dbwork[$i][1]);
        $temp   = explode('|', $author);
        $author = $temp[0];
        $grpc   = isset($temp[1]) ? $temp[1] : '';
        $grps   = ReadGroupsCol();
        $access = false;
        foreach($grps as $grp=>$membrs) {
            if ($fctwri == 'redac2' && $grp == $grpc && in_array($userprefs[1], $membrs)) {
                $access = true;
                break;
            }
        }
        $access = $access || in_array($fctwri, array('admin', 'modo', 'webm')) || $author == $myname || isAccessGrantedCol($grpc) ? true : false;
        if (!$access) continue;
        $champs0 = '';
        $champs1 = '';
        $champs2 = '';
        $champs3 = '';
        $champs4 = '';
        if ($fileid != $dbwork[$i][1] || $type != $dbwork[$i][0]) {
            $fid = '*'.$dbwork[$i][1];
            $champs0 = $admin[796].': ';
            $champs1 = $admin[797];
        }
        switch ($type) {
        case TYP_GUESTBK :
            $champs1 = $admin[175].strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fielda1))).' - ';
            $champs2 = $author;
            break;
        case TYP_BANNER :
            $champs0 = $fielda1.' - ';
            $champs1 = $fieldb1.' - ';
            $champs2 = $fieldd1;
            break;
        case TYP_REACT :
            $champs0 = $admin[1599].Formatage($format_nextid, $fielda2).' : '.(empty($tmp0)? '' : ($flng ? $tmp0[0][2] : $tmp0[0][3])).' - ';
            $champs1 = $admin[1600].Formatage('%2u', $fielda1).' - ';
            $champs2 = $admin[1601].' '.$author;
            break;
        case TYP_REBLOG :
            $champs0 = $admin[1117].Formatage($format_nextid, $fielda2).' : '.(empty($tmp0)? '' : ($flng ? $tmp0[0][2] : $tmp0[0][3])).' - ';
            $champs1 = $admin[1600].Formatage('%2u', $fielda1).' - ';
            $champs2 = $admin[1601].' '.$author;
            break;
        case TYP_NEWS :
        case TYP_BLOG :
            $champs0 = ($flng ? $fielda1 : $fielda2).' - ';
            $champs1 = ($flng ? $fieldb1 : $fieldb2).' - ';
            $champs2 = $author;
            $champs4 = $fieldmod;
            break;
        case TYP_BRUB :
            $champs0 = ($flng ? $fielda1 : $fielda2);
            break;
        case TYP_MENUBOX :
            $champs1 = ($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod != '' ? true : false;
            break;
        case TYP_MENUICO :
            $champs1 = ($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod;
            break;
        case TYP_FREEBOX :
            $champs1 = ($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod;
            break;
        case TYP_NWL     :
            $champs1 = ($flng ? $fieldb1 : $fieldb2).' ('.FormatDate(substr($moddate, 0, 8)).')';
            break;
        case TYP_SOCNET  :
            $champs1 = $fieldb1;
            $champs4 = $fieldmod;
            break;
        case TYP_DDMENUBOX :
            $champs1 = $fielda2.' - '.($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod;
            break;
        case TYP_FORUM :
            if ($fielda2 == '0') {
                $champs1 = $admin[208].Formatage($format_fr, $fielda1).' + ';
                $champs2 = '<strong>'.$fieldb1.'</strong>';
            }
            else {
                $champs1 = $admin[208].Formatage($format_fr, $fielda1).' - ';
                $champs2 = $admin[209].Formatage('%2u', $fielda2);
            }
            break;
        case TYP_ART :
            $champs0 = GetArtOptMenu($fileid, $type);
            $champs2 = strip_tags($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod;
            break;
        case TYP_PHOTO     :
            $champs0 = GetArtOptMenu($fileid, $type);
            $champs1 = ($flng ? $fielda1 : $fielda2).' - ';
            $champs2 = ($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod;
            break;
        case TYP_OPTMENU   :
        case TYP_OPTDDMENU :
        case TYP_DNLOAD    :
        case TYP_FAQ       :
        case TYP_LINKS     :
            $champs1 = ($flng ? $fielda1 : $fielda2).' - ';
            $champs2 = ($flng ? $fieldb1 : $fieldb2);
            $champs4 = $fieldmod;
            break;
        case TYP_BSS       :
        case TYP_RSS       :
            $champs1 = ($flng ? $fielda1 : $fielda2).' - ';
            $champs2 = ($flng ? $fieldb1 : $fieldb2);
            break;
        case TYP_THINK :
            $champs1 = ($flng ? $fieldb1 : $fieldb2).' - ';
            $champs2 = strip_tags(CutLongWord(($flng ? $fieldc1 : $fieldc2), 142));
            break;
        case TYP_RECO :
            $champs1 = $fieldb1.' - ';
            $champs2 = ($flng ? $fieldc1 : $fieldc2);
            break;
        case TYP_AGENDA :
			$day     = substr($fielda1, 6, 2);
			$mois    = substr($fielda1, 4, 2);
			$annee   = substr($fielda1, 0, 4);
			$chps4   = substr(FormatDate($annee.$mois.$day."00000"), 0, 10);
            $champs1 = $fielda1.' - ';
            if ($fielda2 == '' || $fielda2 == '-') {
                $champs1 = $chps4.' - ';
            } else {
                $champs1 = $chps4.' - '.$fielda2.' - ';
            }
            $champs2 = ($flng ? $fieldc1 : $fieldc2);
			$champs2 = strip_tags(str_replace('<br />', '', str_replace('</p>', '', str_replace('<p>', '', $champs2))));
            if (strlen($champs2) > 142) {
                $champs2 = CutLongWord($champs2,142).' .../...';
            }
			$champs3 = $annee.$mois.$day;
            $champs4 = $fieldmod;
            break;
        }
		
        $tmp[0][$tmpi] = (TYP_ART == $type || TYP_PHOTO == $type ? '' : $champs0).'<strong>'.$champs1.'</strong>'.$champs2;
        $tmp[1][$tmpi] = $fileid;
        $tmp[2][$tmpi] = $status;
        $tmp[3][$tmpi] = $champs3;
		$tmp[4][$tmpi] = $fieldd1;
        $tmp[5][$tmpi] = $champs0;
		$tmp[6][$tmpi] = $moddate;
        $tmp[7][$tmpi] = $fielda2;
        $tmp[8][$tmpi] = $champs4;
        $tmpi++;
    }
    unset($dbwork);
    if ($tmpi > 0) {
        $href = CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg='.$pg.($qtype == TYP_OPTMENU ? '&amp;menubox='.$menubox : '').($qtype == TYP_OPTDDMENU ? '&amp;ddmenubox='.$ddmenubox : '');
        switch ($tri) {
        case 'id' :
        case '-id' :
            $cr = array_multisort($tmp[1], SORT_NUMERIC, $tri == 'id' ? SORT_ASC : SORT_DESC, $tmp[0], $tmp[2], $tmp[3], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case 'ch' :
        case '-ch' :
			$cr = array_multisort($tmp[0], $tri == 'ch' ? SORT_ASC : SORT_DESC, $tmp[1], $tmp[2], $tmp[3], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case 'dt' :
        case '-dt' :
            $cr = array_multisort($tmp[3], SORT_NUMERIC, $tri == 'dt' ? SORT_ASC : SORT_DESC, $tmp[0], $tmp[1], $tmp[2], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case 'md' :
        case '-md' :
            $cr = array_multisort($tmp[6], SORT_NUMERIC, $tri == 'md' ? SORT_ASC : SORT_DESC, $tmp[0], $tmp[1], $tmp[2], $tmp[3], $tmp[4], $tmp[5], $tmp[7], $tmp[8]);
            break;
        }
    }
    if (empty($idpg)) {
        $idpg = 1;
    }
    else {
        while ($tmpi <= ($idpg - 1)* $serviz[75]) $idpg--;
    }
	if ($tmpi > 0) {
        $navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'&amp;tri='.$tri.'&amp;idpg=', $tmpi, $idpg, $serviz[75]);
        echo $navbar.'
<form name="fast_actions" id="fast_actions" action="admin.php?lng='.$lng.'&amp;idpg='.$idpg.'&amp;pg='.$pgreturn[$qtype].'&amp;tri='.$tri.'&amp;act=fast" method="post">
  <fieldset class="w-100 m-0 p-2">';
		echo '
    <div class="table-responsive-md">
    <table class="table w-100 m-auto table-bordered">
      <tr>
        <td colspan="'.($qtype == TYP_AGENDA ? '5' : '4').'">
          <div style="text-align:right; padding-right:25px; margin-bottom:4px;">'.SubmitButton($admin[1602]).'
            <i class="fas fa-level-down-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>';
		$idup     = $tri == 'id' 
          ? '<i class="fas fa-caret-up text-danger align-middle" style="font-size: 1.8rem;"></i>' 
          : '<i class="fas fa-caret-up align-middle" style="font-size: 1.8rem;"></i>';
		$iddown   = $tri == '-id' 
          ? '<i class="fas fa-caret-down text-danger align-middle" style="font-size: 1.8rem;"></i>' 
          : '<i class="fas fa-caret-down align-middle" style="font-size: 1.8rem;"></i>';
		$descup   = $tri == 'ch' 
          ? '<i class="fas fa-caret-up text-danger align-middle" style="font-size: 1.8rem;"></i>' 
          : '<i class="fas fa-caret-up align-middle" style="font-size: 1.8rem;"></i>';
		$descdown = $tri == '-ch' 
          ? '<i class="fas fa-caret-down text-danger align-middle" style="font-size: 1.8rem;"></i>' 
          : '<i class="fas fa-caret-down align-middle" style="font-size: 1.8rem;"></i>';
		$moddup   = $tri == 'md' 
          ? '<i class="fas fa-caret-up text-danger align-middle align-middle" style="font-size: 1.8rem;"></i>' 
          : '<i class="fas fa-caret-up align-middle" style="font-size: 1.8rem;"></i>';
		$modddown = $tri == '-md' 
          ? '<i class="fas fa-caret-down text-danger align-middle" style="font-size: 1.8rem;"></i>' 
          : '<i class="fas fa-caret-down align-middle" style="font-size: 1.8rem;"></i>';
		echo '
      <tr class="forum">
        <td style="vertical-align:middle;padding:5px;white-space:nowrap;text-align:center;width:8%;">
		  <a href="'.$href.'&amp;tri=id" title="'.$admin[674].'" style="top:-1px;left:1px;"> '.$idup.' </a>
		  '.$admin[678].'
	      <a href="'.$href.'&amp;tri=-id" title="'.$admin[675].'" style="top:-1px;left:1px;"> '.$iddown.' </a>
		</td>';
		if ($type == TYP_AGENDA) {
			$datup   = $tri == 'dt' ? '<i class="fas fa-caret-up text-danger" style="font-size: 1.8rem;"></i>': '<i class="fas fa-caret-up" style="font-size: 1.8rem;"></i>';
			$datdown = $tri == '-dt' ? '<i class="fas fa-caret-down text-danger" style="font-size: 1.8rem;"></i>': '<i class="fas fa-caret-down" style="font-size: 1.8rem;"></i>';
			echo '
        <td style="vertical-align:middle;padding:5px;white-space:nowrap;text-align:center;width:10%;">
		  <a href="'.$href.'&amp;tri=dt" title="'.$admin[1339].'" style="top:-1px;left:1px;"> '.$datup.' </a>
		  '.trim(str_replace(':', '', $admin[1603])).'
	      <a href="'.$href.'&amp;tri=-dt" title="'.$admin[1340].'" style="top:-1px;left:1px;"> '.$datdown.' </a>
		</td>';
		}
		echo '
		<td style="vertical-align:middle;padding:5px;width:'.($type == TYP_AGENDA ? 60 : 70).'%;">
		  <a href="'.$href.'&amp;tri=ch" title="'.$admin[676].'" style="top:-1px;left:1px;"> '.$descup.' </a>
		  '.$admin[679].'
	      <a href="'.$href.'&amp;tri=-ch" title="'.$admin[677].'" style="top:-1px;left:1px;"> '.$descdown.' </a>
		</td>
        <td style="vertical-align:middle;padding:5px;white-space:nowrap;text-align:left;width:15%;">
	      <a href="'.$href.'&amp;tri=md" title="'.$admin[1442].'" style="top:-1px;left:1px;"> '.$moddup.' </a>
		  '.$admin[1441].'
	      <a href="'.$href.'&amp;tri=-md" title="'.$admin[1443].'" style="top:-1px;left:1px;"> '.$modddown.' </a>
		</td>
		<td style="vertical-align:middle;padding:5px;width:7%;">'.$admin[680].'</td>
      </tr>';
        $ids = '';
        for ($i = $serviz[75]*($idpg-1); $i < Min($serviz[75]*$idpg, $tmpi); $i++) {
            $fileid  = $tmp[1][$i];
            $status  = $tmp[2][$i];
			$fieldd1 = $tmp[4][$i];
            echo '
      <tr class="'.($i %2 == 0 ? 'rep' : 'quest').'">';
            echo '
        <td style="padding:7px 5px;white-space:nowrap;text-align:center;">'.$tmp[1][$i].' </td>
        <td colspan="'.($type == TYP_AGENDA ? 3 : 2).'" style="padding:7px 5px;width:100%;text-align:left;">'.(TYP_ART == $type || TYP_PHOTO == $type ? $tmp[5][$i] : '').'
          <span style="float:left;">
            <i class="far fa-dot-circle text-'.($tmp[8][$i] == '' ? 'transparent' : 'dark').'" style="font-weight: 900;" title="'.$tmp[8][$i].'"></i>
            <a href="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'&amp;tri='.$tri .'&amp;form=2&amp;idpg='.$idpg.'&amp;id='.$fileid.'" title="'.$admin[33].'">
              <i class="far fa-file-alt" title="'.$admin[33].'"></i> '.$tmp[0][$i].'
			</a>
          </span>';
            if (in_array($pg, $canduplicate)) {
                if ($pg == "agenda") {
                    echo '
          <span style="float:right;padding-left:4px;"> 
		    <a href="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'&amp;tri='.$tri.'&amp;form=3&amp;idpg='.$idpg.'&amp;id='.$fileid.'&amp;dup=2" 
              title="'.$admin[915].'">
			  <i class="fas fa-paste text-info" style="font-size: 1.4rem;" title="'.$admin[915].'"></i>
			</a>
		  </span>';
                } else {
					echo '
          <span style="float:right;padding-left:4px;"> 
		    <a href="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'&amp;tri='.$tri.'&amp;form=2&amp;idpg='.$idpg.'&amp;id='.$fileid.'&amp;dup=1" 
              title="'.$admin[915].'">
			  <i class="fas fa-paste text-info" style="font-size: 1.4rem;" title="'.$admin[915].'"></i>
			</a>
		  </span>';
                }
            }
            if (TYP_MENUBOX == $type && $fctwri != 'redac1') {
                echo '
          <span style="float:right;padding-right:4px;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=mnutoddm&amp;id='.$fileid.'" title="'.$admin[1541].'">
			  <i class="fas fa-exchange-alt text-warning" style="font-size: 1.4rem;" title="'.sprintf($admin[1541], strip_tags($tmp[0][$i])).'"></i>
			</a>
		    <a href="admin.php?lng='.$lng.'&amp;pg=rencat&amp;tri='.$tri.'&amp;id='.$fileid.'" title="'.$admin[1365].'">
			  <i class="fas fa-file-alt" style="font-size: 1.4rem;" title="'.$admin[1365].'"></i>
			</a>
          </span>';
            }
            if (TYP_DDMENUBOX == $type && $fctwri != 'redac1') {
                echo '
          <span style="float:right;padding-right:4px;">';
                if (in_array($tmp[7][$i], array('DDH', 'DDV')))
                    echo '
		    <a href="admin.php?lng='.$lng.'&amp;pg=ddmtomnu&amp;id='.$fileid.'" title="'.$admin[1542].'">
			  <i class="fas fa-exchange-alt text-warning" style="font-size: 1.4rem;" title="'.sprintf($admin[1542], strip_tags($tmp[0][$i])).'"></i>
			</a>';
            }
            if (TYP_OPTMENU == $type) {
				if (strpos($fieldd1, 'articles') !== false) {
					$pgart = substr($fieldd1, strpos($fieldd1, 'pg=') + 3);
					$pgart = strpos($pgart, CONNECTOR) > 0 ? substr($pgart, 0, strpos($pgart, CONNECTOR)) : $pgart;
					$pgart = strpos($pgart, '&') > 0 ? substr($pgart, 0, strpos($pgart, '&')) : $pgart;				
					echo '
            <span style="float:right;padding-right:4px;">
		      <a href="admin.php?lng='.$lng.'&amp;pg=art&amp;tri='.$tri.'&amp;form=2&amp;idpg='.$idpg.'&amp;id='.$pgart.'" title="'.$admin[1371].'">
			    <i class="far fa-file" title="'.$admin[1371].'"></i>
			  </a>
            </span>';
				}
            }
            echo '
          <span style="clear:both"></span>
        </td>
        <td  style="padding:7px 5px;white-space:nowrap;text-align:center;">';
            if ($status == "a") {
                MakeRadioGroup(array( array("a", "i", $fileid), array("a", "d", $fileid) ));
            }
            elseif ($status == "i") {
                MakeRadioGroup(array( array("i", "a", $fileid), array("i", "d", $fileid) ));
            }
            elseif ($status == "d") {
                MakeRadioGroup(array( array("d", "s", $fileid), array("d", "i", $fileid) ));
            }
            else {
                echo '
          <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=dbcheck" title="'.$admin[278].'">
            <i class="adm-dbcheck"></i>
          </a>';
            }
            echo '
        </td>
      </tr>';
            $ids .= $tmp[1][$i]." ";
        }
        echo '
      <tr>
        <td colspan="4">
          <div style="text-align:right; padding-right:25px; margin-bottom:4px;">'.SubmitButton($admin[1602]).'
            <i class="fas fa-level-up-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
    </table>
    </div>
    <input type="hidden" name="ids" value="'.$ids.'" />';
		if (in_array($qtype, array(TYP_FREEBOX, TYP_MENUBOX, TYP_DDMENUBOX, TYP_SOCNET, TYP_BANNER, TYP_THINK, TYP_RSS)) 
            && !in_array($fctwri, array('redac1', 'modo')))
			echo '
    <div class="float-left mt-5">'
      .(@$drtuser[5] == 'on' || in_array($fctwri, array('admin', 'webm', 'redac2')) ? '
	  <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config6&amp;selskin='.$page[14].'">'.$admin[346].'
	    <i class="gen-cfgboites"></i>
	  </a>&nbsp;||&nbsp;': '')
      .(@$drtuser[2] == 'on' || in_array($fctwri, array('admin', 'webm')) ? '
	  <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config3&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">'.$admin[469].'
	    <i class="gen-cfgaccueil"></i>
	  </a>' : '').'
    </div>';
		echo '
  </fieldset>
</form>';
        echo $navbar;
	}
	else {
        echo '
<p class="text-center">'.$admin[854].'</p>';
	}
}
################################################################################
elseif ($form == 1) {
	if (!empty($erreur))
		echo displayErrorMsg($admin[1589], $erreur);
	if (!empty($id)) {
        if ($qtype == TYP_OPTMENU && $typ == TYP_ART) {
            $nouveau1 = 'articles.php?lng='.$lang[0].'&pg='.$id;
            $nouveau2 = 'articles.php?lng='.$lang[1].'&pg='.$id;
        }
        if ($qtype == TYP_OPTMENU && $typ == TYP_PHOTO) {
            $nouveau1 = 'photorama2.php?lng='.$lang[0].'&pg='.$id;
            $nouveau2 = 'photorama2.php?lng='.$lang[1].'&pg='.$id;
        }
	}
    if ($qtype ==  TYP_ART) {
        $okreact = !isset($okreact) ? 'on' : $okreact;
    }
    echo '
  <style> .w-admeditor { max-width: '.$serviz[101].'; } </style>
  <form name="adminsend" id="adminsend" 
      action="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'" 
      method="post" onsubmit="return VerifyForm(); return false;">
    <input type="hidden" name="add" value="1" />
    <input type="hidden" name="tri" value="'.$tri.'" />
    <input type="hidden" name="idpg" value="'.$idpg.'" />
    <fieldset class="w-100 m-0 p-2">';
	echo '
      <br />'.$admin[764].'
      <select class="form-control w-100 mb-3 mx-auto" style="max-width:80px;" name="status">
        <option value="on" selected="selected">'.$admin[765].'</option>
        <option value="">'.$admin[766].'</option>
      </select>';
    /// début modif accès privé
    if (in_array($qtype, array(TYP_ART, TYP_AGENDA, TYP_BLOG, TYP_DNLOAD, TYP_FAQ, TYP_LINKS, TYP_NEWS, TYP_PHOTO, 
		TYP_FREEBOX, TYP_MENUBOX, TYP_OPTMENU, TYP_DDMENUBOX, TYP_OPTDDMENU, TYP_MENUICO, TYP_SOCNET, TYP_NWL))) {
        $dbgroup = ReadDBFields($qtype == TYP_NWL ? GROUPSNWL : GROUPS);
        echo '
      '.$admin[$qtype == TYP_NWL ? 1484 : 932].' :&nbsp;
      <select class="form-control w-100 mb-3 mx-auto" name="group" style="max-width:136px;">';
        if ($qtype != TYP_NWL)
            echo '
        <option value=""> -- '.$admin[1604].' -- </option>';
        echo '
        <option value="'.($qtype == TYP_NWL ? 'all_subscribers' : 'all_members').'">'.$admin[$qtype == TYP_NWL ? 1150 : 690].'</option>';
        foreach ($dbgroup as $groupe)
            echo '
        <option value="'.$groupe[0].'">'.$groupe[0].'</option>';
        echo '
      </select>';
    }
    /// fin modif accès privé
    echo '
    <div class="table-responsive-md">
    <table class="table w-100 m-auto">';
	if (!in_array($qtype, array(TYP_GUESTBK, TYP_FORUM, TYP_NWL,TYP_REACT, TYP_BRUB, TYP_REBLOG, TYP_RULES, TYP_RSS, TYP_BSS, TYP_SOCNET))) {
		if ($fctwri != 'redac1')
			echo '
      <tr>
	    <td class="text-center">
		  <div class="mx-auto" style="width:184px;">
		    <div class="float-left pr-1">'.$admin[1406].'</div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin1\').popover({
                  title:"'.$admin[1406].'",
                  content:"'.$help[14].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop pl-1">
              <a class="popadmin1 float-left" title="'.$admin[1406].'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
	    </td>
	  </tr>
      <tr>
	    <td class="text-center">
		  <div class="d-inline-block">'.$admin[1407].' :</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_datedeb ? 'errorInputText' : 'texte').'" type="text" name="datedeb" size="10" value="'.$datedeb.'" />
          </div>
          <div class="d-inline-block">&nbsp;&nbsp;'.$admin[1408].' :</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_datefin ? 'errorInputText' : 'texte').'" type="text" name="datefin" size="10" value="'.$datefin.'" />
          </div>
		</td>
	  </tr>';
		else
			echo '
	  <input type="hidden" name="datedeb" value="'.$datedeb.'" />
	  <input type="hidden" name="datefin" value="'.$datefin.'" />';
	}
    if ($bname == 1) {
		if ($fctwri != 'redac1') {
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[114].'</div>
          <div class="d-inline-block">
            <input class="form-control w-80 mx-auto '.($err_pseudo1 ? 'errorInputText' : 'texte').'" 
              type="text" name="pseudo1" size="32" value="'.$myname.'" />
          </div>
        </td>
      </tr>';
            if ((@$drtuser[12] != '' || in_array($fctwri, array('admin', 'webm', 'redac2'))) && $serviz[42] == 'on') {
                $dbgroup = ReadDBFields(GROUPSCOL);
                echo '
      <tr>
        <td class="text-center">'.$admin[1480].' 
          <select class="form-control w-100 mx-auto" style="max-width:180px;" name="grpcol">
            <option value=""'.Selected($grpcol == '').'>'.$admin[1604].'</option>
            <option value="ALL"'.Selected($grpcol == 'ALL').'>'.$admin[1481].'</option>';
                foreach ($dbgroup as $groupe)
                    echo '
            <option value="'.$groupe[0].'"'.Selected($grpcol == $groupe[0]).'>'.$groupe[0].'</option>';
                echo '            
          </select>
        </td>
      </tr>';
            } else {
                echo '
	  <input type="hidden" name="grpcol" value="'.$grpcol.'" />';
            }
		} else {
			echo '
	  <input type="hidden" name="pseudo1" value="'.$myname.'" />
	  <input type="hidden" name="grpcol" value="'.$grpcol.'" />';
        }
    }
    if ($bemail == 1) {
		if ($fctwri != 'redac1')
			echo '
      <tr>
        <td class="text-center">'.$admin[115].'&nbsp;
          <input class="form-control w-100 mx-auto '.($err_email1 ? 'errorInputText' : 'texte').'" type="text" name="email1" style="max-width:280px;" value="'.$myemail.'" />
        </td>
      </tr>';
		else
			echo '
	  <input type="hidden" name="email1" value="'.$myemail.'" />';
    }
    if ($bnouveau == 2 && $qtype == TYP_NEWS) {
		if ($fctwri != 'redac1')
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block"><label for="nouveau1">'.$qnouveau.'</label></div>
          <div class="d-inline-block form-check"><input class="form-check-input" type="checkbox" id="nouveau1" name="nouveau1" /></div>
        </td>
      </tr>';
		else
			echo '
	  <input type="hidden" name="nouveau1" value="" />';
    }
    if ($bcat == 1 && !in_array($qtype, array(TYP_AGENDA, TYP_FREEBOX, TYP_MENUBOX, TYP_DDMENUBOX, TYP_MENUICO, TYP_SOCNET))) {
        if ($qtype == TYP_ART || $qtype == TYP_OPTMENU || $qtype == TYP_PHOTO) {
			echo '
	  <tr>
	    <td class="text-center">
		  <div class="text-center mt-2 mx-auto" style="width:200px;">
		    <div class="float-left pr-1">'.$qcat.'</div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin2\').popover({
                  title:"'.$qcat.'",
                  content:"'.$help[13].($qtype == TYP_ART ? $help[16] : '').'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin2 float-left ml-2" title="'.$qcat.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
	  </tr>';
		} else
			echo '
      <tr><td class="text-center">'.$qcat.'</td></tr>';
        if ($qtype == TYP_BANNER) {
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input id="cat1" class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" 
              name="cat1" style="vertical-align:middle;width:400px;" type="text" value="" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver1" id="browserver1" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Image&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'cat1\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>';
            if ($lang[1] != "") {
                echo '
        </td>
      </tr>
      <tr>
        <td style="text-align:center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input id="cat2" class="form-control '.($err_cat2 ? 'errorInputText' : 'texte').'" 
              name="cat2" style="vertical-align:middle;width:400px;" type="text" value="" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver2" id="browserver2" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Image&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'cat2\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>';
            }
		  echo '
        </td>
      </tr>';
        }
        elseif ($qtype == TYP_BSS || $qtype == TYP_RSS) {
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" type="text" name="cat1" value="" size="38" />
          </div>';
            if ($lang[1] != "") {
                echo '
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_cat2 ? 'errorInputText' : 'texte').'" type="text" name="cat2" value="" size="38" />
          </div>';
            }
            echo '
        </td>
      </tr>';
        }
        elseif ($qtype == TYP_OPTDDMENU) {
            echo '
      <tr>
        <td class="text-center">
		  <div class="text-center m-auto" style="width:240px;">
		    <div class="float-left" style="padding-left:10px;">
              <input id="cat1" class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" name="cat1" style="width:200px;" type="text" value="" />
		    </div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin3\').popover({
                  title:"'.$qcat.'",
                  content:"'.$help[11].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin3 float-left" title="'.$qcat.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
      </tr>';
		}
        else {
            $cat1 = $cat2 = '';
			$nlg = $lang[1] != '' ? '2' : '';
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <select class="form-control" name="list1" id="list1" onchange="set'.$nlg.'(this.form);" style="width:220px;">';
            if ($qtype != TYP_BLOG) echo '
              <option value="" selected="selected"> -- '.$admin[917].' -- </option>';
            if ($qtype == TYP_BLOG) echo '
              <option value=""> -- '.$admin[1773].' -- </option>';
            if ($qtype != TYP_BLOG) echo '
              <option value=""> -- '.$admin[1125].' -- </option>';
            if ($qtype == TYP_ART) {
                $dbom = ReadDBFields(DBINDEX.'om'.DBEXT);
                $dbw  = array();
                foreach ($dbom as $ix) {
                    if ($ix[0].$ix[1] != '') $dbw[] = $ix;
                }
            }
            elseif ($qtype == TYP_BLOG) {
                $dbw = ReadDBFields(DBINDEX.TYP_BRUB.DBEXT);
            }
            else
                $dbw = ReadDBFields(DBINDEX.$qtype.DBEXT);
            sort($dbw);
            if (!empty($dbw)) {
                $curr_cat = "";
                for ($i = 0; $i < count($dbw); $i++) {
                    if ($dbw[$i][0].$dbw[$i][1] != $curr_cat) {
                        $cat = str_replace('<!--', '&#60;!--', str_replace('-->', '--&#62;', $dbw[$i][0]));
                        $curr_cat = $dbw[$i][0].$dbw[$i][1];
                        echo '
              <option value="'.htmlspecialchars($dbw[$i][0], ENT_QUOTES, $charset).'">'.$cat.'</option>';
                    }
                }
            }
            echo '
            </select>
          </div>
          <div class="d-inline-block"><i class="fas fa-angle-double-right"></i></div>
          <div class="d-inline-block">
            <input class="form-control texte" type="text" name="cat1" 
              value="'.htmlspecialchars($cat1, ENT_QUOTES, $charset).'" size="38" onfocus="reset'.$nlg.'(this.form);" />
          </div>
        </td>
      </tr>';
            if ($lang[1] != "") {
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <select class="form-control" name="list2" id="list2" onchange="set3(this.form);" style="width:220px;">';
            if ($qtype != TYP_BLOG) echo '
              <option value="" selected="selected"> -- '.$admin[917].' -- </option>';
            if ($qtype == TYP_BLOG) echo '
              <option value=""> -- '.$admin[1773].' -- </option>';
            if ($qtype != TYP_BLOG) echo '
              <option value=""> -- '.$admin[1125].' -- </option>';
                if (!empty($dbw)) {
                    reset($dbw);
                    $curr_cat = "";
                    for ($i = 0; $i < count($dbw); $i++) {
                        if ($dbw[$i][0].$dbw[$i][1] != $curr_cat) {
                            $cat = str_replace('<!--', '&#60;!--', str_replace('-->', '--&#62;', $dbw[$i][1]));
                            $curr_cat = $dbw[$i][0].$dbw[$i][1];
                            echo '
              <option value="'.htmlspecialchars($dbw[$i][1], ENT_QUOTES, $charset).'">'.$cat.'</option>';
                        }
                    }
                }
                echo '
            </select>
          </div>
          <div class="d-inline-block"><i class="fas fa-angle-double-right"></i></div>
          <div class="d-inline-block">
            <input class="form-control texte" type="text" name="cat2" value="'.htmlspecialchars($cat2, ENT_QUOTES, $charset).'" size="38" 
              onfocus="this.value=\'\';this.form.list2.selectedIndex=0;" />
          </div>
        </td>
      </tr>';
            }
        }
    }
    elseif ($bcat == 1 && $qtype == TYP_AGENDA) {
        $dd = date('w', mktime(0, 0, 0, intval($mois), intval($day), intval($annee)));
        $jour = $jours[$dd];
        $datevent = substr(FormatDate($annee.$mois.$day."00000"), 0, 10);
        if ($admin[1606]=='0') $datevent = $jour.' '.$datevent; else $datevent = $datevent.', '.$jour;
        echo '
      <tr>
        <td>
          <p class="text-center">'.$qtitre.$admin[630].'
            <input class="form-control w-20 mx-auto texte" type="text" name="cat0" size="45" value="'.$datevent.'" readonly="readonly" />
            <input type="hidden" name="cat1" size="45" value="'.date('YmdHi', mktime(0, 0, 0, intval($mois), intval($day), intval($annee))).'" />
            <input type="hidden" name="titre1" size="45" value="'.$mois.$annee.'" />
          </p>
        </td>
      </tr>
      <tr>
        <td>'.$admin[923].'
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="hh1" value="" maxlength="2" style="width:30px;" />
          </div>
          <div class="d-inline-block">&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="mn1" value="" maxlength="2" style="width:30px;" />
          </div>';
        if ($site[22] == "H3") {
            echo '
          <div class="d-inline-block">
            <select name="sth1" class="form-control select">
              <option value=" AM" selected="selected">AM</option>
              <option value=" PM">PM</option>
            </select>
          </div>';
        }
        echo '
        </td>
      </tr>
      <tr>
        <td>
          <div class="d-inline-block">'.$admin[924].'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="hh2" value="" maxlength="2" style="width:30px;" />
          </div>
          <div class="d-inline-block">&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="mn2" value="" maxlength="2" style="width:30px;" />
          </div>';
        if ($site[22] == "H3") {
            echo '
          <div class="d-inline-block">
            <select name="sth2" class="form-control select">
              <option value=" AM" selected="selected">AM</option>
              <option value=" PM">PM</option>
            </select>
          </div>';
        }
        echo '
        </td>
      </tr>';
        echo '
      <tr>
        <td class="text-center">
          <fieldset style="width:260px;margin:auto;text-align:left;">
            '.legend('<label>'.$admin[1154].'<input type="checkbox" id="cbrpt" name="cbrpt" value="on" /></label> ').'
            <input type="hidden" name="day" value="'.$day.'" />
            <input type="hidden" name="mois" value="'.$mois.'" />
            <input type="hidden" name="annee" value="'.$annee.'" />
            <div>
              <div class="d-inline-block">
                <label><input type="radio" name="typrpt" value="0" onclick="document.adminsend.cbrpt.checked=true;" /> '.$admin[1155].'</label>
              </div>
              <div class="d-inline-block">
                <input class="form-control texte" type="text" name="drpt" value="'.$drpt.'" maxlength="2" style="width:30px;" />
              </div>
              <div class="d-inline-block">'.$admin[1173].'</div>
            </div>
            <div>
              <div class="d-inline-block">
                <label><input type="radio" name="typrpt" value="1" onclick="document.adminsend.cbrpt.checked=true;" /> '.$admin[1156].'</label>
              </div>
              <div class="d-inline-block">
                <input class="form-control texte" type="text" name="wrpt" value="'.$wrpt.'" maxlength="2" style="width:30px;" />
              </div>
              <div class="d-inline-block">'.$admin[1157].'</div>
            </div>
            <div>
              <div class="d-inline-block">
                <label><input type="radio" name="typrpt" value="2" onclick="document.adminsend.cbrpt.checked=true;" /> '.$admin[1155].'</label>
              </div>
              <div class="d-inline-block">
                <input class="form-control texte" type="text" name="mrpt" value="'.$mrpt.'" maxlength="2" style="width:30px;" />
              </div>
              <div class="d-inline-block">'.$admin[1158].'</div>
            </div>
            <div>
              <div class="d-inline-block">
                <label><input type="radio" name="typrpt" value="3" onclick="document.adminsend.cbrpt.checked=true;" /> '.$admin[1159].'</label>
              </div>
              <div class="d-inline-block">
                <select name="nodayrpt" class="form-control select" style="width:54px;">
                  <option value="1">'.$admin[1169].'</option>
                  <option value="2">'.$admin[1170].'</option>
                  <option value="3">'.$admin[1171].'</option>
                  <option value="4">'.$admin[1172].'</option>
                </select>
              </div>
              <div class="d-inline-block">
                <select name="dayrpt" class="form-control select" style="width:76px;">';
        for ($jj = 1; $jj < count($jours); $jj++)
            echo '
                  <option value="'.$jj.'">'.$jours[$jj].'</option>';
        echo '
                  <option value="0">'.$jours[0].'</option>
                </select>
              </div>
              <div class="d-inline-block"> '.$admin[1160].'</div>
            </div>
            <div>
              <div class="d-inline-block">'.$admin[1161].'</div>
              <div class="d-inline-block">
                <input class="form-control texte" type="text" name="torpt" value="" maxlength="10" style="width:80px;" />
              </div>
            </div>
          </fieldset>
        </td>
      </tr>';
    }
    elseif ($bcat == 1 && $qtype == TYP_MENUICO) {
        echo '
      <tr>
        <td class="text-center">
		  <div class="d-inline-block">'.$qcat.'&nbsp;</div>
          <div class="d-inline-block">
            <input id="cat1" class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" name="cat1" style="width:80px;" type="text" value="" />
		  </div>
          <div class="d-inline-block">
            <script>
              $(document).ready(function(){
                $(\'.popadmin4\').popover({
                  title:"'.$qcat.'",
                  content:"'.$help[10].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin4 float-left" title="'.$qcat.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
      </tr>';
    }
    elseif ($bcat == 1 && ($qtype == TYP_FREEBOX || $qtype == TYP_MENUBOX)) {
        if ($qtype == TYP_MENUBOX) {
			$types_menu = array($admin[397], $admin[398], $admin[504], $admin[621], $admin[1354]);
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$qcat.' : </div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb">';
			for ($jj = 0; $jj < count($types_menu); $jj++) {
				echo '
              <option value="'.$jj.'"'.Selected($fieldweb == $jj).'>'.$types_menu[$jj].'</option>';
			}
				echo '
            </select>
          </div>
        </td>
      </tr>';
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1475].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="nouveau1">
              <option value="L">'.$admin[494].'</option>
              <option value="R">'.$admin[495].'</option>
            </select>
          </div>
        </td>
      </tr>';
		}
        $cat2s = explode('|', $cat2);
		if ($fctwri != 'redac1')
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block pt-2">'.$admin[357].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="cat2">
              <option value="off"'.Selected($cat2s[0] == 'off').'>'.$admin[358].'</option>
              <option value="open"'.Selected($cat2s[0] == 'open').'>'.$admin[359].'</option>
              <option value="close"'.Selected($cat2s[0] == 'close').'>'.$admin[360].'</option>
            </select>
          </div>
        </td>
      </tr>';
		else
			echo '
	  <input type="hidden" name="cat2" value="off" />';
	}
    elseif ($bcat == 1 && $qtype == TYP_DDMENUBOX) {
		$types_menu = array('DDV'=>$admin[1351], 'DDH'=>$admin[1352], 'DDL'=>$admin[1387]);
        $cat2s = explode('|', $cat2);
		echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$qcat.'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="cat2">';
			foreach ($types_menu as $key=>$value) {
				echo '
              <option value="'.$key.'"'.Selected($cat2 == $key).'>'.$value.'</option>';
			}
				echo '
            </select>
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block pt-2">'.$admin[357].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="contenu1">
              <option value="off"'.Selected($cat2s[0] == 'off').'>'.$admin[358].'</option>
              <option value="open"'.Selected($cat2s[0] == 'open').'>'.$admin[359].'</option>
              <option value="close"'.Selected($cat2s[0] == 'close').'>'.$admin[360].'</option>
            </select>
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_FREEBOX) {
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1537].'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_fieldweb ? 'errorInputText' : 'texte').'" type="text" name="fieldweb" size="6" />
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_ART) {
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1537].'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_highart ? 'errorInputText' : 'texte').'" type="text" name="highart" size="6" value="'.$highart.'" />
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block"><label for="okreact">'.$admin[846].'</label></div>
          <div class="d-inline-block p-0 form-check">
            <input type="checkbox"'.Checked($okreact == 'on').' id="okreact" name="okreact" />
          </div>
        </td>
      </tr>';
    }
    if ($btitre >= 1) {
        echo '
      <tr><td class="text-center pt-2">'.$qtitre.'</td></tr>
      <tr>
        <td class="text-center">';
		if ($qtype != TYP_SOCNET)
			echo '
          <div class="d-inline-block">'.$flag1.'</div>';
        echo '
          <div class="d-inline-block w-100" style="max-width:320px;">
            <input class="form-control '.($err_titre1 ? 'errorInputText' : 'texte').'" type="text" name="titre1" />
          </div>
        </td>
      </tr>';
        if ($lang[1] != '' && $qtype != TYP_SOCNET) {
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block w-100" style="max-width:320px;">
            <input class="form-control '.($err_titre2 ? 'errorInputText' : 'texte').'" type="text" name="titre2" />
          </div>
        </td>
      </tr>';
        }
		if ($qtype == TYP_SOCNET) {
            $socs = ReadDBFields(CONFIGREP.'socnet.dtb');
            echo '
      <tr><td class="text-center pt-2">'.$admin[499].'</td></tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">
            <select class="form-control" name="contenu2">
              <option value=""'.Selected(@$fieldc2 == '').'>'.$admin[1367].'</option>';
            foreach ($socs as $soc) {
                echo '
              <option value="'.strtolower($soc[0]).'"'.Selected($soc[0] == strtolower($contenu2) && $fieldc2 != '').'>'.strtoupper($soc[0]).'</option>'; 
            }
            echo '
            </select>
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block"><label for="cat1">'.$admin[467].'</label></div>
          <div class="d-inline-block form-check">
            <input class="form-check-input" style="margin-top: -0.8rem;" type="checkbox"'.Checked($cat1 == 'on').' name="cat1" id="cat1" />
          </div>
          <div class="d-inline-block ml-5"><label for="cat2">'.$admin[1386].'</label></div>
          <div class="d-inline-block form-check">
            <input class="form-check-input" style="margin-top: -0.8rem;" type="checkbox"'.Checked($cat2 == 'on').' name="cat2" id="cat2" />
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[86].' (px)</div>
          <div class="d-inline-block">
            <input style="max-width: 64px;" class="form-control texte" name="titre2" type="text" value="'.$titre2.'" />
          </div>
        </td>
      </tr>';
        }
        if (in_array($qtype, array(TYP_RSS, TYP_BSS))) {
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1552].'</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb" style="width:140px;">
              <option value="ALL"'.Selected($fieldweb == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value) {
            echo '
              <option value="'.$key.'"'.Selected($fieldweb == $key && $fieldweb != 'ALL').'>'.$key.' - '.$value.'</option>';
        }
        echo '
            </select>
          </div>
        </td>
      </tr>';
        }
    }
    if ($bnouveau == 1) {
        if ($qtype == TYP_FREEBOX) {
			if ($fctwri != 'redac1')
				echo '
      <tr><td class="text-center pt-3">'.$qnouveau.'</td></tr>
      <tr><td class="text-center">'.ShowValidBoxes().'</td></tr>';
			else
				echo '
	  <input type="hidden" name="cat1" value="" />';
        } 
        elseif ($qtype == TYP_MENUBOX || $qtype == TYP_DDMENUBOX) {
            echo '
      <tr><td class="text-center pt-3"><br />'.$qnouveau.'</td></tr>
      <tr><td class="text-center">'.ShowValidMenus().'</td></tr>';
        }
        elseif ($qtype == TYP_ART) {
			$mbs = ReadAuthorizedIndex(DBMENUBOX, $myname, $grpcol, $fctwri);
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$qnouveau.'</div>
          <div class="d-inline-block">
            <select class="form-control" name="nouveau1">
              <option value="none"'.Selected($nouveau1 == "none" || $nouveau1 == "").'>'.$admin[681].'</option>';
            foreach ($mbs as $mb) {
                $boxname = $lng == $lang[0] ? $mb[2] : $mb[3];
                $mnu_id  = sprintf('MNU %d', $mb[4]);
                echo '
              <option value="'.$mnu_id.'"'.Selected($nouveau1 == $mnu_id).'>'.$mnu_id.' : '.$boxname.'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
        }
        elseif ($qtype == TYP_DNLOAD) {
            echo '
      <tr><td class="text-center"><br />'.$qnouveau.'</td></tr>
      <tr>
        <td class="text-center">';
            if ($lang[1] != "") {
                echo '
          <div class="d-inline-block">'.$flag1.'</div>';
            }
            echo '
          <div class="d-inline-block">
            <input class="form-control '.($err_nouveau1 ? 'errorInputText' : 'texte').'" id="nouveau1" name="nouveau1" 
              style="width:540px;" type="text" value="" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver1" id="browserver1" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Link&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'nouveau1\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>
        </td>
      </tr>';
            if ($lang[1] != "") {
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_nouveau2 ? 'errorInputText' : 'texte').'" id="nouveau2" name="nouveau2" 
              style="width:540px;" type="text" value="" />
          </div>
          <div class="d-inline-block">
          <input type="button" class="btn btn-info bouton" name="browserver2" id="browserver2" 
            onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
              '&uptype=Link&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'nouveau2\',\'700\',\'515\', \'yes\');" 
            value="'.$admin[793].'" />
          </div>
  	    </td>
      </tr>';
            }
        }
        elseif ($qtype == TYP_SOCNET) {
            echo '
      <tr><td class="text-center"><br />'.$qnouveau.'</td></tr>
      <tr>
        <td class="text-center">
          <input class="form-control w-50 mx-auto '.($err_nouveau1 ? 'errorInputText' : 'texte').'" type="text" name="nouveau1" size="45" />
        </td>
      </tr>';
		}
        else {
			if ($qtype == TYP_OPTDDMENU) {
				echo '
	  <tr>
	    <td class="text-center">
		  <div class="text-center m-auto" style="width:164px;">
		    <div style="float:left;padding-left:36px;">'.$qnouveau.'</div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin5\').popover({
                  title:"'.$qnouveau.'",
                  content:"'.$help[12].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin5 float-left" title="'.$qnouveau.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
      </tr>';
			} else {
				echo '
      <tr><td class="text-center"><br />'.$qnouveau.'</td></tr>';
			}
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_nouveau1 ? 'errorInputText' : 'texte').'" type="text" name="nouveau1" size="45" value="'.$nouveau1.'" />
          </div>
        </td>
      </tr>';
            if ($lang[1] != "") {
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_nouveau2 ? 'errorInputText' : 'texte').'" type="text" name="nouveau2" size="45" value="'.$nouveau2.'" />
          </div>
        </td>
      </tr>';
            }
        }
        if ($qtype == TYP_ART || $qtype == TYP_OPTMENU)
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1534].'</div>
          <div class="d-inline-block">
            <input class="form-control texte" type="text" name="ancre" size="15" value="'.$ancre.'" />
          </div>
        </td>
      </tr>';
        if ($qtype == TYP_DNLOAD) {
            $dblicences = ReadDbFields(LICENCES);
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[717].'</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb">
              <option value=""'.Selected($fieldweb == "").'> -- '.$admin[1604].' -- </option>';
            foreach ($dblicences as $lic) {
                echo '
              <option value="'.$lic[0].'"'.Selected($fieldweb == $lic[0]).'>'.$lic[1].'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
        }
    }
    if ($qtype == TYP_ART || $qtype == TYP_OPTMENU) {
		switch ($qtype) {        
        case TYP_ART     : $fname = 'fieldweb'; break;
		case TYP_OPTMENU : $fname = 'contenu2'; break;
        }
		if ($fctwri != 'redac1') {
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[78].'</div>
          <div class="d-inline-block">
            <select class="form-control" name="'.$fname.'">';
			foreach (array('S' => $admin[1315], 'W' => $admin[1316], 'L' => $admin[1319], 'R' => $admin[1320]) as $key=>$opt) {
				echo '
			  <option value="'.$key.'">'.$opt.'</option>';
			}
			echo '
            </select>
          </div>
        </td>
      </tr>';
		} else
			echo '
	  <input type="hidden" name='.$fname.'" value="R" />';
	}
    if ($qtype == TYP_OPTMENU || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL') || $qtype == TYP_ART) {
        $fname = $qtype == TYP_ART ? 'tconfart' : 'fieldmail';
		if (count($templates) > 1 && $fctwri != 'redac1') {
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1552].'</div>
          <div class="d-inline-block">
            <select class="form-control" name="'.$fname.'" style="width:140px;">
              <option value="ALL">'.$admin[1363].'</option>';
            foreach ($templates as $key=>$value) {
                echo '
              <option value="'.$key.'">'.$key.' - '.$value.'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
		} else
			echo '
	  <input type="hidden" name="'.$fname.'" value="0">';
	}
    if (in_array($qtype, array(TYP_ART, TYP_NEWS, TYP_BLOG, TYP_MENUICO, TYP_OPTDDMENU, TYP_SOCNET)) && @$typmenu != 'DDL') {
		switch ($qtype) {        
        case TYP_ART       : 
        case TYP_BLOG      : $label = $admin[461];  $fname = 'nouveau2'; break;
        case TYP_NEWS      : $label = $admin[462];  $fname = 'nouveau2'; break;
        case TYP_MENUICO   : 
		case TYP_OPTDDMENU : $label = $admin[1240]; $fname = 'contenu2'; break;
        case TYP_SOCNET    : $label = $admin[829];  $fname = 'nouveau2'; break;
        }
        echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$label.'</div>
          <div class="d-inline-block">
            <input id="'.$fname.'" class="form-control texte" name="'.$fname.'" style="width:240px;" type="text" value="" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver3" id="browserver3" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Image&namerepconfig=guppy_config&pathconfig=admin/editors/\',\''.$fname.'\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
		  </div>
  	    </td>
      </tr>';
    }
    if ($qtype == TYP_MENUICO) {
		echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1335].'</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldmail" style="width:140px;">
              <option value="ALL"'.Selected($fieldmail == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value) {
            echo '
              <option value="'.$key.'"'.Selected($fieldmail == $key && $fieldmail != 'ALL').'>'.$key.' - '.$value.'</option>';
        }
        echo '
            </select>
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1552].'</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb" style="width:140px;">
              <option value="ALL"'.Selected($fieldweb == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value) {
            echo '
              <option value="'.$key.'"'.Selected($fieldweb == $key && $fieldweb != 'ALL').'>'.$key.' - '.$value.'</option>';
        }
        echo '
            </select>
          </div>
        </td>
      </tr>';
	}
    if ($bcontenu == 1) {
        if (in_array($qtype, array(TYP_OPTMENU, TYP_MENUICO, TYP_SOCNET)) || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL')) {
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$qcontenu.'</div>
          <div class="d-inline-block">
            <select class="form-control" name="contenu1">
              <option value="_self"'.Selected($contenu1 == '_self').'>'.$admin[1232].'</option>
              <option value="_blank"'.Selected($contenu1 == '_blank').'>'.$admin[1233].'</option>';
			if ($qtype != TYP_SOCNET) {
				echo '
              <option value="_POPUP"'.Selected($contenu1 == '_popup').'>'.$admin[1243].'</option>';
			}
            echo '
            </select>
          </div>
        </td>
      </tr>';
        }
        else {
            if ($qtype == TYP_ART && $serviz[113] != 'on') {
				echo '
      <tr><td class="text-center">'.$admin[1347].'</td></tr>
	  <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
		    <input class="form-control texte" type="text" name="keywords1" size="70" value="'.$keywords1.'" />
          </div>
        </td>
	  </tr>';
				if ($lang[1] != "") {
					echo '
	  <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
		    <input class="form-control texte" type="text" name="keywords2" size="70" value="'.$keywords2.'" />
          </div>
        </td>
	  </tr>';
				}
			}
            echo '
      <tr>
        <td class="text-center"><div class="mt-2">'.$qcontenu.'</div></td>
      </tr>
      <tr>
        <td class="text-center">'.$flag1.'</td>
      </tr>
      <tr>
	    <td>';
            echo '
		  <div class="text-center w-100 w-admeditor mx-auto">';
            $hedit = in_array($qtype, array(TYP_MENUBOX, TYP_PHOTO, TYP_THINK)) ? '120px' : '320px';
            display_admin_editor('contenu1', '100%', $hedit, $contenu1);
			echo '
		  </div>
	  	</td>
	  </tr>';
            if ($lang[1] != '') {
                echo '
      <tr>
        <td class="text-center">'.$flag2.'</td>
      </tr>
      <tr>
        <td>
		  <div class="text-center w-100 w-admeditor mx-auto">';
                display_admin_editor('contenu2', '100%', $hedit, $contenu2);
			echo '
		  </div>
        </td>
      </tr>';
            }
        }
    }
    echo '
    </table>
    </div>';
    echo '
	</fieldset>
    <div class="quest" style="padding:2px 20px;">';
	if (in_array($qtype, array(TYP_FREEBOX, TYP_MENUBOX, TYP_DDMENUBOX, TYP_SOCNET, TYP_BANNER, TYP_THINK, TYP_RSS)))
		echo '
      <div class="float-left mt-3">
	    <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config6&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">
          '.$admin[346].'&nbsp;<i class="gen-cfgboites align-middle" title="'.$admin[346].'"></i>
	    </a>&nbsp;||&nbsp;
	    <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config3&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">
          '.$admin[469].'&nbsp;<i class="gen-cfgaccueil align-middle" title="'.$admin[469].'"></i>
	    </a>
      </div>';
	echo '
      <div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>'.
	  ($qseeall == '' ? '' : '
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="retform">'.$admin[857].$qseeall.'</label>
        <input type="checkbox" id="retform" name="retform" />
      </div>').
	  ($qtype == TYP_ART ? '
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="svart">'.$admin[1014].' admins&nbsp;</label>
        <input type="checkbox" id="svart" name="svart" />
      </div>' : '').'
      <div class="clearfix"></div>
    </div>
  </form>';
}
################################################################################
elseif ($form == 2) {
	if (!empty($erreur))
		echo displayErrorMsg($admin[1589], $erreur);
    ReadDoc($id);
    $datespub = explode('-', $creadate);
    $datedeb  = $datespub[0];
    $datefin  = empty($datespub[1]) ? '' : $datespub[1];
	$cdate    = $creadate;
	$mdate    = $moddate;
    $tmp      = explode('|', $author);
    $author   = $dup == 1 || $dup == 2 ? $myname : $tmp[0];
    $grpcol   = isset($tmp[1]) ? $tmp[1] : '';
    $contenu1 = $fieldc1;
    if ($qtype == TYP_ART || $qtype == TYP_OPTMENU) {
        $urls = explode('||', $fieldd1);
        $pos  = strpos($urls[0], '#');
        if ($pos !== false) $ancre = substr($urls[0], $pos + 1);
        $urls = explode('||', $fieldd2);
		if (isset($urls[1]))
		{
			$pos  = strpos(@$urls[1], '#');
			if ($pos !== false && empty($ancre)) $ancre = substr(@$urls[1], $pos + 1);
		}
    }
    if ($qtype == TYP_ART) {
        $afmail   = explode('|', $fieldmail);
        $tconfart = $afmail[0];
        $highart  = !empty($afmail[1]) ? $afmail[1] : '0';
        $okreact  = isset($afmail[2]) ? $afmail[2] : 'on';
    }
    echo '
  <style> .w-admeditor { max-width: '.$serviz[101].'; } </style>
  <form name="adminsend" id="adminsend" action="admin.php?lng='.$lng.'&amp;pg='.$pgreturn[$qtype].'" method="post" onsubmit="return VerifyForm(); return false;">
    <input type="hidden" name="tri" value="'.$tri.'" />
    <div class="quest mb-3" style="padding:2px 20px;">';
	if (in_array($qtype, array(TYP_GUESTBK, TYP_FREEBOX, TYP_MENUBOX, TYP_DDMENUBOX, TYP_SOCNET, TYP_BANNER, TYP_THINK, TYP_RSS)) && $fctwri != 'redac1')
		echo '
      <div class="float-left mt-3">
	    <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config6&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">
          '.$admin[346].'&nbsp;<i class="gen-cfgboites align-top" title="'.$admin[346].'"></i>
	    </a>&nbsp;||&nbsp;
	    <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config3&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">
          '.$admin[469].'&nbsp;<i class="gen-cfgaccueil align-top" title="'.$admin[469].'"></i>
	    </a>
      </div>';
	echo '
      <div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>'.
	  ($qseeall == '' ? '' : '
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="retform">'.$admin[857].$qseeall.'</label>
        <input type="checkbox" id="retform" name="retform" onchange="setret2(this.form);" />
      </div>').'
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="majfile">'.$admin[1381].'</label>
        <input type="checkbox" checked="checked" id="majfile" name="majfile" onchange="setmaj2(this.form);" />
      </div>'.
	  ($qtype == TYP_ART ? '
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="svart">'.$admin[1014].' admins&nbsp;</label>
        <input type="checkbox" id="svart" name="svart" onchange="setart2(this.form);" />
      </div>' : '').'
      <div class="clearfix"></div>
    </div>
    <fieldset class="w-100 m-0 p-2">';
    if ($dup == 1 || $dup == 2) {
        echo '
      <input type="hidden" name="dup" value="'.$dup.'" />';
		echo '
      <br />'.$admin[921].'
      <select name="status" class="form-control w-100 mx-auto align-middle" style="max-width:80px;">
        <option value="on" selected="selected">'.$admin[765].'</option>
        <option value="">'.$admin[766].'</option>
      </select><br />';
		echo '
      <input type="hidden" name="add" value="1" />';
	  $datedeb = date('YmdHi');
	  $datefin = '';
    } else {
        echo '
      <input type="hidden" name="mod" value="1" />';
    }
    echo '
      <input type="hidden" name="form" value="2" />
      <input type="hidden" name="idpg" value="'.$idpg.'" />
      <input type="hidden" name="id" value="'.$id.'" />
	  <input type="hidden" name="datecrea" value="'.$cdate.'" />
	  <input type="hidden" name="datemod" value="'.$mdate.'" />';
    if ($bcat == 1 && $qtype == TYP_AGENDA) {
        if ($dup == 2) {
            $fieldb1 = $mois.$annee;
        }
        echo '
      <input type="hidden" name="titre1" value="'.$fieldb1.'" />';
    }
    if (in_array($qtype, array(TYP_GUESTBK, TYP_FORUM, TYP_REACT, TYP_REBLOG))) {
        echo '
      <input type="hidden" name="cat1" value="'.$fielda1.'" />';
    }
    if (in_array($qtype, array(TYP_FORUM, TYP_REACT, TYP_REBLOG))) {
        echo '
      <input type="hidden" name="cat2" value="'.$fielda2.'" />';
    }
    if ($btitre = 1 && $qtype == TYP_FORUM && $fielda2 != '0') {
        echo '
      <input type="hidden" name="titre1" value="'.$fielda2.'" />';
	}
    echo '
    <div class="table-responsive-md">
    <table class="table w-100 m-auto">';
    /// début modif accès privé
    if (in_array($qtype, array(TYP_ART, TYP_AGENDA, TYP_BLOG, TYP_DNLOAD, TYP_FAQ, TYP_LINKS, TYP_NEWS, TYP_PHOTO, 
		TYP_FREEBOX, TYP_MENUBOX, TYP_OPTMENU, TYP_DDMENUBOX, TYP_OPTDDMENU, TYP_MENUICO, TYP_SOCNET, TYP_NWL))) {
        $dbgroup = ReadDBFields($qtype == TYP_NWL ? GROUPSNWL : GROUPS);
        echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[$qtype == TYP_NWL ? 1484 : 932].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldmod" style="width:164px;">';
        if ($qtype != TYP_NWL)
            echo '
              <option value=""> -- '.$admin[1604].' -- </option>';
        echo '
			  <option value="'.($qtype == TYP_NWL ? 'all_subscribers' : 'all_members').'"'.
                Selected($fieldmod == ($qtype == TYP_NWL ? 'all_subscribers' : 'all_members')).'>'.$admin[$qtype == TYP_NWL ? 1150 : 690].'
              </option>';
        foreach ($dbgroup as $groupe)
            echo '
              <option value="'.$groupe[0].'"'.Selected($fieldmod == $groupe[0]).'>'.$groupe[0].'</option>';
        echo '
            </select>
          </div>
        </td>
      </tr>';
    }
    /// fin modif accès privé
	if (!in_array($qtype, array(TYP_GUESTBK, TYP_FORUM, TYP_NWL,TYP_REACT, TYP_REBLOG, TYP_RULES, TYP_RSS, TYP_BSS, TYP_SOCNET))) {
		if ($fctwri != 'redac1')
			echo '
      <tr>
	    <td class="text-center">
		  <div style="width:184px;margin:auto;">
		    <div class="float-left">'.$admin[1406].'</div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin6\').popover({
                  title:"'.$admin[1406].'",
                  content:"'.$help[14].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin6 float-left" title="'.$admin[1406].'">
                <i class="far fa-comment-dots pl-3"></i>
              </a>
            </span>
		  </div>
	    </td>
	  </tr>
      <tr>
	    <td class="text-center">
		  <div class="d-inline-block">'.$admin[1407].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_datedeb ? 'errorInputText' : 'texte').'" type="text" name="datedeb" size="10" value="'.$datedeb.'" />
          </div>
		  <div class="d-inline-block">&nbsp;&nbsp;'.$admin[1408].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_datefin ? 'errorInputText' : 'texte').'" type="text" name="datefin" size="10" value="'.$datefin.'" />
          </div>
		</td>
	  </tr>';
		else
			echo '
      <input type="hidden" name="datedeb" value="'.$datedeb.'" />
      <input type="hidden" name="datefin" value="'.$datefin.'" />';
	}
	else
		echo '
      <input type="hidden" name="datedeb" value="'.$datedeb.'" />
      <input type="hidden" name="datefin" value="'.$datefin.'" />';
    if ($bname == 1) {
		if ($fctwri != 'redac1') {
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[114].'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_pseudo1 ? 'errorInputText' : 'texte').'" type="text" name="pseudo1" size="32" value="'.$author.'" />
          </div>
        </td>
      </tr>';
            if ((@$drtuser[12] != '' || in_array($fctwri, array('admin', 'webm', 'redac2'))) && $serviz[42] == 'on') {
                $dbgroup = ReadDBFields(GROUPSCOL);
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1480].'&nbsp;</div>
          <div class="d-inline-block w-100" style="max-width:180px;">
            <select class="form-control" name="grpcol">
              <option value=""'.Selected($grpcol == '').'>'.$admin[1604].'</option>
              <option value="ALL"'.Selected($grpcol == 'ALL').'>'.$admin[1481].'</option>';
                foreach ($dbgroup as $group)
                    echo '
              <option value="'.$group[0].'"'.Selected($grpcol == $group[0] && $grpcol != 'ALL').'>'.$group[0].'</option>';
                echo '            
            </select>
          </div>
        </td>
      </tr>';
            } else {
                echo '
	  <input type="hidden" name="grpcol" value="'.$grpcol.'" />';
            }
		} else
			echo '
	  <input type="hidden" name="pseudo1" value="'.$author.'" />
	  <input type="hidden" name="grpcol" value="'.$grpcol.'" />';
    }
    if ($bemail == 1) {
		if ($fctwri != 'redac1')
			echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[115].'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_email1 ? 'errorInputText' : 'texte').'" type="text" name="email1" size="40" value="'.$email.'" />
          </div>
        </td>
      </tr>';
		else
			echo '
      <input type="hidden" name="email1" value="'.$email.'" />';
    }
    if ($bnouveau == 2) {
		if ($fctwri != 'redac1')
			echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block"><label for="nouveau1">'.$qnouveau.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></div>
          <div class="d-inline-block">
            <input type="checkbox" id="nouveau1" name="nouveau1"'.Checked($fieldd1 == 'on').' />
          </div>
        </td>
      </tr>';
		else
			echo '
      <input type="hidden" name="nouveau1" value="'.$fieldd1.'" />';
    }
    if ($bcat == 1) {
        if ($qtype == TYP_AGENDA) {
            if ($dup == 2) {
                $fielda1 = substr(FormatDate($annee.$mois.$day."00000"), 0, 10);
            } else {
				$day   = substr($fielda1, 6, 2);
				$mois  = substr($fielda1, 4, 2);
				$annee = substr($fielda1, 0, 4);
            }
            $dd = date('w', mktime(0, 0, 0, intval($mois), intval($day), intval($annee)));
            $jour = $jours[$dd];
            $datevent = substr(FormatDate($annee.$mois.$day."00000"), 0, 10);
            if ($admin[1606] == '0') $datevent = $jour.' '.$datevent; else $datevent = $datevent.', '.$jour;
            echo '
      <tr><td class="text-center pt-2">'.$qcat.'</td></tr>
      <tr>
        <td class="text-center">
          <input style="width: 200px;" class="form-control mx-auto texte" type="text" name="cat0" size="45" 
            value="'.$datevent.'" readonly="readonly" />
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <input type="hidden" name="cat1" size="45" 
            value="'.date('YmdHi', mktime(0, 0, 0, intval($mois), intval($day), intval($annee))).'" />
        </td>
      </tr>';
            $timed = $timef = array('', '');
            $sthh1 = $sthh2 = '';
            if ('-' != $fielda2) {
                $timeag = explode('-', $fielda2);
                if ($site[22] == 'H3') {
                    $sthh1 = explode(' ', $timeag[0]);
                    $timed = explode(':', $sthh1[0]);
                    $sthh2 = explode(' ', (empty($timeag[1])? '': $timeag[1]));
                    $timef = explode(':', $sthh2[0]);
                } else {
                    $timed = explode(':', $timeag[0]);
                    $timef = explode(':', (empty($timeag[1])? '': $timeag[1]));
                }
            }
            echo '
      <tr>
        <td>
          <div class="d-inline-block">'.$admin[923].'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="hh1" size="2" 
              value="'.$timed[0].'" maxlength="2" style="width:30px;" />
          </div>
          <div class="d-inline-block">&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="mn1" size="2" 
              value="'.(empty($timed[1])? '': $timed[1]).'" maxlength="2" style="width:30px;" />
          </div>';
            if ($site[22] == 'H3') {
                echo '
          <div class="d-inline-block">
            <select class="form-control" name="sth1" class="select">
              <option value=" AM"'.Selected($sthh1[1] == " AM").'> AM </option>
              <option value=" PM"'.Selected($sthh1[1] == " PM").'> PM </option>
            </select>
          </div>';
            }
            echo '
        </td>
      </tr>
      <tr>
        <td>
          <div class="d-inline-block">'.$admin[924].'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="hh2" size="2" 
              value="'.$timef[0].'" maxlength="2" style="width:30px;" />
          </div>
          <div class="d-inline-block">&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_hhmn ? 'errorInputText' : 'texte').'" type="text" name="mn2" size="2" 
              value="'.(empty($timef[1])? '': $timef[1]).'" maxlength="2" style="width:30px;" />
          </div>';
            if ($site[22] == 'H3') {
                echo '
          <div class="d-inline-block">
            <select class="form-control" name="sth2" class="select">
              <option value=" AM"'.Selected($sthh2[1] == " AM").'> AM </option>
              <option value=" PM"'.Selected($sthh2[1] == " PM").'> PM </option>
            </select>
          </div>';
            }
			echo '
		</td>
	  </tr>';
        }
        elseif ($qtype == TYP_MENUICO) {
            echo '
      <tr>
        <td class="text-center pt-2">
		  <div class="text-center m-auto" style="max-width:158px;">
		    <div class="float-left">
              <div class="d-inline-block">'.$qcat.'</div>
              <div class="d-inline-block">
                <input id="cat1" class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" name="cat1" 
                  style="width:80px;" type="text" value="'.$fielda1.'" />
              </div>
		    </div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin7\').popover({
                  title:"'.$qcat.'",
                  content:"'.$help[10].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin7 float-left" title="'.$qcat.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
      </tr>';
        }
		elseif ($qtype == TYP_FREEBOX || $qtype == TYP_MENUBOX) {
			if ($qtype == TYP_MENUBOX) {
				$types_menu = array($admin[397], $admin[398], $admin[504], $admin[621], $admin[1354]);
				echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$qcat.'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb">';
				for ($jj = 0; $jj < count($types_menu); $jj++) {
					echo '
              <option value="'.$jj.'"'.Selected($fieldweb == $jj).'>'.$types_menu[$jj].'</option>';
				}
				echo '
            </select>
          </div>
        </td>
      </tr>';
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1475].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="nouveau1">
              <option value="L"'.Selected($fieldd1 == 'L').'>'.$admin[494].'</option>
              <option value="R"'.Selected($fieldd1 == 'R').'>'.$admin[495].'</option>
            </select>
          </div>
        </td>
      </tr>';
			}
            $cat2s = explode('|', $fielda2);
			if ($fctwri != 'redac1')
				echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[357].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="cat2">
              <option value="off"'.Selected($cat2s[0] == 'off').'>'.$admin[358].'</option>
              <option value="open"'.Selected($cat2s[0] == 'open').'>'.$admin[359].'</option>
              <option value="close"'.Selected($cat2s[0] == 'close').'>'.$admin[360].'</option>
            </select>
          </div>
        </td>
      </tr>';
			else
				echo '
	  <input type="hidden" name="cat2" value="'.$cat2s[0].'|'.$cat2s[1].'" />';
        }
		elseif ($qtype == TYP_DDMENUBOX) {
			$types_menu = array('DDV'=>$admin[1351], 'DDH'=>$admin[1352], 'DDL'=>$admin[1387]);
			echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$qcat.'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="cat2">';
			foreach ($types_menu as $key=>$value) {
				echo '
              <option value="'.$key.'"'.Selected($fielda2 == $key).'>'.$value.'</option>';
			}
				echo '
            </select>
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block pt-2">'.$admin[357].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="contenu1">
              <option value="off"'.Selected($contenu1 == 'off').'>'.$admin[358].'</option>
              <option value="open"'.Selected($contenu1 == 'open').'>'.$admin[359].'</option>
              <option value="close"'.Selected($contenu1 == 'close').'>'.$admin[360].'</option>
            </select>
          </div>
        </td>
      </tr>';
		}
        elseif ($qtype != TYP_FORUM ) {
			if (($dup == 1 && $qtype == TYP_ART) || $qtype == TYP_OPTMENU) {
				echo '
	  <tr>
	    <td class="text-align:center">
		  <div style="text-align:center;width:270px;margin:auto;">
		    <div style="float:left;padding-left:56px;">'.$qcat.'</div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin8\').popover({
                  title:"'.$qcat.'",
                  content:"'.$help[13].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin8 float-left ml-2" title="'.$qcat.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
	  </tr>';
			} 
			elseif ($qtype != TYP_ART)
				echo '
      <tr><td class="text-center pt-2">'.$qcat.'</td></tr>';
            if ($qtype == TYP_BANNER) {
	           echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input id="cat1" class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" name="cat1" style="vertical-align:middle;width:400px;" type="text" value="'.$fielda1.'" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver1" id="browserver1" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Image&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'cat1\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>';
                if ($lang[1] != "") {
                    echo '
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input id="cat2" class="form-control align-middle '.($err_cat2 ? 'errorInputText' : 'texte').'" name="cat2" 
              style="width:400px;" type="text" value="'.$fielda2.'" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver2" id="browserver2" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Image&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'cat2\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>';
                }
                echo '
        </td>
      </tr>';
            }
            elseif ($qtype == TYP_BSS || $qtype == TYP_RSS) {
                echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" type="text" name="cat1" value="'.$fielda1.'" size="38" />
          </div>';
                if ($lang[1] != "") {
                    echo '
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_cat2 ? 'errorInputText' : 'texte').'" type="text" name="cat2" value="'.$fielda2.'" size="38" />
          </div>';
                }
                echo '
        </td>
      </tr>';
            }
			elseif ($qtype == TYP_OPTDDMENU) {
				echo '
      <tr>
        <td class="text-center">
		  <div style="text-align:center;width:240px;margin:auto;">
		    <div class="float-left">
              <input id="cat1" class="form-control '.($err_cat1 ? 'errorInputText' : 'texte').'" name="cat1" 
                style="width:200px;" type="text" value="'.$fielda1.'" />
		    </div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin9\').popover({
                  title:"'.$qcat.'",
                  content:"'.$help[11].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin9 float-left" title="'.$qcat.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
      </tr>';
			}
            elseif ($dup != 1 && $qtype == TYP_ART) {
				echo '
	  <input type="hidden" name="cat1" value="'.$fielda1.'" />
	  <input type="hidden" name="cat2" value="'.$fielda2.'" />';
			} else {
                echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$flag1.'</div>';
                $nlg = $lang[1] != '' ? '2' : '';
                echo '
          <div class="d-inline-block">
            <select class="form-control" name="list1" id="list1" style="width:220px;" onchange="set'.$nlg.'(this.form);">
              <option value=""> -- '.$admin[917].' -- </option>';
                if ($qtype != TYP_BLOG) echo '
              <option value=""'.Selected('' == $fielda1.$fielda2).'> -- '.$admin[1125].' -- </option>';
                if ($qtype == TYP_ART) {
                    $dbix = ReadDBFields(DBINDEX.'arom'.DBEXT);
                    $dbw  = array();
                    foreach ($dbix as $ix) {
                        $dbw[] = array($ix[5], $ix[6]);
                    }
                } 
                elseif ($qtype == TYP_BLOG) {
                    $dbw = ReadDBFields(DBINDEX.TYP_BRUB.DBEXT);
                }
                else
                    $dbw = ReadDBFields(DBINDEX.$qtype.DBEXT);
				sort($dbw);
				if (!empty($dbw)) {
					$curr_cat = "";
					for ($i = 0; $i < count($dbw); $i++) {
						if ($dbw[$i][0].$dbw[$i][1] != $curr_cat) {
							$sel= "";
							$cat = str_replace('<!--', '&#60;!--', str_replace('-->', '--&#62;', $dbw[$i][0]));
							$curr_cat = $dbw[$i][0].$dbw[$i][1];
							echo '
                <option value="'.htmlspecialchars($dbw[$i][0], ENT_QUOTES, $charset).'"'.Selected($curr_cat == $fielda1.$fielda2).'>'.$cat.'</option>';
						}
					}
				}
				echo '
            </select>
          </div>
          <div class="d-inline-block">&nbsp;>>&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control texte" type="text" name="cat1" 
              value="'.htmlspecialchars($fielda1, ENT_QUOTES, $charset).'" size="36" onfocus="reset'.$nlg.'(this.form);" />
          </div>
        </td>
      </tr>';
				if ($lang[1] != "") {
					echo '
      <tr>
        <td style="text-align:center;white-space:nowrap;">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <select class="form-control" name="list2" id="list2" style="width:220px;" onchange="set3(this.form);">
              <option value=""> -- '.$admin[917].' -- </option>';
                    if ($qtype != TYP_BLOG) echo '
              <option value=""'.Selected('' == $fielda1.$fielda2).'> -- '.$admin[1125].' -- </option>';
					if (!empty($dbw)) {
						reset($dbw);
						$curr_cat = "";
						for ($i = 0; $i < count($dbw); $i++) {
							if ($dbw[$i][0].$dbw[$i][1] != $curr_cat) {
								$sel= "";
								$cat = str_replace('<!--', '&#60;!--', str_replace('-->', '--&#62;', $dbw[$i][1]));
								$curr_cat = $dbw[$i][0].$dbw[$i][1];
								echo '
              <option value="'.htmlspecialchars($dbw[$i][1], ENT_QUOTES, $charset).'"'.Selected($dbw[$i][0].$dbw[$i][1] == $fielda1.$fielda2).'>'.$cat.'</option>';
							}
						}
					}
					echo '
            </select>
          </div>
          <div class="d-inline-block">&nbsp;>>&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control texte" type="text" name="cat2" value="'.htmlspecialchars($fielda2, ENT_QUOTES, $charset).'" size="36" 
              onfocus="reset'.$nlg.'(this.form);" />
          </div>
        </td>
      </tr>';
                }
            }
        }
        elseif ($fielda2 == "0") {
            echo '
      <tr><td class="text-center">'.$admin[260].'</td></tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">
            <select class="form-control" name="titre2">
              <option value="">'.$admin[259].'</option>';
            for ($i = 0; $i < count($dbfcat); $i++) {
                echo '
              <option value="'.$dbfcat[$i][0].'"'.Selected($dbfcat[$i][0] == $fieldb2).'>'.$dbfcat[$i][1].'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
        }
    }
    if ($qtype == TYP_FREEBOX) {
		echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[1537].'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_fieldweb ? 'errorInputText' : 'texte').'" type="text" name="fieldweb" size="6" value="'.$fieldweb.'" />
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_ART) {
		echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[1537].'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_highart ? 'errorInputText' : 'texte').'" type="text" name="highart" size="6" value="'.$highart.'" />
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block"><label for="okreact">'.$admin[846].'&nbsp;</label</div>
          <div class="d-inline-block">
            <input type="checkbox"'.Checked($okreact == 'on').' id="okreact" name="okreact" />
          </div>
        </td>
      </tr>';
    }
    if (($qtype != TYP_FORUM && $qtype != TYP_AGENDA) || ($qtype == TYP_FORUM && $fielda2 == "0")) {
        $fieldb1 = str_replace('"','&#34;',$fieldb1);
        echo '
      <tr><td class="text-center pt-2">'.$qtitre.'</td></tr>
      <tr>
        <td class="text-center">';
		if ($qtype != TYP_SOCNET)
            echo '
          <div class="d-inline-block">'.$flag1.'</div>';
            echo '
          <div class="d-inline-block w-100" style="max-width:320px;">
            <input class="form-control '.($err_titre1 ? 'errorInputText' : 'texte').'" type="text" name="titre1" value="'.$fieldb1.'" />
          </div>
        </td>
      </tr>';
        if ($lang[1] != "" && $qtype != TYP_SOCNET) {
            $fieldb2 = str_replace('"','&#34;',$fieldb2);
            echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block w-100" style="max-width:320px;">
            <input class="form-control '.($err_titre2 ? 'errorInputText' : 'texte').'" type="text" name="titre2" value="'.$fieldb2.'" />
          </div>
        </td>
      </tr>';
        }
		if ($qtype == TYP_SOCNET) {
            $socs = ReadDBFields(CONFIGREP.'socnet.dtb');
            echo '
      <tr><td class="text-center pt-2">'.$admin[499].'</td></tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">
            <select class="form-control" name="contenu2">
              <option value="">'.$admin[1367].'</option>';
            foreach ($socs as $soc) {
                echo '
              <option value="'.$soc[0].'"'.Selected($soc[0] == strtolower($fieldc2) && $fieldc2 != '').'>'.strtoupper($soc[0]).'</option>'; 
            }
            echo '
            </select>
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block"><label for="cat1">'.$admin[467].'</label></div>
          <div class="d-inline-block form-check">
            <input class="form-check-input" style="margin-top: -0.8rem;" type="checkbox"'.Checked($fielda1 == 'on').' name="cat1" id="cat1" />
          </div>
          <div class="d-inline-block ml-5"><label for="cat2">'.$admin[1386].'</label></div>
          <div class="d-inline-block form-check">
            <input class="form-check-input" style="margin-top: -0.8rem;" type="checkbox"'.Checked($fielda2 == 'on').' name="cat2" id="cat2" />
          </div>
        </td>
      </tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[86].' (px)</div>
          <div class="d-inline-block">
            <input style="max-width: 64px;" class="form-control texte" name="titre2" type="text" value="'.$fieldb2.'" />
          </div>
        </td>
      </tr>';
        }
        if (in_array($qtype, array(TYP_RSS, TYP_BSS))) {
            echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[1552].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb" style="width:140px;">
              <option value="ALL"'.Selected($fieldweb == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value) {
            echo '
              <option value="'.$key.'"'.Selected($fieldweb == $key && $fieldweb != 'ALL').'>'.$key.' - '.$value.'</option>';
        }
        echo '
            </select>
          </div>
        </td>
      </tr>';
        }
    }
    if ($bnouveau == 1) {
        if ($qtype == TYP_FREEBOX) {
			if ($fctwri != 'redac1')
				echo '
      <tr><td class="text-center pt-2">'.$qnouveau.'</td></tr>
      <tr><td class="text-center">'.ShowValidBoxes($fielda1).'</td></tr>';
			else
				echo '
	  <input type="hidden" name="cat1" value="'.$fielda1.'" />';
        } 
        elseif ($qtype == TYP_MENUBOX || $qtype == TYP_DDMENUBOX) {
            echo '
      <tr><td class="text-center pt-2">'.$qnouveau.'</td></tr>
      <tr><td class="text-center">'.ShowValidMenus($fielda1).'</td></tr>';
        }
        elseif ($qtype == TYP_ART) {
			if ($dup == 1) {
                $mbs = ReadAuthorizedIndex(DBMENUBOX, $myname, $grpcol, $fctwri);
                echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$qnouveau.'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="nouveau1">
              <option value="none"'.Selected($nouveau1 == "none" || $nouveau1 == "").'>'.$admin[681].'</option>';
            foreach ($mbs as $mb) {
                $boxname = $lng == $lang[0] ? $mb[2] : $mb[3];
                $mnu_id  = sprintf('MNU %d', $mb[4]);
                echo '
              <option value="'.$mnu_id.'"'.Selected($nouveau1 == $mnu_id).'>'.$mnu_id.' : '.$boxname.'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
			}
			else echo '
	  <input type="hidden" name="fieldweb" value="'.$fieldweb.'" />';
        } elseif ($qtype == TYP_DNLOAD) {
            echo '
      <tr><td class="text-center pt-2">'.$qnouveau.'</td></tr>
      <tr>
        <td class="text-center">';
            if ($lang[1] != "") {
                echo '
          <div class="d-inline-block">'.$flag1.'&nbsp;</div>';
            }
			$p  = mb_strpos($fieldd1, CONNECTOR);
			$d1 = ($p > 0) ? mb_substr($fieldd1, 0, $p): $fieldd1;
            echo '
          <div class="d-inline-block">
           <input id="nouveau1" class="form-control '.($err_nouveau1 ? 'errorInputText' : 'texte').'" name="nouveau1" 
             style="width:540px;" type="text" value="'.$d1.'" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver1" id="browserver1" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Link&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'nouveau1\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>
        </td>
      </tr>';
            if ($lang[1] != "") {
				$p  = mb_strpos($fieldd2, CONNECTOR);
				$d2 = ($p > 0) ? mb_substr($fieldd2, 0, $p): $fieldd2;
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'&nbsp;</div>
          <div class="d-inline-block">
            <input id="nouveau2" class="form-control '.($err_nouveau2 ? 'errorInputText' : 'texte').'" name="nouveau2" 
              style="width:540px;" type="text" value="'.$d2.'" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver2" id="browserver2" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Link&namerepconfig=guppy_config&pathconfig=admin/editors/\',\'nouveau2\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>
        </td>
      </tr>';
            }
        }
        elseif ($qtype == TYP_SOCNET) {
            echo '
      <tr><td class="text-center pt-2">'.$qnouveau.'</td></tr>
      <tr>
        <td class="text-center">
          <input class="form-control w-50 mx-auto '.($err_nouveau1 ? 'errorInputText' : 'texte').'" type="text" name="nouveau1" size="45" value="'.$fieldd1.'" />
        </td>
      </tr>';
		}
        else {
			if ($qtype == TYP_OPTDDMENU) {
				echo '
	  <tr>
	    <td class="text-center pt-2">
		  <div style="text-align:center;width:164px;margin:auto;">
		    <div style="float:left;padding-left:36px;">'.$qnouveau.'</div>
            <script>
              $(document).ready(function(){
                $(\'.popadmin10\').popover({
                  title:"'.$qnouveau.'",
                  content:"'.$help[12].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop">
              <a class="popadmin10 float-left" title="'.$qnouveau.'">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </div>
        </td>
      </tr>';
			} else {
				echo '
      <tr><td class="text-center pt-2">'.$qnouveau.'</td></tr>';
			}
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_nouveau1 ? 'errorInputText' : 'texte').'" type="text" name="nouveau1" size="55" value="'.$fieldd1.'" />
          </div>
        </td>
      </tr>';
            if ($lang[1] != "") {
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_nouveau2 ? 'errorInputText' : 'texte').'" type="text" name="nouveau2" size="55" value="'.$fieldd2.'" />
          </div>
        </td>
      </tr>';
            }
        }
        if ($qtype == TYP_DNLOAD) {
            $dblicences = ReadDbFields(LICENCES);
            echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[717].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldweb">
              <option value=""'.Selected($fieldweb == "").'> -- '.$admin[1604].' -- </option>';
            foreach ($dblicences as $lic) {
                echo '
              <option value="'.$lic[0].'"'.Selected($fieldweb == $lic[0]).'>'.$lic[1].'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
        }
        if ($qtype == TYP_OPTMENU || ($qtype == TYP_ART && $dup == 1)) {
            if (strpos($ancre, '#') !== false) $ancre = substr($ancre, 1);
            echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[1534].'&nbsp;</div>
          <div class="d-inline-block">
            <input class="form-control texte" type="text" name="ancre" size="15" value="'.$ancre.'" />
          </div>
        </td>
      </tr>';
        }
    }
    if ($qtype == TYP_FORUM) {
        echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">
            <input class="form-control texte" type="hidden" name="contenu2" size="55" value="'.$fieldc2.'" />
          </div>
          <div class="d-inline-block">
            <input class="form-control texte" type="hidden" name="nouveau2" size="55" value="'.$fieldd2.'" />
          </div>
          <div class="d-inline-block">
            <input class="form-control texte" type="hidden" name="fieldweb" size="55" value="'.$fieldweb.'" />
          </div>
          <div class="d-inline-block">
            <input class="form-control texte" type="hidden" name="fieldmod" size="55" value="'.$fieldmod.'" />
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_OPTMENU) {
        $mbs = ReadDbFields(DBMENUBOX);
        echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[880].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="menubox">';
            foreach ($mbs as $mb) {
                echo '
              <option value="'.$mb[4].'"'.Selected($fieldweb == $mb[4]).'>'.sprintf('MNU %d', $mb[4]).' : '.$mb[$lng == $lang[0] ? 2 : 3].'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_ART && $dup != 1) {
			$mbs = ReadAuthorizedIndex(DBMENUBOX, $myname, $grpcol, $fctwri);
			echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$qnouveau.'</div>
          <div class="d-inline-block">
            <select class="form-control" name="nouveau1">
              <option value="none"'.Selected($fieldd1 == "none" || $fieldd1 == "").'>'.$admin[681].'</option>';
            foreach ($mbs as $mb) {
                $boxname = $lng == $lang[0] ? $mb[2] : $mb[3];
                $mnu_id  = sprintf('MNU %d', $mb[4]);
                echo '
              <option value="'.$mnu_id.'"'.Selected($fieldd1 == $mnu_id).'>'.$mnu_id.' : '.$boxname.'</option>';
            }
            echo '
            </select>
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_ART || $qtype == TYP_OPTMENU) {
		switch ($qtype) {        
        case TYP_ART     : $fname = 'fieldweb'; $value = $fieldweb; break;
		case TYP_OPTMENU : $fname = 'contenu2'; $value = $fieldc2; break;
        }
		if ($fctwri != 'redac1') {
			echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[78].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="'.$fname.'">';
			foreach (array(array('S', $admin[1315]), array('W', $admin[1316]), array('L', $admin[1319]), array('R', $admin[1320])) as $opt) {
				echo '
			  <option value="'.$opt[0].'"'.Selected($value == $opt[0]).'>'.$opt[1].'</option>';
			}
			echo '
            </select>
          </div>
        </td>
      </tr>';
		}
		else
			echo '
	  <input type="hidden" name="'.$fname.'" value="'.$value.'">';
	}
    if ($qtype == TYP_OPTMENU || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL')) {
		if (count($templates) > 1) {
			if ($fctwri != 'redac1') {
				echo '
      <tr>
        <td class="text-center'.($dup == 1 ? ' pt-5' : '').'">
          <div class="d-inline-block">'.$admin[1552].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldmail" style="width:140px;">
              <option value="ALL"'.Selected($fieldmail == 'ALL').'>'.$admin[1363].'</option>';
				foreach ($templates as $key=>$value) {
					echo '
              <option value="'.$key.'"'.Selected($fieldmail == $key && $fieldmail != 'ALL').'>'.$key.' - '.$value.'</option>';
				}
				echo '
            </select>
          </div>
        </td>
      </tr>';
			}
			else
				echo '
	  <input type="hidden" name="fieldmail" value="'.$fieldmail.'">';
		} else {
			echo '
	  <input type="hidden" name="fieldmail" value="0">';
		}
	}
    if ($qtype == TYP_ART) {
		if (count($templates) > 1) {
			if ($dup != 1)
				echo '
	  <input type="hidden" name="tconfart" value="'.$tconfart.'">';
			elseif ($fctwri != 'redac1') {
				echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1552].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="tconfart" style="width:140px;">
              <option value="ALL"'.Selected($tconfart == 'ALL').'>'.$admin[1363].'</option>';
				foreach ($templates as $key=>$value) {
					echo '
              <option value="'.$key.'"'.Selected($tconfart == $key && $tconfart != 'ALL').'>'.$key.' - '.$value.'</option>';
				}
				echo '
            </select>
          </div>
        </td>
      </tr>';
			} else
				echo '
	  <input type="hidden" name="tconfart" value="'.$tconfart.'">';
		} else {
			echo '
	  <input type="hidden" name="tconfart" value="0">';
		}
	}
	if (in_array($qtype, array(TYP_ART, TYP_NEWS, TYP_BLOG, TYP_MENUICO, TYP_SOCNET)) || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL')) {
        switch ($qtype) {        
        case TYP_ART       : 
        case TYP_BLOG      : $label = $admin[461];  $fname = 'nouveau2'; $value = $fieldd2; break;
        case TYP_NEWS      : $label = $admin[462];  $fname = 'nouveau2'; $value = $fieldd2; break;
        case TYP_MENUICO   :
		case TYP_OPTDDMENU : $label = $admin[1240]; $fname = 'contenu2'; $value = $fieldc2; break;
        case TYP_SOCNET    : $label = $admin[829];  $fname = 'nouveau2'; $value = $fieldd2; break;
        }
        echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$label.'&nbsp;</div>
          <div class="d-inline-block">
            <input id="'.$fname.'" class="form-control texte" name="'.$fname.'" style="width:240px;" type="text" value="'.$value.'" />
          </div>
          <div class="d-inline-block">
            <input type="button" class="btn btn-info bouton" name="browserver3" id="browserver3" 
              onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
                '&uptype=Image&namerepconfig=guppy_config&pathconfig=admin/editors/\',\''.$fname.'\',\'700\',\'515\', \'yes\');" 
              value="'.$admin[793].'" />
          </div>
  	    </td>
      </tr>';
    }
    if ($qtype == TYP_MENUICO) {
		echo '
      <tr>
        <td class="text-center pt-2">
          <div class="d-inline-block">'.$admin[1335].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="fieldmail" style="width:140px;">
              <option value="ALL"'.Selected($fieldmail == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value) {
            echo '
              <option value="'.$key.'"'.Selected($fieldmail != 'ALL' && $fieldmail == $key).'>'.$key.' - '.$value.'</option>';
        }
        echo '
            </select>
          </div>
        </td>
      </tr>';
    }
    if ($qtype == TYP_MENUICO || ($qtype == TYP_ART && $dup != 1)) {
        switch ($qtype) {        
        case TYP_ART     : $fname = 'tconfart'; $vconf = explode('|', $fieldmail)[0]; break;
        case TYP_MENUICO : $fname = 'fieldweb'; $vconf = $fieldc2; break;
        }
		echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1552].'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="'.$fname.'" style="width:140px;">
              <option value="ALL"'.Selected($vconf == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value) {
            echo '
              <option value="'.$key.'"'.Selected($vconf != 'ALL' && $vconf == $key).'>'.$key.' - '.$value.'</option>';
        }
        echo '
            </select>
          </div>
        </td>
      </tr>';
	}
    if ($bcontenu == 1) {
        if (in_array($qtype, array(TYP_OPTMENU, TYP_MENUICO, TYP_SOCNET)) || ($qtype == TYP_OPTDDMENU && $typmenu != 'DDL')) {
			function GetTypMenu($mnu) {
				global $fieldweb;
				ReadDoc($mnu);
				return $fieldweb;
			}
            function GetTargetMenu($mnu) {
				global $fieldc1;
                ReadDoc($mnu);
                return $fieldc1;
            }
			if ($qtype == TYP_OPTMENU && GetTypMenu($menubox) == '1') {
				echo '
      <tr><td class="text-center">'.$admin[1234].'</td></tr>';
				$contenu1 = '_self';
            } else {
				$target = GetTargetMenu($id);
                echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$qcontenu.'&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="contenu1">
              <option value="_self"'.Selected($target == '_self').'>'.$admin[1232].'</option>
              <option value="_blank"'.Selected($target == '_blank').'>'.$admin[1233].'</option>';
				if ($qtype != TYP_SOCNET) {
					echo '
              <option value="_popup"'.Selected($target == '_popup').'>'.$admin[1243].'</option>';
				}
                echo '
            </select>
          </div>
        </td>
      </tr>';
            }
        }
        else {
            if ($qtype == TYP_ART && $serviz[113] != 'on') {
				echo '
      <tr><td class="text-center pt-2">'.$admin[1347].'</td></tr>
	  <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'&nbsp;</div>
          <div class="d-inline-block">
		    <input class="form-control texte" type="text" name="keywords1" size="70" value="'.$keywords1.'" />
          </div>
        </td>
	  </tr>';
				if ($lang[1] != "") {
					echo '
	  <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'&nbsp;</div>
          <div class="d-inline-block">
		    <input class="form-control texte" type="text" name="keywords2" size="70" value="'.$keywords2.'" />
          </div>
        </td>
	  </tr>';
				}
			}
            echo '
      <tr><td class="text-center pt-2">'.$qcontenu.'</td></tr>
      <tr><td class="text-center">'.$flag1.'</td></tr>
	  <tr>
	    <td class="text-center">
		  <div class="text-center w-100 w-admeditor mx-auto">';
            $hedit = in_array($qtype, array(TYP_MENUBOX, TYP_PHOTO, TYP_THINK)) ? '120px' : '320px';
            display_admin_editor('contenu1', '100%', $hedit, empty($erreur) ? $fieldc1 : $contenu1);
            echo '
          </div>';
            if ($qtype == TYP_FORUM && $fieldb1 != "") {
                echo '
		  <div class="text-center">
            <div class="d-inline-block">'.$admin[1607].'&nbsp;:&nbsp;</div>
            <div class="d-inline-block">
		      <select class="form-control align-middle" name="fieldmod">
			    <option value=""'.Selected($fieldmod == '').'>'.$admin[1608].'</option>
			    <option value="c"'.Selected($fieldmod != '').'>'.$admin[1609].'</option>
			  </select>
            </div>
		  </div>';
            }
            if ($qtype == TYP_FORUM) {
                echo '
		  <div class="text-center">
            <div class="d-inline-block">'.$admin[173].'&nbsp;</div>
            <div class="d-inline-block">
              <input type="text" class="form-control texte" name="fieldweb" value="'.$fieldweb.'" size="60" />
            </div>
          </div>';
            }
			echo '
		</td>
	  </tr>';
            if ($lang[1] != "") {
                echo '
      <tr><td class="text-center pt-2">'.$flag2.'</td></tr>
      <tr>
        <td class="text-center">
		  <div class="text-center w-100 w-admeditor mx-auto">';
                display_admin_editor('contenu2', '100%', $hedit, empty($erreur) ? $fieldc2 : $contenu2);
				echo '
          </div>
		</td>
	  </tr>';
            }
        }
    }
    echo '
    </table>
    </div>';
    echo '
    </fieldset>
    <div class="quest mt-3" style="padding:2px 20px;">';
	if (in_array($qtype, array(TYP_FREEBOX, TYP_MENUBOX, TYP_DDMENUBOX, TYP_SOCNET, TYP_BANNER, TYP_THINK, TYP_RSS)))
		echo '
      <div class="float-left mt-3">
	    <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config6&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">
          '.$admin[346].'&nbsp;<i class="gen-cfgboites align-top" title="'.$admin[346].'"></i>
	    </a>&nbsp;||&nbsp;
	    <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=config3&amp;selskin='.$page[14].'&amp;conf='.$tconfig.'">
          '.$admin[469].'&nbsp;<i class="gen-cfgaccueil align-top" title="'.$admin[469].'"></i>
	    </a>
      </div>';
	echo '
      <div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>'.
	  ($qseeall == '' ? '' : '
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="retform2">'.$admin[857].$qseeall.'</label>
        <input type="checkbox" id="retform2" name="retform2" onchange="setret(this.form);" />
      </div>').'
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="majfile2">'.$admin[1381].'</label>
        <input type="checkbox" checked="checked" id="majfile2" name="majfile2" onchange="setmaj(this.form);" />
      </div>'.
	  ($qtype == TYP_ART ? '
      <div class="float-right pt-3" style="margin-right:24px;">
        <label for="svart2">'.$admin[1014].' admins&nbsp;</label>
        <input type="checkbox" id="svart2" name="svart2" onchange="setart(this.form);" />
      </div>' : '').'
      <div class="clearfix"></div>
    </div>
  </form>';
}
################################################################################
elseif ($form == 3) {
    include('inc/cal.inc');
}
################################################################################
echo '
</div>
<hr />
<p class="text-center">';

btable();
$lang[0] = $langue0;
$lang[1] = $langue1;
include CHEMIN.'admin/bpage.inc';
?>
agenda.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/agenda.inc'
View Content
<?php
/*******************************************************************************
 *   Admin agenda
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[37] == '') {
        $nomzone = $admin[624];
        include 'access.inc';
        exit();
    }
}

$form       = import('form');

$qtype      = TYP_AGENDA;
$qseeall    = $admin[627];
$qwrite     = $admin[628];
$qwriteform = 3;
$bname      = 1;
$bemail     = 1;
$bcat       = 1;
$btitre     = 0;
$bcontenu   = 1;
$bnouveau   = 0;
$qformonly  = 0;
$qtitle     = $admin[625];
$qintro     = '<br />'.ToHelp($lng, '&pg=1064&mnuid=937&tconfig=0#z2').$admin[626].(empty($form) ? $admin[223].$admin[1733] : '');
$qcat       = $admin[630];
$qtitre     = '';
$qcontenu   = $admin[629];
$qnouveau   = '';

include 'inc/admin.inc';
?>
archbatch.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/archbatch.php'
View Content
<?php
/*******************************************************************************
 *   BATCH Forum Archiving
 *******************************************************************************
 *   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', '../../');
include_once CHEMIN.'admin/includes.inc';
include_once CHEMIN.'inc/funcarch.php';

/// nombre d'itération en phase d'archivage des fichiers ($followup = vide)
$delta1 = 200;
/// nombre d'itération en contrôle d'intégrité
$delta2 = 1000;

$archdate = import('archdate');
$archtyps = import('archtyps');
$numdb    = import('numdb');
$followup = import('followup');

function ArchiveOneFile($fic1, $fic2) {
    $archiveok = false;
    if (@copy($fic1, $fic2)) {
        SetChmod($fic1);
        $archiveok = @unlink($fic1);
    }
    return $archiveok;
}

function ArchiveFile($id, $annee, $typ) {
    $archivedok = false;
	$fileid     = TestFileId($id);
    if (FileDBExist(DBBASE.$fileid.INCEXT)) {
        $archivedok = ArchiveOneFile(DBBASE.$fileid.INCEXT, ARCHDBBASE.$fileid.INCEXT);
        if ($archivedok) {
            $db = array($typ, $id, 'a', $annee);
            AppendDBFields(DOCIDARCH, $db);
        }
        if (FileDBExist(DBCOUNT.$fileid.DBEXT)) {
            ArchiveOneFile(DBCOUNT.$fileid.DBEXT, ARCHDBCOUNT.$fileid.DBEXT);
        }
        if (FileDBExist(DBIPBASE.$fileid.DBEXT)) {
            ArchiveOneFile(DBIPBASE.$fileid.DBEXT, ARCHDBIPBASE.$fileid.DBEXT);
        }
    }
    return $archivedok;
}

@set_time_limit(0);

$archdate = substr($archdate.'0000', 0, 12);
$typs     = explode(' ', $archtyps);

if (empty($followup)) {
	$dbwork = array();
	if (in_array(TYP_BLOG, $typs) && $archdate > ReadCounter(DBBLOGARCHDATE)) {
		$dbw  = ReadDBFields(DBBLOG);
		$dbbl = array();
		foreach ($dbw as $arch) {
			$datearch = substr($arch[5], 0, 12);
			if ($archdate >= $datearch && !empty($datearch)) $dbbl[] = array($datearch, $arch[4], '1', $arch[4], $arch[7]);
		}
		$dbw = ReadDBFields(DBREBLOG);
		foreach ($dbw as $arch) {
			if (!empty($arch[0])) {
				foreach ($dbbl as $db)
					if ($db[1] == $arch[1])	$dbwork[] = array(substr($arch[5], 0, 12), $arch[0], '1', $arch[0], $arch[7]);
			}
		}
		$dbwork = array_merge($dbwork, $dbbl);
	}
	if (in_array(TYP_NEWS, $typs) && $archdate > ReadCounter(DBNEWSARCHDATE)) {
		$dbw = ReadDBFields(DBNEWS);
		foreach ($dbw as $arch) {
			$datearch = substr($arch[5], 0, 12);
			if ($archdate >= $datearch && !empty($datearch)) $dbwork[] = array($datearch, $arch[4], '1', $arch[4], $arch[7]);
		}
	}
	if (in_array(TYP_AGENDA, $typs) && $archdate > ReadCounter(DBAGENDAARCHDATE)) {
		$dbw = ReadDBFields(DBAGENDA);
		foreach ($dbw as $arch) {
			$datearch = substr($arch[0], 0, 12);
			if ($archdate >= $datearch && !empty($datearch)) $dbwork[] = array($datearch, $arch[4], '1', $arch[4], $arch[7]);
		}
	}
	if (in_array(TYP_FORUM, $typs) && $archdate > ReadCounter(DBFORUMARCHDATE)) {
		$dbw = ReadDBFields(DBTHREAD);
		foreach ($dbw as $arch) {
			$datearch = substr($arch[0], 0, 12);
			if ($archdate >= $datearch && !empty($datearch)) $dbwork[] = array($datearch, $arch[1], $arch[2], $arch[3], $arch[10]);
		}
	}
    @rsort($dbwork);
}

$args = '&archtyps='.$archtyps.'&archdate='.$archdate;

echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'.$admin[577].'</title>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
'.JavascriptFile(CHEMIN.'inc/hpage.js').'
</head>
<body style="background-color: #E7E1EF; overflow: hidden; margin:0 5px;">
<fieldset>';
if (empty($followup)) {
    $nbcheck = $delta1;
	$nbdb    = count($dbwork);
	$numdb   = empty($numdb) ? 0 : $numdb;
    echo '
  <p style="text-align:center;">'.$admin[577].' => '.$numdb.' / '.$nbdb.'</p>
  <div style="color: #000; height: 200px; overflow: auto;">
    <br />';
    while ($nbcheck > 0 && $numdb < $nbdb) {
		echo '&nbsp;&nbsp;- '.$admin[585].' : '.$dbwork[$numdb][3].'<br />';
		ArchiveFile($dbwork[$numdb][3], substr($dbwork[$numdb][0], 0, 4), $dbwork[$numdb][4]);
		$nbcheck--;
		$numdb++;
    }
    if ($numdb < $nbdb) {
        $nextstep = 'PopupWindow(\'archbatch.php?lng='.$lng.$args.'&numdb='.$numdb.'\',\'archbatch\',480,360,\'no\',\'no\')';
    }
    else {
        $nextstep = 'PopupWindow(\'archbatch.php?lng='.$lng.$args.'&followup=1\',\'archbatch\',480,360,\'no\',\'no\')';
    }
	echo '
  </div>';
}
elseif ($followup == 1) {
    echo '
  <p style="text-align:center;">'.$admin[587].'</p><br /><br />';
    $dbworkid  = ReadDBFields(DOCIDARCH);
	$dbworknew = array();
	foreach ($dbworkid as $db) {
		if (!isset($db[3])) {
			include ARCHDBBASE.TestFileID($db[1]).INCEXT;
			$dbworknew[] = array($db[0], $db[1], $db[2], substr($creadate, 0, 4));
		}
		else $dbworknew[] = $db;
	}
    @sort($dbworknew);
    WriteDBFields(DOCIDARCH, $dbworknew);
    $nextstep = 'PopupWindow("archbatch.php?lng='.$lng.$args.'&followup=2","archbatch",480,360,"no","no")';
}
elseif ($followup == 2) {
    echo '
  <p style="text-align:center;">'.$admin[592].'</p>
  <br /><br />';
	if (in_array(TYP_BLOG, $typs)) {
		UpdateDBdtbArch(TYP_BLOG, DBBLOGARCH);
		UpdateDBreblogArch();
	}
	if (in_array(TYP_NEWS, $typs)) {
		UpdateDBdtbArch(TYP_NEWS, DBNEWSARCH);
	}
	if (in_array(TYP_AGENDA, $typs)) {
		UpdateDBdtbArch(TYP_AGENDA, DBAGENDAARCH);
	}
	if (in_array(TYP_FORUM, $typs)) {
		UpdateDBforumArch();
	}
    $nextstep = 'PopupWindow("archbatch.php?lng='.$lng.$args.'&followup=3","archbatch",480,360,"no","no")';
}
else {
    echo '
  <p style="text-align:center;">'.$admin[589].'</p>
  <br /><br />';
    if (in_array(TYP_BLOG, $typs)) WriteCounter(DBBLOGARCHDATE, $archdate);
    if (in_array(TYP_NEWS, $typs)) WriteCounter(DBNEWSARCHDATE, $archdate);
    if (in_array(TYP_AGENDA, $typs)) WriteCounter(DBAGENDAARCHDATE, $archdate);
    if (in_array(TYP_FORUM, $typs)) WriteCounter(DBFORUMARCHDATE, $archdate);
    $typ = in_array(TYP_FORUM, $typs) ? TYP_FORUM : '';
    $nextstep = 'PopupWindow("dbbatch.php?lng='.$lng.'&typ='.$typ.'&checkquiet=1&delta='.$delta2.'","dbbatch",400,300,"no","no")';
}
echo '
  <p style="text-align:right;"><a href="#" onclick="window.close();"><b>'.$admin[458].'&nbsp;</b></a></p>
</fieldset>';
if ($nextstep != '') {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
archepurebatch.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/archepurebatch.php'
View Content
<?php
/*******************************************************************************
 *   BATCH Forum Archiving
 *******************************************************************************
 *   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.19 (August 26, 2024) : Archive modify and Tohelp modify
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../../');
include_once CHEMIN.'admin/includes.inc';
include_once CHEMIN.'inc/funcarch.php';

/// nombre d'itération en phase d'archivage des fichiers ($followup = vide)
$delta1 = 200;
/// nombre d'itération en contrôle d'intégrité
$delta2 = 1000;
//log 
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/archiepurebatch'.'_'.$dateheureminiutesecl.'.log';

$archepurgedate = import('archepurgedate');
$archepurgetyps = import('archepurgetyps');
$numdb    = import('numdb');
$followup = import('followup');
function ArchiveOneFile($fic1) {
    $archepurgeiveok = false;
	SetChmod($fic1);
	$archepurgeiveok = @unlink($fic1);
    return $archepurgeiveok;
}

function ArchiveFile($id, $annee, $typ) {
	global $nomficlog;
    $archepurgeivedok = false;
	$fileid     = TestFileId($id);
    if (FileDBExist(ARCHDBBASE.$fileid.INCEXT)) {
        $archepurgeivedok = ArchiveOneFile(ARCHDBBASE.$fileid.INCEXT);
    }
	if (FileDBExist(ARCHDBCOUNT.$fileid.DBEXT))
	{
        $archepurgeivedok = ArchiveOneFile(ARCHDBCOUNT.$fileid.DBEXT);
    }
	if (FileDBExist(ARCHDBIPBASE.$fileid.DBEXT)) {
		$archepurgeivedok = ArchiveOneFile(ARCHDBIPBASE.$fileid.DBEXT);
	}	
    return $archepurgeivedok;
}

@set_time_limit(0);

$archepurgedate = substr($archepurgedate.'0000', 0, 12);
$typs     = explode(' ', $archepurgetyps);

if (empty($followup)) {
	$dbwork = array();
	$dbworkaepurer = array();
	if (in_array(TYP_BLOG, $typs) && $archepurgedate > ReadCounter(DBBLOGARCHDATE)) {
		$dbw  = ReadDBFields(DBBLOGARCH);
		$dbbl = array();
		foreach ($dbw as $archepurge) {
			$datedocumentarch = substr($archepurge[5], 0, 12);
			if ($datedocumentarch >= $archepurgedate && !empty($datedocumentarch)) 
			{
				$dbwork[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
			else
			{
				$dbworkaepurer[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
			if ($archepurgedate >= $datedocumentarch && !empty($datedocumentarch))
				$dbbl[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
		}
		$dbw = ReadDBFields(DBREBLOGARCH);
		foreach ($dbw as $archepurge) {
			if (!empty($archepurge[0])) {
				foreach ($dbbl as $db)
					if ($db[1] == $archepurge[1])	$dbworkaepurer[] = array(substr($archepurge[5], 0, 12), $archepurge[0], '1', $archepurge[0], $archepurge[7]);
			}
		}
		$dbwork = array_merge($dbwork, $dbbl);
	}
	if (in_array(TYP_NEWS, $typs) && $archepurgedate > ReadCounter(DBNEWSARCHDATE)) {
		$dbw = ReadDBFields(DBNEWSARCH);
		foreach ($dbw as $archepurge) {
			$datedocumentarch = substr($archepurge[5], 0, 12);
			if ($datedocumentarch >= $archepurgedate && !empty($datedocumentarch)) 
			{
				$dbwork[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
			else
			{
				$dbworkaepurer[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
		}
	}
	if (in_array(TYP_AGENDA, $typs) && $archepurgedate > ReadCounter(DBAGENDAARCHDATE)) {
		$dbw = ReadDBFields(DBAGENDAARCH);
		foreach ($dbw as $archepurge) {
			$datedocumentarch = substr($archepurge[0], 0, 12);
			if ($datedocumentarch >= $archepurgedate && !empty($datedocumentarch)) 
			{
				$dbwork[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
			else
			{
				$dbworkaepurer[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
		}
	}
	if (in_array(TYP_FORUM, $typs) && $archepurgedate > ReadCounter(DBFORUMARCHDATE)) {
		$dbw = ReadDBFields(DBTHREADARCH);
		foreach ($dbw as $archepurge) {
			$datedocumentarch = substr($archepurge[0], 0, 12);
			if ($datedocumentarch >= $archepurgedate && !empty($datedocumentarch)) 
			{
				$dbwork[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
			else
			{
				$dbworkaepurer[] = array($datedocumentarch, $archepurge[4], '1', $archepurge[4], $archepurge[7]);
			}
//			if ($archepurgedate >= $datedocumentarch && !empty($datedocumentarch)) $dbwork[] = array($datedocumentarch, $archepurge[1], $archepurge[2], $archepurge[3], $archepurge[10]);
		}
	}
    @rsort($dbwork);
	WriteDBFields(DOCIDARCH, $dbwork);
	@rsort($dbworkaepurer);
}

$args = '&archepurgetyps='.$archepurgetyps.'&archepurgedate='.$archepurgedate;

echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'.$admin[1844].'</title>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
'.JavascriptFile(CHEMIN.'inc/hpage.js').'
</head>
<body style="background-color: #E7E1EF; overflow: hidden; margin:0 5px;">
<fieldset>';
if (empty($followup)) {
    $nbcheck = $delta1;
	$nbdb    = count($dbworkaepurer);
	$numdb   = empty($numdb) ? 0 : $numdb;
    echo '
  <p style="text-align:center;">'.$admin[1844].' => '.$numdb.' / '.$nbdb.'</p>
  <div style="color: #000; height: 200px; overflow: auto;">
    <br />';
    while ($nbcheck > 0 && $numdb < $nbdb) {
		echo '&nbsp;&nbsp;- '.$admin[1855].' : '.$dbworkaepurer[$numdb][3].'<br />';
		ArchiveFile($dbworkaepurer[$numdb][3], substr($dbworkaepurer[$numdb][0], 0, 4), $dbworkaepurer[$numdb][4]);
		$nbcheck--;
		$numdb++;
    }
    if ($numdb < $nbdb) {
        $nextstep = 'PopupWindow(\'archepurebatch.php?lng='.$lng.$args.'&numdb='.$numdb.'\',\'archepurebatch\',480,360,\'no\',\'no\')';
    }
    else {
        $nextstep = 'PopupWindow(\'archepurebatch.php?lng='.$lng.$args.'&followup=1\',\'archepurebatch\',480,360,\'no\',\'no\')';
    }
	echo '
  </div>';
}
elseif ($followup == 1) {
    echo '
  <p style="text-align:center;">'.$admin[587].'</p><br /><br />';
    $dbworkid  = ReadDBFields(DOCIDARCH);
	$dbworknew = array();
	foreach ($dbworkid as $db) {
		if (!isset($db[3])) {
			include ARCHDBBASE.TestFileID($db[1]).INCEXT;
			$dbworknew[] = array($db[0], $db[1], $db[2], substr($creadate, 0, 4));
		}
		else $dbworknew[] = $db;
	}
    @sort($dbworknew);
    WriteDBFields(DOCIDARCH, $dbworknew);
    $nextstep = 'PopupWindow("archepurebatch.php?lng='.$lng.$args.'&followup=2","archepurebatch",480,360,"no","no")';
}
elseif ($followup == 2) {
    echo '
  <p style="text-align:center;">'.$admin[1844].'</p>
  <br /><br />';

	if (in_array(TYP_BLOG, $typs)) {
		UpdateDBdtbArch(TYP_BLOG, DBBLOGARCH);
		UpdateDBreblogArch();
	}
	if (in_array(TYP_NEWS, $typs)) {
		UpdateDBdtbArch(TYP_NEWS, DBNEWSARCH);
	}
	if (in_array(TYP_AGENDA, $typs)) {
		UpdateDBdtbArch(TYP_AGENDA, DBAGENDAARCH);
	}
	if (in_array(TYP_FORUM, $typs)) {
		UpdateDBforumArch();
	}
    if (in_array(TYP_BLOG, $typs)) WriteCounter(DBBLOGARCHDATEEPUR, $archepurgedate);
    if (in_array(TYP_NEWS, $typs)) WriteCounter(DBNEWSARCHDATEEPUR, $archepurgedate);
    if (in_array(TYP_AGENDA, $typs)) WriteCounter(DBAGENDAARCHDATEEPUR, $archepurgedate);
    if (in_array(TYP_FORUM, $typs)) WriteCounter(DBFORUMARCHDATEEPUR, $archepurgedate);
    $nextstep = 'PopupWindow("archepurebatch.php?lng='.$lng.$args.'&followup=3","archepurebatch",480,360,"no","no")';
}
else
{
    echo '
  <p style="text-align:center;">'.$admin[1844].'</p>
  <br /><br />';
	echo '
  <p style="text-align:center;">'.$admin[1854].'</p>
  <br /><br />';
    $typ = in_array(TYP_FORUM, $typs) ? TYP_FORUM : '';
    $nextstep = 'PopupWindow("dbbatcharchives.php?lng='.$lng.'&typ='.$typ.'&checkquiet=1&delta='.$delta2.'","dbbatcharchives",400,300,"no","no")';
}
echo '
  <p style="text-align:right;"><a href="#" onclick="window.close();"><b>'.$admin[458].'&nbsp;</b></a></p>
</fieldset>';
if (!isset($nextstep)) $nextstep = '';
if ($nextstep != '') {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
archive.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/archive.inc'
View Content
<?php
/*******************************************************************************
 *   Datas Archiving
 *******************************************************************************
 *   GuppY PHP Script - version 6.00.03
 *   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.19 (August 26, 2024) :Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[7] == '') {
        $nomzone = $admin[577];
        include 'access.inc';
        exit();
    }
}

$archgo   = import('archgo', 'POST', 0);
$nextstep = import('nextstep');
$archdate = import('archdate');
$archbl   = import('archbl');
$archne   = import('archne');
$archag   = import('archag');
$archfr   = import('archfr');

$err_arch = $archbl != 'on' && $archne != 'on' && $archag != 'on' && $archfr != 'on' && $archgo == 1 ? true: false;
$err_date = 1 != preg_match('/[0-9]{8}/', $archdate) && $archgo == 1 ? true: false;

$erreur  = '';
$erreur .= $err_arch ? '<li>'.$admin[1297].'</li>': '';
$erreur .= $err_date ? '<li>'.$admin[591].'</li>': '';

//if (!isset($nextstep)) 
$nextstep = 0;
if ($archgo == 1 && empty($erreur)) {
    if ($archbl == 'on' && ($archdate.'0000' <= ReadCounter(DBBLOGARCHDATE) || $archdate.'0000' > GetCurrentDateTime())) $archbl = 'off';
	if ($archne == 'on' && ($archdate.'0000' <= ReadCounter(DBNEWSARCHDATE) || $archdate.'0000' > GetCurrentDateTime())) $archne = 'off';
	if ($archag == 'on' && ($archdate.'0000' <= ReadCounter(DBAGENDAARCHDATE) || $archdate.'0000' > GetCurrentDateTime())) $archag = 'off';
	if ($archfr == 'on' && ($archdate.'0000' <= ReadCounter(DBFORUMARCHDATE) || $archdate.'0000' > GetCurrentDateTime())) $archfr = 'off';
    if ($archbl == 'on' || $archne == 'on' || $archag == 'on' || $archfr == 'on') $nextstep = 1;
}

$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
	if (document.archiveit.archbl.checked != true &&
		document.archiveit.archne.checked != true &&
		document.archiveit.archag.checked != true &&
		document.archiveit.archfr.checked != true) {
        sto += "  - '.addslashes($admin[1297]).'\n";
        erreur = true;
	}
	regexp = /[0-9]{8}/;
	if (!regexp.test(document.archiveit.archdate.value)) {
		sto += "  - '.addslashes($admin[591]).'\n";
		document.archiveit.archdate.className = "errorInputText";
		erreur = true;
	}
    if (erreur == true) {
        sto = "'.addslashes($admin[1298]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[578]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[578], '100%');

if (!empty($erreur))
	echo displayErrorMsg($admin[1298], $erreur);
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=992&mnuid=937&tconfig=0#z2').
  '<div class="w-100 m-auto text-center" style="max-width:940px;">'.$admin[579].'<br />'.$admin[580].'<br />'.$admin[581].'</div>
</p>
<hr />
<div style="max-width:520px; margin:auto;">
';
if ($nextstep == 0) {
	echo '
<p class="forum" style="text-align:left; padding:5px 20px;">'.$admin[1296].'</p>
<form name="archiveit" id="archiveit" action="admin.php?lng='.$lng.'&amp;pg=archive" method="post" onsubmit="return VerifyForm(); return false;">
  <input type="hidden" name="archgo" value="1" />
  <fieldset>
  <div class="table-responsive-md">
  <table class="table table-bordered w-100">
    <tr>
	  <td colspan="2" class="text-left w-70">&nbsp;</td>
      <td class="text-center w-30 pb-3">'.$admin[590].'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archbl">'.$admin[770].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archbl" name="archbl" type="checkbox"'.Checked($archbl == 'on').' /></td>
	  <td class="align-middle text-center w-30 py-2">'.(ReadCounter(DBBLOGARCHDATE) > 0 ? FormatDate(ReadCounter(DBBLOGARCHDATE)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archne">'.$admin[13].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archne" name="archne" type="checkbox"'.Checked($archne == 'on').' /></td>
	  <td class="align-middle text-center w-30 py-2">'.(ReadCounter(DBNEWSARCHDATE) > 0 ? FormatDate(ReadCounter(DBNEWSARCHDATE)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archag">'.$admin[624].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archag" name="archag" type="checkbox"'.Checked($archag == 'on').' /></td>
	  <td class="align-middle text-center w-30 py-2">'.(ReadCounter(DBAGENDAARCHDATE) > 0 ? FormatDate(ReadCounter(DBAGENDAARCHDATE)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archfr">'.$admin[9].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archfr" name="archfr" type="checkbox"'.Checked($archfr == 'on').' /></td>
	  <td class="align-middle text-center w-30 py-2">'.(ReadCounter(DBFORUMARCHDATE) > 0 ? FormatDate(ReadCounter(DBFORUMARCHDATE)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2">'.$admin[582].'</td>
      <td class="align-middle text-left w-15 py-2">
        <input name="archdate" class="form-control '.($err_date ? 'errorInputText' : 'texte').'" 
          type="text" style="width:120px;" value="'.$archdate.'" title="'.$archdate.'" />
      </td>
	  <td class="text-center w-30 py-2">&nbsp;</td>
    </tr>
  </table>
  </div>
  </fieldset>
  <div class="row quest p-0 mt-2 w-98 m-auto">
    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[583], '', '', $imgdroite).'</div></div>
  </div>
</form>
';
} elseif ($nextstep == 1) {
	$archtyps  = trim(($archbl == 'on' ? TYP_BLOG.' ' : '').($archne == 'on' ? TYP_NEWS.' ' : '').($archag == 'on' ? TYP_AGENDA.' ' : '').($archfr == 'on' ? TYP_FORUM : ''));
	$firststep = 'PopupWindow(\'inc/archbatch.php?lng='.$lng.'&archdate='.$archdate.'&archtyps='.$archtyps.'\',\'archbatch\',480,360,\'no\',\'no\')';
	echo BeginJavascript().$firststep.EndJavascript();
}
echo '
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
archiveepuration.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/archiveepuration.inc'
View Content
<?php
/*******************************************************************************
 *   Datas Archiving
 *******************************************************************************
 *   GuppY PHP Script - version 6.00.03
 *   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.19 (August 26, 2024) : Initialize release and Tohelp add
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[7] == '') {
        $nomzone = $admin[1844];
        include 'access.inc';
        exit();
    }
}

$archepurgego   = import('archepurgego', 'POST', 0);
$nextstep = import('nextstep');
$archepurgedate = import('archepurgedate');
$archepurgebl   = import('archepurgebl');
$archepurgene   = import('archepurgene');
$archepurgeag   = import('archepurgeag');
$archepurgefr   = import('archepurgefr');

$err_arch = $archepurgebl != 'on' && $archepurgene != 'on' && $archepurgeag != 'on' && $archepurgefr != 'on' && $archepurgego == 1 ? true: false;
$err_date = 1 != preg_match('/[0-9]{8}/', $archepurgedate) && $archepurgego == 1 ? true: false;

$erreur  = '';
$erreur .= $err_arch ? '<li>'.$admin[1297].'</li>': '';
$erreur .= $err_date ? '<li>'.$admin[591].'</li>': '';

//log 
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/archieepueration'.'_'.$dateheureminiutesecl.'.log';
//   file_put_contents(($nomficlog, ' debut archepurgego: '.$archepurgego.' '."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' nextstep: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' archepurgedate: '.$archepurgedate.' '."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' archepurgebl: '.$archepurgebl.' '."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' archepurgene: '.$archepurgene.' '."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' archepurgeag: '.$archepurgeag.' '."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' archepurgefr: '.$archepurgefr.' '."\n", FILE_APPEND | LOCK_EX);

// fin de déclaration log

$nextstep = 0;
//   file_put_contents(($nomficlog, ' nexstep initialiser à 0: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
if ($archepurgego == 1 && empty($erreur)) {
	//   file_put_contents(($nomficlog, ' test de archepurgego à 1 et aucune erreur: '.$archepurgego.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' verif archepurgebl: '.$archepurgebl.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' verif archepurgene: '.$archepurgene.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' verif archepurgeag: '.$archepurgeag.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' verif archepurgefr: '.$archepurgefr.' '."\n", FILE_APPEND | LOCK_EX);
	
    if ($archepurgebl == 'on' && ($archepurgedate.'0000' <= ReadCounter(DBBLOGARCHDATE) || $archepurgedate.'0000' > GetCurrentDateTime())) $archepurgebl = 'off';
	
	if ($archepurgene == 'on' && ($archepurgedate.'0000' <= ReadCounter(DBNEWSARCHDATE) || $archepurgedate.'0000' > GetCurrentDateTime()))
	{
		//   file_put_contents(($nomficlog, ' archepurgedate.0000: '.$archepurgedate.'0000'.' Counter: '.ReadCounter(DBNEWSARCHDATE)."\n", FILE_APPEND | LOCK_EX);
		//   file_put_contents(($nomficlog, ' archepurgedate.0000: '.$archepurgedate.'0000'.' datetime: '.GetCurrentDateTime()."\n", FILE_APPEND | LOCK_EX);
		$archepurgene = 'off';
	}
	if ($archepurgeag == 'on' && ($archepurgedate.'0000' <= ReadCounter(DBAGENDAARCHDATE) || $archepurgedate.'0000' > GetCurrentDateTime())) $archepurgeag = 'off';
	if ($archepurgefr == 'on' && ($archepurgedate.'0000' <= ReadCounter(DBFORUMARCHDATE) || $archepurgedate.'0000' > GetCurrentDateTime())) $archepurgefr = 'off';
	
	//   file_put_contents(($nomficlog, ' apres avec les dates de archepurgego à 1 et aucune erreur: '.$archepurgego.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' apres verif archepurgebl: '.$archepurgebl.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' apres verif archepurgene: '.$archepurgene.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' apres verif archepurgeag: '.$archepurgeag.' '."\n", FILE_APPEND | LOCK_EX);
	//   file_put_contents(($nomficlog, ' apres verif archepurgefr: '.$archepurgefr.' '."\n", FILE_APPEND | LOCK_EX);

    if ($archepurgebl == 'on' || $archepurgene == 'on' || $archepurgeag == 'on' || $archepurgefr == 'on') 
	{
		$nextstep = 1;
		//   file_put_contents(($nomficlog, ' au moins est on nextstep: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
	}
	else
	   $erreur = $admin[1853];
}
//   file_put_contents(($nomficlog, ' apres les test de nextstep: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
	if (document.archiveepureit.archepurgebl.checked != true &&
		document.archiveepureit.archepurgene.checked != true &&
		document.archiveepureit.archepurgeag.checked != true &&
		document.archiveepureit.archepurgefr.checked != true) {
        sto += "  - '.addslashes($admin[1297]).'\n";
        erreur = true;
	}
	regexp = /[0-9]{8}/;
	if (!regexp.test(document.archiveepureit.archepurgedate.value)) {
		sto += "  - '.addslashes($admin[591]).'\n";
		document.archiveepureit.archepurgedate.className = "errorInputText";
		erreur = true;
	}
    if (erreur == true) {
        sto = "'.addslashes($admin[1298]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1844]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1845], '100%');

if (!empty($erreur))
	echo displayErrorMsg($admin[1847], $erreur);
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1148&mnuid=937&tconfig=0#z2').
  '<div class="w-100 m-auto text-center" style="max-width:940px;">'.$admin[1848].'<br />'.$admin[1849].'<br />'.$admin[1850].'</div>
</p>
<hr />
<div style="max-width:520px; margin:auto;">
';

//   file_put_contents(($nomficlog, ' apres htable test de nextstep: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
if ($nextstep == 0) {
//   file_put_contents(($nomficlog, ' Dans le test de nextstep à 0: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
	echo '
<p class="forum" style="text-align:left; padding:5px 20px;">'.$admin[1845].'</p>
<form name="archiveepureit" id="archiveepureit" action="admin.php?lng='.$lng.'&amp;pg=archiveepuration" method="post" onsubmit="return VerifyForm(); return false;">
  <input type="hidden" name="archepurgego" value="1" />
  <fieldset>
  <div class="table-responsive-md">
  <table class="table table-bordered w-100">
    <tr>
	  <td colspan="2" class="text-left w-70">&nbsp;</td>
      <td class="text-center w-30 pb-3">'.$admin[590].'</td>
      <td class="text-center w-30 pb-3">'.$admin[1852].'</td>
    </tr>';
// date des précédents archives
echo '
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archepurgebl">'.$admin[770].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archepurgebl" name="archepurgebl" type="checkbox"'.Checked($archepurgebl == 'on').' /></td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBBLOGARCHDATE) > 0 ? FormatDate(ReadCounter(DBBLOGARCHDATE)) : '-').'</td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBBLOGARCHDATEEPUR) > 0 ? FormatDate(ReadCounter(DBBLOGARCHDATEEPUR)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archepurgene">'.$admin[13].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archepurgene" name="archepurgene" type="checkbox"'.Checked($archepurgene == 'on').' /></td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBNEWSARCHDATE) > 0 ? FormatDate(ReadCounter(DBNEWSARCHDATE)) : '-').'</td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBNEWSARCHDATEEPUR) > 0 ? FormatDate(ReadCounter(DBNEWSARCHDATEEPUR)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archepurgeag">'.$admin[624].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archepurgeag" name="archepurgeag" type="checkbox"'.Checked($archepurgeag == 'on').' /></td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBAGENDAARCHDATE) > 0 ? FormatDate(ReadCounter(DBAGENDAARCHDATE)) : '-').'</td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBAGENDAARCHDATEEPUR) > 0 ? FormatDate(ReadCounter(DBAGENDAARCHDATEEPUR)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2"><label for="archfr">'.$admin[9].' : </label></td>
      <td class="align-middle text-left w-15 py-2"><input id="archepurgefr" name="archepurgefr" type="checkbox"'.Checked($archepurgefr == 'on').' /></td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBFORUMARCHDATE) > 0 ? FormatDate(ReadCounter(DBFORUMARCHDATE)) : '-').'</td>
	  <td class="align-middle text-center w-20 py-2">'.(ReadCounter(DBFORUMARCHDATEEPUR) > 0 ? FormatDate(ReadCounter(DBFORUMARCHDATEEPUR)) : '-').'</td>
    </tr>
    <tr>
      <td class="align-middle text-right w-55 py-2">'.$admin[1851].'</td>
      <td class="align-middle text-left w-15 py-2">
        <input name="archepurgedate" class="form-control '.($err_date ? 'errorInputText' : 'texte').'" 
          type="text" style="width:120px;" value="'.$archepurgedate.'" title="'.$archepurgedate.'" />
      </td>
	  <td class="text-center w-30 py-2">&nbsp;</td>
    </tr>
  </table>
  </div>
  </fieldset>
  <div class="row quest p-0 mt-2 w-98 m-auto">
    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1846], '', '', $imgdroite).'</div></div>
  </div>
</form>
';
} elseif ($nextstep == 1) {
    //   file_put_contents(($nomficlog, ' apres test à 1 nextstep: '.$nextstep.' '."\n", FILE_APPEND | LOCK_EX);
	$archepurgetyps  = trim(($archepurgebl == 'on' ? TYP_BLOG.' ' : '').($archepurgene == 'on' ? TYP_NEWS.' ' : '').($archepurgeag == 'on' ? TYP_AGENDA.' ' : '').($archepurgefr == 'on' ? TYP_FORUM : ''));
	$firststep = 'PopupWindow(\'inc/archepurebatch.php?lng='.$lng.'&archepurgedate='.$archepurgedate.'&archepurgetyps='.$archepurgetyps.'\',\'archepurebatch\',480,360,\'no\',\'no\')';
	echo BeginJavascript().$firststep.EndJavascript();
}
echo '
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
art.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/art.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Articles
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[15] == '') {
        $nomzone = $admin[5];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_ART;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[39];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1052&mnuid=937&tconfig=0#z2').'</p>'.$admin[222].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[29];
$qwrite    = $admin[30];
$qcat      = $admin[35];
$qtitre    = $admin[36];
$qcontenu  = $admin[37];
$qnouveau  = $admin[880];

include 'inc/admin.inc';
?>
attribdroits.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/attribdroits.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Droits
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.20 (October 24, 2024) : Correction Rights scripts and plugins
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[12] == '') {
        $nomzone = $admin[818];
        include 'access.inc';
        exit();
    }
}

$etape      = import('etape');
$namedroits = import('namedroits');
$maxdiv     = 6;

function GetBeginFieldset($name, $title, $droits = TRUE) {
    global $admin;
    return '
    <fieldset class="w-100 mx-0 my-1 p-1">'.
    legend('<label><input type="checkbox" name="'.$name.'" title="'.$admin[893].'" style="vertical-align:middle"'.
    Checked('true').' onclick="selectAllDroits(this)" /> '.$title.'</label>');
}

function GetDiv($cntdiv, $index, $label, $image, $actif=true) {
    global $drtuser, $maxdiv;
	if (!isset($drtuser[$index])) $drtuser[$index] ='';
    return '
      <div style="vertical-align:top;width:'.intval(100 / 6).'%; text-align:center; margin:2px 0; padding:4px 0; display:'.($actif ? 'inline-block' : 'none').'">
        <i class="adm-'.$image.'" title="'.$label.'"></i><br />
        <label for="image'.$cntdiv.'">'.$label.'</label><br />
        <input id="image'.$cntdiv.'" type="'.($actif ? 'checkbox' : 'hidden').'" name="drtuser'.$index.'"'.Checked($drtuser[$index] == 'on').' />
      </div>';
}

function GetDivPlugin($index, $label, $image, $droit) {
	global $cntdiv, $maxdiv;
    return '
      <div style="vertical-align:top; min-width:'.intval(100 / $maxdiv).'%; text-align:center; margin:2px 0; padding:4px 0; display:inline-block;">
        <img src="plugins/'.$image.'" alt="'.$label.'" title="'.$label.'" /><br />
	    <label for="image'.$cntdiv.'">'.$label.'</label><br />
        <input id="image'.$cntdiv.'" type="checkbox" name="drtuserplgform['.$index.']"'.Checked($droit).' />
      </div>';
}

function GetEndFieldset() {
    return '
      <div class="clearfix"></div>
    </fieldset>
';
}

function LineCB($label, $name, $value) {
    return '
	  <tr>
        <td class="w-40 text-center">
		  <input type="checkbox" id="'.$name.'" name="'.$name.'"'.Checked($value).' />
        </td>
        <td class="w-60 text-left">
          <label for="'.$name.'"><b>&bull;</b>&nbsp;&nbsp;'.$label.'</label>
        </td>
	  </tr>';
}

$pluginlist = ExploreDir('plugins/');
for ($i = 0; $i < count($pluginlist); $i++) {
    if (!is_file('plugins/'.$pluginlist[$i].'/plugin.inc')) {
        unset($pluginlist[$i]);
    }
}
$headinc .= BeginJavascript().'
function selectAllDroits(opt) {
	var option = opt.name;
	var allSelected = opt.checked;
	switch (option) {
		case "droitsGeneral" :
			var dtrName = "drtuser";
			var dtrId = new Array(9, 11, 48);
			break;
		case "droitsConfig" :
			var dtrName = "drtuser";
			var dtrId = new Array(0, 1, 2, 3, 4, 5, 13, 43, 49);
			break;
		case "droitsAdmGen" :
			var dtrName = "drtuser";
			var dtrId = new Array(6, 52, 53, 10, 12, 25, 31, 32, 35, 36, 44, 45, 46, 47);
			break;
		case "droitsStructure" :
			var dtrName = "drtuser";
			var dtrId = new Array(17, 18, 26, 27, 28, 29, 34, 45, 17, 50, 51);
			break;
		case "droitsDatas" :
			var dtrName = "drtuser";
			var dtrId = new Array(14, 15, 16, 19, 20, 21, 22, 23, 24, 33, 37, 39, 40, 41);
			var dtrName = "drtuser";
			break;
		case "droitsPlugin" :
			var dtrName = "";
			var dtrId = new Array();
			var nbPlug = '.count($pluginlist).';
			for(i = 0; i < nbPlug+1; i++) {
				dtrId[i] = "drtuserplgform["+ i +"]";
			}
			break;
		default :
			return false;
	}

	if (dtrId.length != undefined) {
		for (i = 0; i < dtrId.length; i++) {
			document.forms["droitsUser"].elements[dtrName + dtrId[i]].checked = allSelected ? true : false;
		}
	}
	return false;
}'.EndJavascript();

if ($namedroits == '') {
    $etape = 1;
}

$adroits1 = array('modo', 'admin');
$adroits2 = array('webm', 'admin');
$adroits3 = array('admin');
$adroits4 = array('webm', 'admin', 'redac1', 'redac2');
$adroits5 = array('admin', 'redac1', 'redac2');
$adroits6 = array('modo', 'admin', 'redac1', 'redac2');

if ($etape == 3) {
	$drtuser9  = '';
    $drtuser30 = import('drtuser30');
    $drtuser38 = import('drtuser38');
    $drtuser42 = import('drtuser42');
			
	$modifdroits42 = 0;
	$anciendrtuser42 = '';
if (FileDBExist(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT))
	{
		$anciendrtuser42 = "redac1";
		$modifdroits42 = 1;
	}
	if (!isset($drtuser[25])) $drtuser[25] = '';	
    $drtuser0  = in_array($drtuser42, $adroits2) ? import('drtuser0')  : '';
    $drtuser1  = in_array($drtuser42, $adroits2) ? import('drtuser1')  : '';
    $drtuser2  = in_array($drtuser42, $adroits2) ? import('drtuser2')  : '';
    $drtuser3  = in_array($drtuser42, $adroits2) ? import('drtuser3')  : '';
    $drtuser4  = in_array($drtuser42, $adroits2) ? import('drtuser4')  : '';
    $drtuser5  = in_array($drtuser42, $adroits4) ? import('drtuser5')  : '';
    $drtuser6  = in_array($drtuser42, $adroits2) ? import('drtuser6')  : '';
    $drtuser7  = $serviz[13] == 'on' && in_array($drtuser42, $adroits3) ? import('drtuser7')  : '';
    $drtuser8  = in_array($drtuser42, $adroits2) ? import('drtuser8')  : '';
    $drtuser9  = $serviz[42] == 'on' && $serviz[176] == $namedroits && in_array($drtuser42, $adroits3) ? import('drtuser9')  : '';
    $drtuser10 = in_array($drtuser42, $adroits2) ? import('drtuser10') : '';
    $drtuser11 = in_array($drtuser42, $adroits2) ? import('drtuser11') : '';
    $drtuser12 = $serviz[42] == 'on' && in_array($drtuser42, $adroits3) ? import('drtuser12') : '';
    $drtuser13 = $serviz[99] == 'on' && in_array($drtuser42, $adroits2) ? import('drtuser13') : '';
    $drtuser14 = $serviz[8] == 'on' && in_array($drtuser42, $adroits6) ? import('drtuser14') : '';
    $drtuser15 = in_array($drtuser42, $adroits5) ? import('drtuser15') : '';
    $drtuser16 = $serviz[29] != '2' && in_array($drtuser42, $adroits1) ? import('drtuser16') : '';
    $drtuser17 = in_array($drtuser42, $adroits4) ? import('drtuser17') : '';
    $drtuser18 = $serviz[9] == 'on' && in_array($drtuser42, $adroits4) ? import('drtuser18') : '';
    $drtuser19 = $serviz[10] == 'on' && in_array($drtuser42, $adroits2) ? import('drtuser19') : '';
    $drtuser20 = $serviz[11] == 'on' && in_array($drtuser42, $adroits2) ? import('drtuser20') : '';
    $drtuser21 = $serviz[14] == 'on' && in_array($drtuser42, $adroits4) ? import('drtuser21') : '';
    $drtuser22 = $serviz[12] == 'on' && in_array($drtuser42, $adroits1) ? import('drtuser22') : '';
    $drtuser23 = $serviz[13] == 'on' && in_array($drtuser42, $adroits1) ? import('drtuser23') : '';
    $drtuser24 = $serviz[13] == 'on' && in_array($drtuser42, $adroits3) ? import('drtuser24') : '';
	$drtuser25 = in_array($drtuser42, $adroits2) ? 'on' : '';
    $drtuser26 = in_array($drtuser42, $adroits4) ? import('drtuser26') : '';
    $drtuser27 = $serviz[19] == 'on' && in_array($drtuser42, $adroits2) ? import('drtuser27') : '';
    $drtuser28 = $serviz[0] == 'on' && in_array($drtuser42, $adroits4) ? import('drtuser28') : '';
    $drtuser29 = in_array($drtuser42, $adroits2) ? import('drtuser29') : '';
    $drtuser31 = in_array($drtuser42, $adroits2) ? import('drtuser31') : '';
    $drtuser32 = in_array($drtuser42, $adroits2) ? import('drtuser32') : '';
    $drtuser33 = $serviz[36] != '' && in_array($drtuser42, $adroits2) ? import('drtuser33') : '';
    $drtuser34 = $serviz[27] == 'on' && in_array($drtuser42, $adroits2) ? import('drtuser34') : '';
    $drtuser35 = in_array($drtuser42, $adroits2) ? import('drtuser35') : '';
    $drtuser36 = in_array($drtuser42, $adroits2) ? import('drtuser36') : '';
    $drtuser37 = $serviz[47] == 'on' && in_array($drtuser42, $adroits4) ? import('drtuser37') : '';
    $drtuser39 = $serviz[53] == 'on' && in_array($drtuser42, $adroits6) ? import('drtuser39') : '';
    $drtuser40 = $serviz[53] == 'on' && in_array($drtuser42, $adroits1) ? import('drtuser40') : '';
    $drtuser41 = $serviz[53] == 'on' && in_array($drtuser42, $adroits2) ? import('drtuser41') : '';
    $drtuser43 = in_array($drtuser42, $adroits2) ? 'on' : '';
    $drtuser44 = in_array($drtuser42, $adroits5) ? 'on' : '';
    $drtuser45 = in_array($drtuser42, $adroits2) ? 'on' : '';
    $drtuser46 = in_array($drtuser42, $adroits2) ? import('drtuser46') : '';
    $drtuser47 = in_array($drtuser42, $adroits2) ? import('drtuser47') : '';
    $drtuser48 = in_array($drtuser42, $adroits2) ? import('drtuser48') : '';
    $drtuser49 = in_array($drtuser42, $adroits2) ? import('drtuser49') : '';
    $drtuser50 = in_array($drtuser42, $adroits2) ? import('drtuser50') : '';
	$drtuser51 = in_array($drtuser42, $adroits2) ? import('drtuser51') : '';
	$drtuser52 = in_array($drtuser42, $adroits2) ? import('drtuser52') : '';
	$drtuser53 = in_array($drtuser42, $adroits2) ? import('drtuser53') : '';
	$drtusersv0 = import('drtusersv0'); // e-mail publication article
	$drtusersv1 = import('drtusersv1'); // e-mail publication réaction article
	$drtusersv2 = import('drtusersv2'); // e-mail publication nouvelle
	$drtusersv3 = import('drtusersv3'); // e-mail publication blog
	$drtusersv4 = import('drtusersv4'); // e-mail publication commentaire blog
	$drtusersv5 = import('drtusersv5'); // e-mail publication livre d'or
	$drtusersv6 = import('drtusersv6'); // e-mail publication forum
    $filedroit = REDACREP.$namedroits.INCEXT;
    $mettre    = "<?php
if (stristr(\$_SERVER['SCRIPT_NAME'], '".$namedroits.".inc')) {
    header('location:../index.php');
    die();
}

\$drtuser[0]  = \"".$drtuser0."\";  // Accès à config générale
\$drtuser[1]  = \"".$drtuser1."\";  // Accès à config thèmes
\$drtuser[2]  = \"".$drtuser2."\";  // Accès à config accueil
\$drtuser[3]  = \"".$drtuser3."\";  // Accès à config section
\$drtuser[4]  = \"".$drtuser4."\";  // Accès à Config services
\$drtuser[5]  = \"".$drtuser5."\";  // Accès à Config boites
\$drtuser[6]  = \"".$drtuser6."\";  // Accès à Maintenance
\$drtuser[7]  = \"".$drtuser7."\";  // Accès à Archivage Forum
\$drtuser[8]  = \"".$drtuser8."\";  // Accès à Contrôle d'intégrité DB
\$drtuser[9]  = \"".$drtuser9."\";  // ".($drtuser9 == 'on' ? 'Accès à Mot de passe Collaborateur' : 'Inutilisé')."
\$drtuser[10] = \"".$drtuser10."\"; // Accès à Config zone membres
\$drtuser[11] = \"".$drtuser11."\"; // Accès à Travaux
\$drtuser[12] = \"".$drtuser12."\"; // Accès à Droits
\$drtuser[13] = \"".$drtuser13."\"; // Accès à Contact avancé
\$drtuser[14] = \"".$drtuser14."\"; // Accès à Nouvelles
\$drtuser[15] = \"".$drtuser15."\"; // Accès à Articles
\$drtuser[16] = \"".$drtuser16."\"; // Accès à Réactions Articles
\$drtuser[17] = \"".$drtuser17."\"; // Accès à Boîtes menus
\$drtuser[18] = \"".$drtuser18."\"; // Accès à Photos
\$drtuser[19] = \"".$drtuser19."\"; // Accès à Téléchargements
\$drtuser[20] = \"".$drtuser20."\"; // Accès à Liens
\$drtuser[21] = \"".$drtuser21."\"; // Accès à FAQ
\$drtuser[22] = \"".$drtuser22."\"; // Accès à Livre d'or
\$drtuser[23] = \"".$drtuser23."\"; // Accès à Forum
\$drtuser[24] = \"".$drtuser24."\"; // Accès à Config Forum
\$drtuser[25] = \"".$drtuser25."\"; // Accès aux fichiers langues personnalisés
\$drtuser[26] = \"".$drtuser26."\"; // Accès à Boites libres
\$drtuser[27] = \"".$drtuser27."\"; // Accès à Bannières
\$drtuser[28] = \"".$drtuser28."\"; // Accès à Citations
\$drtuser[29] = \"".$drtuser29."\"; // Accès à Menu icônes
\$drtuser[30] = \"".$drtuser30."\"; // Statut à afficher
\$drtuser[31] = \"".$drtuser31."\"; // Accès à Compteur
\$drtuser[32] = \"".$drtuser32."\"; // Accès à Statistiques
\$drtuser[33] = \"".$drtuser33."\"; // Accès à Newsletter
\$drtuser[34] = \"".$drtuser34."\"; // Accès à Nouvelles RSS
\$drtuser[35] = \"".$drtuser35."\"; // Accès à Logs
\$drtuser[36] = \"".$drtuser36."\"; // Accès à Fichiers
\$drtuser[37] = \"".$drtuser37."\"; // Accès à Agenda
\$drtuser[38] = \"".$drtuser38."\"; // Password
\$drtuser[39] = \"".$drtuser39."\"; // Accès à Blogs
\$drtuser[40] = \"".$drtuser40."\"; // Accès à Réactions Blogs
\$drtuser[41] = \"".$drtuser41."\"; // Accès à Blog RSS
\$drtuser[42] = \"".$drtuser42."\"; // Fonction
\$drtuser[43] = \"".$drtuser43."\"; // Accès à Config Style
\$drtuser[44] = \"".$drtuser44."\"; // Accès à Import
\$drtuser[45] = \"".$drtuser45."\"; // Accès à Sécurité
\$drtuser[46] = \"".$drtuser46."\"; // Accès à Mise à jour / Extension
\$drtuser[47] = \"".$drtuser47."\"; // Accès à Sauvegarde du site
\$drtuser[48] = \"".$drtuser48."\"; // Accès à Version de GuppY
\$drtuser[49] = \"".$drtuser49."\"; // Accès à Config Recherche
\$drtuser[50] = \"".$drtuser50."\"; // Accès à Réseaux sociaux
\$drtuser[51] = \"".$drtuser51."\"; // Accès à Déclaration RGPD
\$drtuser[52] = \"".$drtuser52."\"; // Accès à Archivage
\$drtuser[53] = \"".$drtuser53."\"; // Accès à épuration archivage
\$drtusersv[0] = \"".$drtusersv0."\"; // e-mail publication article
\$drtusersv[1] = \"".$drtusersv1."\"; // e-mail publication réaction article
\$drtusersv[2] = \"".$drtusersv2."\"; // e-mail publication nouvelle
\$drtusersv[3] = \"".$drtusersv3."\"; // e-mail publication blog
\$drtusersv[4] = \"".$drtusersv4."\"; // e-mail publication commentaire blog
\$drtusersv[5] = \"".$drtusersv5."\"; // e-mail publication livre d\'or
\$drtusersv[6] = \"".$drtusersv6."\"; // e-mail publication forum";

    $drtuserplgform = import('drtuserplgform', 'POST', FALSE);
    $slistplug      = import('listplug');
    $listplug       = explode("::", $slistplug);
    foreach ($listplug as $i => $value) {
		if (!empty($drtuserplgform[$i]))
        $mettre .= "
\$drtuserplg['$value'] = \"".(in_array($drtuser42, $adroits4) ? $drtuserplgform[$i] : '')."\"; // Accès plugin $value";
    }
    $mettre .='
?>';
    WriteFullDB($filedroit, $mettre);
	if (!isset($droitaccegroupredac)) $droitaccegroupredac = '';
	if ($modifdroits42 == 1 && ($drtuser42 != "redac1" && $drtuser42 != "redac2"))
	{
			if ($droitaccegroupredac == 'on')
			{					
				if ($anciendrtuser42 == "redac1" || $anciendrtuser42 == "redac2")
				{					
					if (FileDBExist(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT)) 
					{
						include REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT;
						$accessRepUpload = explode(',',$drtaccessRepUpload);       //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
						$accessRepUploadImage = explode(',',$drtaccessRepUploadImage);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
						$accessRepUploadLink = explode(',',$drtaccessRepUploadLink);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
						$accessRepUploadMedia = explode(',',$drtaccessRepUploadMedia);
						$drtaccessRepUpload = '';
						for ($i =0; $i < count($accessRepUpload); $i++)
						{
							if (strpos($accessRepUpload[$i], $namedroits))
							{
								$drtaccessRepUpload = $accessRepUpload[$i];
							}
								
						}
						$drtaccessRepUploadImage = '';
						for ($i =0; $i < count($accessRepUploadImage)-1; $i++)
						{
							if (strpos($accessRepUploadImage[$i], $namedroits))
								$drtaccessRepUploadImage .= $accessRepUploadImage[$i];
						}
						$drtaccessRepUploadLink = '';
						for ($i =0; $i < count($accessRepUploadLink)-1; $i++)
						{
							if (strpos($accessRepUploadLink[$i], $namedroits))
								$drtaccessRepUploadLink .= $accessRepUploadLink[$i];
						}
						$drtaccessRepUploadMedia = '';
						for ($i =0; $i < count($accessRepUploadMedia)-1; $i++)
						{
							if (strpos($accessRepUploadMedia[$i], $namedroits))
								$drtaccessRepUploadMedia .= $accessRepUploadMedia[$i];
						}
// Copie des dossier contenant  les Images, les videos etc ...
						@recursiveCopy(CHEMIN.$drtaccessRepUploadMedia, CHEMIN.'redacgroupdocs/'.$drtaccessRepUploadMedia);
// Suppression du dossier du Redacteur
						@RecursiveDeleteDirComplet(CHEMIN.$drtaccessRepUploadMedia);					
// Suppression des dossiers					
						DestroyDBFile(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT);
/*						echo 'nom dossier drtaccessRepUpload: '.$drtaccessRepUpload.'<br />';	
						echo 'nom dossier drtaccessRepUploadImage: '.$drtaccessRepUploadImage.'<br />';	
						echo 'nom dossier drtaccessRepUploadLink: '.$drtaccessRepUploadLink.'<br />';
						echo 'nom dossier drtaccessRepUploadMedia: '.$drtaccessRepUploadMedia.'<br />';
*/						
						$dbw    = SelectDBFieldsByNotStatus(ReadDBFields(DOCID),'d');
						for ($i = 0; $i < count($dbw); $i++) 
						{					
							$modif = 0;
							ReadDoc($dbw[$i][1]);	
							$temp   = explode('|', $author);
							$authorcontrol = $temp[0];
							$id = $dbw[$i][1];
							if ($authorcontrol == $namedroits) 
							{					
								if (strpos($fieldc1, $namedroits)) {
									$contenu = stripslashes($fieldc1);
									$contenu = str_replace('redac_'.$namedroits.'img', 'redacgroupdocs/redac_'.$namedroits.'img', $contenu);
									$fieldc1 = $contenu;
									$modif = 1;	
								}	
								if (strpos($fieldc2, $namedroits)) {
									$contenu = stripslashes($fieldc2);
									$contenu = str_replace('redac_'.$namedroits.'img', 'redacgroupdocs/redac_'.$namedroits.'img', $contenu);
									$fieldc2 = $contenu;
									$modif = 1;	
								}	
								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);			
								}
							}
						}

					} // fin acces dossiers pour redac			
				}
			} // fin d'existence du dossier droits acces membre   		
	}
	if (!isset($droitaccegroupredac)) $droitaccegroupredac = '';
	if ($droitaccegroupredac == 'on')
	{
		if ($drtuser42 == "redac1" || $drtuser42 == "redac2")
		{
			$accessRepUpload = 'redac_'.$namedroits.'img,redacgroupdocs';
			$accessRepUploadImage = 'redac_'.$namedroits.'img,redacgroupdocs';
			$accessRepUploadLink = 'redac_'.$namedroits.'img,redacgroupdocs';
			$accessRepUploadMedia = 'redac_'.$namedroits.'img,redacgroupdocs';
		
		
		
$mettre    = "<?php
if (stristr(\$_SERVER['SCRIPT_NAME'], 'accessdossier".$namedroits.".inc')) {
    header('location:../index.php');
    die();
}

\$drtaccessRepUpload = \"".$accessRepUpload ."\"; //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
\$drtaccessRepUploadImage = \"".$accessRepUploadImage ."\"; //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
\$drtaccessRepUploadLink = \"".$accessRepUploadLink ."\"; //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
\$drtaccessRepUploadMedia = \"".$accessRepUploadMedia."\"; //Accès aux répertoires à la racine de Guppy pour les fichiers Audio et Video (accès avec variable uptype='Media')";                                                        //Attention: vous devez choisir les répertoires uniquement parmi la liste des répertoires contenus dans la variable $accessRepUpload ci-dessus
$mettre .='
?>';
			if (!is_dir(CHEMIN.'admin/redac/redacaccessdossier')) // Generation des access utilisés en upload.php
			{
				@mkdir(CHEMIN.'admin/redac/redacaccessdossier');
				SetChmod(CHEMIN.'admin/redac/redacaccessdossier');
				@copy(CHEMIN.'admin/redac/index.php', CHEMIN.'admin/redac/redacaccessdossier/index.php');
				SetChmod(CHEMIN.'admin/redac/redacaccessdossier/index.php');
			}
			if (!is_dir(CHEMIN.'redac_'.$namedroits.'img')) // Creation dossier acces en Upload Image, AUdio,Link et média
			{
				@mkdir(CHEMIN.'redac_'.$namedroits.'img');
				SetChmod(CHEMIN.'redac_'.$namedroits.'img');
				@copy(CHEMIN.'img/index.php', CHEMIN.'redac_'.$namedroits.'img/index.php');	
				SetChmod(CHEMIN.'redac_'.$namedroits.'img/index.php');
			}
			if (!is_dir(CHEMIN.'redacgroupdocs')) // Creation dossier Redacgrupdocs pour tous les rédacteurs
			{
				@mkdir(CHEMIN.'redacgroupdocs');
				SetChmod(CHEMIN.'redacgroupdocs');
				@copy(CHEMIN.'img/index.php', CHEMIN.'redacgroupdocs/index.php');	
				SetChmod(CHEMIN.'redacgroupdocs/index.php');
			}
			$filedroitdossierredac = REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT;
			WriteFullDB($filedroitdossierredac, $mettre);
		} // fin acces dossiers pour redac
		else
		{
			if (file_exists(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT))
				DestroyDBFile(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT);	
			
		}
	}
	else
	{
		if (file_exists(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT))
			DestroyDBFile(REDACREP.'redacaccessdossier/accessdossier'.$namedroits.INCEXT);	
		
	}

    $adm   = array($namedroits, $drtuser42, $drtuser23, $drtuser30);
    $dbadm = ReadDBFields(ADMINS);
    for ($k = 0; $k < count($dbadm); $k++) {
        if ($dbadm[$k][0] == $namedroits) {
            unset($dbadm);
            DeleteDBFieldById(ADMINS, $id = $k);
            break;
        }
    }
    AppendDBFields(ADMINS, $adm);
}

################################################################################
if ($etape == 1) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[819]);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
	htable($admin[819], '100%');
    echo '
<p class="text-center">'.ToHelp($lng, '&pg=982&mnuid=937&tconfig=0#z2').$admin[822].'</p>
<hr />
<form action="admin.php?lng='.$lng.'&amp;pg=attribdroits" method="post">
  <input type="hidden" name="etape" value="2" />
  <div class="m-auto text-center" style="max-width: 200px;">
    <select class="form-control" name="namedroits" onchange="submit();">';
	$dbadmins = ReadDBFields(ADMINS);
	$dbadms   = array();
	foreach ($dbadmins as $row) $dbadms[] = $row[0];
    $dbusersmsg = array();
    $file_users = opendir(MSGREP);
    while ($nomfichier = readdir($file_users)) {
        if (substr($nomfichier, -3) == 'dtb') {
            $dbusersmsg[] = str_replace(substr($nomfichier, -4), '', $nomfichier);
        }
    }
    closedir($file_users);
    @usort($dbusersmsg, 'AsciiCompare');
    echo '
      <option value="" select="selected">'.$admin[823].'</option>';
    foreach ($dbusersmsg as $user) {
        if ($user != $serviz[31] && $user != $userprefs[1] && $user != $user[0] && !in_array($user, $dbadms)) {
            echo '
      <option value="'.$user.'">'.$user.'</option>';
        }
    }
    echo '
        </select>
	<noscript>
	  <br />
	  '.SubmitButton($admin[519]).'
	</noscript>
  </div>
  <br />&nbsp;
</form>';
}
################################################################################
elseif ($etape == 2 || $etape == 3) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.'&amp;pg=attribdroits">'.str_replace('Admin - ', '', $admin[820]).'</a> > <a href="admin.php?lng='.$lng.'&amp;pg=gestredac">'.str_replace('Admin - ', '', $admin[819]).'</a> > '.$admin[820].' '.$namedroits;
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
	htable($admin[820], '100%');
    if (FileDBExist(REDACREP.$namedroits.INCEXT)) {
        include REDACREP.$namedroits.INCEXT;
    }
    else {
        if ($etape == 3) {
            echo BeginJavascript().'
alert("'.addslashes('ERROR : the file '.REDACREP.$namedroits.INCEXT.' does not exists : STOP !').'");
            '.EndJavascript();
            exit();
        } else {
            $drtuser = array();
            for ($i = 0; $i <= 50; $i++) $drtuser[] = '';
            $drtuserplg = array();
            foreach ($pluginlist as $plugin) $drtuserplg[$plugin] = '';
        }
    }

   echo '
<div class="text-center">
  <br />'.ToHelp($lng, '&pg=982&mnuid=937&tconfig=0#z2').$admin[824].' <b>'.$namedroits.'</b><br />'.$admin[825].'
</div>
<hr />
<form  name="droitsUser" action="admin.php?lng='.$lng.'&amp;pg=attribdroits" method="post">
  <input type="hidden" name="namedroits" value="'.$namedroits.'" />
  <input type="hidden" name="etape" value="3" />';
    if (is_file(MSGREP.$namedroits.DBEXT)) {
        $userdb = ReadDBFields(MSGREP.$namedroits.DBEXT);
        $drtuser[38] = $userdb[0][0];
    }
    echo '
  <p class="text-center">
    <b>'.$admin[827].' : </b> '.$namedroits.'
    <br />
    <input type ="hidden" name="drtuser38" value="'.$drtuser[38].'" size="15" />
    <b> '.$admin[1612].' : </b>
    <select class="form-control mx-auto" style="max-width: 200px;" name="drtuser42" onchange="this.form.submit()">
      <option value="">'.$admin[1312].'</option>
      <option value="redac1"'.Selected($drtuser[42] == "redac1").'>'.$admin[715].'1</option>
      <option value="redac2"'.Selected($drtuser[42] == "redac2").'>'.$admin[715].'2</option>
      <option value="modo"'.Selected($drtuser[42] == "modo").'>'.$admin[712].'</option>
      <option value="webm"'.Selected($drtuser[42] == "webm").'>'.$admin[718].'</option>
      <option value="admin"'.Selected($drtuser[42] == "admin").'>'.$admin[1261].'</option>
    </select>&nbsp;
    <noscript>
	  <span style="padding:4px;">'.SubmitButton($admin[519]).'</span>
    </noscript>
  </p>
  <p class="text-center">
    <b>'.$admin[1440].'</b>&nbsp;
    <input type="text" class="mx-auto form-control texte" style="max-width: 180px;" name="drtuser30" size="20" value="'.$drtuser[30].'" />
  </p>
  <hr />';
  
	$i = 0;
    echo 
GetBeginFieldset('droitsGeneral', $admin[1355], 
	$drtuser[48] && ($drtuser[9] || $serviz[176] != $namedroits) && $drtuser[11]).
GetDiv($i++, 48, $admin[904], 'update', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 9, $admin[1554], 'protect', $serviz[42] == 'on' && in_array($drtuser[42], $adroits3) && $serviz[176] == $namedroits ? true : false).
GetDiv($i++, 11, $admin[817], 'maintenance', in_array($drtuser[42], $adroits2) ? true : false).
GetEndFieldset();

	echo 
GetBeginFieldset('droitsConfig', $admin[1356],
    $drtuser[0] && $drtuser[3] && $drtuser[4] && ($drtuser[13] || $serviz[99] != '') && 
	$drtuser[49] && ($drtuser[24] || $serviz[13] != '') && $drtuser[1] && $drtuser[5] && $drtuser[2] && $drtuser[43]).
GetDiv($i++,0, $admin[7], 'config1', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 4, $admin[169], 'config5', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 3, $admin[166], 'config4', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 13, $admin[1183], 'contact', $serviz[99] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 49, $admin[1264], 'search', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 1, $admin[888], 'config2', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 5, $admin[346], 'config6', in_array($drtuser[42], $adroits4) && $namedroits != 'redac1' ? true : false).
GetDiv($i++, 2, $admin[469], 'config3',in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 43, $admin[719], 'css', in_array($drtuser[42], $adroits2) ? true : false).
GetEndFieldset();
if (!isset($drtuser[25])) $drtuser[25] = '';
echo 
	GetBeginFieldset('droitsAdmGen', $admin[881],
		$drtuser[10] && ($drtuser[12] || $serviz[42] != '') && $drtuser[8] && $drtuser[6] && $drtuser[25] &&
		($drtuser[52] || $drtuser[53] || $serviz[13] != '') && $drtuser[46] && $drtuser[47] && $drtuser[44] && $drtuser[36] && 
		$drtuser[31] && $drtuser[32] && $drtuser[35]).
	GetDiv($i++, 10, $admin[816], 'members1', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 12, $admin[818], 'droits1', $serviz[42] == 'on' && in_array($drtuser[42], $adroits3) && $serviz[176] == $namedroits ? true : false).
	GetDiv($i++, 8, $admin[278], 'dbcheck', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 6, $admin[170], 'maintain', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 52, $admin[577], 'archive', $serviz[13] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 53, $admin[1844], 'archive', $serviz[13] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 46, $admin[1126], 'install', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 47, $admin[1245], 'save', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 44, $admin[1093], 'import', in_array($drtuser[42], $adroits5) && $namedroits != 'redac1' ? true : false).
	GetDiv($i++, 36, $admin[171], 'upload', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 31, $admin[17], 'counter1', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 32, $admin[212], 'stats3', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 35, $admin[553], 'eye1', in_array($drtuser[42], $adroits2) ? true : false).
	GetDiv($i++, 25, $admin[957], 'article', in_array($drtuser[42], $adroits2) ? true : false).
	GetEndFieldset();

	echo 
GetBeginFieldset('droitsStructure', $admin[1357],
	$drtuser[26] && ($drtuser[34] || $serviz[27] != '') && ($drtuser[27] || $serviz[19] != '') &&
	($drtuser[28] || $serviz[0] != '') && $drtuser[29] && $drtuser[17] && $drtuser[45] && $drtuser[50] && $drtuser[51] &&
    ($drtuser[18] || $serviz[9] != '')).
GetDiv($i++, 26, $admin[270], 'freebox', in_array($drtuser[42], $adroits4) ? true : false).
GetDiv($i++, 34, $admin[602], 'newsrss', $serviz[27] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 27, $admin[263], 'banner', $serviz[19] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 28, $admin[6], 'think', $serviz[0] == 'on' && in_array($drtuser[42], $adroits4) ? true : false).
GetDiv($i++, 29, $admin[876], 'menuico', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 17, $admin[1216], 'menu1', in_array($drtuser[42], $adroits4) ? true : false).
GetDiv($i++, 50, $admin[336], 'socnet2', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 51, $admin[1776], 'socnet1', in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 45, $admin[1811], 'eye2', in_array($drtuser[45], $adroits2) ? true : false).
GetDiv($i++, 45, $admin[1807], 'eye2', in_array($drtuser[45], $adroits2) ? true : false).
GetDiv($i++, 18, $admin[322], 'photo1', $serviz[9] == 'on' && in_array($drtuser[42], $adroits4) ? true : false).
GetEndFieldset();

	echo 
GetBeginFieldset('droitsDatas', $admin[882],
    ($drtuser[14] || $serviz[8] != '') && $drtuser[15] && ($drtuser[16] || $serviz[29] != '2') && 
	($drtuser[19] || $serviz[10] != '') && ($drtuser[20] || $serviz[11] != '') && ($drtuser[21] || $serviz[14] != '') && 
	($drtuser[22] || $serviz[12] != '') && ($drtuser[37] || $serviz[47] != '') && ($drtuser[23] || $serviz[13] != '') && 
	($drtuser[39] || $serviz[53] != '') && ($drtuser[40] || $serviz[53] != '') && ($drtuser[41] || $serviz[53] != '') && 
	($drtuser[33] || $serviz[36] != '')).
GetDiv($i++, 14, $admin[13], 'news', $serviz[8] == 'on' && in_array($drtuser[42], $adroits6) ? true : false).
GetDiv($i++, 15, $admin[5], 'article', in_array($drtuser[42], $adroits5) ? true : false).
GetDiv($i++, 16, $admin[476], 'react', $serviz[29] != '2' && in_array($drtuser[42], $adroits1) ? true : false).
GetDiv($i++, 19, $admin[18], 'download', $serviz[10] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 20, $admin[10], 'links', $serviz[11] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 21, $admin[206], 'faq', $serviz[14] == 'on' && in_array($drtuser[42], $adroits4) ? true : false).
GetDiv($i++, 22, $admin[11], 'guestbook', $serviz[12] == 'on' && in_array($drtuser[42], $adroits1) ? true : false).
GetDiv($i++, 37, $admin[624], 'agenda', $serviz[47] == 'on' && in_array($drtuser[42], $adroits4) ? true : false).
GetDiv($i++, 24, $admin[253], 'config71', $serviz[13] == 'on' && in_array($drtuser[42], $adroits3) ? true : false).
GetDiv($i++, 23, $admin[9], 'forum', $serviz[13] == 'on' && in_array($drtuser[42], $adroits1) ? true : false).
GetDiv($i++, 39, $admin[770], 'blog', $serviz[53] == 'on' && in_array($drtuser[42], $adroits6) ? true : false).
GetDiv($i++, 40, $admin[776], 'reblog', $serviz[53] == 'on' && in_array($drtuser[42], $adroits1) ? true : false).
GetDiv($i++, 41, $admin[791], 'blogrss', $serviz[53] == 'on' && in_array($drtuser[42], $adroits2) ? true : false).
GetDiv($i++, 33, $admin[546], 'newsletter3', $serviz[36] != '' && in_array($drtuser[42], $adroits2) ? true : false).
GetEndFieldset();

    if (!empty($pluginlist) && in_array($drtuser[42], $adroits4)) {
		$cntdiv = 0;
        echo 
GetBeginFieldset('droitsPlugin', $admin[883], false);
        $i = 0;
        $dtrAllPlugs = TRUE;
        foreach ($pluginlist as $plugin) {
            include 'plugins/'.$plugin.'/plugin.inc';
            echo GetDivPlugin($i++, $plugin_admin_name, $plugin_admin_icon, 
              FileDBExist(REDACREP.$namedroits.INCEXT) && (isset($drtuserplg[$plugin]) ? $drtuserplg[$plugin] == 'on' : false));
            $dtrAllPlugs = $dtrAllPlugs && (isset($drtuserplg[$plugin]) ? $drtuserplg[$plugin] == 'on' : false);
        }

        if ($dtrAllPlugs) {
        	echo BeginJavascript().'
document.forms["droitsUser"].elements["droitsPlugin"].checked = true;'.EndJavascript();
        }
    }
    echo GetEndFieldset().'
  <input type="hidden" name="listplug" value="'.implode('::', $pluginlist).'" />';
	echo '
  <fieldset class="w-100 mx-0 mt-2 p-1">'.legend($admin[229]).'
    <div class="table-responsive-md">
    <table class="table">
	'.LineCB($admin[1447], 'drtusersv0', @$drtusersv[0]).'
	'.LineCB($admin[473],  'drtusersv1', @$drtusersv[1]).'
	'.LineCB($admin[235],  'drtusersv2', @$drtusersv[2]).'
	'.LineCB($admin[786],  'drtusersv3', @$drtusersv[3]).'
	'.LineCB($admin[1424], 'drtusersv4', @$drtusersv[4]).'
	'.LineCB($admin[236],  'drtusersv5', @$drtusersv[5]).'
	'.LineCB($admin[237],  'drtusersv6', @$drtusersv[6]).'    
    </table>
    </div>
  </fieldset>';
    echo '
  <div class="row quest p-0 mt-2 w-100 m-auto">
    <div class="col-md-4">
      '.SubmitButton($admin[820], 'self.location.href=\'admin.php?lng='.$lng.'&pg=attribdroits&etape=1\'', $imggauche, '', 'button').'
    </div>
    <div class="col-md-4">
      '.SubmitButton($admin[821], 'self.location.href=\'admin.php?lng='.$lng.'&pg=gestredac\'', $imggauche, '', 'button').'
    </div>
    <div class="col-md-4"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
  </div>
</form>
<br />';
}
################################################################################
  
btable();
include CHEMIN.'admin/bpage.inc';
?>
banner.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/banner.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Banners
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
	include REDACREP.$userprefs[1].INCEXT ;
	if ($drtuser[27] == '') {
		$nomzone = $admin[263];
		include 'access.inc';
		exit();
	}
}

$form      = import('form');

$qtype     = TYP_BANNER;
$bname     = 0;
$bemail    = 0;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 0;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[264];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1024&mnuid=937&tconfig=0#z2').'</p>'.$admin[265].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[266];
$qwrite    = $admin[267];
$qcat      = $admin[269];
$qtitre    = $admin[268];
$qcontenu  = "";
$qnouveau  = $admin[918];

include 'inc/admin.inc';
?>
blog.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/blog.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Blog
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[39] == '') {
        $nomzone = $admin[770];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_BLOG;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 2;
$qformonly = 0;
$qtitle    = $admin[771];
$qintro    = '<br />'.ToHelp($lng, '&pg=1078&mnuid=937&tconfig=0#z2').$admin[772].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[782];
$qwrite    = $admin[783];
$qcat      = $admin[794];
$qtitre    = $admin[784];
$qcontenu  = $admin[785];
$qnouveau  = $admin[261];

include 'inc/admin.inc';
?>
blogrub.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/blogrub.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Blog topics
 *******************************************************************************
 *   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.19 (August 26, 2024) : initial release
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[39] == '') {
        $nomzone = $admin[13];
        include 'access.inc';
        exit();
    }
}

$regit = import('regit');
$idpg  = import('idpg');

if ($regit == 'fast') {
    
}

if ($regit == 'fast') {
    
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[15];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable(ucfirst($admin[15]), '100%');
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1074&mnuid=937&tconfig=0#z2').$admin[1772].'</p>
<hr />';
echo '
<div class="w-100 m-auto" style="max-width:560px;">
  <form name="fast_actions" action="admin.php?lng='.$lng.'&amp;pg=members" method="post">
  <fieldset style="padding-top:12px;">
    <input type="hidden" name="regit" value="fast" />
	<div class="table-responsive-md">
    <table class="table table-bordered text-center m-auto" style="max-width:520px;">
	  <tr>
        <td colspan="2">
          <div class="float-right mb-2" style="padding-right:60px;">
            '.SubmitButton($admin[1602]).'
            <i class="fas fa-level-down-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
      <tr class="forum">
		<td class="text-left pl-1 py-1"><b>'.ucfirst($admin[169]).'</b></td>
		<td class="text-center py-1" style="width:76px;"><b>'.$admin[680].'</b></td>
	  </tr>';
if (empty($idpg)) {
    $idpg = 1;
} else {
    while ($count <= ($idpg - 1)* $nbpg) $idpg--;
}
$navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=blogrub&amp;idpg=', $count, $idpg, $nbpg);
$ids    = '';
for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
    if (!empty($lst[$i])) {
        echo '
	  <tr class="rep">
		<td class="text-left pl-1 py-1">'.$lst[$i].'</td>
		<td class="text-center py-1">';
                MakeRadioGroup(array( array("d", "s", $i)));
                echo '
		</td>
	  </tr>';
            }
            $ids .= $i." ";
        }
        unset($grps);
        echo '
	  <tr>
        <td colspan="2">
          <div class="float-right mb-2" style="padding-right:60px;">
            '.SubmitButton($admin[1602]).'
            <i class="fas fa-level-up-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
	</table>
    </div>
    <br />
    <input type="hidden" name="ids" value="'.$ids.'" />
  </form>
  <div class="text-center">'.$navbar.'</div>';
        echo '
  <form name="members" action="admin.php?lng='.$lng.'&amp;pg=blogrub"  method="post">
    <input type="hidden" name="regit" value="add" />
	<div class="text-center">'.$admin[1773].' :</div>
	<div class="text-center'.($lang[1] == '' ? ' mb-4' : '').'">
      '.($lang[1] != '' ? '<div class="d-inline-block">'.$flag1.'</div>' : '').'
      <div class="d-inline-block">
        <input type="text" class="form-control mx-auto texte" name="newtopic0" style="width:200px;" />
      </div>';
        if ($lang[1] != '') {
            echo '
    </div>
	<div class="text-center mb-4">
      <div class="d-inline-block">'.$flag2.'</div>
      <div class="d-inline-block">
        <input type="text" class="form-control mx-auto texte" name="newtopic1" style="width:200px;" />
      </div>';
        }
        echo '
	</div>
	<div class="quest" style="padding:2px 20px;">
      <div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
      <div class="clearfix"></div>
    </div>
  </fieldset>
  </form>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
brub.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/brub.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Blog topics
 *******************************************************************************
 *   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.19 (August 26, 2024) : Correction TOhelp
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[39] == '') {
        $nomzone = $admin[15];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_BRUB;
$bname     = 1;
$bemail    = 1;
$bcat      = 0;
$btitre    = 1;
$bcontenu  = 0;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[145];
$qintro    = '<br />'.ToHelp($lng, '&pg=1074&mnuid=937&tconfig=0#z2').$admin[79].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[146];
$qwrite    = $admin[366];
$qcat      = '';
$qtitre    = $admin[1772];
$qcontenu  = '';
$qnouveau  = '';

include 'inc/admin.inc';
?>
bss.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/bss.inc'
View Content
<?php
/*******************************************************************************
 *   Admin RSS Blog
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
	include REDACREP.$userprefs[1].INCEXT;
	if ($drtuser[41] == '') {
		$nomzone = $admin[791];
		include 'access.inc';
		exit();
	}
}

$form      = import('form');

$qtype     = TYP_BSS;
$bname     = 0;
$bemail    = 0;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 0;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[790];
$qintro    = '<br />'.ToHelp($lng, '&pg=1082&mnuid=937&tconfig=0#z2').$admin[604].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[788];
$qwrite    = $admin[789];
$qcat      = $admin[607];
$qtitre    = $admin[608];
$qcontenu  = '';
$qnouveau  = '';

include 'inc/admin.inc';
?>
cal.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/cal.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Calendar
 *******************************************************************************
 *   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'], 'cal.inc')) {
	header('location:../index.php');
	die();
}

if ($dup == 2) {
    function DupTextId ($id) {
        global $lng, $lang;
        include DBBASE.TestFileID($id).INCEXT;
        $day   = substr($fielda1, 6, 2);
        $mois  = substr($fielda1, 4, 2);
        $annee = substr($fielda1, 0, 4);
        $txt   = $lng == $lang[0] ? $fieldc1 : $fieldc2;
        $txt   = strip_tags(str_replace('<br />', '', str_replace('</p>', '', str_replace('<p>', '', $txt))));
        $txt   = strlen($txt) > 142 ? CutLongWord($txt, 40).' .../...' : $txt;
        return '<b>'.substr(FormatDate($annee.$mois.$day."00000"), 0, 10).'</b> - '.$txt;
    }
    echo '
 -------------- <br />
<b>'.ucfirst($admin[915]).' '.$admin[922].'</b> '.DupTextId($id).'
<br /><br />';
}
    
include CHEMIN.'inc/lang/'.$lng.'-special.inc';
$l = ($lng == $lang[0]) ? 0 : 1;
$asite19 = explode('|', $site[19]);
if (empty($annee)) $annee = date('Y');
if (empty($mois))  $mois  = date('m');
$jour        = date('d');
$joursmois   = date('t', mktime(0, 0, 0, (int)$mois, 1, (int)$annee));
$premierjour = date('w', mktime(0, 0, 0, (int)$mois, 1, (int)$annee));
$mois        = date('m', mktime(0, 0, 0, (int)$mois, 1, (int)$annee));
$annee       = date('Y', mktime(0, 0, 0, (int)$mois, 1, (int)$annee));
$jourj       = date('d', mktime(0, 0, 0, (int)$mois, (int)$jour, (int)$annee));
if ($premierjour == 0) $premierjour = 7;
$semainepays = $admin[1613];
if ($semainepays == 0) {
    $joursemaine = array(1 => $admin[1615], $admin[1616], $admin[1617], $admin[1618], $admin[1619], $admin[1620], $admin[1614]);
}
else {
    $joursemaine = array(1 => $admin[1614], $admin[1615], $admin[1616], $admin[1617], $admin[1618], $admin[1619], $admin[1620]);
}
$moispays = array(1 => $admin[639], $admin[640], $admin[641], $admin[642], $admin[643], $admin[644], $admin[645], $admin[646], $admin[647], $admin[648], $admin[649], $admin[650]);
$nommois  = $moispays[$mois*$mois/$mois];
$dbannee  = array();
for ($i = -1; $i < 8; $i++) $dbannee[] = date('Y') + $i;
$date     = getdate(time());
$mois_ci  = $date['mon'];
if ($mois_ci < 10) {
  $mois_ci = '0'.$mois_ci;
}
$ann_ci = $date["year"];
if ($mois == 1) {
  $mois_p = 12;
  $ann_p  = $annee - 1;
}
else {
  $mois_p = $mois - 1;
  $ann_p  = $annee;
}
if ($mois_p < 10) $mois_p = '0'.$mois_p;
if ($mois == 12) {
  $mois_s = 1;
  $ann_s  = $annee + 1;
}
else {
  $mois_s = $mois + 1;
  $ann_s  = $annee;
}
if ($mois_s < 10) $mois_s = '0'.$mois_s;
$nbjours = date('d', mktime(0,0,0,(int)$mois_s,0,(int)$annee));
$idn     = '';

$dupid = $dup == 2 ? '&amp;dup=2&amp;id='.$id : '';

$adm_agenda1 = 'admin.php?lng='.$lng.'&amp;pg=agenda&amp;form=1&amp;tri='.$tri;
$adm_agenda2 = 'admin.php?lng='.$lng.'&amp;pg=agenda&amp;form=2&amp;tri='.$tri;
$adm_agenda3 = 'admin.php?lng='.$lng.'&amp;pg=agenda&amp;form=3&amp;tri='.$tri;
echo '
<div style="margin:auto;text-align:center;">
  <div class="table-responsive-md">
  <table class="cal" style="width:280px;margin:auto;">';
if (($asite19[$l] == 'E1') || ($asite19[$l] == 'E2')) {
	echo '
  <tr class="cal">
    <td>
      <a href="'.$adm_agenda3.$dupid.'&amp;mois='.$mois_p.'&amp;annee='.$ann_p.'" title="'.$mois_p.'-'.$ann_p.'">
	    <i class="fas fa-caret-left align-middle"></i>
	  </a>
    </td>
    <td colspan="5">
	  <form name="selmois" method="POST" action="'.$adm_agenda3.$dupid.'">
        <input type="hidden" name="annee" value="'.$annee.'" />
	    <div style="float:left;">
	      <select class="form-control cal" style="width:112px;" name="mois" onchange="this.form.submit();">';
	foreach($moispays as $key=>$mnth)
		echo '
	        <option value="'.$key.'"'.Selected($key == $mois).'>'.$mnth.'</option>';
	echo '
		  </select>
		</div>
      </form>
	  <form name="selannee" method="POST" action="'.$adm_agenda3.$dupid.'">
        <input type="hidden" name="mois" value="'.$mois.'" />
	    <div style="float:right;">
	      <select class="form-control cal" style="width:76px;" name="annee" onchange="this.form.submit();">';
	foreach($dbannee as $an)
		echo '
	        <option value="'.$an.'"'.Selected($an == $annee).'>'.$an.'</option>';
	echo '
		  </select>
		</div>
		<div style="clear:both;"></div>
		<noscript>
		  <div style="text-align:center;max-height:22px;margin-top:4px;">'.SubmitButton($admin[519]).'</div>
		</noscript>
      </form>
	</td>
    <td>
      <a href="'.$adm_agenda3.'&amp;mois='.$mois_s.'&amp;annee='.$ann_s.$dupid.'" title="'.$mois_s.'-'.$ann_s.'">
	    <i class="fas fa-caret-right align-middle"></i>
	  </a>
    </td>
  </tr>';
}
else {
	echo '
    <td>
      <a href="'.$adm_agenda3.'&amp;mois='.$mois_p.'&amp;annee='.$ann_p.'" title="'.$ann_p.'-'.$mois_p.$dupid.'">
	    <i class="fas fa-caret-left align-middle"></i>
	  </a>
    </td>
    <td colspan="5">
	  <form name="selannee" method="POST" action="'.$adm_agenda3.$dupid.'">
        <input type="hidden" name="mois" value="'.$mois_p.'" />
	    <div style="float:left;">
	      <select class="form-control cal" style="width:76px;" name="annee" onchange="this.form.submit();">';
	foreach($dbannee as $an)
		echo '
	        <option value="'.$an.'"'.Selected($an == $annee).'>'.$an.'</option>';
	echo '
		  </select>
		</div>
	  <form name="selmois" method="POST" action="'.$adm_agenda3.$dupid.'">
        <input type="hidden" name="annee" value="'.$ann_p.'" />
	    <div style="float:right;">
	      <select class="form-control cal" style="width:112px;" name="mois" onchange="this.form.submit();">';
	foreach($moispays as $key=>$mnth)
		echo '
	        <option value="'.$key.'"'.Selected($key == $mois).'>'.$mnth.'</option>';
	echo '
		  </select>
		</div>
		<div style="clear:both;"></div>
		<noscript>
		  <div style="text-align:center;max-height:22px;margin-top:4px;">'.SubmitButton($admin[519]).'</div>
		</noscript>
      </form>
    </td>
    <td>
      <a href="'.$adm_agenda3.'&amp;mois='.$mois_s.'&amp;annee='.$ann_s.$dupid.'" title="'.$ann_s.'-'.$mois_s.'">
	    <i class="fas fa-caret-right align-middle"></i>
	  </a>
    </td>';
}
echo '
  <tr>';
for ($nbrejours = 1; $nbrejours < 8; $nbrejours++) {
	$couleurcal = $calendar[0];
	echo'
    <td class="cal0" style="text-align:center;"><b>'.$joursemaine[$nbrejours].'</b></td>';
}
echo '
  </tr>
  <tr>';
for ($i = 1; $i < $joursmois + $premierjour + $semainepays; $i++) {
	$a = $i - $premierjour + 1 - $semainepays;
	$jour = $i - $premierjour + 1 - $semainepays;
	if (strlen($a) == 0) {
		$a = "$a";
	}
	if ($i < $premierjour || $a == '') {
		if  (!($premierjour == 7 && $semainepays == 1)) {
			$textecal = '&nbsp;';
			echo '
    <td class="cal0" style="background-image:none">'.$textecal.'</td>';
		}
	}
	elseif ($jour > $nbjours) {
		$textecal = '&nbsp;';
		echo '
	<td class="cal0">'.$textecal.'</td>';   // jours vides
	} else {
		if ($a <10) {
			$a = '0'.$a;
		}
		if ($jour <10) {
			$jour = '0'.$jour;
		}
		$textecal = "$a";
		if (cal_ferie($jour, $mois, $annee)) {
			if (($mois == $mois_ci) && ($jourj == $a)) $stylecal = 'cal4';
			else $stylecal = 'cal3';
		} else {
			if (($jourj == $a)) {
				if (($i%7) == $semainepays) {
					if ($mois == $mois_ci) {
						$stylecal = 'cal4';
					} else {
						$stylecal = 'cal3';
					}
				} else {
					if ($mois == $mois_ci) {
						$stylecal = 'cal2';
					} else {
						$stylecal = 'cal1';
					}
				}
			} else {
				if (($i%7) == $semainepays) {
					$stylecal = 'cal3';
				} else {
					$stylecal = 'cal1';
				}
			}
		}
		if (($asite19[$l] == 'E1') || ($asite19[$l] == 'E2')) {
			$agdt = ('day='.$a.'&amp;mois='.$mois.'&amp;annee='.$annee);
		}
		if (($asite19[$l] == 'U1') || ($asite19[$l] == 'U2')) {
			$agdt = ('mois='.$mois.'&amp;day='.$a.'&amp;annee='.$annee);
		}
		if (($asite19[$l] == 'C1') || ($asite19[$l] == 'C2')) {
			$agdt = ('annee='.$annee.'&amp;mois='.$mois.'&amp;day='.$a);
		}
		$jagok    = '0';
		$dbworkag = ReadDBFields(DBAGENDA);
		for ($k = 0; $k < count($dbworkag); $k++) {
			switch ($asite19[$l]) {
			case 'U1' :
			case 'U2' :
				if ($dbworkag[$k][0] == $mois.'/'.$a.'/'.$annee || $dbworkag[$k][0] == $mois.'.'.$a.'.'.$annee) {
					$jagok = '1';
					$pgag  = $dbworkag[$k][4];
				}
				break;
			case 'C1' :
			case 'C2' :
				if ($dbworkag[$k][0] == $annee.'/'.$mois.'/'.$a || $dbworkag[$k][0] == $annee.'.'.$mois.'.'.$a) {
					$jagok = '1';
					$pgag  = $dbworkag[$k][4];
				}
				break;
			case 'E1' :
			case 'E2' :
				if ($dbworkag[$k][0] == $a.'/'.$mois.'/'.$annee || $dbworkag[$k][0] == $a.'.'.$mois.'.'.$annee) {
					$jagok = '1';
					$pgag  = $dbworkag[$k][4];
				}
			}
		}
		if ($jagok == '1') {
			if ($dup == 2) {
				echo'
      <td class="calevt"><span class="calevt"><a href="'.$adm_agenda2.'&amp;idn='.$pgag.'&amp;'.$agdt.'&amp;dup=2&amp;id='.$id.'">'.$textecal.'</a></span></td>';
			} else {
				echo '
      <td class="calevt"><span class="calevt"><a href="'.$adm_agenda1.'&amp;'.$agdt.'">'.$textecal.'</a></span></td>';
			}
		} elseif ($jagok != '1') {
			if ($dup == 2) {
				echo '
      <td class="'.$stylecal.'"><a href="'.$adm_agenda2.'&amp;'.$agdt.$dupid.'">'.$textecal.'</a></td>';
			} else {
				echo '
      <td class="'.$stylecal.'"><a href="'.$adm_agenda1.'&amp;'.$agdt.'">'.$textecal.'</a></td>';
			}
		}
	}
	if (($i%7) == 0) {
		echo '</tr><tr>';
	}
}
for ($i = $joursmois + $premierjour + $semainepays; $i < 43; $i++) {
	echo '
  <td class="cal0">'.(isset($joursemaine[$nbrejours]) ? $joursemaine[$nbrejours] : '').'</td>';
	if (($i%7) == 0 && $i != 42) {
		echo '
	</tr>
	<tr>';
	}
}
echo '
    </tr>
  </table>
  </div>
</div>';
?>
check_config.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/check_config.inc'
View Content
<?php
/*******************************************************************************
 *   Checking config is done
 *******************************************************************************
 *   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'], 'check_config.inc')) {
    header('location:../index.php');
    die();
}

echo '
<div id="note" class="bord notice" style="position:absolute; top:100px; left:50%; width:560px; margin-left:-280px; padding:0; z-index:100;">
  <div style="float:left; padding:20px;">
    <i class="gen-attention" title="'.$admin[993].' !!!"></i>
  </div>
  <div style="float:left; width:400px; padding:20px 0;">
    <p style="text-align:center; text-decoration:blink; font-weight:bold; font-size:2em;"> *** '.$admin[993].' *** </p>
    <hr />
    <p style="text-align:center; font-weight:bold; font-size:1.2em;"><br />'.$admin[1317].'</p>
  </div>
  <div style="clear:both;">
    <hr />
    <p style="text-align:right; padding:0 10px 5px ;">';
if ($site[3] != $realurl) {
	echo '
      <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config1" title="'.$admin[7].'">
        <i class="gen-config align-middle" title="'.$admin[7].'"></i>
      </a> &nbsp;';
}
echo '
    </p>
  </div>
</div>';
?>
check_confs.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/check_confs.inc'
View Content
<?php
/*******************************************************************************
 *   Checking config is done
 *******************************************************************************
 *   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'], 'check_confs.inc')) {
    header('location:../index.php');
    die();
}

function CreateStruct() {
    global $site, $serviz, $xposbox, $templates;
    $mettre = '
$site[4]  = stripslashes("'.$site[4].'");  // Nouvelles sur la page d\'accueil
$site[20] = stripslashes("'.$site[20].'"); // Messages Forum sur la page d\'accueil
// site[21] = stripslashes(""); // Inutilisé
$site[29] = stripslashes("'.$site[29].'"); // Hauteur en pixels des nouvelles en page d\'accueil
$site[33] = stripslashes("'.$site[33].'"); // Hauteur en pixels des billets en page d\'accueil
$site[34] = stripslashes("'.$site[34].'"); // Nombre de caractères des posts forum en page d\'accueil
$site[31] = stripslashes("'.$site[31].'"); // Blog sur la page d\'accueil

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

// Configurations accueil et pages secondaires';

    foreach(array(BOX_LEFT, BOX_CENTER, BOX_RIGHT) as $subarray) {
        $mettre .= "\n// \$xposbox[\"E\"][$subarray]";
        foreach ($xposbox[BOX_EDITO][$subarray] as $key=>$value) {
            $mettre .= '
$xposbox["'.BOX_EDITO.'"]["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
        }
        $mettre .= "\n";
    }

    $mettre .= "\n".'
// NE PAS SUPPRIMER $templates[0]';
    foreach ($templates as $keyconf=>$valueconf) {
        $mettre .= '
$templates['.$keyconf.'] = stripslashes("'.$valueconf.'");';
    }

    foreach ($templates as $keyconf=>$valueconf) {
        $mettre .= "\n".str_repeat('/', 20).' '.$valueconf.' '.str_repeat('/', 20);
        foreach (array(BOX_LEFT, BOX_RIGHT, BOX_ABOVE, BOX_UNDER) as $subarray) {
            $mettre .= "\n// \$xposbox[$valueconf][$subarray]";
            foreach ($xposbox[$keyconf][$subarray] as $key=>$value) {
                $mettre .= '
$xposbox['.$keyconf.']["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
            }
            $mettre .= "\n";
        }
        
        foreach (array(BOX_TOP, BOX_BOTTOM) as $array) {
            foreach(array(BOX_LEFT, BOX_CENTER, BOX_RIGHT) as $subarray) {
                $mettre .= "\n// \$xposbox[$valueconf][$array][$subarray]";
                foreach ($xposbox[$keyconf][$array][$subarray] as $key=>$value) {
                    $mettre .= '
$xposbox['.$keyconf.']["'.$array.'"]["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
                }
                $mettre .= "\n";
            }
        }
    }
    return $mettre."\n?>";
}

if (!is_file(CHEMIN.'skins/'.$pathconf.'/confweb'.INCEXT)) {
    $mettre = '<?php
if (stristr($_SERVER["SCRIPT_NAME"], "confweb.inc")) {
    header("location:../index.php");
    die();
}'.CreateStruct();

    WriteFullDB(CHEMIN.'skins/'.$pathconf.'/confweb'.INCEXT, $mettre);
}
    
?>
check_install.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/check_install.inc'
View Content
<?php
/*******************************************************************************
 *   Checking install dir
 *******************************************************************************
 *   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'], 'check_install.inc')) {
    header('location:../index.php');
    die();
}

if (1 != preg_match('!^[localhost]!', $site[3]) && 1 != preg_match('^[!127.0.0.1]!', $site[3])) {
    if (file_exists(CHECK_INSTALL)) {
        $date_chk = ReadCounter(CHECK_INSTALL);
    } else {
        $date_chk = '';
    }
    if ($date_chk != date('Y-m-d')) {
        SetChmod(CHECK_INSTALL);
        WriteCounter(CHECK_INSTALL, date('Y-m-d'));
        echo '
<div id="note" class="bord notice" style="position:absolute; top:100px; left:50%; width:560px; margin-left:-280px; padding:0; z-index:100;">
  <div style="float:left; padding:20px;">
    <i class="gen-attention" title="'.$admin[993].' !!!"></i>
  </div>
  <div style="float:left; width:400px; padding:20px 0;">
    <p style="text-align:center; text-decoration:blink; font-weight:bold; font-size:2em;"> *** '.$admin[993].' *** </p>
    <hr />
    <p style="text-align:center; font-weight:bold; font-size:1.2em;">'.$admin[992].'</p>
  </div>
  <div style="clear:both;">
    <hr />
    <p style="text-align:right; padding:0 10px 5px ;">
      <a href="'.CHEMIN.'install/delete.php?lng='.$lng.'" title="'.$admin[186].' '.$admin[1621].' '.$admin[182].' Install '.$admin[991].'">
        <i class="far fa-trash-alt align-middle"></i>
      </a> &nbsp;
      <a href="#" onclick="document.getElementById(\'note\').style.visibility = \'hidden\'" title="'.$admin[458].'">
        <i class="fadm-sup align-bottom"></i>
      </a>
    </p>
  </div>
</div>';
    }
}
?>
check_save.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/check_save.inc'
View Content
<?php
/*******************************************************************************
 *   Checking install dir
 *******************************************************************************
 *   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'], 'check_save.inc')) {
    header('location:../index.php');
    die();
}

if (1 != preg_match('!^[localhost]!', $site[3]) && 1 != preg_match('^[!127.0.0.1]!', $site[3])) {
    echo '
<div id="note" class="bord notice" style="position:absolute; top:100px; left:50%; width:600px; margin-left:-280px; padding:0; z-index:100;">
  <div style="float:left; padding:20px;">
    <i class="gen-attention" title="'.$admin[993].' !!!"></i>
  </div>
  <div style="float:left; width:440px; padding:20px 0;">
    <p style="text-align:center; text-decoration:blink; font-weight:bold; font-size:2em;"> *** '.$admin[993].' *** </p>
    <hr />
    <p style="text-align:center; font-weight:bold; font-size:1.2em;">'.$admin[1473].'</p>
  </div>
  <div style="clear:both;">
    <hr />
    <p style="text-align:right; padding:0 10px 5px ;">
      <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=upload&amp;rep=save" title="'.$admin[186].$admin[1252].'">
        <i class="far fa-trash-alt align-middle"></i>
      </a> &nbsp;
      <a href="#" onclick="document.getElementById(\'note\').style.visibility = \'hidden\'" title="'.$admin[458].'">
        <i class="fadm-sup align-bottom"></i>
      </a>
    </p>
  </div>
</div>';
}
?>
compte.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/compte.inc'
View Content
<?php
/*******************************************************************************
 *   Admin account member
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2024 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.19 (August 26, 2024) : correction Tohelp and date control 
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[10] == '') {
        $nomzone = $admin[816];
        include 'access.inc';
        exit();
    }
}

$edit  = import('edit');
$uuser = import('uuser');
$regit = import('regit');
if ($uuser == NULL) $uuser = 'old';
$erreur = '';

$err_pseudo = false;
$err_uid    = false;
$err_uid2   = false;
$err_uemail = false;
$err_uweb   = false;
$err_uimg   = false;
$err_uext   = false;
$err_uenreg    = false;
$err_ucnct  = false;
$err_urgpd  = false;
$ishttps    = 1 != preg_match('!^https!', $site[3]) ? false : true;
$preprot    = $ishttps ? 'https://' : 'http://';
// LOg 
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/compte'.'_'.$dateheureminiutesecl.'.log';

 //   file_put_contents(($nomficlog, 'debut regit: '.$regit."\n", FILE_APPEND | LOCK_EX);

// fin de log
if ($regit == 1) {
	$pseudok = true;
	$msg = '';
	if ($uuser == 'new') {
		$upseudo = KeepGoodChars(RemoveConnector(RemoveQuote(stripslashes(CutLongWord(import('upseudo'), $serviz[148])))));
		$edit    = $upseudo;
	}
	else $userdb = ReadDBFields(MSGREP.$edit.DBEXT);
	
	$ulang      = import('ulang');
	$uemail     = checkEmail(CutLongWord(import('uemail')));
	$ushow      = import('ushow');
	$usign      = WrapLongWords(stripslashes(import('usign')));
	$usign      = RemoveConnector(stripslashes($usign));
	$usign      = str_replace(chr(10), '<br />', $usign);
	$uuid       = import('uuid');
	$uuid2      = import('uuid2');
	$avatar     = import('avatar');
	$uwebsite   = import('uwebsite');
	$ueditor    = 'on';
	$uextavatar = import('uextavatar');
	
	//   file_put_contents(($nomficlog, 'Retour import avatar ext uextavatar : '.$uextavatar."\n", FILE_APPEND | LOCK_EX);
	
	$umailct    = import('umailct');
	$umpct      = import('umpct');
	$usendmail  = import('usendmail');
	$usendct    = import('usendct');
	$uusemp     = import('uusemp');
	$uctmail    = import('uctmail');
	$uprfmemb   = import('uprfmemb');
	$ulstmemb   = import('ulstmemb');
	$uavaext    = import('uavaext');
	$uimgext    = import('uimgext');
	$uenreg     = import('uenreg');
	$ucnct      = import('ucnct');
	$uredir     = import('uredir');
	$ustatus    = import('ustatus');
	$urgpd      = import('urgpd');

	$uwebsite   = empty($uwebsite) ? 'http://' : $uwebsite;
	$uextavatar = empty($uextavatar) ? $preprot : $uextavatar;
	 //   file_put_contents(($nomficlog, ' Regit à 1 uextavatar: '.$uextavatar."\n", FILE_APPEND | LOCK_EX);

	$err_pseudo = empty($edit) || mb_strtolower($edit) == 'admin' ? true: false;
    $err_uid    = ((empty($uuid) && $uuser == 'new') || (!empty($uuid) && !ctrlPasswordOK($uuid))) ? true: false;
	$err_uid   =  strlen($uuid) < 8  ? true: false;
	$err_uid2   = $uuid != $uuid2 ? true: false;
	$err_uemail = empty($uemail) ? true: false;
	$err_uweb   = 'http://' != $uwebsite && 'https://' != $uwebsite && 1 != preg_match('/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/', $uwebsite) ? true : false;
	$err_uext   = $avatar == 'ava-00' && 1 != preg_match('/(http|https|inc\/img\/avatars):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/', $uextavatar) ? true : false;
	$err_uext   = $err_uext && !IsImage(substr($uextavatar, -3));

	$err_urgpd    = false;
	$date_urgpd = '';
	if (strlen($urgpd) > 0)
	{
		if (preg_match ('`(\d{1,4})(\d{1,2})(\d{2})`',$urgpd, $array_jours))
		{
			if (!checkdate($array_jours[2],$array_jours[3],$array_jours[1]))					
			{
				$err_urgpd    = true;
				$date_urgpd = $array_jours[2].'/'.$array_jours[3].'/'.$array_jours[1];
			}
		}
		else
		{
			$err_urgpd    = true;
			$date_urgpd   = $admin[20];
		}
	}
	$err_uenreg    = false;
	$date_uenreg = '';
	if (strlen($uenreg) > 0)
	{
		if (preg_match ('`(\d{1,4})(\d{1,2})(\d{2})`',$uenreg, $array_jours))
		{
			if (!checkdate($array_jours[2],$array_jours[3],$array_jours[1]))					
			{
				$err_uenreg    = true;
				$date_uenreg = $array_jours[2].'/'.$array_jours[3].'/'.$array_jours[1];
			}
		}
		else
		{
			$err_uenreg    = true;
			$date_uenreg   = $admin[20];
		}
	}	
	$err_ucnct    = false;
	$date_ucnct = '';
	if (strlen($ucnct) > 0)
	{
		if (preg_match ('`(\d{1,4})(\d{1,2})(\d{2})`',$ucnct, $array_jours))
		{
			if (!checkdate($array_jours[2],$array_jours[3],$array_jours[1]))					
			{
				$err_ucnct    = true;
				$date_ucnct = $array_jours[2].'/'.$array_jours[3].'/'.$array_jours[1];
			}
		}
		else
		{
			$err_ucnct    = true;
			$date_ucnct   = $admin[20];
		}
	}
	
	$erreur .= $err_pseudo ? '<li>'.$admin[1588].'</li>': '';
	$erreur .= $err_uid ? '<li>'.$admin[1610].'</li>': '';
	$erreur .= $err_uid2 ? '<li>'.$admin[1611].'</li>': '';
	$erreur .= $err_uemail ? '<li>'.$admin[544].'</li>': '';
	$erreur .= $err_uweb ? '<li>'.$admin[1585].$admin[1622].$admin[1587].'</li>': '';
	$erreur .= $err_uext ? '<li>'.$admin[1585].$admin[1624].$admin[1587].'</li>': '';
	$erreur .= $err_urgpd ? '<li>'.$admin[1889].' date_urgpd: '.$date_urgpd.'</li>': '';
	$erreur .= $err_uenreg ? '<li>'.$admin[1890].' date_uenreg: '.$date_uenreg.'</li>': '';
	$erreur .= $err_ucnct ? '<li>'.$admin[1891].' date_ucnct: '.$date_ucnct.'</li>': '';
	
	$uwebsite   = $err_uweb ? 'http://' : $uwebsite;
	$uextavatar = $err_uext ? $preprot : $uextavatar;
	
    if (empty($erreur)) {
		$dbmail = array();
		$bad    = array('.', '..', 'index.php');
		$files  = scandir(MSGREP);
		$files  = array_diff($files, $bad);
		foreach ($files as $file) {
			if (is_file(MSGREP.$file) && substr($file, -3) == 'dtb') {
				$userdb = ReadDBFields(MSGREP.$file);
				if (basename($file) == $edit.DBEXT) {
					if ($uuser == 'new') {
						$pseudok = false;
						$msg     = $admin[1625];
						break;
					}
				} elseif (isset($userdb[1][3])) {
					$dbmail[] = $userdb[1][3];
				}
			}
		}
		if ($pseudok && in_array($uemail, $dbmail)) {
			$pseudok = false;
			$msg    .= ' - '.$admin[1626];
		}
		if ($pseudok) {
            $ishttps = 1 != preg_match('!^https!', $site[3]) ? false : true;
			if ($uextavatar != $preprot) {
                $imghttps = 1 != preg_match('!^https!', $uextavatar) ? false : true;
                $uextavatar = $ishttps && !$imghttps ? 'inc/img/avatars/'.basename($uextavatar) : $uextavatar;
                $avaexist   = $ishttps && !$imghttps ? CHEMIN.$uextavatar : $uextavatar;
                if (file_exists($avaexist)) {
                    list($wimg, $himg, $timg, $aimg) = getimagesize($uextavatar);
                    if ($wimg == 0 || $himg == 0 || $wimg > 64 || $himg > 64) {
                        $uextavatar = $preprot;
                        $msg       .= ' - '.$admin[1628];
                    }
                }
			}

			if (empty($msg)) {
				$apachepassword  = Md5Crypt::apache ($uuid, $salt ='');	
 /*               $cryptpass = crypt($uuid, '');
                $decrypt   = crypt($uuid, '');
*/
				$cryptpass = $apachepassword;
                $decrypt   = $apachepassword;
                if (is_file(CHEMIN.'data/config/.htpasswd')) {
                    $htpasswd = @file(CHEMIN.'data/config/.htpasswd');
                     if (count($htpasswd) > 0 )
					{
						$protoht  = trim($htpasswd[0]);
						if (!empty($protoht)) {
							$cryptpass = $protoht == '#:0-1-0' ? gy_crypt(CRYPT_KEY, $uuid) : $apachepassword;
							$decrypt   = $protoht == '#:0-1-0' ? $uuid : $apachepassword;
						}
					}
                }
				$userdb        = (is_file(MSGREP.$edit.DBEXT)) ? ReadDBFields(MSGREP.$edit.DBEXT) : array();
				$userdb[0][0]  = $uuser == 'new' || $uuid != '' ? md5($uuid) : $userdb[0][0];
				$userdb[0][1]  = $uuser == 'new' || $uuid != '' ? $apachepassword : (isset($userdb[0][1]) ? $userdb[0][1] : $userdb[0][0]);
				$userdb[1][0]  = '0';
				$userdb[1][1]  = $ulang;
				$userdb[1][2]  = trim($edit);
				$userdb[1][3]  = trim($uemail);
				$userdb[1][4]  = '';
				$userdb[1][5]  = $ulang;
				$userdb[1][6]  = $ushow;
				$userdb[1][7]  = $usign;
				$userdb[1][8]  = $uuser == 'new' || $uuid != '' ? md5($uuid) : $userdb[1][8];
				$userdb[1][9]  = trim($avatar);
				$userdb[1][10] = $uwebsite == 'https://' || $uwebsite == 'http://' ? '' : $uwebsite;
				$userdb[1][11] = '';
				$userdb[1][12] = $ueditor;
				if ($uuser == 'new') {
					$userdb[1][13] = 'on';
					$userdb[1][14] = GetCurrentDateTime();
					$userdb[1][15] = '';
				}
				else {
					$userdb[1][13] = $ustatus == 'off' ? $ustatus : ($ustatus == 'ok' ? 'on' : $userdb[1][13]);
					$userdb[1][14] = $uenreg;
					$userdb[1][15] = $ucnct;
				}
				$userdb[1][16] = $uextavatar == $preprot || $avatar != 'ava-00' || $uavaext == 'on' ? '' : $uextavatar;
				$userdb[1][17] = isset($userdb[1][17]) ? $userdb[1][17] : '';
				$userdb[1][18] = $uusemp;
				$userdb[1][19] = $uctmail;
				$userdb[1][20] = $uprfmemb;
				$userdb[1][21] = $ulstmemb;
				$userdb[1][22] = $uavaext;
				$userdb[1][23] = $uimgext;
				$userdb[1][24] = $umailct;
				$userdb[1][25] = $umpct;
				$userdb[1][26] = $usendmail;
				$userdb[1][27] = $usendct;
				$userdb[1][28] = $uuser == 'new' ? '' : $urgpd;
				$userdb[1][29] = '';
				$userdb[1][30] = $uredir;
				$userdb[1][31] = $uuser == 'new' ? 'ok' : (empty($userdb[1][31]) ? 'ok' : ($ustatus == '1' || $ustatus == '2' || $ustatus == 'ok' ? $ustatus : $userdb[1][31]));
				$userdb[0][0]  = $userdb[1][31] == 'ok' && $userdb[0][0] != $userdb[1][8] ? $userdb[1][8] : $userdb[0][0];
				
                if ($uuser == 'new' && $userprefs[1] == $serviz[31]) {
					$userdb[2][0] = $serviz[31].CONNECTOR.GetCurrentDateTime().CONNECTOR.'&nbsp; '.
					$admin[1629].' '.sprintf($admin[1630], stripslashes($site[($lang[0] == $lng ? 0 : 11)]), $edit).CONNECTOR.'new'.CONNECTOR.''.
						CONNECTOR.''.CONNECTOR.''.CONNECTOR.$serviz[43].CONNECTOR.substr($page[23], 4);
				}
                if ($uuser == 'new' && $userprefs[1] == $serviz[176]) {
					$userdb[2][0] = $serviz[176].CONNECTOR.GetCurrentDateTime().CONNECTOR.'&nbsp; '.
					$admin[1629].' '.sprintf($admin[1630], stripslashes($site[($lang[0] == $lng ? 0 : 11)]), $edit).CONNECTOR.'new'.CONNECTOR.''.
						CONNECTOR.''.CONNECTOR.''.CONNECTOR.$serviz[43].CONNECTOR.substr($page[23], 4);
				}
				
				WriteDBFields(MSGREP.$edit.DBEXT, $userdb);
                
                if ($edit == $userprefs[1]) {
                    $userdata = '';
                    for ($i = 1; $i < 32; $i++) {
                        $stri      = sprintf("%02d", $i - 1);
                        $strlen    = empty($userdb[1][$i]) ? '03' : sprintf("%02d", strlen($userdb[1][$i]));
                        $userdata .= $stri.$strlen.(empty($userdb[1][$i]) ? 'off' : $userdb[1][$i]);
                    }
                    
// avant                    $usertime = !empty($members[21]) ? intval($members[21]) : 157680000;
// avant                    $expires  = (is_file(CHEMIN.'admin/'.REDACREP.$edit.INCEXT) || $edit == $serviz[31] || $edit == $serviz[176]) ? 157680000 : $usertime;
// avant                   setcookie(USER_COOKIE, gy_crypt(CRYPT_KEY, $userdata), time() + $expires, '/', $_DOMAIN, $_SECURE);
					setcookie(USER_COOKIE, gy_crypt(CRYPT_KEY, $userdata), strtotime( '+365 days' ), '/', $_DOMAIN, $_SECURE);
                }
				
				if ($uuser == 'new') {
					$adrimg = $skn_logo != '' ? $skn_logo : CHEMIN.'img/'.mb_substr($page[4], mb_strpos($page[4], '|') + 1);
                    $tconf  = $serviz[172] == 'ALL' ? 0 : $serviz[172];
					while ('../' == substr($adrimg, 0, 3)) $adrimg = substr($adrimg, 3);
					$to    = $uemail.($supervision[11] == 'on' ? ' '.$user[1] : '');
					$sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[1631];
					$bodycorps  = '<div style="margin:auto;padding:8px;width:600px;border: solid 1px #000000;border-radius:4px;">';
					$bodycorps .= '<p style="text-align:center;"><img src="'.$site[3].$adrimg.'" style="max-width:600px;" /></p><hr />';
					$bodycorps .= '<p style="text-align:left;font:12pt Arial;">';
					$bodycorps .= $admin[1632].sprintf($admin[1633], $edit, stripslashes($site[($lang[0] == $lng ? 0 : 11)])).'<br /><br />';
					$bodycorps .= $admin[1013].' <b>'.$edit.'</b><br />'.$admin[1634].' : <b>'.$uuid.'</b><br /><br />';
					$bodycorps .= $admin[1635];
					$bodycorps .= '<a href="'.$site[3].($site['URLR'] == 'on'? $lng.'-'.$urlrw[3].'-4-'.$edit.'-'.$uuid.'-'.$tconf : 'connect.php?lng='.$lng.'&pseudo='.$edit.'&uid='.$uuid.'&tconfig='.$tconf).'">'.stripslashes($site[($lang[0] == $lng ? 0 : 11)]).'</a><br />';
					$bodycorps .= $admin[1760].'<br />'.$user[0].'<br />';
					$bodycorps .= '</p></div>';
					eMailHtmlTo($sujet, $bodycorps, $to);			
				} elseif (!empty($uuid)) {
					UpdateCollaboratorPass($edit, md5($uuid));
                    UpdateProtectMember($edit, $decrypt);
				}
			}
		}
	}
	if (!empty($msg)) {
		$erreur .= '<li>'.$msg.'</li>';
        echo BeginJavascript().'
alert("'.addslashes($msg).'");
'.EndJavascript();
    }
	if (empty($erreur)) {
        echo BeginJavascript().'
window.location = "'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=members&act=2";'.EndJavascript();
		exit();
	}
}

$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto = "";
    var erreur = false;
	var uweb = document.userprefnow.uwebsite.value;
	var uext = document.userprefnow.uextavatar.value;
    regexp = /^[^\.\s]+(\.[^\.\s]+)*@[^\.\s]+(\.[^\.\s]+)+$/;
    if (!regexp.test(document.userprefnow.uemail.value)) {
        sto += \'  - '.addslashes($admin[544]).'\n\';
		document.userprefnow.uemail.className = "errorInputText";
        erreur = true;
    }
	';
if ($uuser != 'new')
{
	$headinc .= '
	var uid = document.userprefnow.uuid.value;
	var uid2 = document.userprefnow.uuid2.value;

    if (uid != "") {
        regexp = /^\\S{8,40}$/;
        if (!regexp.test(uid)) {
            sto += \'  - '.addslashes($admin[1610]).'\n\';
			document.userprefnow.uuid.className = "errorInputText";
            erreur = true;
        }
    }
	if (uid != uid2) {
		sto += \'  - '.addslashes($admin[1611]).' !\n\';
		document.userprefnow.uuid.className = "errorInputText";
		document.userprefnow.uuid2.className = "errorInputText";
		erreur = true;
	}';
}
else
	$headinc .= '
    regexp = /^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/;
    if (!regexp.test(document.userprefnow.upseudo.value)) {
        sto += \'  - '.addslashes($admin[1588]).'\n\';
		document.userprefnow.upseudo.className = "errorInputText";
        erreur = true;
    }';
$headinc .= '
	regexp = /(http|https|inc/img/avatars):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
    if (uweb != "http://" && uweb != "https://" && !regexp.test(uweb)) {
        sto += \'  - '.addslashes($admin[1585].$admin[1622].$admin[1587]).'\n\';
		document.userprefnow.uwebsite.className = "errorInputText";
		document.userprefnow.uwebsite.value = "http://";
        erreur = true;
    }
    if (uext != "'.$preprot.'" && !regexp.test(uext)) {
        sto += \'  - '.addslashes($admin[1585].$admin[1624].$admin[1587]).'\n\';
		document.userprefnow.uextavatar.className = "errorInputText";
		document.userprefnow.uextavatar.value = "'.$preprot.'";
        erreur = true;
    }
    if (erreur == true) {
        sto = "'.addslashes($admin[1636]).'\n\n" + sto;
        alert(sto);
		return false;
    }
}'.EndJavascript();

$topmess = '
  <a href="admin.php?lng='.$lng.'">Admin</a> >&nbsp;
  <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2">'.$admin[696].'</a> > '.($uuser == 'new' ? $admin[1308] : $admin[498]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';

if ($uuser != 'new' && !FileDBExist(MSGREP.$edit.DBEXT)) {
    echo BeginJavascript().'
window.location = "'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=members&act=2";'.EndJavascript();
	exit();
} else {
	if ($uuser == 'new') {
		$userdb       = array();
		$userdb[0][0] = '';
		$userdb[1]    = array_pad(array(), 32, '');		
		$value_pseudo = ' value=""';
	} else {
		$userdb = ReadDBFields(MSGREP.$edit.DBEXT);
		$value_pseudo = ' value="'.$edit.'" readonly="readonly"';
	}
	htable($uuser == 'new' ? $admin[1308] : $admin[498].' - '.$edit, '100%');
	if (!empty($erreur))
		echo displayErrorMsg($admin[1636], $erreur);
	echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=978&mnuid=937&tconfig=0#z2').'</p>
<br />
<hr />
<style type="text/css">
.cmpt-password {
	font-size: 9px;
	text-transform: uppercase;
	position: absolute;
	cursor: pointer;
	margin: 6px 0 0 -26px;
}
</style>
<script text="javascript">
  $(document).ready(function(){
    $(".cmpt-password").click(function() {
        if($(this).prev("input").prop("type") == "password") {
            $(this).prev("input").prop("type","text");
            $(this).children("img").prop("title","'.$admin[1748].'");
        } else {
            $(this).prev("input").prop("type","password");
            $(this).children("img").prop("title","'.$admin[1747].'");
        }
    });
    $("#testuuid").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) {
        $("#uuid-strength").removeClass().addClass("alert alert-error").html("'.$help[21].'");
      } else if (strongRegex.test($(this).val())) {
        $("#uuid-strength").removeClass().addClass("alert alert-success").html("'.$help[22].'");
      } else if (mediumRegex.test($(this).val())) {
        $("#uuid-strength").removeClass().addClass("alert alert-info").html("'.$help[23].'");
      } else {
        $("#uuid-strength").removeClass().addClass("alert alert-error").html("'.$help[24].'");
      }
      return true;
    });
  });
</script>
<div class="w-100 m-auto" style="max-width:720px;">
  <form name="userprefnow" id="userprefnow" action="admin.php?lng='.$lng.'&amp;pg=compte" method="post" onsubmit="return VerifyForm(); return false;">
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">
        '.SubmitButton($admin[857].$admin[696], 'self.location.href=\'admin.php?lng='.$lng.'&pg=members&act=2\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
    <input type="hidden" name="regit" value="1" />';
	if ($uuser == 'new') {
		$mpass = GenerateUID();
		echo '
    <input type="hidden" name="uuser" value="new" />
    <input type="hidden" name="uuid" value="'.$mpass.'" />
    <input type="hidden" name="uuid2" value="'.$mpass.'" />';
	}
	else
		echo '
    <input type="hidden" name="edit" value="'.$edit.'" />';
	echo '
    <br />
  	<fieldset class="m-0 p-0" style="margin-top:-10px;">'.legend($admin[810]).'
      <div class="table-responsive-md">
      <table class="table m-auto mb-3 w-100">
		<tr>
		  <td style="width:65%;padding:4px 2px;"><label for="uusemp">&bull; '.sprintf($admin[1637], $edit).'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="uusemp" name="uusemp"'.Checked($userdb[1][18] == 'on').' /></td>
		</tr>
		<tr>
		  <td style="padding:4px 2px;"><label for="uctmail">&bull; '.sprintf($admin[1638], $edit).'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="uctmail" name="uctmail"'.Checked($userdb[1][19] == 'on').' /></td>
		</tr>
		<tr>
		  <td style="padding:4px 2px;"><label for="uprfmemb">&bull; '.sprintf($admin[1639], $edit).'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="uprfmemb" name="uprfmemb"'.Checked($userdb[1][20] == 'on').' /></td>
		</tr>
		<tr>
		  <td style="padding:4px 2px;"><label for="ulstmemb">&bull; '.sprintf($admin[1640], $edit).'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="ulstmemb" name="ulstmemb"'.Checked($userdb[1][21] == 'on').' /></td>
		</tr>
		<tr>
		  <td style="padding:4px 2px;"><label for="uavaext">&bull; '.$admin[1641].'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="uavaext" name="uavaext"'.Checked($userdb[1][22] == 'on').' /></td>
		</tr>
		<tr>
		  <td style="padding:2px;">&bull; '.$admin[195].'</td>
		  <td style="padding:2px;">
		    <select class="form-control" style="max-width: 160px;" name="ustatus">
			  <option value="">'.ucfirst($admin[1108]).'</option>
			  <option value="ok"'.Selected($userdb[1][31] == 'ok').'>'.$admin[1471].'</option>
              <option value="1"'.Selected($userdb[1][31] == '1').'>'.$admin[1302].'</option>
              <option value="2"'.Selected($userdb[1][31] == '2').'>'.$admin[1303].'</option>
			  <option value="off"'.Selected($userdb[1][13] == 'off').'>'.$admin[1472].'</option>
			</select>
		  </td>
		</tr>
      </table>
      </div>
      <br />
    </fieldset>
    <br />
  	<fieldset class="m-0 p-0" style="margin-top:-10px;">'.legend($admin[1644]).'
      <div class="table-responsive-md">
      <table class="table m-auto mb-3 w-100">
        <tr>
          <td class="w-55 align-middle">&bull; '.$admin[1013].'</td>
          <td><input type="text" class="w-90 form-control '.($err_pseudo ? 'errorInputText' : 'texte').'" name="upseudo" size="30"'.$value_pseudo.' /></td>
        </tr>';
	if ($uuser != 'new') 
		echo '
        <tr><td colspan="2" style="padding:4px;"><div class="" id="uuid-strength"></div></td></tr>
        <tr>
          <td class="w-55 align-middle">&bull; '.$admin[1634].' :</td>
          <td>
            <div class="d-inline-block testuid input-group mb-3 w-80">
              <input 
                id="testuid" 
                type="password" 
                class="form-control '.($err_uid ? 'errorInputText' : 'texte').' w-90 float-left" 
                name="uuid" 
                value="" 
              />
              <div id="testuid-eye" class="input-group-append c-pointer" style="padding-top:0.3rem;">
                <span class="input-group-text ml-n2" style="font-size:1.2rem;height:2.5rem;border:1px solid #000;border-radius:0 4px 4px 0;">
                  <i id="testuid-i" class="far fa-eye"></i>
                </span>
              </div>
            </div>
            <script>
              document.getElementById("testuid-eye").addEventListener("click", function(e){
                var pwd = document.getElementById("testuid");
                var eye = document.getElementById("testuid-i");
                if(pwd.getAttribute("type") == "password") {
                  pwd.setAttribute("type", "text");
                  eye.setAttribute("class", "far fa-eye-slash");
                } else {
                  pwd.setAttribute("type", "password");
                  eye.setAttribute("class", "far fa-eye");
                }
              });
            </script>
            <script>
              $(document).ready(function(){
                $(\'.popuserpwd\').popover({
                  title:"'.$admin[1634].'",
                  content:"'.$help[3].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <div class="d-inline-block ml-4 overpop">
              <a class="popuserpwd" title="'.$admin[1634].'">
                <i class="far fa-comment-dots"></i>
              </a>
            </div>
			<div style="clear:both"></div>
          </td>
        </tr>
        <tr>
          <td class="w-55 align-middle">&bull; '.$admin[1645].' :</td>
          <td>
            <div class="d-inline-block testuid input-group mb-3 w-80">
              <input 
                id="testuid2" 
                type="password" 
                class="form-control '.($err_uid2 ? 'errorInputText' : 'texte').' w-90 float-left" 
                name="uuid2" 
                value="" 
              />
              <div id="testuid2-eye" class="input-group-append c-pointer" style="padding-top:0.3rem;">
                <span class="input-group-text ml-n2" style="font-size:1.2rem;height:2.55rem;border:1px solid #000;border-radius:0 4px 4px 0;">
                  <i id="testuid2-i" class="far fa-eye"></i>
                </span>
              </div>
            </div>
            <script>
              document.getElementById("testuid2-eye").addEventListener("click", function(e){
                var pwd = document.getElementById("testuid2");
                var eye = document.getElementById("testuid2-i");
                if(pwd.getAttribute("type") == "password") {
                  pwd.setAttribute("type", "text");
                  eye.setAttribute("class", "far fa-eye-slash");
                } else {
                  pwd.setAttribute("type", "password");
                  eye.setAttribute("class", "far fa-eye");
                }
              });
            </script>
        </td>
        </tr>';
	echo '
        <tr>
          <td class="w-55 align-middle">&bull; '.$admin[1646].'</td>
          <td><input type="text" class="form-control w-90 '.($err_uemail ? 'errorInputText' : 'texte').'" name="uemail" size="40" value="'.$userdb[1][3].'" /></td>
        </tr>
        <tr>
          <td class="w-55 align-middle">&bull; '.$admin[1622].'</td>
          <td><input type="text" class="form-control w-90 '.($err_uweb ? 'errorInputText' : 'texte').'" name="uwebsite" size="40" value="'.(empty($userdb[1][10]) || $userdb[1][10] == 'user9' ? $preprot : $userdb[1][10]).'" /></td>
        </tr>
        <tr>
          <td class="w-55 align-middle">&bull; '.$admin[1647].'</td>
          <td><textarea class="form-control w-100" name="usign" rows="2">'.stripslashes($userdb[1][7] == 'user6' ? '' : $userdb[1][7]).'</textarea></td>
        </tr>
		<tr>
		  <td class="w-55 align-middle" style="padding:4px 2px;"><label for="ushow">&bull; '.$admin[1648].' :</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="ushow" name="ushow"'.Checked($userdb[1][6] == 'on').' /></td>
		</tr>';
	echo '
		<tr>
		  <td class="w-55 align-middle" style="padding:4px 2px;"><label for="umailct">&bull; '.$admin[1649].'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="umailct" name="umailct"'.Checked($userdb[1][24] == 'on').' /></td>
		</tr>
		<tr>
		  <td class="w-55 align-middle" style="padding:4px 2px;"><label for="umpct">&bull; '.$admin[1650].'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="umpct" name="umpct"'.Checked($userdb[1][25] == 'on').' /></td>
		</tr>
		<tr>
		  <td class="w-55 align-middle" style="padding:4px 2px;"><label for="usendmail">&bull; '.$admin[1651].'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="usendmail" name="usendmail"'.Checked($userdb[1][26] == 'on').' /></td>
		</tr>
		<tr>
		  <td class="w-55 align-middle" style="padding:4px 2px;"><label for="usendct">&bull; '.$admin[1652].'</label></td>
		  <td style="padding:4px 2px;"><input type="checkbox" id="usendct" name="usendct"'.Checked($userdb[1][27] == 'on').' /></td>
		</tr>
      </table>
      </div>
      <br />
    </fieldset>
    <br />
  	<fieldset class="m-0 p-0" style="margin-top:-10px;">'.legend($admin[1653]).'
      <div class="table-responsive-md">
      <table class="table m-auto mb-2 w-100">';
	if ($lang[1] != '') {
		echo '
        <tr>
          <td class="w-45 align-middle">&bull; '.$admin[947].'</td>
          <td>
            <select class="form-control w-100" style="max-width:70px;" name="ulang">
              <option value="'.$lang[0].'"'.Selected($userdb[1][1] == $lang[0]).'>'.$lang[0].'</option>
              <option value="'.$lang[1].'"'.Selected($userdb[1][1] == $lang[1]).'>'.$lang[1].'</option>
            </select>
          </td>
        </tr>';
	} else {
		echo '
        <input type="hidden" name="ulang" value="'.$lang[0].'" />';
	}
	echo '
        <tr>
          <td class="w-45 align-middle"><label for="uredir">&bull; '.$admin[1660].'</label></td>
          <td><input type="checkbox" id="uredir" name="uredir"'.Checked($userdb[1][30]).' /></td>
        </tr>
      </table>
      </div>
      <div class="table-responsive-md">
	  <table class="table m-auto mb-2 w-100">
        <tr>
          <td colspan="2" style="text-align:center;">';
	if ($page[23] != 'none') {
		echo '
            <fieldset class="m-0 p-0">'.legend($admin[1662]).'
			  <div style="max-height:420px;overflow:auto;">
                <div class="table-responsive-md">
                <table class="table m-auto w-60">
                  <tr>';
            @include CHEMIN.'inc/img/avatars/'.$page[23].'.inc';
            $nbrimgavatar = 0; $j = $imgavatars;
            for ($i = 1; $i < $imgavatars; $i++) {
                $ava  = substr('0'.(string)$i, -2);
                echo '
			        <td class="text-center">
                      <label for="'.$ava.'">
                        <i class="ava-'.$ava.'" title="'.$page[23].'-'.$ava.'"></i>
			            <div>
                          <input id="'.$ava.'" type="radio" value="ava-'.$ava.'" name="avatar"'.Checked($userdb[1][9] == 'ava-'.$ava).' />
                        </div>
                      </label>
			        </td>';
                $nbrimgavatar++; $j--;
                if ($nbrimgavatar == 7 && $j != 0) {
                    $nbrimgavatar = 0;
                    echo '
                  </tr>
		          <tr>
            ';
                }
            }
            $vid = 7 - $imgavatars%7 ;
            if ($vid != 7) {
                for ($i = 0; $i < $vid; $i++)
                    echo '
		            <td class="text-center">&nbsp;</td>';
            }
            echo '
                  </tr>
                </table>
                </div>
			  </div>';
		echo '
            </fieldset>
		    <div style="width:480px;text-align:center;margin:16px auto;">
		      <div class="d-inline-block float-left pt-3">
 		        <label>
                  <input type="radio" value="ava-00" name="avatar"'.Checked($userdb[1][9] == 'ava-00' || (!empty($userdb[1][16]) && $userdb[1][16] != $preprot)).' />
                  '.$admin[1624].' :
                </label>
		      </div>
		      <div class="d-inline-block float-left">
			    <input type="text" class="form-control '.($err_uext ? 'errorInputText' : 'texte').'" name="uextavatar" 
                  style="width:320px;" value="'.(empty($userdb[1][16]) ? $preprot : $userdb[1][16]).'" />
		      </div>
              <script>
                $(document).ready(function(){
                  $(\'.popavaext\').popover({
                    title:"'.$admin[1624].'",
                    content:"'.$help[8].'",
                    trigger:"hover",
                    placement:"auto",
                    html:true
                  });
                });
              </script>
              <div class="d-inline-block float-left overpop">&nbsp;
                <a class="popavaext" title="'.$admin[1624].'">
                  <i class="far fa-comment-dots"></i>
                </a>
              </div>
		    </div>
		    <div class="clearfix"></div>';
		if ($userdb[1][9] == 'ava-00' && !empty($userdb[1][16]))
			echo '
		    <div style="text-align:center;width:100%;margin:auto;">
		      <img src="'.$userdb[1][16].'" alt="" title="'.$edit.'" style="max-width:60px; max-height:60px;" />
		    </div>';
	}
	echo '
          </td>
        </tr>
      </table>
      </div>
    </fieldset>';
	if (!is_numeric($userdb[1][28])) $userdb[1][28] = '';
	if ($uuser != 'new')
		echo '
  	<fieldset class="m-0 mt-3 p-0">
      <div class="table-responsive-md">
	  <table class="table m-auto mb-4 w-100">
		<tr>
		  <td class="w-40 align-middle">'.$admin[1663].'</td>
		  <td class="w-20 align-middle"><b>'.(isset($userdb[1][15])? FormatDate($userdb[1][14]): '???').'</b></td>
		  <td class="w-40 align-middle"><input type="texte" class="form-control '.($err_uenreg ? 'errorInputText' : 'texte').'" name="uenreg" size="14" value="'.$userdb[1][14].'" /></td>
		</tr>
		<tr>
		  <td>'.$admin[1664].'</td>
		  <td><b>'.(isset($userdb[1][15])? FormatDate($userdb[1][15]): '???').'</b></td>
		  <td><input type="texte" class="form-control '.($err_ucnct ? 'errorInputText' : 'texte').'" name="ucnct" size="14" value="'.$userdb[1][15].'" /></td>
		</tr>
		<tr>
		  <td>'.$admin[1759].'</td>
		  <td><b>'.(isset($userdb[1][28])? FormatDate($userdb[1][28]): '???').'</b></td>
		  <td><input type="texte" class="form-control '.($err_urgpd ? 'errorInputText' : 'texte').'" name="urgpd" size="14" value="'.$userdb[1][28].'" /></td>
		</tr>
      </table>
      </div>
    </fieldset>
    ';
	echo '
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">
        '.SubmitButton($admin[857].$admin[696], 'self.location.href=\'admin.php?lng='.$lng.'&pg=members&act=2\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
config1.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config1.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Configuration
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

if (stristr($_SERVER["SCRIPT_NAME"], "config1.inc")) {
    header("location:../index.php");
    die();
}
// voir les lignes à partir de 180 pour Opcache
// Pour libérer et vider le cache voir à la fin du script

// FONCTIONS DE MISE EN PAGE /////////////////////////////////////////////////////////////////////////
function checkboxConfigGuppy($inputName, $inputValue, $libelle = '', $lang = 'fr', $flag = '', $readonly='') {
	if ($readonly != '') $readonly='disabled';
	return '
    <div class="row pt-2">
	  <div class="col-md-6 text-left py-2 px-4">'.
	    ($flag != '' ? '<i class="flg-'.$lang.'" title="'.$lang.'"></i>' : '').'<label for="'.$inputName.'">'.$libelle.'</label>
	  </div>
	  <div class="col-md-6 text-left py-2 px-4">
	    <input type="checkbox" name="'.$inputName.'" id="'.$inputName.'" '.$readonly.' '.Checked($inputValue).' />
      </div>
	</div>
    ';
}

function inputConfigGuppy($inputName, $inputValue, $width, $libelle = '', $lang = 'fr', $flag = '', $readonly='') {
	global $charset;
    $btnlabel = ($inputName == 'siteMF' || $inputName == 'siteMD');
	if ($readonly != '') $readonly='disabled';
	return '
    <div class="row">
	  <div class="col-md-'.($btnlabel ? '8' : '6').' text-left pt-3">'.$libelle.'</div>
	  <div class="col-md-'.($btnlabel ? '4' : '6').' text-left">
        '.($flag != '' ? '<div class="d-inline-block m-0 px-0"><i class="flg-'.$lang.' mt-2" title="'.$lang.'"></i></div>' : '').'
	    <div class="d-inline-block w-88">
          <input class="form-control texte'.($btnlabel ? ' w-40' : ' w-100').'" type="text" name="'.$inputName.'" id="'.$inputName.'" '.$readonly.'
            style="max-width: '.$width.';" value="'.htmlentities($inputValue, ENT_QUOTES, $charset).'" />
        </div>
	  </div>
	</div>';
}

function inputURLConfigGuppy($inputName, $inputValue, $width, $libelle = '', $lang = 'fr', $flag = '') {
    global $realurl, $lng, $admin, $charset;
    if ($realurl == $inputValue) {
        $msg = '';
    } else {
        $msg = $admin[919].'
	<span style="font-weight:bold;">'.$realurl.'</span>
    <a href="admin.php?lng='.$lng.'&amp;pg=config1&amp;replace='.$inputName.'" title="'.$admin[920].'">&nbsp;
      <i class="fas fa-external-link-square-alt c-pointer text-danger align-middle" style="font-size: 1.8rem;" title="'.$admin[920].'"></i>
    </a>';
    }
	return '
    <div class="row mt-3">
      <div class="col-md-6 text-left pt-3">
        '.($flag != '' ? '<i class="flg-'.$lang.'" title="'.$lang.'"></i>' : '').$libelle.'
	  </div>
	  <div class="col-md-6 text-left">
	    <input class="form-control texte" type="text" name="'.$inputName.'" id="'.$inputName.'" value="'.htmlentities($inputValue, ENT_QUOTES, $charset).'" 
          style="max-width:'.$width.';" />
	  </div>
    </div>'.($msg == '' ? '' : '<div class="text-center bg-yellow text-danger mx-1 py-2">'.$msg.'</div>');
}

function textareaConfigGuppy($textareaName, $textareaValue, $width, $height, $libelle = '', $lang = 'fr', $flag = '') {
	return '
    <div class="row">
	  <div class="col-md-6 text-left pl-3 pt-2">'.
	    ($flag != '' ? '<i class="flg-'.$lang.'" title="'.$lang.'"></i>' : '').$libelle.'
	  </div>
	  <div class="col-md-6 text-left">
	    <textarea name="'.$textareaName.'" id="'.$textareaName.'" 
          class="form-control align-middle w-100" style="max-width:'.$width.';height:'.$height.';margin:4px 5px 0 0;" rows="6" cols="30">
          '.$textareaValue.'
        </textarea>
	  </div>
	</div>
	';
}

function selectConfigGuppy($selectName,$options,$optionsValueSelect = '',$libelle = '', $lang = 'fr', $flag = '', $top = 0, $left = 0) {
	global $charset;
	$out = '
    <div class="row mt-1">
      <div class="col-md-6 text-left pt-3"'.($left > 0 ? ' style="padding-left:'.$left.'px;"' : '').'>
        '.($flag != '' ? '<i class="flg-'.$lang.'" title="'.$lang.'"></i>' : '').$libelle.'
      </div>
	  <div class="col-md-6 text-left">
	    <select class="form-control w-80" id="'.$selectName.'" name="'.$selectName.'" size="1">';
	foreach($options as $optionsName => $optionsValue) {
		$optionsName = strip_tags(str_replace("<!--", "", str_replace("-->", " ", $optionsName)));
		$out .= '
		  <option value="'.htmlentities($optionsValue, ENT_QUOTES, $charset).'" '.Selected($optionsValueSelect == stripslashes($optionsValue)).'>
            '.stripslashes($optionsName).'
          </option>';
	}
	return $out.'
	    </select>
	  </div>
	</div>';
}

//////////////////////////////////////////////////////////////////////////////////////////////////////

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[0] == '') {
        $nomzone = $admin[7];
        include 'access.inc';
        exit();
    }
}

$proto   = is_ssl() ? 'https://' : 'http://';
$realurl = $proto.str_replace("/admin","/",$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])); //real site url

function checkURL($actual) {
    global $realurl;
    if (empty($actual)) {
        /// URL vide => on change
        return $realurl;
    }
    $actual .= '/' != $actual[strlen($actual) - 1] ? '/' : '';
    if ($realurl == $actual) {
        return $actual;
    } else {
        if (strpos($realurl, 'http://localhost/') !== 0
        and
           (strpos($actual, 'http://127.0.0.1/') === 0
        or  strpos($actual, 'http://localhost/') === 0))
        {   /// Le site n'est pas en local, mais l'url est restée en local => on change
            return $realurl;
        } else {
            return $actual;
        }
    }
}

function replaceURLart() {
    global $type, $fileid, $status, $creadate, $moddate, $author, $email,
        $fielda1, $fielda2, $fieldb1, $fieldb2, $fieldc1, $fieldc2, $fieldd1, $fieldd2,
        $fieldweb, $fieldmail, $fieldmod;
	global $lang, $urlrw;
	$dbw = ReadDBFields(DBOPTMENU);
	foreach($dbw as $opt) {
		ReadDoc($opt[4]);
		if ($fieldc1 == '_SELF') {
			$urls    = explode('||', $fieldd1);
			$id      = substr($urls[0], strpos($urls[0], 'pg=') + 3);
			$pos     = strpos($id, '&');
			$id      = $pos === false ? $id : substr($id, 0, $pos);
            $afld    = explode('|', $fieldmail);
			$fielda1 = addslashes($fielda1);
			$fielda2 = addslashes($fielda2);
			$fieldb1 = addslashes($fieldb1);
			$fieldb2 = addslashes($fieldb2);
			$fieldd1 = 'articles.php?lng='.$lang[0].'&pg='.$id.'&mnuid='.$opt[5].'&tconfig='.$afld[0].'||'.$lang[0].'-'.$urlrw[20].'-103-'.$id.'-'.$opt[5].'-'.$afld[0];
			$fieldd2 = 'articles.php?lng='.$lang[1].'&pg='.$id.'&mnuid='.$opt[5].'&tconfig='.$afld[0].'||'.$lang[1].'-'.$urlrw[20].'-103-'.$id.'-'.$opt[5].'-'.$afld[0];
			WriteDoc();
			UpdateDocdates('mod', $opt[4]);
		}
	}
}

$regit = import('regit');
include CONFIG;

$valeuropcacheforce = '';
$site[7] = '';
$mrsite8 = $site[8];
if (function_exists('opcache_get_configuration')) // si OPcache est actif
{
/*
// Appel du tableau des configurations OPcache enregistrées dans php.ini
	$mropcacheconfiguration = opcache_get_configuration();
	echo '<br />';
	var_dump($mropcacheconfiguration); // Affichage du tableau
	echo '<br />';
	echo 'Dans constantes.php Opcachedisable pour les disques 1 pour oui, 0 pour enable?: '.OPCACHEDISABLE.'<br />';
	echo 'Dans constantes.php Opcachetempo en seconde: '.OPCACHETEMPOSECONDE.'<br />';
	echo 'Dans constantes.php Mise en place des Ini_set pour oui Disable 1/Enable =>0 : '.OPCACHEINISET.'<br />';
	// Affichage de la valeur activation de opcache 1 pour enable
	echo 'opcache enable: '.$mropcacheconfiguration["directives"]["opcache.enable"].'<br />';
	// Affichage de la fréquence ou temporisation
	echo 'opcache Frequence temp defini dans php.ini: '.$mropcacheconfiguration["directives"]["opcache.revalidate_freq"].'<br />';
	// Version de Php
	echo 'opcache version: '.$mropcacheconfiguration["version"]["version"].'<br />';
*/
	if (OPCACHEDISABLE == 1) // si opcache 
	{
		if (OPCACHEINISET == 1) // Gestion des options caches enable/disable
		{	
			if (ini_get('opcache.enable') == 1) 
			{
				ini_set('opcache.enable', '0');
//				echo ' OPcache désactivé fait<br />';
			}
		}
			$site[7] = $valeuropcacheforce = 'on';
			// Appel du tableau des configurations OPcache enregistrées dans php.ini
			$mropcacheconfiguration = opcache_get_configuration();
			if (($site[8] == '') || ($site[8] == ' ') || ($site[8] < $mropcacheconfiguration["directives"]["opcache.revalidate_freq"])
				|| ($mropcacheconfiguration["directives"]["opcache.revalidate_freq"] > OPCACHETEMPOSECONDE))
			{
				$mropcacheconfiguration["directives"]["opcache.revalidate_freq"] = OPCACHETEMPOSECONDE;
				$mrsite8 = $site[8] = $mropcacheconfiguration["directives"]["opcache.revalidate_freq"];
		// initialisation de la temporisation à de la variable déclarée dans constantes.php
			ini_set('opcache.revalidate_freq', OPCACHETEMPOSECONDE);
			}
	}
}
// Fin pour OPcache

$siteMD = substr(sprintf('%o', fileperms(CHEMIN.'admin')), -4);
$siteMF = substr(sprintf('%o', fileperms(CHEMIN.'admin/admin.php')), -4);

$keyfile   = CHEMIN.'data/config/securekey.dtb';
$securekey = is_file($keyfile) ? ReadFullDB($keyfile) : 'qO_83;pwY9';

if ($regit == 1) {
	$ctrl1 = '';
	foreach($urlrw as $st) $ctrl1 .= $st;
	$old_u20 = $urlrw[20];
	
	$site[0] = import('site0'); // Titre du site pour l'Editorial langue principale
	$site[1] = trim(RemoveBR(import('site1'))); // Meta Description du site
	$site[2] = trim(RemoveBR(import('site2'))); // Meta Mots-clés du site
	$site[3] = checkURL(import('site3'));
	$site[6] = import('site6'); // Hébergement derière un proxy
	$site[7] = import('site7'); // Hébergement avec mise en cache
// force a enable si opcache est activé
    $site[7] = $valeuropcacheforce;
	$site[8] = max(2, import('site8')); // Temporisation en s de lecture du cache
	$site[9] = RemoveQuote(import('site9')); // Meta Auteur du site	
	$site[11] = addslashes(import('site11')); // Titre du site pour l'Editorial langue secondaire
	$site190  = import('site190'); // Format Dates langue 0
	$site191  = import('site191'); // Format Dates langue 1
	$site[19] = $site190.'|'.$site191; // Format Dates
	$site[22] = import('site22'); // Format Heure
	$site[23] = import('site23'); // Séparateur Date & Heure
	$site[24] = import('site24'); // Logo Copyright
	$site[25] = import('site25'); // Position Logo Copyright
	$site[26] = import('site26'); // Compression des Pages
	$site[35] = import('site35'); // Style de Copyright
	$site['TZ'] = import('siteTZ'); // Fuseau horaire
	$site['URLR'] = import('siteURLR'); // URL rewriting
	$site['MD'] = substr('0000'.import('siteMD', 'POST', true, $siteMD), -4); // Mode préconisé pour les dossiers
	$site['MF'] = substr('0000'.import('siteMF', 'POST', true, $siteMF), -4); // Mode préconisé pour les fichiers

	$urlrw[0] = import('urlrw0'); // Accueil / Admin / Error
	$urlrw[1] = import('urlrw1'); // Blog
	$urlrw[2] = import('urlrw2'); // Contact
	$urlrw[3] = import('urlrw3'); // Connexion / Compte
	$urlrw[4] = import('urlrw4'); // FAQ
	$urlrw[5] = import('urlrw5'); // Forum
	$urlrw[6] = import('urlrw6'); // Liens
	$urlrw[7] = import('urlrw7'); // Livre d'or
	$urlrw[8] = import('urlrw8'); // Nouvelles
	$urlrw[9] = import('urlrw9'); // Photos
	$urlrw[11] = import('urlrw11'); // Téléchargements
	$urlrw[12] = import('urlrw12'); // Recherches
	$urlrw[13] = import('urlrw13'); // Messages privés
	$urlrw[14] = import('urlrw14'); // Mesages publics
	$urlrw[15] = import('urlrw15'); // Utilisateurs
	$urlrw[17] = import('urlrw17'); // Calendrier / Agenda
	$urlrw[18] = import('urlrw18'); // Lettre d'information
	$urlrw[19] = import('urlrw19'); // Documents RSS
	$urlrw[20] = import('urlrw20'); // Articles
	
	$ctrl2 = '';
	foreach($urlrw as $st) $ctrl2 .= $st;
	
	$lang[0] = import('lang0'); // Langue principale du site
	$lang[1] = import('lang1'); // Deuxième langue du site
	$user[0] = import('user0'); // Webmaster
    $user[0] = KeepGoodChars(RemoveConnector(RemoveQuote(stripslashes(CutLongWord($user[0], $serviz[148])))));
	$user[1] = import('user1'); // e-mail du responsable du site
	$user[3] = import('user3'); // formulaire mail PHP  ON / OFF
	
	include 'inc/confupdt.inc';
	if ($lng != $lang[0] && $lng != $lang[1]) {
  		$lng = $lang[0];
	}
 /*

  Si la variable $site[3] contenant l'url du site
   Modification ds fichiers dans data/config rgpd/js et rgpd.inc
   
*/
	include CONFIGREP.'rgpd.inc';

	if ($serviz[177] == '') $pgmentionslegales = '17';
	else
	 $pgmentionslegales = $serviz[177]; 	
     $rgpd["privacyUrl"] = !empty($rgpd["privacyUrl"]) ? str_replace(SITE3, '', trim($rgpd["privacyUrl"])) : 'articles.php?lng='.$lng.'&pg='.$pgmentionslegales;
/**
 * Code à enregistrer dans le fichier rgpd.js
 */
	$mettre = '
<script type="text/javascript">
    tarteaucitron.init({
      "privacyUrl": "'.$rgpd["privacyUrl"].'", /* Privacy policy url */

      "hashtag": "'.$rgpd["hashtag"].'", /* Open the panel with this hashtag */
      "cookieName": "'.$rgpd["cookieName"].'", /* Cookie name */

      "orientation": "'.$rgpd["orientation"].'", /* Banner position (top - bottom) */
   
      "groupServices": '.$rgpd["groupServices"].', /* Group services by category */
                       
      "showAlertSmall": false, /* Show the small banner on bottom right */
      "cookieslist": false, /* Show the cookie list */
                       
      "closePopup": false, /* Show a close X on the banner */

      "showIcon": '.$rgpd["showIcon"].', /* Show cookie icon to manage cookies */
      "iconSrc": "'.(!empty($rgpd["iconSrc"]) && !preg_match('`^http(s)?\:`', $rgpd["iconSrc"]) ? SITE3.$rgpd["iconSrc"] : $rgpd["iconSrc"]).'", /* Optionnal: URL image */
      "iconPosition": "'.$rgpd["iconPosition"].'", /* BottomRight, BottomLeft, TopRight and TopLeft */

      "adblocker": false, /* Show a Warning if an adblocker is detected */
                       
      "DenyAllCta" : '.$rgpd["DenyAllCta"].', /* Show the deny all button */
      "AcceptAllCta" : '.$rgpd["AcceptAllCta"].', /* Show the accept all button when highPrivacy on */
      "highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */
                       
      "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */

      "removeCredit": false, /* Remove credit link */
      "moreInfoLink": true, /* Show more info link */

      "useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
      "useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */

      //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
                      
      "readmoreLink": "", /* Change the default readmore link */

      "mandatory": true, /* Show a message about mandatory cookies */
    });
	
	'.$rgpd["servicesCode"].'
	
</script>';
	//
	
	WriteFullDB(CONFIGREP.'rgpd.js', $mettre);
	
	/**
	 * Code à enregistrer dans le fichier rgpd.inc
	 */	
	$rgpd_values = '<?php
$rgpd = array(	
      "privacyUrl" => stripslashes("'.addslashes($rgpd["privacyUrl"]).'"), /* Privacy policy url */

      "hashtag" => stripslashes("'.addslashes($rgpd["hashtag"]).'"), /* Open the panel with this hashtag */
      "cookieName" => stripslashes("'.addslashes($rgpd["cookieName"]).'"), /* Cookie name */

      "orientation" => "'.$rgpd["orientation"].'", /* Banner position (top - bottom) */
   
      "groupServices" => '.$rgpd["groupServices"].', /* Group services by category */
                       
      "showAlertSmall" => false, /* Show the small banner on bottom right */
      "cookieslist" => false, /* Show the cookie list */
                       
      "closePopup" => false, /* Show a close X on the banner */

      "showIcon" => '.$rgpd["showIcon"].', /* Show cookie icon to manage cookies */
      "iconSrc" => stripslashes("'.addslashes($rgpd["iconSrc"]).'"), /* Optionnal: URL image */
      "iconPosition" => "'.$rgpd["iconPosition"].'", /* BottomRight, BottomLeft, TopRight and TopLeft */

      "adblocker" => false, /* Show a Warning if an adblocker is detected */
                       
      "DenyAllCta"  => '.$rgpd["DenyAllCta"].', /* Show the deny all button */
      "AcceptAllCta"  => '.$rgpd["AcceptAllCta"].', /* Show the accept all button when highPrivacy on */
      "highPrivacy" => true, /* HIGHLY RECOMMANDED Disable auto consent */
                       
      "handleBrowserDNTRequest" => false, /* If Do Not Track == 1, disallow all */

      "removeCredit" => false, /* Remove credit link */
      "moreInfoLink" => true, /* Show more info link */

      "useExternalCss" => false, /* If false, the tarteaucitron.css file will be loaded */
      "useExternalJs" => false, /* If false, the tarteaucitron.js file will be loaded */

      //"cookieDomain" => ".my-multisite-domaine.fr", /* Shared cookie for multisite */
                      
      "readmoreLink" => "", /* Change the default readmore link */

      "mandatory" => true, /* Show a message about mandatory cookies */
	  
	  "servicesCode" => stripslashes("'.addslashes($rgpd["servicesCode"]).'"),   /* Declaration of services for rgpd */
);
	
?>';
	//
	WriteFullDB(CONFIGREP.'rgpd.inc', $rgpd_values);
// fin de mise à jour rgpd.inc et rgps.js
	
	if ($ctrl1 != $ctrl2) setURLrewriting('');
	setURLrewriting($site['URLR']); // active/désactive l'URL rewriting
	if ($old_u20 != $urlrw[20]) replaceURLart();
    
    $keysecure = import('securekey');
    if (!empty($keysecure) && $keysecure != $securekey) {
        WriteFullDB($keyfile, $keysecure);
        setcookie(USER_COOKIE, '');
        setcookie(CNCT_COOKIE, '');
        setcookie('GuppYCrypt', '');
        $location = CHEMIN.($site['URLR'] == 'on'? $lng.'-'.$urlrw[0]: 'index.php?lng='.$lng.'&securekey=on');
        echo BeginJavascript().'
setTimeout(\'window.location="'.$location.'"\', 1000);'
.EndJavascript();
        exit();
    }
    
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $mrsite8);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config1";'.EndJavascript();
    }
} else {
    $site[3] = checkURL($site[3]);
    if ('site3' == $replace) {
        $site[3] = $realurl;
    }
    include 'inc/confupdt.inc';
}

$adm = array($admin[1322], $admin[780], $admin[1323], $admin[1324], $admin[207], $admin[164], $admin[75], 
             $admin[76], $admin[72], $admin[74], '', $admin[73], $admin[1325], $admin[1326], $admin[1327],
			 $admin[1328], '', $admin[1330], $admin[1331], $admin[1332], $admin[1333]);

$err_user0 = empty($user[0]) && $regit == 1;
$err_user1 = (empty($user[1]) || 1 != preg_match('/^[^\.\s]+(\.[^\.\s]+)*@[^\.\s]+(\.[^\.\s]+)+$/', $user[1])) && $regit == 1;
for ($i = 0; $i < count($urlrw); $i++) {
    if (!empty($adm[$i])) $err_urlrw[$i] = (empty($urlrw[$i]) || 1 != preg_match('/^[a-zA-Z0-9_-]{3,32}$/', $urlrw[$i])) && $regit == 1;
}
$erreur    = '';
$erreur   .= $err_user0 ? '<li>'.$admin[1585].$admin[63].$admin[1586].'</li>': '';
$erreur   .= $err_user1 ? '<li>'.$admin[1585].$admin[64].$admin[1587].'</li>': '';
if ($site['URLR'] == 'on') {
	for ($i = 0; $i < count($urlrw); $i++) {
		if (!empty($adm[$i])) $erreur .= $err_urlrw[$i] ? '<li>'.$admin[1585].$adm[$i].$admin[1587].'</li>': '';
	}
}
$activateItem = 4;
$activateItem = $err_user0 || $err_user1 ? 6 : $activateItem;
if ($site['URLR'] == 'on') {
	for ($i = 0; $i < count($urlrw); $i++) {
		if (@$err_urlrw[$i]) {
			$activateItem = 5;
			break;
		}
	}
}

$langue  = array();
$dossier = opendir(CHEMIN.'inc/lang/');
while ($fichier = readdir($dossier)) {
	if (is_file(CHEMIN."inc/lang/".$fichier)) {
  		$basefic = basename($fichier);
  		$path_parts = substr($basefic,strrpos($basefic,".")+1);
  		if ($path_parts == "inc") {
    		if (strpos($basefic, "-web") !== false) {
      			$langue[] = substr($basefic,0,strlen($basefic)-8);
    		}
  		}
	}
}
closedir($dossier);
@sort($langue);

if (is_file ($meskin.'confskin.inc')) {
    include $meskin.'confskin.inc';
} else {
    include CHEMIN.'skins/no_skin/confskin.inc';
}

$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
    if (document.conf1.user0.value == "") {
        sto += "  - '.addslashes($admin[1585].$admin[63].$admin[1586]).'\n";
		document.conf1.user0.className = "errorInputText";
        erreur = true;
    } else {
        regexp = /^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/;
        if (!regexp.test(document.conf1.user0.value)) {
            sto += "  - '.str_replace('"', '\"', stripslashes($admin[1588])).'\n";
            document.conf1.user0.className = "errorInputText";
            erreur = true;
        }
    }
    if (document.conf1.siteMD.value == "") {
        sto += "  - '.addslashes($admin[1585].$admin[1453].$admin[1586]).'\n";
		document.conf1.siteMD.className = "errorInputText";
        erreur = true;
    }
    if (document.conf1.siteMF.value == "") {
        sto += "  - '.addslashes($admin[1585].$admin[1454].$admin[1586]).'\n";
		document.conf1.siteMF.className = "errorInputText";
        erreur = true;
    }
    regexp = /^[^\.\s]+(\.[^\.\s]+)*@[^\.\s]+(\.[^\.\s]+)+$/;
    if (!regexp.test(document.conf1.user1.value)) {
		sto += \'  - '.addslashes($admin[1585].$admin[64].$admin[1587]).'\n\';
		document.conf1.user1.className = "errorInputText";
        erreur = true;
    }';
for ($i = 0; $i < count($urlrw); $i++) {	
	$headinc .= '
	if (document.conf1.siteURLR.checked == true) {
		regexp = /^[-a-zA-Z0-9_]{3,32}$/;
		if (!regexp.test(document.conf1.urlrw'.$i.'.value)) {
			sto += "  - '.addslashes($admin[1585].$adm[$i].$admin[1587]).'\n";
			document.conf1.urlrw'.$i.'.className = "errorInputText";
			erreur = true;
		}
	}';
}
$headinc .= '
    if (erreur == true) {
        sto = "'.addslashes($admin[1589]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}
function setMD(md) {
    document.conf1.siteMD.value = md;
    return false;
}
function setMF(mf) {
    document.conf1.siteMF.value = mf;
    return false;
}
function generate() {
    var chars = new Array( "abcdefghijklmnopqrstuvwxyz".split(""), 
                           "abcdefghijklmnopqrstuvwxyz".toUpperCase().split(""), 
                           "0123456789".split(""), 
                           "!#$%&()*+,-./:;<=>?@[]^_{}".split(""));
    var level = 4;
    var long = 10;
 
    var rep = new Array();
    myrand = new Date().getMilliseconds();
 
    while(level > 1) { 
        templong = Math.ceil(Math.random(myrand)*(long-(--level)));
        rep.push(templong);
        long = long-templong;
	}
	rep.push(long);
    var password = new Array();
    var i = -1;
    while(rep[++i]) {
        BaseL = chars[i].length;
        j = -1;
        while ((j++ < rep[i] - 1) && (password.push (chars[i][Math.floor(Math.random(Math.pow(new Date().getMilliseconds(),3))*BaseL)]))){}
	}
    document.getElementById("securekey").value = password.sort(sortRand).reverse().sort(sortRand).sort(sortRand).reverse().join("");
}
function sortRand() { return (Math.round(Math.random(myrand))-0.5); }
'.EndJavascript();

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[46]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[46], "100%");
if (!empty($erreur))
	echo displayErrorMsg($admin[1589], $erreur);
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=952&mnuid=937&tconfig=0#z2').$admin[47].'<br /><br />'. $admin[318].'</p>
<hr style="margin-top:15px;" />
<form name="conf1" id="config1" action="admin.php?lng='.$lng.'&amp;pg=config1" method="post" onsubmit="return VerifyForm(); return false;">
  <input type="hidden" name="regit" value="1" />
  <div class="conf1" style="margin-right:auto;margin-left:auto;width:auto;">';
echo '
    <div class="m-auto" id="accordion" style="max-width:580px;">
    <div class="row quest p-0 mb-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>';
// OPTIMISATION VITESSE
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse1">'.$admin[506].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse1">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            '.checkboxConfigGuppy('site26', $site[26], '&bull;&nbsp;'.$admin[505]).'
          </div>
        </div>
      </div>';
// FUSEAU HORAIRE
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse2">'.mb_strtoupper($admin[935]).'</a>
        <div class="collapse" data-parent="#accordion" id="collapse2">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="row">
                <div class="col-md-6 pt-3 pl-4">&bull;&nbsp;'.$admin[936].'</div>
                <div class="col-md-6">'.SelectTimeZone($site['TZ'], 'siteTZ', 'siteTZ', 16).'</div>
            </div>
          </div>
        </div>
      </div>';
// CLE DE SECURITE
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse3">'.mb_strtoupper($admin[1755]).'</a>
        <div class="collapse" data-parent="#accordion" id="collapse3">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">';
$btnSK = ' <button class="btn btn-md btn-danger text-light mt-n2 px-4" onclick="generate(); return false;"><b>'.$admin[1756].'  =></b></button>';
echo '
            <div class="row">
              <div class="col-md-6 pt-3 pl-4">&bull;&nbsp;'.$admin[1755].'</div>
              <div class="col-md-6 pt-3 text-center">
                '.$btnSK.'
                <input class="form-control texte" type="text" name="securekey" id="securekey" 
                  value="'.htmlentities($securekey, ENT_QUOTES, $charset).'" />
              </div>
            </div>
          </div>
        </div>
      </div>';
// INFOS SUR LE SITE
$menuOptionsSelect1 = $menuOptionsSelect2 = array();
$menuOptionsSelect2['- '.$admin[57].' -'] = '';
for ($i = 0; $i < count($langue); $i++) {
	$menuOptionsSelect1[$langue[$i]] = $langue[$i];
	$menuOptionsSelect2[$langue[$i]] = $langue[$i];
}
$menuOptionsSelect3 = array($admin[490] => 'H1', $admin[491] => 'H2', $admin[492] => 'H3');
$menuOptionsSelect4 = array("&nbsp;" => " ","!" => "!","#" => "#","*" => "*","+" => "+","-" => "-","." => ".",":" => ":","&lt;" => "&lt;",
							"=" => "=","&gt;" => "&gt;","@" => "@","^" => "^","~" => "~","&deg;" => "&deg;","&curren;" => "&curren;",
							"&middot;" => "&middot;","&ordm;" => "&ordm;","&plusmn;" => "&plusmn;","&raquo;" => "&raquo;","&times;" => "&times;","&bull;" => "&bull;");
$menuOptionsSelectDate = array($admin[452] => 'E1', $admin[485] => 'E2', $admin[453] => 'U1', $admin[486] => 'U2', $admin[487] => 'C1', $admin[488] => 'C2');
$asite19 = explode('|', $site[19]);
$btnMD = ' <button class="mt-n2 pt-2 px-1 py-1 bg-yellow" onclick="setMD(\''.$siteMD.'\'); return false;"><b>'.$siteMD.'  =></b></button>';
$btnMF = ' <button  class="mt-n2 pt-2 px-1 py-1 bg-yellow" onclick="setMF(\''.$siteMF.'\'); return false;"><b>'.$siteMF.'  =></b></button>';
echo '
      <div class="card">
        <a class="card-header card-link" data-toggle="collapse" href="#collapse4">'.$admin[49].'</a>
        <div class="collapse show" data-parent="#accordion" id="collapse4">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            '.inputConfigGuppy('site0', $site[0], '260px', '&bull;&nbsp;'.$admin[50], $lang[0], $flag1).'
            '.($lang[1] == '' ? '' : inputConfigGuppy('site11', $site[11], '260px', '', $lang[1], $flag2)).'
            '.inputURLConfigGuppy('site3', $site[3], '260px', '&bull;&nbsp;'.$admin[53]).'
            '.selectConfigGuppy('lang0', $menuOptionsSelect1, $lang[0], '&bull;&nbsp;'.$admin[54]).'
            '.selectConfigGuppy('site190', $menuOptionsSelectDate, $asite19[0], '&bull;&nbsp;'.$admin[451], $lang[0], '', -5, 32).'
            '.selectConfigGuppy('lang1', $menuOptionsSelect2, $lang[1], '&bull;&nbsp;'.$admin[56]).'
            '.selectConfigGuppy('site191', $menuOptionsSelectDate, $asite19[1], '&bull;&nbsp;'.$admin[451], $lang[1], '', -5, 32).'
            '.inputConfigGuppy('siteMD', $site['MD'], '48px', '&bull;&nbsp;'.$admin[1453].'<span class="float-right pr-5">'.$btnMD.'</span>').'
            '.inputConfigGuppy('siteMF', $site['MF'], '48px', '&bull;&nbsp;'.$admin[1454].'<span class="float-right pr-5">'.$btnMF.'</span>').'
            '.selectConfigGuppy('site22', $menuOptionsSelect3, $site[22], '&bull;&nbsp;'.$admin[489]).'
            '.selectConfigGuppy('site23', $menuOptionsSelect4, $site[23], '&bull;&nbsp;'.$admin[493]).'
            '.checkboxConfigGuppy('site6', $site[6], '&bull;&nbsp;'.$admin[1530]).'
            '.checkboxConfigGuppy('site7', $site[7], '&bull;&nbsp;'.$admin[1523],'', '','disabled').'
            '.inputConfigGuppy('site8', $mrsite8, '60px', '&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;'.$admin[1524], '', '','disabled').'
          </div>
        </div>
      </div>';
// REECRITURE D'ADRESSES
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse5">'.$admin[1321].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse5">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            '.checkboxConfigGuppy('siteURLR', $site['URLR'], $admin[1314]);
for ($i = 0; $i < count($adm); $i++) {
	if (!empty($adm[$i])) echo inputConfigGuppy('urlrw'.$i, $urlrw[$i], '230px', '&bull;&nbsp;'.$adm[$i]);
}
echo '
          </div>
        </div>
      </div>';
//INFOS SUR LE Webmestre
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse6">'.$admin[62].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse6">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            '.inputConfigGuppy('user0', $user[0], '250px', '&bull;&nbsp;'.$admin[63]).'
            '.inputConfigGuppy('user1', $user[1], '250px', '&bull;&nbsp;'.$admin[64]).'
            '.checkboxConfigGuppy('user3', $user[3], '-&nbsp;'.$admin[232]).'
          </div>
        </div>
      </div>';
//BALISES META
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse7">'.$admin[308].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse7">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            '.textareaConfigGuppy('site1', $site[1], '360px', '150px', '&bull;&nbsp;'.$admin[51]).'
            '.textareaConfigGuppy('site2', $site[2], '360px', '150px', '&bull;&nbsp;'.$admin[52]).'
            '.inputConfigGuppy('site9', $site[9], '230px', '&bull;&nbsp;'.$admin[312]).'
          </div>
        </div>
      </div>';
//COPYRIGHT GUPPY
$menuOptionsSelect0 = array($admin[1487] => 'I', $admin[394] => 'T');
$menuOptionsSelect1 = array($admin[513] => 'N', $admin[512] => '', $admin[511] => 's', $admin[510] => 't');
$menuOptionsSelect2 = array($admin[508] => 'T', $admin[494] => 'L', $admin[495] => 'R', $admin[507] => 'B');
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse8">'.$admin[515].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse8">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <p style="text-align:center;">'.$help[20].'</p>
            '.selectConfigGuppy('site35', $menuOptionsSelect0, $site[35], '&bull;&nbsp;'.$admin[1486]).'
            '.selectConfigGuppy('site24', $menuOptionsSelect1, $site[24], '&bull;&nbsp;'.$admin[514]).'
            '.selectConfigGuppy('site25', $menuOptionsSelect2, $site[25], '&bull;&nbsp;'.$admin[509]).'
          </div>
        </div>
      </div>';
echo '
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  </div>
</form>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
config2.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config2.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Configuration look
 *******************************************************************************
 *   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.19 (August 26, 2024) : Correction Stylepage, Tohelp modify 
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[1] == '') {
        $nomzone = $admin[45];
        include 'access.inc';
        exit();
    }
}

include CONFIG;
$selskin = is_file(CHEMIN.'skins/'.$selskin.'/confskin.inc') ? $selskin : 'no_skin';
$meskin = CHEMIN.'skins/'.$selskin.'/';
if (is_file ($meskin.'confskin.inc')) {
    include $meskin.'confskin.inc';
} else {
    die('Skin not found : '.$meskin);
}

$tfonts = '';
$afonts = array();

if (is_file($meskin.'font/fontstyle.css')) {
    $tfonts = file_get_contents($meskin.'font/fontstyle.css');
    $sf = file($meskin.'font/fontstyle.css');
    foreach($sf as $line) {
        $n = strpos($line, 'font-family');
        if ($n !== false) {
            $line1 = substr($line, $n + 11);
            $n = strpos($line1, "'");
            $n = $n !== false ? $n : strpos($line1, '"');
            $p = strrpos($line1, "'");
            $p = $p !== false ? $p : strrpos($line1, '"');
            $r = strlen($line1);
            if ($n !== false && $p !== false) {
                $ft = trim(substr($line1, $n + 1, $r - ($n + ($r - $p)) - 1));
                if ($ft) $afonts[] = $ft.', sans-serif';
            }
        }
    }
}

$mycss = import('mycss');
$regit = import('regit');

function UrlBKimg($nameimg) {
    $imgcss = explode('|', $nameimg);
    $url    = substr($imgcss[0], 0, 1) == 'I' ? '../../' : '';
    return 'url('.$url.'img/'.$imgcss[1].')';
}

function hex2rgba($color, $opac='0.0') {
    $opac = preg_replace("/[^0-9.]/", '', $opac);
    if (substr($color, 0, 1) != '#' || empty($opac)) return $color;
    $color = preg_replace("/[^0-9A-Fa-f]/", '', $color);
    $argb  = array();
    if (strlen($color) == 6) {
        $colorVal  = hexdec($color);
        $argb['R'] = 0xFF & ($colorVal >> 0x10);
        $argb['G'] = 0xFF & ($colorVal >> 0x8);
        $argb['B'] = 0xFF & $colorVal;
    } elseif (strlen($color) == 3) {
        $argb['R'] = hexdec(str_repeat(substr($color, 0, 1), 2));
        $argb['G'] = hexdec(str_repeat(substr($color, 1, 1), 2));
        $argb['B'] = hexdec(str_repeat(substr($color, 2, 1), 2));
    } else {
        return false;
    }
    return 'rgba('.implode(',', $argb).', '.$opac.')';
}

function getBorder ($width='0', $style='solid', $color='#000000', $force=false) {
    $awidth = explode(' ', $width);
    $astyle = explode(' ', $style);
    $acolor = explode(' ', $color);
    $sforce = $force ? ' !important' : '';
    $count  = count($awidth) + count($astyle) + count($acolor);
    if ($count == 3) {
        $width = in_array($width, array('0', '0px')) || in_array($style, array('hidden', 'none')) ? '0px' : $width;
        $color = in_array($color, array('inherit', 'transparent')) ? '#000000' : $color;
        return $width == '0px' || $width == '0' ? 'border: 0'.$sforce.';' : 'border: '.$width.' '.$style.' '.$color.$sforce.';';
    }
    return 'border-width: '.$width.$sforce.';'."\n".'    border-style: '.$style.$sforce.';'."\n".'    border-color: '.$color.$sforce.';';
}

$messreg  = '';
$messreg2 = '';
if ($regit == 1) {
    $regpart = import('regpart');
	$messreg = " OK";

	if ($regpart == '1') {
        $body[5] = import('body5', 'POST', true, '1%'); // Position en bas de page du bouton flottant
        $body[6] = import('body6', 'POST', true, '0'); // Décalage avant affichage du bouton flottant
        $body[7] = import('body7', '', true); // Bouton flottant ON/OFF
        $opacity[20] = import('opacity20', 'POST', true, '0.7'); // Opacité du bouton flottant
        
        $page[8]  = import('page8', '', true); // Affichage Temps de chargement de page ON / OFF
        $page[22] = import('page22', 'POST', true); // utilisation titres longs
        $page[54] = '';
 /*
        foreach ($templates as $key=>$tmpl) 
		{
			$page[54] .= ','.import('page54'.$key, 'POST', true, ''); // N° ligne TOP à fixer en haut de page
		}
*/
		$nbrtemplateabsent = 0;
		for ($ij=0; $ij < count($templates); $ij++)
		{
			if (!isset($templates[$ij])) 
				$nbrtemplateabsent++;
		}	
		for ($itemplates = 0; $itemplates < count($templates)+$nbrtemplateabsent; $itemplates++)
		{
            if (isset($templates[$itemplates]))
			{
			    $key = $itemplates;
				$page[54] .= ','.import('page54'.$key, 'POST', true, ''); // N° ligne TOP à fixer en haut de page
			}
			else
				$page[54] .= ',';
		}
        $page[54] = substr($page[54], 1);
        $page[62] = '';
/*
        foreach ($templates as $key=>$tmpl) 
            $page[62] .= ','.import('page62'.$key, 'POST', true, '0'); // Décalage du centre sous la ligne TOP
*/
		for ($itemplates = 0; $itemplates < count($templates)+$nbrtemplateabsent; $itemplates++)
		{
            if (isset($templates[$itemplates]))
			{
			    $key = $itemplates;
				$page[62] .= ','.import('page62'.$key, 'POST', true, '0'); // Décalage du centre sous la ligne TOP
			}
			else
				$page[62] .= ',';
		} 
        $page[62] = substr($page[62], 1);
        $body[16] = import('body16', '', true); // Ancrage automatique zone 2
    }
    
	if ($regpart == '2') {
		$body[0] = import('body0', 'POST', true, 'transparent'); // Arrière-plan du site
		$body[1] = import('body1', '', true); // Image de fond du site
		$body[2] = import('body2', '', true); // Image de fond fixe / mouvante
        $body[3] = import('body3', 'POST', true, 'Non'); // Répétition image de fond
        $body[4] = import('body4', 'POST', true, 'TOP'); // Position horizontale
		$body[8] = import('body8', '', true); // Image de fond bas de page
        $body[9] = import('body9', 'POST', true, 'Non'); // Répétition image bas de page
        $body[10] = import('body10', 'POST', true, '1'); // N° de la colonne gauche
        $body[11] = import('body11', 'POST', true, '2'); // N° de la colonne centrale
        $body[12] = import('body12', 'POST', true, '3'); // N° de la colonne droite
        $body[13] = import('body13', 'POST', true, '1'); // N° de la colonne gauche
        $body[15] = import('body15', 'POST', true, '3'); // N° de la colonne droite

        $citation[0] = import('citation0', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police des citations
		$citation[1] = import('citation1', 'POST', true, '13px'); // Taille de la police des citations
		$citation[2] = import('citation2', 'POST', true, 'inherit'); // Couleur de la police des citations
		$citation[3] = import('citation3', 'POST', true, ''); // Style de la police des citations
		$citation[4] = import('citation4', 'POST', true, 'inherit'); // Couleur des adresses actives
		$citation[5] = import('citation5', 'POST', true, 'inherit'); // Couleur de la page courante
		$citation[6] = import('citation6', 'POST', true, 'inherit'); // Police de la boîte impression
		$citation[7] = import('citation7', 'POST', true, ''); // Style de la police boîte impression
		$citation[8] = import('citation8', 'POST', true, '13px'); // Taille de la police boîte impression
		$citation[9] = import('citation9', 'POST', true, 'inherit'); // Couleur de la police boîte impression
        $citation[10] = import('citation10', 'POST', true, 'transparent'); // Arrière-plan des citations
        $citation[11] = import('citation11', '', true); // Image de fond des citations
        $citation[12] = import('citation12', 'POST', true, 'inherit'); // Couleur des bordures des citations
        $citation[13] = import('citation13', 'POST', true, '0px'); // Taille des bordures des citations
		$citation[14] = import('citation14', 'POST', true, '0px'); // Taille coins arrondis des citations
		$citation[15] = import('citation15', 'POST', true, 'solid'); // Style des bordures des citations
		$citation[16] = import('citation16', 'POST', true, '0'); // Marges externes des citations
		$citation[17] = import('citation17', 'POST', true, '0'); // Marges internes des citations

		$lien[0] = import('lien0', 'POST', true, 'inherit'); // Lien OFF des boites centrales
		$lien[1] = import('lien1', 'POST', true, 'inherit'); // Lien ON des boites centrales
		$lien[2] = import('lien2', 'POST', true, 'inherit'); // Lien OFF des boites latérales
		$lien[3] = import('lien3', 'POST', true, 'inherit'); // Lien ON des boites latérales
		$lien[4] = import('lien4', 'POST', true, 'inherit'); // Liens OFF de la barre de menu haute
		$lien[5] = import('lien5', 'POST', true, 'inherit'); // Liens ON de la barre de menu haute
		$lien[6] = import('lien6', 'POST', true, 'transparent'); // Fond liens ON de la barre de menu haute
		$lien[7] = import('lien7', 'POST', true, 'transparent'); // Fond liens OFF de la barre de menu haute
		$lien[8] = import('lien8', 'POST', true, 'transparent'); // Fond lien actif de la barre de menu haute
		$lien[9] = import('lien9', 'POST', true, 'inherit'); // Liens actif de la barre de menu haute
		$lien[10] = import('lien10', 'POST', true, 'inherit'); // Couleur de la bordure des onglets de la barre de menu
		$lien[11] = import('lien11', 'POST', true, '0px'); // Taille de la bordure des onglets de la barre de menu
		$lien[12] = import('lien12', 'POST', true, 'solid'); // Style de la bordure des onglets de la barre de menu
		$lien[13] = import('lien13', 'POST', true, '0px'); // Taille des  coins arrondis des onglets de la barre de menu
		$lien[14] = import('lien14', 'POST', true, '0'); // Marges internes des onglets de la barre de menu
		$lien[15] = import('lien15', 'POST', true, '0'); // Marges externes des onglets de la barre de menu
		$lien[16] = import('lien16', 'POST', true, 'transparent'); // Liens OFF du menu navigation latérale
		$lien[17] = import('lien17', 'POST', true, 'transparent'); // Liens ON du menu navigation latérale
		$lien[18] = import('lien18', 'POST', true, 'transparent'); // Fond liens ON du menu navigation latérale
		$lien[19] = import('lien19', 'POST', true, 'transparent'); // Fond des panneaux de navigation latérale
		$lien[20] = import('lien20', 'POST', true, 'transparent'); // Couleur de la bordure gauche des panneaux
		$lien[21] = import('lien21', 'POST', true, ''); // Taille de la bordure gauche des panneaux
		$lien[22] = import('lien22', 'POST', true, 'transparent'); // Liens OFF du panneau menu
		$lien[23] = import('lien23', 'POST', true, 'transparent'); // Liens ON du panneau menu
		$lien[24] = import('lien24', 'POST', true, 'transparent'); // Fond liens ON du panneau menu
		$lien[25] = import('lien25', 'POST', true, 'transparent'); // Fond du menu navigation latérale
        $lien[26] = import('lien26', 'POST', true, 'inherit'); // Couleur des bordures du menu latéral
        $lien[27] = import('lien27', 'POST', true, '0px'); // Taille des bordures du menu latéral
		$lien[28] = import('lien28', 'POST', true, '0px'); // Taille coins arrondis du menu latéral
		$lien[29] = import('lien29', 'POST', true, 'solid'); // Style des bordures du menu latéral
		$lien[30] = import('lien30', 'POST', true, 'transparent'); // Fond liens OFF menu navigation latérale
		$lien[31] = import('lien31', 'POST', true, 'transparent'); // Fond liens ON options panneau menu
        $lien[32] = import('lien32', 'POST', true, 'inherit'); // Couleur des bordures options panneau menu
        $lien[33] = import('lien33', 'POST', true, '0px'); // Taille des bordures options panneau menu
		$lien[34] = import('lien34', 'POST', true, '0px'); // Taille coins arrondis options panneau menu
		$lien[35] = import('lien35', 'POST', true, 'solid'); // Style des bordures options panneau menu
        $lien[36] = import('lien36', 'POST', true, 'inherit'); // Couleur lien fermeture panneau menu

		$page[1] = import('page1', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police des boites centrales
		$page[2] = import('page2', 'POST', true, '14px'); // Taille des textes des boites centrales
        $page[4] = import('page4', 'POST', true, 'Pas d\'image'); // Logo du site
		$page[5] = import('page5', 'POST', true, 'transparent'); // Arrière-plan du bandeau TOP
		$page[6] = import('page6', 'POST', true, '24px'); // Hauteur des lignes boites centrales
		$page[7] = import('page7', '', true); // Flèches pour la navigation parallaxe ON / OFF
		$page[11] = import('page11', 'POST', true, '24px'); // Hauteur des lignes boites latérales
		$page[16] = import('page16', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police des boites latérales
		$page[17] = import('page17', 'POST', true, '14px'); // Taille des textes des boites latérales
		$page[18] = import('page18', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police du menu de navigation
		$page[19] = import('page19', 'POST', true, '14px'); // Taille de police du menu de navigation
		$page[21] = import('page21', 'POST', true, 'auto'); // Hauteur du footer
		$page[24] = import('page24', '', true); // Image de fond parallaxe 1
		$page[25] = import('page25', '', true); // Image de fond parallaxe 2
		$page[26] = import('page26', '', true); // Image de fond parallaxe 3
        $page[29] = import('page29', 'POST', true, 'transparent'); // Arrière-plan du bandeau TOP
        $page[31] = import('page31', 'POST', true, 'transparent'); // Arrière-plan du bandeau BOTTOM
        $page[33] = import('page33', '', true); // Image de fond de la barre de menu
        $page[34] = import('page34', 'POST', true, 'transparent'); // Arrière-plan de la barre de menu
        $page[35] = import('page35', 'POST', true, ''); // Style de la police des boîtes latérales
        $page[36] = import('page36', 'POST', true, ''); // Style de la police des boîtes centrales
        $page[37] = import('page37', 'POST', true, ''); // Style de la police du menu icônes
		$page[39] = import('page39', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police corps du document
		$page[40] = import('page40', 'POST', true, '13px'); // Taille des textes corps du document
        $page[41] = import('page41', 'POST', true, ''); // Style de la police corps du document
        $page[43] = import('page43', 'POST', true, 'transparent'); // Arrière-plan du header
		$page[45] = import('page45', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police footer
		$page[46] = import('page46', 'POST', true, '13px'); // Taille des textes footer
        $page[47] = import('page47', 'POST', true, ''); // Style de la police footer
        $page[50] = import('page50', 'POST', true, 'no'); // Menu effet de parallaxe
		$page[51] = import('page51', 'POST', true, 'transparent'); // Arrière-plan boutons parallaxe
        $page[52] = import('page52', 'POST', true, '40%'); // Position navigateur parallaxe
		$page[56] = import('page56', 'POST', true, 'transparent'); // Arrière-plan parallaxe 1
		$page[57] = import('page57', 'POST', true, 'transparent'); // Arrière-plan parallaxe 2
		$page[58] = import('page58', 'POST', true, 'transparent'); // Arrière-plan parallaxe 3
		$page[63] = import('page63', '', true); // Largeur des flèches de navigation parallaxe
		$page[64] = import('page64', '', true); // Hauteur des flèches de navigation parallaxe
		$page[65] = import('page65', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police du menu navigation latérale
		$page[66] = import('page66', 'POST', true, ''); // Style de police du menu navigation latérale
		$page[67] = import('page67', 'POST', true, ''); // Taille des liens du menu navigation latérale
		$page[68] = import('page68', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police du panneau menu navigation latérale
		$page[69] = import('page69', 'POST', true, ''); // Style de police du panneau menu navigation latérale
		$page[70] = import('page70', 'POST', true, ''); // Taille des liens du panneau menu navigation latérale

		$bordure[3] = import('bordure3', 'POST', true, 'inherit'); // Couleur des bordures bandeau et pied de page
		$bordure[4] = import('bordure4', 'POST', true, '0px'); // Taille des bordures bandeau et pied de page
		$bordure[5] = import('bordure5', 'POST', true, '0px'); // Taille coins arrondis bandeau et pied de page
		$bordure[7] = import('bordure7', 'POST', true, 'inherit'); // Couleur des bordures titre boîtes centrales
		$bordure[8] = import('bordure8', 'POST', true, '0px'); // Taille des bordures titre boîtes centrales
		$bordure[9] = import('bordure9', 'POST', true, '0px'); // Taille coins arrondis titre boîtes centrales
		$bordure[10] = import('bordure10', 'POST', true, 'inherit'); // Couleur des bordures corps boîtes centrales
		$bordure[11] = import('bordure11', 'POST', true, '0px'); // Taille des bordures corps boîtes centrales
		$bordure[12] = import('bordure12', 'POST', true, '0px'); // Taille coins arrondis corps boîtes centrales
		$bordure[13] = import('bordure13', 'POST', true, 'inherit'); // Couleur des bordures titre boîtes latérales
		$bordure[14] = import('bordure14', 'POST', true, '0px'); // Taille des bordures titre boîtes latérales
		$bordure[15] = import('bordure15', 'POST', true, '0px'); // Taille coins arrondis titre boîtes latérales
		$bordure[16] = import('bordure16', 'POST', true, 'inherit'); // Couleur des bordures corps boîtes latérales
		$bordure[17] = import('bordure17', 'POST', true, '0px'); // Taille des bordures corps boîtes latérales
		$bordure[18] = import('bordure18', 'POST', true, '0px'); // Taille coins arrondis corps boîtes latérales
		$bordure[19] = import('bordure19', 'POST', true, 'inherit'); // Couleur des bordures du bandeau TOP
		$bordure[20] = import('bordure20', 'POST', true, '0px'); // Taille des bordures du bandeau TOP
		$bordure[21] = import('bordure21', 'POST', true, '0px'); // Taille coins arrondis du bandeau TOP
		$bordure[22] = import('bordure22', 'POST', true, 'inherit'); // Couleur des bordures du bandeau BOTTOM
		$bordure[23] = import('bordure23', 'POST', true, '0px'); // Taille des bordures du bandeau BOTTOM
		$bordure[24] = import('bordure24', 'POST', true, '0px'); // Taille coins arrondis du bandeau BOTTOM
        $bordure[26] = import('bordure26', 'POST', true, 'inherit'); // Couleur des bordures de la barre de menu
        $bordure[27] = import('bordure27', 'POST', true, '0px'); // Taille des bordures de la barre de menu
		$bordure[28] = import('bordure28', 'POST', true, '0px'); // Taille coins arrondis de la barre de menu
		$bordure[29] = import('bordure29', 'POST', true, 'solid'); // Style des bordures du bandeau TOP
		$bordure[30] = import('bordure30', 'POST', true, 'solid'); // Style des bordures du bandeau BOTTOM
		$bordure[31] = import('bordure31', 'POST', true, 'solid'); // Style des bordures du pied de page
		$bordure[32] = import('bordure32', 'POST', true, 'solid'); // Style des bordures de la barre de menu
		$bordure[34] = import('bordure34', 'POST', true, 'solid'); // Style des bordures titre boîtes centrales
		$bordure[35] = import('bordure35', 'POST', true, 'solid'); // Style des bordures corps boîtes centrales
		$bordure[36] = import('bordure36', 'POST', true, 'solid'); // Style des bordures titre boîtes latérales
		$bordure[37] = import('bordure37', 'POST', true, 'solid'); // Style des bordures corps boîtes latérales
		$bordure[38] = import('bordure38', 'POST', true, 'solid'); // Style des bordures formulaire
		$bordure[39] = import('bordure39', 'POST', true, 'solid'); // Style des bordures annuaires
		$bordure[40] = import('bordure40', 'POST', true, 'inherit'); // Couleur des bordures du header
		$bordure[41] = import('bordure41', 'POST', true, '0px'); // Taille des bordures du header
		$bordure[42] = import('bordure42', 'POST', true, '0px'); // Taille coins arrondis du header
		$bordure[43] = import('bordure43', 'POST', true, 'solid'); // Style des bordures du header
		$bordure[44] = import('bordure44', 'POST', true, 'inherit'); // Couleur bordures boutons parallaxe

		$barre[0] = import('barre0', 'POST', true, 'inherit'); // Couleur des HR
		$barre[1] = import('barre1', 'POST', true, '1px'); // Taille des HR
		$barre[2] = import('barre2', 'POST', true, 'solid'); // Style des HR
		$barre[3] = import('barre3', 'POST', true, 'inherit'); // Couleur des bordures
		$barre[4] = import('barre4', 'POST', true, '0px'); // Taille des bordures
		$barre[5] = import('barre5', 'POST', true, 'solid'); // Style des bordures

		$titre[0] = import('titre0', 'POST', true, 'inherit'); // Couleur du titre des boites centrales
		$titre[1] = import('titre1', 'POST', true, 'transparent'); // Arrière-plan du titre des boites centrales
		$titre[2] = import('titre2', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police des titres des boites centrales
		$titre[3] = import('titre3', 'POST', true, '13px'); // Taille des titres des boites centrales
		$titre[4] = import('titre4', 'POST', true, 'inherit'); // Couleur du titre des boites latérales
		$titre[5] = import('titre5', 'POST', true, 'transparent'); // Arrière-plan du titre des boites latérales
		$titre[6] = import('titre6', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police des titres des boites latérales
		$titre[7] = import('titre7', 'POST', true, '13px'); // Taille des titres des boites latérales
		$titre[8] = import('titre8', 'POST', true); // Image de fond des titres des boites centrales
		$titre[9] = import('titre9', '', true); // Image de fond des titres des boites latérales
		$titre[10] = import('titre10', 'POST', true, 'inherit'); // Couleur du titre des boites BOTTOM
		$titre[11] = import('titre11', 'POST', true, ''); // Style de police des titres des boites latérales
		$titre[12] = import('titre12', 'POST', true, ''); // Style de police des titres des boites centrales
		$titre[13] = import('titre13', 'POST', true, 'inherit'); // Couleur des textes des boites BOTTOM
		$titre[14] = import('titre14', 'POST', true, 'transparent'); // Arrière-plan de la colonne latérale gauche
		$titre[15] = import('titre15', 'POST', true, 'transparent'); // Arrière-plan du titre des boites BOTTOM
		$titre[16] = import('titre16', 'POST', true, 'inherit'); // Couleur des bordures de la colonne latérale gauche
		$titre[17] = import('titre17', 'POST', true, '0px'); // Taille des bordures de la colonne latérale gauche
		$titre[18] = import('titre18', 'POST', true, 'solid'); // Style des bordures de la colonne latérale gauche
		$titre[19] = import('titre19', 'POST', true, '0px'); // Rayon des coins de la colonne latérale gauche
		$titre[20] = import('titre20', 'POST', true, 'transparent'); // Arrière-plan OFF des boites BOTTOM
		$titre[21] = import('titre21', 'POST', true, 'transparent'); // Arrière-plan de la colonne latérale droite
		$titre[23] = import('titre23', 'POST', true, 'inherit'); // Couleur des bordures de la colonne latérale droite
		$titre[24] = import('titre24', 'POST', true, '0px'); // Taille des bordures de la colonne latérale droite
		$titre[25] = import('titre25', 'POST', true, 'solid'); // Style des bordures de la colonne latérale droite
		$titre[26] = import('titre26', 'POST', true, '0px'); // Rayon des coins de la colonne latérale droite
		$titre[27] = import('titre27', 'POST', true, 'transparent'); // Arrière-plan des colonnes du blog
		$titre[29] = import('titre29', 'POST', true, 'inherit'); // Couleur des bordures des colonnes du blog
		$titre[30] = import('titre30', 'POST', true, '0px'); // Taille des bordures des colonnes du blog
		$titre[31] = import('titre31', 'POST', true, 'solid'); // Style des bordures des colonnes du blog
		$titre[32] = import('titre32', 'POST', true, '0px'); // Rayon des coins des colonnes du blog
		$titre[34] = import('titre34', 'POST', true, 'transparent'); // Arrière-plan de la zone principale
		$titre[36] = import('titre36', 'POST', true, 'inherit'); // Couleur des bordures de la zone principale
		$titre[37] = import('titre37', 'POST', true, '0px'); // Taille des bordures de la zone principale
		$titre[38] = import('titre38', 'POST', true, 'solid'); // Style des bordures de la zone principale
		$titre[39] = import('titre39', 'POST', true, '0px'); // Rayon des coins de la zone principale
		$titre[41] = import('titre41', 'POST', true, 'transparent'); // Arrière-plan de la colonne centrale
		$titre[43] = import('titre43', 'POST', true, 'inherit'); // Couleur des bordures de la colonne centrale
		$titre[44] = import('titre44', 'POST', true, '0px'); // Taille des bordures de la colonne centrale
		$titre[45] = import('titre45', 'POST', true, 'solid'); // Style des bordures de la colonne centrale
		$titre[46] = import('titre46', 'POST', true, '0px'); // Rayon des coins de la colonne centrale
		$titre[47] = import('titre47', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police du titre du panneau menu
		$titre[48] = import('titre48', 'POST', true, ''); // Style de police du titre du panneau menu
		$titre[49] = import('titre49', 'POST', true, ''); // Taille du texte du titre du panneau menu
		$titre[50] = import('titre50', 'POST', true, 'transparent'); // Couleur du titre du panneau menu
		$titre[51] = import('titre51', 'POST', true, 'transparent'); // Couleur de fond du titre du panneau menu
        $titre[52] = import('titre52', 'POST', true, 'inherit'); // Couleur des bordures du titre du panneau menu
        $titre[53] = import('titre53', 'POST', true, '0px'); // Taille des bordures du titre du panneau menu
		$titre[54] = import('titre54', 'POST', true, 'solid'); // Style des bordures du titre du panneau menu
		$titre[55] = import('titre55', 'POST', true, '0px'); // Taille coins arrondis du titre du panneau menu


		$titre[60] = import('titre60', 'POST', true, 'transparent'); // Arrière-plan de la zone au-dessus
		$titre[62] = import('titre62', 'POST', true, 'inherit'); // Couleur des bordures de la zone au-dessus
		$titre[63] = import('titre63', 'POST', true, '0px'); // Taille des bordures de la zone au-dessus
		$titre[64] = import('titre64', 'POST', true, 'solid'); // Style des bordures de la zone au-dessus
		$titre[65] = import('titre65', 'POST', true, '0px'); // Rayon des coins de la zone au-dessus
		$titre[66] = import('titre66', 'POST', true, 'transparent'); // Arrière-plan de la zone édito
		$titre[68] = import('titre68', 'POST', true, 'inherit'); // Couleur des bordures de la zone édito
		$titre[69] = import('titre69', 'POST', true, '0px'); // Taille des bordures de la zone édito
		$titre[70] = import('titre70', 'POST', true, 'solid'); // Style des bordures de la zone édito
		$titre[71] = import('titre71', 'POST', true, '0px'); // Rayon des coins de la zone édito
		$titre[72] = import('titre72', 'POST', true, 'transparent'); // Arrière-plan de la zone au-dessous
		$titre[74] = import('titre74', 'POST', true, 'inherit'); // Couleur des bordures de la zone au-dessous
		$titre[75] = import('titre75', 'POST', true, '0px'); // Taille des bordures de la zone au-dessous
		$titre[76] = import('titre76', 'POST', true, 'solid'); // Style des bordures de la zone au-dessous
		$titre[77] = import('titre77', 'POST', true, '0px'); // Rayon des coins de la zone au-dessous
		$titre[78] = import('titre78', 'POST', true, '100%'); // Largeur TOPBOXES
		$titre[79] = import('titre79', 'POST', true, '100%'); // Largeur MAINCONTENT
		$titre[80] = import('titre80', 'POST', true, '100%'); // Largeur BOTTOMBOXES
		$titre[81] = import('titre81', 'POST', true, '100%'); // Largeur FOOTER
        
		$texte[0] = import('texte0', 'POST', true, 'inherit'); // Couleur des textes des boites centrales
		$texte[1] = import('texte1', 'POST', true, 'transparent'); // Arrière-plan OFF des boites centrales
		$texte[2] = import('texte2', 'POST', true, 'transparent'); // Arrière-plan ON des boites centrales
		$texte[5] = import('texte5', 'POST', true, 'inherit'); // Couleur des textes des boites latérales
		$texte[6] = import('texte6', 'POST', true, 'transparent'); // Arrière-plan OFF des boites latérales
		$texte[7] = import('texte7', 'POST', true, 'transparent'); // Arrière-plan ON des boites latérales
		$texte[8] = import('texte8', 'POST', true, 'inherit'); // Couleur des textes éléments footer
		$texte[9] = import('texte9', 'POST', true, 'inherit'); // Couleur des textes corps du document
		$texte[10] = import('texte10', 'POST', true, 'left'); // Alignement des titres boîtes centrales
		$texte[11] = import('texte11', 'POST', true, 'left'); // Alignement des titres boîtes latérales
		$texte[12] = import('texte12', 'POST', true, 'left'); // Alignement des options de menu déroulant
		$texte[13] = import('texte13', 'POST', true, 'center'); // Alignement des lignes du bas de page

		$forum[0] = import('forum0', 'POST', true, 'transparent'); // Arrière-plan entêtes forum
		$forum[1] = import('forum1', 'POST', true, 'transparent'); // Arrière-plan du sujet
		$forum[2] = import('forum2', 'POST', true, 'transparent'); // Arrière-plan de la réponse
		$forum[11] = import('forum11', 'POST', true, 'inherit'); // Couleur texte dans entêtes
		$forum[12] = import('forum12', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police du texte dans entêtes
		$forum[13] = import('forum13', 'POST', true, ''); // Style du texte dans entêtes
		$forum[14] = import('forum14', 'POST', true, '13px'); // Taille du texte dans entêtes

		$presform[0] = import('presform0', 'POST', true, 'inherit'); // Couleur des textes dans les boites de choix et boutons de commande
		$presform[1] = import('presform1', 'POST', true, 'inherit'); // Couleur des boites de choix
		$presform[2] = import('presform2', 'POST', true, 'inherit'); // Couleur des boutons de commande
		$presform[3] = import('presform3', 'POST', true, 'inherit'); // Couleur des zone de texte
		$presform[4] = import('presform4', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police dans la présentation des formulaires
		$presform[5] = import('presform5', 'POST', true); // Taille de la police dans la présentation des formulaires
		$presform[6] = import('presform6', 'POST', true, 'transparent'); // Arrière-plan des textarea
		$presform[7] = import('presform7', 'POST', true, '1px'); // Taille de la bordure
		$presform[8] = import('presform8', 'POST', true, 'inherit'); // Couleur de la bordure
		$presform[9] = import('presform9', 'POST', true, '0px'); // Taille coins arrondis
		$presform[10] = import('presform10', 'POST', true, ''); // Style de la police de présentation
		$presform[11] = import('presform11', 'POST', true, 'inherit'); // Couleur du texte des boutons de commande
		$presform[12] = import('presform12', 'POST', true, '0'); // Marges externes des boutons de commande
		$presform[13] = import('presform13', 'POST', true, 'inherit'); // Couleur des boutons de commande survolés
		$presform[14] = import('presform14', 'POST', true, 'inherit'); // Couleur du texte des boutons de commande survolés

		$calendar[0]  = import('calendar0', 'POST', true, 'transparent'); // Couleur de fond des jours libre du mois
		$calendar[1]  = import('calendar1', 'POST', true, 'transparent'); // Couleur de fond des jours du mois
		$calendar[2]  = import('calendar2', 'POST', true, 'transparent'); // Couleur de fond de la journée
		$calendar[3]  = import('calendar3', 'POST', true, 'transparent'); // Couleur de fond des dimanches
		$calendar[4]  = import('calendar4', 'POST', true, 'transparent'); // Couleur de fond de la journée si dimanche
		$calendar[5]  = import('calendar5', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police du calendrier
		$calendar[6]  = import('calendar6', 'POST', true, '13px'); // Taille de la police du calendrier
		$calendar[7]  = import('calendar7', 'POST', true, 'inherit'); // Couleurs de la police des chiffres
		$calendar[8]  = import('calendar8', 'POST', true, 'inherit'); // Couleurs de la police des jours de la semaine
		$calendar[9]  = import('calendar9', 'POST', true, '0px'); // Espacement des bordures du calendrier
		$calendar[10] = import('calendar10', 'POST', true, 'inherit'); // Couleur évènement
		$calendar[11] = import('calendar11', 'POST', true, 'inherit'); // Couleur de fond du calendrier/bordure
		$calendar[12] = import('calendar12', 'POST', true, '0px'); // Taille des bordures du calendrier
		$calendar[13] = import('calendar13', 'POST', true, 'inherit'); // Couleur bordure calendrier
		$calendar[14] = import('calendar14', 'POST', true, '0px'); // Taille coins arrondis calendrier
		$calendar[15] = import('calendar15', 'POST', true, ''); // Style de police du calendrier
		$calendar[16] = import('calendar16', 'POST', true, 'inherit'); // Couleur de la police évènement
		$calendar[17] = import('calendar17', 'POST', true, 'transparent'); // Couleur de fond des jours de la semaine
		$calendar[18] = import('calendar18', 'POST', true, 'inherit'); // Couleur de la police de la journée
		$calendar[19] = import('calendar19', 'POST', true, 'inherit'); // Couleur de la police des dimanches
		$calendar[20] = import('calendar20', 'POST', true, 'inherit'); // Couleur de la police de la journée si dimanche
        
        $annuaire[0] = import('annuaire0', 'POST', true, 'transparent'); // Arrière-plan de la catégorie 
        $annuaire[1] = import('annuaire1', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police de la catégorie
        $annuaire[2] = import('annuaire2', 'POST', true, '16px'); // Taille de la police de la catégorie
        $annuaire[3] = import('annuaire3', 'POST', true, 'inherit'); // Couleur de la police de la catégorie
        $annuaire[4] = import('annuaire4', 'POST', true, 'inherit'); // Couleur de bordure de la catégorie
        $annuaire[5] = import('annuaire5', 'POST', true, '0px'); // Taille de bordure de la catégorie
        $annuaire[6] = import('annuaire6', 'POST', true, '0px'); // Taille des coins arrondis de la catégorie
        $annuaire[7] = import('annuaire7', 'POST', true, ''); // Style de police de la catégorie
        $annuaire[8] = import('annuaire8', 'POST', true, 'transparent'); // Arrière-plan sous-catégorie 
        $annuaire[9] = import('annuaire9', 'POST', true, 'transparent'); // Arrière-plan élément
        $annuaire[10] = import('annuaire10', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police de la sous-catégorie
        $annuaire[11] = import('annuaire11', 'POST', true, ''); // Style de police de la sous-catégorie
        $annuaire[12] = import('annuaire12', 'POST', true, '15px'); // Taille de la police de la sous-catégorie
        $annuaire[13] = import('annuaire13', 'POST', true, 'inherit'); // Couleur de la police de la sous-catégorie
        $annuaire[14] = import('annuaire14', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police des éléments
        $annuaire[15] = import('annuaire15', 'POST', true, ''); // Style de police des éléments
        $annuaire[16] = import('annuaire16', 'POST', true, '13px'); // Taille de la police des éléments
        $annuaire[17] = import('annuaire17', 'POST', true, 'inherit'); // Couleur de la police des éléments
        
//		$dropdown[0] = import('dropdown0', 'POST', true, 'auto'); // Largeur option menu déroulant
		$dropdown[1] = import('dropdown1', 'POST', true, 'Arial, Helvetica, sans-serif'); // Police option menu déroulant
		$dropdown[2] = import('dropdown2', 'POST', true, ''); // Style de police option menu déroulant
		$dropdown[3] = import('dropdown3', 'POST', true, '13px'); // Taille de police option menu déroulant
		$dropdown[4] = import('dropdown4', 'POST', true, 'inherit'); // Couleur de police option menu déroulant
		$dropdown[5] = import('dropdown5', 'POST', true, 'transparent'); // Couleur arrière-plan option menu déroulant
		$dropdown[7] = import('dropdown7', 'POST', true, 'inherit'); // Couleur de bordure option menu déroulant
		$dropdown[8] = import('dropdown8', 'POST', true, '0px'); // Taille de bordure option menu déroulant
		$dropdown[9] = import('dropdown9', 'POST', true, 'solid'); // Style de bordure option menu déroulant
		$dropdown[10] = import('dropdown10', 'POST', true, '0px'); // Taille des coins arrondis option menu déroulant
//		$dropdown[11] = import('dropdown11', 'POST', true, 'auto'); // Largeur sous-option menu déroulant
// modif Linuxmr
        $dropdown[0] = $dropdown[11] = 'auto';										  
		$dropdown[12] = import('dropdown12', 'POST', true, 'transparent'); // Couleur arrière-plan sous-option menu déroulant
		$dropdown[14] = import('dropdown14', 'POST', true, 'transparent'); // Couleur arrière-plan option visitée menu déroulant
		$dropdown[16] = import('dropdown16', 'POST', true, 'inherit'); // Couleur texte option visitée menu déroulant
		$dropdown[17] = import('dropdown17', 'POST', true, 'auto'); // Largeur panneau menu déroulant linéaire
		$dropdown[18] = import('dropdown18', 'POST', true, 'auto'); // Hauteur panneau option menu déroulant linaire
		$dropdown[19] = import('dropdown19', 'POST', true, 'transparent'); // Couleur arrière-plan option menu déroulant linaire
		$dropdown[21] = import('dropdown21', 'POST', true, 'inherit'); // Couleur de bordure option menu déroulant linéaire
		$dropdown[22] = import('dropdown22', 'POST', true, '0px'); // Taille de bordure option menu déroulant linéaire
		$dropdown[23] = import('dropdown23', 'POST', true, 'solid'); // Style de bordure option menu déroulant linéaire
		$dropdown[24] = import('dropdown24', 'POST', true, '0px'); // Taille des coins arrondis option menu déroulant linéaire
		$dropdown[25] = import('dropdown25', 'POST', true, 'inherit'); // Couleur texte sous-option menu déroulant
		$dropdown[26] = import('dropdown26', 'POST', true, 'inherit'); // Couleur texte panneau menu déroulant linéaire
		$dropdown[27] = import('dropdown27', 'POST', true, 'transparent'); // Couleur arrière-plan option survolée menu déroulant
		$dropdown[29] = import('dropdown29', 'POST', true, 'inherit'); // Couleur texte option survolée menu déroulant
        
        $tabs[0] = import('tabs0', 'POST', true, 'inherit'); // Couleur des textes des onglets inactifs
        $tabs[1] = import('tabs1', 'POST', true, 'transparent'); // Couleur arrière-plan des onglets inactifs
        $tabs[2] = import('tabs2', 'POST', true, 'inherit'); // Couleur des bordures des onglets inactifs
        $tabs[3] = import('tabs3', 'POST', true, '0px'); // Taille des bordures des onglets inactifs
        $tabs[4] = import('tabs4', 'POST', true, '0px'); // Taille des coins arrondis des onglets inactifs
        $tabs[5] = import('tabs5', 'POST', true, 'transparent'); // Couleur arrière-plan des onglets actifs
        $tabs[6] = import('tabs6', 'POST', true, 'inherit'); // Couleur des textes des onglets actifs
        $tabs[7] = import('tabs7', 'POST', true, 'transparent'); // Couleur arrière-plan des panneaux des onglets
        $tabs[8] = import('tabs8', 'POST', true, 'inherit'); // Couleur des bordures des panneaux des onglets
        $tabs[9] = import('tabs9', 'POST', true, '0px'); // Taille des bordures des panneaux des onglets
        $tabs[10] = import('tabs10', 'POST', true, '0px'); // Taille des coins arrondis des panneaux des onglets
        $tabs[11] = import('tabs11', 'POST', true, 'inherit'); // Couleur des textes des accordéons inactifs
        $tabs[12] = import('tabs12', 'POST', true, 'transparent'); // Couleur arrière-plan des accordéons inactifs
        $tabs[13] = import('tabs13', 'POST', true, 'inherit'); // Couleur des bordures des accordéons inactifs
        $tabs[14] = import('tabs14', 'POST', true, '0px'); // Taille des bordures des accordéons inactifs
        $tabs[15] = import('tabs15', 'POST', true, '0px'); // Taille des coins arrondis des accordéons inactifs
        $tabs[16] = import('tabs16', 'POST', true, 'transparent'); // Couleur arrière-plan des accordéons actifs
        $tabs[17] = import('tabs17', 'POST', true); // Couleur des textes des accordéons actifs
        $tabs[18] = import('tabs18', 'POST', true, 'transparent'); // Couleur arrière-plan des panneaux des accordéons
        $tabs[19] = import('tabs19', 'POST', true, 'inherit'); // Couleur des bordures des panneaux des accordéons
        $tabs[20] = import('tabs20', 'POST', true, '0px'); // Taille des bordures des panneaux des accordéons
        $tabs[21] = import('tabs21', 'POST', true, '0px'); // Taille des coins arrondis des panneaux des accordéons
        $tabs[22] = import('tabs22', 'POST', true, 'transparent'); // Couleur pour le fondu des fenêtre modales
        $tabs[23] = import('tabs23', 'POST', true); // Couleur des textes des fenêtre modales
        $tabs[24] = import('tabs24', 'POST', true, 'transparent'); // Couleur arrière-plan des fenêtre modales
        $tabs[25] = import('tabs25', 'POST', true, 'inherit'); // Couleur des bordures des fenêtre modales
        $tabs[26] = import('tabs26', 'POST', true, '0px'); // Taille des bordures des fenêtre modales
        $tabs[27] = import('tabs27', 'POST', true, '0px'); // Taille des coins arrondis des fenêtre modales
        $tabs[28] = import('tabs28', 'POST', true, 'transparent'); // Couleur arrière-plan des onglets survolés
        $tabs[29] = import('tabs29', 'POST', true, 'inherit'); // Couleur des textes des onglets survolés
        $tabs[30] = import('tabs30', 'POST', true, 'transparent'); // Couleur arrière-plan des accordéons survolés
        $tabs[31] = import('tabs31', 'POST', true, 'inherit'); // Couleur des textes des accordéons survolés

        $other[0] = import('other0', 'POST', true, 'inherit'); // Couleur des textes visites du jour
        $other[1] = import('other1', 'POST', true, 'transparent'); // Couleur arrière-plan visites du jour
        $other[2] = import('other2', 'POST', true, 'inherit'); // Couleur des bordures visites du jour
        $other[3] = import('other3', 'POST', true, '0px'); // Taille des bordures visites du jour
        $other[4] = import('other4', 'POST', true, '0px'); // Taille des coins arrondis visites du jour
        $other[5] = import('other5', 'POST', true, '0'); // Marges externes logo
        $other[6] = import('other6', 'POST', true, '0'); // Marges internes logo
        $other[7] = import('other7', 'POST', true, '0'); // Marges externes bannières
        $other[8] = import('other8', 'POST', true, '0'); // Marges internes bannières
        $other[9] = import('other9', 'POST', true, 'inherit'); // Couleur des bordures citations de texte
        $other[10] = import('other10', 'POST', true, '0px'); // Taille des bordures citations de texte
		$other[11] = import('other11', 'POST', true, 'dashed'); // Style de bordure citations de texte
        $other[12] = import('other12', 'POST', true, 'transparent'); // Couleur arrière-plan auteur de la citation
        $other[13] = import('other13', 'POST', true, 'inherit'); // Couleur des textes auteur de la citation
        $other[14] = import('other14', 'POST', true, 'transparent'); // Couleur arrière-plan info bulle
        $other[15] = import('other15', 'POST', true, 'inherit'); // Couleur des bordures info bulle
        $other[16] = import('other16', 'POST', true, '0px'); // Taille des bordures info bulle
        $other[17] = import('other17', 'POST', true, '0px'); // Taille des coins arrondis info bulle
        $other[18] = import('other18', 'POST', true, 'transparent'); // Couleur arrière-plan cryptogramme
        $other[19] = import('other19', 'POST', true, 'inherit'); // Couleur des textes cryptogramme
        $other[20] = import('other20', 'POST', true, 'inherit'); // Couleur des bordures cryptogramme
        $other[21] = import('other21', 'POST', true, '0px'); // Taille des bordures cryptogramme
        $other[22] = import('other22', 'POST', true, '0px'); // Taille des coins arrondis cryptogramme
        $other[23] = import('other23', 'POST', true, 'transparent'); // Couleur arrière-plan citation de code
        $other[24] = import('other24', 'POST', true, '#FFFFFF'); // Couleur arrière-plan CKEditor
        $other[25] = import('other25', 'POST', true, '#000000'); // Couleur des textes CKEditor
        $other[26] = import('other26', 'POST', true, '12px'); // Taille des textes CKEditor
        $other[27] = import('other27', 'POST', true, 'inherit'); // Taille des textes blocs infos
        $other[28] = import('other28', 'POST', true, '#000000'); // Couleur arrière-plan bandeau acceptation cookies
        $other[29] = import('other29', 'POST', true, '#FFFFFF'); // Couleur des textes bandeau acceptation cookies
        $other[30] = import('other30', 'POST', true, '16px'); // Taille des textes bandeau acceptation cookies
        
        $opacity[0] = import('opacity0', 'POST', true, '1'); // Opacité arrière-plan entête
        $opacity[1] = import('opacity1', 'POST', true, '1'); // Opacité arrière-plan bas de page
        $opacity[2] = import('opacity2', 'POST', true, '1'); // Opacité arrière-plan pied de page
        $opacity[3] = import('opacity3', 'POST', true, '1'); // Opacité arrière-plan menu icônes
        $opacity[4] = import('opacity4', 'POST', true, '1'); // Opacité arrière-plan colonne gauche
        $opacity[5] = import('opacity5', 'POST', true, '1'); // Opacité arrière-plan colonne droite
        $opacity[6] = import('opacity6', 'POST', true, '1'); // Opacité arrière-plan colonnes blog
        $opacity[7] = import('opacity7', 'POST', true, '1'); // Opacité arrière-plan zone principale
        $opacity[8] = import('opacity8', 'POST', true, '1'); // Opacité arrière-plan colonne centrale
        $opacity[9] = import('opacity9', 'POST', true, '1'); // Opacité arrière-plan titres boîtes centrales
        $opacity[10] = import('opacity10', 'POST', true, '1'); // Opacité arrière-plan tables boîtes centrales
        $opacity[11] = import('opacity11', 'POST', true, '1'); // Opacité arrière-plan titres boîtes latérales
        $opacity[12] = import('opacity12', 'POST', true, '1'); // Opacité arrière-plan tables boîtes latérales
        $opacity[15] = import('opacity15', 'POST', true, '1'); // Opacité arrière-plan zone au-dessus
        $opacity[16] = import('opacity16', 'POST', true, '1'); // Opacité arrière-plan zone édito
        $opacity[17] = import('opacity17', 'POST', true, '1'); // Opacité arrière-plan zone au-dessous
        $opacity[18] = import('opacity18', 'POST', true, '1'); // Opacité arrière-plan header
        $opacity[19] = import('opacity19', 'POST', true, '1'); // Opacité arrière-plan citations
        $opacity[22] = import('opacity22', 'POST', true, '1'); // Opacité arrière-plan auteur de la citation
        $opacity[23] = import('opacity23', 'POST', true, '1'); // Opacité arrière-plan citation de code
        
        $marge[9] = import('marge9', 'POST', true, '0'); // Marges externes titre boîtes centrales
        $marge[10] = import('marge10', 'POST', true, '0'); // Marges internes titre boîtes centrales
        $marge[11] = import('marge11', 'POST', true, '0'); // Marges externes boîtes centrales
        $marge[12] = import('marge12', 'POST', true, '0'); // Marges internes boîtes centrales
        $marge[13] = import('marge13', 'POST', true, '0'); // Marges externes titre boîtes latérales
        $marge[14] = import('marge14', 'POST', true, '0'); // Marges internes titre boîtes latérales
        $marge[15] = import('marge15', 'POST', true, '0'); // Marges externes boîtes latérales
        $marge[16] = import('marge16', 'POST', true, '0'); // Marges internes boîtes latérales
        $marge[24] = import('marge24', 'POST', true, '0'); // Marges internes du bandeau TOP
        $marge[25] = import('marge25', 'POST', true, '0'); // Marges internes du bandeau MAIN
        $marge[26] = import('marge26', 'POST', true, '0'); // Marges internes du bandeau BOTTOM
        $marge[27] = import('marge27', 'POST', true, '0'); // Marges internes du bandeau FOOTER
        $marge[28] = import('marge28', 'POST', true, '0'); // Marges internes zone au-dessus
        $marge[29] = import('marge29', 'POST', true, '0'); // Marges internes zone éditorial
        $marge[30] = import('marge30', 'POST', true, '0'); // Marges internes zone au-dessous
        $marge[33] = import('marge33', 'POST', true, '4px 0 0 0'); // Marges externes menu latéral
        $marge[34] = import('marge34', 'POST', true, '0 4px 2px'); // Marges internes menu latéral
        $marge[35] = import('marge35', 'POST', true, '2px 0 0 10px'); // Marges externes options menu latéral
        $marge[36] = import('marge36', 'POST', true, '3px 5px'); // Marges internes options menu latéral
        $marge[37] = import('marge37', 'POST', true, '-2px 5px 0 10px'); // Marges externes icône menu latéral
        $marge[38] = import('marge38', 'POST', true, '3px 4px 0 0'); // Marges externes icône drapeau
	}
    
	include 'inc/confskin.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
    }

    if($regpart == 2) {
	    $boutoncenter = '';
        $messreg2 = " OK";
        $cssbody2 = $body[3].' '.$body[4].(empty($body[2]) ? '' : ' fixed');
        $cssbody8 = empty($body[8]) ? '' : UrlBKimg($body[8]).$body[9].' bottom';
        $cssbody3 = empty($body[1]) 
          ? (empty($body[8]) ? '' : "\n".'    background: '.$cssbody8.';') 
          : "\n".'    background: '.UrlBKimg($body[1]).$cssbody2.(!empty($body[8]) ? ', '.$cssbody8 : '').';';
        $css5  = empty($page[5]) ? "\n".'    background-color: transparent;' : "\n".'    background-color: '.hex2rgba($page[5], $opacity[2]).';';
        $css8  = empty($titre[8]) ? '' : "\n".'    background: '.UrlBKimg($titre[8]).';';
        $css9  = empty($titre[9]) ? '' : "\n".'    background: '.UrlBKimg($titre[9]).';';
        $css10 = empty($calendar[0]) ? '    background-color: inherit;' : '    background-color: '.$calendar[0].';';
        $css11 = $boutoncenter != '' ? '    border: 0px;'."\n".'    height: 20px;'."\n".'    margin: 2px 0px;'."\n".'    padding-bottom: 2px;'."\n".'    vertical-align: top;'."\n".'    text-decoration: none;'."\n".'    background-color: transparent;'."\n".'    background-image: url('.$boutoncenter.');'."\n".'    background-repeat: repeat-x;'."\n".'    font-size: 9px;' : '';
        $css14 = "\n".'    '.getBorder($bordure[4], $bordure[31], $bordure[3])."\n".'    border-radius: '.$bordure[5].';';
        $css15 = "\n".'    '.getBorder($bordure[8], $bordure[34], $bordure[7])."\n".'    border-radius: '.$bordure[9].';';
        $css16 = "\n".'    '.getBorder($bordure[11], $bordure[35], $bordure[10])."\n".'    border-radius: '.$bordure[12].';';
        $css17 = "\n".'    '.getBorder($bordure[14], $bordure[36], $bordure[13])."\n".'    border-radius: '.$bordure[15].';';
        $css18 = "\n".'    '.getBorder($bordure[17], $bordure[37], $bordure[16])."\n".'    border-radius: '.$bordure[18].';';
        $css20 = empty($page[29]) ? "\n".'    background-color: transparent;' : (empty($page[30]) ? "\n".'    background-color: '.hex2rgba($page[29], $opacity[0]).';' : '');
        $css21 = "\n".'    '.getBorder($bordure[20], $bordure[29], $bordure[19])."\n".'    border-radius: '.$bordure[21].';';
        $css22 = "\n".'    background: '.(empty($page[29]) ? '' : hex2rgba($page[29], $opacity[0]).' ').';';
        $css23 = empty($page[31]) ? "\n".'    background-color: transparent;' : (empty($page[32]) ? "\n".'    background-color: '.hex2rgba($page[31], $opacity[1]).';' : '');
        $css24 = "\n".'    '.getBorder($bordure[23], $bordure[30], $bordure[22])."\n".'    border-radius: '.$bordure[24].';';
        $css25 = "\n".'    background: '.(empty($page[31]) ? '' : hex2rgba($page[31], $opacity[1]).' ').';';
        $css26 = "\n".'    '.getBorder($bordure[27], $bordure[32], $bordure[26])."\n".'    border-radius: '.$bordure[28].';';
        $css27 = empty($page[33]) ? (empty($page[34]) ? '' : "\n".'    background-color: '.hex2rgba($page[34], $opacity[3]).';') : "\n".'    background: '.UrlBKimg($page[33]).';';
        $css29 = empty($annuaire[0]) ? "\n".'    background-color: transparent;' : "\n".'    background-color: '.$annuaire[0].';';
        $css30 = "\n".'    '.getBorder($annuaire[5], $bordure[39], $annuaire[4])."\n".'    border-radius: '.$annuaire[6].';';    
        $css31 = empty($annuaire[8]) ? "\n".'    background-color: transparent;' : "\n".'    background-color: '.$annuaire[8].';';
        $css32 = empty($annuaire[9]) ? "\n".'    background-color: transparent;' : "\n".'    background-color: '.$annuaire[9].';';
        $css34 = "\n".'    '.getBorder($dropdown[8], $dropdown[9], $dropdown[7])."\n".'    border-radius: '.$dropdown[10].';';
        $css35 = "\n".'    '.getBorder($dropdown[22], $dropdown[23], $dropdown[21])."\n".'    border-radius: '.$dropdown[24].';';
        $css36 = empty($dropdown[6]) ? (empty($dropdown[5]) ? '' : "\n".'    background: '.$dropdown[5].';') : '    background: '.UrlBKimg($dropdown[6]).';';
        $css37 = empty($dropdown[13]) ? (empty($dropdown[12]) ? '' : "\n".'    background: '.$dropdown[12].';') : '    background: '.UrlBKimg($dropdown[13]).';';
        $css38 = empty($dropdown[15]) ? (empty($dropdown[14]) ? '' : "\n".'    background: '.$dropdown[14].';') : '    background: '.UrlBKimg($dropdown[15]).';';
        $css40 = empty($titre[14]) ? '' : "\n".'    background-color: '.hex2rgba($titre[14], $opacity[4]).';';
        $css41 = "\n".'    '.getBorder($titre[17], $titre[18], $titre[16])."\n".'    border-radius: '.$titre[19].';';
        $css43 = "\n".'    background-color: '.hex2rgba($titre[21], $opacity[5]).';';
        $css44 = "\n".'    '.getBorder($titre[24], $titre[25], $titre[23])."\n".'    border-radius: '.$titre[26].';';
        $css45 = empty($titre[28]) ? (empty($titre[27]) ? '' : "\n".'    background-color: '.hex2rgba($titre[27], $opacity[6]).';') : '    background: '.UrlBKimg($titre[28]).';';
        $css46 = "\n".'    '.getBorder($titre[30], $titre[31], $titre[29])."\n".'    border-radius: '.$titre[32].';';
        $css60 = "\n".'    '.getBorder($titre[37], $titre[38], $titre[36])."\n".'    border-radius: '.$titre[39].';';
        $css61 = "\n".'    '.getBorder($titre[44], $titre[45], $titre[43])."\n".'    border-radius: '.$titre[46].';';
        $css63 = "\n".'    '.getBorder($titre[57], $titre[58], $titre[56])."\n".'    border-radius: '.$titre[59].';';
        $css64 = "\n".'    '.getBorder($titre[63], $titre[64], $titre[62])."\n".'    border-radius: '.$titre[65].';';
        $css65 = "\n".'    '.getBorder($titre[69], $titre[70], $titre[68])."\n".'    border-radius: '.$titre[71].';';
        $css66 = "\n".'    '.getBorder($titre[75], $titre[76], $titre[74])."\n".'    border-radius: '.$titre[77].';';
        $css67a = empty($titre[34]) ? "\n".'    background-color: transparent;' : (empty($titre[35]) ? "\n".'    background-color: '.hex2rgba($titre[34], $opacity[7]).';' : '');
        $css67b = "\n".'    background: '.(empty($titre[34]) ? '' : hex2rgba($titre[34], $opacity[7]).' ').';';
        $css68a = empty($titre[41]) ? "\n".'    background-color: transparent;' : (empty($titre[42]) ? "\n".'    background-color: '.hex2rgba($titre[41], $opacity[8]).';' : '');
        $css68b = "\n".'    background: '.(empty($titre[41]) ? '' : hex2rgba($titre[41], $opacity[8]).' ').';';
        $css71a = empty($titre[60]) ? "\n".'    background-color: transparent;' : (empty($titre[61]) ? "\n".'    background-color: '.hex2rgba($titre[60], $opacity[15]).';' : '');
        $css71b = "\n".'    background: '.(empty($titre[60]) ? '' : hex2rgba($titre[60], $opacity[15]).' ').';';
        $css72a = empty($titre[66]) ? "\n".'    background-color: transparent;' : (empty($titre[67]) ? "\n".'    background-color: '.hex2rgba($titre[66], $opacity[16]).';' : '');
        $css72b = empty($titre[67]) ? '' : "\n".'    background: '.(empty($titre[66]) ? '' : hex2rgba($titre[66], $opacity[16]).' ').UrlBKimg($titre[67]).';';
        $css73a = empty($titre[72]) ? "\n".'    background-color: transparent;' : (empty($titre[73]) ? "\n".'    background-color: '.hex2rgba($titre[72], $opacity[17]).';' : '');
        $css73b = "\n".'    background: '.(empty($titre[72]) ? '' : hex2rgba($titre[72], $opacity[17]).' ').';';
        $css74 = empty($dropdown[28]) ? (empty($dropdown[27]) ? '' : "\n".'    background: '.$dropdown[27].';') : '    background: '.UrlBKimg($dropdown[28]).';';
        $css75 = empty($page[43]) ? "\n".'    background-color: transparent;' : (empty($page[44]) ? "\n".'    background-color: '.hex2rgba($page[43], $opacity[18]).';' : '');
        $css76 = "\n".'    '.getBorder($bordure[41], $bordure[43], $bordure[40])."\n".'    border-radius: '.$bordure[42].';';
        $css77 = "\n".'    background: '.(empty($page[43]) ? '' : hex2rgba($page[43], $opacity[18]).' ').';';
        $css78 = empty($citation[11]) ? (empty($citation[10]) ? '' : "\n".'    background-color: '.hex2rgba($citation[10], $opacity[19]).';') : "\n".'    background: '.UrlBKimg($citation[11]).';';
        $css79 = "\n".'    '.getBorder($citation[13], $citation[15], $citation[12])."\n".'    border-radius: '.$citation[14].';';
        $css80 = $page[56] != 'transparent' ? '#slide1 {'."\n".'    background: '.$page[56].';'."\n".'}'."\n" :
          (empty($page[24]) ? '' : "\n".'#slide1 {'."\n".'    background: '.UrlBKimg($page[24]).' center 0 no-repeat fixed;'."\n".'    background-size: cover;'."\n".'}'."\n");
        $css81 = $page[57] != 'transparent' ? '#slide2 {'."\n".'    background: '.$page[57].';'."\n".'}'."\n" :
          (empty($page[25]) ? '' : '#slide2 {'."\n".'    background: '.UrlBKimg($page[25]).' center 0 no-repeat fixed;'."\n".'    background-size: cover;'."\n".'}'."\n");
        $css82 = $page[58] != 'transparent' ? '#slide3 {'."\n".'    background: '.$page[58].';'."\n".'}'."\n" :
          (empty($page[26]) ? '' : '#slide3 {'."\n".'    background: '.UrlBKimg($page[26]).' center 0 no-repeat fixed;'."\n".'    background-size: cover;'."\n".'}');

        /**********************************
         * Construction de la feuille CSS *
         **********************************/
        $csslist = "/* ---------  CSS generated for ".$mycss."  ----------- */

".$tfonts."
@font-face {
  font-family: \"fontello\";
  src: url(\"font/fontello.eot?33978178\");
  src: url(\"font/fontello.eot?33978178#iefix\") format(\"embedded-opentype\"),
       url(\"font/fontello.woff?33978178\") format(\"woff\"),
       url(\"font/fontello.ttf?33978178\") format(\"truetype\"),
       url(\"font/fontello.svg?33978178#fontello\") format(\"svg\");
  font-weight: normal;
  font-style: normal;
}

html { /*  document */
    font-size: 62.5%;
    color: ".$texte[9].";
    background-color: ".$body[0].";
}
body { /*  corps du document */
    font: ".(empty($page[40]) ? 'inherit' : trim($page[41]." ".$page[40]." ".$page[39])).";
    background-color: ".$body[0].";
    color: ".$texte[9].";
}".(empty($cssbody3) ? '' : "\n".'.body { '.$cssbody3.' }')."
/************
 * Général */
a { /* lien */
    color: ".$lien[0].";
    background: inherit;
    text-decoration: none;
}
a.titre { /* lien titres */
    color: ".$texte[0].";
    background-color: inherit;
    text-decoration: none;
}
a:hover { /* lien survolé */
    color: ".$lien[1].";
    text-decoration: none;
    font-weight: normal;
    background-color: inherit;
}
h1 {
    font-size: 24px;
}
h2 {
    font-size: 18px;
}
h3 {
    font-size: 16px;
}
h4 {
    font-size: 14px;
}
p { /* paragraphe */
    margin: 4px 0;
    color: inherit;
    background: inherit;
}
hr { /* ligne horizontale */
    height: ".$barre[1].";
    ".getBorder($barre[1], $barre[2], $barre[0])."
    width: 98%;
}
ul, ol, dl, dd, dt { /* listes */
    padding: 0;
    margin: 0;
}
img, object, embed, canvas, video, audio, picture {
    border-style: none;
    max-width: 100%;
    height: auto !important;
}
.blink { animation: blink 1.2s infinite; }
@keyframes blink {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}
/******************************************
* Mise en page des blocks div principaux */
#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    cursor: pointer;
}
#header { /* header */
    color: inherit;".$css75.$css76.$css77."
    z-index: 0;
}
.fixed-top-line {
    margin-top: 0;
    padding: 6px 0;
    ".getBorder($bordure[41], $bordure[43], $bordure[40])."
    background-color: ".hex2rgba($page[43], $opacity[18]).";
}
#TopBoxes { /* area between header and main area */
    padding: ".(empty($marge[24]) ? 0 : $marge[24]).";
    color: inherit;
    max-width: ".$titre[78]." !important;".$css20.$css21.$css22."
}
#MainContent { /* main area */
    margin: 4px 0;
    padding: ".(empty($marge[25]) ? 0 : $marge[25])." !important;
    max-width: ".$titre[79]." !important;".$css60.$css67a.$css67b."
}
#LeftBoxes { /* left boxes area */"
    .$css40.$css41."
    order: ".$body[10].";
}
#CenterBoxes { /* center area */"
    .$css61.$css68a.$css68b."
    order: ".$body[11].";
}
#RightBoxes { /* right boxes area */"
    .$css43.$css44."
    order: ".$body[12].";
}
#AboveBoxes { /* boxes above in center area */
    padding: ".(empty($marge[28]) ? 0 : $marge[28]).";".$css71a.$css71b.$css64."
}
#EditoBoxes { /* boxes that appear in the home page - HOMEPAGE CONFIG */
    padding: ".(empty($marge[29]) ? 0 : $marge[29]).";".$css72a.$css65."
}
#UnderBoxes { /* boxes under center area */
    padding: ".(empty($marge[30]) ? 0 : $marge[30]).";".$css73a.$css73b.$css66."
}
#BottomBoxes { /* area between main and footer */
    padding: ".(empty($marge[26]) ? 0 : $marge[26])." !important;
    color: inherit;
    max-width: ".$titre[80]." !important;".$css23.$css24.$css25."
}
#footer { /* footer Copyright */
    font: ".$page[47]." ".(empty($page[46]) ? 'inherit' : $page[46])." ".$page[45].";
    text-align: ".$texte[13].";
    color: ".$texte[8].";
    padding: ".(empty($marge[27]) ? 0 : $marge[27]).";
    margin: 0 auto;
    height: ".$page[21].";".$css5.$css14."
    max-width: ".(empty($titre[81]) ? '100%' : $titre[81])." !important;
}
.copyright {
    background-color: transparent;
    color: ".$texte[8].";
    text-align: ".$texte[13].";
}
.top {
    background: transparent;
    color: ".$texte[8].";
    text-align: ".$texte[13].";
    font: 1.2em ".$page[39].";
    font-weight: bold;
}
a.top span { font-family: fontello; }
.txtspeC { margin: 12px 0 4px; }
.txtspeLR { margin: 8px 0 4px; }
.txtspeG { padding: 10px 0 0; }
.timer {
    background-color: transparent;
    color: ".$texte[8].";
    font: italic 0.9em ".$page[39].";
    text-align: ".$texte[13].";
    padding: 8px;
}
#skinCopyright {
    width: 100%;
    margin-top: 2px;
    color: ".$texte[8].";
    text-align: ".$texte[13].";
}
#BlogLeftBoxes { /* blog left column */
    height: 100%;".$css45.$css46."
    order: ".$body[13].";
}
#BlogRightBoxes { /* blog right boxes */
    height: 100%;".$css45.$css46."
    order: ".$body[15].";
}
";
$csslist .= "
/***********************
 * Effet de parallaxe */"
 .$css80.$css81.$css82."
.slide_inside {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
}
#slide1 .slide_inside { min-height: 0px; }
#slide2 .slide_inside { min-height: 0px; }
#slide3 .slide_inside { min-height: 0px; }
#paranav {
  position: fixed;
  top: ".$page[52].";
  ".($page[50] == 'left' ? 'left: 6px' : 'right: 20px').";
  list-style: none;
  z-index: 999;
}
#paranav li {
  margin: 0 0 15px;
}
#paranav li a {
  display: block;
  width: ".($page[7] == 'on' ? $page[63] : '10px').";
  height: ".($page[7] == 'on' ? $page[64] : '10px').";
  border-radius: ".($page[7] == 'on' ? '0px' : '10px').";
  background-color: ".($page[7] == 'on' ? 'transparent' : $page[51]).";
  border: ".($page[7] == 'on' ? 'none' : 'solid 2px '.$bordure[44]).";
}".($page[7] == 'on' ? '
#paranav li:nth-child(1) a {
  background: url(img/para1.png);
}
#paranav li:nth-child(2) a {
  background: url(img/para2.png);
}
#paranav li:nth-child(3) a {
  background: url(img/para3.png);
}' : '')."
/****************************
 * Mise en page des blocks */
div.logo { /* block logo */
    margin: ".(empty($other[5]) ? 0 : $other[5]).";
    padding: ".(empty($other[6]) ? 0 : $other[6])." !important;
    text-align: center;
}
div.banner { /* block bannière */
    background-repeat: no-repeat;
    margin: ".(empty($other[7]) ? 0 : $other[7]).";
    padding: ".(empty($other[8]) ? 0 : $other[8]).";
    text-align: center;
    position: inherit;
    z-index: 10;
}
/*************************
 * block boite citation */
div.quote { /* block citation */
    margin: ".(empty($citation[16]) ? 0 : $citation[16]).";
    padding: ".(empty($citation[17]) ? 0 : $citation[17]).";
    text-align: center;".$css78.$css79."
}
div.quote span.labelcita { /* label */
    font: bold ".(empty($citation[1]) ? 'inherit' : $citation[1])." ".$citation[0].";
    color: ".$citation[2].";
    background: transparent;
    margin: 0;
    padding: 0 8px;
}
div.quote span.cita { /* texte */
    font: ".$citation[3]." ".(empty($citation[1]) ? 'inherit' : $citation[1])." ".$citation[0].";
    color: ".$citation[2].";
    background: transparent;
    font-style: normal;
    text-align: center;
    border: 0px;
    margin: 0;
    padding: 0 8px;
}
div.quote span.author { /* auteur */
    font: italic ".(empty($citation[1]) ? 'inherit' : $citation[1])." ".$citation[0].";
    color: ".$citation[2].";
    background: transparent;
}
#BottomBoxes .quote span { color: ".$titre[13]." !important; }
";
$csslist .= "
/*********************************
 * bloc horizontal Menu sections */
nav.menuIcons {".$css26.$css27."
}
.menuIcons.navbar .navbar-toggler {  /* bordure icône de la barre en mobile */
    border-color: ".hex2rgba($lien[5], 0.9).";
    border-radius: 0.35rem;
    margin-right: .5rem;
}
nav.menuIcons.navbar.navbar-light .navbar-toggler-icon { /* couleur texte icône de la barre en mobile (stroke) */
	width: 2em !important;
	height: 2em !important;
	background-image: url(\"data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'30\' height=\'30\' viewBox=\'0 0 448 512\' %3e%3cpath stroke=\'".hex2rgba($lien[4], 0.9)."\' stroke-linecap=\'round\' stroke-miterlimit=\'10\' stroke-width=\'4\' d=\'M16 132h416c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H16C7.2 60 0 67.2 0 76v40c0 8.8 7.2 16 16 16zm0 160h416c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h416c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16z\'/%3e%3c/svg%3e\") !important;
}
nav.menuIcons a.menuiconflag i { margin: 5px 8px 0 0; }
nav.menuIcons ul li a span { /* lien */
    background-color: ".$lien[7].";
    color: ".$lien[4].";
    margin: ".(empty($lien[15]) ? 0 : $lien[15]).";
    padding: ".(empty($lien[14]) ? 0 : $lien[14]).";
    ".getBorder($lien[11], $lien[12], $lien[10])."
    border-radius: ".$lien[13].";
    font: ".$page[37]." ".(empty($page[19]) ? 'inherit' : $page[19])." ".$page[18].";
    line-height: 3.2rem;
}
nav.menuIcons ul li a span.active { /* lien actif */
    background-color: ".$lien[8].";
    color:".$lien[9].";
    padding: ".(empty($lien[14]) ? 0 : $lien[14]).";
    ".getBorder($lien[11], $lien[12], $lien[10])."
    border-radius: ".$lien[13].";
}
nav.menuIcons ul li a:hover span { /* lien survolé*/
    background-color: ".$lien[6].";
    color: ".$lien[5].";
    margin: ".(empty($lien[15]) ? 0 : $lien[15]).";
    padding: ".(empty($lien[14]) ? 0 : $lien[14]).";
    ".getBorder($lien[11], $lien[12], $lien[10])."
    border-radius: ".$lien[13].";
}
.mi-title {
    font-size: 1.8rem;
    color: ".$lien[4].";
}
/*************************************
 * bloc boîte latérale Menu Sections */
span.menuIcons_flag a i { margin-top: 4px; }
.titleboxmenu { padding-left: 28px; }
ul.boxmenu { /* block liste */
    margin: 0;
    padding: 5px 0;
    list-style: none;
}
ul.boxmenu li { /* items liste */
    margin-bottom: 10px;
}
ul.boxmenu li .cur_item { /* items actifs liste */
    margin-bottom: 10px;
}
ul.boxmenu li img { /* icons */
    vertical-align: middle;
    margin-right: 10px;
    height: auto;
    max-height: 56px;
}
/****************************
 * Menu navigation latérale */
.sidenav, .sideconnect {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 999;
    top: 0;
    right: -12px;
    background-color: ".hex2rgba($lien[19], 1).";
    border-left: ".$lien[21]." solid ".$lien[20].";
    padding-top: 42px;
    overflow-x: hidden;
    transition: 0.8s;
}
.sideconnect .tblbox, .sidenav ul { padding-bottom: 32px; }
.sidenav li a div {
    padding: 2px 8px;
    width: 92%;
    font: ".$page[69]." ".(empty($page[70]) ? 'inherit' : $page[70])." ".$page[68].";
    ".getBorder($lien[33], $lien[35], $lien[32])."
    border-radius: ".$lien[34].";
    background-color: ".hex2rgba($lien[31], 1).";
    color: ".$lien[22].";
}
.sidenav li a:hover div {
    ".getBorder($lien[33], $lien[35], $lien[32])."
    border-radius: ".$lien[34].";
    background-color: ".hex2rgba($lien[24], 1).";
    color: ".$lien[23].";
    transition: 0.8s;
}
.sidenav .closebtn, .sideconnect .closebtn {
    position: absolute;
    top: 12px;
    right: 40px;
    font-size: 24px;
    color: ".$lien[36].";
}
.smlogo {
    font: ".$titre[48]." ".$titre[49]." ".$titre[47]." !important;
    color: ".$titre[50].";
    background-color: ".hex2rgba($titre[51], 1).";
    ".getBorder($titre[53], $titre[54], $titre[52])."
    border-radius: ".$titre[55].";
}
.sideconnect .tblbox { border: 0; margin: 4px 18px 0 0; }
#GY_connect { padding-left: 10px; max-width: 100%; }
.sidemenu {
    background-color: ".hex2rgba($lien[25], 1).";
    margin: ".$marge[33].";
    padding: ".$marge[34].";
    float: right;
    ".getBorder($lien[27], $lien[29], $lien[26])."
    border-radius: ".$lien[28].";
    position: relative;
    z-index: 99;
}
.sidemenu div, .sidemenu div a {
    cursor: pointer;
    font: ".$page[66]." ".(empty($page[67]) ? 'inherit' : $page[67])." ".$page[65].";
    background-color: ".hex2rgba($lien[30], 1).";
    color: ".$lien[16].";
}
.sidemenu div.sidetexte:hover, .sidemenu div.sidetexte a:hover {
    background-color: ".hex2rgba($lien[18], 1).";
    color: ".$lien[17].";
}
.sidemenu > div { float: right; }
.sidemenu div.sidetexte { margin: ".$marge[35]."; padding: ".$marge[36]."; }
.sidemenu div.sideicon {
    font-size: 24px;
    margin: ".$marge[37].";
    border: thin solid ".$lien[16].";
}
.sideflag a.menuiconflag i { margin: ".$marge[38]."; }
.tblbox.SMI { background: transparent; border: 0px; }
/****************
 * Fil d'ariane */
.ariane { /* bloc fil d'ariane */
    text-align: left;
    padding: 4px;
    margin: 0px;
    color: ".$citation[5].";
}
div.ariane span.arianeOn a { /* adresses actives */
    font-style: italic;
    color: ".$citation[4].";
}
div.ariane span.arianeOff { /* page courante */
    font-style: italic;
    color: ".$citation[5].";
}
#BottomBoxes .ariane, #BottomBoxes .ariane span, 
#BottomBoxes span.arianeOn a { color: ".$titre[13]." !important; }
";
$csslist .= "
/****************************************
 * Mise en page des blocs dans le corps */
/* bloc boîtes latérales */
.htable {
    margin-bottom: 8px;
}
.htable1 {
    margin-bottom: 8px;
}
.titrebox { /* Titre */
    background-color: ".hex2rgba($titre[5], $opacity[11]).";".$css9.$css17."
    margin: ".(empty($marge[13]) ? 0 : $marge[13]).";
    padding: ".(empty($marge[14]) ? 0 : $marge[14]).";
    white-space: normal;
    word-wrap: break-word;
    font: ".$titre[11]." ".(empty($titre[7]) ? 'inherit' : $titre[7])." ".$titre[6].";
    color: ".$titre[4].";
    text-align: ".(empty($texte[11]) ? 'left' : $texte[11]).";
    cursor: pointer;
}
.tblbox {  /* Corps */
    background-color: ".hex2rgba($texte[6], $opacity[12]).";".$css18."
    margin: ".(empty($marge[15]) ? 0 : $marge[15]).";
    padding: ".(empty($marge[16]) ? 0 : $marge[16]).";
    color: inherit;
    text-align:left;
    line-height: ".$page[11].";
}
.tblboxover { /* Corps survolé */
    background-color: ".hex2rgba($texte[7], $opacity[12]).";
}
#BottomBoxes .titrebox {
    background-color: ".$titre[15].";
    color: ".$titre[10].";
}
#BottomBoxes .tblbox {
    background-color: ".$titre[20].";
    color: ".$titre[13]." !important;
}
/* bloc boîtes centrales */
.titre {
    background-color: ".hex2rgba($titre[1], $opacity[9]).";".$css8.$css15."
    margin: ".(empty($marge[9]) ? 0 : $marge[9]).";
    padding: ".(empty($marge[10]) ? 0 : $marge[10]).";
    white-space: normal;
    word-wrap: break-word;
    font: ".$titre[12]." ".(empty($titre[3]) ? 'inherit' : $titre[3])." ".$titre[2].";
    color: ".$titre[0].";
    text-align: ".(empty($texte[10]) ? 'left' : $texte[10]).";
}
.titre a {
    background-color: ".hex2rgba($titre[1], $opacity[9]).";
    padding: ".(empty($marge[10]) ? 0 : $marge[10]).";
    white-space: normal;
    word-wrap: break-word;
    font: ".$titre[12]." ".(empty($titre[3]) ? 'inherit' : $titre[3])." ".$titre[2].";
    color: ".$titre[0].";
    text-align: ".(empty($texte[10]) ? 'left' : $texte[10]).";
}
.titre a span {
    background-color: inherit;
}
.tbl {
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    color: ".$texte[0].";".$css16."
    margin: ".(empty($marge[11]) ? 0 : $marge[11]).";
    padding: ".(empty($marge[12]) ? 0 : $marge[12]).";
    text-align:left;
    line-height: ".$page[6].";
    background-color: ".hex2rgba($texte[1], $opacity[10]).";
}
.tbl>p, .tbl>div { line-height: 2.4rem }
.tblover {
    background-color: ".hex2rgba($texte[2], $opacity[10]).";
}
div ul, ol { /* listes */
    padding: 8px 0 8px 8px;
    margin-left: 16px;
}
div li{
    padding: 0;
    margin-left: 12px;
}
.box {
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$texte[5].";
    background-color: transparent;
    text-align: left;
    line-height: inherit;
}
p.box {
    margin: 0;
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$texte[5].";
    background-color: transparent;
    line-height: inherit;
}
.box a, .item a {
    color: ".$lien[2].";
    background-color: transparent;
    text-decoration: none;
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
}
.box a:hover, .item a:hover {
    color: ".$lien[3].";
    text-decoration: none;
    background-color: transparent;
}
#BottomBoxes .box, #BottomBoxes .box a, #BottomBoxes .item a,
#BottomBoxes p.rubr, #BottomBoxes ul.item li.item { color: ".$titre[13]." !important; }
/* boîtes diverses */
.boxnet {
    width: auto;
    margin: auto;
    text-align: center;
    background-color: transparent;
}
.boxprint, .boxprint a { 
    margin: 0;
    height: 40px;
    font: ".$citation[7].' '.(empty($citation[8]) ? 'inherit' : $citation[8]).' '.$citation[6].";
    color: ".$citation[9].";
    background-color: transparent;
}
.boxprint i { 
    color: ".$citation[9].";
    background-color: transparent;
}
.boxprint1 {
    float: right;
}
.boxprint2 {
    float: right;
    padding-right: 10px;
}
#BottomBoxes .boxprint span, #BottomBoxes .boxprint span a i {
    color: ".$titre[13]." !important;
}
/* search boxes */
.thinboxsearch {
    background-color: transparent;
    text-align: center;
}
.thinboxsearchW { margin: 4px 0 0; }
.wideboxsearch {
    background-color: transparent;
    text-align: center;
}
.wideboxsearch .input-group-text,
.thinboxsearch .input-group-text,
.wideboxsearch1 .input-group-text,
.thinboxsearch1 .input-group-text,
.searchTopForum .input-group-text {
	font-size: 1.6rem;
	height: auto;
	margin-top: 4px;
}
.thinboxsearch1 {
    background-color: transparent;
    text-align: center;
}
.wideboxsearch1 {
    background-color: transparent;
    padding-bottom: 8px;
    margin: auto;
    text-align: center;
    max-width: 100%;
}
.imgsearchW {
    vertical-align: bottom;
    cursor: pointer;
    padding-left: 0;
}
.thinboxsearch2 {
    display: none;
    background-color: transparent;
    text-align: center;
}
.wideboxsearch2 {
    display: none;
    background-color: transparent;
    padding-bottom: 8px;
    margin: -4px auto auto;
    text-align: center;
    width: 100%;
}
.thinboxsearch2W, .wideboxsearch2W {
    position: relative;
    z-index: 999;
}
.thinboxsearch3W, .wideboxsearch3W {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}
.searchlngW {
    text-align: center;
    width: 80%;
    margin: 2px auto 0;
}
.adv1web {
    text-align: center;
    font-size: 0.8em;
    margin-top: 3px;
}
.adv2 {
    display: none;
    text-align: center;
    font-size: 0.8em;
    margin-top: -2px;
    height: 2px;
}
.adv2W {
    height: 15px;
}
.searchclose {
    cursor: pointer;
    float: right;
    margin: -15px 22px 0 0;
}
#BottomBoxes .wideboxsearch1 .adv1web a, #BottomBoxes .wideboxsearch1 select,
#BottomBoxes .wideboxsearch1 i { color: ".$titre[13]." !important; }
";
$csslist .= "
/*********************
 * bloc boîtes menus */
.rubr { /* catégories des articles */
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$lien[2].";
    background-color: transparent;
    text-align: left;
    margin: 1rem auto;
    padding: 4px 2px;
}
p.rubr {
    padding: 0 2px;
    margin: 1rem auto;
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: inherit;
    background-color: transparent;
    text-align: left;
    line-height: 20px;
    font-weight: bold;
}
p.rubr:hover { color: ".$lien[3]."; }
.item {
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$lien[2].";
    background-color: transparent;
    text-align: left;
    list-style: none;
    margin: 0;
    padding: 2px 0;
}
ul.item {
    margin: 0;
    padding: 0;
}
ul.item li.item { /* titres des articles */
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$lien[2].";
    background-color: transparent;
    text-align: left;
    list-style: none;
    padding: 2px 0 2px 10px;
}
.curr_item {
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$forum[11].";
    background-color: ".$forum[0].";
    text-align: left;
    list-style: none;
    padding: 2px 0;
}
ul.item li.curr_item a { /* titre article est affiché */
    font: ".$page[35]." ".(empty($page[17]) ? 'inherit' : $page[17])." ".$page[16].";
    color: ".$forum[11].";
    background-color: ".$forum[0].";
    text-align: left;
    list-style: none;
    padding: 2px 0 2px 10px;
}
";
$csslist .= "
/**********
 * Photos */
.phrubr {
    font: ".$annuaire[11].' '.(empty($annuaire[12]) ? 'inherit' : $annuaire[12]).' '.$annuaire[10].";
    color: ".$annuaire[13].";
    text-align: left;
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css31."
}
.phrubr2 {
    font: ".$annuaire[15].' '.(empty($annuaire[16]) ? 'inherit' : $annuaire[16]).' '.$annuaire[14].";
    color: ".$annuaire[17].";
    text-align: left;
    margin: 1rem auto;
    padding: 2px 0px;
    border: 0px;
    cursor: pointer;".$css32."
}
.phsubrubr { 
    text-align: justify;
    padding-left: 35px;
}
.phitem2 {
    float: left;
    text-align: right;
    margin-left: 20px !important;
    margin-left: 12px;
    height: 15px;
}
.phcomment {
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    padding: 0 10px;
}
.phimgs {
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    margin: 5px;
    background-color: transparent;
    padding: 10px 5px 5px 5px;
}
.phimgs2 {
    padding-left: 4px; 
}
.phimg { /* miniatures des galeries photos */
    background: transparent;
    margin: 4px 4px 10px;
    border: 1px solid #C0C0C0 !important;
    border-radius: 4px;
    box-shadow: 1px 2px 2px #555; 
}
.phcpt {
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    float: right;
    font-weight: normal;
    padding: 0px 6px;
}
.photobox { /* contenu boite photorama */
    padding: 10px 5px 15px;
}
.phtitlebox {
    text-align:center;
    margin-bottom:6px;
    font-size: 15px;
    font-weight: bold;
}
.galcounter {
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    font-weight: normal;
    margin: 20px 6px 10px;
}
#BottomBoxes .phtitlebox a { color: ".$titre[13]." !important; }
/*********
 * Liens */
.lititlecat {
    text-align: center;
    width: 80%;
    margin: 10px auto;
    padding: 4px 0;
    font: ".$annuaire[7].' '.$annuaire[2].' '.$annuaire[1].";".$css29.$css30."
    color: ".$annuaire[3].";
}
.licatlink {
    width: 80%;
    margin: 5px auto;
    padding: 4px 0;
    font: ".$annuaire[7].' '.$annuaire[2].' '.$annuaire[1].";".$css29.$css30."
    color: ".$annuaire[3].";
}
.licatlink i { padding: 0 8px; }
.lirubr {
    text-align: left;
    font: ".$annuaire[11].' '.$annuaire[12].' '.$annuaire[10].";
    color: ".$annuaire[13].";
    background: transparent;
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css31."
}
.lirubr2 {
    text-align: left;
    font: ".$annuaire[15].' '.$annuaire[16].' '.$annuaire[14].";
    color: ".$annuaire[17].";
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css32."
}
.lirubr3 {
    margin-left: 20px !important;
    margin-right: 12px;
    height: 15px;
}
.lisubrubr {
    text-align: justify;
    padding-left: 35px;
}
.licontent { margin: 5px; }
/*******
 * FAQ */
.fatitlecat {
    text-align: center;
    width: 80%;
    margin: 10px auto;
    padding: 4px 0;
    font: ".$annuaire[7].' '.$annuaire[2].' '.$annuaire[1].";".$css29.$css30."
}
.facatlink {
    width: 80%;
    margin: 5px auto;
    padding: 4px 0;
    font: ".$annuaire[7].' '.$annuaire[2].' '.$annuaire[1].";".$css29.$css30."
}
.facatlink i { padding: 0 8px; }
.farubr {
    text-align: left;
    font: ".$annuaire[11].' '.$annuaire[12].' '.$annuaire[10].";
    color: ".$annuaire[13].";
    background: transparent;
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css31."
}
.farubr2 {
    text-align: left;
    font: ".$annuaire[15].' '.$annuaire[16].' '.$annuaire[14].";
    color: ".$annuaire[17].";
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css32."
}
.farubr3 {
    margin-left: 20px !important;
    margin-right: 12px;
    height: 15px;
}
.fasubrubr {
    text-align: justify;
    padding-left: 35px;
}
.facontent { margin: 5px; }
.fainfos { font-size: ".$other[27]."; }
.fainfos strong { margin: 0 20px; }
/*******************
 * Téléchargements */
.dwnld1Body { padding: 4px; height: auto; }
.maindwnld { padding: 5px; overflow: auto; }
.divdwnld { padding: 5px; }
.div1dwnld { padding: 5px 20px; }
.dntitlecat {
    text-align: center;
    width: 80%;
    margin: 10px auto;
    padding: 4px 0;
    font: ".$annuaire[7].' '.$annuaire[2].' '.$annuaire[1].";".$css29.$css30."
}
.dncatdwnl {
    width: 80%;
    margin: 5px auto;
    padding: 4px 0;
    font: ".$annuaire[7].' '.$annuaire[2].' '.$annuaire[1].";".$css29.$css30."
}
.dncatdwnl i { padding: 0 8px; }
.dnrubr {
    text-align: left;
    font: ".$annuaire[11].' '.$annuaire[12].' '.$annuaire[10].";
    color: ".$annuaire[13].";
    background: transparent;
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css31."
}
.dnrubr2 {
    text-align: left;
    font: ".$annuaire[15].' '.$annuaire[16].' '.$annuaire[14].";
    color: ".$annuaire[17].";
    margin: 1rem auto;
    padding: 2px 6px;
    border: 0px;
    cursor: pointer;".$css32."
}
.dnrubr3 {
    margin-left: 20px !important;
    margin-right: 12px;
    height: 15px;
}
.dnsubrubr {
    text-align: justify;
    padding-left: 35px;
}
.dncontent { margin: 5px; }
.dnlink { margin: 0 15px; }
.dninfos { font-weight: bold; font-size: ".$other[27]."; }
.dninfos span { margin: 0 20px; }
/**************
 * info bulle */
.overpop { cursor: help; }
.overpop a i { color: inherit; }
";
$csslist .= "
/**************
 * Calendrier */
.cal {
    width: 100%;
    margin: auto;
    text-align: center;
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    border: 0px;
    border-collapse: separate;
    border-radius: ".$calendar[14].";
    border-spacing: ".$calendar[9].";
    color: inherit;
    background-color: ".$calendar[11].";
}
tr.cal { /* calendar nav bar */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[8].";
    background-color: ".$calendar[11].";
    text-align: center;
}
select.cal { /* mont and year selection */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[8].";
    background-color: ".$calendar[11].";
    ".getBorder('1px', 'solid', $calendar[13])."
}
td.cals { /* week */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[8].";
    background-color: ".$calendar[17].";".$css9."
    width: 14%;
    text-align: center;
}
td.cal0 { /* empty cell*/
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[7].";".$css10."
    width: 14%;
    text-align: center;
}
td.cal1 { /* days */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[7].";
    background-color: ".$calendar[1].";
    width: 14%;
    text-align: center;
}
td.cal2 { /* today */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[18].";
    background-color: ".$calendar[2].";
    ".getBorder($calendar[12], 'solid', $calendar[13])."
    border-radius: ".$calendar[14].";
    width: 14%;
    text-align: center;
}
td.cal3 { /* sunday or special */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[19].";
    background-color: ".$calendar[3].";
    ".getBorder($calendar[12], 'solid', $calendar[13])."
    border-radius: ".$calendar[14].";
    width: 14%;
    text-align: center;
}
td.cal4 { /* today is sunday or special */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[20].";
    background-color: ".$calendar[4].";
    ".getBorder($calendar[12], 'solid', $calendar[13])."
    border-radius: ".$calendar[14].";
    width: 14%;
    text-align: center;
}
td.calevt { /* planner event */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[8].";
    background-color: ".$calendar[10].";
    text-align: center;
    width: 14%;
}
td.calevt a { /* link of planner event */
    font: ".$calendar[15]." ".(empty($calendar[6]) ? 'inherit' : $calendar[6])." ".$calendar[5].";
    color: ".$calendar[16].";
}
.calsel select { margin: -8px 0 -8px !important; }
.leftNavCalW a.btn, .rightNavCalW a.btn, .cal3BlogW a.btn {
    ".getBorder($calendar[12], 'solid', $calendar[13])."
    border-radius: ".$calendar[14].";
}
.leftNavCalW i, .rightNavCalW i, .cal3BlogW i {
    vertical-align: middle;
    font-size: 2.6rem;
    color: ".$calendar[7].";
}
.midNavCalW { vertical-align: middle !important; }
.mnthyearCalW { max-height: 22px; margin: -3px 0; }
.selYearCal { width: 72px; }
.selMonthCal { width: 98px; }
.mnthyearBtnCal { max-height: 22px; margin-top: 4px; }
.calagd { color: ".$calendar[7]."; }
/***********************
 * Formulaires (Forms) */
form { /* formulaire */
    margin: 3px 0;
}
fieldset { /* Encadrement des champs */
    ".getBorder($presform[7], $bordure[38], $presform[8])."
    border-radius: ".$presform[9].";
    margin: 8px;
    padding: 4px;
}
legend { /* légende des encadrements */
    font: ".$page[36]." ".$page[2]." ".$page[1]." !important;
    color: ".$texte[0]." !important;
    background-color: transparent !important;
    font-weight: bold !important;
    width: auto !important;
    padding: 0 4px !important;
    margin-left: 5% !important;
}
input.bouton, button { /* bouton */
    cursor: pointer;
    margin: 4px 0;
    padding: ".(empty($presform[12]) ? 0 : $presform[12]).";
    ".getBorder('1px', 'inset', $presform[8])."
    border-radius: ".$presform[9].";
    background-color: ".$presform[2].";
    color: ".$presform[11].";
    font: ".$presform[10]." ".(empty($presform[5]) ? 'inherit' : $presform[5])." ".$presform[4].";".$css11."
}
input.bouton:hover, button:hover { /* bouton survolé */
    background-color: ".$presform[13].";
    color: ".$presform[14].";
    ".getBorder('1px', 'inset', $presform[14])."
}
input.texte { /* champ texte */
    background-color: ".$presform[3].";
    font: ".$presform[10]." ".(empty($presform[5]) ? 'inherit' : $presform[5])." ".$presform[4].";
    color: ".$presform[0].";
    ".getBorder($presform[7], $bordure[38], $presform[8], true)."
    border-radius: ".$presform[9].";
    margin-top: 4px;
    margin-bottom: 4px;
}
select { /* champ select */
    color: ".$presform[0].";
    background-color: ".$presform[1].";
    font: ".$presform[10]." ".(empty($presform[5]) ? 'inherit' : $presform[5])." ".$presform[4].";
    ".getBorder($presform[7], $bordure[38], $presform[8])."
    border-radius: ".$presform[9]." !important;
    margin: 4px 0;
}
textarea { /* champ textarea */
    color: ".$presform[0].";
    background-color: ".$presform[6].";
    ".getBorder($presform[7], $bordure[38], $presform[8])."
    border-radius: ".$presform[9].";
    overflow: auto;
    margin: 4px 0;
}
/***********************************
 * boîtes centrales forum - tables */
.d-tbl {
    border-collapse: separate;
    border-spacing: 2px;
    width: 100%;
    max-width: 100%;
}
.forum, .forum a {
    background-color: ".$forum[0].";
    padding: 5px 5px;
    font: bold ".$page[2]." ".$page[1].";
    color: ".$forum[11].";
    text-align: center;
    vertical-align: middle;
}
.forum2 {
    background-color: ".$forum[0].";
    padding: 5px 5px;
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    color: ".$forum[11].";
    text-align: left;
}
.d-tblth {
    vertical-align: middle;
    padding: 0px 4px;
    text-align: center;
    font-weight: bold;
}
.d-trhfr {
    height: 34px;
    background-color: ".$forum[0].";
    padding: 5px 5px;
    font: ".$forum[14]." ".(empty($forum[12]) ? 'inherit' : $forum[12])." ".$forum[13].";
    color: ".$forum[11].";
    text-align: left;
}
.bottomfrt {
    padding: 6px 4px 0px;
    margin: 8px auto;
    max-width: 100%;
    text-align: left;
    vertical-align: middle;
}
.frtrules {
    margin: 5px 40px;
    height: 300px;
    overflow: auto;
}
.quest {
    background-color: ".$forum[1].";
    padding: 5px 5px 5px 5px;
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    color: ".$texte[0].";
    text-align: left;
}
.rep {
    background-color: ".$forum[2].";
    padding: 10px 5px 5px 5px;
    font: ".$page[36]." ".$page[2]." ".$page[1].";
    color: ".$texte[0].";
    text-align: left;
}
.rep > p { background: transparent; }
.bord {
    padding: 1px;
    ".getBorder($barre[4], $barre[5], $barre[3])."
}
.bord2 { ".getBorder('2px', 'double', $forum[2])." }
.Code {
    ".getBorder('1px', 'solid', $forum[0])."
    padding-right: 5px;
    padding-left: 5px;
    color: ".$texte[5].";
    font: 12px ".(empty($titre[2]) ? 'inherit' : $titre[2]).", Monospace;
    background-color: ".$forum[2].";
}
";
$csslist .= "
/************************
 * Divers, inclassables */
.divnewline { min-height: 24px; }
.notice { 
    color: #FF0000;
    background-color: #FF9;
    padding: 2px;
}
.accookie {
    background-color: ".$other[28].";
    color: ".$other[29].";
    font-size: ".$other[30].";
    z-index: 1000;
    top: 0;
    width: 100%;
}
.accookie a {
    color: ".$other[29].";
    font-style: italic;
}
.accookie button { font-size: ".$other[30]."; }
.errorInputText {
    background-color: #FFE5E5;
    font: ".$presform[10]." ".(empty($presform[5]) ? 'inherit' : $presform[5])." ".$presform[4].";
    color: #000099;
    ".getBorder($presform[7], $bordure[38], $presform[8])."
    border-radius: ".$presform[9].";
    margin: 4px 0;
    padding: 0px 2px;
}
.c-pointer { cursor: pointer; }
.c-help { cursor: help; }
.textUnderline { text-decoration: underline; }
.popupMail { margin: 8px 0; }
.dispError {
    max-width: 480px;
    margin: auto;
    background-color: #FFF;
}
.dispError2 {
    color: #FFF;
    background-color: #FF0000;
    text-align: center;
    font-size: 10pt;
    font-weight: bold;
    padding: 2px 0;
}
.dispArrow {
    float: right;
    font-family: fontello;
    font-size: 13px;
    padding: 3px 6px 0 0;
}
.w-98 { width: 98% !important; }
.w-95 { width: 95% !important; }
.w-90 { width: 90% !important; }
.w-88 { width: 88% !important; }
.w-85 { width: 85% !important; }
.w-80 { width: 80% !important; }
.w-78 { width: 78% !important; }
.w-75 { width: 75% !important; }
.w-70 { width: 70% !important; }
.w-65 { width: 65% !important; }
.w-60 { width: 60% !important; }
.w-55 { width: 55% !important; }
.w-48 { width: 48% !important; }
.w-45 { width: 45% !important; }
.w-40 { width: 40% !important; }
.w-35 { width: 35% !important; }
.w-30 { width: 30% !important; }
.w-22 { width: 22% !important; }
.w-20 { width: 20% !important; }
.w-18 { width: 18% !important; }
.w-15 { width: 15% !important; }
.w-13 { width: 13% !important; }
.w-12 { width: 12% !important; }
.w-10 { width: 10% !important; }
.web342 { margin: 15px 0 35px; }
.bg-inherit { background: inherit !important; }
.boxCryptW { margin: 8px 0 0; }
.fontXsmall { font-size: x-small; }
.showprogbar {
    z-index: 50;
    position: absolute;
    left: 33%; top: 360px;
    width: 300px;
    padding: 20px;
    border-width: 4px;
    border-style: inset;
}
.workprogress {
    padding: 10px;
    border: 3px solid #FF0000;
    font-size: larger;
}
.loadingpage {
    position: absolute;
    left: 20%; top: 28px;
    width: 240px;
    padding: 5px;
    border-width: 1px;
    border-style: solid;
    background-color: #EEEEFF;
}
.trheadsearch { background-color: ".$forum[1]."; }
.tr2headsearch { padding: 4px; background-color: ".$forum[2]."; }
.txthiddensearch { overflow: auto; height: 300px; }
.inputcrypt { width: 84px;}
/***************************
 * Evaluation mot de passe */
.alert {
    background-color: #FCF8E3;
    ".getBorder($presform[7], $bordure[38], $presform[8])."
    border-radius: ".$presform[9].";
    margin: 4px 0;
    padding: 2px;
    color: ".$presform[0].";
    text-align: center;
    font-weight: bold;
}
.alert-error {
    color: #FFFFFF;
    background-color: #FF0000;
    border-color: #EED3D7;
}
.alert-success {
    color: #000000;
    background-color: #00FF00;
    border-color: #D6E9C6;
}
.alert-info {
    color: #FFFFFF;
    background-color: #009DFF;
    border-color: #BCE8F1;
}
/*******
 * Rss */
.rssitem { padding: 6px; }
.text1newsrss, .text2newsrss {
    margin: 2px auto;
    padding: 10px 5px 5px;
}
.datitemrss { color: #999; }
.pubdateRss { color: #999; }
/***********************
 * Postguest - Editeur */
.pg280 { max-width: 280px; }
.pg360 { max-width: 360px; }
.pgrbra {
    height: 160px;
    overflow: auto;
    border-style: groove;
}
.pgc1 {
    height: 160px;
    max-width: 560px;
    overflow: auto;
    border-style: groove;
}
.pgptxt { padding: 5px }
.pgtbl .input-group-text {
	font-size: 1.6rem;
	height: auto;
	margin-top: 4px;
}
blockquote.citation {
    border: ".$other[10]." ".$other[11]." ".$other[9]." !important;
    border-left-width: 4px !important;
}
blockquote.citation > :first-child {
    background-color: ".hex2rgba($other[12], $opacity[22])." !important;
    color: ".$other[13]." !important;
}
blockquote.citation div { font-style: italic !important; }
.hljs {
    background-color: ".hex2rgba($other[23], $opacity[23])." !important;
    margin: 0 8px;
    padding: 6px !important;
    border: ".$other[10]." ".$other[11]." ".$other[9]." !important;
    border-left-width: 4px !important;
}
/*********************
 * Boîte Préférences */
.userIdentW {
    margin: -4px auto 0;
    width: 240px;
    max-width: 90%;
    height: 25px;
}
.user-eye i { font-size: 1.4rem; }
.userLostA { font-size:0.9em; }
.userWave object { width: 0; height: 0; }
.visits {
    position: absolute;
    margin: -210px 0 0 24px;
    padding: 4px;
    width: 190px;
    background: ".$other[1].";
    color: ".$other[0].";
    ".getBorder($other[3], 'solid', $other[2])."
    border-radius: ".$other[4].";
    display: none;
    z-index: 15;
}
.visits2 {
    max-height: 200px;
    overflow: auto;
    background: transparent;
    text-align: left;
}
.visits2 img, .visits2 i {
    vertical-align: middle;
    height: 32px !important;
    padding: 1px 2px;
}
.visitsClose {
    margin: 8px 6px 0;
    font-family: fontello;
    font-size: 13px;
}
.ava-img, .img-ava {
    margin-bottom: -6px;
    width: 32px !important;
    height: 32px !important;
}
.img-ava { margin-bottom: 0; }
.ava-th {
    width: 64px !important;
    height: 64px !important;
}
.connectedList { margin-top: 6px; }
.connectedImg { margin: 0 2px; }
.connectedUserW { margin-bottom: 2px; }
.userprefIP { margin: 10px; }
.itemRssBoxW { margin: 0; }
.userList, .userVisits { line-height: 2em; }
.userList i, .userVisits i { font-size: 2rem; }
#BottomBoxes .userList a, #BottomBoxes .userVisits a, #BottomBoxes .userLostA,
#BottomBoxes .connectedList, #BottomBoxes .userprefIP a {
    color: ".$titre[13]." !important;
}
/*************************
 * Boîte Infos Webmastre */
.webm { padding-left: 4px; }
.webm td { color: inherit; }
.webmlh { line-height: 1rem; }
.webmlh i {	font-size: 2rem; }
#BottomBoxes .webm td { color: ".$titre[13]." !important; }
/***********************
 * Barre de navigation */
.navbarLeftW i.cur, .navbarRightW i.cur { font-size: 2rem; margin-top: 5px; }
.navbarLeftW i.curN, .navbarRightW i.curN { font-size: 2rem; margin-top: 5px; opacity: 0.5; }
.navbarLeftW { padding: 5px; }
.imgPlus { padding-left: 5px; }
.navbarRightW { padding: 5px; }
/*************
 * Guestbook */
.gbkb1W { padding-top: 6px; }
.gbkc1 { padding-bottom: 24px; }
/**********
 * Agenda */
.calagvL {
    margin: 1px;
    min-width: 60px;
    padding-top: 10px;
}
.calagvR { margin: 1px; }
.calendarg, .calendard {
    margin: 1px;
    padding: 4px;
}
.calimggW, .calimgdW {
    width: 14px;
    height: 11px;
}
";
$csslist .= "
/*********
 * Forum */
.membTopForumWW { padding-top: 12px; }
.seluserTopForum { width: 128px; }
.mailsubmitTopForum { padding-left: 5px; }
.frtlnkarch img { vertical-align: -4px; }
.frtlnkrules { margin-top: -8px; }
.frlnkcategW { margin-left: 18px; }
.frbottom { padding: 16px 0 4px; }
.frimgsbottom { padding: 4px; }
.frretfrt {
    width: 250px;
    margin-top: -8px;
    padding-top: 2px;
}
.thlnkforumW { margin-left: 8px; }
.thlnkcateg { margin-left: 18px; }
.thhead { margin: 0 0 4px; }
.thheadsubjectW {
    height: 32px;
    background-color: ".$forum[0].";
}
.thheadbodyW {
    word-break: break-all;
    height: 32px;
    background-color: ".$forum[0].";
}
.thbody { margin: 0 0 6px; }
.thtimetop {
    z-index: 15;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    width: 260px;
}
.thmoveto {
    z-index: 15;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    width: 220px;
}
.thtocat { width: 140px; }
.thbodybottom { height: 28px; }
.thcoders { padding-top: 4px; }
.thmsgicons { padding: 4px; margin: 4px auto 0 0; }
.frnoaccess { padding-bottom: 48px; }
.frarchsubject {
    min-width: 148px;
    margin: 1px;
    white-space: nowrap;
}
.frarchbody { margin: 1px; }
.tharchmain { margin-bottom: 8px; }
.tharchsubject { max-width: 160px; }
.thsign { padding-top: 8px; }
.bodyfrposts {
    margin: 0px;
    padding: 0px;
    background-image: none;
    border: 0px;
}
.mainfrposts, .mainrules {
    padding: 5px;
    margin: 2px;
}
/*****************
 * Lettre d'info */
.nwlSubscribe .input-group-text {
	font-size: 1.75rem;
	height: auto;
	margin-top: 4px;
}
.nwlMailW { margin-top: 0px; }
.nwlActionW { padding-left: 35px; }
.nwlunsub { margin: 12px 0; }
.nwlcrypt { margin-top: 8px; }
.nwlyesbtn { margin-right: 6px; }
.nwlnobtn { margin-left: 6px; }
/*******************
 * Réseaux sociaux */
.rssSocnet { padding: 0 2px; }
.iconSocnetW { margin: auto; padding: 6px 2px; }
/*************
 * Nouvelles */
.codersNews { padding: 12px 0 4px; }
.archNews { padding: 0 0 12px; }
.archNews img { vertical-align: -4px; }
.postNews { margin: 0 64px 2px 0; }
.editoNews { margin-top: 4px; padding: 2px; }
.txt2News { margin-top: 4px; padding: 10px 5px 5px; }
.headNews { margin: 2px 0 0; }
.rssNews { width: auto; }
.overpop .rssNews i, .itemrss a i { font-size: 2.5rem; color: #FF6701; }
/**********************
 * Nouveautés du site */
.itemLastdoc { margin: 8px 0 16px; }
.lastdoc { margin: 0px; padding: 0 5px 5px }
.lastdoc2 { margin: 0px; padding: 0 5px 5px; }
.lastdoc a, .lastdoc2 a { font-weight: bold; }
#BottomBoxes .lastdoc legend, #BottomBoxes .lastdoc2 legend,
#BottomBoxes .lastdoc a, #BottomBoxes .lastdoc2 a {
    color: ".$titre[13]." !important;
}
/***********
 * Contact */
.itemContactW { margin: 4px 0 0; }
.imgContact { margin: 0 8px -4px 12px; }
.dispMail{ padding: 8px; }
.dispMailBody {
    width: 90%;
    padding: 8px;
    margin: 0 auto;
}
.headContactW {
    text-align: left;
    font-size: medium;
}
.nameContactR { padding-left: 22px; }
.mailContactL { padding: 0 0 16px; }
.mailContactR { padding: 0 0 16px 22px; }
.mainct .input-group-text {
	font-size: 1.6rem;
	height: auto;
	margin-top: 4px;
}
.maxWidthContact { max-width: 560px; }
.userCnct { max-width: 368px; }
";
$csslist .= "
/********
 * Blog */
.selBlogCat { width: 166px; }
.dispqcBlogCat { margin-bottom: 8px; }
.itemBlogBoxW, .itemBlogBoxW a { padding: 3px 6px; color: ".$lien[2]."; }
.cal3Blog { white-space: nowrap; }
.calButton { min-width: 0px; }
.itemRssBlog { padding: 3px; }
.rssBlog { margin-bottom: 8px; }
.overpop .rssBlog i { font-size: 2.5rem; color: #FF6701; }
.boxreBlog2 { padding: 4px; }
.headCenterBlog { margin: 2px 0 0; }
.postBlog { margin: 0 20px; }
.txt2Blog { padding: 4px }
.blogBlog { padding: 5px; }
.blog2Blog { margin-top: 4px; padding: 10px 5px 5px; }
.blog3Blog { margin-top: 4px; padding: 10px 5px 5px; }
.codersBlog { padding: 6px 0 0 10px; }
.footerItemBlog { padding: 6px 4px 2px; font-size: 0.9em; }
.commentBlog { font-size: smaller; }
.qcItemBlog { margin: -4px 0 20px; }
.messErrorBlog { padding: 6px; }
.blogarch { padding: 4px; }
.titleArchBlog { margin: 8px 0; }
.bordTextArch { margin-top: 4px; }
.textArchBlog { padding: 4px; }
.actionArchBlog { padding: 2px 4px; font-size: smaller; }
.pubArchBlog { padding: 2px 4px; font-size: smaller; }
.titreBlog { margin: 8px 0px; }
.bordBillet { margin-top: 4px; }
.billetBlog { padding: 4px; }
.footerBillet { padding: 4px 4px 0 0; font-size: smaller; }
.leftRssBlog, .rightRssBlog { padding: 4px; }
.text2RssBlog { margin: 0; padding: 2px; }
.textRssBlog { margin: 2px; padding: 10px 5px 5px; }
.buttonTopBlog { padding: 6px 4px 2px; }
.membersTopBlog { padding-top: 10px; }
.searchTopBlog .input-group-text {
	font-size: 1.6rem;
	height: auto;
	margin-top: 4px;
}
.lnkblarch { padding: 8px 4px 0; }
.blog3arch { padding: 2px; }
.txt3arch { margin: 2px; padding: 5px; }
.txt2blogarch { padding: 5px; }
.headblogarch { padding: 6px 4px 2px; font-size: 0.9em; }
/************
 * Articles */
.selArtNavbar { width: 200px; }
.overpop .rssArt i { font-size: 2.5rem; color: #FF6701; }
.contentArt { padding: 6px; }
.codersArt { padding: 4px 0 10px 30px; }
.propArtW { font-size: smaller; }
.navbarArt, .prtArt { margin: 4px; }
.headreactleft { padding: 4px; }
.artNavP i, .artNavS i { font-size: 2.4rem; }
/***********
 * Membres */
.user-form { max-width: 920px; margin: auto; }
.afterlost { margin: 32px; }
.mainConnect { width: 320px; }
.lostconnect { font-size: 0.9em; }
.prfAdmButton { max-width: 500px; }
.prftblborder { ".getBorder('1px', 'solid', '#000')." }
.prfheadtbl { padding: 16px; }
.prfava { max-height: 80px; }
.prfwebsite { padding: 24px 0; }
.prfimgmail { height: 24px; }
.mbrlistmain { margin-top: 8px; }
.mbrlistimgava { height: 32px !important; }
.mbrlistimg { height: 24px; }
.cmptlbl { margin: 2px; padding: 10px 4px; }
.popsyncmail { width: 32px; }
.popsyncmail img { margin: -6px 0 0 0; }
.pop.popsyncmail a span { left: -270px; top: 20px; }
.pop.popsyncmail a span em { left:auto; right: 12px; }
.cmptsyncmail { margin: -6px 2px 0 16px; }
.tbltinysend { width: 100%; max-width: 540px; }
.tdrepmsg {
    height: 80px;
    max-width: 480px;
    overflow: auto;
    border-width: 1px;
    border-style: solid;
}
.msgtinysend { max-width: 500px; }
.tbltinymain { max-width: 460px; }
.trmsgtiny { padding: 8px 0; }
.tdmsglnk { padding: 8px 4px; }
.btntinymain { width: 460px; padding: 16px 0 0; }
.divcmdtiny { margin: 0 auto; width:100%; max-width: 340px; }
.frmcmdtiny { margin: 0; padding: 0; }
.divreptiny { padding: 4px; margin-top: 8px; }
.divuseritem { margin: 2px; }
.divuserpwd { margin: 8px 2px 2px; }
.popuserpwd { width: auto; margin-left: 6px; }
.popusersign { width: auto; margin-left: 6px; }
.usermainava { margin: 16px auto auto; }
.divuserava { max-height: 380px; overflow: auto; }
.divuseravaextW { max-width: 430px; margin: 12px auto 0px; }
.userextavaW { width: 100%; }
.popavaext { width: 32px; }
.tbluseravaW { width: 420px; max-width: 60%; }
#returnOnTop {
    background: url(img/return_on_top.png);
    cursor: pointer;
    display: none;
    filter: alpha(opacity = 50);
    height: 48px;
    width: 48px;
    position: fixed;
    right: 1%;
}
#returnOnTop:hover {
    filter: alpha(opacity = 100);
    opacity: 1;
}
.cryptpos {
	max-width: 480px;
	width: 90%;
	line-height: 18px;
}
.inputuid {
    width: 220px;
    max-width: 100%;
    margin-right: -2px;
}
";
$csslist .= "
/********************
 * Menus déroulants */
/* mega menu */
@media screen and (min-width: 760px) {
  .navbar.ddl {
    display: flex;
    padding-top: 0px;
    padding-bottom: 0px;
  }
  .navbar.ddl .nav-item {
    padding: .5rem .5rem;
    margin: 0 .25rem;
  }
  .navbar.ddl .dropdown { position: static; }
  .navbar.ddl .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    top: 45px;
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
  }
  .navbar.ddl .dropdown:hover .dropdown-menu, .navbar.ddl .dropdown .dropdown-menu:hover {
    display: block;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s linear;
  }
}
.navbar.ddl .dropdown-menu div[class*=\"col\"] {
    margin-bottom: 1rem;
}
.navbar.ddl a.navbar-brand, .navbar.ddh a.navbar-brand, 
.navbar ul.navbar-nav a.nav-link, .nav-link {
    font: ".$dropdown[2]." ".(empty($dropdown[3]) ? 'inherit' : $dropdown[3])." ".$dropdown[1].";
    background-color: ".$dropdown[5].";
    color: ".hex2rgba($dropdown[4], 1).";
}
.navbar.ddl a.navbar-brand:hover, .navbar ul.navbar-nav a.nav-link:hover,
.navbar.ddl a.navbar-brand:focus, .navbar.ddh a.navbar-brand:hover, 
.navbar ul.navbar-nav a.nav-link:focus {
    font: ".$dropdown[2]." ".(empty($dropdown[3]) ? 'inherit' : $dropdown[3])." ".$dropdown[1].";
    background-color: ".hex2rgba($dropdown[27], 1).";
    color: ".hex2rgba($dropdown[29], 1).";
}
.navbar.ddl {
	background-color: transparent;
    color: ".hex2rgba($dropdown[4], 1).";
}
.navbar.ddl .dropdown-menu {
    margin-top: -.45rem !important;
    width: ".$dropdown[17].";
    height: ".$dropdown[18].";
    background-color: ".$dropdown[19]." !important;".$css35."
}
.navbar.ddl .dropdown-menu > div, .navbar.ddl .dropdown-menu > div p {
    font-size: 1.6rem;
    color: ".$dropdown[26].";
}
.navbar .navbar-toggler, .navbar.ddl .navbar-toggler, .navbar.ddh .navbar-toggler {  /* bordure icône de la barre en mobile */
    border-color: ".hex2rgba($dropdown[4], 0.9).";
    border-radius: 0.35rem;
}
.navbar.ddl .navbar-toggler-icon { /* couleur texte icône de la barre en mobile (stroke) */
	width: 2em !important;
	height: 2em !important;
	background-image: url(\"data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'30\' height=\'30\' viewBox=\'0 0 448 512\' %3e%3cpath stroke=\'".hex2rgba($lien[4], 0.9)."\' stroke-linecap=\'round\' stroke-miterlimit=\'10\' stroke-width=\'4\' d=\'M16 132h416c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H16C7.2 60 0 67.2 0 76v40c0 8.8 7.2 16 16 16zm0 160h416c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h416c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16z\'/%3e%3c/svg%3e\") !important;
}
.navbar.ddh .btn-ddh, .navbar.ddh .nav-item a, 
.navbar.ddh .dropdown-menu > .dropdown-item a,
.navbar.ddv .btn-ddv, .navbar.ddv .nav-item a, 
.navbar.ddv .dropdown-menu > .dropdown-item a {
    font-size: ".$dropdown[3].";
    color: ".$dropdown[25].";
}
.navbar.ddh .nav-item a:hover, .navbar.ddh .dropdown-menu > dropdown-item a:hover,
.navbar.ddv .nav-item a:hover, .navbar.ddv .dropdown-menu > dropdown-item a:hover {
    color: ".$dropdown[29].";
}
.navbar.ddh .navbar-toggler-icon { /* couleur texte icône de la barre en mobile (stroke) */
	width: 2em !important;
	height: 2em !important;
	background-image: url(\"data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'30\' height=\'30\' viewBox=\'0 0 448 512\' %3e%3cpath stroke=\'".hex2rgba($lien[4], 0.9)."\' stroke-linecap=\'round\' stroke-miterlimit=\'10\' stroke-width=\'4\' d=\'M16 132h416c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H16C7.2 60 0 67.2 0 76v40c0 8.8 7.2 16 16 16zm0 160h416c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h416c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16z\'/%3e%3c/svg%3e\") !important;
}
/*****************
 * Dropdown Menu */
.dropdown > .dropdown-menu {
  top: 200%;
  transition: 0.3s all ease-in-out;
}
.dropdown:hover > .dropdown-menu {
  display: block;
  top: 92%;
}
.ddh.dropdown-menu, .ddv.dropdown-menu { left: 25%; }
.ddv.dropdown-menu { position: absolute; }
.navbar.ddv ul.navbar-nav { margin-top: -20px; }
.navbar.ddh .dropdown-item, .navbar.ddh .nav-item,
.navbar.ddv .dropdown-item, .navbar.ddv .nav-item {
    margin-left: 0;
    font: ".$dropdown[2]." ".(empty($dropdown[3]) ? 'inherit' : $dropdown[3])." ".$dropdown[1].";
    background-color: ".$dropdown[5].";
    color: ".$dropdown[4].";
}
.navbar.ddh .dropdown-item:hover, .navbar.ddh .nav-item:hover,
.navbar.ddv .dropdown-item:hover, .navbar.ddv .nav-item:hover,
.navbar.ddv .dropdown-item a:hover, .navbar.ddv .nav-item a:hover,
li .dropdown-item a:hover, li .nav-item a:hover {
    font-weight: ".$dropdown[2].";
    background-color: ".$dropdown[27].";
    color: ".$dropdown[29].";
}
.ddm {
    padding: 0;
    background-color: transparent;
}
.btn-ddh, .btn-ddv {
    display: inline-block;
    margin-top: 0 !important;
    border-radius: .25rem;
}
@media screen and (max-width: 760px), screen and (max-device-width: 760px) {
  .btn-ddh, .btn-ddv {
      display: block;
      margin-top: 4px !important;
  }
}
.ddmImg {
    padding-right: 6px;
    vertical-align: top;
    max-height: 16px;
}
";
$csslist .= "
/*************
 * Mots-clés */
ul.keyword {
    list-style: none;
    margin: -12px 0 4px; 
    padding: 0;
    position: relative;
    float: left;
}
ul.keyword li {
    margin: 6px 0 0;
    padding: 0px 6px;
    background-color: ".hex2rgba($texte[1], $opacity[10]).";
    color: inherit;
    list-style: none;
    float: left;
    line-height: 2.0em;
    vertical-align: bottom;
}
ul.keyword li:hover {
    color: inherit;
    position: relative;
    z-index: 599;
    cursor: pointer;
}
ul.keyword ul {
    width: 180px;
    list-style: none;
    margin: 0;
    padding: 0;
    visibility: hidden;
    position: absolute;
    top: 75%;
    left: 0;
    z-index: 598;
}
ul.keyword-horizontal ul li *.dir {
    padding-right: 20px;
}
ul.keyword li:hover > ul {
    transition-property : visibility;
    transition-delay : 300ms;
    visibility: visible;
}
ul.keyword div {
    ".getBorder('1px', 'solid', $dropdown[7])."
    border-radius: 4px;
    background-color: ".$dropdown[5].";
    padding: 4px 8px;
    line-height: 1.3em;
    color: ".$dropdown[4].";
}
.keyword0 { /* nombre d'occurrences nulle */
    font-size : 0.8em;
}
.keyword1 { /* entre 1 et 3 */ 
    font-size : 1.2em;
}
.keyword2 { /* entre 4 et 5 */
    font-size : 1.6em;
}
.keyword3 { /* plus de 5 */
    font-size : 2.0em;
}
/************************
 * Cryptogrammes texte */
#cryptogram0, #cryptogram1, #cryptogram2 {
    margin: 6px auto;
    padding: 2px;
    font-family: Arial;
    font-weight: bold; 
    font-size: 16px;
    background-color: ".$other[18].";
    color: ".$other[19].";
    ".getBorder($other[21], 'solid', $other[20], true)."
    border-radius: ".$other[22].";
    text-align: center;
    box-sizing: content-box;
}
/*********************************** 
 * déclarations générales mobiles */
@media screen and (max-width: 760px), screen and (max-device-width: 760px) {
  body { padding: 0 2px !important; }
  #TopBoxes { margin-top: 36px !important; }
  #LeftBoxes, #BlogLeftBoxes { order: 2 !important; max-width: 100% !important; }
  #CenterBoxes { order: 1 !important; max-width: 100% !important; }
  #RightBoxes, #BlogRightBoxes { order: 3 !important; max-width: 100% !important; }  
  #returnOnTop { display: none !important; }
  #paranav { top: 0 !important; left: 0 !important; padding: 1rem !important; width: 100% !important; display: inline-flex !important; }
  #paranav li { margin: 0 2rem !important; }
  .a-col { padding-left: 0 !important; padding-right: 0 !important; }
  nav.menuIcons ul li { text-align: left !important; line-height: 3.2rem !important; }
  .tbluseravaW i { width: 48px !important; height: 48px !important; }
  fieldset { margin: 0 !important; }
}
@media screen and (min-width: 768px) and (max-width: 1080px) {
  #MainContent .col-md-9, #MainContent .col-md-6 {
    padding: 0 30px !important;
    -ms-flex: 0 0 100% !important; flex: 0 0 100% !important; max-width: 100% !important;
  } 
  #MainContent .col-md-3 {
	padding: 0 30px !important;
	-ms-flex: 0 0 100% !important; flex: 0 0 100% !important; max-width: 100% !important;
	margin: 5px auto !important;
  }
  #LeftBoxes, #BlogLeftBoxes {
    order: 4 !important; max-width: 100% !important;padding: 0 30px !important; }
  #RightBoxes, #BlogRightBoxes {
    order: 5 !important; max-width: 100% !important;padding: 0 30px !important; }
}
";
	
    SetChmod(CHEMIN.'skins/'.$mycss.'/style.css');
    $csslist = str_replace('\'', '"', $csslist);
    WriteFullDB(CHEMIN.'skins/'.$mycss.'/style.css', $csslist);
/*
    Ajout fond de couleur 	pour tarteaucitron attention aux lignes $other
*/
$csslisttarteaucitron = "
@charset 'utf-8';
div#tarteaucitronMainLineOffset,.tarteaucitronBorder {border:0!important;}

#tarteaucitron [aria-pressed=\"true\"] {
    font-weight:700;
}

.tac_visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; /* added line */
    border: 0;
}

div#tarteaucitronAlertBig:focus {outline: 0;}

.tarteaucitron-modal-open{
    overflow: hidden;
    height: 100%;
}

#tarteaucitronContentWrapper {display:unset;}

/** 14042021 **/
span.tarteaucitronReadmoreSeparator {
    display: inline!important;
}
/******/

/** 09052021 **/
.tarteaucitronName .tacCurrentStatus, .tarteaucitronName .tarteaucitronReadmoreSeparator {
    color: #333!important;
    font-size: 12px!important;
    text-transform: capitalize;
}
/**************/

/** 27032021 **/
button.tarteaucitron-toggle-group {
    display: block;
}
span.tarteaucitronH3 {
    font-weight: 700!important;
}
#tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronH3 {
    font-weight: 500!important;
    font-size: 14px;
    margin-top: 7px;
}
.tarteaucitronLine {
    border-left: 0px solid transparent!important;
}
/*****/

/** BETTER MOBILE MODE **/
@media screen and (max-width: 767px) {

    html body #tarteaucitronRoot #tarteaucitron ul#tarteaucitronServices_mandatory .tarteaucitronDeny {
        display: none!important;
    }

    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder button,
    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronAsk,
    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronName {
        width:100%!important;
        display: block!important;
        margin-left: 0!important;
        margin-right: 0!important;
        box-sizing: border-box!important;
        max-width: 100%!important;
        margin-bottom: 8px!important;
    }

    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder ul .tarteaucitronLine {
        padding: 16px!important;
    }

    html body #tarteaucitronRoot #tarteaucitron div#tarteaucitronMainLineOffset .tarteaucitronName {
        display: none!important;
    }

    #tarteaucitronServices_mandatory li.tarteaucitronLine .tarteaucitronName span {
        width: 100%!important;
        display: inline-block;
    }
    li.tarteaucitronLine .tarteaucitronName span {
        width: 80%!important;
        display: inline-block;
    }
    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder button.tarteaucitron-toggle-group {
        width: 10%!important;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 0px;
        padding: 10px 0;
    }
    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder button.tarteaucitron-toggle-group:before {
        content: '▼';
        font-weight:700;
        font-size: 14px;
    }
    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder .tarteaucitronIsExpanded button.tarteaucitron-toggle-group:before {
        content: '▴';
    }
}
@media screen and (min-width: 768px) {

    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder button.tarteaucitron-toggle-group:after {
        content: '▼';
        font-weight:700;
        font-size: 14px;
        margin-left: 15px;
    }
    html body #tarteaucitronRoot #tarteaucitron .tarteaucitronBorder .tarteaucitronIsExpanded button.tarteaucitron-toggle-group:after {
        content: '▴';
        margin-left: 15px;
    }
}
/****/



/***
* Reset CSS
*/
#tarteaucitronRoot div, #tarteaucitronRoot span, #tarteaucitronRoot applet, #tarteaucitronRoot object, #tarteaucitronRoot iframe, #tarteaucitronRoot h1, #tarteaucitronRoot h2, #tarteaucitronRoot h3, #tarteaucitronRoot h4, #tarteaucitronRoot h5, #tarteaucitronRoot h6, #tarteaucitronRoot p, #tarteaucitronRoot blockquote, #tarteaucitronRoot pre, #tarteaucitronRoot a, #tarteaucitronRoot abbr, #tarteaucitronRoot acronym, #tarteaucitronRoot address, #tarteaucitronRoot big, #tarteaucitronRoot cite, #tarteaucitronRoot code, #tarteaucitronRoot del, #tarteaucitronRoot dfn, #tarteaucitronRoot em, #tarteaucitronRoot img, #tarteaucitronRoot ins, #tarteaucitronRoot kbd, #tarteaucitronRoot q, #tarteaucitronRoot s, #tarteaucitronRoot samp, #tarteaucitronRoot small, #tarteaucitronRoot strike, #tarteaucitronRoot strong, #tarteaucitronRoot sub, #tarteaucitronRoot sup, #tarteaucitronRoot tt, #tarteaucitronRoot var, #tarteaucitronRoot b, #tarteaucitronRoot u, #tarteaucitronRoot i, #tarteaucitronRoot center, #tarteaucitronRoot dl, #tarteaucitronRoot dt, #tarteaucitronRoot dd, #tarteaucitronRoot ol, #tarteaucitronRoot ul, #tarteaucitronRoot li, #tarteaucitronRoot fieldset, #tarteaucitronRoot form, #tarteaucitronRoot label, #tarteaucitronRoot legend, #tarteaucitronRoot table, #tarteaucitronRoot caption, #tarteaucitronRoot tbody, #tarteaucitronRoot tfoot, #tarteaucitronRoot thead, #tarteaucitronRoot tr, #tarteaucitronRoot th, #tarteaucitronRoot td, #tarteaucitronRoot article, #tarteaucitronRoot aside, #tarteaucitronRoot canvas, #tarteaucitronRoot details, #tarteaucitronRoot embed, #tarteaucitronRoot figure, #tarteaucitronRoot figcaption, #tarteaucitronRoot footer, #tarteaucitronRoot header, #tarteaucitronRoot hgroup, #tarteaucitronRoot menu, #tarteaucitronRoot nav, #tarteaucitronRoot output, #tarteaucitronRoot ruby, #tarteaucitronRoot section, #tarteaucitronRoot summary, #tarteaucitronRoot time, #tarteaucitronRoot mark, #tarteaucitronRoot audio, #tarteaucitronRoot video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    /*background: initial;*/
    text-align: initial;
    text-shadow: initial;
}

/* Animation */
#tarteaucitronRoot * {transition: border 300ms, background 300ms, opacity 200ms, box-shadow 400ms}

/* HTML5 display-role reset for older browsers */
#tarteaucitronRoot article, #tarteaucitronRoot aside, #tarteaucitronRoot details, #tarteaucitronRoot figcaption, #tarteaucitronRoot figure, #tarteaucitronRoot footer, #tarteaucitronRoot header, #tarteaucitronRoot hgroup, #tarteaucitronRoot menu, #tarteaucitronRoot nav, #tarteaucitronRoot section {
    display: block;
}
#tarteaucitronRoot ol, #tarteaucitronRoot ul {
    list-style: none;
}
#tarteaucitronRoot blockquote, #tarteaucitronRoot q {
    quotes: none;
}
#tarteaucitronRoot blockquote:before, #tarteaucitronRoot blockquote:after, #tarteaucitronRoot q:before, #tarteaucitronRoot q:after {
    content: '';
    content: none;
}
#tarteaucitronRoot table {
    border-collapse: collapse;
    border-spacing: 0;
}

#tarteaucitronRoot a:focus-visible, #tarteaucitronRoot button:focus-visible {
    outline: 3px dashed #3d86d8;
}

/***
 * Better scroll management
 */
div#tarteaucitronMainLineOffset {
    margin-top: 0!important;
}

div#tarteaucitronServices {
    margin-top: 28px!important;
}

#tarteaucitronServices::-webkit-scrollbar {
    width: 5px;
}

#tarteaucitronServices::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 0 rgba(0,0,0,0);
}

#tarteaucitronServices::-webkit-scrollbar-thumb {
    background-color: #ddd;
    outline: 0px solid slategrey;
}

div#tarteaucitronServices {
    box-shadow: 0 40px 60px #545454;
}

/***
 * Responsive layout for the control panelchange tablet display
 */
@media screen and (max-width:479px) {
    #tarteaucitron .tarteaucitronLine .tarteaucitronName {
        width: 90% !important;
    }

    #tarteaucitron .tarteaucitronLine .tarteaucitronAsk {
        float: left !important;
        margin: 10px 15px 5px;
    }
}

@media screen and (max-width:767px) {
    #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer, #tarteaucitron {
        background: #fff;
        border: 0 !important;
        bottom: 0 !important;
        height: 100% !important;
        left: 0 !important;
        margin: 0 !important;
        max-height: 100% !important;
        max-width: 100% !important;
        top: 0 !important;
        width: 100% !important;
    }

    #tarteaucitron .tarteaucitronBorder {
        border: 0 !important;
    }

    #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList {
        border: 0 !important;
    }

    #tarteaucitron #tarteaucitronServices .tarteaucitronTitle {
        text-align: left !important;
    }

    .tarteaucitronName .tarteaucitronH2 {
        max-width: 80%;
    }

    #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk {
        text-align: center !important;
    }

    #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk button {
        margin-bottom: 5px;
    }
}

@media screen and (min-width:768px) and (max-width:991px) {
    #tarteaucitron {
        border: 0 !important;
        left: 0 !important;
        margin: 0 5% !important;
        max-height: 80% !important;
        width: 90% !important;
    }
}

/***
 * Common value
 */
#tarteaucitronRoot div#tarteaucitron {
    left: 0;
    right: 0;
    margin: auto;
}

#tarteaucitronRoot button#tarteaucitronBack {
    background: #eee;
}

#tarteaucitron .clear {
    clear: both;
}

#tarteaucitron a {
    color: rgb(66, 66, 66);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

#tarteaucitronRoot button {
    background: transparent;
    border: 0;
}

#tarteaucitronAlertBig strong, #tarteaucitronAlertSmall strong,
#tarteaucitronAlertBig a, #tarteaucitronAlertSmall a {
    color: #fff;
}

#tarteaucitron strong {
    font-size: 22px;
    font-weight: 500;
}

#tarteaucitron ul {
    padding: 0;
}

#tarteaucitron .tarteaucitronH1, #tarteaucitron .tarteaucitronH2, #tarteaucitron .tarteaucitronH3, #tarteaucitron .tarteaucitronH4, #tarteaucitron .tarteaucitronH5, #tarteaucitron .tarteaucitronH6 {
    display: block;
}

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
/***
 * Root div added just before </body>
 */
#tarteaucitronRoot {
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
}

#tarteaucitronRoot * {
    box-sizing: initial;
    color: #333;
    /*font-family: sans-serif !important;*/
    font-size: 14px;
    line-height: normal;
    vertical-align: initial;
}

#tarteaucitronRoot .tarteaucitronH1 {
    font-size: 1.5em;
    text-align: center;
    color: #fff;
    margin: 15px 0 28px;
}

#tarteaucitronRoot .tarteaucitronH2 {
    display: inline-block;
    margin: 12px 0 0 10px;
    color: #fff;
}

#tarteaucitronCookiesNumberBis.tarteaucitronH2 {
    margin-left: 0;
}

/***
 * Control panel
 */
#tarteaucitronBack {
    background: #fff;
    display: none;
    height: 100%;
    left: 0;
    opacity: 0.7;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2147483646;
}

#tarteaucitron {
    display: none;
    max-height: 80%;
    left: 50%;
    margin: 0 auto 0 -430px;
    padding: 0;
    position: fixed;
    top: 6%;
    width: 860px;
    z-index: 2147483647;
}

#tarteaucitron .tarteaucitronBorder {
    background: #fff;
    border: 2px solid #333;
    border-top: 0;
    height: auto;
    overflow: auto;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronClosePanelCookie,
#tarteaucitron #tarteaucitronClosePanel {
    background: #333333;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    padding: 4px 0;
    position: absolute;
    right: 0;
    text-align: center;
    width: 70px;
}

#tarteaucitron #tarteaucitronDisclaimer {
    color: #555;
    font-size: 12px;
    margin: 15px auto 0;
    width: 80%;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronHidden,
#tarteaucitron #tarteaucitronServices .tarteaucitronHidden {
    background: rgba(51, 51, 51, 0.07);
}

#tarteaucitron #tarteaucitronServices .tarteaucitronHidden {
    display: none;
    position: relative;
}

#tarteaucitronCookiesList .tarteaucitronH3.tarteaucitronTitle {
    width: 100%;
    box-sizing: border-box;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronTitle,
#tarteaucitron #tarteaucitronServices .tarteaucitronTitle button,
#tarteaucitron #tarteaucitronInfo,
#tarteaucitron #tarteaucitronServices .tarteaucitronDetails,
#tarteaucitronRoot .asCatToggleBtn {
    color: #fff;
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    margin: 20px 0px 0px;
    padding: 5px 20px;
    text-align: left;
    width: auto;
    background: #333;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName a,
#tarteaucitron #tarteaucitronServices .tarteaucitronTitle a {
    color: #fff;
    font-weight: 500;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName a:hover,
#tarteaucitron #tarteaucitronServices .tarteaucitronTitle a:hover {
    text-decoration: none !important;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName a {
    font-size: 22px;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronTitle a {
    font-size: 14px;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronTitle {
    padding: 5px 10px;
    margin: 0;
}

#tarteaucitron #tarteaucitronInfo,
#tarteaucitron #tarteaucitronServices .tarteaucitronDetails:not(.tarteaucitronDetailsInline) {
    color: #fff;
    display: none;
    font-size: 12px;
    font-weight: 500;
    margin-top: 0;
    max-width: 270px;
    padding: 20px;
    position: absolute;
    z-index: 2147483647;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronTitle + [id^=\"tarteaucitronDetails\"] {
    width: Calc(100% - 3rem);
    font-weight:500;
    margin:0;
    padding:1.5rem;
    background:rgba(51, 51, 51, 0.2);
    color:#333;
}

#tarteaucitron #tarteaucitronInfo a {
    color: #fff;
    text-decoration: underline;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine:hover {
    background: rgba(51, 51, 51, 0.2);
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine {
    background: rgba(51, 51, 51, 0.1);
    border-left: 5px solid transparent;
    margin: 0;
    overflow: hidden;
    padding: 15px 5px;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine.tarteaucitronIsAllowed {
    border-color: #1B870B;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine.tarteaucitronIsDenied {
    border-color: #9C1A1A;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine {
    background: #333;
    border: 3px solid #333;
    border-left: 9px solid #333;
    border-top: 5px solid #333;
    margin-bottom: 0;
    margin-top: 21px;
    position: relative;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine:hover {
    background: #333;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName {
    margin-left: 15px;
    margin-top: 2px;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName button {
    color: #fff;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronAsk {
    margin-top: 0px !important;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName {
    display: inline-block;
    float: left;
    margin-left: 10px;
    text-align: left;
    width: 50%;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName a:hover {
    text-decoration: underline;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk {
    display: inline-block;
    float: right;
    margin: 7px 15px 0;
    text-align: right;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk .tarteaucitronAllow,
#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk .tarteaucitronDeny,
.tac_activate .tarteaucitronAllow {
    background: #555;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    padding: 6px 10px;
    text-align: center;
    text-decoration: none;
    width: auto;
    border: 0;
}

#tarteaucitron #tarteaucitronServices #tarteaucitronAllAllowed.tarteaucitronIsSelected {
    background-color: #1B870B;
    opacity: 1;
}
#tarteaucitron #tarteaucitronServices #tarteaucitronAllDenied.tarteaucitronIsSelected,
#tarteaucitron #tarteaucitronServices #tarteaucitronAllDenied2.tarteaucitronIsSelected {
    background-color: #9C1A1A;
    opacity: 1;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine.tarteaucitronIsAllowed .tarteaucitronAllow,
#tarteaucitron #tarteaucitronServices #tarteaucitronServices_mandatory .tarteaucitronLine button.tarteaucitronAllow {
    background-color: #1B870B;
}
#tarteaucitron #tarteaucitronServices .tarteaucitronLine.tarteaucitronIsDenied .tarteaucitronDeny {
    background-color: #9C1A1A;
}

#tarteaucitron #tarteaucitronServices #tarteaucitronServices_mandatory .tarteaucitronLine button.tarteaucitronAllow{
    opacity: 0.4;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies {
    color: #333;
    font-size: 12px;
}

#tarteaucitron .tarteaucitronH3 {
    font-size: 18px;
}

#tarteaucitron #tarteaucitronMainLineOffset .tarteaucitronName {
    width: auto!important;
    margin-left: 0!important;
    font-size: 14px;
}
span#tarteaucitronDisclaimerAlert {
    padding: 0 10px;
    display: inline-block;
}
#tarteaucitron .tarteaucitronBorder, #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain, #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList, #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronHidden, #tarteaucitron #tarteaucitronServices .tarteaucitronMainLine {
    border-color: #333!important;
}

/***
 * Big alert
 */
.tarteaucitronAlertBigTop {
    top: 0;
}

.tarteaucitronAlertBigBottom {
    bottom: 0;
}

#tarteaucitronRoot #tarteaucitronAlertBig {
    background-color: ".$other[28]." !important;
    color: ".$other[29]." !important;
    font-size: ".$other[30]." !important;
    display: none;
    left: 0;
    position: fixed;
    box-sizing: content-box;
    z-index: 2147483645;
    text-align: center;
    padding: 10px 0 10px 0;
    margin: auto;
    width: 100%;
}

#tarteaucitronAlertBig #tarteaucitronPrivacyUrl,
#tarteaucitronAlertBig #tarteaucitronPrivacyUrlDialog,
#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert,
#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong {
    font: ".$other[30]." ".$page[16].";
    color: ".$other[29].";
}

#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong {
    font-weight: 700;
}

#tarteaucitronAlertBig #tarteaucitronPrivacyUrl,
#tarteaucitronAlertBig #tarteaucitronPrivacyUrlDialog {
    cursor: pointer;
}

#tarteaucitronAlertBig #tarteaucitronCloseAlert,
#tarteaucitronAlertBig #tarteaucitronPersonalize,
#tarteaucitronAlertBig #tarteaucitronPersonalize2,
.tarteaucitronCTAButton,
#tarteaucitron #tarteaucitronPrivacyUrl,
#tarteaucitron #tarteaucitronPrivacyUrlDialog,
#tarteaucitronRoot .tarteaucitronDeny,
#tarteaucitronRoot .tarteaucitronAllow {
    background: #008300;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 16px!important;
    line-height: 1.2;
    padding: 5px 10px;
    text-decoration: none;
    margin-left: 7px;
}

#tarteaucitronRoot .tarteaucitronDeny {
    background: #9C1A1A;
}

#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitron #tarteaucitronPrivacyUrl, #tarteaucitron #tarteaucitronPrivacyUrlDialog {
    background: #fff;
    color: #333;
    font-size: 13px;
    margin-bottom: 3px;
    margin-left: 7px;
    padding: 5px 10px;
}

#tarteaucitronPercentage {
    background: #0A0!important;
    box-shadow: 0 0 2px #fff, 0 1px 2px #555;
    height: 5px;
    left: 0;
    position: fixed;
    width: 0;
    z-index: 2147483644;
}

/***
 * Icon
 */
.tarteaucitronIconBottomRight {
    bottom: 0;
    right: 0;
}
.tarteaucitronIconBottomLeft {
    bottom: 0;
    left: 0;
}
.tarteaucitronIconTopRight {
    top: 0;
    right: 0;
}
.tarteaucitronIconTopLeft {
    top: 0;
    left: 0;
}

.tarteaucitronIconTopLeft #tarteaucitronManager {
    border-radius: 2px 7px 7px 2px;
}

.tarteaucitronIconTopRight #tarteaucitronManager {
    border-radius: 7px 2px 2px 7px;
}

.tarteaucitronIconBottomLeft #tarteaucitronManager {
    border-radius: 7px 7px 2px 2px;
}

.tarteaucitronIconBottomRight #tarteaucitronManager {
    border-radius: 7px 7px 2px 2px;
}

#tarteaucitronIcon {
    background: transparent;
    position: fixed;
    display: none;
    width: auto;
    z-index: 2147483646;
}
#tarteaucitronIcon #tarteaucitronManager {
    color: transparent;
    cursor: pointer;
    display: inline-block;
    font-size: 11px !important;
    padding: 8px 10px 8px;
    border: none;
}
#tarteaucitronIcon #tarteaucitronManager img {
    width: 50px;
    height: 50px;
}

#tarteaucitronRoot .tarteaucitronCross::before {
    content: '✗';
    display: inline-block;
    color: white;
}

#tarteaucitronRoot .tarteaucitronCheck::before {
    content: '✓';
    display: inline-block;
    color: white;
}

#tarteaucitronRoot .tarteaucitronPlus::before {
    content: '✛';
    display: inline-block;
    color: white;
}


/***
 * Small alert
 */

.tarteaucitronAlertSmallTop,.tarteaucitronAlertSmallBottom {
    bottom: 0;
}

#tarteaucitronAlertSmall {
    background: #333;
    display: none;
    padding: 0;
    position: fixed;
    right: 0;
    text-align: center;
    width: auto;
    z-index: 2147483646;
}

#tarteaucitronAlertSmall #tarteaucitronManager {
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 11px !important;
    padding: 8px 10px 8px;
}

#tarteaucitronAlertSmall #tarteaucitronManager:hover {
    background: rgba(255, 255, 255, 0.05);
}

#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot {
    background-color: gray;
    border-radius: 5px;
    display: block;
    height: 8px;
    margin-bottom: 1px;
    margin-top: 5px;
    overflow: hidden;
    width: 100%;
}

#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot #tarteaucitronDotGreen,
#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot #tarteaucitronDotYellow,
#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot #tarteaucitronDotRed {
    display: block;
    float: left;
    height: 100%;
    width: 0%;
}

#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot #tarteaucitronDotGreen {
    background-color: #1B870B;
}

#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot #tarteaucitronDotYellow {
    background-color: #FBDA26;
}

#tarteaucitronAlertSmall #tarteaucitronManager #tarteaucitronDot #tarteaucitronDotRed {
    background-color: #9C1A1A;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesNumber {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 30px;
    padding: 0px 10px;
    vertical-align: top;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesNumber:hover {
    background: rgba(255, 255, 255, 0.3);
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer {
    display: none;
    max-height: 70%;
    max-width: 500px;
    position: fixed;
    right: 0;
    width: 100%;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList {
    background: #fff;
    border: 2px solid #333;
    color: #333;
    font-size: 11px;
    height: auto;
    overflow: auto;
    text-align: left;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList strong {
    color: #333;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesTitle {
    background: #333;
    margin-top: 21px;
    padding: 13px 0 9px 13px;
    text-align: left;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesTitle strong {
    color: #fff;
    font-size: 16px;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain {
    background: rgba(51, 51, 51, 0.1);
    padding: 7px 5px 10px;
    word-wrap: break-word;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain:hover {
    background: rgba(51, 51, 51, 0.2);
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain a {
    color: #333;
    text-decoration: none;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListLeft {
    display: inline-block;
    width: 50%;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListLeft a strong {
    color: darkred;
}

#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListRight {
    color: #333;
    display: inline-block;
    font-size: 11px;
    margin-left: 10%;
    vertical-align: top;
    width: 30%;
}

/***
 * Fallback activate link
 */
.tac_activate {
    background: #333;
    color: #fff;
    display: table;
    font-size: 12px;
    height: 100%;
    line-height: initial;
    margin: auto;
    text-align: center;
    width: 100%;
}

.tac_float {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.tac_activate .tac_float strong {
    color: #fff;
}

.tac_activate .tac_float .tarteaucitronAllow {
    background-color: #1B870B;
    display: inline-block;
}

/***
 * CSS for services
 */
ins.ferank-publicite, ins.adsbygoogle {
    text-decoration: none;
}

div.amazon_product {
    height:240px;
    width:120px;
}

.tarteaucitronIsAllowed .tarteaucitronDeny {
    opacity: 0.4!important;
}.tarteaucitronIsDenied .tarteaucitronAllow {
     opacity: 0.4!important;
 }.tarteaucitronIsAllowed .tarteaucitronAllow {
      opacity: 1!important;
  }.tarteaucitronIsDenied .tarteaucitronDeny {
       opacity: 1!important;
   }
.tarteaucitronLine .tarteaucitronAllow, .tarteaucitronLine .tarteaucitronDeny {
    opacity: 0.4;
}
#tarteaucitronServices_mandatory button.tarteaucitronAllow {
    opacity: 1;
}

div#tarteaucitronInfo {
    display: block!important;
    position: relative !important;
    text-align: center!important;
    max-width: 80%!important;
    padding: 15px 0!important;
    margin: -10px auto 40px!important;
    font-size: 1em!important;
    border-bottom: 1px solid;
    border-top: 1px solid;
    border-color: #555;
}

a.tarteaucitronSelfLink {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -30px;
    text-align: center!important;
    display: block;
    height:30px;
}

.tarteaucitronMainLine .tarteaucitronH2 {
    font-size: 1.2em!important;
    margin-top: 4px!important;
}

span.tarteaucitronTitle.tarteaucitronH3 {
    margin-top: 12px!important;
}

#tarteaucitronCloseCross {
    position:absolute;
    color: #FFFF;
    font-size:1.8rem;
    cursor: pointer;
    top: 10px;
    right: 26px
}

.tarteaucitron-spacer-20 {
    height: 20px;
    display: block;
}

.tarteaucitron-display-block {
    display: block;
}

.tarteaucitron-display-none {
    display: none;
}

";
    SetChmod(CHEMIN.'inc/tarteaucitron/css/tarteaucitron.css');
    WriteFullDB(CHEMIN.'inc/tarteaucitron/css/tarteaucitron.css', $csslisttarteaucitron);
	
/*
    Fin de personnalisation de tarteaucitron
*/	
    /***************************************************************
     * Construction de la feuille CSS de personnalisation Bootstrap*
     ***************************************************************/
    $csslist = "/*  ---------  CSS for Bootstrap 4 generated for ".$mycss."  ----------- */

/***********
* Onglets */
.tab-content div.container {
    padding-top: 0px;
    max-width: 100%;
    text-align: left;
    ".getBorder($tabs[9], 'solid', $tabs[8])."
    border-radius: ".$tabs[10].";
    background-color: ".$tabs[7].";
}
ul.nav-tabs {
    padding-bottom: 0px;
    width: 100%;
    border-bottom: 0;
}
.nav-tabs .nav-link.active {
    background-color: ".$tabs[5].";
    font-weight: bold;
    color: ".$tabs[6].";
    ".getBorder($tabs[3], 'solid', $tabs[2])."    
    border-bottom-width: 0;
    border-radius: ".$tabs[4].";
}
.nav-tabs .nav-link:hover {
    background-color: ".$tabs[28]." important;
    color: ".$tabs[29]." !important;
    ".getBorder($tabs[3], 'solid', $tabs[2])."
    border-bottom-width: 0;
    border-radius: ".$tabs[4].";
}
.nav-tabs .nav-link {
    font: ".(empty($page[40]) ? 'inherit' : trim($page[41]." ".$page[40]." ".$page[39])).";
    margin-bottom: 1px;
    background-color: ".$tabs[1].";
    color: ".$tabs[0]." !important;
}
/**********************
* Accordéon vertical */
.card .card-header.collapsed.card-link {
    color: ".$tabs[11]." !important;
    background-color: ".$tabs[12].";
    ".getBorder($tabs[14], 'solid', $tabs[13])."
    border-radius: ".$tabs[15].";
}
.card .card-header.card-link {
    color: ".$tabs[17].";
    font-weight: bold;
    background-color: ".$tabs[16].";
    ".getBorder($tabs[14], 'solid', $tabs[13])."
    border-radius: ".$tabs[15].";
}
.card .collapse.show {
    background-color: ".$tabs[18].";
    color: inherit;
    ".getBorder($tabs[20], 'solid', $tabs[19])."
    border-radius: ".$tabs[21].";
}
.card .card-body {
    font-size: 13px;
}
/****************
 * Fenêtre modale */
.modal-content {
    background-color: ".$tabs[24].";
    color: ".$tabs[23].";
    ".getBorder($tabs[26], 'solid', $tabs[25])."
    border-radius: ".$tabs[27].";
}
/**************
* Info bulle */
.popover {
    color: ".$texte[0].";
    background-color: ".$other[14].";
    border-radius: 6px;
}
.popover-header {
    color: ".$titre[0].";
    background-color: ".$titre[1].";
    font: normal ".$page[2]." ".$page[1].";
}
.popover-body {
    color: ".$texte[0].";
    background-color: ".$other[14].";
    font: normal ".$page[2]." ".$page[1].";
    border-radius: 0 0 6px 6px;
}
/***********
* Boutons */
.btn-lg, .btn-md {
    font-size: 1.5rem;
    border-radius: ".$presform[9].";
}
.btn-info {
	color: ".$presform[11].";
	background-color: ".$presform[2].";
	border-color: ".$presform[2].";
    border-style: solid;
}
.btn-info:hover {
    color: ".$presform[14].";
    background-color: ".$presform[13].";
	border-color: ".$presform[13].";
    border-style: solid;
}
.btn.btn-outline-secondary {
    background-color: ".$presform[3].";
}
/***************
* Formulaires */
.form-control, .form-control-lg {
    font-size: inherit;
}
.input-group-prepend .input-group-text {
	border-radius: ".$presform[9].";
}
.input-group-append .input-group-text {
	border-radius: ".$presform[9].";
}
span.input-group-text {
    ".getBorder($presform[7], $bordure[38], $presform[8])."
}
";
	
        SetChmod(CHEMIN.'skins/'.$mycss.'/jqstyle.css');
        $csslist = str_replace('\'', '"', $csslist);
        WriteFullDB(CHEMIN.'skins/'.$mycss.'/bs4style.css', $csslist);
        
        /**************************************************
         * Construction de la feuille CSS CKEditor public *
         **************************************************/
        $csslist = "/*  ---------  Paramètrage de CKEditor public  ----------- */

body {
	background: ".$other[24].";
	color: ".$other[25].";
	font-size: ".$other[26].";
}
";
	
        SetChmod(CHEMIN.'inc/ckeditor_config/guppy_contents_plus.css');
        $csslist = str_replace('\'', '"', $csslist);
        WriteFullDB(CHEMIN.'inc/ckeditor_config/guppy_contents_plus.css', $csslist);
    }
}

if ($regit == 3) {
	$nameskin = import('nameskin');
	if (preg_match('/^[a-z0-9_]{4,20}$/', $nameskin) && !is_dir(CHEMIN.'skins/'.$nameskin)) {
		recursiveCopy(CHEMIN.'skins/no_skin', CHEMIN.'skins/'.$nameskin);
		$selskin = $userprefs[10] = $page[14] = $nameskin;
	}
}

$skn  = isset($selskin) ? '&amp;selskin='.$selskin : '';
$img1 = $img2 = array();
$img0 = ExploreImg($meskin.'img/');
$n    = 0;
foreach($img0 as $img) { $img1['S'.$n.'|'] = $img; $n++; }
$img0 = ExploreImg('img/');
$n    = 0;
foreach($img0 as $img) { $img2['I'.$n.'|'] = $img; $n++; }
$imgs = array_merge($img1, $img2);

$rpts         = array('no-repeat'=>$admin[1604], 'repeat'=>'X + Y', 'repeat-x'=>'X', 'repeat-y'=>'Y');
$poss         = array('top', 'bottom', 'center');
$textalign    = array('left'=>$admin[390], 'center'=>$admin[391], 'right'=>$admin[392]);
$textstyles   = array(''=>$admin[423], 'bold'=>$admin[387], 'italic'=>$admin[388]);
$borderstyles = array('none'=>$admin[875], 'hidden'=>$admin[1556], 'solid'=>$admin[1501], 'dotted'=>$admin[1502], 'dashed'=>$admin[1503], 'double'=>$admin[1504], 'groove'=>$admin[1505], 'ridge'=>$admin[1506], 'inset'=>$admin[1507], 'outset'=>$admin[1508]);
$parallaxnav  = array('no'=>$admin[1604], 'left'=>$admin[494], 'right'=>$admin[495]);

$fontNames = array(
    "Arial, Helvetica, sans-serif",
    "Verdana, 'Bitstream Vera Sans', sans-serif",
    "'Trebuchet MS', Helvetica, sans-serif",
    "'Comic sans MS', Arial, sans-serif",
    "'Times New Roman', Times, serif",
    "Georgia, 'Times New Roman', serif",
    "'Courier New', Courier, monospace"
);
$fontNames = array_merge($fontNames, $afonts);

$headinc .= '
    <script type="text/javascript">
        $(document).ready( function() {
            $("#gyaccordion").hoverAccordion({
                keepHeight: false,
                activateItem: 1,
				onClickOnly: true,
                speed: 400
            });
            $("#gyaccordion").children("li:first").addClass("firstitem");
            $("#gyaccordion").children("li:last").addClass("lastitem");
        });
    </script>
';

$headinc .= '
<link rel="stylesheet" media="screen" type="text/css" href="../inc/colorpicker/css/colorpicker.css" /> 
<script type="text/javascript" src="../inc/colorpicker/js/colorpicker.js"></script>
';

function GetSelector($padding, $label, $inputname, $color) { // Palette de couleurs
	return '
        <tr style="text-align:left;">
          <td class="w-55 align-middle" style="padding:4px 0 2px '.$padding.'px;">&bull; '.$label.'</td>
		  <td style="padding:4px 0 2px 4px;">
			<div>
			  <input class="form-control" id="'.$inputname.'" name="'.$inputname.'" type="text" size="6" value="'.$color.'" 
                style="font:14px Arial;text-align:center;width:92px;height:29px;border:1px solid #000;border-radius:4px 0 0 4px;float:left;" />
			  <div style="float:left;width:40px;height:29px;vertical-align:top;border:1px solid #000;border-left:none;background-color:'.$color.';padding:-4px 0 4px 0;"></div>
			  <div id="'.$inputname.'div" style="float:left;width:40px;height:29px;border:1px solid #000;border-left:none;background-color:'.$color.';border-radius:0 4px 4px 0;">&nbsp;</div>
			</div>'.
			BeginJavascript()."
			$('#".$inputname."').ColorPicker({
				onSubmit: function(hsb, hex, rgb, el) {
					$(el).val('#' + hex.toUpperCase());
					$(el).ColorPickerHide();
				},
				onChange: function (hsb, hex, rgb) {
					$('#".$inputname."div').css('backgroundColor', '#' + hex);
				},
				onBeforeShow: function () {
					$(this).ColorPickerSetColor(this.value);
				}
			})
			.bind('keyup', function(){
				$(this).ColorPickerSetColor(this.value);
			});".EndJavascript().'
          </td>
        </tr>';
}

function SelectImgs($padding, $label, $name, $value, &$imgs) {
    global $admin;
    $out = '
        <tr style="text-align:left;">
          <td class="w-55 align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">
              <option value="">'.$admin[90].'</option>
              <optgroup label="SKIN">';
    $ok = true;
	foreach($imgs as $key => $img) {
        if (substr($key, 0, 1) != 'S' && $ok) {
            $out .= '
              </optgroup>
              <optgroup label="IMG">';
            $ok = false;
        }
        $out .= '
              <option value="'.$key.$img.'"'.Selected($value == $key.$img).'>'.$img.'</option>';
	}
	$out .= '
              </optgroup>
            </select>
          </td>
        </tr>';
    return $out;
}

function SelectRepeats($padding, $label, $name, $srpt, &$rpts) {
    $out = '
        <tr style="text-align:left;">
          <td class="w-55 align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
	foreach($rpts as $key => $rpt) {
		$out .= '
              <option value="'.$key.'"'.Selected($srpt == $key).'>'.$rpt.'</option>';
	}
	$out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function SelectBorderStyles($padding, $label, $name, $value, &$borderstyles) {
    $out = '
        <tr style="text-align:left;">
          <td class="align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
    foreach($borderstyles as $key => $style) {
        $out .= '
              <option value="'.$key.'"'.Selected($value == $key).'>'.$style.'</option>';
	}
	$out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function SelectPoss($padding, $label, $name, $value, &$poss) {
    $out = '
        <tr style="text-align:left;">
          <td class="align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
	foreach($poss as $pos) {
		$out .= '
              <option value="'.$pos.'"'.Selected($value == $pos).'>'.strtoupper($pos).'</option>';
	}
	$out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function SelectFontOptions($padding, $name, $value, &$fontNames) {
    global $admin;
    $out = '
        <tr style="text-align:left;">
          <td class="w-55 align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$admin[85].'</td>
		  <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
    foreach ($fontNames as $font) {
        $out .= '
              <option value="'.$font.'"'.Selected($value == $font).'>'.$font.'</option>';
    }
    return $out.'
            </select>
          </td>
        </tr>';
}

function SelectTextStyles($padding, $name, $value, &$textstyles) {
    global $admin;
    $out = '
        <tr style="text-align:left;">
          <td class="w-55 align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$admin[1499].'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
    foreach($textstyles as $key => $style) {
        $out .= '
              <option value="'.$key.'"'.Selected($value == $key).'>'.$style.'</option>';
	}
	$out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function InputTexte($padding, $label, $name, $value, $size) {
    return '
        <tr style="text-align:left;">
          <td class="w-55 align-middle py-0 pr-0" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
		  <td style="padding:0 0 0 4px;">
            <input name="'.$name.'" class="form-control texte" style="width: '.($size * 12).'px;" type="text" size="'.$size.'" value="'.$value.'" />
          </td>
        </tr>';
}

function InputCheckbox($padding, $label, $name, $value) {
    return '
        <tr style="text-align:left;">
          <td style="padding:6px 0 2px '.$padding.'px;width:55%;">&bull; <label for="'.$name.'">'.$label.'</label></td>
          <td class="form-check" style="padding:8px 0 2px 4px;">
            <input class="form-check-input ml-0" type="checkbox" id="'.$name.'" name="'.$name.'"'.Checked($value == 'on').' />
          </td>
        </tr>';
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[67]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[67], '100%');

echo '
<div style="padding:16px 0;">'.ToHelp($lng, '&pg=966&mnuid=937&tconfig=0#z2').'</div>';

echo '
<div style="text-align:center;">
'.$admin[68].'<br />'.$admin[69].'
</div>';

echo '
<p class="forum" style="text-align:left; padding:5px 20px;">'.$admin[725].' : '.$userprefs[10].$messreg.'</p>
<div class="w-100 m-auto" style="max-width:720px;">';
if ($selskin == 'no_skin') {
	echo '
  <p style="text-align:center;">'.$admin[1438].'</p>
  <fieldset>
	<form name="genskin" action="admin.php?lng='.$lng.'&amp;pg=config2" method="post">
	  <input type="hidden" name="regit" value="3" />
	  <p class="forum2" style="text-align:center;">'.$admin[1439].'
	    <input type="text" class="texte" name="nameskin" size=20 />
	  </p>
	  <p style="text-align:center;">'.SubmitButton($admin[38]).'</p>
    </form>
  </fieldset>';
} else {
	echo '
  <form name="conf1" action="admin.php?lng='.$lng.'&amp;pg=config2" method="post">
    <input type="hidden" name="regit" value="1" />
    <input type="hidden" name="regpart" value="1" />
    <input type="hidden" name="selskin" value="'.$selskin.'" />';
	echo '
    <p style="width:700px; background-color:#7f7f7f; border:1px solid #67890b; border-radius:4px; color:#ffffff; font-weight:bold; margin:4px auto; padding:4px;">'.$admin[1559].'</p>
    <fieldset class="w-100 m-auto mb-3" style="max-width:700px;padding:0 16px 6px;">'.legend($admin[81]).'
      <div class="table-responsive-md">
      <table class="table w-100">
        <tr style="text-align:left;">
          <td style="padding:4px;">&bull; '.$admin[1577].'</td>
        </tr>';
    $pages54 = explode(',', $page[54]);
    $pages62 = explode(',', $page[62]);
    foreach ($templates as $key=>$tmpl) {
        if (!isset($pages54[$key])) $pages54[$key] = '-';
        if ($pages54[$key] == '-') $pages54[$key] = '';
        echo '
        '.InputTexte(32, $admin[1665].$key.' - '.$tmpl, 'page54'.$key, $pages54[$key], 4);
        if (!isset($pages62[$key])) $pages62[$key] = '-';
        if ($pages62[$key] == '-') $pages62[$key] = '';
        echo '
        '.InputTexte(64, $admin[1761], 'page62'.$key, $pages62[$key], 4);
    }
    echo '
      </table>
      </div>
    </fieldset>
    <fieldset style="max-width:700px;padding:0 16px 6px;">'.legend($admin[83]).'
      <div class="table-responsive-md">
      <table class="table w-100">';
	echo '
        '.InputCheckbox(4, $admin[623], 'page22', $page[22]).'
        '.InputCheckbox(4, $admin[244], 'page8', $page[8]).'
        '.InputCheckbox(4, $admin[1562], 'body7', $body[7]).'
        '.InputTexte(32, $admin[1560], 'body5', $body[5], 6).'
        '.InputTexte(32, $admin[1561], 'body6', $body[6], 6).'
        '.InputTexte(32, $admin[1529], 'opacity20', $opacity[20], 5).'
        '.InputCheckbox(4, $admin[1580], 'body16', $body[16]).'
      </table>
      </div>
    </fieldset>
    <div class="row quest p-0 mt-2 w-98 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  </form>';
    if (FileDBExist($meskin.'style.css')) {
		echo '
  <hr /><br />
  <a id="generate"></a>
  <fieldset class="w-100 text-center m-auto" style="max-width:700px;">'.legend($admin[724].$messreg2);
		echo '
    <b>'.$admin[725].'&nbsp;:&nbsp;'.$selskin.'</b>
    <p style="text-align:center;">'.$admin[722].'</p>';
		echo '
    <br />
    <form name="conf2" action="admin.php?lng='.$lng.'&amp;pg=config2#generate" method="post">
      <input type="hidden" name="regit" value="1" />
      <input type="hidden" name="regpart" value="2" />
	  <input type="hidden" name="mycss" value="'.$selskin.'" />
      <input type="hidden" name="selskin" value="'.$selskin.'" />

      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>';
        // Corps du document
		echo '
      <div class="m-auto" id="accordion" style="max-width:680px;">
      <div class="card">
        <a class="card-header card-link" data-toggle="collapse" href="#collapse1">'.strtoupper(trim(mb_substr($admin[91], 0, -1))).' / '.$admin[1489].'</a>
        <div class="collapse show" data-parent="#accordion" id="collapse1">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[91]).'</td></tr>
              '.SelectImgs(32, $admin[91], 'page4', $page[4], $imgs).'
              '.InputTexte(32, $admin[1550], 'other5', $other[5], 16).'
              '.InputTexte(32, $admin[1551], 'other6', $other[6], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0;">&bull; '.$admin[1489].'</td></tr>
              '.SelectFontOptions(32, 'page39', $page[39], $fontNames).'
              '.SelectTextStyles(64, 'page41', $page[41], $textstyles).'
              '.InputTexte(64, $admin[86], 'page40', $page[40], 6).'
              '.GetSelector(64, $admin[95], 'texte9', $texte[9]).'
              '.GetSelector(32, $admin[82], 'body0', $body[0]).'
              '.SelectImgs(32, $admin[88], 'body1', $body[1], $imgs).'
              '.InputCheckbox(64, $admin[321], 'body2', $body[2]).'
              '.SelectRepeats(64, $admin[1490], 'body3', $body[3], $rpts).'
              '.SelectPoss(64, $admin[1491], 'body4', $body[4], $poss).'
              '.SelectImgs(32, $admin[1493], 'body8', $body[8], $imgs).'
              '.SelectRepeats(64, $admin[1490], 'body9', $body[9], $rpts).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Parallaxe
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse2">'.$admin[1572].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse2">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.$admin[1572].'</td></tr>';
        echo '
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 32px;">&bull; '.$admin[1574].'1 ('.$admin[1583].')</td></tr>
              '.GetSelector(64, $admin[82], 'page56', $page[56]).'
              '.SelectImgs(64, $admin[88], 'page24', $page[24], $imgs).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 32px;">&bull; '.$admin[1574].'2 ('.$admin[1666].')</td></tr>
              '.GetSelector(64, $admin[82], 'page57', $page[57]).'
              '.SelectImgs(64, $admin[88], 'page25', $page[25], $imgs).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 32px;">&bull; '.$admin[1574].'3 ('.$admin[1667].')</td></tr>
              '.GetSelector(64, $admin[82], 'page58', $page[58]).'
              '.SelectImgs(64, $admin[88], 'page26', $page[26], $imgs).'
              '.SelectRepeats(32, $admin[880], 'page50', $page[50], $parallaxnav).'
              '.InputCheckbox(64, $admin[241], 'page7', $page[7]).'
              '.InputTexte(96, $admin[436], 'page63', $page[63], 6).'
              '.InputTexte(96, $admin[1516], 'page64', $page[64], 6).'
              '.GetSelector(64, $admin[82], 'page51', $page[51]).'
              '.GetSelector(64, $admin[87], 'bordure44', $bordure[44]).'
              '.InputTexte(64, $admin[1575], 'page52', $page[52], 6).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Bandeaux
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse3">'.$admin[81].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse3">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; HEADER</td></tr>
              '.GetSelector(32, $admin[82], 'page43', $page[43]).'
              '.InputTexte(64, $admin[1529], 'opacity18', $opacity[18], 6).'
              '.GetSelector(32, $admin[87], 'bordure40', $bordure[40]).'
              '.InputTexte(64, $admin[211], 'bordure41', $bordure[41], 16).'
              '.SelectBorderStyles(64, $admin[422], 'bordure43', $bordure[43], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'bordure42', $bordure[42], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; TOP</td></tr>
              '.InputTexte(32, $admin[436], 'titre78', (empty($titre[78]) ? '100%' : $titre[78]), 6).'
              '.InputTexte(32, $admin[1551], 'marge24', $marge[24], 16).'
              '.GetSelector(32, $admin[82], 'page29', $page[29]).'
              '.InputTexte(64, $admin[1529], 'opacity0', $opacity[0], 6).'
              '.GetSelector(32, $admin[87], 'bordure19', $bordure[19]).'
              '.InputTexte(64, $admin[211], 'bordure20', $bordure[20], 16).'
              '.SelectBorderStyles(64, $admin[422], 'bordure29', $bordure[29], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'bordure21', $bordure[21], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; MAIN</td></tr>
              '.InputTexte(32, $admin[436], 'titre79', (empty($titre[79]) ? '100%' : $titre[79]), 6).'
              '.InputTexte(32, $admin[1551], 'marge25', $marge[25], 16).'
              '.GetSelector(32, $admin[82], 'titre34', $titre[34]).'
              '.InputTexte(64, $admin[1529], 'opacity7', $opacity[7], 6).'
              '.GetSelector(32, $admin[87], 'titre36', $titre[36]).'
              '.InputTexte(64, $admin[211], 'titre37', $titre[37], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre38', $titre[38], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre39', $titre[39], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; BOTTOM</td></tr>
              '.InputTexte(32, $admin[436], 'titre80', (empty($titre[80]) ? '100%' : $titre[80]), 6).'
              '.InputTexte(32, $admin[1551], 'marge26', $marge[26], 16).'
              '.GetSelector(32, $admin[82], 'page31', $page[31]).'
              '.InputTexte(64, $admin[1529], 'opacity1', $opacity[1], 6).'
              '.GetSelector(32, $admin[87], 'bordure22', $bordure[22]).'
              '.InputTexte(64, $admin[211], 'bordure23', $bordure[23], 16).'
              '.SelectBorderStyles(64, $admin[422], 'bordure30', $bordure[30], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'bordure24', $bordure[24], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; FOOTER</td></tr>
              '.InputTexte(32, $admin[436], 'titre81', (empty($titre[81]) ? '100%' : $titre[81]), 6).'
              '.InputTexte(32, $admin[1564], 'page21', $page[21], 6).'
              '.InputTexte(32, $admin[1551], 'marge27', $marge[27], 16).'
              '.GetSelector(32, $admin[82], 'page5', $page[5]).'
              '.InputTexte(64, $admin[1529], 'opacity2', $opacity[2], 6).'
              '.GetSelector(32, $admin[87], 'bordure3', $bordure[3]).'
              '.InputTexte(64, $admin[211], 'bordure4', $bordure[4], 16).'
              '.SelectBorderStyles(64, $admin[422], 'bordure31', $bordure[31], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'bordure5', $bordure[5], 16).'
              '.SelectFontOptions(32, 'page45', $page[45], $fontNames).'
              '.SelectTextStyles(64, 'page47', $page[47], $textstyles).'
              '.InputTexte(64, $admin[86], 'page46', $page[46], 6).'
              '.GetSelector(64, $admin[95], 'texte8', $texte[8]).'
              '.SelectBorderStyles(32, $admin[443], 'texte13', $texte[13], $textalign).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Colonnes latérales
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse4">'.$admin[1519].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse4">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[494]).'</td></tr>
              '.InputTexte(32, $admin[1565], 'body10', $body[10], 2).'
              '.GetSelector(32, $admin[82], 'titre14', $titre[14]).'
              '.InputTexte(64, $admin[1529], 'opacity4', $opacity[4], 6).'
              '.GetSelector(32, $admin[87], 'titre16', $titre[16]).'
              '.InputTexte(64, $admin[211], 'titre17', $titre[17], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre18', $titre[18], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre19', $titre[19], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[495]).'</td></tr>
              '.InputTexte(32, $admin[1565], 'body12', $body[12], 2).'
              '.GetSelector(32, $admin[82], 'titre21', $titre[21]).'
              '.InputTexte(64, $admin[1529], 'opacity5', $opacity[5], 6).'
              '.GetSelector(32, $admin[87], 'titre23', $titre[23]).'
              '.InputTexte(64, $admin[211], 'titre24', $titre[24], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre25', $titre[25], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre26', $titre[26], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[770]).'</td></tr>
              '.InputTexte(32, $admin[1565].' '.$admin[494], 'body13', $body[13], 2).'
              '.InputTexte(32, $admin[1565].' '.$admin[495], 'body15', $body[15], 2).'
              '.GetSelector(32, $admin[82], 'titre27', $titre[27]).'
              '.InputTexte(64, $admin[1529], 'opacity6', $opacity[6], 6).'
              '.GetSelector(32, $admin[87], 'titre29', $titre[29]).'
              '.InputTexte(64, $admin[211], 'titre30', $titre[30], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre31', $titre[31], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre32', $titre[32], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Zones centrales
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse5">'.$admin[1548].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse5">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; CENTER</td></tr>
              '.InputTexte(32, $admin[1565], 'body11', $body[11], 2).'
              '.GetSelector(32, $admin[82], 'titre41', $titre[41]).'
              '.InputTexte(64, $admin[1529], 'opacity8', $opacity[8], 6).'
              '.GetSelector(32, $admin[87], 'titre43', $titre[43]).'
              '.InputTexte(64, $admin[211], 'titre44', $titre[44], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre45', $titre[45], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre46', $titre[46], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1087]).'</td></tr>
              '.InputTexte(32, $admin[1551], 'marge28', $marge[28], 16).'
              '.GetSelector(32, $admin[82], 'titre60', $titre[60]).'
              '.InputTexte(64, $admin[1529], 'opacity15', $opacity[15], 6).'
              '.GetSelector(32, $admin[87], 'titre62', $titre[62]).'
              '.InputTexte(64, $admin[211], 'titre63', $titre[63], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre64', $titre[64], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre65', $titre[65], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1088]).'</td></tr>
              '.InputTexte(32, $admin[1551], 'marge29', $marge[29], 16).'
              '.GetSelector(32, $admin[82], 'titre66', $titre[66]).'
              '.InputTexte(64, $admin[1529], 'opacity16', $opacity[16], 6).'
              '.GetSelector(32, $admin[87], 'titre68', $titre[68]).'
              '.InputTexte(64, $admin[211], 'titre69', $titre[69], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre70', $titre[70], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre71', $titre[71], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1089]).'</td></tr>
              '.InputTexte(32, $admin[1551], 'marge30', $marge[30], 16).'
              '.GetSelector(32, $admin[82], 'titre72', $titre[72]).'
              '.InputTexte(64, $admin[1529], 'opacity17', $opacity[17], 6).'
              '.GetSelector(32, $admin[87], 'titre74', $titre[74]).'
              '.InputTexte(64, $admin[211], 'titre75', $titre[75], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre76', $titre[76], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre77', $titre[77], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Citations - Fil d'Ariane - Boîte impression
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse6">
          '.$admin[405].' - '.strtoupper($admin[1668]).' - '.strtoupper($admin[1084]).'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse6">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.$admin[405].'</td></tr>
              '.SelectFontOptions(32, 'citation0', $citation[0], $fontNames).'
              '.SelectTextStyles(64, 'citation3', $citation[3], $textstyles).'
              '.InputTexte(64, $admin[86], 'citation1', $citation[1], 6).'
              '.GetSelector(64, $admin[93], 'citation2', $citation[2]).'
              '.GetSelector(32, $admin[82], 'citation10', $citation[10]).'
              '.InputTexte(64, $admin[1529], 'opacity19', $opacity[19], 6).'
              '.SelectImgs(64, $admin[88], 'citation11', $citation[11], $imgs).'
              '.GetSelector(64, $admin[87], 'citation12', $citation[12]).'
              '.InputTexte(96, $admin[211], 'citation13', $citation[13], 16).'
              '.SelectBorderStyles(96, $admin[422], 'citation15', $citation[15], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'citation14', $citation[14], 16).'
              '.InputTexte(32, $admin[1550], 'citation16', $citation[16], 16).'
              '.InputTexte(32, $admin[1551], 'citation17', $citation[17], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1668]).'</td></tr>
              '.GetSelector(32, $admin[150].$admin[1520], 'citation4', $citation[4]).'
              '.GetSelector(32, $admin[150].$admin[1521], 'citation5', $citation[5]).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1084]).'</td></tr>
              '.SelectFontOptions(32, 'citation6', $citation[6], $fontNames).'
              '.SelectTextStyles(64, 'citation7', $citation[7], $textstyles).'
              '.InputTexte(64, $admin[86], 'citation8', $citation[8], 6).'
              '.GetSelector(64, $admin[93], 'citation9', $citation[9]).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Menu de navigation
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse7">'.$admin[806].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse7">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.SelectFontOptions(4, 'page18', $page[18], $fontNames).'
              '.SelectTextStyles(32, 'page37', $page[37], $textstyles).'
              '.InputTexte(32, $admin[86], 'page19', $page[19], 6).'
              '.GetSelector(4, $admin[1510], 'lien9', $lien[9]).'
              '.GetSelector(32, $admin[865], 'lien8', $lien[8]).'
              '.GetSelector(4, $admin[101], 'lien4', $lien[4]).'
              '.GetSelector(32, $admin[865], 'lien7', $lien[7]).'
              '.GetSelector(4, $admin[102], 'lien5', $lien[5]).'
              '.GetSelector(32, $admin[865], 'lien6', $lien[6]).'
              '.InputTexte(4, $admin[1550].' ('.mb_strtolower($admin[1525]).')', 'lien15', $lien[15], 16).'
              '.InputTexte(4, $admin[1551].' ('.mb_strtolower($admin[1525]).')', 'lien14', $lien[14], 16).'
              '.GetSelector(4, $admin[87].' ('.mb_strtolower($admin[1525]).')', 'lien10', $lien[10]).'
              '.InputTexte(32, $admin[211], 'lien11', $lien[11], 6).'
              '.SelectBorderStyles(32, $admin[422], 'lien12', $lien[12], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'lien13', $lien[13], 16).'
              '.GetSelector(4, $admin[82], 'page34', $page[34]).'
              '.InputTexte(32, $admin[1529], 'opacity3', $opacity[3], 6).'
              '.SelectImgs(32, $admin[88], 'page33', $page[33], $imgs).'
              '.GetSelector(32, $admin[87], 'bordure26', $bordure[26]).'
              '.InputTexte(64, $admin[211], 'bordure27', $bordure[27], 16).'
              '.SelectBorderStyles(64, $admin[422], 'bordure32', $bordure[32], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'bordure28', $bordure[28], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Navigation latérale
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse8">'.mb_strtoupper($admin[1766]).'</a>
        <div class="collapse" data-parent="#accordion" id="collapse8">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.mb_strtoupper($admin[880]).'</td></tr>
              '.InputTexte(32, $admin[1550].' ('.$admin[880].')', 'marge33', $marge[33], 16).'
              '.InputTexte(32, $admin[1551].' ('.$admin[880].')', 'marge34', $marge[34], 16).'
              '.InputTexte(32, $admin[1550].' ('.$admin[1770].')', 'marge37', $marge[37], 16).'
              '.InputTexte(32, $admin[1550].' ('.$admin[1771].')', 'marge38', $marge[38], 16).'
              '.GetSelector(32, $admin[865], 'lien25', $lien[25]).'
              '.GetSelector(32, $admin[87], 'lien26', $lien[26]).'
              '.InputTexte(64, $admin[211], 'lien27', $lien[27], 16).'
              '.SelectBorderStyles(64, $admin[422], 'lien29', $lien[29], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'lien28', $lien[28], 16).'
              '.SelectFontOptions(32, 'page65', $page[65], $fontNames).'
              '.SelectTextStyles(64, 'page66', $page[66], $textstyles).'
              '.InputTexte(64, $admin[86], 'page67', $page[67], 6).'
              '.InputTexte(32, $admin[1550].' ('.$admin[394].')', 'marge35', $marge[35], 16).'
              '.InputTexte(32, $admin[1551].' ('.$admin[394].')', 'marge36', $marge[36], 16).'
              '.GetSelector(32, $admin[101], 'lien16', $lien[16]).'
              '.GetSelector(64, $admin[865], 'lien30', $lien[30]).'
              '.GetSelector(32, $admin[102], 'lien17', $lien[17]).'
              '.GetSelector(64, $admin[865], 'lien18', $lien[18]).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.mb_strtoupper($admin[1767]).'</td></tr>
              '.GetSelector(32, $admin[865], 'lien19', $lien[19]).'
              '.GetSelector(32, $admin[87], 'lien20', $lien[20]).'
              '.InputTexte(64, $admin[211], 'lien21', $lien[21], 6).'
              '.GetSelector(32, $admin[1768], 'lien36', $lien[36]).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.mb_strtoupper($admin[956]).'</td></tr>
              '.SelectFontOptions(32, 'titre47', $titre[47], $fontNames).'
              '.SelectTextStyles(64, 'titre48', $titre[48], $textstyles).'
              '.InputTexte(64, $admin[86], 'titre49', $titre[49], 6).'
              '.GetSelector(64, $admin[150], 'titre50', $titre[50]).'
              '.GetSelector(32, $admin[865], 'titre51', $titre[51]).'
              '.GetSelector(32, $admin[87], 'titre52', $titre[52]).'
              '.InputTexte(64, $admin[211], 'titre53', $titre[53], 16).'
              '.SelectBorderStyles(64, $admin[422], 'titre54', $titre[54], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'titre55', $titre[55], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">&bull; '.mb_strtoupper($admin[1217]).'</td></tr>
              '.SelectFontOptions(32, 'page68', $page[68], $fontNames).'
              '.SelectTextStyles(64, 'page69', $page[69], $textstyles).'
              '.InputTexte(64, $admin[86], 'page70', $page[70], 6).'
              '.GetSelector(32, $admin[101], 'lien22', $lien[22]).'
              '.GetSelector(64, $admin[865], 'lien31', $lien[31]).'
              '.GetSelector(32, $admin[102], 'lien23', $lien[23]).'
              '.GetSelector(64, $admin[865], 'lien24', $lien[24]).'
              '.GetSelector(32, $admin[87], 'lien32', $lien[32]).'
              '.InputTexte(64, $admin[211], 'lien33', $lien[33], 16).'
              '.SelectBorderStyles(64, $admin[422], 'lien35', $lien[35], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'lien34', $lien[34], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Titre des boîtes centrales
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse9">'.$admin[92].$admin[96].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse9">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.GetSelector(4, $admin[82], 'titre1', $titre[1]).'
              '.InputTexte(32, $admin[1529], 'opacity9', $opacity[9], 6).'
              '.SelectImgs(4, $admin[94], 'titre8', $titre[8], $imgs).'
              '.SelectFontOptions(4, 'titre2', $titre[2], $fontNames).'
              '.SelectTextStyles(32, 'titre12', $titre[12], $textstyles).'
              '.InputTexte(32, $admin[86], 'titre3', $titre[3], 6).'
              '.GetSelector(32, $admin[93], 'titre0', $titre[0]).'
              '.SelectBorderStyles(32, $admin[443], 'texte10', $texte[10], $textalign).'
              '.InputTexte(4, $admin[1550], 'marge9', $marge[9], 16).'
              '.InputTexte(4, $admin[1551], 'marge10', $marge[10], 16).'
              '.GetSelector(4, $admin[87], 'bordure7', $bordure[7]).'
              '.InputTexte(32, $admin[211], 'bordure8', $bordure[8], 16).'
              '.SelectBorderStyles(32, $admin[422], 'bordure34', $bordure[34], $borderstyles).'
              '.InputTexte(4, $admin[1343], 'bordure9', $bordure[9], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Boîtes centrales
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse10">'.$admin[96].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse10">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.SelectFontOptions(4, 'page1', $page[1], $fontNames).'
              '.SelectTextStyles(32, 'page36', $page[36], $textstyles).'
              '.InputTexte(32, $admin[86], 'page2', $page[2], 6).'
              '.GetSelector(32, $admin[95], 'texte0', $texte[0]).'
              '.InputTexte(32, $admin[695], 'page6', $page[6], 6).'
              '.GetSelector(4, $admin[99], 'texte1', $texte[1]).'
              '.GetSelector(4, $admin[100], 'texte2', $texte[2]).'
              '.InputTexte(32, $admin[1529], 'opacity10', $opacity[10], 6).'
              '.GetSelector(4, $admin[101], 'lien0', $lien[0]).'
              '.GetSelector(4, $admin[102], 'lien1', $lien[1]).'
              '.InputTexte(4, $admin[1550], 'marge11', $marge[11], 16).'
              '.InputTexte(4, $admin[1551], 'marge12', $marge[12], 16).'
              '.GetSelector(4, $admin[87], 'bordure10', $bordure[10]).'
              '.InputTexte(32, $admin[211], 'bordure11', $bordure[11], 16).'
              '.SelectBorderStyles(32, $admin[422], 'bordure35', $bordure[35], $borderstyles).'
              '.InputTexte(4, $admin[1343], 'bordure12', $bordure[12], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Titre des boîtes latérales
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse11">'.$admin[92].$admin[804].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse11">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.GetSelector(4, $admin[82], 'titre5', $titre[5]).'
              '.GetSelector(4, $admin[82].' BOTTOM', 'titre15', $titre[15]).'
              '.InputTexte(32, $admin[1529], 'opacity11', $opacity[11], 6).'
              '.SelectImgs(4, $admin[94], 'titre9', $titre[9], $imgs).'
              '.SelectFontOptions(4, 'titre6', $titre[6], $fontNames).'
              '.SelectTextStyles(32, 'titre11', $titre[11], $textstyles).'
              '.InputTexte(32, $admin[86], 'titre7', $titre[7], 6).'
              '.GetSelector(32, $admin[93], 'titre4', $titre[4]).'
              '.GetSelector(32, $admin[93].' BOTTOM', 'titre10', $titre[10]).'
              '.SelectBorderStyles(32, $admin[443], 'texte11', $texte[11], $textalign).'
              '.InputTexte(4, $admin[1550], 'marge13', $marge[13], 16).'
              '.InputTexte(4, $admin[1551], 'marge14', $marge[14], 16).'
              '.GetSelector(4, $admin[87], 'bordure13', $bordure[13]).'
              '.InputTexte(32, $admin[211], 'bordure14', $bordure[14], 16).'
              '.SelectBorderStyles(32, $admin[422], 'bordure36', $bordure[36], $borderstyles).'
              '.InputTexte(4, $admin[1343], 'bordure15', $bordure[15], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Boîtes latérales
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse12">'.$admin[804].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse12">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.SelectFontOptions(4, 'page16', $page[16], $fontNames).'
              '.SelectTextStyles(32, 'page35', $page[35], $textstyles).'
              '.InputTexte(32, $admin[86], 'page17', $page[17], 6).'
              '.GetSelector(32, $admin[95], 'texte5', $texte[5]).'
              '.GetSelector(32, $admin[95].' BOTTOM', 'titre13', $titre[13]).'
              '.InputTexte(32, $admin[695], 'page11', $page[11], 6).'
              '.GetSelector(4, $admin[99], 'texte6', $texte[6]).'
              '.GetSelector(4, $admin[99].' BOTTOM', 'titre20', $titre[20]).'
              '.GetSelector(4, $admin[100], 'texte7', $texte[7]).'
              '.InputTexte(32, $admin[1529], 'opacity12', $opacity[12], 6).'
              '.GetSelector(4, $admin[101], 'lien2', $lien[2]).'
              '.GetSelector(4, $admin[102], 'lien3', $lien[3]).'
              '.InputTexte(4, $admin[1550], 'marge15', $marge[15], 16).'
              '.InputTexte(4, $admin[1551], 'marge16', $marge[16], 16).'
              '.GetSelector(4, $admin[87], 'bordure16', $bordure[16]).'
              '.InputTexte(32, $admin[211], 'bordure17', $bordure[17], 16).'
              '.SelectBorderStyles(32, $admin[422], 'bordure37', $bordure[37], $borderstyles).'
              '.InputTexte(4, $admin[1343], 'bordure18', $bordure[18], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Forum - Blog - Tables
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse13">'.$admin[800].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse13">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.GetSelector(4, $admin[801], 'forum0', $forum[0]).'
              '.SelectFontOptions(32, 'forum12', $forum[12], $fontNames).'
              '.SelectTextStyles(64, 'forum13', $forum[13], $textstyles).'
              '.InputTexte(64, $admin[86], 'forum14', $forum[14], 6).'
              '.GetSelector(32, $admin[95], 'forum11', $forum[11]).'
              '.GetSelector(4, $admin[802], 'forum1', $forum[1]).'
              '.GetSelector(4, $admin[803], 'forum2', $forum[2]).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Formulaires
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse14">'.$admin[399].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse14">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.GetSelector(4, $admin[400], 'presform1', $presform[1]).'
              '.GetSelector(4, $admin[401], 'presform2', $presform[2]).'
              '.GetSelector(32, ucfirst($admin[1669]), 'presform11', $presform[11]).'
              '.InputTexte(32, $admin[1551], 'presform12', $presform[12], 16).'
              '.GetSelector(4, $admin[401].' ('.$admin[1566].')', 'presform13', $presform[13]).'
              '.GetSelector(32, ucfirst($admin[1669]).' ('.$admin[1566].')', 'presform14', $presform[14]).'
              '.GetSelector(4, $admin[402], 'presform3', $presform[3]).'
              '.GetSelector(4, $admin[403], 'presform6', $presform[6]).'
              '.SelectFontOptions(4, 'presform4', $presform[4], $fontNames).'
              '.SelectTextStyles(32, 'presform10', $presform[10], $textstyles).'
              '.InputTexte(32, $admin[86], 'presform5', $presform[5], 6).'
              '.GetSelector(4, $admin[95], 'presform0', $presform[0]).'
              '.GetSelector(4, $admin[404], 'presform8', $presform[8]).'
              '.InputTexte(32, $admin[211], 'presform7', $presform[7], 16).'
              '.SelectBorderStyles(32, $admin[422], 'bordure38', $bordure[38], $borderstyles).'
              '.InputTexte(4, $admin[1343], 'presform9', $presform[9], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Boîte calendrier
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse15">'.$admin[409].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse15">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.GetSelector(4, $admin[865], 'calendar11', $calendar[11]).'
              '.GetSelector(4, $admin[411], 'calendar0', $calendar[0]).'
              '.GetSelector(4, $admin[412], 'calendar1', $calendar[1]).'
              '.GetSelector(4, $admin[413], 'calendar2', $calendar[2]).'
              '.GetSelector(32, ucfirst($admin[1669]), 'calendar18', $calendar[18]).'
              '.GetSelector(4, $admin[414], 'calendar3', $calendar[3]).'
              '.GetSelector(32, ucfirst($admin[1669]), 'calendar19', $calendar[19]).'
              '.GetSelector(4, $admin[415], 'calendar4', $calendar[4]).'
              '.GetSelector(32, ucfirst($admin[1669]), 'calendar20', $calendar[20]).'
              '.SelectFontOptions(4, 'calendar5', $calendar[5], $fontNames).'
              '.SelectTextStyles(32, 'calendar15', $calendar[15], $textstyles).'
              '.InputTexte(32, $admin[86], 'calendar6', $calendar[6], 6).'
              '.GetSelector(4, $admin[417], 'calendar7', $calendar[7]).'
              '.GetSelector(4, $admin[418], 'calendar8', $calendar[8]).'
              '.GetSelector(32, $admin[865], 'calendar17', $calendar[17]).'
              '.GetSelector(4, $admin[1670], 'calendar10', $calendar[10]).'
              '.GetSelector(32, ucfirst($admin[1669]), 'calendar16', $calendar[16]).'
              <tr style="text-align:left;">
                <td style="padding:4px;">&bull; '.$admin[1344].'</td>
                <td style="padding:4px;">
                  <select name="calendar9">
                    <option value="0px"'.Selected($calendar[9] == "0px").'>0px</option>
                    <option value="1px"'.Selected($calendar[9] == "1px").'>1px</option>
                    <option value="2px"'.Selected($calendar[9] == "2px").'>2px</option>
                    <option value="3px"'.Selected($calendar[9] == "3px").'>3px</option>
                  </select>
                </td>
              </tr>
              '.InputTexte(4, $admin[211], 'calendar12', $calendar[12], 6).'
              '.GetSelector(4, $admin[404], 'calendar13', $calendar[13]).'
              '.InputTexte(4, $admin[1343], 'calendar14', $calendar[14], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Annuaires - Photos
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse16">'.$admin[1495].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse16">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              '.GetSelector(4, $admin[1496], 'annuaire0', $annuaire[0]).'
              '.SelectFontOptions(32, 'annuaire1', $annuaire[1], $fontNames).'
              '.SelectTextStyles(64, 'annuaire7', $annuaire[7], $textstyles).'
              '.InputTexte(64, $admin[86], 'annuaire2', $annuaire[2], 6).'
              '.GetSelector(64, $admin[93], 'annuaire3', $annuaire[3]).'
              '.GetSelector(32, $admin[87], 'annuaire4', $annuaire[4]).'
              '.InputTexte(64, $admin[211], 'annuaire5', $annuaire[5], 16).'
              '.SelectBorderStyles(64, $admin[422], 'bordure39', $bordure[39], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'annuaire6', $annuaire[6], 16).'
              '.GetSelector(4, $admin[1497], 'annuaire8', $annuaire[8]).'
              '.SelectFontOptions(32, 'annuaire10', $annuaire[10], $fontNames).'
              '.SelectTextStyles(64, 'annuaire11', $annuaire[11], $textstyles).'
              '.InputTexte(64, $admin[86], 'annuaire12', $annuaire[12], 6).'
              '.GetSelector(64, $admin[93], 'annuaire13', $annuaire[13]).'
              '.GetSelector(4, $admin[1498], 'annuaire9', $annuaire[9]).'
              '.SelectFontOptions(32, 'annuaire14', $annuaire[14], $fontNames).'
              '.SelectTextStyles(64, 'annuaire15', $annuaire[15], $textstyles).'
              '.InputTexte(64, $admin[86], 'annuaire16', $annuaire[16], 6).'
              '.GetSelector(64, $admin[93], 'annuaire17', $annuaire[17]).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Onglets - Accordéons - Fenêtre modale
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse17">
          '.$admin[1525].' - '.$admin[1526].' - '.$admin[1527].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse17">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1525].' :</td></tr>
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[1525]).')', 'tabs1', $tabs[1]).'
              '.GetSelector(64, $admin[95], 'tabs0', $tabs[0]).'
              '.GetSelector(32, $admin[87].' ('.mb_strtolower($admin[1525]).')', 'tabs2', $tabs[2]).'
              '.InputTexte(64, $admin[211], 'tabs3', $tabs[3], 6).'
              '.InputTexte(64, $admin[1343], 'tabs4', $tabs[4], 16).'
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[765]).')', 'tabs5', $tabs[5]).'
              '.GetSelector(64, $admin[95], 'tabs6', $tabs[6]).'
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[1566]).')', 'tabs28', $tabs[28]).'
              '.GetSelector(64, $admin[95], 'tabs29', $tabs[29]).'
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[1389]).')', 'tabs7', $tabs[7]).'
              '.GetSelector(32, $admin[87].' ('.mb_strtolower($admin[1389]).')', 'tabs8', $tabs[8]).'
              '.InputTexte(64, $admin[211], 'tabs9', $tabs[9], 6).'
              '.InputTexte(64, $admin[1343], 'tabs10', $tabs[10], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1526].' :</td></tr>
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[1525]).')', 'tabs12', $tabs[12]).'
              '.GetSelector(64, $admin[95], 'tabs11', $tabs[11]).'
              '.GetSelector(32, $admin[87].' ('.mb_strtolower($admin[1525]).')', 'tabs13', $tabs[13]).'
              '.InputTexte(64, $admin[211], 'tabs14', $tabs[14], 6).'
              '.InputTexte(64, $admin[1343], 'tabs15', $tabs[15], 16).'
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[765]).')', 'tabs16', $tabs[16]).'
              '.GetSelector(64, $admin[95], 'tabs17', $tabs[17]).'
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[1566]).')', 'tabs30', $tabs[30]).'
              '.GetSelector(64, $admin[95], 'tabs31', $tabs[31]).'
              '.GetSelector(32, $admin[82].' ('.mb_strtolower($admin[1389]).')', 'tabs18', $tabs[18]).'
              '.GetSelector(32, $admin[87].' ('.mb_strtolower($admin[1389]).')', 'tabs19', $tabs[19]).'
              '.InputTexte(64, $admin[211], 'tabs20', $tabs[20], 6).'
              '.InputTexte(64, $admin[1343], 'tabs21', $tabs[21], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1527].' :</td></tr>
              '.GetSelector(32, $admin[82], 'tabs24', $tabs[24]).'
              '.GetSelector(64, $admin[95], 'tabs23', $tabs[23]).'
              '.GetSelector(32, $admin[87], 'tabs25', $tabs[25]).'
              '.InputTexte(64, $admin[211], 'tabs26', $tabs[26], 16).'
              '.InputTexte(32, $admin[1343], 'tabs27', $tabs[27], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Menus déroulants
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse18">'.$admin[1511].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse18">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1512].'</td></tr>
              '.InputTexte(32, $admin[436], 'dropdown0', $dropdown[0], 6).'
              '.SelectFontOptions(32, 'dropdown1', $dropdown[1], $fontNames).'
              '.SelectTextStyles(64, 'dropdown2', $dropdown[2], $textstyles).'
              '.InputTexte(64, $admin[86], 'dropdown3', $dropdown[3], 6).'
              '.GetSelector(64, $admin[93], 'dropdown4', $dropdown[4]).'
              '.SelectBorderStyles(32, $admin[443], 'texte12', $texte[12], $textalign).'
              '.GetSelector(32, $admin[82], 'dropdown5', $dropdown[5]).'
              '.GetSelector(32, $admin[87], 'dropdown7', $dropdown[7]).'
              '.InputTexte(64, $admin[211], 'dropdown8', $dropdown[8], 16).'
              '.SelectBorderStyles(64, $admin[422], 'dropdown9', $dropdown[9], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'dropdown10', $dropdown[10], 16).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1513].'</td></tr>
              '.InputTexte(32, $admin[436], 'dropdown11', $dropdown[11], 6).'
              '.GetSelector(32, $admin[82], 'dropdown12', $dropdown[12]).'
              '.GetSelector(32, $admin[95], 'dropdown25', $dropdown[25]).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1514].'</td></tr>
              '.GetSelector(32, $admin[82], 'dropdown14', $dropdown[14]).'
              '.GetSelector(32, $admin[95], 'dropdown16', $dropdown[16]).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1563].'</td></tr>
              '.GetSelector(32, $admin[82], 'dropdown27', $dropdown[27]).'
              '.GetSelector(32, $admin[95], 'dropdown29', $dropdown[29]).'
              <tr style="text-align:left;"><td colspan="2" style="padding:4px 0 0 4px;">'.$admin[1515].'</td></tr>
              '.InputTexte(32, $admin[436], 'dropdown17', $dropdown[17], 6).'
              '.InputTexte(32, $admin[1516], 'dropdown18', $dropdown[18], 6).'
              '.GetSelector(32, $admin[95], 'dropdown26', $dropdown[26]).'
              '.GetSelector(32, $admin[82], 'dropdown19', $dropdown[19]).'
              '.GetSelector(32, $admin[87], 'dropdown21', $dropdown[21]).'
              '.InputTexte(64, $admin[211], 'dropdown22', $dropdown[22], 16).'
              '.SelectBorderStyles(64, $admin[422], 'dropdown23', $dropdown[23], $borderstyles).'
              '.InputTexte(32, $admin[1343], 'dropdown24', $dropdown[24], 16).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Lignes de séparation - Bordures
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse19">
          '.$admin[805].' - '.strtoupper(substr($admin[87], 0, -1)).'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse19">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.$admin[805].'</td></tr>
              '.GetSelector(32, $admin[150], 'barre0', $barre[0]).'
              '.InputTexte(32, $admin[86], 'barre1', $barre[1], 6).'
              '.SelectBorderStyles(32, $admin[422], 'barre2', $barre[2], $borderstyles).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper(substr($admin[87], 0, -1)).' (.bord)'.'</td></tr>
              '.GetSelector(32, $admin[150], 'barre3', $barre[3]).'
              '.InputTexte(32, $admin[86], 'barre4', $barre[4], 6).'
              '.SelectBorderStyles(32, $admin[422], 'barre5', $barre[5], $borderstyles).'
            </table>
            </div>
          </div>
        </div>
      </div>';
        // Autres...
        echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse20">'.strtoupper($admin[1116]).'</a>
        <div class="collapse" data-parent="#accordion" id="collapse20">
          <div class="card-body" style="max-width:560px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div class="table-responsive-md">
            <table class="table w-100">
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1730]).'</td></tr>
              '.InputTexte(32, $admin[386], 'other27', $other[27], 6).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1671]).'</td></tr>
              '.GetSelector(32, $admin[82], 'other1', $other[1]).'
              '.GetSelector(32, $admin[95], 'other0', $other[0]).'
              '.GetSelector(32, $admin[87], 'other2', $other[2]).'
              '.InputTexte(64, $admin[211], 'other3', $other[3], 6).'
              '.InputTexte(64, $admin[1343], 'other4', $other[4], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.mb_strtoupper($admin[262], $charset).'</td></tr>
              '.InputTexte(32, $admin[1550], 'other7', $other[7], 16).'
              '.InputTexte(32, $admin[1551], 'other8', $other[8], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1582]).'</td></tr>
              '.GetSelector(32, $admin[82], 'other24', $other[24]).'
              '.GetSelector(32, $admin[95], 'other25', $other[25]).'
              '.InputTexte(32, $admin[386], 'other26', $other[26], 6).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[179]).'</td></tr>
              '.GetSelector(32, $admin[87], 'other9', $other[9]).'
              '.InputTexte(64, $admin[211], 'other10', $other[10], 16).'
              '.SelectBorderStyles(64, $admin[422], 'other11', $other[11], $borderstyles).'
              <tr><td colspan="2" style="text-align:left;padding:0 0 0 32px;">&bull; '.$admin[43].'</td></tr>
              '.GetSelector(64, $admin[82], 'other12', $other[12]).'
              '.InputTexte(92, $admin[1529], 'opacity22', $opacity[22], 6).'
              '.GetSelector(64, $admin[95], 'other13', $other[13]).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1567]).'</td></tr>
              '.GetSelector(32, $admin[82], 'other23', $other[23]).'
              '.InputTexte(64, $admin[1529], 'opacity23', $opacity[23], 6).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1569]).'</td></tr>
              '.GetSelector(32, $admin[82], 'other14', $other[14]).'
              '.GetSelector(32, $admin[87], 'other15', $other[15]).'
              '.InputTexte(64, $admin[211], 'other16', $other[16], 6).'
              '.InputTexte(32, $admin[1343], 'other17', $other[17], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1570]).'</td></tr>
              '.GetSelector(32, $admin[82], 'other18', $other[18]).'
              '.GetSelector(32, $admin[95], 'other19', $other[19]).'
              '.GetSelector(32, $admin[87], 'other20', $other[20]).'
              '.InputTexte(64, $admin[211], 'other21', $other[21], 6).'
              '.InputTexte(64, $admin[1343], 'other22', $other[22], 16).'
              <tr><td colspan="2" style="text-align:left;padding:4px 0 0 4px;">&bull; '.strtoupper($admin[1758]).'</td></tr>
              '.GetSelector(32, $admin[82], 'other28', $other[28]).'
              '.GetSelector(32, $admin[95], 'other29', $other[29]).'
              '.InputTexte(32, $admin[386], 'other30', $other[30], 6).'
            </table>
            </div>
          </div>
        </div>
      </div>
      </div>
      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>
    </form>
  </fieldset>';
	}
}
echo '
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
config3.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config3.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Configuration
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[2] == '') {
        $nomzone = $admin[469];
        include 'access.inc';
        exit();
    }
}

$regit   = import('regit');
$xpb     = import('xpb', 'POST', FALSE);
$wpb     = import('wpb', 'POST', FALSE);
$skns    = import('skns', 'POST', FALSE);
$conf    = import('conf', '', FALSE, 0);
$messreg = '';

AddFreeBoxes();
AddMenuBoxes();
AddDDMenuBoxes();

$admcookie = isset($_COOKIE[ADMP_COOKIE]) ? $_COOKIE[ADMP_COOKIE] : '00';
$positem   = 0;
for ($i = 0; $i < 9; $i++) {
    $posdata        = $positem + 2;
    $lendata        = intval(substr($admcookie, $positem, 2));
    $adminprefs[$i] = substr($admcookie, $posdata, $lendata);
    $positem        = $posdata + $lendata;
}

$adminprefs[8] = 'web';
$admdata       = '';
for ($i = 0; $i < count($adminprefs); $i++) {
    $strlen   = sprintf("%02d", strlen($adminprefs[$i]));
    $admdata .= $strlen.$adminprefs[$i];
}
setcookie(ADMP_COOKIE, $admdata);

$fileconf = 'confweb';
$meskin   = CHEMIN.'skins/'.$selskin.'/';
if (is_file ($meskin.$fileconf.'.inc')) {
    include $meskin.$fileconf.'.inc';
} else {
    include CHEMIN.'skins/no_skin/'.$fileconf.'.inc';
}

if ($regit == 1) {
	$lst = '';
    foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $key) {
		foreach ($xpb[BOX_EDITO][$key] as $i => $value) {
			if (!empty($value) && empty($wpb[BOX_EDITO][$key][$i])) { 
				$lst .= ' - [ '.BOX_EDITO.' ] [ '.$key.' ] [ '.$i.' ] => '.getLabelBox($boxes, substr($value, 2)).'\n';
                $wpb[BOX_EDITO][$key][$i] = '';
            }
		}
	}
	if ($lst == '') {
		$messreg = ' : &nbsp;OK';
	} else {
		echo BeginJavascript().'alert("'.addslashes($admin[706]).'\n\n'.$lst.'");'.EndJavascript();
	}
	
	$meskin = CHEMIN.'skins/'.$selskin.'/';
	if (is_file ($meskin.$fileconf.'.inc')) {
		include $meskin.$fileconf.'.inc';
	} else {
		include CHEMIN.'skins/no_skin/'.$fileconf.'.inc';
	}
	
	$site[4]     = import('site4'); // Nouvelles sur la page d'accueil
	$site[20]    = import('site20'); // Messages Forum sur la page d'accueil
	$site[29]    = import('site29'); // Hauteur en pixels des nouvelles en page d'accueil (0 = tous)
	$site[33]    = import('site33'); // Hauteur en pixels des billets du blog en page d'accueil (0 = tous)
	$site[34]    = import('site34'); // Nombre de caractères des posts forum en page d'accueil (0 = tous)
	$site[31]    = import('site31'); // Blogs sur la page d'accueil
    $serviz[74]  = import('serviz74'); // Cacher les boîtes en page d'accueil ON/OFF
	
	$xposbox[BOX_BLOG][BOX_LEFT]  = $xpb[BOX_BLOG][BOX_LEFT];
	$xposbox[BOX_BLOG][BOX_RIGHT] = $xpb[BOX_BLOG][BOX_RIGHT];
    foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $key) {
		foreach ($xpb[BOX_EDITO][$key] as $i => $value) {
			$args  = '';
			if (!empty($value)) {
				$wb   = intval($wpb[BOX_EDITO][$key][$i]);
				$pos  = strrpos($value, CONNECTOR, 2);
				$args = $wb == 0 ? '' : ($pos == 0 ? CONNECTOR : '').'W'.$wb;
			}
			$xpb[BOX_EDITO][$key][$i] = $value.$args;
		}
		$xposbox[BOX_EDITO][$key] = $xpb[BOX_EDITO][$key];
	}
	unset($xpb, $wpb);
	
	include 'inc/'.$fileconf.'.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config3";'.EndJavascript();
    }
}
elseif ($regit == 2) { // copie config dans les autres skins
	if (!empty($skns)) {
		foreach ($skns as $skin) {
            $src  = CHEMIN.'skins/'.$selskin.'/'.$fileconf.'.inc';
            $dest = CHEMIN.'skins/'.$skin.'/'.$fileconf.'.inc';
            copy($src, $dest);
		}
		unset($skns);
	}
} 

include CONFIG;
$conf = !isset($templates[$conf]) ? 0 : $conf;

TestPosBoxes($xposbox[BOX_EDITO][BOX_LSIDE], 5, 2);
TestPosBoxes($xposbox[BOX_EDITO][BOX_LEFT], 5, 2);
TestPosBoxes($xposbox[BOX_EDITO][BOX_CENTER], 5, 2);
TestPosBoxes($xposbox[BOX_EDITO][BOX_RIGHT], 5, 2);
TestPosBoxes($xposbox[BOX_EDITO][BOX_RSIDE], 5, 2);
TestSizeBoxes($xposbox[BOX_EDITO][BOX_LSIDE], $xposbox[BOX_EDITO][BOX_LEFT], $xposbox[BOX_EDITO][BOX_CENTER], $xposbox[BOX_EDITO][BOX_RIGHT], $xposbox[BOX_EDITO][BOX_RSIDE]);

TestPosBoxes($xposbox[BOX_BLOG][BOX_LEFT], 5, 2);
TestPosBoxes($xposbox[BOX_BLOG][BOX_RIGHT], 5, 2);
TestSizeBoxes($xposbox[BOX_BLOG][BOX_LEFT], $xposbox['B'][BOX_RIGHT]);

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[470]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[470], '100%');

include 'plugins/plugbox.inc';

$skn   = isset($selskin) ? '&amp;selskin='.$selskin : 'no_skin';
$skins = ExploreDir('skins/');

echo '
<div style="text-align:center">
  <p>'.ToHelp($lng, '&pg=952&mnuid=972&tconfig=0#z2').$admin[471].'</p>
</div>

<div  style="text-align:center">';
$confstruct = 'web';

echo '
  <hr />
  <div class="table-responsive-md">
  <table class="table text-left w-100">
    <tr>
      <td class="forum" style="vertical-align:top; text-align:left; width:50%; padding:5px 20px;">
	    '.$admin[725].' : <strong>'.$userprefs[10].$messreg.'</strong>
	  </td>
      <td class="forum text-center align-top"">
	    '.$admin[707].'
        <form name="selskns" action="admin.php?lng='.$lng.'&amp;pg=config3" method="post">
          <input type="hidden" name="regit" value="2" />
          <input type="hidden" name="selskin" value="'.$selskin.'" /><br />    
	      <select class="form-control mx-auto w-100" name="skns[]" style="max-width:200px;" size="10" multiple="multiple">';

foreach ($skins as $skn)
	if ($skn != $selskin) echo '
			<option value="'.$skn.'">'.$skn.'</option>>';

echo '
		  </select>
		  '.SubmitButton($admin[708]).'
        </form>
	  </td>
	</tr>
  </table>
  </div>
</div>
<div class="mx-auto w-100">
  <form name="conf3" action="admin.php?lng='.$lng.'&amp;pg=config3" method="post">
    <input type="hidden" name="regit" value="1" />
    <div class="row quest p-0 mb-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
    <fieldset>'.legend($admin[1077]).'
      <div class="table-responsive-md">
      <table class="table text-center w-100 m-auto">
        <tr>
          <td style="padding: 0px;">';
WriteColumnSelectBoxes('xpb['.BOX_EDITO.']['.BOX_LSIDE.']', $xposbox[BOX_EDITO][BOX_LSIDE], SelectBoxes($boxes, BOX_EDITO), true, true, 'wpb['.BOX_EDITO.']['.BOX_LSIDE.']', $wposbox[BOX_EDITO][BOX_LSIDE]);
echo '
          </td>
          <td style="padding: 0px;">';
WriteColumnSelectBoxes('xpb['.BOX_EDITO.']['.BOX_LEFT.']', $xposbox[BOX_EDITO][BOX_LEFT], SelectBoxes($boxes, BOX_EDITO), true, true, 'wpb['.BOX_EDITO.']['.BOX_LEFT.']', $wposbox[BOX_EDITO][BOX_LEFT]);
echo '
          </td>
          <td style="padding: 0px;">';
WriteColumnSelectBoxes('xpb['.BOX_EDITO.']['.BOX_CENTER.']', $xposbox[BOX_EDITO][BOX_CENTER], SelectBoxes($boxes, BOX_EDITO), true, true, 'wpb['.BOX_EDITO.']['.BOX_CENTER.']', $wposbox[BOX_EDITO][BOX_CENTER]);
echo '
          </td>
          <td style="padding: 0px;">';
WriteColumnSelectBoxes('xpb['.BOX_EDITO.']['.BOX_RIGHT.']', $xposbox[BOX_EDITO][BOX_RIGHT], SelectBoxes($boxes, BOX_EDITO), true, true, 'wpb['.BOX_EDITO.']['.BOX_RIGHT.']', $wposbox[BOX_EDITO][BOX_RIGHT]);
echo '
          </td>
          <td style="padding: 0px;">';
WriteColumnSelectBoxes('xpb['.BOX_EDITO.']['.BOX_RSIDE.']', $xposbox[BOX_EDITO][BOX_RSIDE], SelectBoxes($boxes, BOX_EDITO), true, true, 'wpb['.BOX_EDITO.']['.BOX_RSIDE.']', $wposbox[BOX_EDITO][BOX_RSIDE]);
echo '
          </td>
        </tr>
      </table>
      </div>
    </fieldset>
	
    <fieldset>'.legend($admin[770]).'
      <div class="table-responsive-md">
      <table class="table text-center w-100 border-0">
        <tr>
          <td style="vertical-align:top;width:30%;">
            <fieldset>'.legend($admin[337]);
WriteColumnSelectBoxes('xpb['.BOX_BLOG.']['.BOX_LEFT.']', $xposbox[BOX_BLOG][BOX_LEFT], SelectBoxes($boxes, BOX_LEFT), true, true);
echo '
            </fieldset>
          </td>
          <td style="vertical-align:top;width:40%;">
            <p class="quest" style="text-align:center;line-height:75px;margin:92px 0 0;font-weight:bold;font-size:1.5em;">'.$admin[878].'</p>
          </td>
          <td style="vertical-align:top;width:30%;">
            <fieldset>'.legend($admin[338]);
WriteColumnSelectBoxes('xpb['.BOX_BLOG.']['.BOX_RIGHT.']', $xposbox[BOX_BLOG][BOX_RIGHT], SelectBoxes($boxes, BOX_RIGHT), true, true);
echo '
            </fieldset>
          </td>
        </tr>
      </table>
      </div>
    </fieldset>
	
    <fieldset>
      <div class="table-responsive-md">
      <table class="table w-100">';
echo '
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td class="w-40"><label for="serviz74">&bull; '.$admin[1078].'</label></td>
          <td><input class="checkbox" type="checkbox" id="serviz74" name="serviz74"'.Checked($serviz[74]).' /></td></tr>
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td>&bull; '.$admin[58].'</td>
          <td><input class="form-control w-40 texte" type="text" name="site4" size="3" value="'.$site[4].'" /></td></tr>
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td>&bull; '.$admin[778].'</td>
          <td><input class="form-control w-40 texte" type="text" name="site31" size="3" value="'.$site[31].'" /></td></tr>
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td>&bull; '.$admin[684].'</td>
          <td><input class="form-control w-40 texte" type="text" name="site29" size="7" value="'.$site[29].'" /></td></tr>
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td>&bull; '.$admin[1469].'</td>
          <td><input class="form-control w-40 texte" type="text" name="site33" size="7" value="'.$site[33].'" /></td></tr>
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td>&bull; '.$admin[1470].'</td>
          <td><input class="form-control w-40 texte" type="text" name="site34" size="7" value="'.$site[34].'" /></td></tr>
        <tr style="text-align:left;">
          <td class="w-20">&nbsp;</td>
          <td>&bull; '.$admin[463].'</td>
          <td><input class="form-control w-40 texte" type="text" name="site20" size="3" value="'.$site[20].'" /></td></tr>
      </table>
      </div>
    </fieldset>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';
btable();
include(CHEMIN.'admin/bpage.inc');
?>
config4.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config4.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Configuration Sections
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[3] == '') {
        $nomzone = $admin[166];
        include 'access.inc';
        exit();
    }
}

function SectionNameCB($description, $name0, $value0, $name1, $value1, $confpage=false, $confvalue='', $menuico=false, $icovalue='', $menugrp=false, $grpvalue='', $readonly=false) {
    global $flag1, $flag2, $lang, $charset, $admin, $templates;
    echo '
      <tr class="px-3">
        <td class="text-left align-middle" style="max-width:180px;">&bull; <label for="'.$menuico.'">'.$description.'</label></td>
        <td class="text-left align-middle">';
    if (empty($lang[1])) {
        echo '
          <div>
            <input class="form-control texte" style="max-width:200px;" name="'.$name0.'" type="text" value="'.htmlentities($value0, ENT_QUOTES, $charset).'" />
		  </div>';
    } else {
        echo '
          <div style="max-width:210px;">
            <div class="d-inline-block">'.$flag1.'</div>
            <div class="d-inline-block">
		      <input class="form-control texte" style="max-width:200px;" name="'.$name0.'" type="text" value="'.htmlentities($value0, ENT_QUOTES, $charset).'" />
            </div>
		  </div>
          <div style="max-width:220px;">
            <div class="d-inline-block">'.$flag2.'</div>
		    <div class="d-inline-block">
              <input class="form-control texte" style="max-width:200px;" name="'.$name1.'" type="text" value="'.htmlentities($value1, ENT_QUOTES, $charset).'" />
            </div>
		  </div>';
    }
    echo '
        </td>
        <td class="text-left align-middle" style="max-width:170px;">';
    if ($confpage) {
        echo '
          <div style="max-width:150px;">
            <select class="form-control w-100" style="" name="'.$confpage.'">
              <option value="ALL"'.Selected($confvalue == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value)
            echo '
              <option value="'.$key.'"'.Selected($confvalue != 'ALL' && $confvalue == $key).'>'.$key.' - '.$value.'</option>';
        echo '
            </select>
		  </div>';
    }
    echo '
        </td>
        <td class="text-left align-middle">';
    if ($menugrp) {
        $dbgroup = ReadDBFields(GROUPS);
        echo '
          <div style="max-width:150px;">
            <select class="form-control w-100" name="'.$menugrp.'">
              <option value=""'.Selected($grpvalue == '').'> -- '.$admin[1604].' -- </option>
              <option value="all_members"'.Selected($grpvalue != '' && $grpvalue == 'all_members').'>'.$admin[690].'</option>';
        foreach ($dbgroup as $groupe)
            echo '
              <option value="'.$groupe[0].'"'.Selected($grpvalue != '' && $grpvalue == $groupe[0]).'>'.$groupe[0].'</option>';
        echo '
            </select>
          </div>';
    } else echo '-';
    echo '
        </td>';
    if ($menuico) {
        echo '
        <td class="text-left align-middle">
          <input type="checkbox" id="'.$menuico.'" name="'.$menuico.'" 
            value="on"'.Checked($icovalue).($readonly ? ' disabled="disabled"' : '').' />
        </td>';
    }
    echo '
      </tr>';
}

function SectionNameSB($description, $name0, $value0, $name1, $value1, $dynabox=false, $dynavalue='') {
    global $flag1, $flag2, $lang, $charset, $admin;
    echo '
      <tr>
        <td class="text-left align-middle" style="max-width:180px;">&bull; '.$description.'</div>
        <td class="text-left align-middle">';
    if (empty($lang[1])) {
        echo '
          <input class="form-control texte" style="max-width:170px;" name="'.$name0.'" type="text" size="30" value="'.htmlentities($value0, ENT_QUOTES, $charset).'" />';
    } else {
        echo '
          <div>
            <div class="d-inline-block">'.$flag1.'</div>
		    <div class="d-inline-block">
              <input class="form-control texte" style="max-width:170px;" name="'.$name0.'" type="text" size="30" value="'.htmlentities($value0, ENT_QUOTES, $charset).'" />
            </div>
		  </div>
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
		    <div class="d-inline-block">
              <input class="form-control texte" style="max-width:170px;" name="'.$name1.'" type="text" size="30" value="'.htmlentities($value1, ENT_QUOTES, $charset).'" />
            </div>
		  </div>';
    }
    echo '
        </td>';
    if ($dynabox) {
        echo '
        <td class="text-left align-middle">
		  <select class="form-control" style="max-width:150px;" name="'.$dynabox.'">
			<option value="off"'.Selected($dynavalue == "off").'>'.$admin[358].'</option>
			<option value="open"'.Selected($dynavalue == "open").'>'.$admin[359].'</option>';
		if ($dynabox != 'dynabox4' && $dynabox != 'dynabox24')
			echo '
			<option value="close"'.Selected($dynavalue == "close").'>'.$admin[360].'</option>';
		echo '
		  </select>
        </td>';
    }
    echo '
      </tr>';
}

function SectionSelect($description, $dynabox=false, $dynavalue='') {
    global $admin;

    echo '
      <tr">
        <td class="text-left align-middle">&bull; '.$description.'</td>';
    if ($dynabox) {
        echo '
        <td class="text-right align-middle">
		  <select class="form-control" style="max-width:150px;" style="max-width:190px;" name="'.$dynabox.'">
			<option value="off"'.Selected($dynavalue == "off").'>'.$admin[358].'</option>
			<option value="open"'.Selected($dynavalue == "open").'>'.$admin[359].'</option>
			<option value="close"'.Selected($dynavalue == "close").'>'.$admin[360].'</option>
		  </select>
        </td>';
    }
    echo '
      </tr>';
}

$regit = import('regit');

if ($regit == 1) {
    include CONFIG;
    $nom[0]  = str_replace('"', '', import('nom0', 'POST', false));  // Page Accueil langue principale
    $nom[10] = str_replace('"', '', import('nom10', 'POST', false)); // Page Accueil deuxième langue
    $nom[7]  = str_replace('"', '', import('nom7', 'POST', false));  // Nouvelles langue principale
    $nom[17] = str_replace('"', '', import('nom17', 'POST', false)); // Nouvelles deuxième langue
    $nom[42] = str_replace('"', '', import('nom42', 'POST', false)); // Blog langue principale
    $nom[43] = str_replace('"', '', import('nom43', 'POST', false)); // Blog deuxième langue
    $nom[2]  = str_replace('"', '', import('nom2', 'POST', false));  // Page des photos langue principale
    $nom[12] = str_replace('"', '', import('nom12', 'POST', false)); // Page des photos deuxième langue
    $nom[1]  = str_replace('"', '', import('nom1', 'POST', false));  // Page des téléchargements langue principale
    $nom[11] = str_replace('"', '', import('nom11', 'POST', false)); // Page des téléchargements deuxième langue
    $nom[3]  = str_replace('"', '', import('nom3', 'POST', false));  // Page des liens langue principale
    $nom[13] = str_replace('"', '', import('nom13', 'POST', false)); // Page des liens deuxième langue
    $nom[24] = str_replace('"', '', import('nom24', 'POST', false)); // FAQ langue principale
    $nom[25] = str_replace('"', '', import('nom25', 'POST', false)); // FAQ deuxième langue
    $nom[9]  = str_replace('"', '', import('nom9', 'POST', false));  // Livre d'or langue principale
    $nom[19] = str_replace('"', '', import('nom19', 'POST', false)); // Livre d'or deuxième langue
    $nom[22] = str_replace('"', '', import('nom22', 'POST', false)); // Forum langue principale
    $nom[23] = str_replace('"', '', import('nom23', 'POST', false)); // Forum deuxième langue
    $nom[26] = str_replace('"', '', import('nom26', 'POST', false)); // Statistiques langue principale
    $nom[27] = str_replace('"', '', import('nom27', 'POST', false)); // Statistiques deuxième langue
    $nom[46] = str_replace('"', '', import('nom46', 'POST', false)); // Contact langue principale
    $nom[47] = str_replace('"', '', import('nom47', 'POST', false)); // Contact deuxième langue
    
    $nom[44] = str_replace('"', '', import('nom44')); // Boite Menu langue principale WEB
    $nom[45] = str_replace('"', '', import('nom45')); // Boite Menu deuxième langue WEB
    $nom[8]  = str_replace('"', '', import('nom8'));  // Compteur langue principale WEB
    $nom[18] = str_replace('"', '', import('nom18')); // Compteur deuxième langue WEB
    $nom[20] = str_replace('"', '', import('nom20')); // Recherche langue principale WEB
    $nom[21] = str_replace('"', '', import('nom21')); // Recherche deuxième langue WEB
    $nom[32] = str_replace('"', '', import('nom32')); // Boite Calendrier langue principale WEB
    $nom[33] = str_replace('"', '', import('nom33')); // Boite Calendrier deuxième langue WEB
    $nom[34] = str_replace('"', '', import('nom34')); // Boite préférences utilisateur langue principale WEB
    $nom[35] = str_replace('"', '', import('nom35')); // Boite préférences utilisateur deuxième langue WEB
    $nom[38] = str_replace('"', '', import('nom38')); // Boite Newsletter langue principale WEB
    $nom[39] = str_replace('"', '', import('nom39')); // Boite Newsletter deuxième langue WEB
    $nom[36] = str_replace('"', '', import('nom36')); // Boite RSS langue principale WEB
    $nom[37] = str_replace('"', '', import('nom37')); // Boite RSS deuxième langue WEB
    $nom[40] = str_replace('"', '', import('nom40')); // Boite Webmaster - Infos langue principale WEB
    $nom[41] = str_replace('"', '', import('nom41')); // Boite Webmaster - Infos deuxième langue WEB
	$nom[48] = str_replace('"', '', import('nom48')); // Boîte réseaux sociaux langue principale WEB
	$nom[49] = str_replace('"', '', import('nom49')); // Boîte réseaux sociaux deuxième langue WEB
	$nom[54] = str_replace('"', '', import('nom54')); // Boîte nouveautés langue principale WEB
	$nom[55] = str_replace('"', '', import('nom55')); // Boîte nouveautés deuxième langue WEB
	$nom[56] = str_replace('"', '', import('nom56')); // Boîte Contact langue principale WEB
	$nom[57] = str_replace('"', '', import('nom57')); // Boîte Contact deuxième langue WEB
    $nom[30] = str_replace('"', '', import('nom30')); // Boite Photorama langue principale WEB
    $nom[31] = str_replace('"', '', import('nom31')); // Boite Photorama deuxième langue WEB
    
    $menuico[0] = import('menuico0'); // Icône Accueil
    $menuico[1] = import('menuico1'); // Icône Nouvelles
    $menuico[2] = import('menuico2'); // Icône Blog
    $menuico[3] = import('menuico3'); // Icône Photorama
    $menuico[4] = import('menuico4'); // Icône Téléchargements
    $menuico[5] = import('menuico5'); // Icône Liens
    $menuico[6] = import('menuico6'); // Icône FAQ
    $menuico[7] = import('menuico7'); // Icône Livre d'or
    $menuico[8] = import('menuico8'); // Icône Forum
    $menuico[9] = import('menuico9'); // Icône Stats
    $menuico[10] = import('menuico10'); // Icône Contact avancé
    $menuico[22] = import('menuico22', 'POST', true, '0'); // Page affichage Nouvelles
    $menuico[23] = import('menuico23', 'POST', true, '0'); // Page affichage Blog
    $menuico[24] = import('menuico24', 'POST', true, '0'); // Page affichage Photorama
    $menuico[25] = import('menuico25', 'POST', true, '0'); // Page affichage Téléchargements
    $menuico[26] = import('menuico26', 'POST', true, '0'); // Page affichage Liens
    $menuico[27] = import('menuico27', 'POST', true, '0'); // Page affichage FAQ
    $menuico[28] = import('menuico28', 'POST', true, '0'); // Page affichage Livre d'or
    $menuico[29] = import('menuico29', 'POST', true, '0'); // Page affichage Forum
    $menuico[30] = import('menuico30', 'POST', true, '0'); // Page affichage Stats
    $menuico[31] = import('menuico31', 'POST', true, '0'); // Page affichage Contact avancé
    $menuico[32] = import('menuico32', 'POST', true, '');  // Groupe Nouvelles
    $menuico[33] = import('menuico33', 'POST', true, '');  // Groupe Blog
    $menuico[34] = import('menuico34', 'POST', true, '');  // Groupe Photorama
    $menuico[35] = import('menuico35', 'POST', true, '');  // Groupe Téléchargements
    $menuico[36] = import('menuico36', 'POST', true, '');  // Groupe Liens
    $menuico[37] = import('menuico37', 'POST', true, '');  // Groupe FAQ
    $menuico[38] = import('menuico38', 'POST', true, '');  // Groupe Livre d'or
    $menuico[39] = import('menuico39', 'POST', true, '');  // Groupe Forum
    $menuico[40] = import('menuico40', 'POST', true, '');  // Groupe Stats
	
    // boîtes dynamiques partie WEB
	$dynabox[0] = import('dynabox0'); // Boite Menu
	$dynabox[2] = import('dynabox2'); // Boite Compteur
	$dynabox[3] = import('dynabox3'); // Boite Recherche
	$dynabox[4] = import('dynabox4'); // Boite Calendrier
	$dynabox[5] = import('dynabox5'); // Boite préférences
	$dynabox[6] = import('dynabox6'); // Boite Newsletter
	$dynabox[7] = import('dynabox7'); // Boite RSS
	$dynabox[8] = import('dynabox8'); // Boite Webmaster - Infos
	$dynabox[9] = import('dynabox9'); // Boîte réseaux sociaux
	$dynabox[10] = import('dynabox10'); // Boîte Rubriques blog
	$dynabox[11] = import('dynabox11'); // Boîte Derniers billets blog
	$dynabox[12] = import('dynabox12'); // Boîte Derniers commentaires blog
	$dynabox[13] = import('dynabox13'); // Boîte Calendrier du blog
	$dynabox[14] = import('dynabox14'); // Boîte Billets des amis blog
	$dynabox[15] = import('dynabox15'); // Boîte Nouveautés du site
	$dynabox[16] = import('dynabox16'); // Boîte Contacts avancés
	$dynabox[17] = import('dynabox17'); // Boîte Photorama
	$dynabox[18] = import('dynabox18'); // Boîte Archives blog
	
    include 'inc/confupdt.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config4";'.EndJavascript();
    }
}
include CONFIG;

if (is_file ($meskin.'confskin.inc')) {
    include $meskin.'confskin.inc';
} else {
    die('Skin not found : '.$meskin);
}

$headinc .= '
    <script type="text/javascript">
        $(document).ready( function() {
            $("#gyaccordion").hoverAccordion({
                keepHeight: false,
                activateItem: 1,
				onClickOnly: true,
                speed: 400
            });
            $("#gyaccordion").children("li:first").addClass("firstitem");
            $("#gyaccordion").children("li:last").addClass("lastitem");
        });
    </script>
';

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[167]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[167], '100%');

echo '
<div style="text-align:center">
  <p>'.ToHelp($lng, '&pg=956&mnuid=937&tconfig=0#z2').$admin[168].'</p>
</div>
<hr />
<form name="conf4" action="admin.php?lng='.$lng.'&amp;pg=config4" method="post">
  <input type="hidden" name="regit" value="1" />
  <fieldset class="m-auto" style="max-width:840px;">'.legend($admin[70]).'
    <div class="m-auto" id="accordion">
      <div class="row quest p-0 mb-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>';
echo '
      <div class="card">
        <a class="card-header card-link" data-toggle="collapse" href="#collapse1">'.$admin[806].'</a>
        <div class="collapse show" data-parent="#accordion" id="collapse1">
          <div class="card-body" style="max-width:840px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div style="margin:4px auto; padding:0 0 8px 0;">
              <div style="float:right; margin-right:6px; text-align:center; line-height:16px;"><b>'.$admin[1244].'</b></div>
              <div style="float:right; margin-right:20px; width:120px; text-align:center; line-height:16px;"><b>'.$admin[932].'</b></div>
              <div style="float:right; margin-right:20px; width:140px; text-align:center; line-height:16px;"><b>'.$admin[1335].'</b></div>
              <div class="table-responsive-md">
                <table class="table">
              ';
SectionNameCB($admin[71],  "nom0",  $nom[0],  "nom10", $nom[10], false, '', "menuico0", $menuico[0], '', false, $serviz[1] != '0');
SectionNameCB($admin[72],  "nom7",  $nom[7],  "nom17", $nom[17], "menuico22", $menuico[22], "menuico1", $menuico[1], "menuico32", $menuico[32], $serviz[8] == '');
SectionNameCB($admin[780], "nom42", $nom[42], "nom43", $nom[43], "menuico23", $menuico[23], "menuico2", $menuico[2], "menuico33", $menuico[33], $serviz[53] == '');
SectionNameCB($admin[74],  "nom2",  $nom[2],  "nom12", $nom[12], "menuico24", $menuico[24], "menuico3", $menuico[3], "menuico34", $menuico[34], $serviz[9] == '');
SectionNameCB($admin[73],  "nom1",  $nom[1],  "nom11", $nom[11], "menuico25", $menuico[25], "menuico4", $menuico[4], "menuico35", $menuico[35], $serviz[10] == '');
SectionNameCB($admin[75],  "nom3",  $nom[3],  "nom13", $nom[13], "menuico26", $menuico[26], "menuico5", $menuico[5], "menuico36", $menuico[36], $serviz[11] == '');
SectionNameCB($admin[207], "nom24", $nom[24], "nom25", $nom[25], "menuico27", $menuico[27], "menuico6", $menuico[6], "menuico37", $menuico[37], $serviz[14] == '');
SectionNameCB($admin[76],  "nom9",  $nom[9],  "nom19", $nom[19], "menuico28", $menuico[28], "menuico7", $menuico[7], "menuico38", $menuico[38], $serviz[12] == '');
SectionNameCB($admin[164], "nom22", $nom[22], "nom23", $nom[23], "menuico29", $menuico[29], "menuico8", $menuico[8], "menuico39", $menuico[39], $serviz[13] == '');
SectionNameCB($admin[1182], "nom46", $nom[46], "nom47", $nom[47], "menuico31", $menuico[31], "menuico10", $menuico[10], '', false, $serviz[99] == '');
echo '
                </table>
              </div>
			</div>
          </div>
        </div>
      </div>
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse2">'.strtoupper($admin[346]).'</a>
        <div class="collapse" data-parent="#accordion" id="collapse2">
          <div class="card-body" style="max-width:840px; margin:4px auto auto auto; padding:0 0 5px 0;">
            <div style="float:right; margin-right:40px; text-align:center;"><b>'.$admin[357].'</b></div>
            <div class="table-responsive-md">
              <table class="table">';
SectionNameSB($admin[880]." :", "nom44", $nom[44], "nom45", $nom[45], "dynabox0", $dynabox[0]);
SectionNameSB($admin[80], "nom8",  $nom[8], "nom18", $nom[18], "dynabox2", $dynabox[2]);
SectionNameSB($admin[163], "nom20", $nom[20], "nom21", $nom[21], "dynabox3", $dynabox[3]);
SectionNameSB($admin[448], "nom32", $nom[32], "nom33", $nom[33], "dynabox4", $dynabox[4]);
SectionNameSB($admin[450].' :', "nom34", $nom[34], "nom35", $nom[35], "dynabox5", $dynabox[5]);
SectionNameSB($admin[548], "nom38", $nom[38], "nom39", $nom[39], "dynabox6", $dynabox[6]);
SectionNameSB($admin[610], "nom36", $nom[36], "nom37", $nom[37], "dynabox7", $dynabox[7]);
SectionNameSB($admin[853], "nom40", $nom[40], "nom41", $nom[41], "dynabox8", $dynabox[8]);
SectionNameSB($admin[336], "nom48", $nom[48], "nom49", $nom[49], "dynabox9", $dynabox[9]);
SectionNameSB($admin[1374], "nom54", $nom[54], "nom55", $nom[55], "dynabox15", $dynabox[15]);
SectionNameSB($admin[1446], "nom56", $nom[56], "nom57", $nom[57], "dynabox16", $dynabox[16]);
SectionNameSB($admin[1456], "nom30", $nom[30], "nom31", $nom[31], "dynabox17", $dynabox[17]);
echo '
              </table>
            </div>
            <div style="height:12px;"></div>
            <div class="table-responsive-md">
              <table class="table">';
SectionSelect($admin[769].' '.$admin[1672], "dynabox10", $dynabox[10]);
SectionSelect($admin[769].' '.$admin[1673], "dynabox11", $dynabox[11]);
SectionSelect($admin[769].' '.$admin[1674], "dynabox12", $dynabox[12]);
SectionSelect($admin[769].' '.$admin[1765], "dynabox13", $dynabox[13]);
SectionSelect($admin[769].' '.$admin[1676], "dynabox14", $dynabox[14]);
SectionSelect($admin[769].' '.$admin[1675].' '.$admin[770], "dynabox18", $dynabox[18]);
echo '
              </table>
            </div>
        </div>
      </div>
      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>
    </div>
  </fieldset>
</form>
';

btable();
include CHEMIN.'admin/bpage.inc';
?>
config5.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config5.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Configuration
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Cryptage password Smtp, Firewall protect and Tohelp
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[4] == '') {
        $nomzone = $admin[169];
        include 'access.inc';
        exit();
    }
}
$regit = import('regit');

if ($regit == 1) {
    include CONFIG;
	$urls   = file_exists(MAPSURLS) ? file_get_contents(MAPSURLS) : '';
	$ctrlsb = $sitemap['SM'].$sitemap['BL'].$sitemap['AR'].$sitemap['NE'].$sitemap['PH'].$sitemap['DN'].$sitemap['FA'].$sitemap['LI'].$sitemap['GB'].$sitemap['FR'].$sitemap['AG'].$urls;

	// on renomme les scripts contenant des formulaires lutte anti-spam
	$site['PG']  = empty($site['PG'])  ? 'postguest'  : $site['PG'];
	$site['BLS'] = empty($site['BLS']) ? 'blogs'      : $site['BLS'];
	$site['BL']  = empty($site['BL'])  ? 'blog'       : $site['BL'];
	$site['FR']  = empty($site['FR'])  ? 'forum'      : $site['FR'];
	$site['FRT'] = empty($site['FRT']) ? 'fortopic'   : $site['FRT'];
	$site['TH']  = empty($site['TH'])  ? 'thread'     : $site['TH'];
	$site['GB']  = empty($site['GB'])  ? 'guestbk'    : $site['GB'];
	$site['NE']  = empty($site['NE'])  ? 'news'       : $site['NE'];
	$site['USR'] = empty($site['USR']) ? 'user'       : $site['USR'];
	$site['NL']  = empty($site['NL'])  ? 'newsletter' : $site['NL'];
	$site['DN']  = empty($site['DN'])  ? 'download'   : $site['DN'];
	$site['CT']  = empty($site['CT'])  ? 'contact'    : $site['CT'];
	
	$ctrlb = $site['PG'].$site['BLS'].$site['BL'].$site['FR'].$site['FRT'].$site['TH'].$site['GB'].$site['NE'].$site['USR'].$site['NL'].$site['DN'].$site['CT'];

	$sitepg  = import('sitepg');
	$sitepg  = empty($sitepg) ? 'postguest' : $sitepg;
	$sitepg  = preg_match('!^[a-z0-9_]{2,20}$!', $sitepg)  ? $sitepg  : $site['PG'];
	$sitebls = import('sitebls');
	$sitebls = empty($sitebls) ? 'blogs' : $sitebls;
	$sitebls = preg_match('!^[a-z0-9_]{2,20}$!', $sitebls) ? $sitebls : $site['BLS'];
	$sitebl  = import('sitebl');
	$sitebl  = empty($sitebl) ? 'blog' : $sitebl;
	$sitebl  = preg_match('!^[a-z0-9_]{2,20}$!', $sitebl)  ? $sitebl  : $site['BL'];
	$sitefr  = import('sitefr');
	$sitefr  = empty($sitefr) ? 'forum' : $sitefr;
	$sitefr  = preg_match('!^[a-z0-9_]{2,20}$!', $sitefr)  ? $sitefr  : $site['FR'];
	$sitefrt = import('sitefrt');
	$sitefrt = empty($sitefrt) ? 'fortopic' : $sitefrt;
	$sitefrt = preg_match('!^[a-z0-9_]{2,20}$!', $sitefrt) ? $sitefrt : $site['FRT'];
	$siteth  = import('siteth');
	$siteth  = empty($siteth) ? 'thread' : $siteth;
	$siteth  = preg_match('!^[a-z0-9_]{2,20}$!', $siteth)  ? $siteth  : $site['TH'];
	$sitegb  = import('sitegb');
	$sitegb  = empty($sitegb) ? 'guestbk' : $sitegb;
	$sitegb  = preg_match('!^[a-z0-9_]{2,20}$!', $sitegb)  ? $sitegb  : $site['GB'];
	$sitene  = import('sitene');
	$sitene  = empty($sitene) ? 'news' : $sitene;
	$sitene  = preg_match('!^[a-z0-9_]{2,20}$!', $sitene)  ? $sitene  : $site['NE'];
	$siteusr = import('siteusr');
	$siteusr = empty($siteusr) ? 'user' : $siteusr;
	$siteusr = preg_match('!^[a-z0-9_]{2,20}$!', $siteusr) ? $siteusr : $site['USR'];
	$sitenl  = import('sitenl');
	$sitenl  = empty($sitenl) ? 'newsletter' : $sitenl;
	$sitenl  = preg_match('!^[a-z0-9_]{2,20}$!', $sitenl)  ? $sitenl  : $site['NL'];
	$sitedn  = import('sitedn');
	$sitedn  = empty($sitedn) ? 'download' : $sitedn;
	$sitedn  = preg_match('!^[a-z0-9_]{2,20}$!', $sitedn)  ? $sitedn  : $site['DN'];
	$sitect  = import('sitect');
	$sitect  = empty($sitect) ? 'contact' : $sitect;
	$sitect  = preg_match('!^[a-z0-9_]{2,20}$!', $sitect)  ? $sitect  : $site['CT'];
	
//	$droitaccegroupredac = import('droitaccegroupredac');
	$droitaccegroupredac = '';

	$ctrls   = array_count_values(array($sitepg, $sitebls, $sitebl, $sitefr, $sitefrt, $siteth, $sitegb, $sitene, $siteusr, $sitenl, $sitedn, $sitect));

	$sitepg  = file_exists(CHEMIN.$sitepg.'php')  || $ctrls[$sitepg]  > 1 ? $site['PG']  : $sitepg;
	$sitebls = file_exists(CHEMIN.$sitebls.'php') || $ctrls[$sitebls] > 1 ? $site['BLS'] : $sitebls;
	$sitebl  = file_exists(CHEMIN.$sitebl.'php')  || $ctrls[$sitebl]  > 1 ? $site['BL']  : $sitebl;
	$sitefr  = file_exists(CHEMIN.$sitefr.'php')  || $ctrls[$sitefr]  > 1 ? $site['FR']  : $sitefr;
	$sitefrt = file_exists(CHEMIN.$sitefrt.'php') || $ctrls[$sitefrt] > 1 ? $site['FRT'] : $sitefrt;
	$siteth  = file_exists(CHEMIN.$siteth.'php')  || $ctrls[$siteth]  > 1 ? $site['TH']  : $siteth;
	$sitegb  = file_exists(CHEMIN.$sitegb.'php')  || $ctrls[$sitegb]  > 1 ? $site['GB']  : $sitegb;
	$sitene  = file_exists(CHEMIN.$sitene.'php')  || $ctrls[$sitene]  > 1 ? $site['NE']  : $sitene;
	$siteusr = file_exists(CHEMIN.$siteusr.'php') || $ctrls[$siteusr] > 1 ? $site['USR'] : $siteusr;
	$sitenl  = file_exists(CHEMIN.$sitenl.'php')  || $ctrls[$sitenl]  > 1 ? $site['NL']  : $sitenl;
	$sitedn  = file_exists(CHEMIN.$sitedn.'php')  || $ctrls[$sitedn]  > 1 ? $site['DN']  : $sitedn;
	$sitect  = file_exists(CHEMIN.$sitect.'php')  || $ctrls[$sitect]  > 1 ? $site['CT']  : $sitect;

	if ($sitepg != $site['PG']) 
		if (!rename(CHEMIN.$site['PG'].'.php', CHEMIN.$sitepg.'.php')) $sitepg = $site['PG'];
		elseif (file_exists(CHEMIN.$site['PG'].'.php')) @unlink(CHEMIN.$site['PG'].'.php');

	if ($sitebls != $site['BLS'])
		if (!rename(CHEMIN.$site['BLS'].'.php', CHEMIN.$sitebls.'.php')) $sitebls = $site['BLS'];
		elseif (file_exists(CHEMIN.$site['BLS'].'.php')) @unlink(CHEMIN.$site['BLS'].'.php');

	if ($sitebl != $site['BL'])
		if (!rename(CHEMIN.$site['BL'].'.php', CHEMIN.$sitebl.'.php')) $sitebl = $site['BL'];
		elseif (file_exists(CHEMIN.$site['BL'].'.php')) @unlink(CHEMIN.$site['BL'].'.php');

	if ($sitefr != $site['FR'])
		if (!rename(CHEMIN.$site['FR'].'.php', CHEMIN.$sitefr.'.php')) $sitefr = $site['FR'];
		elseif (file_exists(CHEMIN.$site['FR'].'.php')) @unlink(CHEMIN.$site['FR'].'.php');

	if ($sitefrt != $site['FRT'])
		if (!rename(CHEMIN.$site['FRT'].'.php', CHEMIN.$sitefrt.'.php')) $sitefrt = $site['FRT'];
		elseif (file_exists(CHEMIN.$site['FRT'].'.php')) @unlink(CHEMIN.$site['FRT'].'.php');

	if ($siteth != $site['TH'])
		if (!rename(CHEMIN.$site['TH'].'.php', CHEMIN.$siteth.'.php')) $siteth = $site['TH'];
		elseif (file_exists(CHEMIN.$site['TH'].'.php')) @unlink(CHEMIN.$site['TH'].'.php');

	if ($sitegb != $site['GB'])
		if (!rename(CHEMIN.$site['GB'].'.php', CHEMIN.$sitegb.'.php')) $sitegb = $site['GB'];
		elseif (file_exists(CHEMIN.$site['GB'].'.php')) @unlink(CHEMIN.$site['GB'].'.php');

	if ($sitene != $site['NE'])
		if (!rename(CHEMIN.$site['NE'].'.php', CHEMIN.$sitene.'.php')) $sitene = $site['NE'];
		elseif (file_exists(CHEMIN.$site['NE'].'.php')) @unlink(CHEMIN.$site['NE'].'.php');

	if ($siteusr != $site['USR'])
		if (!rename(CHEMIN.$site['USR'].'.php', CHEMIN.$siteusr.'.php')) $siteusr = $site['USR'];
		elseif (file_exists(CHEMIN.$site['USR'].'.php')) @unlink(CHEMIN.$site['USR'].'.php');

	if ($sitenl != $site['NL'])
		if (!rename(CHEMIN.$site['NL'].'.php', CHEMIN.$sitenl.'.php')) $sitenl = $site['NL'];
		elseif (file_exists(CHEMIN.$site['NL'].'.php')) @unlink(CHEMIN.$site['NL'].'.php');

	if ($sitedn != $site['DN'])
		if (!rename(CHEMIN.$site['DN'].'.php', CHEMIN.$sitedn.'.php')) $sitedn = $site['DN'];
		elseif (file_exists(CHEMIN.$site['DN'].'.php')) @unlink(CHEMIN.$site['DN'].'.php');

	if ($sitect != $site['CT'])
		if (!rename(CHEMIN.$site['CT'].'.php', CHEMIN.$sitect.'.php')) $sitect = $site['CT'];
		elseif (file_exists(CHEMIN.$site['CT'].'.php')) @unlink(CHEMIN.$site['CT'].'.php');
	
	$ctrla = $sitepg.$sitebls.$sitebl.$sitefr.$sitefrt.$siteth.$sitegb.$sitene.$siteusr.$sitenl.$sitedn.$sitect;
	
    $site[5]     = import('site5', 'POST', true, '0'); // Activation des news ou pas
    $site[10]    = import('site10'); // Page pour la redirection des erreurs 404
    $site[12]    = import('site12', 'POST', true, '0'); // Page secondaire pour la redirection des erreurs 404
    $site[13]    = import('site13', 'POST', true, '0'); // Hauteur en pixels des nouvelles
    $site[30]    = import('site30', 'POST', true, '0'); // Activation du blog ou pas
    $site[36]    = import('site36', 'POST', true, '0'); // Hauteur en pixels des billets du blog
	$site['NTC'] = max(1, import('siteNTC')); // Nombre de tentatives de connexion
	$site['PG']  = $sitepg; // Alias du script postguest.php
	$site['BLS'] = $sitebls; // Alias du script blogs.php
	$site['BL']  = $sitebl; // Alias du script blog.php
	$site['FR']  = $sitefr; // Alias du script forum.php
	$site['FRT'] = $sitefrt; // Alias du script fortopic.php
	$site['TH']  = $siteth; // Alias du script thread.php
	$site['GB']  = $sitegb; // Alias du script guestbk.php
	$site['NE']  = $sitene; // Alias du script news.php
	$site['USR'] = $siteusr; // Alias du script user.php
	$site['NL']  = $sitenl; // Alias du script newsletter.php
	$site['DN']  = $sitedn; // Alias du script download.php
	$site['CT']  = $sitect; // Alias du script contact.php

    $texte[3]    = import('texte3'); // Puce articles

    $menuico[12] = import('menuico12', 'POST', true, '0'); // Page exécution Nouvelles
    $menuico[13] = import('menuico13', 'POST', true, '0'); // Page exécution Blog
    $menuico[14] = import('menuico14', 'POST', true, '0'); // Page exécution Photorama
    $menuico[15] = import('menuico15', 'POST', true, '0'); // Page exécution Téléchargements
    $menuico[16] = import('menuico16', 'POST', true, '0'); // Page exécution Liens
    $menuico[17] = import('menuico17', 'POST', true, '0'); // Page exécution FAQ
    $menuico[18] = import('menuico18', 'POST', true, '0'); // Page exécution Livre d'or
    $menuico[19] = import('menuico19', 'POST', true, '0'); // Page exécution Forum
    $menuico[21] = import('menuico21', 'POST', true, '0'); // Page exécution Contact avancé

    $members[1]  = import('members1'); // Zone membre accès à la section Articles
    $members[2]  = import('members2'); // Zone membre accès à la section Photo
    $members[3]  = import('members3'); // Zone membre accès à la section Liens
    $members[4]  = import('members4'); // Zone membre accès à la section FAQ
    $members[5]  = import('members5'); // Zone membre accès à la section Forum
    $members[7]  = import('members7'); // Zone membre accès à la section Téléchargement
    $members[8]  = import('members8'); // Zone membre accès publication Nouvelles
    $members[9]  = import('members9'); // Zone membre accès publication Livre d'Or
    $members[10] = import('members10'); // Zone membre accès publication Forum
    $members[11] = import('members11'); // Zone membre accès publication Réactions aux articles
    $members[12] = import('members12'); // Zone membre accès à la section Livre d'Or
    $members[13] = import('members13'); // Zone membre accès à la section Nouvelles
    $members[14] = import('members14'); // Zone membre accès à la section Agenda
    $members[15] = import('members15'); // Zone membre accès à la section Blog
    $members[16] = import('members16'); // Zone membre accès publication Blog
    $members[17] = import('members17'); // Zone membre accès à publication Commentaires blogs
    $members[18] = import('members18'); // Zone membre accès à inscription Newsletter
    $members[20] = import('members20'); // Zone membre accès contact avancé
    $members[22] = import('members22'); // Zone membre accès nouveautés du site

    $serviz[0]  = 'on'; //  Citations, service désactivable par boite
    $serviz[1]  = import('serviz1', 'POST', true, '0'); // Choix page Accueil
    $serviz[2]  = max(1, import('serviz2')); // Nb de news / page
    $serviz[4]  = max(1, import('serviz4')); // Nb de téléchargements / page
    $serviz[5]  = max(1, import('serviz5')); // Nb de liens / page
    $serviz[6]  = max(1, import('serviz6')); // Nb de FAQ / page
    $serviz[7]  = max(1, import('serviz7')); // Nb de messages Guestbook / page
    $serviz[8]  = import('serviz8'); // Nouvelles ON / OFF
    $serviz[9]  = import('serviz9'); // Photos ON / OFF
    $serviz[10] = import('serviz10'); // Téléchargements ON / OFF
    $serviz[11] = import('serviz11'); // Liens ON / OFF
    $serviz[12] = import('serviz12'); // Livre d'or ON / OFF
    $serviz[13] = import('serviz13'); // Forum ON / OFF
    $serviz[14] = import('serviz14'); // FAQ ON / OFF
    $serviz[16] = import('serviz16'); // Publication Nouvelles RSS ON / OFF
    $serviz[17] = max(1, import('serviz17')); // Nb de messages Forum / page
    $serviz[18] = import('serviz18'); // Désactiver le courrier interne ON / OFF
    $serviz[19] = 'on'; //  Bannières, service désactivable par boite
    $serviz[20] = max(1, import('serviz20')); // Nb de messages Thread / page
    $serviz[21] = import('serviz21'); // Contact site ON /OFF
    $serviz[25] = import('serviz25'); // Rotation automatique des bannières
    $serviz[26] = max(1, import('serviz26')); // Durée d'affichage en secondes d'une bannière
    $serviz[27] = import('serviz27'); // Billets RSS des amis ON / OFF
    $serviz[29] = import('serviz29', 'POST', true, '0'); // Réactions aux articles ON / OFF / Ok Admin
    $serviz[30] = max(1, import('serviz30')); // Nb Réactions aux articles / page
    $serviz[33] = import('serviz33'); // Compteur de lecture Articles
    // Compteur de lecture Threads Forum transféré dans config7
    $serviz[35] = import('serviz35'); // Compteur de Nb de téléchargements
    $serviz[36] = import('serviz36'); // Newsletter ON / OFF
    $serviz[37] = max(1, import('serviz37')); // Nb de news / articles publiés
    $serviz[39] = import('serviz39'); // Durée Cache RSS
    $serviz[40] = import('serviz40', 'POST', true, '0'); // Publication dans le livre d'or
    $serviz[41] = import('serviz41', 'POST', true, '0'); // Publication dans le forum
    $serviz[43] = import('serviz43'); // Avatar préférences webmaster
    $serviz[45] = 'on'; // forcé à on : Masquer l'icône Admin
    $serviz[46] = max(1, import('serviz46')); // Nb de messages Agenda / page
    $serviz[47] = import('serviz47'); // Agenda ON / OFF
    $serviz[48] = max(1, import('serviz48')); // Nb de messages maximum dans Tinymessage
    $serviz[50] = max(1, import('serviz50')); // Nb maxi de fichiers dans data/error
    $serviz[51] = max(50, import('serviz51')); // Nb maxi de lignes dans l'anti-spam
    $serviz[52] = max(10, import('serviz52')); // Durée maxi de validité du code anti-spam
    $serviz[53] = import('serviz53'); // Blog ON / OFF
    $serviz[54] = import('serviz54'); // Publication Blog RSS ON / OFF
    $serviz[55] = max(1, import('serviz55')); // Nb de Blogs / page
    $serviz[56] = max(1, import('serviz56')); // Nb de blogs publiés
    $serviz[57] = import('serviz57', 'POST', true, '0'); // Commentaires sur Blog ON /OFF / OK Admin
    $serviz[58] = import('serviz58'); // Nombre de lettres par lot
    $serviz[59] = import('serviz59', 'POST', true, '0'); // Menu dynamique Blog WEB
    $serviz[60] = import('serviz60'); // Publication Articles RSS ON / OFF
    $serviz[61] = max(1, import('serviz61')); // Nb billets récents-commentaires / page
    $serviz[62] = import('serviz62'); // Recommander ON/OFF
    $serviz[63] = import('serviz63'); // Afficher le nombre d'abonnés à la newsletter ON/OFF
    $serviz[64] = import('serviz64'); // Cacher la date de création dans Articles ON/OFF
    $serviz[65] = import('serviz65'); // Cacher la date de modification dans Articles ON/OFF
    $serviz[66] = import('serviz66'); // Cacher la catégorie dans Articles ON/OFF
    $serviz[67] = import('serviz67'); // Cacher le compteur dans Articles ON/OFF
    $serviz[68] = import('serviz68'); // Cacher le bouton Imprimer dans Articles ON/OFF
    $serviz[69] = import('serviz69'); // Cacher la date de création dans Faq ON/OFF
    $serviz[70] = import('serviz70'); // Cacher la date de modification dans Faq  ON/OFF
    $serviz[71] = import('serviz71'); // Cacher le bouton Imprimer dans Faq ON/OFF
    $serviz[72] = import('serviz72'); // Cacher la date de création dans Nouvelles ON/OFF
    $serviz[73] = import('serviz73'); // Cacher l'auteur dans Nouvelles ON/OFF
	// Cacher les boîtes en page d'accueil ON/OFF transféré dans config3
    $serviz[75] = max(1, import('serviz75')); // Nombre de documents dans les listes en Admin
    $serviz[76] = import('serviz76'); // Cacher la date de modification dans Blog ON/OFF
    $serviz[77] = import('serviz77'); // Cacher la date de modification dans Download ON/OFF
    $serviz[78] = import('serviz78'); // Déplier la liste des téléchargements
    $serviz[79] = import('serviz79'); // Déplier la liste de la FAQ
    $serviz[80] = import('serviz80'); // Déplier la liste des liens
    $serviz[81] = import('serviz81'); // Déplier la liste des liens
    $serviz[82] = max(1, import('serviz82')); // Nombre d'articles dans le flux RSS articles
    $serviz[83] = import('serviz83', 'POST', true, '0'); // Boite latérale diaporama
    $serviz[84] = import('serviz84'); // Afficher IP des visiteurs
    $serviz[85] = import('serviz85'); // Site de contrôle des IP des visiteurs
    $serviz[86] = import('serviz86'); // Autoriser la liste des membres
    $serviz[87] = import('serviz87'); // Nombre maximum de galeries par page
    $serviz[88] = import('serviz88'); // Activer le captcha pour les préférences
    $serviz[89] = import('serviz89'); // Activer le captcha pour les nouvelles
    $serviz[90] = import('serviz90'); // Activer le captcha pour le livre d'or
    $serviz[91] = import('serviz91'); // Activer le captcha pour le forum
    $serviz[92] = import('serviz92'); // Activer le captcha pour les réactions aux articles
    $serviz[93] = import('serviz93'); // Activer le captcha pour l'inscription à la newsletter
    $serviz[94] = import('serviz94'); // Activer le captcha pour recommander
    $serviz[95] = import('serviz95'); // Activer le captcha pour le contact webmestre
    $serviz[96] = import('serviz96'); // Activer le captcha pour le blog
    $serviz[97] = import('serviz97'); // Activer le captcha pour les commentaires blog
    $serviz[98] = import('serviz98'); // Désactiver pour les membres
    $serviz[99] = import('serviz99'); // Contact site avancé
    $serviz[100] = import('serviz100', 'POST', true, '0'); // Type de captcha 0=pas de captcha 1=image 2=texte 3=sélection texte
    $serviz[102] = import('serviz102'); // Cacher la barre de navigation dans articles ON/OFF
	$serviz[103] = import('serviz103'); // Ensemble des publications RSS
	$serviz[104] = import('serviz104'); // Inclure AddThis dans le blog
	$serviz[105] = import('serviz105'); // Inclure AddThis dans les articles
	$serviz[106] = import('serviz106'); // Inclure AddThis dans les nouvelles
	$serviz[107] = import('serviz107'); // Inclure AddThis dans le forum
    $serviz[108] = import('serviz108'); // Rotation automatique des citations
    $serviz[109] = max(1, import('serviz109')); // Durée d'affichage en secondes d'une citation
	$serviz[110] = max(1, import('serviz110')); // Délai suppression inscription newsletter
	$serviz[111] = import('serviz111'); // Afficher les visites du jour
    $serviz[113] = import('serviz113'); // Cacher les mots-clés dans Articles ON/OFF
    $serviz[114] = import('serviz114'); // Cacher titre et auteur des billets ON/OFF
    $serviz[115] = import('serviz115'); // Captcha sensible à la casse ON/OFF
	$serviz[116] = import('serviz116'); // Nouveautés du site WEB
	$serviz[117] = import('serviz117'); // Nouveautés depuis la dernière connexion WEB
	$serviz[118] = import('serviz118'); // Nouveautés depuis un nombre de jours WEB
	$serviz[119] = max(1, import('serviz119')); // Nombre de jours à mémoriser WEB
	$serviz[120] = import('serviz120'); // Hauteur en pixels des nouveautés WEB
	$serviz[121] = import('serviz121'); // Inclure le calendrier dans les nouveautés
	$serviz[122] = import('serviz122'); // Inclure les articles dans les nouveautés
	$serviz[123] = import('serviz123'); // Inclure le blog dans les nouveautés
	$serviz[124] = import('serviz124'); // Inclure les téléchargements dans les nouveautés
	$serviz[125] = import('serviz125'); // Inclure la faq dans les nouveautés
	$serviz[126] = import('serviz126'); // Inclure leforum dans les nouveautés
	$serviz[127] = import('serviz127'); // Inclure les liens dans les nouveautés
	$serviz[128] = import('serviz128'); // Inclure le livre d'or dans les nouveautés
	$serviz[129] = import('serviz129'); // Inclure les nouvelles dans les nouveautés
	$serviz[130] = import('serviz130'); // Inclure les photos dans les nouveautés
	$serviz[133] = import('serviz133'); // Hauteur maxi en pixels d'une cellule de fil RSS
	$serviz[134] = import('serviz134'); // Nb maxi de caractères dans une cellule de fil RSS
	$serviz[135] = import('serviz135'); // Nb jours affichage image nouveauté
	$serviz[136] = import('serviz136'); // Image nouveauté articles ON / OFF / Membres
	$serviz[137] = import('serviz137'); // Image nouveauté nouvelles ON / OFF / Membres
	$serviz[138] = import('serviz138'); // Image nouveauté blog ON / OFF / Membres
	$serviz[139] = import('serviz139'); // Image nouveauté forum ON / OFF / Membres
	$serviz[140] = import('serviz140'); // Image nouveauté faq ON / OFF / Membres
	$serviz[141] = import('serviz141'); // Image nouveauté livre d'or ON / OFF / Membres
	$serviz[142] = import('serviz142'); // Image nouveauté photo ON / OFF / Membres
	$serviz[143] = import('serviz143'); // Image nouveauté téléchargements ON / OFF / Membres
	$serviz[144] = import('serviz144'); // Image nouveauté liens ON / OFF / Membres
	$serviz[145] = import('serviz145'); // Image nouveauté agenda ON / OFF / Membres
	$serviz[148] = max(import('serviz148'), 20); // Nombre maxi de caractères du pseudo
	$serviz[149] = import('serviz149'); // Boîte compteur dans préférences
	$serviz[150] = import('serviz150'); // Téléchargements les plus récents
	$serviz[151] = import('serviz151'); // Téléchargements les plus téléchargés
	$serviz[152] = import('serviz152'); // Position texte et icône inversés pour les nouvelles
	$serviz[153] = import('serviz153'); // Position texte et icône inversés pour les billets
	$serviz[154] = import('serviz154'); // Image nouveauté option de menu ON / OFF / Membres
    $serviz[156] = import('serviz156'); // Photorama pleine page ON / OFF
    $serviz[157] = import('serviz157', 'POST', true, '0'); // Page secondaire du photorama
    $serviz[158] = import('serviz158'); // Cacher le nombre de membres inscrits
    $serviz[159] = import('serviz159'); // Cacher les membres connectés
	$serviz[166] = import('serviz166'); // Inclure les réactions articles dans les nouveautés
	$serviz[167] = import('serviz167'); // Inclure les commentaires blog dans les nouveautés
	$serviz[168] = import('serviz168'); // Pause entre les lots
    $serviz[169] = import('serviz169'); // Cacher la date des nouveautés du site WEB
    $serviz[171] = import('serviz171', 'POST', true, '0'); // Page secondaire du calendrier
    $serviz[172] = import('serviz172', 'POST', true, '0'); // Page secondaire utilisateur
    $serviz[173] = import('serviz173', 'POST', true, '0'); // Page secondaire connexion
	$serviz[174] = import('serviz174'); // Affichage tri des photos au sein de la galerie de photos par id ou no ordre
    $serviz[177] = import('serviz177'); // Numéro article pour les mentions légales
    $serviz[178] = import('serviz178'); // Numéro page pour afficher les mentions légales
    $serviz[179] = import('serviz179'); // Groupe pour accès à la liste des membres
    $serviz[180] = import('serviz180'); // Lister tous les membres
    $serviz[181] = import('serviz181'); // Affichage topblog ON / OFF
	$serviz[182] = import('serviz182'); // Affichage tri des galeries par catégorie ou Catgéorie ASC et ID desc
    
    $actionwaf = import('actionwaf'); // Activation pare-feu bannisement/blacklistage
	if ($actionwaf == '') $actionwaf = '1';
    if ($fctwri == 'admin' && ($serviz[31] == $userprefs[1] || $serviz[176] == $userprefs[1] || is_file(CHEMIN.'install/install.php'))) {
        $site[37]   = import('site37'); // Thème éditeur public CKEditor
        $serviz[3]  = import('serviz3'); // Carnet de bord du site
        $serviz[31] = trim(import('serviz31')); // Pseudo administrateur principal
        // Contrôle admin principal
        $okPadmin = !empty($serviz[31]) && is_file(MSGREP.$serviz[31].DBEXT) ? true : false;
        if (!$okPadmin) $serviz[31] = ' ';
        $serviz[32]  = import('serviz32'); // Accès à l'administration rapide
        $serviz[101] = import('serviz101'); // Largeur de l'éditeur
        $serviz[175] = import('serviz175'); // Autoriser les images dans ckeditor public
        $serviz[176] = trim(import('serviz176')); // Pseudo administrateur secondaire
        $serviz[42]  = import('serviz42', 'POST', true, !empty($serviz[176]) ? 'on' : ''); // Option collaborateur
        // Contrôle admin secondaire
        $okSadmin = false;
        if (!empty($serviz[176]) && is_file(MSGREP.$serviz[176].DBEXT) && $serviz[42] == 'on') {
            $dbadmins = ReadDBFields(ADMINS);
            foreach ($dbadmins as $row)
                if ($row[0] == $serviz[176] && $row[1] == 'admin') {
                    $okSadmin = true;
                    break;
                }
        }
        if (!$okSadmin) $serviz[176] = ' ';
    }
/*	
	if ($serviz[1] != '0') $menuico[0] = ''; // Icône Accueil
	if ($serviz[8] == '')  $menuico[1] = ''; // Icône Nouvelles
	if ($serviz[8] == 'on')  $menuico[1] = 'on'; // Icône Nouvelles
	if ($serviz[53] == '') $menuico[2] = ''; // Icône Blog
	if ($serviz[53] == 'on') $menuico[2] = 'on'; // Icône Blog	
	if ($serviz[9] == '')  $menuico[3] = ''; // Icône Photorama
	if ($serviz[9] == 'on')  $menuico[3] = 'on'; // Icône Photorama
	if ($serviz[10] == '') $menuico[4] = ''; // Icône Téléchargements
	if ($serviz[10] == 'on') $menuico[4] = 'on'; // Icône Téléchargements
	if ($serviz[11] == '') $menuico[5] = ''; // Icône Liens
	if ($serviz[11] == 'on') $menuico[5] = 'on'; // Icône Liens	
	if ($serviz[14] == '') $menuico[6] = ''; // Icône FAQ
	if ($serviz[14] == 'on') $menuico[6] = 'on'; // Icône FAQ	
	if ($serviz[12] == '') $menuico[7] = ''; // Icône Livre d'or
	if ($serviz[12] == 'on') $menuico[7] = 'on'; // Icône Livre d'or	
	if ($serviz[13] == '') $menuico[8] = ''; // Icône Forum
	if ($serviz[13] == 'on') $menuico[8] = 'on'; // Icône Forum
	if ($serviz[99] == '') $menuico[10] = ''; // Icône Contact avancé
	if ($serviz[99] == 'on') $menuico[10] = 'on'; // Icône Contact avancé
*/

    $supervision[0]  = import('supervision0'); // e-mail compteur
    $supervision[1]  = max(1, import('supervision1')); // incrément de compteur pour e-mail
    $supervision[2]  = import('supervision2'); // e-mail publication nouvelle
    $supervision[3]  = import('supervision3'); // e-mail publication livre d'or
    $supervision[4]  = import('supervision4'); // e-mail publication forum
 // $supervision[5]  = import('supervision5'); // Type d'e-mail PHP
	$supervision[5]  = 'phpmailer'; // Type d'e-mail PHP
    $supervision[6]  = import('supervision6'); // e-mail réagir aux articles
    $supervision[7]  = import('supervision7'); // e-mail inscription ou résiliation Newsletter
    $supervision[8]  = import('supervision8'); // e-mail publication blog
    $supervision[9]  = import('supervision9'); // e-mail commentaire blog
    $supervision[10] = import('supervision10'); // liste e-mails supervision
    $supervision[11] = import('supervision11'); // e-mail ouverture ou fermeture de compte
    $supervision[12] = import('supervision12'); // e-mail erreurs de connexion
    
 //   $members[21] = intval(import('members21')); // Délai expiration cookie utilisateur
	$members[21] = ''; // Délai expiration cookie utilisateur

    $smtp[0] = strtolower(import('smtp0')); // serveur SMTP
 // $smtp[1] = import('smtp1'); // avec authentification ON / OFF
    $smtp[1] = 'on'; // avec authentification ON / OFF
    $smtp[2] = strtolower(import('smtp2')); // préfixe serveur "" / SSL / TLS
    $smtp[3] = import('smtp3'); // numéro de port SMTP
    $smtp[4] = CheckEmail(import('smtp4')); // adresse mail utilisateur
    $smtp5   = import('smtp5'); 
    $smtp5_2 = import('smtp5_2');
    $smtp[5] = !empty($smtp5) && $smtp5_2 == $smtp5 ? gy_crypt(CRYPT_KEY, $smtp5) : $smtp[5]; // mot de passe utilisateur
	$smtp[6] = import('smtp6'); // Activation log Smtp on / off
	$smtp[7] = import('smtp7'); // Délai de conservation en jour(s)															
	
	$sitemap['SM'] = import('sitemapSM'); // Création d'un sitemap
	$sitemap['BL'] = import('sitemapBL'); // Inclure le blog dans le sitemap
	$sitemap['AR'] = import('sitemapAR'); // Inclure les articles dans le sitemap
	$sitemap['NE'] = import('sitemapNE'); // Inclure les nouvelles dans le sitemap
	$sitemap['PH'] = import('sitemapPH'); // Inclure les photos dans le sitemap
	$sitemap['DN'] = import('sitemapDN'); // Inclure les téléchargements dans le sitemap
	$sitemap['FA'] = import('sitemapFA'); // Inclure la faq dans le sitemap
	$sitemap['LI'] = import('sitemapLI'); // Inclure les liens dans le sitemap
	$sitemap['GB'] = import('sitemapGB'); // Inclure le livre d'or dans le sitemap
	$sitemap['FR'] = import('sitemapFR'); // Inclure le forum dans le sitemap
	$sitemap['AG'] = import('sitemapAG'); // Inclure l'agenda dans le sitemap

    include 'inc/confupdt.inc';
 /*

  Si la variable $site[3] contenant l'url du site
   Modification ds fichiers dans data/config rgpd/js et rgpd.inc
   
*/
	include CONFIGREP.'rgpd.inc';

	if ($serviz[177] == '') $pgmentionslegales = '17';
	else
	 $pgmentionslegales = $serviz[177]; 	
     $rgpd["privacyUrl"] = !empty($rgpd["privacyUrl"]) ? str_replace(SITE3, '', trim($rgpd["privacyUrl"])) : 'articles.php?lng='.$lng.'&pg='.$pgmentionslegales;
/**
 * Code à enregistrer dans le fichier rgpd.js
 */
	$mettre = '
<script type="text/javascript">
    tarteaucitron.init({
      "privacyUrl": "'.$rgpd["privacyUrl"].'", /* Privacy policy url */

      "hashtag": "'.$rgpd["hashtag"].'", /* Open the panel with this hashtag */
      "cookieName": "'.$rgpd["cookieName"].'", /* Cookie name */

      "orientation": "'.$rgpd["orientation"].'", /* Banner position (top - bottom) */
   
      "groupServices": '.$rgpd["groupServices"].', /* Group services by category */
                       
      "showAlertSmall": false, /* Show the small banner on bottom right */
      "cookieslist": false, /* Show the cookie list */
                       
      "closePopup": false, /* Show a close X on the banner */

      "showIcon": '.$rgpd["showIcon"].', /* Show cookie icon to manage cookies */
      "iconSrc": "'.(!empty($rgpd["iconSrc"]) && !preg_match('`^http(s)?\:`', $rgpd["iconSrc"]) ? SITE3.$rgpd["iconSrc"] : $rgpd["iconSrc"]).'", /* Optionnal: URL image */
      "iconPosition": "'.$rgpd["iconPosition"].'", /* BottomRight, BottomLeft, TopRight and TopLeft */

      "adblocker": false, /* Show a Warning if an adblocker is detected */
                       
      "DenyAllCta" : '.$rgpd["DenyAllCta"].', /* Show the deny all button */
      "AcceptAllCta" : '.$rgpd["AcceptAllCta"].', /* Show the accept all button when highPrivacy on */
      "highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */
                       
      "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */

      "removeCredit": false, /* Remove credit link */
      "moreInfoLink": true, /* Show more info link */

      "useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
      "useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */

      //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
                      
      "readmoreLink": "", /* Change the default readmore link */

      "mandatory": true, /* Show a message about mandatory cookies */
    });
	
	'.$rgpd["servicesCode"].'
	
</script>';
	//
	
	WriteFullDB(CONFIGREP.'rgpd.js', $mettre);
	
	/**
	 * Code à enregistrer dans le fichier rgpd.inc
	 */	
	$rgpd_values = '<?php
$rgpd = array(	
      "privacyUrl" => stripslashes("'.addslashes($rgpd["privacyUrl"]).'"), /* Privacy policy url */

      "hashtag" => stripslashes("'.addslashes($rgpd["hashtag"]).'"), /* Open the panel with this hashtag */
      "cookieName" => stripslashes("'.addslashes($rgpd["cookieName"]).'"), /* Cookie name */

      "orientation" => "'.$rgpd["orientation"].'", /* Banner position (top - bottom) */
   
      "groupServices" => '.$rgpd["groupServices"].', /* Group services by category */
                       
      "showAlertSmall" => false, /* Show the small banner on bottom right */
      "cookieslist" => false, /* Show the cookie list */
                       
      "closePopup" => false, /* Show a close X on the banner */

      "showIcon" => '.$rgpd["showIcon"].', /* Show cookie icon to manage cookies */
      "iconSrc" => stripslashes("'.addslashes($rgpd["iconSrc"]).'"), /* Optionnal: URL image */
      "iconPosition" => "'.$rgpd["iconPosition"].'", /* BottomRight, BottomLeft, TopRight and TopLeft */

      "adblocker" => false, /* Show a Warning if an adblocker is detected */
                       
      "DenyAllCta"  => '.$rgpd["DenyAllCta"].', /* Show the deny all button */
      "AcceptAllCta"  => '.$rgpd["AcceptAllCta"].', /* Show the accept all button when highPrivacy on */
      "highPrivacy" => true, /* HIGHLY RECOMMANDED Disable auto consent */
                       
      "handleBrowserDNTRequest" => false, /* If Do Not Track == 1, disallow all */

      "removeCredit" => false, /* Remove credit link */
      "moreInfoLink" => true, /* Show more info link */

      "useExternalCss" => false, /* If false, the tarteaucitron.css file will be loaded */
      "useExternalJs" => false, /* If false, the tarteaucitron.js file will be loaded */

      //"cookieDomain" => ".my-multisite-domaine.fr", /* Shared cookie for multisite */
                      
      "readmoreLink" => "", /* Change the default readmore link */

      "mandatory" => true, /* Show a message about mandatory cookies */
	  
	  "servicesCode" => stripslashes("'.addslashes($rgpd["servicesCode"]).'"),   /* Declaration of services for rgpd */
);
	
?>';
	//
	WriteFullDB(CONFIGREP.'rgpd.inc', $rgpd_values);
// fin de mise à jour rgpd.inc et rgps.js	
	$mapurls = import('urlsmap'); // URLs non indexées
	WriteFullDB(MAPSURLS, $mapurls);
	
	$ctrlsa  = $sitemap['SM'].$sitemap['BL'].$sitemap['AR'].$sitemap['NE'].$sitemap['PH'].$sitemap['DN'].$sitemap['FA'].$sitemap['LI'].$sitemap['GB'].$sitemap['FR'].$sitemap['AG'].$mapurls;
	$smtyps  = array(TYP_BLOG, TYP_ART, TYP_NEWS, TYP_PHOTO, TYP_DNLOAD, TYP_FAQ, TYP_LINKS, TYP_GUESTBK, TYP_FORUM, TYP_AGENDA);
	$smslcts = array(TYP_BLOG=>$sitemap['BL'], TYP_ART=>$sitemap['AR'], TYP_NEWS=>$sitemap['NE'], TYP_PHOTO=>$sitemap['PH'], TYP_DNLOAD=>$sitemap['DN'], 
	                 TYP_FAQ=>$sitemap['FA'], TYP_LINKS=>$sitemap['LI'], TYP_GUESTBK=>$sitemap['GB'], TYP_FORUM=>$sitemap['FR'], TYP_AGENDA=>$sitemap['AG']);
	if ($sitemap['SM'] == 'on') {
        if ($ctrlsa != $ctrlsb) {
            foreach($smtyps as $smtyp)
                if ($smslcts[$smtyp] == 'on') UpdateSitemaps($smtyp);
            UpdateSitemaps('URLS');
        }
    } else {
        UpdateSitemaps('NONE');
    }
    
	if ($site['URLR'] == 'on' && $ctrlb != $ctrla) {
		setURLrewriting('');
		setURLrewriting('on');
	}

    include_once CHEMIN.INCREP.'funcrss.php';
    UpdateRSSnews();
    UpdateRSSblog();
    UpdateRSSart();
	UpdateRSSall();
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config5";'.EndJavascript();
    }
}
include CONFIG;
$mapurls = file_exists(MAPSURLS) ? file_get_contents(MAPSURLS) : '';
if (is_file ($meskin.'confskin.inc')) {
    include $meskin.'confskin.inc';
} else {
    die('Skin not found : '.$meskin);
}

$symbls = array('', '&bull;', '&deg;', '-', '-', '-', '-');

function LineTXT($ls, $label, $name, $value, $size=40, $typ='text', $left='60%', $readonly='') {
	global $charset, $symbls;
	$indent = 12 + ($ls - 1) * 24;
	if ($readonly != '') $readonly='readonly="readonly"';
    return '
        <div class="row">
          <div class="col-md-7 d-inline-block pt-3 align-middle">
		    <label for="'.$name.'" style="padding-left:'.$indent.'px;"><b>'.$symbls[$ls].'</b>&nbsp;&nbsp;'.$label.'</label>
          </div>
          <div class="col-md-5 d-inline-block">
		    <input class="form-control texte" type="'.$typ.'" id="'.$name.'" name="'.$name.'" 
              value="'.htmlentities($value, ENT_QUOTES, $charset).'" '.$readonly.' style="max-width: '.$size.'px;" />
          </div>
		</div>';
}
function LineTXT2($label, $name, $value, $size=80) {
	global $charset;
    return '
      <div class="pl-3 align-middle"><label for="'.$name.'">'.$label.'</label></div>
      <div style="margin-top:-8px;">
        <input class="form-control texte" type="text" id="'.$name.'" name="'.$name.'" value="'.htmlentities($value, ENT_QUOTES, $charset).'" size="'.$size.'" />
	  </div>';
}
function LineCB($ls, $label, $name, $value, $script='', $readonly='') {
	global $symbls;
	$indent = 12 + ($ls - 1) * 24;
	if ($readonly != '') $readonly='disabled';
    return '
        <div class="row pt-4 pb-2 align-middle">
          <div class="col-md-7">
            <label for="'.$name.'" style="padding-left:'.$indent.'px;"><b>'.$symbls[$ls].'</b>&nbsp;&nbsp;'.$label.'</label>
          </div>
          <div class="col-md-5">
            <input class="pt-2" type="checkbox" id="'.$name.'" '.$readonly.' name="'.$name.'"'.Checked($value).$script.' />
          </div>
		</div>';
}
function LineSELECT($ls, $label, $name, $options, $value, $wkey=false, $mwidth=180, $disable='') {
	global $charset, $symbls;
	$indent = 12 + ($ls - 1) * 24;
    $out = '
        <div class="row">
          <div class="col-md-7 d-inline-block pt-3 align-middle">
            <label for="'.$name.'" style="padding-left:'.$indent.'px;"><b>'.$symbls[$ls].'</b>&nbsp;&nbsp;'.$label.'</label>
          </div>
          <div class="col-md-5 d-inline-block">
            <select class="form-control mt-2" style="max-width:'.$mwidth.'px;" id="'.$name.'" name="'.$name.'" '.$disable.'>';
    foreach ($options as $key=>$val) {
        $out .= '
              <option value="'.$key.'"'.Selected($value == $key || $value == html_entity_decode($key, ENT_QUOTES, $charset)).'>
                '.($wkey ? $key.' - ' : '').$val.'
              </option>';
    }
    return $out.'
            </select>
          </div>
		</div>';
}
function LineSELECT2($ls, $label, $name, $value) {
	global $symbls, $templates, $admin;
	$indent = 12 + ($ls - 1) * 24;
    $out = '
        <div class="row">
          <div class="col-md-7 d-inline-block pt-3 align-middle">
            <label for="'.$name.'" style="padding-left:'.$indent.'px;"><b>'.$symbls[$ls].'</b>&nbsp;&nbsp;'.$label.'</label>
          </div>
          <div class="col-md-5 d-inline-block">
            <select class="form-control" style="max-width:180px;" id="'.$name.'" name="'.$name.'">
              <option value="ALL"'.Selected($value == 'ALL').'>'.$admin[1363].'</option>';
    foreach ($templates as $key=>$val) {
        $out .= '
              <option value="'.$key.'"'.Selected($value != 'ALL' && $value == $key).'>'.$key.' - '.$val.'</option>';
    }
    return $out.'
            </select>
          </div>
		</div>';
}
function LineSELECT3($ls, $label, $name, $value) {
	global $symbls, $admin;
    $groupes = array(''=>' -- '.$admin[1604].' -- ', 'all_members'=>$admin[690]);
    $dbgroup = ReadDBFields(GROUPS);
	$indent  = 12 + ($ls - 1) * 24;
    $out = '
        <div class="row">
          <div class="col-md-7 d-inline-block pt-3 align-middle">
            <label for="'.$name.'" style="padding-left:'.$indent.'px;"><b>'.$symbls[$ls].'</b>&nbsp;&nbsp;'.$label.'</label>
          </div>
          <div class="col-md-5 d-inline-block">
            <select class="form-control" style="max-width:180px;" id="'.$name.'" name="'.$name.'">
              <option value=""'.Selected($value == '').'> -- '.$admin[1604].' -- </option>
              <option value="all_members"'.Selected($value == 'all_members').'>'.$admin[690].'</option>';
    foreach ($dbgroup as $key=>$groupe) {
        $out .= '
              <option value="'.$groupe[0].'"'.Selected($value != '' && $value == $groupe[0]).'>'.$groupe[0].'</option>';
    }
    return $out.'
            </select>
          </div>
		</div>';
}

$headinc .= '
    <script>
        function setnewsdaysweb1(form) {
            if (form.serviz117.checked) 
				{
					form.serviz118.checked = "";
					form.serviz118.disabled = true;
					form.serviz119.disabled = true;
					form.serviz120.disabled = true;
				}
			else
			{
					
					form.serviz118.disabled = false;
					form.serviz118.checked = "checked";
					form.serviz119.disabled = false;
					form.serviz120.disabled = false;
			}
        }
        function setnewsdaysweb2(form) {
            if (form.serviz118.checked) 
				{
					form.serviz117.checked = "";
					form.serviz117.disabled = true;
					form.serviz119.disabled = false;
					form.serviz120.disabled = false;
				}
			else
				{
					form.serviz117.checked = "checked";
					form.serviz117.disabled = false;
					form.serviz119.disabled = true;
					form.serviz120.disabled = true;					
				}
        }
        function setnewsdaysmob1(form) {
            if (form.serviz162.checked) form.serviz163.checked = "";
        }
        function setnewsdaysmob2(form) {
            if (form.serviz163.checked) form.serviz162.checked = "";
        }
    </script>
';

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[176]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[176], '100%');

// Préparation des tableaux d'options utilisés pour les selects
$options1      = array($admin[897], $admin[770], $admin[13], $admin[9], $admin[624]);
$options2      = array('off' => $admin[1604], 'on' => $admin[1605], 'mbr' => $admin[690]);
$options27     = array($admin[594], $admin[595], $admin[596], $admin[597], $admin[598], $admin[599]);
$option36      = array('' => $admin[1604], 'on' => $admin[1605].' + '.$admin[745], 'no' => $admin[1605].', '.$admin[916]);
$options39     = array(
    900 => $admin[613], 1800 => $admin[614], 3600 => $admin[615], 10800 => $admin[616],
    21600 => $admin[617], 43200 => $admin[618], 86400 => $admin[619]);
$options58     = array('' => $admin[1604], 'on' => $admin[1605], '2cols' => $admin[1605].', 2cols');
$options175    = array(0 => $admin[1604], 1 => $admin[1605], 2 => $admin[690], 3 => $admin[714].','.$admin[711]);
$optionsdelaiconservationlog = array(1 =>1, 2 =>2, 5 =>5, 10 =>10);																   
$confirm2      = array(0 => $admin[55], 1 => $admin[61]);
$confirm3      = array(2 => $admin[1604], 0 => $admin[55], 1 => $admin[61]);
$types_menu    = array($admin[397], $admin[398], $admin[504], $admin[621]);
$types_captcha = array(0 => $admin[1185], 2 => $admin[1187], 3 => $admin[1372]);
$types_waf     = array(1 => $admin[1878]);
$types_diapo   = array(0 => 'Tiles', 1 => 'Carousel', 2 => 'Slider');
// types_affichage_tri_galeries
$types_affichage_tri_galeries   = array(0 => $admin[1804], 1 => $admin[1805], 2 => $admin[1806]);
$types_affichage_tri_photos_galeries   = array(0 => $admin[1840], 1 => $admin[1841]);
$expireuser    = array('0'=>'-- '.$admin[1604].' --', '900'=>'15 mn', '1800'=>'30 mn', '3600'=>'1 h', '7200'=>'2 h', '21600'=>'6 h', '86400'=>'24 h', '172800'=>'48 h', '259200'=>'72 h');
$modesaveprefs = array('0'=>$admin[1750], '1'=>$admin[1751]);
$tmpls         = array(0 => $admin[875]);
$nbrtemplateabsent = 0;
for ($ij=0; $ij < count($templates); $ij++)
{
	if (!isset($templates[$ij])) 
		$nbrtemplateabsent++;
}
for ($i = 1; $i < count($templates)+$nbrtemplateabsent; $i++) {
	if (isset($templates[$i]))
	  $tmpls[$i] = $templates[$i];
}
$carspec1 = array('&nbsp;','!','#','*','+','-','.',':','&lt;','=','&gt;','@','^','~',
'&deg;','&curren;','&middot;','&ordm;','&plusmn;','&raquo;','&times;','&bull;');
$carspec2 = array();
foreach ($carspec1 as $car) {
    $carspec2[htmlentities($car, ENT_QUOTES, $charset)] = $car;
}
unset($carspec1);
$car1     = '&nbsp;&nbsp;<span class="texte" style="font-weight:bold;border:1px solid;" > &nbsp; '.$texte[3].' &nbsp; </span>';
$sknCKE   = array('moono'=>'Moono', 'moono_blue'=>'Moono Blue', 'moonocolor_v1.1'=>'Moono Color', 'moono-dark'=>'Moono Dark', 'moono-lisa'=>'Moono Lisa');
$dbadmins = ReadDBFields(ADMINS);
$dbadms   = array(''=>'');
foreach ($dbadmins as $row) $dbadms[] = $row[0];

echo '<div class="alert alert-primary" role="alert">
	  '.$admin[1887].'
	</div>';

echo '
<div style="text-align:center;">
  <p>'.ToHelp($lng, '&pg=954&mnuid=937&tconfig=0#z2').$admin[177].'</p>
</div>
<div class="w-100 m-auto">
  <form name="conf5" action="admin.php?lng='.$lng.'&amp;pg=config5" method="post">
    <input type="hidden" name="regit" value="1" />';
	
echo '
    <div class="m-auto" id="accordion" style="max-width:660px;">
      <div class="row quest p-0 mb-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>';
// ADMINISTRATION
if (!isset($droitaccegroupredac)) $droitaccegroupredac = '';
//			'.LineCB(1, $admin[1837], 'droitaccegroupredac', $droitaccegroupredac).'
if (is_file(CHEMIN.'install/install.php') || (isAdmin($userprefs[1]) && ($userprefs[1] == $serviz[31] || $userprefs[1] == $serviz[176]))) {
    echo '
      <div class="card">
        <a class="card-header card-link" data-toggle="collapse" href="#collapse1">'.$admin[810].'</a>
        <div class="collapse show" data-parent="#accordion" id="collapse1">
          <div class="card-body w-100 pt-2 pb-4 pr-3">';
    if ($userprefs[1] == $serviz[31] || $userprefs[1] == $serviz[176] || is_file(CHEMIN.'install/install.php'))
        echo '
			'.LineTXT(1, $admin[1731], 'serviz31', trim($serviz[31]), 300).'
			'.LineTXT(2, $admin[1732], 'serviz176', trim($serviz[176]), 300).'
			'.LineCB(1, $admin[482], 'serviz32', $serviz[32], 40).'
			'.LineTXT(1, $admin[1242], 'serviz101', trim($serviz[101]), 100, 40).'
			'.LineSELECT(1, $admin[1578], 'serviz175', $options175, $serviz[175], false, 160).'
			'.LineSELECT(1, $admin[1581], 'site37', $sknCKE, $site[37]).'
            '.LineCB(1, $admin[711], 'serviz42', $serviz[42]).'
            '.LineCB(1, $admin[937], 'serviz3', $serviz[3]).'
          </div>
        </div>
      </div>';
}
// SERVICES Blog
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse2">
          '.$admin[217].' => '.mb_strtoupper($admin[770]).'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse2">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			<div style="margin-top:8px;">'.LineCB(1, $admin[780], 'serviz53', $serviz[53]).'</div>
            '.LineSELECT3(2, $admin[932], 'members15', $members[15]).'
            '.LineSELECT(2, $admin[1221].' WEB', 'serviz59', $types_menu, $serviz[59]).'
            '.LineSELECT2(2, $admin[1552], 'menuico13', $menuico[13]).'
            '.LineSELECT(2, $admin[775], 'site30', $confirm3, $site[30]).'
            '.LineSELECT3(4, $admin[932], 'members16', $members[16]).'
            '.LineSELECT(2, $admin[774], 'serviz57', $confirm3, $serviz[57]).'
            '.LineSELECT3(4, $admin[932], 'members17', $members[17]).'
            '.LineTXT(2, $admin[1469], 'site36', trim($site[36]), 60, 40).'
            '.LineCB(2, $admin[1068], 'serviz76', $serviz[76]).'
            '.LineCB(2, $admin[1069], 'serviz114', $serviz[114]).'
            '.LineCB(2, $admin[347], 'serviz104', $serviz[104]).'
            '.LineCB(2, $admin[1379].$admin[1538], 'serviz123', $serviz[123]).'
            '.LineCB(2, $admin[1379].$admin[1539], 'serviz167', $serviz[167]).'
            '.LineCB(2, $admin[1468], 'serviz153', $serviz[153]).'
            '.LineCB(2, $admin[1775], 'serviz181', $serviz[181]).'
          </div>
        </div>
      </div>';
// SERVICES Articles
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse3">
          '.$admin[217].' => '.mb_strtoupper($admin[5]).'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse3">
          <div class="card-body w-100 p-2 pb-4 pr-3">
            '.LineSELECT3(2, $admin[932], 'members1', $members[1]).'
            '.LineSELECT(2, $admin[472], 'serviz29', $confirm3, $serviz[29]).'
            '.LineSELECT3(4, $admin[932], 'members11', $members[11]).'
            '.LineCB(2, $admin[483], 'serviz33', $serviz[33]).'
            '.LineCB(2, $admin[1064], 'serviz64', $serviz[64]).'
            '.LineCB(2, $admin[1065], 'serviz65', $serviz[65]).'
            '.LineCB(2, $admin[1066], 'serviz66', $serviz[66]).'
            '.LineCB(2, $admin[1067], 'serviz67', $serviz[67]).'
            '.LineCB(2, $admin[1068], 'serviz68', $serviz[68]).'
            '.LineCB(2, $admin[1281], 'serviz102', $serviz[102]).'
            '.LineCB(2, $admin[1346], 'serviz113', $serviz[113]).'
            '.LineCB(2, $admin[347], 'serviz105', $serviz[105]).'
            '.LineCB(2, $admin[1379].' ('.mb_strtolower($admin[5]).')', 'serviz122', $serviz[122]).'
            '.LineCB(2, $admin[1379].' ('.mb_strtolower($admin[476]).')', 'serviz166', $serviz[166]).'
          </div>
        </div>
      </div>';
// SERVICES Nouvelles - Photos
if (!isset($serviz[174])) $serviz[174] = '';
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse4">
          '.$admin[217].' => '.$admin[13].' - '.substr($admin[834], 0, -1).'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse4">
          <div class="card-body w-100 p-2 pb-4 pr-3">
            <div style="margin-top:8px;">'.LineCB(1, $admin[72], 'serviz8', $serviz[8]).'</div>
            '.LineSELECT3(2, $admin[932], 'members13', $members[13]).'
            '.LineSELECT(2, $admin[59], 'site5', $confirm3, $site[5]).'
            '.LineSELECT3(4, $admin[932], 'members8', $members[8]).'
            '.LineTXT(2, $admin[684], 'site13', trim($site[13]), 60, 40).'
            '.LineCB(2, $admin[1064], 'serviz72', $serviz[72]).'
            '.LineCB(2, $admin[1069], 'serviz73', $serviz[73]).'
            '.LineCB(2, $admin[347], 'serviz106', $serviz[106]).'
            '.LineCB(2, $admin[1379], 'serviz129', $serviz[129]).'
            '.LineCB(2, $admin[1468], 'serviz152', $serviz[152]).'
            '.LineSELECT2(2, $admin[1552], 'menuico12', $menuico[12]).'
            <div style="margin-top:8px;">'.LineCB(1, $admin[74], 'serviz9', $serviz[9]).'</div>
            '.LineSELECT3(2, $admin[932], 'members2', $members[2]).'
            '.LineCB(2, $admin[1057], 'serviz81', $serviz[81]).'
			'.LineSELECT(2, $admin[1803], 'serviz182', $types_affichage_tri_galeries, $serviz[182], $mwidth=250).'
			'.LineSELECT(2, $admin[1842], 'serviz174', $types_affichage_tri_photos_galeries, $serviz[174], $mwidth=350).'
            '.LineTXT(2, $admin[1037], 'serviz87', trim($serviz[87]), 40, 40).'
            '.LineSELECT(2, $admin[1456], 'serviz83', $types_diapo, $serviz[83]).'
            '.LineCB(2, $admin[1379], 'serviz130', $serviz[130]).'
            '.LineCB(2, $admin[1482], 'serviz156', $serviz[156]).'
            '.LineSELECT2(2, $admin[1552], 'menuico14', $menuico[14]).'
          </div>
        </div>
      </div>';
// SERVICES Téléchargements - FAQ
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse5">
          '.$admin[217].' => '.$admin[18].' - '.$admin[206].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse5">
          <div class="card-body w-100 p-2 pb-4 pr-3">
            <div style="margin-top:8px;">'.LineCB(1, $admin[73], 'serviz10', $serviz[10]).'</div>
            '.LineSELECT3(2, $admin[932], 'members7', $members[7]).'
            '.LineCB(2, $admin[484], 'serviz35', $serviz[35]).'
            '.LineCB(2, $admin[1068], 'serviz77', $serviz[77]).'
            '.LineCB(2, $admin[1057], 'serviz78', $serviz[78]).'
            '.LineCB(2, $admin[1379], 'serviz124', $serviz[124]).'
            '.LineSELECT2(2, $admin[1552], 'menuico15', $menuico[15]).'
            <div style="margin-top:8px;">'.LineCB(1, $admin[207], 'serviz14', $serviz[14]).'</div>
            '.LineSELECT3(2, $admin[932], 'members4', $members[4]).'
            '.LineCB(2, $admin[1064], 'serviz69', $serviz[69]).'
            '.LineCB(2, $admin[1065], 'serviz70', $serviz[70]).'
            '.LineCB(2, $admin[1068], 'serviz71', $serviz[71]).'
            '.LineCB(2, $admin[1057], 'serviz79', $serviz[79]).'
            '.LineCB(2, $admin[1379], 'serviz125', $serviz[125]).'
            '.LineSELECT2(2, $admin[1552], 'menuico17', $menuico[17]).'
          </div>
        </div>
      </div>';
// SERVICES Liens - Livre d'or - Forum
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse6">
          '.$admin[217].' => '.$admin[10].' - '.$admin[11].' - '.$admin[9].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse6">
          <div class="card-body w-100 p-2 pb-4 pr-3">
		    <div style="margin-top:8px;">'.LineCB(1, $admin[75], 'serviz11', $serviz[11]).'</div>
            '.LineSELECT3(2, $admin[932], 'members3', $members[3]).'
			'.LineCB(2, $admin[1057], 'serviz80', $serviz[80]).'
			'.LineCB(2, $admin[1379], 'serviz127', $serviz[127]).'
			'.LineSELECT2(2, $admin[1552], 'menuico16', $menuico[16]).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[76], 'serviz12', $serviz[12]).'</div>
            '.LineSELECT3(2, $admin[932], 'members12', $members[12]).'
			'.LineSELECT(2, $admin[454], 'serviz40', $confirm2, $serviz[40]).'
            '.LineSELECT3(4, $admin[932], 'members9', $members[9]).'
			'.LineCB(2, $admin[1379], 'serviz128', $serviz[128]).'
			'.LineSELECT2(2, $admin[1552], 'menuico18', $menuico[18]).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[164], 'serviz13', $serviz[13]).'</div>
            '.LineSELECT3(2, $admin[932], 'members5', $members[5]).'
			'.LineSELECT(2, $admin[454], 'serviz41', $confirm2, $serviz[41]).'
            '.LineSELECT3(4, $admin[932], 'members10', $members[10]).'
			'.LineCB(2, $admin[347], 'serviz107', $serviz[107]).'
			'.LineCB(2, $admin[1379], 'serviz126', $serviz[126]).'
			'.LineSELECT2(2, $admin[1552], 'menuico19', $menuico[19]).'
          </div>
        </div>
      </div>';
// SERVICES Agenda - Recommander - Newsletter - Contact
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse7">
          '.$admin[217].' => '.$admin[624].' - '.$admin[249].' - '.$admin[546].' - '.substr($admin[1180], 0, -1).'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse7">
          <div class="card-body w-100 p-2 pb-4 pr-3">'.LineCB(1, $admin[651], 'serviz47', $serviz[47]).'
            '.LineSELECT3(2, $admin[932], 'members14', $members[14]).'
			'.LineCB(2, $admin[1379], 'serviz121', $serviz[121]).'
            '.LineSELECT2(2, $admin[1552], 'serviz171', $serviz[171]).'
			'.LineCB(1, $admin[249], 'serviz62', $serviz[62]).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[546], 'serviz36', $serviz[36]).'</div>
            '.LineSELECT3(2, $admin[932], 'members18', $members[18]).'
            '.LineCB(2, $admin[1062], 'serviz63', $serviz[63]).'
            '.LineTXT(2, $admin[777], 'serviz58', $serviz[58], 40).'
            '.LineTXT(2, $admin[1382], 'serviz168', $serviz[168], 40).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[1179], 'serviz21', $serviz[21]).'</div>
            '.LineSELECT3(2, $admin[932], 'members20', $members[20]).'
			'.LineCB(2, $admin[1180], 'serviz99', $serviz[99]).'
			'.LineSELECT2(2, $admin[1552], 'menuico21', $menuico[21]).'
          </div>
        </div>
      </div>';
// SERVICES Boîte espace membre
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse8">
          '.$admin[217].' => '.$admin[450].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse8">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			<div style="margin-top:6px;">'.LineCB(1, $admin[1455], 'serviz149', $serviz[149]).'</div>
			<div style="margin-top:6px;">'.LineCB(1, $admin[449], 'serviz18', $serviz[18]).'</div>
			<div style="margin-top:2px;">'.LineCB(1, $admin[1461], 'serviz84', $serviz[84]).'</div>
			'.LineTXT(2, $admin[1464], 'serviz85', $serviz[85], 300).'
			<div style="margin-top:6px;">'.LineCB(1, $admin[1465], 'serviz86', $serviz[86]).'</div>
            '.LineSELECT3(2, $admin[932], 'serviz179', $serviz[179]).'
			'.LineCB(2, $admin[690], 'serviz180', $serviz[180]).'
			'.LineCB(1, $admin[1467], 'serviz111', $serviz[111]).'
			'.LineTXT(1, $admin[1488], 'serviz148', $serviz[148], 60).'
			'.LineCB(1, $admin[1532], 'serviz158', $serviz[158]).'
			'.LineCB(1, $admin[1533], 'serviz159', $serviz[159]).'
            '.LineSELECT2(1, $admin[1552], 'serviz172', $serviz[172]).'
            '.LineSELECT2(1, $admin[1335], 'serviz173', $serviz[173]).'
			'.LineTXT(1, $admin[243], 'serviz177', $serviz[177], 80).'
			'.LineSELECT(2, $admin[1335], 'serviz178', $templates, $serviz[178]).'
			'.LineTXT(1, $admin[257], 'siteNTC', $site['NTC'], 40).'
          </div>
        </div>
      </div>';
// SERVICES Divers - Rotation - Nouveautés
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse9">
          '.$admin[217].' => '.str_replace('...', '', $admin[1116]).' - '.$admin[1425].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse9">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			'.LineSELECT(1, $admin[71], 'serviz1', $options1, $serviz[1]).'
			'.LineSELECT(1, $admin[480].$car1, 'texte3', $carspec2, $texte[3]).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[355], 'serviz25', $serviz[25]).'</div>
			'.LineTXT(2, $admin[356], 'serviz26', $serviz[26], 40).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[496], 'serviz108', $serviz[108]).'</div>
			'.LineTXT(2, $admin[497], 'serviz109', $serviz[109], 40).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[1374], 'serviz116', $serviz[116]).'</div>
            '.LineSELECT3(2, $admin[932], 'members22', $members[22]).'
			'.LineCB(2, $admin[1375], 'serviz117', $serviz[117], ' onchange="setnewsdaysweb1(this.form)"').'
			'.LineCB(2, $admin[1376], 'serviz118', $serviz[118], ' onchange="setnewsdaysweb2(this.form)"').'
			'.LineTXT(2, $admin[1377], 'serviz119', $serviz[119], 40).'
			'.LineTXT(2, $admin[1378], 'serviz120', $serviz[120], 40).'
			'.LineCB(2, $admin[1547], 'serviz169', $serviz[169]).'
			<div style="margin-top:8px;">'.LineTXT(1, $admin[1426], 'serviz135', $serviz[135], 40).'</div>
			'.LineSELECT(2, $admin[1427].$admin[5].' :', 'serviz136', $options2, $serviz[136]).'
			'.LineSELECT(2, $admin[1427].$admin[1474].' :', 'serviz154', $options2, $serviz[154]).'
			'.LineSELECT(2, $admin[1427].$admin[13].' :', 'serviz137', $options2, $serviz[137]).'
			'.LineSELECT(2, $admin[1427].$admin[770].' :', 'serviz138', $options2, $serviz[138]).'
			'.LineSELECT(2, $admin[1427].$admin[9].' :', 'serviz139', $options2, $serviz[139]).'
			'.LineSELECT(2, $admin[1427].$admin[206].' :', 'serviz140', $options2, $serviz[140]).'
			'.LineSELECT(2, $admin[1427].$admin[11].' :', 'serviz141', $options2, $serviz[141]).'
			'.LineSELECT(2, $admin[1427].$admin[834], 'serviz142', $options2, $serviz[142]).'
			'.LineSELECT(2, $admin[1427].$admin[18].' :', 'serviz143', $options2, $serviz[143]).'
			'.LineSELECT(2, $admin[1427].$admin[10].' :', 'serviz144', $options2, $serviz[144]).'
			'.LineSELECT(2, $admin[1427].$admin[624].' :', 'serviz145', $options2, $serviz[145]).'
          </div>
        </div>
      </div>';
// SERVICES Nombre d'éléments des listes
echo '  
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse10">
          '.$admin[217].' => '.$admin[239].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse10">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			'.LineTXT(1, $admin[472], 'serviz30', $serviz[30], 60, '', '65%').'
			'.LineTXT(1, $admin[72], 'serviz2', $serviz[2], 60, '', '65%').'
			<div style="margin-top:8px;">'.LineTXT(1, $admin[780], 'serviz55', $serviz[55], 60, '', '65%').'</div>
			'.LineTXT(2, $admin[749], 'serviz61', $serviz[61], 60, '', '65%').'
			<div style="margin-top:8px;">'.LineTXT(1, $admin[73], 'serviz4', $serviz[4], 60, '', '65%').'</div>
			'.LineTXT(2, $admin[1459], 'serviz150', $serviz[150], 60, '', '65%').'
			'.LineTXT(2, $admin[1460], 'serviz151', $serviz[151], 60, '', '65%').'
			'.LineTXT(1, $admin[75], 'serviz5', $serviz[5], 60, '', '65%').'
			'.LineTXT(1, $admin[207], 'serviz6', $serviz[6], 60, '', '65%').'
			'.LineTXT(1, $admin[76], 'serviz7', $serviz[7], 60, '', '65%').'
			<div style="margin-top:8px;">'.LineTXT(1, $admin[164], 'serviz17', $serviz[17], 60, '', '65%').'</div>
			'.LineTXT(2, $admin[98], 'serviz20', $serviz[20], 60, '', '65%').'
			<div style="margin-top:8px;">'.LineTXT(1, $admin[651], 'serviz46', $serviz[46], 60, '', '65%').'</div>
			'.LineTXT(1, $admin[682], 'serviz48', $serviz[48], 60, '', '65%').'
			'.LineTXT(1, $admin[683], 'serviz50', $serviz[50], 60, '', '65%').'
			'.LineTXT(1, $admin[1079], 'serviz75', $serviz[75], 60, '', '65%').'
			'.LineTXT(1, $admin[1309], 'serviz110', $serviz[110], 60, '', '65%').'
          </div>
        </div>
      </div>';
// SERVICES RSS
echo '		  
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse11">
          '.$admin[1304].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse11">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			<div style="margin-top:8px;">'.LineCB(1, $admin[602].' ('.$admin[1676].')', 'serviz27', $serviz[27]).'</div>
			'.LineCB(1, $admin[781], 'serviz54', $serviz[54]).'
			'.LineTXT(2, $admin[781], 'serviz56', $serviz[56], 80).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[795], 'serviz60', $serviz[60]).'</div>
			'.LineTXT(2, $admin[1060], 'serviz82', max(1, $serviz[82]), 80).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[242], 'serviz16', $serviz[16]).'</div>
			'.LineTXT(2, $admin[242], 'serviz37', $serviz[37], 80).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[1305], 'serviz103', $serviz[103]).'</div>
			'.LineSELECT(1, $admin[612], 'serviz39', $options39, $serviz[39]).'
			'.LineTXT(1, $admin[1410], 'serviz133', $serviz[133], 80).'
          </div>
        </div>
      </div>';
// SERVICES SITEMAP
echo '		  
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse12">
          '.$admin[217].' => '.$admin[1412].'
        </a>
        <div class="collapse" data-parent="#accordion" id="collapse12">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			<div style="margin-top:8px;">'.LineCB(1, $admin[1413], 'sitemapSM', $sitemap['SM']).'</div>
			'.LineCB(2, $admin[780], 'sitemapBL', $sitemap['BL']).'
			'.LineCB(2, $admin[5].' :', 'sitemapAR', $sitemap['AR']).'
			'.LineCB(2, $admin[72], 'sitemapNE', $sitemap['NE']).'
			'.LineCB(2, $admin[74], 'sitemapPH', $sitemap['PH']).'
			'.LineCB(2, $admin[73], 'sitemapDN', $sitemap['DN']).'
			'.LineCB(2, $admin[207], 'sitemapFA', $sitemap['FA']).'
			'.LineCB(2, $admin[75], 'sitemapLI', $sitemap['LI']).'
			'.LineCB(2, $admin[76], 'sitemapGB', $sitemap['GB']).'
			'.LineCB(2, $admin[164], 'sitemapFR', $sitemap['FR']).'
			'.LineCB(2, $admin[651], 'sitemapAG', $sitemap['AG']).'
			<div style="margin:8px 16px 0 16px;">'.$admin[1414].'</div>
			<div style="text-align:center;margin:auto;">
              <textarea class="form-control w-80 m-auto" style="height:160px;" name="urlsmap">'.$mapurls.'</textarea>
            </div>
          </div>
        </div>
      </div>';
// CONTRIBUTION VISITEURS & ANTI-SPAM
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse13">'.$admin[600].' & '.$admin[761].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse13">
          <div class="card-body w-100 p-2 pb-4 pr-3">
            <div style="margin:4px auto auto auto; padding:0 0 5px 0;">
              '.LineTXT(1, $admin[1549], 'site10', $site[10], 300).'
              '.LineSELECT(2, $admin[1335], 'site12', $templates, $site[12]).'
            </div>
            <div style="margin:4px auto auto auto; padding:0 0 5px 0;">
              '.LineTXT(1, $admin[762], 'serviz51', $serviz[51], 80).'
              '.LineTXT(1, $admin[763], 'serviz52', $serviz[52], 60).'
            </div>
            <div style="margin:4px auto auto auto; padding:0 0 5px 0;">
              <label style="padding-left:12px;"><b>'.$symbls[1].'</b>&nbsp;&nbsp;'.$admin[1390].'</label><br />
              '.LineTXT(2, $admin[1391].'postguest.php :', 'sitepg', $site['PG'], 200).'
              '.LineTXT(2, $admin[1391].'blogs.php :', 'sitebls', $site['BLS'], 200).'
              '.LineTXT(2, $admin[1391].'blog.php :', 'sitebl', $site['BL'], 200).'
              '.LineTXT(2, $admin[1391].'forum.php :', 'sitefr', $site['FR'], 200).'
              '.LineTXT(2, $admin[1391].'fortopic.php :', 'sitefrt', $site['FRT'], 200).'
              '.LineTXT(2, $admin[1391].'thread.php :', 'siteth', $site['TH'], 200).'
              '.LineTXT(2, $admin[1391].'guestbk.php :', 'sitegb', $site['GB'], 200).'
              '.LineTXT(2, $admin[1391].'news.php :', 'sitene', $site['NE'], 200).'
              '.LineTXT(2, $admin[1391].'user.php :', 'siteusr', $site['USR'], 200).'
              '.LineTXT(2, $admin[1391].'newsletter.php :', 'sitenl', $site['NL'], 200).'
              '.LineTXT(2, $admin[1391].'download.php :', 'sitedn', $site['DN'], 200).'
              '.LineTXT(2, $admin[1391].'contact.php :', 'sitect', $site['CT'], 200).'
            </div>
          </div>
        </div>
      </div>';
// CAPTCHA
$n34 = getLabel($nom[34 + ($lng == $lang[0] ? 0 : 1)]);
if (mb_substr($n34, 0, 1, $charset) == '§') $n34 = mb_substr($n34, 1, 999, $charset);
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse14">'.$admin[1174].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse14">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			'.LineSELECT(1, $admin[1184], 'serviz100', $types_captcha, $serviz[100]).'
			'.LineCB(2, $admin[1373], 'serviz115', $serviz[115]).'
			'.LineCB(1, $n34, 'serviz88', $serviz[88]).'
			'.LineCB(1, getLabel($nom[7 + ($lng == $lang[0] ? 0 : 10)]), 'serviz89', $serviz[89]).'
			'.LineCB(1, getLabel($nom[9 + ($lng == $lang[0] ? 0 : 10)]), 'serviz90', $serviz[90]).'
			'.LineCB(1, getLabel($nom[22 + ($lng == $lang[0] ? 0 : 1)]), 'serviz91', $serviz[91]).'
			'.LineCB(1, mb_substr($admin[472], 0, -1, $charset), 'serviz92', $serviz[92]).'
			'.LineCB(1, $admin[1679], 'serviz93', $serviz[93]).'
			'.LineCB(1, $admin[249], 'serviz94', $serviz[94]).'
			'.LineCB(1, $admin[1175], 'serviz95', $serviz[95]).'        
			'.LineCB(1, getLabel($nom[42 + ($lng == $lang[0] ? 0 : 1)]), 'serviz96', $serviz[96]).'
			'.LineCB(1, $admin[774], 'serviz97', $serviz[97]).'        
			'.LineCB(1, $admin[1176], 'serviz98', $serviz[98]).'        
          </div>
        </div>
      </div>';
// SUPERVISION
$readonly = 'readonly';
$selectdisable = 'disabled';
if (!isset($smtp[6])) 
{
	$smtp[6] = '';
	$smtp[7]  = '';
	
}
if ($smtp[6] != '') $selectdisable = '';							
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse15">'.$admin[229].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse15">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			'.LineTXT(2, $admin[230], 'supervision5', 'phpmailer', 100,'text', '60%', $readonly).'
			<fieldset style="margin:2px 20px;">'.legend('<span  style="font-weight:normal;">'.$admin[1416].'</span>').'
			  '.LineTXT(2, $admin[1417], 'smtp0', $smtp[0], 300).'
			  '.LineCB(2, $admin[1418], 'smtp1', 'on', '','disabled').'
			  '.LineTXT(2, $admin[1419], 'smtp2', $smtp[2], 60).'
			  '.LineTXT(2, $admin[1420], 'smtp3', $smtp[3], 60).'
			  '.LineTXT(2, $admin[1421], 'smtp4', $smtp[4], 300).'
			  '.LineTXT(2, $admin[1422].':', 'smtp5', '', 300, 'password').'
			  '.LineTXT(2, $admin[1680].':', 'smtp5_2', '', 300, 'password').'
			  '.LineCB(2, $admin[1807], 'smtp6', $smtp[6]).'
			  '.LineSELECT(2, $admin[1808], 'smtp7', $optionsdelaiconservationlog, $smtp[7], false, 70, $selectdisable).'		  
<script language="JavaScript">
		 $(\'#smtp6\').on(\'click\', function(){
		if( $(this).is(\':checked\') ){
    		$(\'#smtp7\').attr(\'disabled\', false);
    }else{
    	  $(\'#smtp7\').attr(\'disabled\', true);
    }			});
				</script>				  
			</fieldset>
			<div style="margin-top:8px;">'.LineCB(1, $admin[234], 'supervision0', $supervision[0]).'</div>
			'.LineTXT(2, $admin[1063], 'supervision1', $supervision[1], 60).'
			<div style="margin-top:8px;">'.LineCB(1, $admin[1306], 'supervision11', $supervision[11]).'</div>
			'.LineCB(1, $admin[1307], 'supervision12', $supervision[12]).'
			'.LineCB(1, $admin[473], 'supervision6', $supervision[6]).'
			'.LineCB(1, $admin[235], 'supervision2', $supervision[2]).'
			'.LineCB(1, $admin[786], 'supervision8', $supervision[8]).'
			'.LineCB(1, $admin[1424], 'supervision9', $supervision[9]).'
			'.LineCB(1, $admin[236], 'supervision3', $supervision[3]).'
			'.LineCB(1, $admin[237], 'supervision4', $supervision[4]).'
			'.LineCB(1, $admin[520], 'supervision7', $supervision[7]).'
			<div style="padding-top:12px;">'.LineTXT2($admin[1083], 'supervision10', $supervision[10]).'</div>
          </div>
        </div>
      </div>';
// parefeu
if (!isset($actionwaf)) $actionwaf = '1';
echo '
      <div class="card">
        <a class="card-header collapsed card-link" data-toggle="collapse" href="#collapse16">'.$admin[1875].'</a>
        <div class="collapse" data-parent="#accordion" id="collapse16">
          <div class="card-body w-100 p-2 pb-4 pr-3">
			'.LineSELECT(1, $admin[1876], 'actionwaf', $types_waf, $actionwaf,$wkey=false, $mwidth=180,'disabled').'
          </div>
        </div>
      </div>
	  
      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>
    </div>
  </form>
  <script> document.conf5.serviz31.focus(); </script>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
config6.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config6.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Boxes disposition
 *******************************************************************************
 *   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.19 (August 26, 2024) :Add and delete scondary stylepage, Tohelp
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[5] == '') {
        $nomzone = $admin[346];
        include 'access.inc';
        exit();
    }
}

$widepage = 'on';
$regit    = import('regit');
$xpb      = import('xpb', 'POST', FALSE);
$wpb      = import('wpb', 'POST', FALSE);
$skns     = import('skns', 'POST', FALSE);
$conf     = import('conf');
$nameconf = import('nameconf', 'POST');
$messreg  = '';
$fromconf = import('fromconf', 'POST');

AddFreeBoxes();
AddMenuBoxes();
AddDDMenuBoxes();

$admcookie = isset($_COOKIE[ADMP_COOKIE]) ? $_COOKIE[ADMP_COOKIE] : '00';
$positem   = 0;
for ($i = 0; $i < 9; $i++) {
    $posdata        = $positem + 2;
    $lendata        = intval(substr($admcookie, $positem, 2));
    $adminprefs[$i] = substr($admcookie, $posdata, $lendata);
    $positem        = $posdata + $lendata;
}

$adminprefs[8] = 'web';
$admdata       = '';
for ($i = 0; $i < count($adminprefs); $i++) {
    $strlen   = sprintf("%02d", strlen($adminprefs[$i]));
    $admdata .= $strlen.$adminprefs[$i];
}
setcookie(ADMP_COOKIE, $admdata);

$fileconf = 'confweb';
$meskin   = CHEMIN.'skins/'.$selskin.'/';
unset($xposbox);
if (is_file ($meskin.$fileconf.'.inc')) {
    include $meskin.$fileconf.'.inc';
} else {
    include CHEMIN.'skins/no_skin/'.$fileconf.'.inc';
}

if ($regit == 1) {
	$lst = '';
    foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $key) {
		foreach ($xpb[$conf][BOX_TOP][$key] as $i => $value) {
			if (!empty($value) && empty($wpb[BOX_TOP][$key][$i])) { 
				$lst .= ' - [ '.BOX_TOP.' ] [ '.$key.' ] [ '.$i.' ] => '.getLabelBox($boxes, substr($value, 2)).'\n';
                $xpb[$conf][BOX_TOP][$key][$i] = '';
            }
		}
		foreach ($xpb[$conf][BOX_BOTTOM][$key] as $i => $value) {
			if (!empty($value) && empty($wpb[BOX_BOTTOM][$key][$i])) {
				$lst .= ' - [ '.BOX_BOTTOM.' ] [ '.$key.' ] [ '.$i.' ] => '.getLabelBox($boxes, substr($value, 2)).'\n';
                $xpb[$conf][BOX_BOTTOM][$key][$i] = '';
            }
		}
	}
	if ($lst == '') {
		$messreg = ' : &nbsp;OK';
	} else {
		echo BeginJavascript().'alert("'.addslashes($admin[706]).'\n\n'.$lst.'");'.EndJavascript();
	}

	$xposbox[$conf][BOX_LEFT]  = $xpb[$conf][BOX_LEFT];
	$xposbox[$conf][BOX_RIGHT] = $xpb[$conf][BOX_RIGHT];
	$xposbox[$conf][BOX_ABOVE] = $xpb[$conf][BOX_ABOVE];
	$xposbox[$conf][BOX_UNDER] = $xpb[$conf][BOX_UNDER];
    foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $key) {
		foreach ($xpb[$conf][BOX_TOP][$key] as $i => $value) {
			$args  = '';
			if (!empty($value)) {
				$wb   = intval($wpb[BOX_TOP][$key][$i]);
				$pos  = strrpos($value, CONNECTOR, 2);
				$args = $wb == 0 ? '' : ($pos == 0 ? CONNECTOR : '').'W'.$wb;
			}
			$xpb[$conf][BOX_TOP][$key][$i] = $value.$args;
		}
		foreach ($xpb[$conf][BOX_BOTTOM][$key] as $i => $value) {
			$args  = '';
			if (!empty($value)) {
				$wb   = intval($wpb[BOX_BOTTOM][$key][$i]);
				$pos  = strrpos($value, CONNECTOR, 2);
				$args = $wb == 0 ? '' : ($pos == 0 ? CONNECTOR : '').'W'.$wb;
			}
			$xpb[$conf][BOX_BOTTOM][$key][$i] = $value.$args;
		}
		$xposbox[$conf][BOX_TOP][$key]    = $xpb[$conf][BOX_TOP][$key];
		$xposbox[$conf][BOX_BOTTOM][$key] = $xpb[$conf][BOX_BOTTOM][$key];
	}
	unset($xpb, $wpb);

	include 'inc/'.$fileconf.'.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config6&conf='.$conf.'";'.EndJavascript();
    }
}
elseif ($regit == 2) { // copie config dans les autres skins
	if (!empty($skns)) {
		foreach ($skns as $skin) {
            $src  = CHEMIN.'skins/'.$selskin.'/'.$fileconf.'.inc';
            $dest = CHEMIN.'skins/'.$skin.'/'.$fileconf.'.inc';
            copy($src, $dest);
		}
		unset($skns);
	}
} 
elseif ($regit == 3) { // ajout config secondaire
	if (!empty($nameconf) && preg_match('`^\w{4,24}$`', $nameconf)) {	
		$meskin = CHEMIN.'skins/'.$selskin.'/';
        $templates[] = $nameconf;
        foreach (array('confweb') as $conffile) {
            if (is_file ($meskin.$conffile.'.inc')) {
                include $meskin.$conffile.'.inc';
            } else {
                $fromconf = '';
                include CHEMIN.'skins/no_skin/'.$conffile.'.inc';
            }
			$nbrtemplateabsent = 0;
			for ($ij=0; $ij < count($templates); $ij++)
			{
				if (!isset($templates[$ij])) 
					$nbrtemplateabsent++;
			}
            foreach ($templates as $key=>$tmpl)
			{
				//   file_put_contents(($nomficlog, ' template key: '.$key.' '."\n", FILE_APPEND | LOCK_EX);
				$conf = $key;
				//   file_put_contents(($nomficlog, ' template conf: '.$conf.' '."\n", FILE_APPEND | LOCK_EX);
			}
            foreach (array(BOX_LEFT, BOX_RIGHT, BOX_ABOVE, BOX_UNDER) as $subarray) {
                $xposbox[$conf][$subarray][0] = '';
            }
            if ($fromconf != '') {
                $n = count($xposbox[$fromconf][BOX_TOP][BOX_LEFT]) - 1;
                for ($i = 0; $i < count($xposbox[$fromconf][BOX_TOP][BOX_LEFT]) - 1; $i++) {
                    foreach (array(BOX_TOP, BOX_BOTTOM) as $array) {
                        foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $key) {
                            $xposbox[$conf][$array][$key][$i] = @$xposbox[$fromconf][$array][$key][$i];
                        }
                    }
                }
            }
            else {
                foreach (array(BOX_TOP, BOX_BOTTOM) as $array) {
                    foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $subarray) {
                        $xposbox[$conf][$array][$subarray][0] = '';
                    }
                }
            }
            include 'inc/'.$conffile.'.inc';
            if ($site[7] == 'on' || PHP700) {
                @ob_flush();
                sleep(PHP700 ? 3 : $site[8]);
                echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config6&conf='.$conf.'";'.EndJavascript();
            }
        }																							 
        for ($i = 1; $i < count($templates)+$nbrtemplateabsent; $i++) {
            if (!is_file($meskin.'stylepage'.$i.'.css')) {
                $csstitle = '/* ----  CSS to customize '.$page[14].' for secondary page '.$templates[$i].' ---- */';
                $cssbody  = chr(10).chr(10).chr(10).'
/* ---- set the mobile customizations for the page '.$templates[$i].', between the { } ---- */';
                $cssbody .= '
@media screen and (max-width: 760px), screen and (max-device-width: 760px) {
    
}';
                WriteFullDB($meskin.'stylepage'.$i.'.css', $csstitle.$cssbody);
            }
        }
	} else {
		echo BeginJavascript().'alert("'.addslashes($admin[1337]).'");'.EndJavascript();
	}
}
elseif ($regit == 4) { // modification/suppression config secondaire
    $meskin = CHEMIN.'skins/'.$selskin.'/';
    foreach (array('confweb') as $conffile) {
        if (!empty($nameconf)) {
            if (is_file ($meskin.$conffile.'.inc')) {
                include $meskin.$conffile.'.inc';
            } else {
                include CHEMIN.'skins/no_skin/'.$conffile.'.inc';
            }
            if (preg_match('`^\w{4,24}$`', $nameconf)) {
                foreach($templates as $key=>$value)
                    if ($conf == $key) {
                        $templates[$conf] = $nameconf;
                        break;
                    }
                include 'inc/'.$conffile.'.inc';
            }
        } else {
            if (is_file ($meskin.$conffile.'.inc')) {
                include $meskin.$conffile.'.inc';
            } else {
                include CHEMIN.'skins/no_skin/'.$conffile.'.inc';
            }
            foreach($templates as $key=>$value)
                if ($conf == $key && $key != 0) {
                    unset($templates[$conf]);
                    unset($xposbox[$conf]);
                    @unlink($meskin.'stylepage'.$conf.'.css');
                    break;
                }
            include 'inc/'.$conffile.'.inc';
        }
    }
}

include CONFIG;
$conf = !isset($templates[$conf]) ? 0 : $conf;

TestPosBoxes($xposbox[$conf][BOX_LEFT], 10, 2);
TestPosBoxes($xposbox[$conf][BOX_RIGHT], 10, 2);
TestSizeBoxes($xposbox[$conf][BOX_LEFT], $xposbox[$conf][BOX_RIGHT]);

TestPosBoxes($xposbox[$conf][BOX_TOP][BOX_LSIDE], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_TOP][BOX_LEFT], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_TOP][BOX_CENTER], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_TOP][BOX_RIGHT], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_TOP][BOX_RSIDE], 2, 1);
TestSizeBoxes($xposbox[$conf][BOX_TOP][BOX_LSIDE], $xposbox[$conf][BOX_TOP][BOX_LEFT], $xposbox[$conf][BOX_TOP][BOX_CENTER], $xposbox[$conf][BOX_TOP][BOX_RIGHT], $xposbox[$conf][BOX_TOP][BOX_RSIDE]);

TestPosBoxes($xposbox[$conf][BOX_ABOVE], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_UNDER], 2, 1);

TestPosBoxes($xposbox[$conf][BOX_BOTTOM][BOX_LSIDE], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_BOTTOM][BOX_LEFT], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_BOTTOM][BOX_CENTER], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_BOTTOM][BOX_RIGHT], 2, 1);
TestPosBoxes($xposbox[$conf][BOX_BOTTOM][BOX_RSIDE], 2, 1);
TestSizeBoxes($xposbox[$conf][BOX_BOTTOM][BOX_LSIDE], $xposbox[$conf][BOX_BOTTOM][BOX_LEFT], $xposbox[$conf][BOX_BOTTOM][BOX_CENTER], $xposbox[$conf][BOX_BOTTOM][BOX_RIGHT], $xposbox[$conf][BOX_BOTTOM][BOX_RSIDE]);

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[350]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[350], '100%');

include 'plugins/plugbox.inc';

$skn   = isset($selskin) ? '&amp;selskin='.$selskin : 'no_skin';
$skins = ExploreDir('skins/');

echo '
<div class="text-center">'.ToHelp($lng, '&pg=968&mnuid=937&tconfig=0#z2').'<p>'.$admin[351].'</p>';

echo '
  <hr />
  <div class="table-responsive-md">
  <table class="table text-left w-100">
    <tr>
      <td class="forum w-50 m-auto align-top text-left" style="padding:5px 20px;">
	    '.$admin[725].' : <strong>'.$userprefs[10].$messreg.'</strong>
		<div style="text-align:center;margin-top:12px;">
          <form name="selconf" action="admin.php?lng='.$lng.'&amp;pg=config6" method="post">
            <input type="hidden" name="selskin" value="'.$selskin.'" />
		    <div class="d-inline-block">'.$admin[1335].'</div>
	        <div class="d-inline-block">
              <select class="form-control" name="conf" style="width:140px;" onchange="javascript:selconf.submit();">';

foreach ($templates as $key=>$tmpl) {
	echo '
		        <option value="'.$key.'"'.Selected($conf == $key).'>'.$key.' - '.$tmpl.'</option>>';
}

echo '
		      </select>
            </div>
          </form>
		</div>
		<div id="modbutton" class="text-center w-100 m-auto">
		  '.SubmitButton($admin[144].'/'.$admin[186], 'cache(\'modbutton\'); montre(\'modtname\',\'block\');').'
	    </div>
		<div id="modtname" class="quest text-center w-100 m-auto" 
          style="display:none; max-width:250px;height:auto;z-index:15;border:1px solid;border-radius:8px;">
		  <form name="modconf" action="admin.php?lng='.$lng.'&amp;pg=config6" method="post">
			<input type="hidden" name="regit" value="4" />
			<input type="hidden" name="conf" value="'.$conf.'" />
			<div>'.$admin[144].' : <input class="form-control" type="text" name="nameconf" value="'.$templates[$conf].'" /><br />'.$help[15].'</div>
			<div style="text-align:center;margin-top:4px;">'.SubmitButton($admin[38]).'</div>
			<div style="float:right;margin:-12px 4px 0 0;">
			  <i class="far fa-caret-square-up" title="'.$admin[458].'" onmouseup="cache(\'modtname\'); montre(\'modbutton\');"></i>
			</div>
			<div class="clearfix"></div>
		  </form>
		</div>
		<hr />
		<div style="text-align:center;margin-top:12px;">
          <form name="addconf" action="admin.php?lng='.$lng.'&amp;pg=config6" method="post">
            <input type="hidden" name="regit" value="3" />
            <input type="hidden" name="selskin" value="'.$selskin.'" />
			<div>
              <div class="d-inline-block">'.$admin[1336].'</div>
              <div class="d-inline-block"><input name="nameconf" class="form-control texte" type="text" /></div>
            </div>
            <div>
              <div class="d-inline-block">'.$admin[1540].'</div>
              <div class="d-inline-block">
                <select class="form-control" name="fromconf" style="width:140px;">
		          <option value="">'.$admin[875].'</option>>';
foreach ($templates as $key=>$tmpl) {
	echo '
		          <option value="'.$key.'">'.$key.' - '.$tmpl.'</option>>';
}

echo '
		        </select>
              </div>
            </div>
		    '.SubmitButton($admin[38]).'
          </form>
		</div>
	  </td>
      <td class="forum" style="text-align:center;vertical-align:top;">
	    '.$admin[707].'
        <form name="selskns" action="admin.php?lng='.$lng.'&amp;pg=config6" method="post">
          <input type="hidden" name="regit" value="2" />
          <input type="hidden" name="selskin" value="'.$selskin.'" />
	      <select class="form-control mx-auto mt-3 w-100" style="max-width:200px;" name="skns[]" size="10" multiple="multiple">';

foreach ($skins as $skn)
	if ($skn != $selskin) echo '
			<option value="'.$skn.'">'.$skn.'</option>>';

echo '
		  </select>
		  '.SubmitButton($admin[708]).'
        </form>
	  </td>
	</tr>
  </table>
  </div>
  <div style="width:100%;margin-left:auto;margin-right:auto;text-align:center">
    <form name="conf6" action="admin.php?lng='.$lng.'&amp;pg=config6" method="post">
      <div class="row quest p-0 mb-2 w-98 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>
      <input type="hidden" name="regit" value="1" />
      <input type="hidden" name="conf" value="'.$conf.'" />
      <input type="hidden" name="selskin" value="'.$selskin.'" />';

echo '
      <fieldset style="margin: 4px 0;">'.legend($admin[1073]).'
        <div class="table-responsive-md">
        <table class="table text-center w-100 m-0">
          <tr>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_LSIDE.']', $xposbox[$conf][BOX_TOP][BOX_LSIDE], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_LSIDE.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_LSIDE.']', $xposbox[$conf][BOX_TOP][BOX_LSIDE], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_LSIDE.']', $wposbox[$conf][BOX_TOP][BOX_LSIDE]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_LEFT.']', $xposbox[$conf][BOX_TOP][BOX_LEFT], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_LEFT.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_LEFT.']', $xposbox[$conf][BOX_TOP][BOX_LEFT], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_LEFT.']', $wposbox[$conf][BOX_TOP][BOX_LEFT]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_CENTER.']', $xposbox[$conf][BOX_TOP][BOX_CENTER], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_CENTER.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_CENTER.']', $xposbox[$conf][BOX_TOP][BOX_CENTER], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_CENTER.']', $wposbox[$conf][BOX_TOP][BOX_CENTER]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_RIGHT.']', $xposbox[$conf][BOX_TOP][BOX_RIGHT], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_RIGHT.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_RIGHT.']', $xposbox[$conf][BOX_TOP][BOX_RIGHT], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_RIGHT.']', $wposbox[$conf][BOX_TOP][BOX_RIGHT]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_RSIDE.']', $xposbox[$conf][BOX_TOP][BOX_RSIDE], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_RSIDE.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_TOP.']['.BOX_RSIDE.']', $xposbox[$conf][BOX_TOP][BOX_RSIDE], SelectBoxes($boxes, BOX_TOP), true, true, 'wpb['.BOX_TOP.']['.BOX_RSIDE.']', $wposbox[$conf][BOX_TOP][BOX_RSIDE]);
echo '
            </td>
          </tr>
        </table>
        </div>
      </fieldset>

      <div class="table-responsive-md">
      <table class="table text-center w-100 border-0">
        <tr>
          <td style="vertical-align:top;width:30%;">
            <fieldset>'.legend($admin[337]);
WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_LEFT.']', $xposbox[$conf][BOX_LEFT], SelectBoxes($boxes, BOX_LEFT), true, true);
echo '
            </fieldset>
          </td>
          <td style="vertical-align:top;width:40%;">
            <fieldset>'.legend($admin[1075], '10px');
WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_ABOVE.']', $xposbox[$conf][BOX_ABOVE], SelectBoxes($boxes, BOX_ABOVE), true, true);

echo '
            </fieldset>
            <p class="quest" style="text-align:center;line-height:75px;margin:50px 0;font-weight:bold;font-size:1.5em;">'.$admin[878].'</p>
            <fieldset>'.legend($admin[1076], '10px');
WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_UNDER.']', $xposbox[$conf][BOX_UNDER], SelectBoxes($boxes, BOX_UNDER), true, true);
echo '
            </fieldset>
          </td>
          <td style="vertical-align:top;width:30%;">
            <fieldset>'.legend($admin[338]);
WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_RIGHT.']', $xposbox[$conf][BOX_RIGHT], SelectBoxes($boxes, BOX_RIGHT), true, true);
echo '
            </fieldset>
          </td>
        </tr>
      </table>
      </div>
      <fieldset style="margin: 4px 0;">'.legend($admin[1074]).'
        <div class="table-responsive-md">
        <table class="table text-center w-100 m-0">
          <tr>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_LSIDE.']', $xposbox[$conf][BOX_BOTTOM][BOX_LSIDE], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_LSIDE.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_LSIDE.']', $xposbox[$conf][BOX_BOTTOM][BOX_LSIDE], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_LSIDE.']', $wposbox[$conf][BOX_BOTTOM][BOX_LSIDE]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_LEFT.']', $xposbox[$conf][BOX_BOTTOM][BOX_LEFT], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_LEFT.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_LEFT.']', $xposbox[$conf][BOX_BOTTOM][BOX_LEFT], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_LEFT.']', $wposbox[$conf][BOX_BOTTOM][BOX_LEFT]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_CENTER.']', $xposbox[$conf][BOX_BOTTOM][BOX_CENTER], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_CENTER.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_CENTER.']', $xposbox[$conf][BOX_BOTTOM][BOX_CENTER], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_CENTER.']', $wposbox[$conf][BOX_BOTTOM][BOX_CENTER]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_RIGHT.']', $xposbox[$conf][BOX_BOTTOM][BOX_RIGHT], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_RIGHT.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_RIGHT.']', $xposbox[$conf][BOX_BOTTOM][BOX_RIGHT], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_RIGHT.']', $wposbox[$conf][BOX_BOTTOM][BOX_RIGHT]);
echo '
            </td>
            <td style="padding: 0px;">';
if (empty($wposbox[$conf]))
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_RSIDE.']', $xposbox[$conf][BOX_BOTTOM][BOX_RSIDE], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_RSIDE.']');
else
	WriteColumnSelectBoxes('xpb['.$conf.']['.BOX_BOTTOM.']['.BOX_RSIDE.']', $xposbox[$conf][BOX_BOTTOM][BOX_RSIDE], SelectBoxes($boxes, BOX_BOTTOM), true, true, 'wpb['.BOX_BOTTOM.']['.BOX_RSIDE.']', $wposbox[$conf][BOX_BOTTOM][BOX_RSIDE]);
echo '
            </td>
          </tr>
        </table>
        </div>
      </fieldset>
';

echo '
      <div class="row quest p-0 mt-2 w-98 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      </div>
    </form>
  </div>
</div>';

btable();
include CHEMIN."admin/bpage.inc";
?>
config8.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config8.inc'
View Content
<?php
/*******************************************************************************
 *   Admin CSS Generator
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 15, 2023) : Correction secondary page, Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[43] == "") {
        $nomzone = $admin[719];
        include 'access.inc';
        exit();
    }
}

$regit      = import('regit');
$corit      = import('corit');
$mycss      = import('mycss');
$cssval     = import('cssval');
$bs4cssval  = import('bs4cssval');
$mobcssval  = import('mobcssval');
$pluscssval = import('pluscssval');
$fontcssval = import('fontcssval');
$selskin    = import('selskin');
$active     = 1;

if ($corit == 1) {
    $mobcssval = str_replace('\'', '"', $mobcssval);
    $mobcssval = trim(stripslashes($mobcssval));
    WriteFullDB(CHEMIN.'skins/'.$mycss.'/mobstyle.css', $mobcssval);
    $cor_mobcss = 'ok';
	$active     = 1;
}

if ($corit == 2) {
    $pluscssval = str_replace('\'', '"', $pluscssval);
    $pluscssval = trim(stripslashes($pluscssval));
    WriteFullDB(CHEMIN.'skins/'.$mycss.'/styleplus.css', $pluscssval);
    $cor_cssplus = 'ok';
	$active      = 2;
}
$nbrekeypastrouve = 0;
$nbrekeytrouve = 0;
for ($i = 1; $i <= count($templates); $i++) {

	if (!isset($templates[$i]))
	{
		$nbrekeypastrouve ++;
	}
}
$nbrekeylast = array_key_last($templates);
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d_H');
$nomficlog = CHEMIN.'data/log/debugconfig6'.'_'.$dateheureminiutesecl.'.log';
for ($i = 1; $i <= $nbrekeylast+$nbrekeypastrouve; $i++) {
    if ($corit == (2 + $i)) {
        $cssvalpage = import('cssvalpage'.$i);
        $cssvalpage = str_replace('\'', '"', $cssvalpage);
        $cssvalpage = trim(stripslashes($cssvalpage));
//   file_put_contents(($nomficlog, ' Config8 write css: '.$cssvalpage."\n", FILE_APPEND | LOCK_EX);
        WriteFullDB(CHEMIN.'skins/'.$mycss.'/stylepage'.$i.'.css', $cssvalpage);
        $active = 2 + $i;
    }
}

if ($corit == count($templates) + 2) {
    $fontcssval = str_replace('\'', '"', $fontcssval);
    $fontcssval = trim(stripslashes($fontcssval));
    WriteFullDB(CHEMIN.'skins/'.$mycss.'/font/fontstyle.css', $fontcssval);
    $cor_cssfont = 'ok';
	$active      = count($templates) + 2;
}

if (!FileDBExist($meskin."styleplus.css")) {
    $pluscssval = '/*  ---------  CSS to customize '.$selskin.'  ----------- */';
    WriteFullDB($meskin.'styleplus.css', $pluscssval);
}
for ($i = 1; $i <= $nbrekeylast+$nbrekeypastrouve; $i++) {
	if (isset($templates[$i]))
	{
		if (!is_file($meskin.'stylepage'.$i.'.css')) {
			$csstitle = '/*  ---------  CSS to customize secondary page '.$templates[$i].'  ----------- */';
			WriteFullDB($meskin.'stylepage'.$i.'.css', $csstitle);
		}
	}
}

$headinc .= '
<script>
$(document).ready( function() {
    $("#gyaccordion").hoverAccordion({
        keepHeight: false,
        activateItem: '.$active.',
        onClickOnly: true,
        speed: 400
    });
    $("#gyaccordion").children("li:first").addClass("firstitem");
    $("#gyaccordion").children("li:last").addClass("lastitem");
});
</script>
<link rel="stylesheet" href="inc/codemirror/codemirror.css">
<link rel="stylesheet" href="inc/codemirror/simplescrollbars.css">
<script src="inc/codemirror/codemirror.js"></script>
<script src="inc/codemirror/css.js"></script>
<script src="inc/codemirror/simplescrollbars.js"></script>
';
$headinc .= "
<style>
#gyaccordion {
    width: auto;
    height: auto;
    list-style-type: none;
    background-color: inherit;
    color: inherit;
}
#gyaccordion a {
    display: block;
    font-weight: bold;
    text-decoration: none;
}
#gyaccordion ul {
    overflow: hidden;
    margin: 0;
    padding: 0;
}
#gyaccordion li {
    margin: auto;
    list-style-type: none;
    height:auto;
}
#gyaccordion li a {
    width: auto;
    height: auto;
    padding: 8px;
    display: block;
    color: #FFFFFF;
}
#gyaccordion li a.closed {
    color: #000000 !important;
    background-color: #DCD9E0;
    border: 1px solid #67890B;
	border-radius: 4px;
    margin: 4px 0;
}
#gyaccordion li.firstitem a.closed {
    color: #000000 !important;
    background-color: #DCD9E0;
    border: 1px solid #67890B;
	border-radius: 4px;
}
#gyaccordion li.lastitem a.closed {
    color: #000000 !important;
    background-color: #DCD9E0;
    border: 1px solid #67890B;
	border-radius: 4px;
}
#gyaccordion li li {
    width: auto;
    height: auto;
    margin: auto;
    line-height: 28px;
    border: 1px solid #67890B;
}
#gyaccordion li a.opened {
    color: #FFFFFF;
    font-weight: bold;
    background-color: #7F7F7F;
    border: 1px solid #67890B;
	border-radius: 4px;
    margin: 4px 0;
}
#gyaccordion li.firstitem a.opened {
    color: #FFFFFF;
    font-weight: bold;
    background-color: #7F7F7F;
    border: 1px solid #67890B;
	border-radius: 4px;
    margin: 4px 0;
}
#gyaccordion li.lastitem li {
    margin: 4px 0 12px 0;
}
#gyaccordion li.lastitem ul {
    padding-bottom: 4px;
    margin: 0;
}
</style>
<script>
(function($) {
    $.fn.hoverAccordion = function(options) {
        options = jQuery.extend({
            speed : 'fast',
            activateItem : true,
            keepHeight : false,
            onClickOnly : false,
            classActive : 'active',
            classHeader : 'header',
            classHover : 'hover',
            classOpen : 'opened',
            classClosed : 'closed'
        }, options);
        var container = this;
        var pageHref = window.location.href;
        var i = 0;
        function doHover(itemList, itemHeader, listHeight) {
            var oldList = $(container).find('.' + options.classOpen).closest(
            'li').find('ul:first');
            if (false === oldList.is(':animated')) {
                if (options.keepHeight == true) {
                    listHeight = maxHeight;
                }
                if (itemHeader.hasClass(options.classOpen) == false) {
                    itemList.children().show();
                    itemList.animate({
                        height : listHeight
                    }, {
                        step : function(n, fx) {
                            itemList.height(listHeight - n);
                        },
                        duration : options.speed
                    });
                    oldList.animate({
                        height : 0
                    }, {
                        step : function(n, fx) {
                            itemList.height(listHeight - n);
                        },
                        duration : options.speed
                    }).children().hide();
                    itemHeader.addClass(options.classOpen).removeClass(
                    options.classClosed);
                    oldList.closest('li').removeClass(options.classActive)
                    .find('a:first').addClass(options.classClosed).removeClass(
                    options.classOpen);
                }
            }
        }
        var itemNo = 0;
        var maxHeight = 0;
        $(this)
        .children('li')
        .each(
        function() {
            var item = $(this);
            var isActive = false;
            itemNo++;
            var itemHeader = item.find('a:first').addClass(options.classHeader);
            if (itemHeader.length > 0) {
                itemHeader.hover(function() {
                    itemHeader.addClass(options.classHover);
                }, function() {
                    itemHeader.removeClass(options.classHover);
                });
                var itemHref = itemHeader.attr('href');
                if (itemHref == '#') {
                    itemHeader.click(function() {
                        this.blur();
                        return false;
                    });
                } else if (options.activateItem == true
                && pageHref.indexOf(itemHref) > 0
                && pageHref.length - pageHref.lastIndexOf(itemHref) == itemHref.length) {
                    isActive = true;
                    item.addClass(options.classActive);
                    itemHeader.removeClass(options.classClosed).addClass(
                    options.classOpen);
                }
            }
            var itemList = item.find('ul:first');
            if (itemList.length > 0) {
                var listHeight = itemList.height();
                if (maxHeight < listHeight)
                    maxHeight = listHeight;
                if (options.onClickOnly == true) {
                    itemHeader.click(function() {
                        doHover(itemList, itemHeader, listHeight);
                    });
                } else {
                    itemHeader.hover(function() {
                        i = setInterval(function() {
                            doHover(itemList, itemHeader, listHeight);
                            clearInterval(i);
                        }, 400);
                    }, function() {
                        clearInterval(i);
                    });
                }
                if (options.activateItem === true) {
                    itemList
                    .children('li')
                    .each(
                    function() {
                        var m = $(this).find('a').attr('href');
                        if (m) {
                            if (pageHref.indexOf(m) > 0
                            && pageHref.length - pageHref.lastIndexOf(m) == m.length) {
                                isActive = true;
                                item.addClass(options.classActive);
                                itemHeader.removeClass(options.classClosed)
                                .addClass(options.classOpen);
                            }
                        }
                    });
                } else if (parseInt(options.activateItem, 10) == itemNo) {
                    isActive = true;
                    item.addClass(options.classActive);
                    itemHeader.removeClass(options.classClosed).addClass(
                    options.classOpen);
                }
            }
            if (!isActive) {
                itemHeader.removeClass(options.classOpen);
                if (itemList.length > 0) {
                    itemList.children().hide();
                    itemHeader.addClass(options.classClosed);
                }
            }
        });
        return this;
    };
})(jQuery);
</script>
";

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[720]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[720].' => '.$selskin, '100%');

echo '
<div style="width:98%; margin:auto; text-align:center;">'.ToHelp($lng, '&pg=974&mnuid=937&tconfig=0#z2');

if (isset($selskin)) $skn = '&amp;selskin='.$selskin;
echo '
  <p>&nbsp;</p>
  <p class="notice">'.$admin[887].'</p>';
if (isset($put_css)) {
	echo '
  <br /><span class="quest">'.$admin[721].' <b>&nbsp;'.$mycss.'</b></span><br />';
}
$meskin = CHEMIN."skins/".$selskin."/";

echo '
  <ul id="gyaccordion" style="max-width:1240px; margin:auto;">';

if (FileDBExist($meskin."mobstyle.css")) {
	if (isset($cor_mobcss)) {
		$titre = $admin[728].'(RD mobile)';
	}
	else {
		$titre = $admin[144]." ".$admin[729].'(RD mobile)';
	}
	echo '
    <a id="topmobstyle"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=config8#topmobstyle" method="post">';
	if ($selskin != 'no_skin')
		echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		    <input type="hidden" name="corit" value="1" />
		    <input type="hidden" name="selskin" value="'.$selskin.'" />
		    <input type="hidden" name="mycss" value="'.$selskin.'" />
		    <div style="margin:auto;text-align:left;">
			  <textarea name="mobcssval" id="mobcssval" rows="32" style="width:100%;">';
	$cssfile = fopen($meskin."mobstyle.css", "r");
	while (!feof($cssfile)) {
		$cssline = fgets($cssfile, 255);
		echo $cssline;
	}
	fclose($cssfile);
	echo '
			  </textarea>
		    </div>';
	if ($selskin != 'no_skin')
		echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		  </form>
          <script>
            var editor = CodeMirror.fromTextArea(document.getElementById("mobcssval"), {        
              lineNumbers: true,
              scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}

if (FileDBExist($meskin."styleplus.css")) {
	if (isset($cor_cssplus)) {
		$titre = $admin[728].'(styleplus)';
	}
	else {
		$titre = $admin[144]." ".$admin[1500].'(styleplus)';
	}
	echo '
    <a id="topstyleplus"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modcssplus" action="admin.php?lng='.$lng.'&amp;pg=config8#topstyleplus" method="post">';
	if ($selskin != 'no_skin')
		echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
			<input type="hidden" name="corit" value="2" />
			<input type="hidden" name="selskin" value="'.$selskin.'" />
			<input type="hidden" name="mycss" value="'.$selskin.'" />
			<div style="margin:auto;text-align:left;">
			  <textarea name="pluscssval" id="pluscssval" rows="32" style="width:100%;">';
	$cssfile = fopen($meskin."styleplus.css", "r");
	while (!feof($cssfile)) {
		$cssline = fgets($cssfile, 255);
		echo $cssline;
	}
	fclose($cssfile);
	echo '
			  </textarea>
			</div>';
	if ($selskin != 'no_skin')
		echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		  </form>
          <script>
            var editor = CodeMirror.fromTextArea(document.getElementById("pluscssval"), {        
              lineNumbers: true,
              scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}
$nbrekeypastrouve = 0;
$nbrekeytrouve = 0;
for ($i = 1; $i <= count($templates); $i++) {

    if (!isset($templates[$i]))
	{
		$nbrekeypastrouve ++;					  
	}
	else
		$nbrekeytrouve++;				   

}
$nbrekeylast = array_key_last($templates);
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d_H');
$nomficlog = CHEMIN.'data/log/debugconfig6'.'_'.$dateheureminiutesecl.'.log';
//   file_put_contents(($nomficlog, ' Config2 nbrekeypastrouve: '.$nbrekeypastrouve."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' Config2 nbrekeytrouve: '.$nbrekeytrouve."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' Config2 keylast: '.$nbrekeylast."\n", FILE_APPEND | LOCK_EX);
//   file_put_contents(($nomficlog, ' Config2 count: '.count($templates)."\n", FILE_APPEND | LOCK_EX);
for ($i = 1; $i <= $nbrekeylast+$nbrekeypastrouve; $i++) {
	if (isset($templates[$i]))
	{
		if (FileDBExist($meskin.'stylepage'.$i.'.css')) {
			$titre = $admin[144]." ".$admin[1500].'(stylepage'.$i.')';
			echo '
		<a name="toppage'.$i.'"></a>
		<li>
		  <a href="#">'.$titre.'</a>
		  <ul>
			<li>
			  <form name="modcsspage'.$i.'" action="admin.php?lng='.$lng.'&amp;pg=config8#toppage'.$i.'" method="post">';
			if ($selskin != 'no_skin')
				echo '
				<div class="quest" style="margin:0 8px;padding:2px 20px;">
				  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
				  <div style="clear:both"></div>
				</div>';
			echo '
				<input type="hidden" name="corit" value="'.(2 + $i).'" />
				<input type="hidden" name="selskin" value="'.$selskin.'" />
				<input type="hidden" name="mycss" value="'.$selskin.'" />
				<div style="margin:auto;text-align:left;">
				  <textarea name="cssvalpage'.$i.'" id="cssvalpage'.$i.'" rows="32" style="width:100%;">';
			$cssfile = fopen($meskin.'stylepage'.$i.'.css', 'r');
			while (!feof($cssfile)) {
				$cssline = fgets($cssfile, 255);
				echo $cssline;
			}
			fclose($cssfile);
			echo '
				  </textarea>
				</div>';
			if ($selskin != 'no_skin')
				echo '
				<div class="quest" style="margin:0 8px;padding:2px 20px;">
				  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
				  <div style="clear:both"></div>
				</div>';
			echo '
			  </form>
			  <script>
				var editor = CodeMirror.fromTextArea(document.getElementById("cssvalpage'.$i.'"), {        
				  lineNumbers: true,
				  scrollbarStyle: "native"
				});
			  </script>
			</li>
		  </ul>
		</li>';
		}
	}
}

if (FileDBExist($meskin."font/fontstyle.css")) {
	if (isset($cor_cssfont)) {
		$titre = $admin[728].'(fontstyle)';
	}
	else {
		$titre = $admin[144].' '.$admin[1535].'(fontstyle)';
	}
	echo '
    <a id="topfontstyle"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modcssfont" action="admin.php?lng='.$lng.'&amp;pg=config8#topfontstyle" method="post">';
	if ($selskin != 'no_skin')
		echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
			<input type="hidden" name="corit" value="'.(count($templates) + 2).'" />
			<input type="hidden" name="selskin" value="'.$selskin.'" />
			<input type="hidden" name="mycss" value="'.$selskin.'" />
			<div style="margin:auto;text-align:left;">
			  <textarea name="fontcssval" id="fontcssval" rows="32" style="width:100%;">';
	$cssfile = fopen($meskin."font/fontstyle.css", "r");
	while (!feof($cssfile)) {
		$cssline = fgets($cssfile, 255);
		echo $cssline;
	}
	fclose($cssfile);
	echo '
			  </textarea>
			</div>';
	if ($selskin != 'no_skin')
		echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[422], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		  </form>
          <script>
            var editor = CodeMirror.fromTextArea(document.getElementById("fontcssval"), {        
              lineNumbers: true,
              scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}

if (FileDBExist($meskin."style.css")) {
	echo '
    <li>
      <a href="#">'.$admin[729].'</a>
      <ul>
	    <li>
		  <div style="margin:auto;text-align:left;">
			<textarea name="cssval" id="cssval" rows="32" style="width:100%;text-align:left;">';/*720px*/
	$cssfile = fopen($meskin."style.css", "r");
	while (!feof($cssfile)) {
		$cssline = fgets($cssfile, 255);
		echo $cssline;
	}
	fclose($cssfile);
	echo '
			</textarea>
		  </div>
          <script>
            var editor = CodeMirror.fromTextArea(document.getElementById("cssval"), {        
              lineNumbers: true,
              scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}

if (FileDBExist($meskin."bs4style.css")) {
	echo '
    <a name="topbs4style"></a>
    <li>
      <a href="#">'.$admin[729].'(Bootstrap 4)</a>
      <ul>
	    <li>
		  <div style="margin:auto;text-align:left;">
			<textarea name="bs4cssval" id="bs4cssval" rows="32" style="width:100%;">';
	$cssfile = fopen($meskin."bs4style.css", "r");
	while (!feof($cssfile)) {
		$cssline = fgets($cssfile, 255);
		echo $cssline;
	}
	fclose($cssfile);
	echo '
			</textarea>
		  </div>
          <script>
            var editor = CodeMirror.fromTextArea(document.getElementById("bs4cssval"), {        
              lineNumbers: true,
              scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}

echo '
  </ul>';

if (isset($selskin)) $skn = "&amp;selskin=".$selskin;
echo '
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
config9.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/config9.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Configuration
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[1] == '') {
        $nomzone = $admin[888];
        include 'access.inc';
        exit();
    }
}

$regit    = import('regit');
$page9    = import('page9');
$page14   = import('page14');
$page23   = import('page23');
$daterota = import('daterota');
$skinrota = import('skinrota');

if ($regit == 1) {
    $messreg = ' OK';
    $meskin  = CHEMIN.'skins/'.$selskin.'/';
    if (is_file ($meskin.'confskin.inc')){
        include $meskin.'confskin.inc';
    } else {
        include CHEMIN.'skins/no_skin/confskin.inc';
    }
    $page[9] = $page9; // Thème icônes O/N
    include 'inc/confskin.inc';
    include CONFIG;
    $page[14] = $page14; // Thème skins
    $page[23] = $page23; // Thème avatars
    include 'inc/confupdt.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=config9";'.EndJavascript();
    }
}

if ($regit == 2) {
    $addrota   = true;
    $rotaskins = @file(CHEMIN.'data/config/rotaskins.dtb');
    if (!empty($rotaskins)) {
        foreach ($rotaskins as $rotaskin) {
            $rota = explode(CONNECTOR, $rotaskin);
            if ($rota[0] == substr($daterota.'0000', 0, 12)) {
                $addrota = false;
                break;
            }
        }
    }
    if ($addrota) {
        $rotas  = ReadFullDB(CHEMIN.'data/config/rotaskins.dtb');
        $rotas .= (empty($rotas) || $rotas[strlen($rotas)-1] == chr(10) ? '' : chr(10)).substr($daterota.'0000', 0, 12).CONNECTOR.$skinrota;
        WriteFullDB(CHEMIN.'data/config/rotaskins.dtb', $rotas);
    } else {
        echo BeginJavascript().'alert("'.$admin[1746].'");'.EndJavascript();
    }
}

if ($regit == 3) {
    $rotaskins = @file(CHEMIN.'data/config/rotaskins.dtb');
    $rotas     = '';
    foreach ($rotaskins as $rotaskin) {
        $rota = explode(CONNECTOR, $rotaskin);
        if ($rota[0] != $daterota) $rotas .= $rotaskin;
    }
    WriteFullDB(CHEMIN.'data/config/rotaskins.dtb', $rotas);
}

include CONFIG;
$selskin = is_file(CHEMIN.'skins/'.$selskin.'/confskin.inc') ? $selskin : 'no_skin';
$meskin = CHEMIN.'skins/'.$selskin.'/';
if (is_file ($meskin.'confskin.inc')) {
    include $meskin.'confskin.inc';
} else {
    die('Skin not found : '.$meskin);
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[67]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';

$skintheme   = ExploreDir('skins/');
$avatartheme = ExploreImg('inc/img/avatars/');

htable($admin[67], '100%');

function GetSelector($inputname = 'idselector', $default = '') {
    return '<input size="8" class="texte" type="text" id="'.$inputname.'" name="'.$inputname.'" value="'.$default.'" />'.
           '<input id="'.$inputname.'btn" name="'.$inputename.'btn" type="button" value="    " onclick="opencolorselector(\''.$inputename.'\', event)" style="background:'.$default.'" />';
}

if (isset($selskin)) $skn = '&amp;selskin='.$selskin;
echo '
<div style="text-align:center;"><p>'.ToHelp($lng, '&pg=964&mnuid=937&tconfig=0#z2').'<br />'.$admin[889].'<br /><br /></p>
  <hr />
</div>
<div class="w-100 m-auto" style="max-width:514px">
  <form name="conf9" action="admin.php?lng='.$lng.'&amp;pg=config9" method="post">
	<input type="hidden" name="regit" value="1" />
	<fieldset>'.legend($admin[344]).'
      <div class="table-responsive-md">
	  <table class="table w-100">
		<tr class="text-left">
		  <td colspan="2"><p class="forum2" style="text-align:center;"> --------- '.$admin[891].' ----------</p><br /></td>
		</tr>
		<tr class="text-left">
		  <td class="align-middle">&bull; '.$admin[550].'</td>
		  <td class="align-middle">
		    <select class="form-control" name="page14">';
for ($i = 0; $i < count($skintheme); $i++) {
	echo '
			  <option value="'.$skintheme[$i].'"'.Selected($page[14] == $skintheme[$i]).'>'.$skintheme[$i].'</option>';
}
echo '
			</select>
		  </td>
		</tr>
		<tr style="text-align:left;">
		  <td class="align-middle">&bull; '.$admin[809].'</td>
		  <td class="align-middle w-40 pt-4">
            <div class="d-inline-block">
		      <select class="form-control mt-2" name="page23" onchange="submit();">
			    <option value="none"'.Selected($page[23] == 'none').'>'.$admin[1681].'</option>';
for ($i = 0; $i < count($avatartheme); $i++) {
    $avatar = substr($avatartheme[$i], 0, -4);
	echo '
			    <option value="'.$avatar.'"'.Selected($page[23] == $avatar).'>'.$avatar.'</option>';
}
echo '
			  </select>&nbsp;
            </div>
            <span class="float-right pt-3 pr-5">
              <button type="button" data-target="#user-ava" data-toggle="modal"><i class="far fa-eye"></i></button>
            </span>
            <div class="modal fade" id="user-ava" role="dialog">
              <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content">
                  <div class="modal-header">
                    <h2 class="modal-title text-center">'.$page[23].'</h2>
                    <button class="close" data-dismiss="modal" type="button"><i class="fas fa-times"></i></button>
                  </div>
                  <div class="modal-body">
                    <div class="table-responsive-md divuserava">
                      <table class="table table-borderless m-auto tbluseravaW">
                        <tr>';
@include CHEMIN.'inc/img/avatars/'.$page[23].'.inc';
$nbrimgavatar = 0; $j = $imgavatars;
for ($i = 1; $i < $imgavatars; $i++) {
    $ava  = substr('0'.(string)$i, -2);
    echo '
                          <td class="text-center">
                            <i class="ava-'.$ava.'" title="'.$page[23].'-'.$ava.'"></i>
                          </td>';
    $nbrimgavatar++; $j--;
    if ($nbrimgavatar == 5 && $j != 0) {
        $nbrimgavatar = 0;
        echo '
                        </tr>
                        <tr>';
    }
}
$vid = 5 - $imgavatars%5 ;
if ($vid != 5) {
    for ($i = 0; $i < $vid; $i++)
        echo '
                          <td class="text-center">&nbsp;</td>';
}
echo '
                        </tr>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
		  </td>
		</tr>
		<tr>
		  <td class="text-left align-middle pb-3">&bull; <label for="page9">'.$admin[306].'</label></td>
          <td class="text-left align-middle pb-3">
            <input type="checkbox" id="page9" name="page9"'.Checked($page[9]).' />
          </td>
		  </td>
		</tr>
	  </table>
      </div>
	</fieldset>
	<input type="hidden" name="selskin" value="'.$selskin.'" />
    <div class="row quest p-0 mt-2 w-98 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  </form>
  <a id="rotaskin"></a>
  <form name="conf91" action="admin.php?lng='.$lng.'&amp;pg=config9#rotaskin" method="post">
	<input type="hidden" name="regit" value="2" />
	<fieldset>'.legend($admin[1742]).'
      <div class="table-responsive-md">
	  <table class="table w-100">
		<tr style="text-align:left;vertical-align:middle;">
		  <td class="align-middle"><p>&bull; '.$admin[1743].'</p></td>
		  <td class="align-middle">
		    <select class="form-control" name="skinrota">';
for ($i = 0; $i < count($skintheme); $i++) {
	echo '
			  <option value="'.$skintheme[$i].'"'.Selected($page[14] == $skintheme[$i]).'>'.$skintheme[$i].'</option>';
}
echo '
			</select>
          </td>
		</tr>
		<tr style="text-align:left;vertical-align:middle;">
		  <td class="align-middle">
            <p>&bull; '.$admin[1744].'</p>
          </td>
		  <td class="align-middle">
            <div class="d-inline-block">
              <input class="form-control" type="text" name="daterota" size="16" />
            </div>
            <div class="d-inline-block">            
              <script>
                $(document).ready(function(){
                  $(\'.popuserpwd\').popover({
                    title:"'.$admin[1744].'",
                    content:"'.$help[25].'",
                    trigger:"hover",
                    placement:"auto",
                    html:true
                  });
                });
              </script>
              <span class="overpop float-left">&nbsp;
                <a class="popuserpwd" title="">
                  <i class="far fa-comment-dots"></i>
                </a>
              </span>
		    </div>
          </td>
		</tr>
	  </table>
      </div>
      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
         <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1745], '', '', $imgdroite).'</div></div>
      </div>';
if (is_file(CHEMIN.'data/config/rotaskins.dtb')) {
    $rotaskins = @file(CHEMIN.'data/config/rotaskins.dtb');
    if (!empty($rotaskins)) {
        echo '
      <fieldset>';
        sort($rotaskins);
        foreach($rotaskins as $rotaskin) {
            $rota = explode(CONNECTOR, $rotaskin);
            echo '
        <div style="line-height: 20px;">
          '.FormatDate($rota[0]).'  ==>  '.$rota[1].'
          <span style="float:right;">
            <i class="fadm-sup align-middle" title="'.$admin[186].'" 
              onclick="self.location.href=\'admin.php?lng='.$lng.'&pg=config9&regit=3&daterota='.$rota[0].'#rotaskin\'">
            </i>
          </span>
        </div>';
        }
        echo '
      </fieldset>';
    }
}
echo '
    </fieldset>
  </form>
</div>
<div style="text-align:center;">';
if (isset($selskin)) $skn = '&amp;selskin='.$selskin;
echo '
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
configlang.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/configlang.inc'
View Content
<?php
/*******************************************************************************
 *   Admin modification personalized lang file
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.01.00 (September 22, 2022) : Initial  release
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[43] == "") {
        $nomzone = $admin[957];
        include 'access.inc';
        exit();
    }
}

$regit      = import('regit');
$corit      = import('corit');
$myfichierlang                 = import('myfichierlang');
$modcontenuadmin               = import('modcontenuadmin');
$modcontenuadminplus           = import('modcontenuadminplus');
$modcontenuweb                 = import('modcontenuweb');
$modcontenuwebplus             = import('modcontenuwebplus');
$modcontenuadmin1              = import('modcontenuadmin1');
$modcontenuadminplus1          = import('modcontenuadminplus1');
$modcontenuweb1                = import('modcontenuweb1');
$modcontenuwebplus1            = import('modcontenuwebplus1');

$active     = 1;
$mesfichierslangs = CHEMIN.'inc/lang/';

if ($corit == 1) {
    $modcontenuadminplus = trim(stripslashes($modcontenuadminplus));
	$complmtmodcontenuadminplus = str_replace('***infophpnepassupprimer','<?php', $modcontenuadminplus);
    WriteFullDB($mesfichierslangs.$lang[0].'-admplus.inc', $complmtmodcontenuadminplus);
	$active      = 2;
}
if ($corit == 2) {
    $modcontenuwebplus = trim(stripslashes($modcontenuwebplus));
	$complmtmodcontenuwebplus = str_replace('***infophpnepassupprimer','<?php', $modcontenuwebplus);
    WriteFullDB($mesfichierslangs.$lang[0].'-plus.inc', $complmtmodcontenuwebplus);
	$active      = 4;
}
if ($corit == 3) {
    $modcontenuadminplus1 = trim(stripslashes($modcontenuadminplus1));
	$complmtmodcontenuadminplus1 = str_replace('***infophpnepassupprimer','<?php', $modcontenuadminplus1);
    WriteFullDB($mesfichierslangs.$lang[1].'-adminplus.inc', $complmtmodcontenuadminplus1);
	$active      = 6;
}
if ($corit == 4) {
    $modcontenuwebplus1 = trim(stripslashes($modcontenuwebplus1));
	$complmtmodcontenuwebplus1 = str_replace('***infophpnepassupprimer','<?php', $modcontenuwebplus1);
    WriteFullDB($mesfichierslangs.$lang[1].'-plus.inc', $complmtmodcontenuwebplus1);
	$active      = 8;
}
$headinc .= '
<script>
$(document).ready( function() {
    $("#gyaccordion").hoverAccordion({
        keepHeight: false,
        activateItem: '.$active.',
        onClickOnly: true,
        speed: 400
    });
    $("#gyaccordion").children("li:first").addClass("firstitem");
    $("#gyaccordion").children("li:last").addClass("lastitem");
});
</script>
<link rel="stylesheet" href="inc/codemirror/codemirror.css">
<link rel="stylesheet" href="inc/codemirror/simplescrollbars.css">
<script src="inc/codemirror/codemirror.js"></script>
<script src="inc/codemirror/css.js"></script>
<script src="inc/codemirror/simplescrollbars.js"></script>
';
$headinc .= "
<style>
#gyaccordion {
    width: auto;
    height: auto;
    list-style-type: none;
    background-color: inherit;
    color: inherit;
}
#gyaccordion a {
    display: block;
    font-weight: bold;
    text-decoration: none;
}
#gyaccordion ul {
    overflow: hidden;
    margin: 0;
    padding: 0;
}
#gyaccordion li {
    margin: auto;
    list-style-type: none;
    height:auto;
}
#gyaccordion li a {
    width: auto;
    height: auto;
    padding: 8px;
    display: block;
    color: #FFFFFF;
}
#gyaccordion li a.closed {
    color: #000000 !important;
    background-color: #DCD9E0;
    border: 1px solid #67890B;
	border-radius: 4px;
    margin: 4px 0;
}
#gyaccordion li.firstitem a.closed {
    color: #000000 !important;
    background-color: #DCD9E0;
    border: 1px solid #67890B;
	border-radius: 4px;
}
#gyaccordion li.lastitem a.closed {
    color: #000000 !important;
    background-color: #DCD9E0;
    border: 1px solid #67890B;
	border-radius: 4px;
}
#gyaccordion li li {
    width: auto;
    height: auto;
    margin: auto;
    line-height: 28px;
    border: 1px solid #67890B;
}
#gyaccordion li a.opened {
    color: #FFFFFF;
    font-weight: bold;
    background-color: #7F7F7F;
    border: 1px solid #67890B;
	border-radius: 4px;
    margin: 4px 0;
}
#gyaccordion li.firstitem a.opened {
    color: #FFFFFF;
    font-weight: bold;
    background-color: #7F7F7F;
    border: 1px solid #67890B;
	border-radius: 4px;
    margin: 4px 0;
}
#gyaccordion li.lastitem li {
    margin: 4px 0 12px 0;
}
#gyaccordion li.lastitem ul {
    padding-bottom: 4px;
    margin: 0;
}
</style>
<script>
(function($) {
    $.fn.hoverAccordion = function(options) {
        options = jQuery.extend({
            speed : 'fast',
            activateItem : true,
            keepHeight : false,
            onClickOnly : false,
            classActive : 'active',
            classHeader : 'header',
            classHover : 'hover',
            classOpen : 'opened',
            classClosed : 'closed'
        }, options);
        var container = this;
        var pageHref = window.location.href;
        var i = 0;
        function doHover(itemList, itemHeader, listHeight) {
            var oldList = $(container).find('.' + options.classOpen).closest(
            'li').find('ul:first');
            if (false === oldList.is(':animated')) {
                if (options.keepHeight == true) {
                    listHeight = maxHeight;
                }
                if (itemHeader.hasClass(options.classOpen) == false) {
                    itemList.children().show();
                    itemList.animate({
                        height : listHeight
                    }, {
                        step : function(n, fx) {
                            itemList.height(listHeight - n);
                        },
                        duration : options.speed
                    });
                    oldList.animate({
                        height : 0
                    }, {
                        step : function(n, fx) {
                            itemList.height(listHeight - n);
                        },
                        duration : options.speed
                    }).children().hide();
                    itemHeader.addClass(options.classOpen).removeClass(
                    options.classClosed);
                    oldList.closest('li').removeClass(options.classActive)
                    .find('a:first').addClass(options.classClosed).removeClass(
                    options.classOpen);
                }
            }
        }
        var itemNo = 0;
        var maxHeight = 0;
        $(this)
        .children('li')
        .each(
        function() {
            var item = $(this);
            var isActive = false;
            itemNo++;
            var itemHeader = item.find('a:first').addClass(options.classHeader);
            if (itemHeader.length > 0) {
                itemHeader.hover(function() {
                    itemHeader.addClass(options.classHover);
                }, function() {
                    itemHeader.removeClass(options.classHover);
                });
                var itemHref = itemHeader.attr('href');
                if (itemHref == '#') {
                    itemHeader.click(function() {
                        this.blur();
                        return false;
                    });
                } else if (options.activateItem == true
                && pageHref.indexOf(itemHref) > 0
                && pageHref.length - pageHref.lastIndexOf(itemHref) == itemHref.length) {
                    isActive = true;
                    item.addClass(options.classActive);
                    itemHeader.removeClass(options.classClosed).addClass(
                    options.classOpen);
                }
            }
            var itemList = item.find('ul:first');
            if (itemList.length > 0) {
                var listHeight = itemList.height();
                if (maxHeight < listHeight)
                    maxHeight = listHeight;
                if (options.onClickOnly == true) {
                    itemHeader.click(function() {
                        doHover(itemList, itemHeader, listHeight);
                    });
                } else {
                    itemHeader.hover(function() {
                        i = setInterval(function() {
                            doHover(itemList, itemHeader, listHeight);
                            clearInterval(i);
                        }, 400);
                    }, function() {
                        clearInterval(i);
                    });
                }
                if (options.activateItem === true) {
                    itemList
                    .children('li')
                    .each(
                    function() {
                        var m = $(this).find('a').attr('href');
                        if (m) {
                            if (pageHref.indexOf(m) > 0
                            && pageHref.length - pageHref.lastIndexOf(m) == m.length) {
                                isActive = true;
                                item.addClass(options.classActive);
                                itemHeader.removeClass(options.classClosed)
                                .addClass(options.classOpen);
                            }
                        }
                    });
                } else if (parseInt(options.activateItem, 10) == itemNo) {
                    isActive = true;
                    item.addClass(options.classActive);
                    itemHeader.removeClass(options.classClosed).addClass(
                    options.classOpen);
                }
            }
            if (!isActive) {
                itemHeader.removeClass(options.classOpen);
                if (itemList.length > 0) {
                    itemList.children().hide();
                    itemHeader.addClass(options.classClosed);
                }
            }
        });
        return this;
    };
})(jQuery);
</script>
";

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[957]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($topmess, '100%');

$avertissement = $admin[1869].$admin[957].' => '.$lang[0];
if ($lang[1] != '')
	$avertissement .= $admin[961].$lang[1];
echo '
  <p class="notice" align="center">'.$avertissement.'</p>';

$mesfichierslangs = CHEMIN."inc/lang/";

echo '
  <ul id="gyaccordion" style="max-width:1240px; margin:auto;">';

if (FileDBExist($mesfichierslangs.$lang[0].'-admin.inc')) {
		$titre = $admin[959]." ".$admin[958].' '.$lang[0].'-admin.inc';
		$titre .= $admin[831];
	echo '
    <a id="topmobstyle"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
	echo '    
		    <input type="hidden" name="myfichierlang" value="'.$lang[0].'-admin" />
		    <div style="margin:auto;text-align:left;">
			  <textarea name="modcontenuadmin" id="modcontenuadmin" rows="32" style="width:100%;">';
	$fichierlangfile = fopen($mesfichierslangs.$lang[0].'-admin.inc', 'r');
	while (!feof($fichierlangfile)) {
		$fichierlangline = fgets($fichierlangfile, 255);
		echo $fichierlangline;
	}
	fclose($fichierlangfile);
	echo '
			  </textarea>
		    </div>';
	echo '
		  </form>
          <script>
				var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuadmin"), {        
			  lineNumbers: true,
			  readOnly: true,
			  scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}
if (FileDBExist($mesfichierslangs.$lang[0].'-admplus.inc')) {
		$titre = $admin[144].' '.$admin[958].' '.$lang[0].'-admplus.inc';
	echo '
    <a id="topmobstyle"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
	echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		    <input type="hidden" name="corit" value="1" />		    
		    <input type="hidden" name="myfichierlang" value="'.$lang[0].'-admplus" />
			<div style="margin:auto;text-align:left;">
					<textarea name="modcontenuadminplus" id="modcontenuadminplus" rows="32" style="width:100%;">';
	$fichierlangfile = fopen($mesfichierslangs.$lang[0].'-admplus.inc', 'r');
	while (!feof($fichierlangfile)) {
		$fichierlangline = fgets($fichierlangfile, 255);
		if (str_contains($fichierlangline,'<?php'))
		{
			$fichierlangline = str_replace('<?php','***infophpnepassupprimer', $fichierlangline);
		}
		echo $fichierlangline;
	}
	fclose($fichierlangfile);
	echo '
			  </textarea>
		    </div>';
	echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		  </form>
          <script>
				var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuadminplus"), {        
			  lineNumbers: true,
			  mode: "javascript",
			  scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}
if (FileDBExist($mesfichierslangs.$lang[0].'-web.inc')) {
		$titre = $admin[959]." ".$admin[958].' '.$lang[0].'-web.inc';
		$titre .= $admin[831];
	echo '
    <a id="topmobstyle"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
	echo '    
		    <input type="hidden" name="myfichierlang" value="'.$lang[0].'-web" />
		    <div style="margin:auto;text-align:left;">
			  <textarea name="modcontenuweb" id="modcontenuweb" rows="32" style="width:100%;">';
	$fichierlangfile = fopen($mesfichierslangs.$lang[0].'-web.inc', 'r');
	while (!feof($fichierlangfile)) {
		$fichierlangline = fgets($fichierlangfile, 255);
		echo $fichierlangline;
	}
	fclose($fichierlangfile);
	echo '
			  </textarea>
		    </div>';
	echo '
		  </form>
          <script>
				var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuweb"), {        
			  lineNumbers: true,
			  readOnly: true,
			  scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}
if (FileDBExist($mesfichierslangs.$lang[0].'-plus.inc')) {
		$titre = $admin[144].' '.$admin[958].' '.$lang[0].'-plus.inc';
	echo '
    <a id="topmobstyle"></a>
    <li>
      <a href="#">'.$titre.'</a>
      <ul>
	    <li>
		  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
	echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '	    
		    <input type="hidden" name="corit" value="2" />
			<input type="hidden" name="myfichierlang" value="'.$lang[0].'-plus" />
			<div style="margin:auto;text-align:left;">
					<textarea name="modcontenuwebplus" id="modcontenuwebplus" rows="32" style="width:100%;">';
	$fichierlangfile = fopen($mesfichierslangs.$lang[0].'-plus.inc', 'r');
	while (!feof($fichierlangfile)) {
		$fichierlangline = fgets($fichierlangfile, 255);
		if (str_contains($fichierlangline,'<?php'))
		{
			$fichierlangline = str_replace('<?php','***infophpnepassupprimer', $fichierlangline);
		}
		echo $fichierlangline;
	}
	fclose($fichierlangfile);
	echo '
			  </textarea>
		    </div>';
	echo '
			<div class="quest" style="margin:0 8px;padding:2px 20px;">
			  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
			  <div style="clear:both"></div>
			</div>';
	echo '
		  </form>
          <script>
				var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuwebplus"), {        
			  lineNumbers: true,
			  scrollbarStyle: "native"
            });
          </script>
        </li>
	  </ul>
    </li>';
}

if ($lang[1] != '') // si lang[1] est définie dans la config Générale
{
	if (FileDBExist($mesfichierslangs.$lang[1].'-admin.inc')) {
			$titre = $admin[959]." ".$admin[958].' '.$lang[1].'-admin.inc';
			$titre .= $admin[831];
		echo '
		<a id="topmobstyle"></a>
		<li>
		  <a href="#">'.$titre.'</a>
		  <ul>
			<li>
			  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
		echo '    
				<input type="hidden" name="myfichierlang" value="'.$lang[1].'-admin" />
				<div style="margin:auto;text-align:left;">
				  <textarea name="modcontenuadmin1" id="modcontenuadmin1" rows="32" style="width:100%;">';
		$fichierlangfile = fopen($mesfichierslangs.$lang[1].'-admin.inc', 'r');
		while (!feof($fichierlangfile)) {
			$fichierlangline = fgets($fichierlangfile, 255);
			echo $fichierlangline;
		}
		fclose($fichierlangfile);
		echo '
				  </textarea>
				</div>';
		echo '
			  </form>
			  <script>
					var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuadmin1"), {        
				  lineNumbers: true,
				  readOnly: true,
				  scrollbarStyle: "native"
				});
			  </script>
			</li>
		  </ul>
		</li>';
	}
	if (FileDBExist($mesfichierslangs.$lang[1].'-admplus.inc')) {
			$titre = $admin[144].' '.$admin[958].' '.$lang[1].'-admplus.inc';
		echo '
		<a id="topmobstyle"></a>
		<li>
		  <a href="#">'.$titre.'</a>
		  <ul>
			<li>
			  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
		echo '
				<div class="quest" style="margin:0 8px;padding:2px 20px;">
				  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
				  <div style="clear:both"></div>
				</div>';
		echo '
				<input type="hidden" name="corit" value="3" />		    
				<input type="hidden" name="myfichierlang" value="'.$lang[1].'-admplus" />
				<div style="margin:auto;text-align:left;">
						<textarea name="modcontenuadminplus1" id="modcontenuadminplus1" rows="32" style="width:100%;">';
		$fichierlangfile = fopen($mesfichierslangs.$lang[1].'-admplus.inc', 'r');
		while (!feof($fichierlangfile)) {
			$fichierlangline = fgets($fichierlangfile, 255);
			if (str_contains($fichierlangline,'<?php'))
			{
				$fichierlangline = str_replace('<?php','***infophpnepassupprimer', $fichierlangline);
			}
			echo $fichierlangline;
		}
		fclose($fichierlangfile);
		echo '
				  </textarea>
				</div>';
		echo '
				<div class="quest" style="margin:0 8px;padding:2px 20px;">
				  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
				  <div style="clear:both"></div>
				</div>';
		echo '
			  </form>
			  <script>
					var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuadminplus1"), {        
				  lineNumbers: true,
				  scrollbarStyle: "native"
				});
			  </script>
			</li>
		  </ul>
		</li>';
	}
	if (FileDBExist($mesfichierslangs.$lang[1].'-web.inc')) {
			$titre = $admin[959]." ".$admin[958].' '.$lang[1].'-web.inc';
			$titre .= $admin[831];
		echo '
		<a id="topmobstyle"></a>
		<li>
		  <a href="#">'.$titre.'</a>
		  <ul>
			<li>
			  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
		echo '    
				<input type="hidden" name="myfichierlang" value="'.$lang[1].'-web" />
				<div style="margin:auto;text-align:left;">
				  <textarea name="modcontenuweb1" id="modcontenuweb1" rows="32" style="width:100%;">';
		$fichierlangfile = fopen($mesfichierslangs.$lang[1].'-web.inc', 'r');
		while (!feof($fichierlangfile)) {
			$fichierlangline = fgets($fichierlangfile, 255);
			echo $fichierlangline;
		}
		fclose($fichierlangfile);
		echo '
				  </textarea>
				</div>';
		echo '
			  </form>
			  <script>
					var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuweb1"), {        
				  lineNumbers: true,
				  readOnly: true,
				  scrollbarStyle: "native"
				});
			  </script>
			</li>
		  </ul>
		</li>';
	}
	if (FileDBExist($mesfichierslangs.$lang[1].'-plus.inc')) {
			$titre = $admin[144].' '.$admin[958].' '.$lang[1].'-plus.inc';
		echo '
		<a id="topmobstyle"></a>
		<li>
		  <a href="#">'.$titre.'</a>
		  <ul>
			<li>
			  <form name="modmobcss" action="admin.php?lng='.$lng.'&amp;pg=configlang#topmobstyle" method="post">';
		echo '
				<div class="quest" style="margin:0 8px;padding:2px 20px;">
				  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
				  <div style="clear:both"></div>
				</div>';
		echo '
				<input type="hidden" name="corit" value="4" />		    
				<input type="hidden" name="myfichierlang" value="'.$lang[1].'-plus" />
				<div style="margin:auto;text-align:left;">
					<textarea name="modcontenuwebplus1" id="modcontenuwebplus1" rows="32" style="width:100%;">';
		$fichierlangfile = fopen($mesfichierslangs.$lang[1].'-plus.inc', 'r');
		while (!feof($fichierlangfile)) {
			$fichierlangline = fgets($fichierlangfile, 255);
			if (str_contains($fichierlangline,'<?php'))
			{
				$fichierlangline = str_replace('<?php','***infophpnepassupprimer', $fichierlangline);
			}
			echo $fichierlangline;
		}
		fclose($fichierlangfile);
		echo '
				  </textarea>
				</div>';
		echo '
				<div class="quest" style="margin:0 8px;padding:2px 20px;">
				  <div style="float:right">'.SubmitButton($admin[144].' '.$admin[958], '', '', $imgdroite).'</div>
				  <div style="clear:both"></div>
				</div>';
		echo '
			  </form>
			  <script>
					var editor = CodeMirror.fromTextArea(document.getElementById("modcontenuwebplus1"), {        
				  lineNumbers: true,
				  scrollbarStyle: "native"
				});
			  </script>
			</li>
		  </ul>
		</li>';
	}
} // fin des lang[1]
echo '
  </ul>';

echo '
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
confskin.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/confskin.inc'
View Content
<?php
/*******************************************************************************
 *   Config Skin
 *******************************************************************************
 *   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.03 (August 10, 2021) : adaptation to php 8
 ******************************************************************************/

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

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

$body[0] = stripslashes("'.$body[0].'"); // Arrière-plan du site
$body[1] = stripslashes("'.$body[1].'"); // Image de fond du site
$body[2] = stripslashes("'.$body[2].'"); // Image de fond fixe / mouvante
$body[3] = stripslashes("'.$body[3].'"); // Répétition image de fond
$body[4] = stripslashes("'.$body[4].'"); // Position horizontale
$body[5] = stripslashes("'.$body[5].'"); // Position en bas de page du bouton flottant
$body[6] = stripslashes("'.$body[6].'"); // Décalage avant affichage du bouton flottant
$body[7] = stripslashes("'.$body[7].'"); // Bouton flottant ON/OFF
$body[8] = stripslashes("'.$body[8].'"); // Image de fond bas de page
$body[9] = stripslashes("'.$body[9].'"); // Répétition image bas de page
$body[10] = stripslashes("'.$body[10].'"); // N° de la colonne gauche
$body[11] = stripslashes("'.$body[11].'"); // N° de la colonne centrale
$body[12] = stripslashes("'.$body[12].'"); // N° de la colonne droite
$body[13] = stripslashes("'.$body[13].'"); // N° de la colonne gauche BLOG
$body[14] = ""; // Inutilisé
$body[15] = stripslashes("'.$body[15].'"); // N° de la colonne droite BLOG
$body[16] = stripslashes("'.$body[16].'"); // Ancrage automatique zone 2

// page[0] = stripslashes(""); // Inutilisé
$page[1] = stripslashes("'.$page[1].'"); // Police des boites centrales
$page[2] = stripslashes("'.$page[2].'"); // Taille des textes des boites centrales
// page[3] = stripslashes(""); // Inutilisé
$page[4] = stripslashes("'.$page[4].'"); // Logo du site
$page[5] = stripslashes("'.$page[5].'"); // Arrière-plan du pied de page
$page[6] = stripslashes("'.$page[6].'"); // Hauteur des lignes boîtes centrales
$page[7] = stripslashes("'.$page[7].'"); // Flèches pour la navigation parallaxe ON / OFF
$page[8] = stripslashes("'.$page[8].'"); // Affichage Temps de chargement de page ON / OFF
$page[9] = stripslashes("'.$page[9].'"); // Thème d icônes
// page[10] = stripslashes(""); // Inutilisé
$page[11] = stripslashes("'.$page[11].'"); // Hauteur des lignes boîtes latérales
// Thème smileys for site is in config.inc
// (supprimé) Image Page en cours de chargement
// Default Thème skins is in config.inc
$page[15] = stripslashes("'.$page[15].'"); // Effet animation liens
$page[16] = stripslashes("'.$page[16].'"); // Police des boites latérales
$page[17] = stripslashes("'.$page[17].'"); // Taille des textes des boites latérales
$page[18] = stripslashes("'.$page[18].'"); // Police du menu de navigation
$page[19] = stripslashes("'.$page[19].'"); // Taille des liens du menu de navigation
$page[20] = ""; // inutilisé
$page[21] = stripslashes("'.$page[21].'"); // Hauteur du footer
$page[22] = stripslashes("'.$page[22].'"); // Utilisation titres longs
// Thème avatars for the site is in config.inc
$page[24] = stripslashes("'.$page[24].'"); // Image de fond parallaxe 1
$page[25] = stripslashes("'.$page[25].'"); // Image de fond parallaxe 2
$page[26] = stripslashes("'.$page[26].'"); // Image de fond parallaxe 3
// page[28] = stripslashes(""); // Inutilisé
$page[29] = stripslashes("'.$page[29].'"); // Arrière-plan du bandeau TOP
// page[30] = stripslashes(""); // Inutilisé
$page[31] = stripslashes("'.$page[31].'"); // Arrière-plan du bandeau BOTTOM
// page[32] = stripslashes(""); // Inutilisé
$page[33] = stripslashes("'.$page[33].'"); // Image de fond de la barre de menu
$page[34] = stripslashes("'.$page[34].'"); // Arrière-plan de la barre de menu
$page[35] = stripslashes("'.$page[35].'"); // Style de la police des boîtes latérales
$page[36] = stripslashes("'.$page[36].'"); // Style de police des boites centrales
$page[37] = stripslashes("'.$page[37].'"); // Style de police du menu icônes
// page[38] = stripslashes(""); // Inutilisé
$page[39] = stripslashes("'.$page[39].'"); // Police corps du document
$page[40] = stripslashes("'.$page[40].'"); // Taille des textes corps du document
$page[41] = stripslashes("'.$page[41].'"); // Style de police corps du document
// page[42] = stripslashes(""); // Inutilisé
$page[43] = stripslashes("'.$page[43].'"); // Arrière-plan du header
// page[44] = stripslashes(""); // Inutilisé
$page[45] = stripslashes("'.$page[45].'"); // Police footer
$page[46] = stripslashes("'.$page[46].'"); // Taille des textes footer
$page[47] = stripslashes("'.$page[47].'"); // Style de police footer
// page[48] = stripslashes(""); // Inutilisé
// page[49] = stripslashes(""); // Inutilisé
$page[50] = stripslashes("'.$page[50].'"); // Menu effet de parallaxe
$page[51] = stripslashes("'.$page[51].'"); // Arrière-plan bouton navigation parallaxe
$page[52] = stripslashes("'.$page[52].'"); // Position navigateur parallaxe
// page[53] = stripslashes(""); // Inutilisé
$page[54] = stripslashes("'.$page[54].'"); // N° ligne TOP à fixer en haut de page  pour la page principale et les pages secondaires
// page[55] = stripslashes(""); // Inutilisé
$page[56] = stripslashes("'.$page[56].'"); // Arrière-plan parallaxe 1
$page[57] = stripslashes("'.$page[57].'"); // Arrière-plan parallaxe 2
$page[58] = stripslashes("'.$page[58].'"); // Arrière-plan parallaxe 3
// page[59] = stripslashes(""); // Inutilisé
// page[60] = stripslashes(""); // Inutilisé
// page[61] = stripslashes(""); // Inutilisé
$page[62] = stripslashes("'.$page[62].'"); // Décalage du centre sous la ligne TOP  pour la page principale et les pages secondaires
$page[63] = stripslashes("'.$page[63].'"); // Largeur des flèches de navigation parallaxe
$page[64] = stripslashes("'.$page[64].'"); // Hauteur des flèches de navigation parallaxe
$page[65] = stripslashes("'.$page[65].'"); // Police du menu navigation latérale
$page[66] = stripslashes("'.$page[66].'"); // Style de police du menu navigation latérale
$page[67] = stripslashes("'.$page[67].'"); // Taille des liens du menu navigation latérale
$page[68] = stripslashes("'.$page[68].'"); // Police du panneau menu navigation latérale
$page[69] = stripslashes("'.$page[69].'"); // Style de police du panneau menu navigation latérale
$page[70] = stripslashes("'.$page[70].'"); // Taille des liens du panneau menu navigation latérale

$titre[0] = stripslashes("'.$titre[0].'"); // Couleur du titre des boites centrales
$titre[1] = stripslashes("'.$titre[1].'"); // Arrière-plan du titre des boites centrales
$titre[2] = stripslashes("'.$titre[2].'"); // Police des titres des boites centrales
$titre[3] = stripslashes("'.$titre[3].'"); // Taille des titres des boites centrales
$titre[4] = stripslashes("'.$titre[4].'"); // Couleur du titre des boites latérales
$titre[5] = stripslashes("'.$titre[5].'"); // Arrière-plan du titre des boites latérales
$titre[6] = stripslashes("'.$titre[6].'"); // Police des titres des boites latérales
$titre[7] = stripslashes("'.$titre[7].'"); // Taille des titres des boites latérales
$titre[8] = stripslashes("'.$titre[8].'"); // Image de fond titre des boites centrales
$titre[9] = stripslashes("'.$titre[9].'"); // Image de fond titre des boites latérales
$titre[10] = stripslashes("'.$titre[10].'"); // Couleur du titre des boites BOTTOM
$titre[11] = stripslashes("'.$titre[11].'"); // Style de police des titres des boites latérales
$titre[12] = stripslashes("'.$titre[12].'"); // Style de police des titres des boites centrales
$titre[13] = stripslashes("'.$titre[13].'"); // Couleur des textes des boites BOTTOM
$titre[14] = stripslashes("'.$titre[14].'"); // Arrière-plan de la colonne latérale gauche
$titre[15] = stripslashes("'.$titre[15].'"); // Arrière-plan du titre des boites BOTTOM
$titre[16] = stripslashes("'.$titre[16].'"); // Couleur des bordures de la colonne latérale gauche
$titre[17] = stripslashes("'.$titre[17].'"); // Taille des bordures de la colonne latérale gauche
$titre[18] = stripslashes("'.$titre[18].'"); // Style des bordures de la colonne latérale gauche
$titre[19] = stripslashes("'.$titre[19].'"); // Rayon des coins de la colonne latérale gauche
$titre[20] = stripslashes("'.$titre[20].'"); // Arrière-plan OFF des boites BOTTOM
$titre[21] = stripslashes("'.$titre[21].'"); // Arrière-plan de la colonne latérale droite
// titre[22] = stripslashes(""); // Inutilisé
$titre[23] = stripslashes("'.$titre[23].'"); // Couleur des bordures de la colonne latérale droite
$titre[24] = stripslashes("'.$titre[24].'"); // Taille des bordures de la colonne latérale droite
$titre[25] = stripslashes("'.$titre[25].'"); // Style des bordures de la colonne latérale droite
$titre[26] = stripslashes("'.$titre[26].'"); // Rayon des coins de la colonne latérale droite
$titre[27] = stripslashes("'.$titre[27].'"); // Arrière-plan des colonnes du blog
// titre[28] = stripslashes(""); // Inutilisé
$titre[29] = stripslashes("'.$titre[29].'"); // Couleur des bordures des colonnes du blog
$titre[30] = stripslashes("'.$titre[30].'"); // Taille des bordures des colonnes du blog
$titre[31] = stripslashes("'.$titre[31].'"); // Style des bordures des colonnes du blog
$titre[32] = stripslashes("'.$titre[32].'"); // Rayon des coins des colonnes du blog
// titre[33] = stripslashes(""); // Inutilisé
$titre[34] = stripslashes("'.$titre[34].'"); // Arrière-plan de la zone principale
// titre[35] = stripslashes(""); // Inutilisé
$titre[36] = stripslashes("'.$titre[36].'"); // Couleur des bordures de la zone principale
$titre[37] = stripslashes("'.$titre[37].'"); // Taille des bordures de la zone principale
$titre[38] = stripslashes("'.$titre[38].'"); // Style des bordures de la zone principale
$titre[39] = stripslashes("'.$titre[39].'"); // Rayon des coins de la zone principale
$titre[40] = stripslashes("'.$titre[40].'"); // Largeur de la zone principale
$titre[41] = stripslashes("'.$titre[41].'"); // Arrière-plan de la colonne centrale
// titre[42] = stripslashes(""); // Inutilisé
$titre[43] = stripslashes("'.$titre[43].'"); // Couleur des bordures de la colonne centrale
$titre[44] = stripslashes("'.$titre[44].'"); // Taille des bordures de la colonne centrale
$titre[45] = stripslashes("'.$titre[45].'"); // Style des bordures de la colonne centrale
$titre[46] = stripslashes("'.$titre[46].'"); // Rayon des coins de la colonne centrale
$titre[47] = stripslashes("'.$titre[47].'"); // Police du titre du panneau menu
$titre[48] = stripslashes("'.$titre[48].'"); // Style de police du titre du panneau menu
$titre[49] = stripslashes("'.$titre[49].'"); // Taille du texte du titre du panneau menu
$titre[50] = stripslashes("'.$titre[50].'"); // Couleur du titre du panneau menu
$titre[51] = stripslashes("'.$titre[51].'"); // Couleur de fond du titre du panneau menu
$titre[52] = stripslashes("'.$titre[52].'"); // Couleur des bordures du titre du panneau menu
$titre[53] = stripslashes("'.$titre[53].'"); // Taille des bordures du titre du panneau menu
$titre[54] = stripslashes("'.$titre[54].'"); // Style des bordures du titre du panneau menu
$titre[55] = stripslashes("'.$titre[55].'"); // Taille coins arrondis du titre du panneau menu
$titre[56] = ""; // inutilisé
$titre[57] = ""; // inutilisé
$titre[58] = ""; // inutilisé
$titre[59] = ""; // inutilisé
$titre[60] = stripslashes("'.$titre[60].'"); // Arrière-plan de la zone au-dessus
// titre[61] = stripslashes(""); // Inutilisé
$titre[62] = stripslashes("'.$titre[62].'"); // Couleur des bordures zone au-dessus
$titre[63] = stripslashes("'.$titre[63].'"); // Taille des bordures zone au-dessus
$titre[64] = stripslashes("'.$titre[64].'"); // Style des bordures zone au-dessus
$titre[65] = stripslashes("'.$titre[65].'"); // Rayon des coins zone au-dessus
$titre[66] = stripslashes("'.$titre[66].'"); // Arrière-plan de la zone édito
// titre[67]
$titre[68] = stripslashes("'.$titre[68].'"); // Couleur des bordures de la zone édito
$titre[69] = stripslashes("'.$titre[69].'"); // Taille des bordures de la zone édito
$titre[70] = stripslashes("'.$titre[70].'"); // Style des bordures de la zone édito
$titre[71] = stripslashes("'.$titre[71].'"); // Rayon des coins de la zone édito
$titre[72] = stripslashes("'.$titre[72].'"); // Arrière-plan de la zone au-dessous
// titre[73] = stripslashes(""); // Inutilisé
$titre[74] = stripslashes("'.$titre[74].'"); // Couleur des bordures de la zone au-dessous
$titre[75] = stripslashes("'.$titre[75].'"); // Taille des bordures de la zone au-dessous
$titre[76] = stripslashes("'.$titre[76].'"); // Style des bordures de la zone au-dessous
$titre[77] = stripslashes("'.$titre[77].'"); // Rayon des coins de la zone au-dessous
$titre[78] = stripslashes("'.$titre[78].'"); // Largeur TOPBOXES
$titre[79] = stripslashes("'.$titre[79].'"); // Largeur MAINCONTENT
$titre[80] = stripslashes("'.$titre[80].'"); // Largeur BOTTOMBOXES
$titre[81] = stripslashes("'.$titre[81].'"); // Largeur FOOTER

$texte[0] = stripslashes("'.$texte[0].'"); // Couleur des textes des boites centrales
$texte[1] = stripslashes("'.$texte[1].'"); // Arrière-plan OFF des boites centrales
$texte[2] = stripslashes("'.$texte[2].'"); // Arrière-plan ON des boites centrales
// Puce articles is in config.inc
// texte[4] = stripslashes(""); // Inutilisé
$texte[5] = stripslashes("'.$texte[5].'"); // Couleur des textes des boites latérales
$texte[6] = stripslashes("'.$texte[6].'"); // Arrière-plan OFF des boites latérales
$texte[7] = stripslashes("'.$texte[7].'"); // Arrière-plan ON des boites latérales
$texte[8] = stripslashes("'.$texte[8].'"); // Couleur des textes éléments footer
$texte[9] = stripslashes("'.$texte[9].'"); // Couleur des textes corps du document
$texte[10] = stripslashes("'.$texte[10].'"); // Alignement des titres boîtes centrales
$texte[11] = stripslashes("'.$texte[11].'"); // Alignement des titres boîtes latérales
$texte[12] = stripslashes("'.$texte[12].'"); // Alignement des options de menu déroulant
$texte[13] = stripslashes("'.$texte[13].'"); // Alignement des lignes du bas de page

// bordure[0] = stripslashes(""); // Inutilisé
$bordure[3] = stripslashes("'.$bordure[3].'"); // Couleur des bordures pied de page
$bordure[4] = stripslashes("'.$bordure[4].'"); // Taille des bordures pied de page
$bordure[5] = stripslashes("'.$bordure[5].'"); // Taille coins arrondis pied de page
// bordure[6] = stripslashes(""); // Inutilisé
$bordure[7] = stripslashes("'.$bordure[7].'"); // Couleur des bordures titre boîtes centrales
$bordure[8] = stripslashes("'.$bordure[8].'"); // Taille des bordures titre boîtes centrales
$bordure[9] = stripslashes("'.$bordure[9].'"); // Taille coins arrondis titre boîtes centrales
$bordure[10] = stripslashes("'.$bordure[10].'"); // Couleur des bordures corps boîtes centrales
$bordure[11] = stripslashes("'.$bordure[11].'"); // Taille des bordures corps boîtes centrales
$bordure[12] = stripslashes("'.$bordure[12].'"); // Taille coins arrondis corps boîtes centrales
$bordure[13] = stripslashes("'.$bordure[13].'"); // Couleur des bordures titre boîtes latérales
$bordure[14] = stripslashes("'.$bordure[14].'"); // Taille des bordures titre boîtes latérales
$bordure[15] = stripslashes("'.$bordure[15].'"); // Taille coins arrondis titre boîtes latérales
$bordure[16] = stripslashes("'.$bordure[16].'"); // Couleur des bordures corps boîtes latérales
$bordure[17] = stripslashes("'.$bordure[17].'"); // Taille des bordures corps boîtes latérales
$bordure[18] = stripslashes("'.$bordure[18].'"); // Taille coins arrondis corps boîtes latérales
$bordure[19] = stripslashes("'.$bordure[19].'"); // Couleur des bordures du bandeau TOP
$bordure[20] = stripslashes("'.$bordure[20].'"); // Taille des bordures du bandeau TOP
$bordure[21] = stripslashes("'.$bordure[21].'"); // Taille coins arrondis du bandeau TOP
$bordure[22] = stripslashes("'.$bordure[22].'"); // Couleur des bordures du bandeau BOTTOM
$bordure[23] = stripslashes("'.$bordure[23].'"); // Taille des bordures du bandeau BOTTOM
$bordure[24] = stripslashes("'.$bordure[24].'"); // Taille coins arrondis du bandeau BOTTOM
// bordure[25] = stripslashes(""); //  // Inutilisé
$bordure[26] = stripslashes("'.$bordure[26].'"); // Couleur des bordures de la barre de menu
$bordure[27] = stripslashes("'.$bordure[27].'"); // Taille des bordures de la barre de menu
$bordure[28] = stripslashes("'.$bordure[28].'"); // Taille coins arrondis de la barre de menu
$bordure[29] = stripslashes("'.$bordure[29].'"); // Style des bordures du bandeau TOP
$bordure[30] = stripslashes("'.$bordure[30].'"); // Style des bordures du bandeau BOTTOM
$bordure[31] = stripslashes("'.$bordure[31].'"); // Style des bordures du bandeau pied de page
$bordure[32] = stripslashes("'.$bordure[32].'"); // Style des bordures de la barre de menu
// bordure[33] = stripslashes(""); // Inutilisé
$bordure[34] = stripslashes("'.$bordure[34].'"); // Style des bordures titre boîtes centrales
$bordure[35] = stripslashes("'.$bordure[35].'"); // Style des bordures corps boîtes centrales
$bordure[36] = stripslashes("'.$bordure[36].'"); // Style des bordures titre boîtes latérales
$bordure[37] = stripslashes("'.$bordure[37].'"); // Style des bordures corps boîtes latérales
$bordure[38] = stripslashes("'.$bordure[38].'"); // Style des bordures formulaire
$bordure[39] = stripslashes("'.$bordure[39].'"); // Style des bordures annuaires
$bordure[40] = stripslashes("'.$bordure[40].'"); // Couleur des bordures du header
$bordure[41] = stripslashes("'.$bordure[41].'"); // Taille des bordures du header
$bordure[42] = stripslashes("'.$bordure[42].'"); // Taille coins arrondis du header
$bordure[43] = stripslashes("'.$bordure[43].'"); // Style des bordures du header
$bordure[44] = stripslashes("'.$bordure[44].'"); // Couleur bordures boutons parallaxe

$lien[0] = stripslashes("'.$lien[0].'"); // Liens OFF des boites centrales
$lien[1] = stripslashes("'.$lien[1].'"); // Liens ON des boites centrales
$lien[2] = stripslashes("'.$lien[2].'"); // Liens OFF des boites latérales
$lien[3] = stripslashes("'.$lien[3].'"); // Liens ON des boites latérales
$lien[4] = stripslashes("'.$lien[4].'"); // Liens OFF de la barre de menu haute
$lien[5] = stripslashes("'.$lien[5].'"); // Liens ON de la barre de menu haute
$lien[6] = stripslashes("'.$lien[6].'"); // Fond liens ON de la barre de menu haute
$lien[7] = stripslashes("'.$lien[7].'"); // Fond liens OFF de la barre de menu haute
$lien[8] = stripslashes("'.$lien[8].'"); // Fond lien actif de la barre de menu haute
$lien[9] = stripslashes("'.$lien[9].'"); // Liens actif de la barre de menu haute
$lien[10] = stripslashes("'.$lien[10].'"); // Couleur de la bordure des onglets de la barre de menu
$lien[11] = stripslashes("'.$lien[11].'"); // Taille de la bordure des onglets de la barre de menu
$lien[12] = stripslashes("'.$lien[12].'"); // Style de la bordure des onglets de la barre de menu
$lien[13] = stripslashes("'.$lien[13].'"); // Taille coins arrondis des onglets de la barre de menu
$lien[14] = stripslashes("'.$lien[14].'"); // Marges internes des onglets de la barre de menu
$lien[15] = stripslashes("'.$lien[15].'"); // Marges externes des onglets de la barre de menu
$lien[16] = stripslashes("'.$lien[16].'"); // Liens OFF du menu navigation latérale
$lien[17] = stripslashes("'.$lien[17].'"); // Liens ON du menu navigation latérale
$lien[18] = stripslashes("'.$lien[18].'"); // Fond liens ON du menu navigation latérale
$lien[19] = stripslashes("'.$lien[19].'"); // Fond des panneaux de navigation latérale
$lien[20] = stripslashes("'.$lien[20].'"); // Couleur de la bordure gauche des panneaux
$lien[21] = stripslashes("'.$lien[21].'"); // Taille de la bordure gauche des panneaux
$lien[22] = stripslashes("'.$lien[22].'"); // Liens OFF du panneau menu
$lien[23] = stripslashes("'.$lien[23].'"); // Liens ON du panneau menu
$lien[24] = stripslashes("'.$lien[24].'"); // Fond liens ON du panneau menu
$lien[25] = stripslashes("'.$lien[25].'"); // Fond du menu navigation latérale
$lien[26] = stripslashes("'.$lien[26].'"); // Couleur des bordures du menu latéral
$lien[27] = stripslashes("'.$lien[27].'"); // Taille des bordures du menu latéral
$lien[28] = stripslashes("'.$lien[28].'"); // Taille coins arrondis du menu latéral
$lien[29] = stripslashes("'.$lien[29].'"); // Style des bordures du menu latéral
$lien[30] = stripslashes("'.$lien[30].'"); // Fond liens OFF du menu navigation latérale
$lien[31] = stripslashes("'.$lien[31].'"); // Fond liens OFF options panneau menu
$lien[32] = stripslashes("'.$lien[32].'"); // Couleur des bordures options panneau menu
$lien[33] = stripslashes("'.$lien[33].'"); // Taille des bordures options panneau menu
$lien[34] = stripslashes("'.$lien[34].'"); // Taille coins arrondis options panneau menu
$lien[35] = stripslashes("'.$lien[35].'"); // Style des bordures options panneau menu
$lien[36] = stripslashes("'.$lien[36].'"); // Couleur lien de fermeture panneau menu
';
$mettre .= '

$barre[0] = stripslashes("'.$barre[0].'"); // Couleur des HR
$barre[1] = stripslashes("'.$barre[1].'"); // Taille des HR
$barre[2] = stripslashes("'.$barre[2].'"); // Style des HR
$barre[3] = stripslashes("'.$barre[3].'"); // Couleur des bordures
$barre[4] = stripslashes("'.$barre[4].'"); // Taille des bordures
$barre[5] = stripslashes("'.$barre[5].'"); // Style des bordures

$forum[0] = stripslashes("'.$forum[0].'"); // Arrière plan entêtes
$forum[1] = stripslashes("'.$forum[1].'"); // Arrière plan question
$forum[2] = stripslashes("'.$forum[2].'"); // Arrière plan réponse
$forum[11] = stripslashes("'.$forum[11].'"); // Couleur texte dans entête
$forum[12] = stripslashes("'.$forum[12].'"); // Police du texte dans entête
$forum[13] = stripslashes("'.$forum[13].'"); // Style du texte dans entête
$forum[14] = stripslashes("'.$forum[14].'"); // Taille du texte dans entête

$calendar[0] = stripslashes("'.$calendar[0].'"); // Couleur de fond des jours libres du mois
$calendar[1] = stripslashes("'.$calendar[1].'"); // Couleur de fond des jours
$calendar[2] = stripslashes("'.$calendar[2].'"); // Couleur de fond de la journée
$calendar[3] = stripslashes("'.$calendar[3].'"); // Couleur de fond des dimanches
$calendar[4] = stripslashes("'.$calendar[4].'"); // Couleur de fond de la journée si dimanche
$calendar[5] = stripslashes("'.$calendar[5].'"); // Police du calendrier
$calendar[6] = stripslashes("'.$calendar[6].'"); // Taille de la police du calendrier
$calendar[7] = stripslashes("'.$calendar[7].'"); // Couleurs de la police des chiffres
$calendar[8] = stripslashes("'.$calendar[8].'"); // Couleurs de la police des jours de la semaine
$calendar[9] = stripslashes("'.$calendar[9].'"); // Espacement des bordures du calendrier
$calendar[10] = stripslashes("'.$calendar[10].'"); // Couleur de fond évènement
$calendar[11] = stripslashes("'.$calendar[11].'"); // Couleur de fond du calendrier
$calendar[12] = stripslashes("'.$calendar[12].'"); // Taille des bordures du calendrier
$calendar[13] = stripslashes("'.$calendar[13].'"); // Couleur bordure calendrier
$calendar[14] = stripslashes("'.$calendar[14].'"); // Taille coins arrondis calendrier
$calendar[15] = stripslashes("'.$calendar[15].'"); // Style de police du calendrier
$calendar[16] = stripslashes("'.$calendar[16].'"); // Couleur de la police évènement
$calendar[17] = stripslashes("'.$calendar[17].'"); // Couleur de fond des jours de la semaine
$calendar[18] = stripslashes("'.$calendar[18].'"); // Couleur de la police de la journée
$calendar[19] = stripslashes("'.$calendar[19].'"); // Couleur de la police des dimanches
$calendar[20] = stripslashes("'.$calendar[20].'"); // Couleur de la police de la journée si dimanche

$citation[0] = stripslashes("'.$citation[0].'"); // Police des citations
$citation[1] = stripslashes("'.$citation[1].'"); // Taille de la police des citations
$citation[2] = stripslashes("'.$citation[2].'"); // Couleur de la police des citations
$citation[3] = stripslashes("'.$citation[3].'"); // Style de la police des citations
$citation[4] = stripslashes("'.$citation[4].'"); // Couleur des adresses actives
$citation[5] = stripslashes("'.$citation[5].'"); // Couleur de la page courante
$citation[6] = stripslashes("'.$citation[6].'"); // Police de la boîte impression
$citation[7] = stripslashes("'.$citation[7].'"); // Style de la police boîte impression
$citation[8] = stripslashes("'.$citation[8].'"); // Taille de la police boîte impression
$citation[9] = stripslashes("'.$citation[9].'"); // Couleur des textes boîte impression
$citation[10] = stripslashes("'.$citation[10].'"); // Arrière-plan des citations
$citation[11] = stripslashes("'.$citation[11].'"); // Image de fond des citations
$citation[12] = stripslashes("'.$citation[12].'"); // Couleur des bordures des citations
$citation[13] = stripslashes("'.$citation[13].'"); // Taille des bordures des citations
$citation[14] = stripslashes("'.$citation[14].'"); // Taille coins arrondis des citations
$citation[15] = stripslashes("'.$citation[15].'"); // Style des bordures des citations
$citation[16] = stripslashes("'.$citation[16].'"); // Marges externes des citations
$citation[17] = stripslashes("'.$citation[17].'"); // Marges internes des citations

$annuaire[0] = stripslashes("'.$annuaire[0].'"); // Arrière-plan de la catégorie 
$annuaire[1] = stripslashes("'.$annuaire[1].'"); // Police de la catégorie
$annuaire[2] = stripslashes("'.$annuaire[2].'"); // Taille de la police de la catégorie
$annuaire[3] = stripslashes("'.$annuaire[3].'"); // Couleur de la police de la catégorie
$annuaire[4] = stripslashes("'.$annuaire[4].'"); // Couleur de bordure de la catégorie
$annuaire[5] = stripslashes("'.$annuaire[5].'"); // Taille de bordure de la catégorie
$annuaire[6] = stripslashes("'.$annuaire[6].'"); // Taille des coins arrondis de la catégorie
$annuaire[7] = stripslashes("'.$annuaire[7].'"); // Style de police de la catégorie
$annuaire[8] = stripslashes("'.$annuaire[8].'"); // Arrière-plan sous-catégorie 
$annuaire[9] = stripslashes("'.$annuaire[9].'"); // Arrière-plan élément
$annuaire[10] = stripslashes("'.$annuaire[10].'"); // Police de la sous-catégorie
$annuaire[11] = stripslashes("'.$annuaire[11].'"); // Style de police de la sous-catégorie
$annuaire[12] = stripslashes("'.$annuaire[12].'"); // Taille de la police de la sous-catégorie
$annuaire[13] = stripslashes("'.$annuaire[13].'"); // Couleur de la police de la sous-catégorie
$annuaire[14] = stripslashes("'.$annuaire[14].'"); // Police des éléments
$annuaire[15] = stripslashes("'.$annuaire[15].'"); // Style de police des éléments
$annuaire[16] = stripslashes("'.$annuaire[16].'"); // Taille de la police des éléments
$annuaire[17] = stripslashes("'.$annuaire[17].'"); // Couleur de la police des éléments

$dropdown[0] = stripslashes("'.$dropdown[0].'"); // Largeur option menu déroulant
$dropdown[1] = stripslashes("'.$dropdown[1].'"); // Police option menu déroulant
$dropdown[2] = stripslashes("'.$dropdown[2].'"); // Style de police option menu déroulant
$dropdown[3] = stripslashes("'.$dropdown[3].'"); // Taille de police option menu déroulant
$dropdown[4] = stripslashes("'.$dropdown[4].'"); // Couleur de police option menu déroulant
$dropdown[5] = stripslashes("'.$dropdown[5].'"); // Couleur arrière-plan option menu déroulant
// dropdown[6] = stripslashes(""); // Inutilisé
$dropdown[7] = stripslashes("'.$dropdown[7].'"); // Couleur de bordure option menu déroulant
$dropdown[8] = stripslashes("'.$dropdown[8].'"); // Taille de bordure option menu déroulant
$dropdown[9] = stripslashes("'.$dropdown[9].'"); // Style de bordure option menu déroulant
$dropdown[10] = stripslashes("'.$dropdown[10].'"); // Taille des coins arrondis option menu déroulant
$dropdown[11] = stripslashes("'.$dropdown[11].'"); // Largeur sous-option menu déroulant
$dropdown[12] = stripslashes("'.$dropdown[12].'"); // Couleur arrière-plan sous-option menu déroulant
// dropdown[13] = stripslashes(""); // Inutilisé
$dropdown[14] = stripslashes("'.$dropdown[14].'"); // Couleur arrière-plan option visitée menu déroulant
// dropdown[15] = stripslashes(""); // Inutilisé
$dropdown[16] = stripslashes("'.$dropdown[16].'"); // Couleur texte option visitée menu déroulant
$dropdown[17] = stripslashes("'.$dropdown[17].'"); // Largeur panneau menu déroulant linéaire
$dropdown[18] = stripslashes("'.$dropdown[18].'"); // Hauteur panneau option menu déroulant linaire
$dropdown[19] = stripslashes("'.$dropdown[19].'"); // Couleur arrière-plan option menu déroulant linaire
// dropdown[20] = stripslashes(""); // Inutilisé
$dropdown[21] = stripslashes("'.$dropdown[21].'"); // Couleur de bordure option menu déroulant linéaire
$dropdown[22] = stripslashes("'.$dropdown[22].'"); // Taille de bordure option menu déroulant linéaire
$dropdown[23] = stripslashes("'.$dropdown[23].'"); // Style de bordure option menu déroulant linéaire
$dropdown[24] = stripslashes("'.$dropdown[24].'"); // Taille des coins arrondis option menu déroulant linéaire
$dropdown[25] = stripslashes("'.$dropdown[25].'"); // Couleur texte sous-option menu déroulant
$dropdown[26] = stripslashes("'.$dropdown[26].'"); // Couleur texte panneau menu déroulant linéaire
$dropdown[27] = stripslashes("'.$dropdown[27].'"); // Couleur arrière-plan option survolée menu déroulant
// dropdown[28] = stripslashes(""); // Inutilisé
$dropdown[29] = stripslashes("'.$dropdown[29].'"); // Couleur texte option survolée menu déroulant

$tabs[0] = stripslashes("'.$tabs[0].'"); // Couleur des textes des onglets inactifs
$tabs[1] = stripslashes("'.$tabs[1].'"); // Couleur arrière-plan des onglets inactifs
$tabs[2] = stripslashes("'.$tabs[2].'"); // Couleur des bordures des onglets inactifs
$tabs[3] = stripslashes("'.$tabs[3].'"); // Taille des bordures des onglets inactifs
$tabs[4] = stripslashes("'.$tabs[4].'"); // Taille des coins arrondis des onglets inactifs
$tabs[5] = stripslashes("'.$tabs[5].'"); // Couleur arrière-plan des onglets actifs
$tabs[6] = stripslashes("'.$tabs[6].'"); // Couleur des textes des onglets actifs
$tabs[7] = stripslashes("'.$tabs[7].'"); // Couleur arrière-plan des panneaux des onglets
$tabs[8] = stripslashes("'.$tabs[8].'"); // Couleur des bordures des panneaux des onglets
$tabs[9] = stripslashes("'.$tabs[9].'"); // Taille des bordures des panneaux des onglets
$tabs[10] = stripslashes("'.$tabs[10].'"); // Taille des coins arrondis des panneaux des onglets
$tabs[11] = stripslashes("'.$tabs[11].'"); // Couleur des textes des accordéons inactifs
$tabs[12] = stripslashes("'.$tabs[12].'"); // Couleur arrière-plan des accordéons inactifs
$tabs[13] = stripslashes("'.$tabs[13].'"); // Couleur des bordures des accordéons inactifs
$tabs[14] = stripslashes("'.$tabs[14].'"); // Taille des bordures des accordéons inactifs
$tabs[15] = stripslashes("'.$tabs[15].'"); // Taille des coins arrondis des accordéons inactifs
$tabs[16] = stripslashes("'.$tabs[16].'"); // Couleur arrière-plan des accordéons actifs
$tabs[17] = stripslashes("'.$tabs[17].'"); // Couleur des textes des accordéons actifs
$tabs[18] = stripslashes("'.$tabs[18].'"); // Couleur arrière-plan des panneaux des accordéons
$tabs[19] = stripslashes("'.$tabs[19].'"); // Couleur des bordures des panneaux des accordéons
$tabs[20] = stripslashes("'.$tabs[20].'"); // Taille des bordures des panneaux des accordéons
$tabs[21] = stripslashes("'.$tabs[21].'"); // Taille des coins arrondis des panneaux des accordéons
$tabs[22] = stripslashes("'.$tabs[22].'"); // Couleur pour le fondu des fenêtre modales
$tabs[23] = stripslashes("'.$tabs[23].'"); // Opacité pour le fondu des fenêtre modales
$tabs[24] = stripslashes("'.$tabs[24].'"); // Couleur arrière-plan des fenêtre modales
$tabs[25] = stripslashes("'.$tabs[25].'"); // Couleur des bordures des fenêtre modales
$tabs[26] = stripslashes("'.$tabs[26].'"); // Taille des bordures des fenêtre modales
$tabs[27] = stripslashes("'.$tabs[27].'"); // Taille des coins arrondis des fenêtre modales
$tabs[28] = stripslashes("'.$tabs[28].'"); // Couleur arrière-plan des onglets survolés
$tabs[29] = stripslashes("'.$tabs[29].'"); // Couleur des textes des onglets survolés
$tabs[30] = stripslashes("'.$tabs[30].'"); // Couleur arrière-plan des accordéons survolés
$tabs[31] = stripslashes("'.$tabs[31].'"); // Couleur des textes des accordéons survolés

$other[0] = stripslashes("'.$other[0].'"); // Couleur des textes visites du jour
$other[1] = stripslashes("'.$other[1].'"); // Couleur arrière-plan visites du jour
$other[2] = stripslashes("'.$other[2].'"); // Couleur des bordures visites du jour
$other[3] = stripslashes("'.$other[3].'"); // Taille des bordures visites du jour
$other[4] = stripslashes("'.$other[4].'"); // Taille des coins arrondis visites du jour
$other[5] = stripslashes("'.$other[5].'"); // Marges externes logo
$other[6] = stripslashes("'.$other[6].'"); // Marges internes logo
$other[7] = stripslashes("'.$other[7].'"); // Marges externes bannières
$other[8] = stripslashes("'.$other[8].'"); // Marges internes bannières
$other[9] = stripslashes("'.$other[9].'"); // Couleur des bordures citations de texte
$other[10] = stripslashes("'.$other[10].'"); // Taille des bordures citations de texte
$other[11] = stripslashes("'.$other[11].'"); // Style des bordures citations de texte
$other[12] = stripslashes("'.$other[12].'"); // Couleur arrière-plan auteur de la citation
$other[13] = stripslashes("'.$other[13].'"); // Couleur des textes auteur de la citation
$other[14] = stripslashes("'.$other[14].'"); // Couleur arrière-plan info bulle
$other[15] = stripslashes("'.$other[15].'"); // Couleur des bordures info bulle
$other[16] = stripslashes("'.$other[16].'"); // Taille des bordures info bulle
$other[17] = stripslashes("'.$other[17].'"); // Taille des coins arrondis info bulle
$other[18] = stripslashes("'.$other[18].'"); // Couleur des textes cryptogramme
$other[19] = stripslashes("'.$other[19].'"); // Couleur arrière-plan cryptogramme
$other[20] = stripslashes("'.$other[20].'"); // Couleur des bordures cryptogramme
$other[21] = stripslashes("'.$other[21].'"); // Taille des bordures cryptogramme
$other[22] = stripslashes("'.$other[22].'"); // Taille des coins arrondis cryptogramme
$other[23] = stripslashes("'.$other[23].'"); // Couleur arrière-plan citation de code
$other[24] = stripslashes("'.$other[24].'"); // Couleur arrière-plan CKEditor
$other[25] = stripslashes("'.$other[25].'"); // Couleur des textes CKEditor
$other[26] = stripslashes("'.$other[26].'"); // Taille des textes CKEditor
$other[27] = stripslashes("'.$other[27].'"); // Taille des textes blocs infos
$other[28] = stripslashes("'.$other[28].'"); // Couleur arrière-plan bandeau acceptation cookies
$other[29] = stripslashes("'.$other[29].'"); // Couleur des textes bandeau acceptation cookies
$other[30] = stripslashes("'.$other[30].'"); // Taille des textes bandeau acceptation cookies
$other[31] = ""; // inutilisé
$other[32] = ""; // inutilisé
$other[33] = ""; // inutilisé
$other[34] = ""; // inutilisé

$opacity[0] = stripslashes("'.$opacity[0].'"); // Opacité arrière-plan entête
$opacity[1] = stripslashes("'.$opacity[1].'"); // Opacité arrière-plan bas de page
$opacity[2] = stripslashes("'.$opacity[2].'"); // Opacité arrière-plan pied de page
$opacity[3] = stripslashes("'.$opacity[3].'"); // Opacité arrière-plan menu icônes
$opacity[4] = stripslashes("'.$opacity[4].'"); // Opacité arrière-plan colonne gauche
$opacity[5] = stripslashes("'.$opacity[5].'"); // Opacité arrière-plan colonne droite
$opacity[6] = stripslashes("'.$opacity[6].'"); // Opacité arrière-plan colonnes blog
$opacity[7] = stripslashes("'.$opacity[7].'"); // Opacité arrière-plan zone principale
$opacity[8] = stripslashes("'.$opacity[8].'"); // Opacité arrière-plan colonne centrale
$opacity[9] = stripslashes("'.$opacity[9].'"); // Opacité arrière-plan titres boîtes centrales
$opacity[10] = stripslashes("'.$opacity[10].'"); // Opacité arrière-plan tables boîtes centrales
$opacity[11] = stripslashes("'.$opacity[11].'"); // Opacité arrière-plan titres boîtes latérales
$opacity[12] = stripslashes("'.$opacity[12].'"); // Opacité arrière-plan tables boîtes latérales
$opacity[13] = ""; // inutilisé
$opacity[14] = ""; // inutilisé
$opacity[15] = stripslashes("'.$opacity[15].'"); // Opacité arrière-plan zone au-dessus
$opacity[16] = stripslashes("'.$opacity[16].'"); // Opacité arrière-plan zone édito
$opacity[17] = stripslashes("'.$opacity[17].'"); // Opacité arrière-plan zone au-dessous
$opacity[18] = stripslashes("'.$opacity[18].'"); // Opacité arrière-plan header
$opacity[19] = stripslashes("'.$opacity[19].'"); // Opacité arrière-plan citations
$opacity[20] = stripslashes("'.$opacity[20].'"); // Opacité du bouton flottant
// opacity[21] = stripslashes(""); // Inutilisé
$opacity[22] = stripslashes("'.$opacity[22].'"); // Opacité arrière-plan auteur de la citation
$opacity[23] = stripslashes("'.$opacity[23].'"); // Opacité arrière-plan citation de code

// marge[1] = stripslashes(""); // Inutilisé
// marge[2] = stripslashes(""); // Inutilisé
// marge[3] = stripslashes(""); // Inutilisé
// marge[4] = stripslashes(""); // Inutilisé
// marge[5] = stripslashes(""); // Inutilisé
// marge[6] = stripslashes(""); // Inutilisé
// marge[7] = stripslashes(""); // Inutilisé
// marge[8] = stripslashes(""); // Inutilisé
$marge[9] = stripslashes("'.$marge[9].'"); // Marges externes titre boîtes centrales
$marge[10] = stripslashes("'.$marge[10].'"); // Marges internes titre boîtes centrales
$marge[11] = stripslashes("'.$marge[11].'"); // Marges externes boîtes centrales
$marge[12] = stripslashes("'.$marge[12].'"); // Marges internes boîtes centrales
$marge[13] = stripslashes("'.$marge[13].'"); // Marges externes titre boîtes latérales
$marge[14] = stripslashes("'.$marge[14].'"); // Marges internes titre boîtes latérales
$marge[15] = stripslashes("'.$marge[15].'"); // Marges externes boîtes latérales
$marge[16] = stripslashes("'.$marge[16].'"); // Marges internes boîtes latérales
// marge[17] = stripslashes(""); // Inutilisé
// marge[18] = stripslashes(""); // Inutilisé
// marge[19] = stripslashes(""); // Inutilisé
// marge[20] = stripslashes(""); // Inutilisé
// marge[21] = stripslashes(""); // Inutilisé
// marge[22] = stripslashes(""); Inutilisé
// marge[23] = stripslashes(""); Inutilisé
$marge[24] = stripslashes("'.$marge[24].'"); // Marges internes du bandeau TOP
$marge[25] = stripslashes("'.$marge[25].'"); // Marges internes du bandeau MAIN
$marge[26] = stripslashes("'.$marge[26].'"); // Marges internes du bandeau BOTTOM
$marge[27] = stripslashes("'.$marge[27].'"); // Marges internes du bandeau FOOTER
$marge[28] = stripslashes("'.$marge[28].'"); // Marges internes zone au-dessus
$marge[29] = stripslashes("'.$marge[29].'"); // Marges internes zone editorial
$marge[30] = stripslashes("'.$marge[30].'"); // Marges internes zone au-dessous
$marge[31] = ""; // inutilisé
$marge[32] = ""; // inutilisé
$marge[33] = stripslashes("'.$marge[33].'"); // Marges externes menu latéral
$marge[34] = stripslashes("'.$marge[34].'"); // Marges internes menu latéral
$marge[35] = stripslashes("'.$marge[35].'"); // Marges externes options menu latéral
$marge[36] = stripslashes("'.$marge[36].'"); // Marges internes options menu latéral
$marge[37] = stripslashes("'.$marge[37].'"); // Marges externes icône menu latéral
$marge[38] = stripslashes("'.$marge[38].'"); // Marges externes icône drapeau

$presform[0] = stripslashes("'.$presform[0].'"); // Couleur des textes dans les boites de choix et boutons de commande
$presform[1] = stripslashes("'.$presform[1].'"); // Couleur des boites de choix
$presform[2] = stripslashes("'.$presform[2].'"); // Couleur des boutons de commande
$presform[3] = stripslashes("'.$presform[3].'"); // Couleur des zone de texte
$presform[4] = stripslashes("'.$presform[4].'"); // Police dans la présentation des formulaires
$presform[5] = stripslashes("'.$presform[5].'"); // Taille de la police dans la présentation des formulaires
$presform[6] = stripslashes("'.$presform[6].'"); // Couleur de fond des textarea
$presform[7] = stripslashes("'.$presform[7].'"); // Taille de la bordure
$presform[8] = stripslashes("'.$presform[8].'"); // Couleur de la bordure
$presform[9] = stripslashes("'.$presform[9].'"); // Taille coins arrondis
$presform[10] = stripslashes("'.$presform[10].'"); // Style de la police de présentation
$presform[11] = stripslashes("'.$presform[11].'"); // Couleur du texte des boutons de commande
$presform[12] = stripslashes("'.$presform[12].'"); // Marges internes des boutons de commande
$presform[13] = stripslashes("'.$presform[13].'"); // Couleur des boutons de commande survolés
$presform[14] = stripslashes("'.$presform[14].'"); // Couleur du texte des boutons de commande survolés

?>';

WriteFullDB($meskin.'confskin.inc', $mettre);
?>
confupdt.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/confupdt.inc'
View Content
<?php
/*******************************************************************************
 *   Config Update
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : correction serviz
 ******************************************************************************/

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

if ($site[3] == '') {
    $site[3] = 'http://'.str_replace('/admin','/',$_SERVER['HTTP_HOST'].dirname($PHP_SELF));
}

if (!isset($serviz[114])) $serviz[114] = '';
if (!isset($serviz[182])) $serviz[182] = '0';
if (!isset($nom[14])) $nom[14] = '';
if (!isset($nom[15])) $nom[14] = '';
if (!isset($nom[28])) $nom[28] = '';
if (!isset($nom[28])) $nom[29] = '';
if (!isset($droitaccegroupredac)) $droitaccegroupredac = '';
if (!isset($smtp[6])) 
{
	$smtp[6] = '';
	$smtp[7]  = '';
	
}				  
$serviz[34] = 'on'; // Compteur de lecture Threads Forum
$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"config.inc\")) {
    header(\"location:../index.php\");
    die();
}

\$site[0] = stripslashes(\"$site[0]\"); // Titre du site pour l Editorial langue principale
\$site[1] = stripslashes(\"$site[1]\"); // Meta Description du site
\$site[2] = stripslashes(\"$site[2]\"); // Meta Mots-clés du site
\$site[3] = stripslashes(\"$site[3]\"); // URL du site
// site[4] is in conskin.inc // Nouvelles sur la page d accueil
\$site[5] = stripslashes(\"$site[5]\"); // Activation des news ou pas
\$site[6] = stripslashes(\"$site[6]\"); // Hébergement derrière un proxy
\$site[7] = stripslashes(\"$site[7]\"); // Hébergement avec mise en cache
\$site[8] = stripslashes(\"$site[8]\"); // Temporisation en s de lecture du cache
\$site[9] = stripslashes(\"$site[9]\"); // Meta Auteur du site
\$site[10] = stripslashes(\"$site[10]\"); // Page pour la redirection des erreurs 404
\$site[11] = stripslashes(\"$site[11]\"); // Titre du site pour l Editorial langue secondaire
\$site[12] = stripslashes(\"$site[12]\"); // Page secondaire pour la redirection des erreurs 404
\$site[13] = stripslashes(\"$site[13]\"); // Hauteur en pixels des nouvelles
\$site[19] = stripslashes(\"$site[19]\"); // Format Dates
// site[20] is in confskin.inc // Messages Forum sur la page d accueil
// site[21] is in confskin.inc // ID du message Livre d or préféré
\$site[22] = stripslashes(\"$site[22]\"); // Format Heure
\$site[23] = stripslashes(\"$site[23]\"); // Séparateur Date & Heure
\$site[24] = stripslashes(\"$site[24]\"); // Logo Copyright
\$site[25] = stripslashes(\"$site[25]\"); // Position Logo Copyright
\$site[26] = stripslashes(\"$site[26]\"); // Compression des Pages
// site[27] = stripslashes(\"\"); // Inutilisé
// (supprimé) Barre de progression attente popup postage
// site[29] is in confskin.inc // Nombre de caractères des nouvelles en page d accueil
\$site[30] = stripslashes(\"$site[30]\"); // Activation du Blog ou pas
// site[31] is in confskin.inc // Blog sur la page d accueil
\$site[32] = stripslashes(\"$site[32]\"); // Icônes validator W3C
// site[33] is in confskin.inc // Nombre de caractères des billets en page d accueil
// site[34] is in confskin.inc // Nombre de caractères des posts forum en page d accueil
\$site[35] = stripslashes(\"$site[35]\"); // Style du Copyright
\$site[36] = stripslashes(\"$site[36]\"); // Hauteur en pixels des billets du blog
\$site[37] = stripslashes(\"$site[37]\"); // Thème éditeur public CKEditor
\$site['TZ'] = stripslashes(\"".$site['TZ']."\"); // Fuseau horaire
\$site['NTC'] = stripslashes(\"".$site['NTC']."\"); // Nombre de tentatives de connexion
\$site['URLR'] = stripslashes(\"".$site['URLR']."\"); // URL rewriting
\$site['PG'] = stripslashes(\"".$site['PG']."\"); // Alias du script postguest.php
\$site['BLS'] = stripslashes(\"".$site['BLS']."\"); // Alias du script blogs.php
\$site['BL'] = stripslashes(\"".$site['BL']."\"); // Alias du script blog.php
\$site['FR'] = stripslashes(\"".$site['FR']."\"); // Alias du script forum.php
\$site['FRT'] = stripslashes(\"".$site['FRT']."\"); // Alias du script fortopic.php
\$site['TH'] = stripslashes(\"".$site['TH']."\"); // Alias du script thread.php
\$site['GB'] = stripslashes(\"".$site['GB']."\"); // Alias du script guestbk.php
\$site['NE'] = stripslashes(\"".$site['NE']."\"); // Alias du script news.php
\$site['USR'] = stripslashes(\"".$site['USR']."\"); // Alias du script user.php
\$site['NL'] = stripslashes(\"".$site['NL']."\"); // Alias du script newsletter.php
\$site['DN'] = stripslashes(\"".$site['DN']."\"); // Alias du script download.php
\$site['CT'] = stripslashes(\"".$site['CT']."\"); // Alias du script contact.php
\$site['MD'] = stripslashes(\"".$site['MD']."\"); // Mode préconisé pour les dossiers
\$site['MF'] = stripslashes(\"".$site['MF']."\"); // Mode préconisé pour les fichiers

\$urlrw[0] = stripslashes(\"$urlrw[0]\"); // Accueil / Admin / Error
\$urlrw[1] = stripslashes(\"$urlrw[1]\"); // Blog
\$urlrw[2] = stripslashes(\"$urlrw[2]\"); // Contact
\$urlrw[3] = stripslashes(\"$urlrw[3]\"); // Connexion  / Compte
\$urlrw[4] = stripslashes(\"$urlrw[4]\"); // FAQ
\$urlrw[5] = stripslashes(\"$urlrw[5]\"); // Forum
\$urlrw[6] = stripslashes(\"$urlrw[6]\"); // Liens
\$urlrw[7] = stripslashes(\"$urlrw[7]\"); // Livre d or
\$urlrw[8] = stripslashes(\"$urlrw[8]\"); // Nouvelles
\$urlrw[9] = stripslashes(\"$urlrw[9]\"); // Photos
// urlrw[10] = stripslashes(\"\"); // Statistiques supprimé
\$urlrw[11] = stripslashes(\"$urlrw[11]\"); // Téléchargements
\$urlrw[12] = stripslashes(\"$urlrw[12]\"); // Recherches
\$urlrw[13] = stripslashes(\"$urlrw[13]\"); // Messages privés
\$urlrw[14] = stripslashes(\"$urlrw[14]\"); // Mesages publics
\$urlrw[15] = stripslashes(\"$urlrw[15]\"); // Utilisateurs
// urlrw[16] = stripslashes(\"\"); // Sondage supprimé
\$urlrw[17] = stripslashes(\"$urlrw[17]\"); // Calendrier / Agenda
\$urlrw[18] = stripslashes(\"$urlrw[18]\"); // Lettre d information
\$urlrw[19] = stripslashes(\"$urlrw[19]\"); // Documents RSS
\$urlrw[20] = stripslashes(\"$urlrw[20]\"); // Articles

\$page[12] = stripslashes(\"$page[12]\"); // Thème smileys
\$page[14] = stripslashes(\"$page[14]\"); // Thème skins
\$page[23] = stripslashes(\"$page[23]\"); // Thème avatars
// page[27] = stripslashes(\"\"); // Inutilisé

\$texte[3] = stripslashes(\"$texte[3]\"); // Puce articles

\$lang[0] = stripslashes(\"$lang[0]\"); // Langue principale du site
\$lang[1] = stripslashes(\"$lang[1]\"); // Deuxième langue du site

\$user[0] = stripslashes(\"$user[0]\"); // Webmaster
\$user[1] = stripslashes(\"$user[1]\"); // e-mail du responsable du site
\$user[3] = stripslashes(\"$user[3]\"); // e-mail PHP

\$nom[0] = stripslashes(\"$nom[0]\"); // Nom de l accueil langue principale
\$nom[1] = stripslashes(\"$nom[1]\"); // Page des téléchargements langue principale
\$nom[2] = stripslashes(\"$nom[2]\"); // Page des images langue principale
\$nom[3] = stripslashes(\"$nom[3]\"); // Page des liens langue principale
// (supprimé) Boite des articles à gauche langue principale
// (supprimé) Boite spéciale langue principale
// (supprimé) Sondage langue principale WEB
\$nom[7] = stripslashes(\"$nom[7]\"); // Nouvelles langue principale
\$nom[8] = stripslashes(\"$nom[8]\"); // Compteur langue principale WEB
\$nom[9] = stripslashes(\"$nom[9]\"); // Livre d or langue principale
\$nom[10] = stripslashes(\"$nom[10]\"); // Nom de l accueil deuxième langue
\$nom[11] = stripslashes(\"$nom[11]\"); // Page des téléchargements deuxième langue
\$nom[12] = stripslashes(\"$nom[12]\"); // Page des images deuxième langue
\$nom[13] = stripslashes(\"$nom[13]\"); // Page des liens deuxième langue
\$nom[14] = stripslashes(\"$nom[14]\"); // Bouton connexion langue principale
\$nom[15] = stripslashes(\"$nom[15]\"); // Bouton connexion deuxième langue
// (supprimé) Sondage deuxième langue WEB
\$nom[17] = stripslashes(\"$nom[17]\"); // Nouvelles deuxième langue
\$nom[18] = stripslashes(\"$nom[18]\"); // Compteur deuxième langue WEB
\$nom[19] = stripslashes(\"$nom[19]\"); // Livre d or deuxième langue
\$nom[20] = stripslashes(\"$nom[20]\"); // Recherche langue principale WEB
\$nom[21] = stripslashes(\"$nom[21]\"); // Recherche deuxième langue WEB
\$nom[22] = stripslashes(\"$nom[22]\"); // Forum langue principale
\$nom[23] = stripslashes(\"$nom[23]\"); // Forum deuxième langue
\$nom[24] = stripslashes(\"$nom[24]\"); // FAQ langue principale
\$nom[25] = stripslashes(\"$nom[25]\"); // FAQ deuxième langue
\$nom[26] = stripslashes(\"$nom[26]\"); // Statistiques langue principale
\$nom[27] = stripslashes(\"$nom[27]\"); // Statistiques deuxième langue
\$nom[28] = stripslashes(\"$nom[28]\"); // Bouton déconnexion langue principale
\$nom[29] = stripslashes(\"$nom[29]\"); // Bouton déconnexion deuxième langue
\$nom[30] = stripslashes(\"$nom[30]\"); // Boite Photorama langue principale WEB
\$nom[31] = stripslashes(\"$nom[31]\"); // Boite Photorama deuxième langue WEB
\$nom[32] = stripslashes(\"$nom[32]\"); // Boite Calendrier langue principale WEB
\$nom[33] = stripslashes(\"$nom[33]\"); // Boite Calendrier deuxième langue WEB
\$nom[34] = stripslashes(\"$nom[34]\"); // Boite préférences utilisateur langue principale WEB
\$nom[35] = stripslashes(\"$nom[35]\"); // Boite préférences utilisateur deuxième langue WEB
\$nom[36] = stripslashes(\"$nom[36]\"); // Boite RSS langue principale WEB
\$nom[37] = stripslashes(\"$nom[37]\"); // Boite RSS deuxième langue WEB
\$nom[38] = stripslashes(\"$nom[38]\"); // Boite Newsletter langue principale WEB
\$nom[39] = stripslashes(\"$nom[39]\"); // Boite Newsletter deuxième langue WEB
\$nom[40] = stripslashes(\"$nom[40]\"); // Boite Webmaster - Infos langue principale WEB
\$nom[41] = stripslashes(\"$nom[41]\"); // Boite Webmaster - Infos deuxième langue WEB
\$nom[42] = stripslashes(\"$nom[42]\"); // Blog langue principale
\$nom[43] = stripslashes(\"$nom[43]\"); // Blog deuxième langue
\$nom[44] = stripslashes(\"$nom[44]\"); // Boîte Menu langue principale WEB
\$nom[45] = stripslashes(\"$nom[45]\"); // Boîte Menu deuxième langue WEB
\$nom[46] = stripslashes(\"$nom[46]\"); // Contact langue principale
\$nom[47] = stripslashes(\"$nom[47]\"); // Contact deuxième langue
\$nom[48] = stripslashes(\"$nom[48]\"); // Réseaux sociaux langue principale WEB
\$nom[49] = stripslashes(\"$nom[49]\"); // Réseaux sociaux deuxième langue WEB
// (supprimé)
// (supprimé)
// (supprimé)
// (supprimé)
\$nom[54] = stripslashes(\"$nom[54]\"); // Boîte nouveautés langue principale WEB
\$nom[55] = stripslashes(\"$nom[55]\"); // Boîte nouveautés deuxième langue WEB
\$nom[56] = stripslashes(\"$nom[56]\"); // Boîte Contact langue principale WEB
\$nom[57] = stripslashes(\"$nom[57]\"); // Boîte Contact deuxième langue WEB

\$menuico[0] = stripslashes(\"$menuico[0]\"); // Icône Accueil
\$menuico[1] = stripslashes(\"$menuico[1]\"); // Icône Nouvelles
\$menuico[2] = stripslashes(\"$menuico[2]\"); // Icône Blog
\$menuico[3] = stripslashes(\"$menuico[3]\"); // Icône Photorama
\$menuico[4] = stripslashes(\"$menuico[4]\"); // Icône Téléchargements
\$menuico[5] = stripslashes(\"$menuico[5]\"); // Icône Liens
\$menuico[6] = stripslashes(\"$menuico[6]\"); // Icône FAQ
\$menuico[7] = stripslashes(\"$menuico[7]\"); // Icône Livre d or
\$menuico[8] = stripslashes(\"$menuico[8]\"); // Icône Forum
\$menuico[9] = stripslashes(\"$menuico[9]\"); // Icône Stats
\$menuico[10] = stripslashes(\"$menuico[10]\"); // Icône Contact avancé
\$menuico[11] = stripslashes(\"$menuico[11]\"); // Icône connexion
\$menuico[12] = stripslashes(\"$menuico[12]\"); // Page exécution Nouvelles 
\$menuico[13] = stripslashes(\"$menuico[13]\"); // Page exécution Blog
\$menuico[14] = stripslashes(\"$menuico[14]\"); // Page exécution Photorama
\$menuico[15] = stripslashes(\"$menuico[15]\"); // Page exécution Téléchargements
\$menuico[16] = stripslashes(\"$menuico[16]\"); // Page exécution Liens
\$menuico[17] = stripslashes(\"$menuico[17]\"); // Page exécution FAQ
\$menuico[18] = stripslashes(\"$menuico[18]\"); // Page exécution Livre d or
\$menuico[19] = stripslashes(\"$menuico[19]\"); // Page exécution Forum
// menuico[20] = stripslashes(\"\"); // Inutilisé
\$menuico[21] = stripslashes(\"$menuico[21]\"); // Page exécution Contact avancé
\$menuico[22] = stripslashes(\"$menuico[22]\"); // Page affichage Nouvelles
\$menuico[23] = stripslashes(\"$menuico[23]\"); // Page affichage Blog
\$menuico[24] = stripslashes(\"$menuico[24]\"); // Page affichage Photorama
\$menuico[25] = stripslashes(\"$menuico[25]\"); // Page affichage Téléchargements
\$menuico[26] = stripslashes(\"$menuico[26]\"); // Page affichage Liens
\$menuico[27] = stripslashes(\"$menuico[27]\"); // Page affichage FAQ
\$menuico[28] = stripslashes(\"$menuico[28]\"); // Page affichage Livre d or
\$menuico[29] = stripslashes(\"$menuico[29]\"); // Page affichage Forum
\$menuico[30] = stripslashes(\"$menuico[30]\"); // Page affichage Stats
\$menuico[31] = stripslashes(\"$menuico[31]\"); // Page affichage Contact avancé
\$menuico[32] = stripslashes(\"$menuico[32]\"); // Groupe Nouvelles
\$menuico[33] = stripslashes(\"$menuico[33]\"); // Groupe Blog
\$menuico[34] = stripslashes(\"$menuico[34]\"); // Groupe Photorama
\$menuico[35] = stripslashes(\"$menuico[35]\"); // Groupe Téléchargements
\$menuico[36] = stripslashes(\"$menuico[36]\"); // Groupe Liens
\$menuico[37] = stripslashes(\"$menuico[37]\"); // Groupe FAQ
\$menuico[38] = stripslashes(\"$menuico[38]\"); // Groupe Livre d or
\$menuico[39] = stripslashes(\"$menuico[39]\"); // Groupe Forum
\$menuico[40] = stripslashes(\"$menuico[40]\"); // Groupe Stats

// boites dynamiques partie WEB
\$dynabox[0] = stripslashes(\"$dynabox[0]\"); // Boîte Menu
// dynabox[1] = stripslashes(\"\"); // Boîte Sondage
\$dynabox[2] = stripslashes(\"$dynabox[2]\"); // Boîte Compteur
\$dynabox[3] = stripslashes(\"$dynabox[3]\"); // Boîte Recherche
\$dynabox[4] = stripslashes(\"$dynabox[4]\"); // Boîte Calendrier
\$dynabox[5] = stripslashes(\"$dynabox[5]\"); // Boîte préférences
\$dynabox[6] = stripslashes(\"$dynabox[6]\"); // Boîte Newsletter
\$dynabox[7] = stripslashes(\"$dynabox[7]\"); // Boîte RSS
\$dynabox[8] = stripslashes(\"$dynabox[8]\"); // Boîte Webmaster - Infos
\$dynabox[9] = stripslashes(\"$dynabox[9]\"); // Boîte réseaux sociaux
\$dynabox[10] = stripslashes(\"$dynabox[10]\"); // Boîte Rubriques blog
\$dynabox[11] = stripslashes(\"$dynabox[11]\"); // Boîte Derniers billets blog
\$dynabox[12] = stripslashes(\"$dynabox[12]\"); // Boîte Derniers commentaires blog
\$dynabox[13] = stripslashes(\"$dynabox[13]\"); // Boîte Calendrier du blog
\$dynabox[14] = stripslashes(\"$dynabox[14]\"); // Boîte Billets des amis blog
\$dynabox[15] = stripslashes(\"$dynabox[15]\"); // Boîte Nouveautés du site
\$dynabox[16] = stripslashes(\"$dynabox[16]\"); // Boîte Contacts avancés
\$dynabox[17] = stripslashes(\"$dynabox[17]\"); // Boîte Photorama
\$dynabox[18] = stripslashes(\"$dynabox[18]\"); // Boîte Archives blog

\$serviz[0] = stripslashes(\"on\"); // Citations ON
\$serviz[1] = stripslashes(\"$serviz[1]\"); // Choix Page d accueil
\$serviz[2] = stripslashes(\"$serviz[2]\"); // Nb de news / page
\$serviz[3] = stripslashes(\"$serviz[3]\"); // Carnet de bord du site
\$serviz[4] = stripslashes(\"$serviz[4]\"); // Nb de téléchargements / page
\$serviz[5] = stripslashes(\"$serviz[5]\"); // Nb de liens / page
\$serviz[6] = stripslashes(\"$serviz[6]\"); // Nb de FAQ / page
\$serviz[7] = stripslashes(\"$serviz[7]\"); // Nb de messages Guestbook / page
\$serviz[8] = stripslashes(\"$serviz[8]\"); // Nouvelles ON / OFF
\$serviz[9] = stripslashes(\"$serviz[9]\"); // Photos ON / OFF
\$serviz[10] = stripslashes(\"$serviz[10]\"); // Téléchargements ON / OFF
\$serviz[11] = stripslashes(\"$serviz[11]\"); // Liens ON / OFF
\$serviz[12] = stripslashes(\"$serviz[12]\"); // Livre d or ON / OFF
\$serviz[13] = stripslashes(\"$serviz[13]\"); // Forum ON / OFF
\$serviz[14] = stripslashes(\"$serviz[14]\"); // FAQ ON / OFF
// serviz[15] = stripslashes(\"\"); // Inutilisé
\$serviz[16] = stripslashes(\"$serviz[16]\"); // Publication Nouvelles RSS ON / OFF
\$serviz[17] = stripslashes(\"$serviz[17]\"); // Nb de messages Forum / page
\$serviz[18] = stripslashes(\"$serviz[18]\"); // Désactiver le courrier interne ON / OFF
\$serviz[19] = stripslashes(\"on\"); // Bannières ON
\$serviz[20] = stripslashes(\"$serviz[20]\"); // Nb de messages Thread / page
\$serviz[21] = stripslashes(\"$serviz[21]\"); // Contact site ON / OFF
// serviz[22] = stripslashes(\"\"); // Inutilisé
// serviz[23] = stripslashes(\"\");  // Inutilisé
\$serviz[24] = stripslashes(\"$serviz[24]\"); // Boîte recherche ON / OFF
\$serviz[25] = stripslashes(\"$serviz[25]\"); // Rotation automatique des bannières
\$serviz[26] = stripslashes(\"$serviz[26]\"); // Durée d affichage en secondes d une bannière
\$serviz[27] = stripslashes(\"$serviz[27]\"); // Billets RSS des amis ON /OFF
// serviz[28] is in confskin.inc  // Préférences visiteurs
\$serviz[29] = stripslashes(\"$serviz[29]\"); // Réactions aux articles ON / OFF / Ok Admin
\$serviz[30] = stripslashes(\"$serviz[30]\"); // Nb Commentaires blog - Réactions aux articles / page
\$serviz[31] = stripslashes(\"$serviz[31]\"); // Pseudo administrateur principal
\$serviz[32] = stripslashes(\"$serviz[32]\"); // Accès à l administration rapide
\$serviz[33] = stripslashes(\"$serviz[33]\"); // Compteur de lecture Articles
\$serviz[34] = stripslashes(\"$serviz[34]\"); // Compteur de lecture Threads Forum
\$serviz[35] = stripslashes(\"$serviz[35]\"); // Compteur de Nb de téléchargements
\$serviz[36] = stripslashes(\"$serviz[36]\"); // Newsletter ON / OFF /TEST
\$serviz[37] = stripslashes(\"$serviz[37]\"); // Nb de news publiées
// \$serviz[38] is in confskin.inc  // RSS News ON / OFF
\$serviz[39] = stripslashes(\"$serviz[39]\"); // Durée Cache RSS
\$serviz[40] = stripslashes(\"$serviz[40]\"); // Publication dans livre d or
\$serviz[41] = stripslashes(\"$serviz[41]\"); // Publication dans forum
\$serviz[42] = stripslashes(\"$serviz[42]\"); // Option Rédacteur ON / OFF
\$serviz[43] = stripslashes(\"$serviz[43]\"); // Avatar préférences webmaster
\$serviz[44] = stripslashes(\"$serviz[44]\"); // Mise en maintenance du site
\$serviz[45] = stripslashes(\"on\"); // Masquer l icône Admin (forcé à on)
\$serviz[46] = stripslashes(\"$serviz[46]\"); // Nb de messages Agenda / page
\$serviz[47] = stripslashes(\"$serviz[47]\"); // Agenda ON / OFF
\$serviz[48] = stripslashes(\"$serviz[48]\"); // Nb de messages maximum dans Tinymessage
// serviz[49] = stripslashes(\"\"); // Inutilisé
\$serviz[50] = stripslashes(\"$serviz[50]\"); // Nb maxi de fichiers dans data/error
\$serviz[51] = stripslashes(\"$serviz[51]\"); // Nb maxi de lignes dans l anti-spam
\$serviz[52] = stripslashes(\"$serviz[52]\"); // Durée maxi de validité du code anti-spam
\$serviz[53] = stripslashes(\"$serviz[53]\"); // Blog ON / OFF
\$serviz[54] = stripslashes(\"$serviz[54]\"); // Publication Blog RSS ON / OFF
\$serviz[55] = stripslashes(\"$serviz[55]\"); // Nb de Blogs / page
\$serviz[56] = stripslashes(\"$serviz[56]\"); // Nb de blogs publiés
\$serviz[57] = stripslashes(\"$serviz[57]\"); // Commentaires sur Blog ON / OFF / Ok Admin
\$serviz[58] = stripslashes(\"$serviz[58]\"); // Nombre de lettres par lot
\$serviz[59] = stripslashes(\"$serviz[59]\"); // Menu dynamique Blog WEB
\$serviz[60] = stripslashes(\"$serviz[60]\"); // Publication Articles RSS ON / OFF
\$serviz[61] = stripslashes(\"$serviz[61]\"); // Nb de billets récents/commentaires / page
\$serviz[62] = stripslashes(\"$serviz[62]\"); // Recommander ON/OFF
\$serviz[63] = stripslashes(\"$serviz[63]\"); // Afficher le nombre d abonnés à la newsletter ON/OFF
\$serviz[64] = stripslashes(\"$serviz[64]\"); // Cacher la date de création dans Articles ON/OFF
\$serviz[65] = stripslashes(\"$serviz[65]\"); // Cacher la date de modification dans Articles ON/OFF
\$serviz[66] = stripslashes(\"$serviz[66]\"); // Cacher la catégorie dans Articles ON/OFF
\$serviz[67] = stripslashes(\"$serviz[67]\"); // Cacher le compteur dans Articles ON/OFF
\$serviz[68] = stripslashes(\"$serviz[68]\"); // Cacher les boutons  Prévisualiser et Imprimer dans Articles ON/OFF
\$serviz[69] = stripslashes(\"$serviz[69]\"); // Cacher la date de création dans Faq ON/OFF
\$serviz[70] = stripslashes(\"$serviz[70]\"); // Cacher la date de modification dans Faq  ON/OFF
\$serviz[71] = stripslashes(\"$serviz[71]\"); // Cacher le bouton Imprimer dans Faq ON/OFF
\$serviz[72] = stripslashes(\"$serviz[72]\"); // Cacher la date de création dans Nouvelles ON/OFF
\$serviz[73] = stripslashes(\"$serviz[73]\"); // Cacher l auteur dans Nouvelles ON/OFF
// serviz[74] is in confskin.inc // Cacher les boîtes en page d accueil
\$serviz[75] = stripslashes(\"$serviz[75]\"); // Nombre de documents dans les listes en Admin
\$serviz[76] = stripslashes(\"$serviz[76]\"); // Cacher les boutons  Prévisualiser et Imprimer dans Blog ON/OFF
\$serviz[77] = stripslashes(\"$serviz[77]\"); // Cacher les boutons  Prévisualiser et Imprimer dans Download ON/OFF
\$serviz[78] = stripslashes(\"$serviz[78]\"); // Afficher la liste dépliée dans TéléchargementON/OFF
\$serviz[79] = stripslashes(\"$serviz[79]\"); // Afficher la liste dépliée dans FAQ ON/OFF
\$serviz[80] = stripslashes(\"$serviz[80]\"); // Afficher la liste dépliée dans Liens ON/OFF
\$serviz[81] = stripslashes(\"$serviz[81]\"); // Afficher la liste dépliée dans Photorama ON/OFF
\$serviz[82] = stripslashes(\"$serviz[82]\"); // Nombre d articles dans le flux RSS articles
\$serviz[83] = stripslashes(\"$serviz[83]\"); // Boite latérale diaporama
\$serviz[84] = stripslashes(\"$serviz[84]\"); // Afficher IP des visiteurs
\$serviz[85] = stripslashes(\"$serviz[85]\"); // Site de contrôle des IP des visiteurs
\$serviz[86] = stripslashes(\"$serviz[86]\"); // Autoriser la liste des membres
\$serviz[87] = stripslashes(\"$serviz[87]\"); // Nombre maximum de galeries par page
\$serviz[88] = stripslashes(\"$serviz[88]\"); // Activer le captcha pour les préférences
\$serviz[89] = stripslashes(\"$serviz[89]\"); // Activer le captcha pour les nouvelles
\$serviz[90] = stripslashes(\"$serviz[90]\"); // Activer le captcha pour le livre d or
\$serviz[91] = stripslashes(\"$serviz[91]\"); // Activer le captcha pour le forum
\$serviz[92] = stripslashes(\"$serviz[92]\"); // Activer le captcha pour les réactions aux articles
\$serviz[93] = stripslashes(\"$serviz[93]\"); // Activer le captcha pour l inscription à la newsletter
\$serviz[94] = stripslashes(\"$serviz[94]\"); // Activer le captcha pour recommander
\$serviz[95] = stripslashes(\"$serviz[95]\"); // Activer le captcha pour le contact webmestre
\$serviz[96] = stripslashes(\"$serviz[96]\"); // Activer le captcha pour le blog
\$serviz[97] = stripslashes(\"$serviz[97]\"); // Activer le captcha pour les commentaires blog
\$serviz[98] = stripslashes(\"$serviz[98]\"); // Désactiver le captcha pour les membres
\$serviz[99] = stripslashes(\"$serviz[99]\"); // Contact site avancé
\$serviz[100] = stripslashes(\"$serviz[100]\"); // Type de captcha 0=pas de captcha 2=texte 3=sélection texte
\$serviz[101] = stripslashes(\"$serviz[101]\"); // Largeur de l éditeur
\$serviz[102] = stripslashes(\"$serviz[102]\"); // Cacher la barre de navigation dans articles ON/OFF
\$serviz[103] = stripslashes(\"$serviz[103]\"); // Ensemble des publications RSS
\$serviz[104] = stripslashes(\"$serviz[104]\"); // Inclure AddThis dans le blog
\$serviz[105] = stripslashes(\"$serviz[105]\"); // Inclure AddThis dans les articles
\$serviz[106] = stripslashes(\"$serviz[106]\"); // Inclure AddThis dans les nouvelles
\$serviz[107] = stripslashes(\"$serviz[107]\"); // Inclure AddThis dans le forum
\$serviz[108] = stripslashes(\"$serviz[108]\"); // Rotation automatique des citations
\$serviz[109] = stripslashes(\"$serviz[109]\"); // Durée d affichage en secondes d une citation
\$serviz[110] = stripslashes(\"$serviz[110]\"); // Délai suppression inscription newsletter 
\$serviz[111] = stripslashes(\"$serviz[111]\"); // Afficher les visites du jour
// serviz[112] = stripslashes(\"\"); // Inutilisé
\$serviz[113] = stripslashes(\"$serviz[113]\"); // Cacher les mots-clés dans Articles ON/OFF
\$serviz[114] = stripslashes(\"$serviz[114]\"); // Cacher l auteur des billets du blog ON/OFF
\$serviz[115] = stripslashes(\"$serviz[115]\"); // Captcha sensible à la casse ON/OFF
\$serviz[116] = stripslashes(\"$serviz[116]\"); // Nouveautés du site WEB
\$serviz[117] = stripslashes(\"$serviz[117]\"); // Nouveautés depuis la dernière connexion WEB
\$serviz[118] = stripslashes(\"$serviz[118]\"); // Nouveautés depuis un nombre de jours WEB
\$serviz[119] = stripslashes(\"$serviz[119]\"); // Nombre de jours à mémoriser WEB
\$serviz[120] = stripslashes(\"$serviz[120]\"); // Hauteur en pixels des nouveautés WEB
\$serviz[121] = stripslashes(\"$serviz[121]\"); // Inclure le calendrier dans les nouveautés
\$serviz[122] = stripslashes(\"$serviz[122]\"); // Inclure les articles dans les nouveautés
\$serviz[123] = stripslashes(\"$serviz[123]\"); // Inclure le blog dans les nouveautés
\$serviz[124] = stripslashes(\"$serviz[124]\"); // Inclure les téléchargements dans les nouveautés
\$serviz[125] = stripslashes(\"$serviz[125]\"); // Inclure la faq dans les nouveautés
\$serviz[126] = stripslashes(\"$serviz[126]\"); // Inclure le forum dans les nouveautés
\$serviz[127] = stripslashes(\"$serviz[127]\"); // Inclure les liens dans les nouveautés
\$serviz[128] = stripslashes(\"$serviz[128]\"); // Inclure le livre d or dans les nouveautés
\$serviz[129] = stripslashes(\"$serviz[129]\"); // Inclure les nouvelles dans les nouveautés
\$serviz[130] = stripslashes(\"$serviz[130]\"); // Inclure les photos dans les nouveautés
// serviz[131] is in confskin.inc  // Page associée au blog hors pleine page
// serviz[132] = stripslashes(\"\"); // Inutilisé
\$serviz[133] = stripslashes(\"$serviz[133]\"); // Hauteur maxi en pixels d une cellule de fil RSS
\$serviz[135] = stripslashes(\"$serviz[135]\"); // Nb jours affichage image nouveauté
\$serviz[136] = stripslashes(\"$serviz[136]\"); // Image nouveauté articles ON / OFF / Membres
\$serviz[137] = stripslashes(\"$serviz[137]\"); // Image nouveauté nouvelles ON / OFF / Membres
\$serviz[138] = stripslashes(\"$serviz[138]\"); // Image nouveauté blog ON / OFF / Membres
\$serviz[139] = stripslashes(\"$serviz[139]\"); // Image nouveauté forum ON / OFF / Membres
\$serviz[140] = stripslashes(\"$serviz[140]\"); // Image nouveauté faq ON / OFF / Membres
\$serviz[141] = stripslashes(\"$serviz[141]\"); // Image nouveauté livre d or ON / OFF / Membres
\$serviz[142] = stripslashes(\"$serviz[142]\"); // Image nouveauté photo ON / OFF / Membres
\$serviz[143] = stripslashes(\"$serviz[143]\"); // Image nouveauté téléchargements ON / OFF / Membres
\$serviz[144] = stripslashes(\"$serviz[144]\"); // Image nouveauté liens ON / OFF / Membres
\$serviz[145] = stripslashes(\"$serviz[145]\"); // Image nouveauté agenda ON / OFF / Membres
// serviz[146] = stripslashes(\"\"); // Inutilisé
// serviz[147] = stripslashes(\"\"); // Inutilisé
\$serviz[148] = stripslashes(\"$serviz[148]\"); // Nombre maxi de caractères du pseudo
\$serviz[149] = stripslashes(\"$serviz[149]\"); // Boîte compteur dans préférences
\$serviz[150] = stripslashes(\"$serviz[150]\"); // Téléchargements les plus récents
\$serviz[151] = stripslashes(\"$serviz[151]\"); // Téléchargements les plus téléchargés
\$serviz[152] = stripslashes(\"$serviz[152]\"); // Position texte et icône inversés pour les nouvelles
\$serviz[153] = stripslashes(\"$serviz[153]\"); // Position texte et icône inversés pour les billets
\$serviz[154] = stripslashes(\"$serviz[154]\"); // Image nouveauté option de menu ON / OFF / Membres
\$serviz[155] = stripslashes(\"$serviz[155]\"); // Type de courriel Contact
\$serviz[156] = stripslashes(\"$serviz[156]\"); // Photorama pleine page ON / OFF
\$serviz[157] = stripslashes(\"$serviz[157]\"); // Page secondaire du photorama
\$serviz[158] = stripslashes(\"$serviz[158]\"); // Cacher le nombre de membres inscrits
\$serviz[159] = stripslashes(\"$serviz[159]\"); // Cacher les membres connectés
\$serviz[166] = stripslashes(\"$serviz[166]\"); // Inclure les réactions articles dans les nouveautés
\$serviz[167] = stripslashes(\"$serviz[167]\"); // Inclure les commentaires blog dans les nouveautés
\$serviz[168] = stripslashes(\"$serviz[168]\"); // Pause entre les lots
\$serviz[169] = stripslashes(\"$serviz[169]\"); // Cacher la date des nouveautés du site WEB
\$serviz[171] = stripslashes(\"$serviz[171]\"); // Page secondaire du calendrier
\$serviz[172] = stripslashes(\"$serviz[172]\"); // Page secondaire utilisateur
\$serviz[173] = stripslashes(\"$serviz[173]\"); // Page secondaire connexion
\$serviz[174] = stripslashes(\"$serviz[174]\"); // Affichage tri des photos au sein de la galerie de photos par id ou no ordre
\$serviz[175] = stripslashes(\"$serviz[175]\"); // Autoriser les images dans ckeditor public
\$serviz[176] = stripslashes(\"$serviz[176]\"); // Pseudo administrateur secondaire
\$serviz[177] = stripslashes(\"$serviz[177]\"); // Numéro article pour les mentions légales
\$serviz[178] = stripslashes(\"$serviz[178]\"); // Numéro page pour afficher les mentions légales
\$serviz[179] = stripslashes(\"$serviz[179]\"); // Groupe pour accès à la liste des membres
\$serviz[180] = stripslashes(\"$serviz[180]\"); // Lister tous les membres
\$serviz[181] = stripslashes(\"$serviz[181]\"); // Cacher topblog ON / OFF
\$serviz[182] = stripslashes(\"$serviz[182]\"); // Affichage tri des galeries par catégorie ou Catégorie ASC et ID desc

\$forum[3]  = stripslashes(\"$forum[3]\"); // Forum pleine page ON / OFF
\$forum[4]  = stripslashes(\"$forum[4]\"); // Position des boîtes
\$forum[5]  = stripslashes(\"$forum[5]\"); // Durée thread up (heures)
\$forum[6]  = stripslashes(\"$forum[6]\"); // Durée thread au top (jours)
\$forum[7]  = stripslashes(\"$forum[7]\"); // Echelle des messages
\$forum[8]  = stripslashes(\"$forum[8]\"); // Durée nouveau
\$forum[9]  = stripslashes(\"$forum[9]\"); // Affichage charte du forum ON / OFF
\$forum[10] = stripslashes(\"$forum[10]\"); // Affichage du lien uniquement ON / OFF
\$forum[15] = stripslashes(\"$forum[15]\"); // Cacher topforum ON / OFF

\$supervision[0] = stripslashes(\"$supervision[0]\"); // e-mail compteur
\$supervision[1] = stripslashes(\"$supervision[1]\"); // incrément de compteur pour e-mail
\$supervision[2] = stripslashes(\"$supervision[2]\"); // e-mail publication nouvelle
\$supervision[3] = stripslashes(\"$supervision[3]\"); // e-mail publication livre d or
\$supervision[4] = stripslashes(\"$supervision[4]\"); // e-mail publication forum
\$supervision[5] = stripslashes(\"$supervision[5]\"); // Type d e-mail PHP
\$supervision[6] = stripslashes(\"$supervision[6]\"); // e-mail réagir aux articles
\$supervision[7] = stripslashes(\"$supervision[7]\"); // e-mail inscription ou résiliation Newsletter
\$supervision[8] = stripslashes(\"$supervision[8]\"); // e-mail publication blog
\$supervision[9] = stripslashes(\"$supervision[9]\"); // e-mail commentaire blog
\$supervision[10] = stripslashes(\"$supervision[10]\"); // liste des e-mails pour la supervision
\$supervision[11] = stripslashes(\"$supervision[11]\"); // e-mail ouverture ou fermeture de compte
\$supervision[12] = stripslashes(\"$supervision[12]\"); // e-mail erreurs de connexion

\$smtp[0] = stripslashes(\"$smtp[0]\"); // serveur SMTP
\$smtp[1] = stripslashes(\"$smtp[1]\"); // avec authentification ON / OFF
\$smtp[2] = stripslashes(\"$smtp[2]\"); // préfixe serveur  / SSL / TLS
\$smtp[3] = stripslashes(\"$smtp[3]\"); // numéro de port SMTP
\$smtp[4] = stripslashes(\"$smtp[4]\"); // adresse mail utilisateur
\$smtp[5] = stripslashes(\"$smtp[5]\"); // mot de passe utilisateur
\$smtp[6] = stripslashes(\"$smtp[6]\"); // Log ON / OFF
\$smtp[7] = stripslashes(\"$smtp[7]\"); // Log si ON, nombre de jours de conservations

\$sitemap['SM'] = stripslashes(\"".$sitemap['SM']."\"); // Création d un sitemap
\$sitemap['BL'] = stripslashes(\"".$sitemap['BL']."\"); // Inclure le blog dans le sitemap
\$sitemap['AR'] = stripslashes(\"".$sitemap['AR']."\"); // Inclure les articles dans le sitemap
\$sitemap['NE'] = stripslashes(\"".$sitemap['NE']."\"); // Inclure les nouvelles dans le sitemap
\$sitemap['PH'] = stripslashes(\"".$sitemap['PH']."\"); // Inclure les photos dans le sitemap
\$sitemap['DN'] = stripslashes(\"".$sitemap['DN']."\"); // Inclure les téléchargements dans le sitemap
\$sitemap['FA'] = stripslashes(\"".$sitemap['FA']."\"); // Inclure la faq dans le sitemap
\$sitemap['LI'] = stripslashes(\"".$sitemap['LI']."\"); // Inclure les liens dans le sitemap
\$sitemap['GB'] = stripslashes(\"".$sitemap['GB']."\"); // Inclure le livre d or dans le sitemap
\$sitemap['FR'] = stripslashes(\"".$sitemap['FR']."\"); // Inclure le forum dans le sitemap
\$sitemap['AG'] = stripslashes(\"".$sitemap['AG']."\"); // Inclure l agenda dans le sitemap

\$statscfg['Y']   = stripslashes(\"".$statscfg['Y']."\");   // Mémoriser les fichiers année de statistiques
\$statscfg['M']   = stripslashes(\"".$statscfg['M']."\");   // Mémoriser les fichiers mois de statistiques
\$statscfg['D']   = stripslashes(\"".$statscfg['D']."\");   // Mémoriser les fichiers jour de statistiques
\$statscfg['NBY'] = stripslashes(\"".$statscfg['NBY']."\"); // Nombre d année à mémoriser

// members[0] = stripslashes(\"\"); // Inutilisé
\$members[1] = stripslashes(\"$members[1]\"); // Zone membre accès à la section Articles
\$members[2] = stripslashes(\"$members[2]\"); // Zone membre accès à la section Photo
\$members[3] = stripslashes(\"$members[3]\"); // Zone membre accès à la section Liens
\$members[4] = stripslashes(\"$members[4]\"); // Zone membre accès à la section FAQ
\$members[5] = stripslashes(\"$members[5]\"); // Zone membre accès à la section Forum
// members[6] = stripslashes(\"\"); // Inutilisé
\$members[7] = stripslashes(\"$members[7]\"); // Zone membre accès à la section Téléchargement
\$members[8] = stripslashes(\"$members[8]\"); // Zone membre accès publication Nouvelles
\$members[9] = stripslashes(\"$members[9]\"); // Zone membre accès publication Livre d Or
\$members[10] = stripslashes(\"$members[10]\"); // Zone membre accès publication Forum
\$members[11] = stripslashes(\"$members[11]\"); // Zone membre accès publication Reactions aux articles
\$members[12] = stripslashes(\"$members[12]\"); // Zone membre accès à la section Livre d Or
\$members[13] = stripslashes(\"$members[13]\"); // Zone membre accès à la section Nouvelles
\$members[14] = stripslashes(\"$members[14]\"); // Zone membre accès à la section Agenda
\$members[15] = stripslashes(\"$members[15]\"); // Zone membre accès à la section Blog
\$members[16] = stripslashes(\"$members[16]\"); // Zone membre accès publication Blog
\$members[17] = stripslashes(\"$members[17]\"); // Zone membre accès publication Commentaires blog
\$members[18] = stripslashes(\"$members[18]\"); // Zone membre accès inscription Newsletter
\$members[19] = stripslashes(\"$members[19]\"); // Inscriptions membres on /off / ok mail / ok webmaster
\$members[20] = stripslashes(\"$members[20]\"); // Zone membre accès contact avancé
\$members[21] = stripslashes(\"$members[21]\"); // Délai expiration cookie utilisateur
\$members[22] = stripslashes(\"$members[22]\"); // Zone membre accès nouveautés du site
\$members[23] = stripslashes(\"$members[23]\"); // Zone membre accès boîtes recherche

\$configlogNB = stripslashes(\"$configlogNB\"); // Nombre de lignes dans LogBook
\$droitaccegroupredac = stripslashes(\"$droitaccegroupredac\"); // Mise en place des dossiers spécifiques pour les rédacteurs
\$actionwaf = stripslashes(\"$actionwaf\"); // Activation pare-feu bannisement/blacklistage
";

include CHEMIN.INCREP.'lang/'.$lng.'-admin.inc';
$label = array(1049, 570, 572, 574, 573, 567, 571, 568, 569, 1050, 1051, 552, 551, 1048, 1052, 1053, 1054, 1055, 1056, 1061);
$n = 0;
foreach ($configlog as $key=>$value) {
    $mettre .= '$configlog['.$key.'] = stripslashes("'.$value.'"); // '.$admin[$label[$n]]."\n";
	$n++;
}
$mettre .= "\n";
$mettre .= '
?>';
WriteFullDB(CONFIG,$mettre);

?>
confweb.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/confweb.inc'
View Content
<?php
/*******************************************************************************
 *   Config Skin
 *******************************************************************************
 *   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'], 'confweb.inc')) {
    header('location:../index.php');
    die();
}

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

$site[4]  = stripslashes("'.$site[4].'");  // Nouvelles sur la page d accueil
$site[20] = stripslashes("'.$site[20].'"); // Messages Forum sur la page d accueil
// site[21] = stripslashes(""); // Inutilisé
$site[29] = stripslashes("'.$site[29].'"); // Hauteur en pixels des nouvelles en page d accueil
$site[31] = stripslashes("'.$site[31].'"); // Blog sur la page d accueil
$site[33] = stripslashes("'.$site[33].'"); // Hauteur en pixels des billets en page d accueil
$site[34] = stripslashes("'.$site[34].'"); // Nombre de caractères des posts forum en page d accueil

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

// Configurations accueil et pages secondaires';

foreach(array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $subarray) {
    $mettre .= "\n// \$xposbox[\"E\"][$subarray]";
    foreach ($xposbox[BOX_EDITO][$subarray] as $key=>$value) {
        $mettre .= '
$xposbox["'.BOX_EDITO.'"]["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
    }
    $mettre .= "\n";
}

foreach (array(BOX_LEFT, BOX_RIGHT) as $subarray) {
    $mettre .= "\n// \$xposbox[\"B\"][$subarray]";
    foreach ($xposbox[BOX_BLOG][$subarray] as $key=>$value) {
        $mettre .= '
$xposbox["'.BOX_BLOG.'"]["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
    }
    $mettre .= "\n";
}

$mettre .= "\n".'
// NE PAS SUPPRIMER $templates[0]
';
foreach ($templates as $keyconf=>$valueconf) {
    $mettre .= '
$templates['.$keyconf.'] = stripslashes("'.$valueconf.'");';
}

foreach ($templates as $keyconf=>$valueconf) {
	$mettre .= "\n".str_repeat('/', 20).' '.$valueconf.' '.str_repeat('/', 20);
	foreach (array(BOX_LEFT, BOX_RIGHT, BOX_ABOVE, BOX_UNDER) as $subarray) {

		$mettre .= "\n// \$xposbox[$valueconf][$subarray]";
		foreach ($xposbox[$keyconf][$subarray] as $key=>$value) {
			$mettre .= '
$xposbox['.$keyconf.']["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
		}
		$mettre .= "\n";
	}
	
	foreach (array(BOX_TOP, BOX_BOTTOM) as $array) {
        foreach (array(BOX_LSIDE, BOX_LEFT, BOX_CENTER, BOX_RIGHT, BOX_RSIDE) as $subarray) {
			$mettre .= "\n// \$xposbox[$valueconf][$array][$subarray]";
			foreach ($xposbox[$keyconf][$array][$subarray] as $key=>$value) {
				$mettre .= '
$xposbox['.$keyconf.']["'.$array.'"]["'.$subarray.'"]['.$key.'] = stripslashes("'.$value.'");';
			}
			$mettre .= "\n";
		}
	}
}
$mettre .= "\n?>";

WriteFullDB($meskin.'confweb.inc', $mettre);
?>
contact.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/contact.inc'
View Content
<?php
/*******************************************************************************
 *   Config Advanced contact
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.19 (August 26, 2024) : Modification TOHELP
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[13] == '') {
        $nomzone = $admin[1183];
        include 'access.inc';
        exit();
    }
}

$lng      = import('lng');
$act      = import('act');
$regit    = import('regit');
$ctconfig = import('ctconfig');
$ctname   = import('ctname');
$ctlbl0   = import('ctlbl0');
$ctlbl1   = import('ctlbl1');

require CHEMIN.'admin/editors/editors_functions.php';
include CHEMIN.INCREP.'func_contact.php';

if ($regit == 1) { // enregistrer la config
    
	$nbdest  = !isset($_POST['nbdest']) ? count($fdest) : import('nbdest');
    $fdest1  = import('fdest1'); // email destinataire par défaut
    $fname1  = addslashes(import('fname1'));
    $f2name1 = addslashes(import('f2name1'));
    $ftel1   = import('ftel1',  'POST', false);
    $ftel11  = import('ftel11', 'POST', false);
    $flet1   = import('flet1',  'POST', false);
    $flet11  = import('flet11', 'POST', false);
    
    // mail destinataire
    $fdest[0]  = import('fdest0'); // email en copie Cc
    $fdest[1]  = ($fdest1 == '') ? $user[1] : $fdest1; // email destinataire par défaut
	for ($d = 2; $d < $nbdest; $d++) {
		$fdest[$d] = import('fdest'.$d); // email destinataire 1+d
	}
    // Noms langue principale
    $fname[0]  = addslashes(import('fname0')); // Choix de destinataire
    $fname[1]  = ($fname1 == '') ? $admin[718] : $fname1; // Nom destinataire 1
	for ($d = 2; $d < $nbdest; $d++) {
		$fname[$d] = addslashes(import('fname'.$d)); // Nom destinataire d
	}
    $fmail[1]  = import('fmail1'); // Pseudo expéditeur
    $fmail[2]  = import('fmail2'); // e-mail expéditeur
    $ftxt[1]   = addslashes(import('ftxt1')); // 1er champ texte
    $ftxt[2]   = addslashes(import('ftxt2')); // 2ème champ texte
    $ftxt[3]   = addslashes(import('ftxt3')); // 3ème champ texte
    $ftxt[4]   = addslashes(import('ftxt4')); // 4ème champ texte
    $ftxt[5]   = addslashes(import('ftxt5')); // 5ème champ texte
    $ftxt[6]   = addslashes(import('ftxt6')); // 6ème champ texte
    $fsel[0]   = addslashes(import('fsel0')); // Champ select
    $fsel[1]   = addslashes(import('fsel1')); // Option 1
    $fsel[2]   = addslashes(import('fsel2')); // Option 2
    $fsel[3]   = addslashes(import('fsel3')); // Option 3
    $fsel[4]   = addslashes(import('fsel4')); // Option 4
    $frad[0]   = addslashes(import('frad0')); // Champ bouton radio
    $frad[1]   = addslashes(import('frad1')); // Choix 1
    $frad[2]   = addslashes(import('frad2')); // Choix 2
    $frad[3]   = addslashes(import('frad3')); // Choix 3
    $frad[4]   = addslashes(import('frad4')); // Choix 4
    $fchk[0]   = addslashes(import('fchk0')); // Champ checkbox
    $fchk[1]   = addslashes(import('fchk1')); // Choix 1
    $fchk[2]   = addslashes(import('fchk2')); // Choix 2
    $fchk[3]   = addslashes(import('fchk3')); // Choix 3
    $fchk[4]   = addslashes(import('fchk4')); // Choix 4
    $fmes[1]   = import('fmes1'); // Champ message
    // Noms langue secondaire
    $f2name[0] = addslashes(import('f2name0')); // Choice of receiver
    $f2name[1] = ($f2name1 == '') ? $admin[718] : $f2name1; // Name default receiver
	for ($d = 2; $d < $nbdest; $d++) {
		$f2name[$d] = addslashes(import('f2name'.$d)); // Name receiver d
	}
    $fmail[11] = import('fmail11'); // Nickname sender
    $fmail[12] = import('fmail12'); // e-mail sender
    $ftxt[11]  = addslashes(import('ftxt11')); // 1st text area
    $ftxt[12]  = addslashes(import('ftxt12')); // 2nd text area
    $ftxt[13]  = addslashes(import('ftxt13')); // 3rd text area
    $ftxt[14]  = addslashes(import('ftxt14')); // 4th text area
    $ftxt[15]  = addslashes(import('ftxt15')); // 5th text area
    $ftxt[16]  = addslashes(import('ftxt16')); // 6th text area
    $fsel[10]  = addslashes(import('fsel10')); // Select area
    $fsel[11]  = addslashes(import('fsel11')); // Option 1
    $fsel[12]  = addslashes(import('fsel12')); // Option 2
    $fsel[13]  = addslashes(import('fsel13')); // Option 3
    $fsel[14]  = addslashes(import('fsel14')); // Option 4
    $frad[10]  = addslashes(import('frad10')); // Button radio
    $frad[11]  = addslashes(import('frad11')); // Choice 1
    $frad[12]  = addslashes(import('frad12')); // Choice 2
    $frad[13]  = addslashes(import('frad13')); // Choice 3
    $frad[14]  = addslashes(import('frad14')); // Choice 4
    $fchk[10]  = addslashes(import('fchk10')); // Check box
    $fchk[11]  = addslashes(import('fchk11')); // Choice 1
    $fchk[12]  = addslashes(import('fchk12')); // Choice 2
    $fchk[13]  = addslashes(import('fchk13')); // Choice 3
    $fchk[14]  = addslashes(import('fchk14')); // Choice 4
    $fmes[11]  = import('fmes11'); // Message area
    // check activation on/off/fix
    $chmail[1] = 'fix'; //Nom
    $chmail[2] = 'fix'; //email
    $chtxt[1]  = import('chtxt1'); // 1er champ
    $chtxt[2]  = import('chtxt2'); // 2ème champ
    $chtxt[3]  = import('chtxt3'); // 3ème champ
    $chtxt[4]  = import('chtxt4'); // 4ème champ
    $chtxt[4]  = import('chtxt4'); // 4ème champ
    $chtxt[4]  = import('chtxt4'); // 4ème champ
    $chtxt[5]  = import('chtxt5'); // 5ème champ
    $chtxt[6]  = import('chtxt6'); // 6ème champ
    $chsel[0]  = import('chsel0'); // Select
    $chrad[0]  = import('chrad0'); // Bouton radio
    $chchk[0]  = import('chchk0'); // Checkbox
    $chmes[1]  = 'fix'; // Message
    $chfic[0]  = import('chfic0', 'POST', true, '0'); // Fichier joint
	// Contact Tel - Contact Postal au dessous de Contact e-Mail(below)
	$ftelbelow[0] = import('ftelbelow0'); // on/off
	$fletbelow[0] = import('fletbelow0'); // on/off
    // Contact par téléphone
    $ftel[0]   = import('ftel0'); // on/off
    $ftel[1]   = addslashes(import('ftel1', 'POST', false));  // libellé langue 1
    $ftel[11]  = addslashes(import('ftel11', 'POST', false)); // libellé langue 2
    // Contact par courrier
    $flet[0]   = import('flet0'); // on/off
    $flet[1]   = addslashes(import('flet1', 'POST', false));  // libellé langue 1
    $flet[11]  = addslashes(import('flet11', 'POST', false)); // libellé langue 2
    $far       = import('ar'); // avis de remise on/off
    $chkcc     = import('chkcc'); // copie au webmestre on/off

    $mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"".$ctconfig.INCEXT."\")) {
    header(\"location:../index.php\");
    die();
}

// libellé dans boîte latérale
\$ctlbl0 = stripslashes(\"$ctlbl0\"); // 1ère langue
\$ctlbl1 = stripslashes(\"$ctlbl1\"); // 2ème langue
// adresses mail
\$fdest[0] = stripslashes(\"$fdest[0]\"); // email en copie
\$fdest[1] = stripslashes(\"$fdest[1]\"); // email destinataire par défaut";
	for ($d = 2; $d < count($fdest); $d++)
		if ($fdest[$d] != '' && (($lang[0] == $lng && $fname[$d] != '') || ($lang[1] == $lng && $f2name[$d] != ''))) $mettre .= "
\$fdest[$d] = stripslashes(\"$fdest[$d]\"); // email destinataire $d";
  $mettre .= "
//  Noms des rubriques en langue principale
\$fname[0] = stripslashes(\"$fname[0]\"); // Choix destinataire
\$fname[1] = stripslashes(\"$fname[1]\"); // Nom destinataire par défaut";
	for ($d = 2; $d < $nbdest; $d++)
		if ($fdest[$d] != '' && $fname[$d] != '') $mettre .= "
\$fname[$d] = stripslashes(\"$fname[$d]\"); // Nom destinataire $d";
	$mettre .= "
\$fmail[1] = stripslashes(\"$fmail[1]\"); // Pseudo expéditeur
\$fmail[2] = stripslashes(\"$fmail[2]\"); // e-mail expéditeur
\$ftxt[1] = stripslashes(\"$ftxt[1]\"); // 1er champ texte
\$ftxt[2] = stripslashes(\"$ftxt[2]\"); // 2ème champ texte
\$ftxt[3] = stripslashes(\"$ftxt[3]\"); // 3ème champ texte
\$ftxt[4] = stripslashes(\"$ftxt[4]\"); // 4ème champ texte
\$ftxt[5] = stripslashes(\"$ftxt[5]\"); // 5ème champ texte
\$ftxt[6] = stripslashes(\"$ftxt[6]\"); // 6ème champ texte
\$fsel[0] = stripslashes(\"$fsel[0]\"); // Champ select
\$fsel[1] = stripslashes(\"$fsel[1]\"); // Option 1
\$fsel[2] = stripslashes(\"$fsel[2]\"); // Option 2
\$fsel[3] = stripslashes(\"$fsel[3]\"); // Option 3
\$fsel[4] = stripslashes(\"$fsel[4]\"); // Option 4
\$frad[0] = stripslashes(\"$frad[0]\"); // Champ bouton radio
\$frad[1] = stripslashes(\"$frad[1]\"); // Choix 1
\$frad[2] = stripslashes(\"$frad[2]\"); // Choix 2
\$frad[3] = stripslashes(\"$frad[3]\"); // Choix 3
\$frad[4] = stripslashes(\"$frad[4]\"); // Choix 4
\$fchk[0] = stripslashes(\"$fchk[0]\"); // Champ checkbox
\$fchk[1] = stripslashes(\"$fchk[1]\"); // Choix 1
\$fchk[2] = stripslashes(\"$fchk[2]\"); // Choix 2
\$fchk[3] = stripslashes(\"$fchk[3]\"); // Choix 3
\$fchk[4] = stripslashes(\"$fchk[4]\"); // Choix 4
\$fmes[1] = stripslashes(\"$fmes[1]\"); // Champ message
//  Rubric names in secondary language
\$f2name[0] = stripslashes(\"$f2name[0]\"); // Choice of receiver
\$f2name[1] = stripslashes(\"$f2name[1]\"); // Name of default receiver";
	for ($d = 2; $d < $nbdest; $d++)
		if ($fdest[$d] != '' && $fname[$d] != '' && $f2name[$d] != '') $mettre .= "
\$f2name[$d] = stripslashes(\"$f2name[$d]\"); // Nom destinataire $d";
	$mettre .= "
\$fmail[11] = stripslashes(\"$fmail[11]\"); // Nickname sender
\$fmail[12] = stripslashes(\"$fmail[12]\"); // e-mail sender
\$ftxt[11] = stripslashes(\"$ftxt[11]\"); // 1st text area
\$ftxt[12] = stripslashes(\"$ftxt[12]\"); // 2nd text area
\$ftxt[13] = stripslashes(\"$ftxt[13]\"); // 3rd text area
\$ftxt[14] = stripslashes(\"$ftxt[14]\"); // 4th text area
\$ftxt[15] = stripslashes(\"$ftxt[15]\"); // 5th text area
\$ftxt[16] = stripslashes(\"$ftxt[16]\"); // 6th text area
\$fsel[10] = stripslashes(\"$fsel[10]\"); // Select area
\$fsel[11] = stripslashes(\"$fsel[11]\"); // Option 1
\$fsel[12] = stripslashes(\"$fsel[12]\"); // Option 2
\$fsel[13] = stripslashes(\"$fsel[13]\"); // Option 3
\$fsel[14] = stripslashes(\"$fsel[14]\"); // Option 4
\$frad[10] = stripslashes(\"$frad[10]\"); // radio button area
\$frad[11] = stripslashes(\"$frad[11]\"); // Choice 1
\$frad[12] = stripslashes(\"$frad[12]\"); // Choice 2
\$frad[13] = stripslashes(\"$frad[13]\"); // Choice 3
\$frad[14] = stripslashes(\"$frad[14]\"); // Choice 4
\$fchk[10] = stripslashes(\"$fchk[10]\"); // Checkbox area
\$fchk[11] = stripslashes(\"$fchk[11]\"); // Choice 1
\$fchk[12] = stripslashes(\"$fchk[12]\"); // Choice 2
\$fchk[13] = stripslashes(\"$fchk[13]\"); // Choice 3
\$fchk[14] = stripslashes(\"$fchk[14]\"); // Choice 4
\$fmes[11] = stripslashes(\"$fmes[11]\"); // Message area
// activation des champs on / off /fix
\$chmail[1] = stripslashes(\"$chmail[1]\"); // Champ nom 
\$chmail[2] = stripslashes(\"$chmail[2]\"); // Champ email
\$chtxt[1] = stripslashes(\"$chtxt[1]\"); // 1er champ
\$chtxt[2] = stripslashes(\"$chtxt[2]\"); // 2ème champ
\$chtxt[3] = stripslashes(\"$chtxt[3]\"); // 3ème champ
\$chtxt[4] = stripslashes(\"$chtxt[4]\"); // 4ème champ
\$chtxt[5] = stripslashes(\"$chtxt[5]\"); // 5ème champ
\$chtxt[6] = stripslashes(\"$chtxt[6]\"); // 6ème champ
\$chsel[0] = stripslashes(\"$chsel[0]\"); // Select
\$chrad[0] = stripslashes(\"$chrad[0]\"); // Boutons radio
\$chchk[0] = stripslashes(\"$chchk[0]\"); // Checkbox
\$chmes[1] = stripslashes(\"$chmes[1]\"); // message
\$chfic[0] = stripslashes(\"$chfic[0]\"); // fichier joint
// Contact Tel - Contact Postal au dessous de Contact e-Mail(below)
\$ftelbelow[0] = stripslashes(\"$ftelbelow[0]\"); // on/off
\$fletbelow[0] = stripslashes(\"$fletbelow[0]\"); // on/off
// contact par téléphone
\$ftel[0] = stripslashes(\"$ftel[0]\"); // on/off
\$ftel[1] = stripslashes(\"$ftel[1]\"); // texte en langue 1
\$ftel[11] = stripslashes(\"$ftel[11]\"); // text in language 2
// contact par courrier
\$flet[0] = stripslashes(\"$flet[0]\"); // on/off
\$flet[1] = stripslashes(\"$flet[1]\"); // texte en langue 1
\$flet[11] = stripslashes(\"$flet[11]\"); // text in language 2

\$far   = stripslashes(\"$far\"); // receipt on/off
\$chkcc = stripslashes(\"$chkcc\"); // copy to webmaster on/off
?>
";
    WriteFullDB(CONFIGREP.$ctconfig.INCEXT, $mettre);
	unset($fdest, $fname, $f2name);
	$ctfiles = ReadDBFields(CONFIGREP.'ctconfigs.dtb');
	for($i = 0; $i < count($ctfiles); $i++) {
		if ($ctfiles[$i][1] == $ctconfig) {
			$ctfiles[$i][3] = $ctlbl0;
			$ctfiles[$i][4] = $ctlbl1;
		}
	}
	WriteDBFields(CONFIGREP.'ctconfigs.dtb', $ctfiles);
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=contact&act='.$act.'&ctconfig='.$ctconfig.'";'.EndJavascript();
    }
}

if ($regit == 2) {
	if (is_file(CONFIGREP.$ctname.INCEXT)) {
		echo BeginJavascript().'
alert("'.addslashes($admin[1585].$admin[1590].' contact'.$admin[1586]).'");
history.back();
'.EndJavascript();
	} else {
		$ctfiles = ReadDBFields(CONFIGREP.'ctconfigs.dtb');
		rsort($ctfiles);
		$num = $ctfiles[0][0] + 1;
		$i   = count($ctfiles);
		$ctfiles[$i] = array($num, $ctname, 'a', $ctlbl0, $ctlbl1);
		sort($ctfiles);
		WriteDBFields(CONFIGREP.'ctconfigs.dtb', $ctfiles);

		$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"".$ctname.INCEXT."\")) {
    header(\"location:../index.php\");
    die();
}

// libellé dans boîte latérale
\$ctlbl0 = stripslashes(\"$ctlbl0\"); // 1ère langue
\$ctlbl1 = stripslashes(\"$ctlbl1\"); // 2ème langue
// adresses mail
\$fdest[0] = stripslashes(\"\"); // email en copie
\$fdest[1] = stripslashes(\"\"); // email destinataire par défaut";
		for ($d = 2; $d < 4; $d++)
			$mettre .= "
\$fdest[$d] = stripslashes(\"\"); // email destinataire $d";
		$mettre .= "
//  Noms des rubriques en langue principale
\$fname[0] = stripslashes(\"\"); // Choix destinataire
\$fname[1] = stripslashes(\"\"); // Nom destinataire par défaut";
		for ($d = 2; $d < 4; $d++)
			$mettre .= "
\$fname[$d] = stripslashes(\"\"); // Nom destinataire $d";
		$mettre .= "
\$fmail[1] = stripslashes(\"\"); // Pseudo expéditeur
\$fmail[2] = stripslashes(\"\"); // e-mail expéditeur
\$ftxt[1] = stripslashes(\"\"); // 1er champ texte
\$ftxt[2] = stripslashes(\"\"); // 2ème champ texte
\$ftxt[3] = stripslashes(\"\"); // 3ème champ texte
\$ftxt[4] = stripslashes(\"\"); // 4ème champ texte
\$ftxt[5] = stripslashes(\"\"); // 5ème champ texte
\$ftxt[6] = stripslashes(\"\"); // 6ème champ texte
\$fsel[0] = stripslashes(\"\"); // Champ select
\$fsel[1] = stripslashes(\"\"); // Option 1
\$fsel[2] = stripslashes(\"\"); // Option 2
\$fsel[3] = stripslashes(\"\"); // Option 3
\$fsel[4] = stripslashes(\"\"); // Option 4
\$frad[0] = stripslashes(\"\"); // Champ bouton radio
\$frad[1] = stripslashes(\"\"); // Choix 1
\$frad[2] = stripslashes(\"\"); // Choix 2
\$frad[3] = stripslashes(\"\"); // Choix 3
\$frad[4] = stripslashes(\"\"); // Choix 4
\$fchk[0] = stripslashes(\"\"); // Champ checkbox
\$fchk[1] = stripslashes(\"\"); // Choix 1
\$fchk[2] = stripslashes(\"\"); // Choix 2
\$fchk[3] = stripslashes(\"\"); // Choix 3
\$fchk[4] = stripslashes(\"\"); // Choix 4
\$fmes[1] = stripslashes(\"\"); // Champ message
//  Rubric names in secondary language
\$f2name[0] = stripslashes(\"\"); // Choice of receiver
\$f2name[1] = stripslashes(\"\"); // Name of default receiver";
		for ($d = 2; $d < 4; $d++)
			$mettre .= "
\$f2name[$d] = stripslashes(\"\"); // Nom destinataire $d";
		$mettre .= "
\$fmail[11] = stripslashes(\"\"); // Nickname sender
\$fmail[12] = stripslashes(\"\"); // e-mail sender
\$ftxt[11] = stripslashes(\"\"); // 1st text area
\$ftxt[12] = stripslashes(\"\"); // 2nd text area
\$ftxt[13] = stripslashes(\"\"); // 3rd text area
\$ftxt[14] = stripslashes(\"\"); // 4th text area
\$ftxt[15] = stripslashes(\"\"); // 5th text area
\$ftxt[16] = stripslashes(\"\"); // 6th text area
\$fsel[10] = stripslashes(\"\"); // Select area
\$fsel[11] = stripslashes(\"\"); // Option 1
\$fsel[12] = stripslashes(\"\"); // Option 2
\$fsel[13] = stripslashes(\"\"); // Option 3
\$fsel[14] = stripslashes(\"\"); // Option 4
\$frad[10] = stripslashes(\"\"); // radio button area
\$frad[11] = stripslashes(\"\"); // Choice 1
\$frad[12] = stripslashes(\"\"); // Choice 2
\$frad[13] = stripslashes(\"\"); // Choice 3
\$frad[14] = stripslashes(\"\"); // Choice 4
\$fchk[10] = stripslashes(\"\"); // Checkbox area
\$fchk[11] = stripslashes(\"\"); // Choice 1
\$fchk[12] = stripslashes(\"\"); // Choice 2
\$fchk[13] = stripslashes(\"\"); // Choice 3
\$fchk[14] = stripslashes(\"\"); // Choice 4
\$fmes[11] = stripslashes(\"\"); // Message area
// activation des champs on / off /fix
\$chmail[1] = stripslashes(\"\"); // Champ nom 
\$chmail[2] = stripslashes(\"\"); // Champ email
\$chtxt[1] = stripslashes(\"\"); // 1er champ
\$chtxt[2] = stripslashes(\"\"); // 2ème champ
\$chtxt[3] = stripslashes(\"\"); // 3ème champ
\$chtxt[4] = stripslashes(\"\"); // 4ème champ
\$chtxt[5] = stripslashes(\"\"); // 5ème champ
\$chtxt[6] = stripslashes(\"\"); // 6ème champ
\$chsel[0] = stripslashes(\"\"); // Select
\$chrad[0] = stripslashes(\"\"); // Boutons radio
\$chchk[0] = stripslashes(\"\"); // Checkbox
\$chmes[1] = stripslashes(\"\"); // message
\$chfic[0] = stripslashes(\"\"); // fichier joint
// Contact Tel - Contact Postal au dessous de Contact e-Mail(below)
\$ftelbelow[0] = stripslashes(\"\"); // on/off
\$fletbelow[0] = stripslashes(\"\"); // on/off
// contact par téléphone
\$ftel[0] = stripslashes(\"\"); // on/off
\$ftel[1] = stripslashes(\"\"); // texte en langue 1
\$ftel[11] = stripslashes(\"\"); // text in language 2
// contact par courrier
\$flet[0] = stripslashes(\"\"); // on/off
\$flet[1] = stripslashes(\"\"); // texte en langue 1
\$flet[11] = stripslashes(\"\"); // text in language 2

\$far   = stripslashes(\"\"); // receipt on/off
\$chkcc = stripslashes(\"\"); // copy to webmaster on/off
?>
";
		WriteFullDB(CONFIGREP.$ctname.INCEXT, $mettre);
	}
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=contact&act='.$act.'";'.EndJavascript();
    }
}

if ($regit == 3) {
	$ctfiles = ReadDBFields(CONFIGREP.'ctconfigs.dtb');
    for($i = 0; $i < count($ctfiles); $i++) {
		if ($ctfiles[$i][1] == $ctconfig) $ctfiles[$i][2] = $ctfiles[$i][2] == 'a' ? 'i' : 'a';
	}
	WriteDBFields(CONFIGREP.'ctconfigs.dtb', $ctfiles);
    if ($site[7] == 'on') {
        flush();
        sleep($site[8]);
        header('location:'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=contact&act='.$act);
    }
}

if ($regit == 4) {
	$cttemp  = array();
	$ctfiles = ReadDBFields(CONFIGREP.'ctconfigs.dtb');
    for($i = 0; $i < count($ctfiles); $i++) {
		if ($ctfiles[$i][1] != $ctconfig) $cttemp[] = $ctfiles[$i];
	}
	WriteDBFields(CONFIGREP.'ctconfigs.dtb', $cttemp);
	unlink(CONFIGREP.$ctconfig.INCEXT);
    if ($site[7] == 'on') {
        flush();
        sleep($site[8]);
        header('location:'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=contact&act='.$act);
    }
}
    
if ($regit == 5) {
    include CONFIG;
    $serviz[155] = import('serviz155'); // type de courriel Contact
    include 'inc/confupdt.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=contact&act='.$act.'";'.EndJavascript();
    }
}

if (is_file ($meskin.'confskin.inc')) {
    include $meskin.'confskin.inc';
} else {
    include CHEMIN.'skins/no_skin/confskin.inc';
}

$headinc .= BeginJavascript().'
function VerifyForm0() {
    var sto    = "";
    var erreur = false;
    var lng2   = "'.$lang[1].'";
    regexp     = /^[^\.\s]+(\.[^\.\s]+)*@[^\.\s]+(\.[^\.\s]+)+$/;
    if (document.fcontact.fdest1.value > "") {
        if (!regexp.test(document.fcontact.fdest1.value)) {
            sto += "  - '.addslashes($admin[544]).' #1\n";
			document.fcontact.fdest1.className = "errorInputText";
            erreur = true;
        }
    }
    if (document.fcontact.fdest2.value > "") {
        if (!regexp.test(document.fcontact.fdest2.value)) {
            sto += "  - '.addslashes($admin[544]).' #2\n";
			document.fcontact.fdest2.className = "errorInputText";
            erreur = true;
        }
    }
    if (document.fcontact.fdest3.value > "") {
        if (!regexp.test(document.fcontact.fdest3.value)) {
            sto += "  - '.addslashes($admin[544]).' #3\n";
			document.fcontact.fdest3.className = "errorInputText";
            erreur = true;
        }
    }
    if (document.fcontact.fdest4.value > "") {
        if (!regexp.test(document.fcontact.fdest4.value)) {
            sto += "  - '.addslashes($admin[544]).' #4\n";
			document.fcontact.fdest4.className = "errorInputText";
            erreur = true;
        }
    }
    if (document.fcontact.fdest5.value > "") {
        if (!regexp.test(document.fcontact.fdest5.value)) {
            sto += "  - '.addslashes($admin[544]).' #5\n";
			document.fcontact.fdest5.className = "errorInputText";
            erreur = true;
        }
    }
    var mail1 = document.fcontact.fmail1.value;
    if (mail1.length < 5) {
        sto += "  - '.addslashes($admin[1194].' '.$admin[1195].$admin[1177]).'\n";
		document.fcontact.fmail1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var mail2 = document.fcontact.fmail2.value;
        if (mail2.length < 5) {
            sto += "  - '.addslashes($admin[1194].' '.$admin[1195].$admin[1178]).'\n";
			document.fcontact.fmail2.className = "errorInputText";
            erreur = true;
        }
    }    
    var mail11 = document.fcontact.fmail11.value;
    if (mail11.length < 5) {
        sto += "  - '.addslashes($admin[1194].' '.$admin[1196].$admin[1177]).'\n";
		document.fcontact.fmail11.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var mail12 = document.fcontact.fmail12.value;
        if (mail12.length < 5) {
            sto += "  - '.addslashes($admin[1194].' '.$admin[1196].$admin[1178]).'\n";
			document.fcontact.fmail12.className = "errorInputText";
            erreur = true;
        }
    }    
    var mes1 = document.fcontact.fmes1.value;
    if (mes1.length < 5) {
        sto += "  - '.addslashes($admin[1194].' '.$admin[1017].$admin[1177]).'\n";
		document.fcontact.fmes1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var mes11 = document.fcontact.fmes11.value;
        if (mes11.length < 5) {
            sto += "  - '.addslashes($admin[1194].' '.$admin[1017].$admin[1178]).'\n";
			document.fcontact.fmes11.className = "errorInputText";
            erreur = true;
        }
    }    
	if (document.fcontact.ctlbl0.value == "") {
		sto += "  - '.addslashes($admin[949].' '.$admin[1177]).'\n";
		document.fcontact.ctlbl0.className = "errorInputText";
		erreur = true;
	}
	if (lng2 > "") {
		if (document.fcontact.ctlbl1.value == "") {
			sto += "  - '.addslashes($admin[949].' '.$admin[1178]).'\n";
			document.fcontact.ctlbl1.className = "errorInputText";
			erreur = true;
		}
	}
    if (erreur == true) {
        sto = "'.addslashes($admin[1589]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}
function VerifyForm1() {
    var sto    = "";
    var erreur = false;
    var lng2   = "'.$lang[1].'";
	if (document.scontact.ctname.value == "") {
		sto += "  - '.addslashes($admin[1585].$admin[1590].' contact'.$admin[1586]).'\n";
		document.scontact.ctname.className = "errorInputText";
		erreur = true;
	} else {
		regexp = /^[-a-z0-9_]{2,20}$/;
		if (!regexp.test(document.scontact.ctname.value)) {
			sto += "  - '.addslashes($admin[1585].$admin[1590].' contact'.$admin[1586]).'\n";
			document.scontact.ctname.className = "errorInputText";
			erreur = true;
		}
	}
	if (document.scontact.ctlbl0.value == "") {
		sto += "  - '.addslashes($admin[949].' '.$admin[1177]).'\n";
		document.scontact.ctlbl0.className = "errorInputText";
		erreur = true;
	}
	if (lng2 > "") {
		if (document.scontact.ctlbl1.value == "") {
			sto += "  - '.addslashes($admin[949].' '.$admin[1178]).'\n";
			document.scontact.ctlbl1.className = "errorInputText";
			erreur = true;
		}
	}
	if (erreur == true) {
        sto = "'.addslashes($admin[1589]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1181]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1181], "100%");
$n = ($lng == $lang[0] ? 3 : 4);

################################################################################
// choix et création d'un contact
if (empty($act) || $act == 1) {
    include CONFIG;
	$ctfiles = ReadDBFields(CONFIGREP.'ctconfigs.dtb');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=958&mnuid=937&tconfig=0#z2').$admin[1445].'</p>
<hr />
<div class="w-100 m-auto" style="max-width:550px;">
  <fieldset style="padding-top:12px;">
    <form name="scontact" action="admin.php?lng='.$lng.'&amp;pg=contact"  method="post" onsubmit="return VerifyForm1(); return false;">
	  <input type="hidden" name="act" value="1" />
	  <input type="hidden" name="regit" value="2" />
      <div class="table-responsive-md">
	  <table class="table bord w-100 m-auto text-center" style="max-width:480px;">
	    <tr class="forum">
		  <td colspan="2" style="width:360px;text-align:center;"><b>'.$admin[1183].'</b></td>
		  <td colspan="3" style="width:120px;text-align:center;"><b>'.$admin[680].'</b></td>
		</tr>';
    foreach ($ctfiles as $ct) {
		$alt = $ct[2] == 'a' ? $admin[32] : $admin[34];
		$img = $ct[2] == 'a' ? 'on' : 'off';
		echo '
		<tr class="rep">
		  <td style="width:120px;text-align:left;">'.$ct[1].'</td>
		  <td style="width:240px;text-align:left;">'.$ct[$lng == $lang[0] ? 3 : 4].'</td>
		  <td style="width:40px;text-align:center;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=contact&amp;act=2&amp;ctconfig='.$ct[1].'" title="'.$admin[144].' '.$ct[1].'">
			  <i class="fas fa-edit" title="'.$admin[144].' '.$ct[1].'" style="font-size: 1.3rem;"></i>
            </a><br />
		  </td>
		  <td style="width:40px;text-align:center;">';
		if ($ct[1] != 'ctconfig') {
			echo '
	        <a href="admin.php?lng='.$lng.'&amp;pg=contact&amp;act=1&amp;regit=3&amp;ctconfig='.$ct[1].'" title="'.$alt.' '.$ct[1].'">
		      <i class="fas fa-toggle-'.$img.'" title="'.$alt.' '.$ct[1].'" style="font-size: 1.3rem;"></i>
			</a>';
		}
		echo '
		  </td>
		  <td style="width:40px;text-align:center;">';
		if ($ct[1] != 'ctconfig') {
			echo '
		    <a href="admin.php?lng='.$lng.'&amp;pg=contact&amp;act=1&amp;regit=4&amp;ctconfig='.$ct[1].'" title="'.$admin[186].' '.$ct[1].'">
			  <i class="fas fa-trash-alt text-danger" title="'.$admin[186].' '.$ct[1].'" style="font-size: 1.3rem;"></i>
			</a><br />';
		}
		echo '
		  </td>
		</tr>';
    }
    unset($ctfiles);
    echo '
	  </table>
      </div><br />';
    echo '
	  <br />
      <div class="table-responsive-md">
	  <table class="table w-98 m-auto">
	    <tr>
		  <td class="text-right align-middle">
            '.$admin[1590].' contact :
          </td>
		  <td>
            <input class="form-control texte" type="text" name="ctname" value="" />
          </td>
		</tr>
	    <tr>
		  <td class="text-right align-middle">
            '.$admin[949].' '.$admin[1177].' '.$flag1.' :
          </td>
		  <td>
            <input class="form-control texte" type="text" name="ctlbl0" value="" />
          </td>
		</tr>';
	if ($lang[1] != '')
		echo '
	    <tr>
		  <td class="text-right align-middle">
            '.$admin[949].' '.$admin[1178].' '.$flag2.' :
          </td>
		  <td>
            <input class="form-control texte" type="text" name="ctlbl1" value="" />
          </td>
		</tr>';
	echo '
	  </table>
      </div>
      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
      </div>
    </form>
  </fieldset>
  <fieldset style="padding-top:12px;">
    <form name="mcontact" action="admin.php?lng='.$lng.'&amp;pg=contact"  method="post">
	  <input type="hidden" name="act" value="1" />
	  <input type="hidden" name="regit" value="5" />
      <div style="text-align:center;margin-bottom:12px;">
        '.$admin[230].'<input type="texte" name="serviz155" value="phpmailer" readonly size=8 maxsize=8>
      </div>
      <div class="row quest p-0 mt-2 w-100 m-auto">
	    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
        <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
      </div>
    </form>
  </fieldset>
</div>';
}
################################################################################
// modification d'un contact
elseif ($act == 2) {
	if (is_file(CONFIGREP.$ctconfig.INCEXT)) include CONFIGREP.$ctconfig.INCEXT;
	echo '
<p class="text-center w-100 m-auto"><br />'.ToHelp($lng, 'contact').$admin[1189].'</p>
<hr />
<form name="fcontact" action="admin.php?lng='.$lng.'&amp;pg=contact" method="post" onsubmit="return VerifyForm0(); return false;">
  <input type="hidden" name="act" value="2" />
  <input type="hidden" name="regit" value="1" />
  <input type="hidden" name="ctconfig" value="'.$ctconfig.'" />
  <div class="text-center">'.$admin[949].' '.$admin[1446].'</div>
  <div class="table-responsive-md">
  <table class="table w-100 m-auto">
    <tr>
	  <td class="text-center">
        <div class="d-inline-block text-right">'.$flag1.'&nbsp;</div>
	    <div class="d-inline-block text-left">
		  <input class="form-control texte" type="text" name="ctlbl0" value="'.$ctlbl0.'" style="width:240px;" />
        </div>
      </td>
    </tr>';
	if ($lang[1] != '')
		echo '
    <tr>
	  <td class="text-center">
        <div class="d-inline-block text-right">'.$flag2.'&nbsp;</div>
	    <div class="d-inline-block text-left">
		  <input class="form-control texte" type="text" name="ctlbl1" value="'.$ctlbl1.'" style="width:240px;" />
        </div>
      </td>
    </tr>';
	echo '
  </table>
  </div>
  <hr />
  <div class="w-100 m-auto" style="max-width:700px;">
    <div class="row quest p-0 mb-2 w-100 m-auto">
	  <div class="col-md-6">
        '.SubmitButton($admin[857].' '.$admin[1183], 'self.location.href=\'admin.php?lng='.$lng.'&pg=contact&act=1\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
	<fieldset class="m-0"><legend style="text-align:center;">'.mb_strtoupper($admin[1682], $charset).'</legend>';

	// Select email destinataire ------------------------------
	if (!empty($lang[1])) {
	  $tpos = '<span style="padding-left:16px;">&nbsp; </span>';
	  $pos  = '20px';
	} else {
	  $tpos = '<span style="padding-left:32px;">&nbsp; </span>';
	  $pos  = '10px';
	}
	echo '
	  <p style="text-align:center"><strong>'.$admin[1683].' '.mb_strtolower($admin[759], $charset).'</strong></p>
	  <div class="text-left my-0 mx-auto w-100" style="max-width:520px;">
		<div class="w-100 text-left">&bull; ';
	if (!empty($lang[1])) {
		echo '
		  <div class="d-inline-block">'.$flag1.'&nbsp; </div>';
	}
	echo '
		  <div class="d-inline-block">
            <input class="form-control texte" name="fname0" type="text" style="width:208px;" value="'.htmlentities($fname[0], ENT_QUOTES, $charset).'" />
          </div>
		  <div class="d-inline-block"><i class="fas fa-caret-square-down text-secondary" style="font-size: 1.4rem;"></i></div>
        </div>';
	$fname[1] = ($fname[1] == '') ? $admin[718] : $fname[1];
    $f2name[1] = ($f2name[1] == '') ? $admin[718] : $f2name[1];
	$fdest[1] = ($fdest[1] == '') ? $user[1] : $fdest[1];
	if (!empty($lang[1])) {
		echo '
		<div class="w-100 text-left">
		  <div class="d-inline-block">&bull; '.$flag2.'&nbsp; </div>
		  <div class="d-inline-block">
            <input class="form-control texte" name="f2name0" type="text" style="width:208px;" value="'.htmlentities($f2name[0], ENT_QUOTES, $charset).'" />
          </div>
		  <div class="d-inline-block"><i class="fas fa-caret-square-down text-secondary" style="font-size: 1.4rem;"></i></div>
        </div>';
	}
	echo '
      </div>'; 
	$nb     = count($fdest) < 5 ? 5 : count($fdest) + 2;
	$fdest  = array_pad($fdest, $nb, '');
	$fname  = array_pad($fname, $nb, '');
	$f2name = array_pad($f2name, $nb, '');
	echo '
      <input type="hidden" name="nbdest" value='.$nb.' />
      <div class="table-responsive-md">
        <table class="table w-100 p-2">';
	for ($d = 1; $d < $nb; $d++) {
		$note = $d != 1 ? '' : ' (*)';
		echo '
          <tr>
            <td class="align-middle'.(empty($lang[1]) ? ' pb-2' : '').'">';
		if (!empty($lang[1])) {
			echo '
              <div class="d-inline-block align-middle">'.$flag1.'</div>';
		}
		echo '
              <div class="d-inline-block">
                <input class="form-control texte" name="fname'.$d.'" type="text" style="width:160px;" 
                  value="'.htmlentities($fname[$d], ENT_QUOTES, $charset).'" />
              </div>';
		if (!empty($lang[1])) {
			echo '
              <div>
                <div class="d-inline-block align-middle pb-2">'.$flag2.'</div>
                <div class="d-inline-block align-middle pb-2">
                  <input class="form-control texte" name="f2name'.$d.'" type="text" style="width:160px;" 
                    value="'.htmlentities($f2name[$d], ENT_QUOTES, $charset).'" />
                </div>
              </div>';
		}
        echo '
            </td>
            <td class="align-middle'.(empty($lang[1]) ? ' pb-2' : '').'">
              <div class="d-inline-block">
                <input class="form-control texte" name="fdest'.$d.'" type="text" style="width:200px;" value="'.$fdest[$d].'" />
              </div>
              <div class="d-inline-block text-left"> '.$note.'</div>
            </td>
          </tr>';
	}
    echo '
        </table>
      </div>';

	// Copie Cc et Bcc -----------------------------------------
	echo '
      <div class="table-responsive-md">
        <table class="table w-100 p-2">
          <tr>
            <td class="w-60 align-middle">&bull; <label for="fdest0">'.$admin[1190].'</label> :</td>
            <td class="w-40">
              <input class="form-control texte" id="fdest0" name="fdest0" type="text" value="'.$fdest[0].'" />
            </td>
          </tr>
          <tr>
            <td class="pt-4 text-right">&bull; <label for="chkcc">'.$admin[459].'</label></td>
            <td class="text-left pr-2">
              <input class="mt-3" type="checkbox" id="chkcc" name="chkcc"'.Checked($chkcc).' />
              <script>
                $(document).ready(function(){
                  $(\'.repwebm\').popover({
                    title:"'.mb_substr($admin[459], 0, -2).'",
                    content:"'.$help[26].'",
                    trigger:"hover",
                    placement:"auto",
                    html:true
                  });
                });
              </script>
              <div class="overpop pl-3 mt-n4">&nbsp;
                <a class="repwebm" title="'.$admin[1634].'">
                  <i class="far fa-comment-dots"></i>
                </a>
              </div>
            </td>
          </tr>
        </table>
      </div>
      <hr />';

	// mail expéditeur ----------------------------------------
	echo '
  <p style="text-align:center;"><strong>'.$admin[1191].' :</strong></p>
  <div class="table-responsive-md">
    <table class="table w-100 p-2">
      <tr>
        <td class="w-20 p-0 text-left align-middle">&bull; '.$admin[1194].' '.$admin[1195].'</td>
        <td class="w-40 p-0 text-left align-middle">
          <input type="radio" name="chmail1" value="fix" checked="checked" />&nbsp;'.$admin[1188].' (*)
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="fmail1" type="text" size="24" value="'.htmlentities($fmail[1], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="fmail11" type="text" size="24" value="'.htmlentities($fmail[11], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
      <tr>
        <td class="w-20 text-left p-0 text-left align-middle">&bull; '.$admin[1194].' '.$admin[1196].'</td>
        <td class="w-40 text-left p-0 text-left align-middle">
          <input type="radio" name="chmail2" value="fix" checked="checked" />&nbsp;'.$admin[1188].' (*)
        </td>
        <td class="w-40 text-right p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="fmail2" type="text" size="24" value="'.htmlentities($fmail[2], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="fmail12" type="text" size="24" value="'.htmlentities($fmail[12], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
    </table>
  </div>';

	// zones texte 1 à 3 --------------------------------------
	echo '
  <hr />
  <p style="text-align:center"><strong>'.$admin[1192].mb_strtolower($admin[1017]).'</strong></p>
  <div class="table-responsive-md">
    <table class="table w-100 p-2">
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1197].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="cht11" name="chtxt1" value=""'.Checked($chtxt[1] == '').' />
            <span class="pr-3"><label for="cht11">'.$admin[1604].'</label></span>
          <input type="radio" id="cht12" name="chtxt1" value="on"'.Checked($chtxt[1] == 'on').' />
            <span class="pr-3"><label for="cht12">'.$admin[1605].'</label></span>
          <input type="radio" id="cht13" name="chtxt1" value="fix"'.Checked($chtxt[1] == 'fix').' />
            <span class="pr-3"><label for="cht13">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="ftxt1" type="text" size="24" value="'.htmlentities($ftxt[1], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="ftxt11" type="text" size="24" value="'.htmlentities($ftxt[11], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1198].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="cht21" name="chtxt2" value=""'.Checked($chtxt[2] == '').' />
            <span class="pr-3"><label for="cht21">'.$admin[1604].'</label></span>
          <input type="radio" id="cht22" name="chtxt2" value="on"'.Checked($chtxt[2] == 'on').' />
            <span class="pr-3"><label for="cht22">'.$admin[1605].'</label></span>
          <input type="radio" id="cht23" name="chtxt2" value="fix"'.Checked($chtxt[2] == 'fix').' />
            <span class="pr-3"><label for="cht23">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="ftxt2" type="text" size="24" value="'.htmlentities($ftxt[2], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="ftxt12" type="text" size="24" value="'.htmlentities($ftxt[12], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1199].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="cht31" name="chtxt3" value=""'.Checked($chtxt[3] == '').' />
            <span class="pr-3"><label for="cht31">'.$admin[1604].'</label></span>
          <input type="radio" id="cht32" name="chtxt3" value="on"'.Checked($chtxt[3] == 'on').' />
            <span class="pr-3"><label for="cht32">'.$admin[1605].'</label></span>
          <input type="radio" id="cht33" name="chtxt3" value="fix"'.Checked($chtxt[3] == 'fix').' />
            <span class="pr-3"><label for="cht33">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="ftxt3" type="text" size="24" value="'.htmlentities($ftxt[3], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="ftxt13" type="text" size="24" value="'.htmlentities($ftxt[13], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
    </table>
  </div>';

	// zone select --------------------------------------------
    echo '
  <div class="table-responsive-md">
    <table class="table w-100 p-2">
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1193].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="chs01" name="chsel0" value=""'.Checked($chsel[0] == '').' />
            <span class="pr-3"><label for="chs01">'.$admin[1604].'</label></span>
          <input type="radio" id="chs02" name="chsel0" value="on"'.Checked($chsel[0] == 'on').' />
            <span class="pr-3"><label for="chs02">'.$admin[1605].'</label></span>
          <input type="radio" id="chs013" name="chsel0" value="fix"'.Checked($chsel[0] == 'fix').' />
            <span class="pr-3"><label for="chs03">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="fsel0" type="text" size="22" value="'.htmlentities($fsel[0], ENT_QUOTES, $charset).'" />
          </div>
          <div class="d-inline-block"><i class="fas fa-caret-square-down text-secondary ml-1" style="font-size: 1.4rem;"></i></div>
        </td>
      </tr>';
	for ($s = 1; $s <= 4; $s++) {
		echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2">
          <input class="form-control texte float-right" name="fsel'.$s.'" type="text"  style="width:180px;" 
            value="'.htmlentities($fsel[$s], ENT_QUOTES, $charset).'" />
        </td>
      </tr>';
	}
	if (!empty($lang[1])) {
		echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control texte" name="fsel0" type="text" size="22" value="'.htmlentities($fsel[0], ENT_QUOTES, $charset).'" />
          </div>
          <div class="d-inline-block"><i class="fas fa-caret-square-down text-secondary ml-1" style="font-size: 1.4rem;"></i></div>
        </td>
      </tr>';
		for ($s = 11; $s <= 14; $s++) {
			echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <input class="form-control texte float-right" name="fsel'.$s.'" type="text" style="width:180px;" 
            value="'.htmlentities($fsel[$s], ENT_QUOTES, $charset).'" />
        </td
      </tr>';
		}
	}
    echo '
    </table>
  </div>';

	// zone boutons radio -------------------------------------
    echo '
  <div class="table-responsive-md">
    <table class="table w-100 p-2">
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1203].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="chr01" name="chrad0" value=""'.Checked($chrad[0] == '').' />
            <span class="pr-3"><label for="chr01">'.$admin[1604].'</label></span>
          <input type="radio" id="chr02" name="chrad0" value="on"'.Checked($chrad[0] == 'on').' />
            <span class="pr-3"><label for="chr02">'.$admin[1605].'</label></span>
          <input type="radio" id="chr013" name="chrad0" value="fix"'.Checked($chrad[0] == 'fix').' />
            <span class="pr-3"><label for="chr03">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="frad0" type="text" size="24" value="'.htmlentities($frad[0], ENT_QUOTES, $charset).'" />
          </div>
          <div class="d-inline-block"><i class="fas fa-caret-square-down text-transparent ml-1" style="font-size: 1.4rem;"></i></div>
        </td>
      </tr>';
	for ($b = 1; $b <= 4; $b++) {
		echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block"><i class="far fa-dot-circle mr-1" style="font-weight: 900;"></i></div>
          <div class="d-inline-block">
            <input class="form-control texte" name="frad'.$b.'" type="text" size="24" value="'.htmlentities($frad[$b], ENT_QUOTES, $charset).'" />
          </div>
        </td>
      </tr>';
	}
	if (!empty($lang[1])) {
		echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control texte" name="frad10" type="text" size="24" value="'.htmlentities($frad[10], ENT_QUOTES, $charset).'" />
          </div>
          <div class="d-inline-block"><i class="fas fa-caret-square-down text-transparent ml-1" style="font-size: 1.4rem;"></i></div>
        </td>
      </tr>';
		for ($b = 11; $b <= 14; $b++) {
			echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block"><i class="far fa-dot-circle mr-1" style="font-weight: 900;"></i></div>
          <div class="d-inline-block">
            <input class="form-control texte" name="frad'.$b.'" type="text" size="24" value="'.htmlentities($frad[$b], ENT_QUOTES, $charset).'" />
          </div>
        </td
      </tr>';
		}
	}
    echo '
    </table>
  </div>';

	// zone cases à cocher ------------------------------------
    echo '
  <div class="table-responsive-md">
    <table class="table w-100 p-2">
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1204].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="chchk1" name="chchk0" value=""'.Checked($chchk[0] == '').' />
            <span class="pr-3"><label for="chchk1">'.$admin[1604].'</label></span>
          <input type="radio" id="chchk2" name="chchk0" value="on"'.Checked($chchk[0] == 'on').' />
            <span class="pr-3"><label for="chchk2">'.$admin[1605].'</label></span>
          <input type="radio" id="chchk3" name="chchk0" value="fix"'.Checked($chchk[0] == 'fix').' />
            <span class="pr-3"><label for="chchk3">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="fchk0" type="text" size="24" value="'.htmlentities($fchk[0], ENT_QUOTES, $charset).'" />
          </div>
          <div class="d-inline-block"><i class="fas fa-caret-square-down text-transparent ml-1" style="font-size: 1.4rem;"></i></div>
        </td>
      </tr>';
	for ($c = 1; $c <= 4; $c++) {
		echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block"><i class="fas fa-check-square mr-1" style="font-weight: 900;"></i></div>
          <div class="d-inline-block">
            <input class="form-control texte" name="fchk'.$c.'" type="text" size="24" value="'.htmlentities($fchk[$c], ENT_QUOTES, $charset).'" />
          </div>
        </td>
      </tr>';
	}
	if (!empty($lang[1])) {
		echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control texte" name="fchk10" type="text" size="24" value="'.htmlentities($fchk[10], ENT_QUOTES, $charset).'" />
          </div>
          <div class="d-inline-block"><i class="fas fa-check-square text-transparent ml-1" style="font-size: 1.4rem;"></i></div>
        </td>
      </tr>';
		for ($c = 11; $c <= 14; $c++) {
			echo '
      <tr>
        <td class="w-25">&nbsp;</td>
        <td class="w-35">&nbsp;</td>
        <td class="w-40 p-0 pr-2 text-right">
          <div class="d-inline-block"><i class="fas fa-check-square mr-1" style="font-weight: 900;"></i></div>
          <div class="d-inline-block">
            <input class="form-control texte" name="fchk'.$c.'" type="text" size="24" value="'.htmlentities($fchk[$c], ENT_QUOTES, $charset).'" />
          </div>
        </td
      </tr>';
		}
	}
    echo '
    </table>
  </div>';

	// zones texte 4 à 6 --------------------------------------
    echo '
  <div class="table-responsive-md">
    <table class="table w-100 p-2">
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1200].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="cht41" name="chtxt4" value=""'.Checked($chtxt[4] == '').' />
            <span class="pr-3"><label for="cht41">'.$admin[1604].'</label></span>
          <input type="radio" id="cht42" name="chtxt4" value="on"'.Checked($chtxt[4] == 'on').' />
            <span class="pr-3"><label for="cht42">'.$admin[1605].'</label></span>
          <input type="radio" id="cht43" name="chtxt4" value="fix"'.Checked($chtxt[4] == 'fix').' />
            <span class="pr-3"><label for="cht43">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="ftxt4" type="text" size="24" value="'.htmlentities($ftxt[4], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="ftxt14" type="text" size="24" value="'.htmlentities($ftxt[14], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1201].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="cht51" name="chtxt5" value=""'.Checked($chtxt[5] == '').' />
            <span class="pr-3"><label for="cht51">'.$admin[1604].'</label></span>
          <input type="radio" id="cht52" name="chtxt5" value="on"'.Checked($chtxt[5] == 'on').' />
            <span class="pr-3"><label for="cht52">'.$admin[1605].'</label></span>
          <input type="radio" id="cht53" name="chtxt5" value="fix"'.Checked($chtxt[5] == 'fix').' />
            <span class="pr-3"><label for="cht53">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="ftxt5" type="text" size="24" value="'.htmlentities($ftxt[5], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="ftxt15" type="text" size="24" value="'.htmlentities($ftxt[15], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1202].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" id="cht61" name="chtxt6" value=""'.Checked($chtxt[6] == '').' />
            <span class="pr-3"><label for="cht61">'.$admin[1604].'</label></span>
          <input type="radio" id="cht62" name="chtxt6" value="on"'.Checked($chtxt[6] == 'on').' />
            <span class="pr-3"><label for="cht62">'.$admin[1605].'</label></span>
          <input type="radio" id="cht63" name="chtxt6" value="fix"'.Checked($chtxt[6] == 'fix').' />
            <span class="pr-3"><label for="cht63">'.$admin[1188].'</label></span>
        </td>
        <td class="w-40 p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="ftxt6" type="text" size="24" value="'.htmlentities($ftxt[6], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="ftxt16" type="text" size="24" value="'.htmlentities($ftxt[16], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
      <tr>
        <td class="w-25 p-0 text-left align-middle">&bull; '.$admin[1194].' '.$admin[1017].'</td>
        <td class="w-35 p-0 pt-1 text-left align-middle">
          <input type="radio" name="chmes1" value="fix" checked="checked" />&nbsp;'.$admin[1188].' (*)
        </td>
        <td class="w-40 text-right p-0 pr-2 text-right">';
    if (!empty($lang[1])) {
		echo '
          <div class="d-inline-block">'.$flag1.'</div>';
	}
    echo '
          <div class="d-inline-block">
            <input class="form-control texte" name="fmes1" type="text" size="24" value="'.htmlentities($fmes[1], ENT_QUOTES, $charset).'" />
          </div>';
	if (!empty($lang[1])) {
		echo '
          <div>
            <div class="d-inline-block">'.$flag2.'</div>
            <div class="d-inline-block">
              <input class="form-control texte" name="fmes11" type="text" size="24" value="'.htmlentities($fmes[11], ENT_QUOTES, $charset).'" />
            </div>
          </div>';
	}
    echo '
        </td>
      </tr>
    </table>
  </div>';

	// zone fichiers joints -----------------------
	echo '
  <div style="text-align:left;width:520px;">
    <div style="width:120px;float:left;position:relative;top:14px;padding-left:12px;">&bull; '.$admin[1205].'</div>
    <div style="width:240px;float:left;position:relative;top:4px;left:28px;padding:0 8px 0 0;text-align:left;">
      <select class="form-control" name="chfic0" style="width:60px;">';
	for ($s = 0; $s < 6; $s++) { // max fichiers
		echo '
        <option value="'.$s.'"'; 
		if ($chfic[0] == $s) { 
			echo ' selected="selected"'; 
		} 
		echo '>'.$s.'</option>';
	}
	echo '
      </select></div>
    <div class="clearfix"></div>
  </div>';

	// Notice -----------------------------
	echo '
    <p style="text-align:left;padding:12px 0;">&nbsp;(*) <span class="notice">'.$admin[1206].'</span></p><hr />';

	// receipt
	echo '
    <div class="row">
      <div class="col-md-6 text-right"><strong>&bull; <label for="ar">'.$admin[1207].'</label> </strong></div>
      <div class="col-md-6 form-check text-left pl-4">
        <input class="form-check-input" type="checkbox" id="ar" name="ar"'.Checked($far).' />
      </div>
    </div>
  </fieldset>';
	
	// ----------- Phone contact - OPTION au dessous de Contact e-Mail - Phone contact below e-Mail contact --------------
	echo '
    <div class="row quest p-0 my-2 w-100 m-auto">
	  <div class="col-md-6">
        '.SubmitButton($admin[857].' '.$admin[1183], 'self.location.href=\'admin.php?lng='.$lng.'&pg=contact&act=1\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  <fieldset class="m-0"><legend style="text-align:center;"><label for="ftel0">'.mb_strtoupper($admin[1684], $charset).'&nbsp;
    <input id="ftel0" name="ftel0" type="checkbox"';
	if ($ftel[0]) echo ' checked="checked"';
	echo ' /></label></legend>';
	echo '<div style="text-align:center;"><strong><label for="ftelbelow0">'.$admin[1553].'</label></strong>&nbsp;
      <input id="ftelbelow0" name="ftelbelow0" type="checkbox"';
	if ($ftelbelow[0]) echo ' checked="checked"';
	echo ' /></div>';
	echo '
  <div style="text-align:left;width:100%;">
    <p style="text-align:left;">&bull; '.$admin[1208].'</p>
    <div class="text-center">';
	if (!empty($lang[1])) {
		echo '
      <div class="my-2">'.$flag1.'</div>';
	}
	$ftel1 = stripslashes($ftel[1]);
	display_admin_editor('ftel1', '100%', '140px', $ftel1);
	if (!empty($lang[1])) {
		echo '
      <div class="my-2">'.$flag2.'</div>';
		$ftel11 = stripslashes($ftel[11]);
		display_admin_editor('ftel11', '100%', '140px', $ftel11);
	}
	echo '
    </div>
  </div>
  </fieldset>';

	// ----------- Postal contact - OPTION au dessous de Contact e-Mail - Postal contact below e-Mail contact ------
	echo '
    <div class="row quest p-0 my-2 w-100 m-auto">
	  <div class="col-md-6">
        '.SubmitButton($admin[857].' '.$admin[1183], 'self.location.href=\'admin.php?lng='.$lng.'&pg=contact&act=1\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  <fieldset><legend style="text-align:center;"><label for="flet0">'.mb_strtoupper($admin[1685], $charset).'</label>&nbsp;
    <input class="texte" id="flet0" name="flet0" type="checkbox"';
	if ($flet[0]) echo ' checked="checked"';
	echo ' /></legend>';
	echo '<div style="text-align:center;"><strong><label for="fletbelow0">'.$admin[1553].'</label></strong>&nbsp;
      <input class="texte" id="fletbelow0" name="fletbelow0" type="checkbox"';
	if ($fletbelow[0]) echo ' checked="checked"';
	echo ' /></div>';
	echo '
  <div style="text-align:left;width:100%;">
    <p style="text-align:left;">&bull; '.$admin[1208].'</p>
    <div class="text-center">';
	if (!empty($lang[1])) {
		echo '
      <div class="my-2">'.$flag1.'</div>';
	}
	$flet1 = stripslashes($flet[1]);
	display_admin_editor('flet1', '100%', '140px', $flet1);
	if (!empty($lang[1])) {
		echo '
      <div class="my-2">'.$flag2.'</div>';
	$flet11 = stripslashes($flet[11]);
	display_admin_editor('flet11', '100%', '140px', $flet11);
	}
	echo '
    </div>
  </div>
  </fieldset>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">
        '.SubmitButton($admin[857].' '.$admin[1183], 'self.location.href=\'admin.php?lng='.$lng.'&pg=contact&act=1\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  </div>
</form>';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
countart.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/countart.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Articles Counters
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[31] == '') {
        $nomzone = $admin[17];
        include 'access.inc';
        exit();
    }
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[654];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[654], '100%');

$dbwork = ReadDBFields(DBART);
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1004&mnuid=937&tconfig=0#z2').'
<div style="text-align:center;">
  '.$admin[658].'<b> '.count($dbwork).'</b> '.$admin[659].'<br />
  <hr />
</div>
<br />
<div class="table-responsive-md">
<table class="table table-bordered w-98 m-auto">
  <tr class="forum">
    <td><b>'.$admin[5].'</b></td>
    <td><b> '.$admin[673].' </b></td>
    <td><b> '.$admin[144].' </b></td>
    <td><b> '.$admin[663].' </b></td>
  </tr>';
$j = $lng == $lang[0] ? 0 : 1;
$k = 0;
$arttbl = array();
for ($i = 0; $i < count($dbwork); $i++) {
    $arttbl[$k][0] = $dbwork[$i][0+$j];
    $arttbl[$k][1] = $dbwork[$i][2+$j];
    $arttbl[$k][2] = $dbwork[$i][4];
    $k++;
}
for ($i = 0; $i < count($arttbl); $i++) {
    $dbcounter = ReadDocCounter($arttbl[$i][2]);
    $txtcount = $dbcounter > 1 ? $admin[662]: $admin[661];
    $class = $i % 2 == 0 ? ' class="quest"' : ' class="rep"';
    echo '
  <tr'.$class.'>
    <td>'.$texte[3].' '.$arttbl[$i][1].'</td>
    <td class="text-center">'.$dbcounter." ".$txtcount.'</td>
    <td class="text-center">
      <a href="admin.php?lng='.$lng.'&amp;pg=gestcounter&amp;mod=1&amp;id='.$arttbl[$i][2].'&amp;cnum=2" title="">'.$admin[144].'</a>
    </td>
    <td class="text-center">
      <a href="admin.php?lng='.$lng.'&amp;pg=gestcounter&amp;del=1&amp;id='.$arttbl[$i][2].'&amp;cnum=2" title="">'.$admin[663].'</a>
    </td>
  </tr>';
}
echo '
</table>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
countdwnl.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/countdwnl.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Download Counters
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
	include REDACREP.$userprefs[1].INCEXT;
	if ($drtuser[31] == "") {
		$nomzone = $admin[17];
		include 'access.inc';
		exit();
	}
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[656];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
$dbwork = ReadDBFields(DBDNLOAD);
sort($dbwork);
htable($admin[656], '100%');

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1008&mnuid=937&tconfig=0#z2').'
<div style="text-align:center;">
'.$admin[658]."<b> ".count($dbwork)."</b> ".$admin[659].'
  <hr />
</div>
<br />
<div class="table-responsive-md">
<table class="table table-bordered w-98 m-auto">
  <tr class="forum">
    <td><b> '.$admin[18].' </b></td>
    <td><b> '.$admin[664].' </b></td>
    <td><b> '.$admin[144].' </b></td>
    <td><b> '.$admin[663].' </b></td>
  </tr>';
for ($i = 0; $i < count($dbwork); $i++) {
    ReadDoc($dbwork[$i][4]);
    $txt1 = $lng == $lang[0] ? $fieldb1 : $fieldb2;
    $dbcounter = ReadDocCounter($dbwork[$i][4]);
    $txtcount = $dbcounter > 1 ? $admin[662] : $admin[661];
    $class = $i % 2 == 0 ? ' class="quest"' : ' class="rep"';
    echo '
  <tr'.$class.'>
    <td>'.$texte[3].' '.$txt1.'</td>
    <td class="text-center">'.$dbcounter.' '.$txtcount.'</td>
    <td class="text-center">
      <a href="admin.php?lng='.$lng.'&amp;pg=gestcounter&amp;mod=1&amp;id='.$dbwork[$i][4].'&amp;cnum=1">'.$admin[144].'</a>
    </td>
    <td class="text-center">
      <a href="admin.php?lng='.$lng.'&amp;pg=gestcounter&amp;del=1&amp;id='.$dbwork[$i][4].'&amp;cnum=1">'.$admin[663].'</a>
    </td>
  </tr>';
}
echo '
</table>
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
counter.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/counter.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Counter
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[31] == '') {
        $nomzone = $admin[17];
        include 'access.inc';
        exit();
    }
}

$actlog  = import('actlog', 'GET');
$visites = import('visites');
$numeric = import('numeric');
$action  = import('action', 'POST');

if ($action == 'go') {
	$nblog   = import('nblog');
    $tmplog1 = file(DBLOGSTATS);
    $tmplog2 = array();
	$tmplog0 = array();
    for($i = max(0, count($tmplog1) - $nblog); $i < count($tmplog1); $i++) {
  //      $tmplog2[][0] = trim($tmplog1[$i]);
		$dblog2 = explode(';', $tmplog1[$i]);
		$tmplog0[$i][0] = $dblog2[0].';';
		$tmplog0[$i][1] = $dblog2[1];
		$tmplog2[][0] = trim($tmplog0[$i][0].$tmplog0[$i][1]);
    }
    WriteDBFields(DBLOGSTATS, $tmplog2);
}

if ($visites == 1) {
    if ($numeric < 1) {
        $numeric = 1;
    }
    WriteCounter(DBSTATS,$numeric);
    WriteCounter(DBSTATSBK,$numeric);
    $tmplog1 = file(DBLOGSTATS);
    $tmplog2 = array();
    for($i = 0; $i < count($tmplog1)-1; $i++) {
  //      $tmplog2[][0] = trim($tmplog1[$i]);
		$dblog2 = explode(';', $tmplog1[$i]);
		$tmplog0[$i][0] = $dblog2[0].';';
		$tmplog0[$i][1] = $dblog2[1];
		$tmplog2[][0] = trim($tmplog0[$i][0].$tmplog0[$i][1]);
    }
    WriteDBFields(DBLOGSTATS, $tmplog2);
    WriteCounter(DBLOGDATE, '');
}
$pgvues = ReadCounter(DBSTATS);

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[141]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[141], '100%');
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1002&mnuid=937&tconfig=0#z2').'</p>';

if (!empty($actlog)) {
	switch($actlog) {
	case 'vider' :
		$mess = $admin[754];
		$nblog = 2;
		break;
	case 'reduire' :
		$mess = $admin[755];
		$nblog = 9;
		break;
	}
	echo '
<div class="text-center mt-5">
  <form name="confactlog" action="admin.php?lng='.$lng.'&amp;pg=counter" method="POST">
    <input type="hidden" name="action" value="go">
    <input type="hidden" name="nblog" value="'.$nblog.'">
    <fieldset class="text-center w-100 m-auto" style="max-width:300px;">';
    echo '<p>'.$mess.'</p><p><strong>'.strtoupper($admin[993]).' : '.$admin[48].'</strong></p>
      <span style="margin-right:6px;">
        '.SubmitButton($admin[1605]).'
      </span>
      <span style="margin-left:6px;">
        '.SubmitButton($admin[1604], 'self.location.href=\'admin.php?lng='.$lng.'&pg=counter\'', '', '', 'button').'
      </span>
    </fieldset>
  </form>
</div>';
}

echo '
<div class="text-center mt-5">
  <br />
  <form action="admin.php?lng='.$lng.'&amp;pg=counter" method="post">
    <input type="hidden" name="visites" value="1"/>
    <div class="table-responsive-md">
    <table class="table m-auto">
    <tr><td style="text-align:center;">'.$admin[142].'</td></tr>
    <tr>
      <td style="text-align:center;">
        <div class="d-inline-block"><input class="form-control texte" type="text" name="numeric" size="6" value="'.$pgvues.'"/></div>
        <div class="d-inline-block ps-2">'.SubmitButton($admin[144], '', $imggauche, '').'</div>
      </td>
    </tr>
    </table>
    </div>
  </form>';
if (is_file(DBLOGSTATS)) {
	function DiffDate($d1, $d2) {
		list($j1, $m1, $a1) = explode('/', $d1);
		list($j2, $m2, $a2) = explode('/', $d2);
		$result = (mktime(0, 0, 0, (int)$m1, (int)$j1, (int)$a1) - mktime(0, 0, 0, (int)$m2, (int)$j2, (int)$a2))/86400;
		return max(1, $result);
	}
	$dblog1 = file(DBLOGSTATS);
	if (count($dblog1) > 2) {
		for($i=0; $i<count($dblog1); $i++) {
    		$dblog2 = explode(';', $dblog1[$i]);
    		$dblog3[$i][0] = $dblog2[0];
    		$dblog3[$i][1] = $dblog2[1];
    		$dblog3[$i][2] = ($i == 0 ? 0 : ($dblog2[1] - $dblog3[$i - 1][1])/DiffDate($dblog2[0], $dblog3[$i - 1][0]));
		}
		for($i=1; $i<count($dblog3); $i++) {
			$dblog3[$i][2] = ($dblog3[$i][1] - $dblog3[$i - 1][1])/DiffDate($dblog3[$i][0],$dblog3[$i - 1][0]);
			if ($dblog3[$i][2] < 0) {
				$dblog3[$i][1] = $dblog3[$i-1][1] + $dblog3[$i-1][2] * (DiffDate($dblog3[$i][0],$dblog3[$i - 1][0]));
				$dblog3[$i][2] = $dblog3[$i-1][2];
				$dblog3[$i][3] = ' style="color:red"';
				$dblog3[$i][4] = CHEMIN.'inc/img/bars/rouge.gif';
			}
			else {
				$dblog3[$i][3] = '';
				$dblog3[$i][4] = CHEMIN.'inc/img/bars/vert.gif';
			}
		}
		$countmin = 999999999;
		for ($i = count($dblog3)-1; $i > max(count($dblog3)-16, 0); $i--) {
			$countmin = min($countmin, $dblog3[$i][1]);
		}
		$countmax = $dblog3[count($dblog3)-1][1];
		echo '
  <p>&nbsp;</p><hr />
  <div class="table-responsive-md">
  <table class="table w-98 m-auto" style="margin-right:120px;">';
		echo '
	<tr><td colspan="3" style="text-align:center;">'.$admin[750].'</td></tr>';
		echo '
	<tr style="text-align:center;">
	  <td style="width:15%;">'.$admin[751].'</td>
	  <td style="width:15%;">'.$admin[752].'</td>
	  <td style="width:70%;">'.$admin[753].'</td>
	</tr>';
		$diff = 0;
		for ($i = count($dblog3)-1; $i > max(count($dblog3)-16, 0); $i--) {
			$pourcent = 4 + floor(100 * ($dblog3[$i][1] - $countmin) / ($countmax - $countmin));
			$diff += $dblog3[$i][2];
			echo '
	<tr>
	  <td style="text-align:center;">'.$dblog3[$i][0].'</td>
	  <td style="text-align:center;"'.$dblog3[$i][3].'>'.$dblog3[$i][1].'</td>
	  <td style="text-align:left;">
	    <img src="'.$dblog3[$i][4].'" style="height:10px;width:'.$pourcent.'%;" alt="'.$pourcent.'%" />
	  </td>
	</tr>';
		}
		echo '
  </table>
  </div>';
		echo '
  <p style="text-align:center;">
    '.(empty($actlog) || $actlog == 'reduire' 
      ? SubmitButton($admin[754], 'self.location.href=\'admin.php?lng='.$lng.'&pg=counter&actlog=vider\'', '', '', 'button') : '').'      
    '.(empty($actlog) || $actlog == 'vider' 
      ? SubmitButton($admin[755], 'self.location.href=\'admin.php?lng='.$lng.'&pg=counter&actlog=reduire\'', '', '', 'button') : '').'
  </p>
  <hr />';
	}
}
echo '
</div>';

btable();
include CHEMIN."admin/bpage.inc";
?>
countforum.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/countforum.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Forum Counters
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
	include REDACREP.$userprefs[1].INCEXT;
	if ($drtuser[31] == "") {
		$nomzone = $admin[17];
		include 'access.inc';
		exit();
	}
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[655];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
$dbwork = ReadDBFields(DBFORUM);
htable($admin[655], '100%');

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1006&mnuid=937&tconfig=0#z2').'
<div style="text-align:center;">
  '.$admin[658].'<b> '.count($dbwork).'</b> '.$admin[659].'<br />
  <hr />
</div>
<br />
<div class="table-responsive-md">
<table class="table table-bordered w-98 m-auto">
  <tr class="forum">
    <td><b> '.$admin[253].' </b></td>
    <td><b> '.$admin[665].' </b></td>
    <td><b> '.$admin[144].' </b></td>
    <td><b> '.$admin[663].' </b></td>
  </tr>';
for ($i = 0; $i < count($dbwork); $i++) {
    ReadDoc($dbwork[$i][2]);
    $txt1 = $lng == $lang[0] ? $fieldb1 : $fieldb2;
    $dbcounter = ReadDocCounter($dbwork[$i][2]);
    $txtcount = $dbcounter > 1 ? $admin[662] : $admin[661];
    $class = $i % 2 == 0 ? ' class="quest"' : ' class="rep"';
    echo '
  <tr'.$class.'>
    <td>'.$texte[3].' '.$dbwork[$i][5].'</td>
    <td class="text-center">'.$dbcounter.' '.$txtcount.'</td>
    <td class="text-center">
      <a href="admin.php?lng='.$lng.'&amp;pg=gestcounter&amp;mod=1&amp;id='.$dbwork[$i][2].'&amp;cnum=3" title="">'.$admin[144].'</a>
    </td>
    <td class="text-center">
      <a href="admin.php?lng='.$lng.'&amp;pg=gestcounter&amp;del=1&amp;id='.$dbwork[$i][2].'&amp;cnum=3" title="">'.$admin[663].'</a>
    </td>
  </tr>';
}
echo '
</table>
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
dbbatch.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/dbbatch.php'
View Content
<?php
/*******************************************************************************
 *   BATCH DataBase Integrity Check
 *******************************************************************************
 *   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', '../../');
include_once CHEMIN.'admin/includes.inc';
include_once 'funcdbchk.inc';

$delta      = intval(import('delta'));
$range1     = intval(import('range1'));
$range2     = intval(import('range2'));
$integr     = import('integr');
$checkid    = intval(import('checkid'));
$checkerr   = intval(import('checkerr'));
$checkquiet = intval(import('checkquiet'));
$typ        = import('typ');

if (empty($checkid)) {
    if (empty($range1)) {
        $range1 = 1;
    }
    else {
        $range1 = Min($range1,ReadCounter(NEXTID));
    }
    if (empty($range2)) {
        $range2 = ReadCounter(NEXTID)+10;
    }
    if ($range2 < $range1) {
        $range2 = $range1;
    }
    $checkid = $range1;
    if (empty($delta)) {
        $delta = DBCHK_DEFAULT;
    }
    else {
        $delta = min(DBCHK_MAX, max($delta, 1));
    }
}
echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
<title>'.strip_tags($admin[278]).'</title>
'.JavascriptFile(CHEMIN.'inc/hpage.js');
echo '
</head>
<body style="background-color: #EFEFEF; color: #000; overflow: hidden;">
<fieldset>
<p style="text-align:center;">'.$admin[295].'</p>
<p style="text-align:center;">[ '.$range1.' / <b>'.Min($checkid,$range2).'</b> / '.$range2.' ]</p>';

if ($checkid <= $range2) {
    $checkerr = $checkerr + CheckDBmP($checkid, $checkid + $delta, $checkquiet);
    $checkid += $delta;
    $nextstep = "setTimeout('PopupWindow(\"dbbatch.php?lng=".$lng."&typ=".$typ."&range1=".$range1."&range2=".$range2."&checkquiet=".$checkquiet."&checkid=".$checkid."&checkerr=".$checkerr."&delta=".$delta."\",\"dbbatch\",480,360,\"no\",\"no\")', 1)";
}
else {
    echo '
<hr />
<p style="text-align:center;"><b>'.$admin[298].'</b></p>';
    if ($checkquiet != 1) {
        if ($checkerr == 0) {
            $dbresult = $admin[297];
        }
        else {
            $dbresult = $checkerr." ".$admin[576];
        }
        echo '
<p style="text-align:center;">'.$dbresult.'</p>
<p style="text-align:right;"><a href="#" onclick="window.close();"><b>'.$admin[458].'&nbsp;</b></a></p>';
    }
    $nextstep = "";
	if (TYP_FORUM == $typ) {
        $dbfr = ReadDBFields(DBFORUM);
        foreach ($dbfr as $doc) {
            if (!FileDBExist(DBBASE.TestFileId($doc[2]).INCEXT)) continue;
            ReadDoc(DBBASE.TestFileId($doc[2]).INCEXT);
            $data[0]  = $type;
            $data[1]  = $fileid;
            $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);
            break;
        }
	}
}
echo '
</fieldset>';
if ($nextstep != "") {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
dbbatcharchives.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/dbbatcharchives.php'
View Content
<?php
/*******************************************************************************
 *   BATCH DataBase Integrity Check
 *******************************************************************************
 *   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.19 (August 26, 2024) : Initial release
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../../');
include_once CHEMIN.'admin/includes.inc';
include_once 'funcdbchk.inc';

$delta      = intval(import('delta'));
$range1     = intval(import('range1'));
$range2     = intval(import('range2'));
$integr     = import('integr');
$checkid    = intval(import('checkid'));
$checkerr   = intval(import('checkerr'));
$checkquiet = intval(import('checkquiet'));
$typ        = import('typ');

if (empty($checkid)) {
    if (empty($range1)) {
        $range1 = 1;
    }
    else {
        $range1 = Min($range1,ReadCounter(NEXTID));
    }
    if (empty($range2)) {
        $range2 = ReadCounter(NEXTID)+10;
    }
    if ($range2 < $range1) {
        $range2 = $range1;
    }
    $checkid = $range1;
    if (empty($delta)) {
        $delta = DBCHK_DEFAULT;
    }
    else {
        $delta = min(DBCHK_MAX, max($delta, 1));
    }
}
echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
<title>'.strip_tags($admin[278]).'</title>
'.JavascriptFile(CHEMIN.'inc/hpage.js');
echo '
</head>
<body style="background-color: #EFEFEF; color: #000; overflow: hidden;">
<fieldset>
<p style="text-align:center;">'.$admin[295].'</p>
<p style="text-align:center;">[ '.$range1.' / <b>'.Min($checkid,$range2).'</b> / '.$range2.' ]</p>';

if ($checkid <= $range2) {
    $checkerr = $checkerr + CheckDBmP($checkid, $checkid + $delta, $checkquiet);
    $checkid += $delta;
    $nextstep = "setTimeout('PopupWindow(\"dbbatcharchives.php?lng=".$lng."&typ=".$typ."&range1=".$range1."&range2=".$range2."&checkquiet=".$checkquiet."&checkid=".$checkid."&checkerr=".$checkerr."&delta=".$delta."\",\"dbbatcharchives\",480,360,\"no\",\"no\")', 1)";
}
else {
    echo '
<hr />
<p style="text-align:center;"><b>'.$admin[298].'</b></p>';
    if ($checkquiet != 1) {
        if ($checkerr == 0) {
            $dbresult = $admin[297];
        }
        else {
            $dbresult = $checkerr." ".$admin[576];
        }
        echo '
<p style="text-align:center;">'.$dbresult.'</p>
<p style="text-align:right;"><a href="#" onclick="window.close();"><b>'.$admin[458].'&nbsp;</b></a></p>';
    }
    $nextstep = "";
	if (TYP_FORUM == $typ) {
        $dbfr = ReadDBFields(DBFORUM);
        foreach ($dbfr as $doc) {
            if (!FileDBExist(ARCHDBBASE.TestFileId($doc[2]).INCEXT)) continue;
            ReadDoc(ARCHDBBASE.TestFileId($doc[2]).INCEXT);
            $data[0]  = $type;
            $data[1]  = $fileid;
            $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);
            break;
        }
	}
}
echo '
</fieldset>';
if ($nextstep != "") {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
dbcheck.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/dbcheck.inc'
View Content
<?php
/*******************************************************************************
 *   DataBase Integrity Check
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[8] == '') {
        $nomzone = $admin[278];
        include 'access.inc';
        exit();
    }
}

$delta  = import('delta');
$range1 = import('range1');
$range2 = import('range2');
$integr = import('integr');

include 'inc/funcdbchk.inc';
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[281]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[281], '100%');

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=988&mnuid=937&tconfig=0#z2').$admin[280].$admin[305].'</p>
<hr />';

$max1 = ReadCounter(NEXTID);
$max2 = 10*ceil(($max1+10)/10);
if (empty($delta)) {
    $delta = DBCHK_DEFAULT;
}
else {
    $delta = min(DBCHK_MAX, $delta);
}

switch ($integr) {
case 1 :
    echo '
<br />
<fieldset>
'.$admin[295].$admin[296];
    if (empty($range1)) {
        $range1 = 1;
    }
    else {
        $range1 = Min($range1, $max1);
    }
    if (empty($range2)) {
        $range2 = $max2;
    }
    if ($range2 < $range1) {
        $range2 = $range1;
    }
    majIndexAROM();
    if (CheckDBmP($range1, $range2) == 0) {
        echo '
<div style="text-align:center;padding:10px;"><span class="forum2"><b>'.$admin[297].'</b></span></div>';
    }
    echo $admin[298].'
</fieldset>
<br />';
    break;
case 2 :
    echo '
<br />
<fieldset>'.$admin[685].'</fieldset>
<br />
'.BeginJavascript().'
PopupWindow("inc/dbbatch.php?lng='.$lng.'&range1='.$range1.'&range2='.$range2.'&delta='.$delta.'&checkit='.$range1.'","dbbatch",400,250,"no","no")
'.EndJavascript();
    majIndexAROM();
    break;
}
$docids = array_reverse(ReadDBFields(DOCID));
WriteCounter(NEXTID, $docids[0][1]);
$max1 = ReadCounter(NEXTID);
echo '
<div class="w-100 m-auto" style="max-width:360px;">
  <form name="integrity1" action="admin.php?lng='.$lng.'&amp;pg=dbcheck" method="post">
	<input type="hidden" name="integr" value="1" />
	<fieldset>
      <div class="table-responsive-md">
	  <table class="table">
		<tr>
		  <td style="text-align:right;width:50%;">'.$admin[333].'</td>
		  <td><input name="range1" class="form-control texte" type="text" value="1" size="10" /></td>
		  <td> (1)</td>
		</tr>
		<tr>
		  <td style="text-align:right;">'.$admin[334].'</td>
		  <td><input name="range2" class="form-control texte" type="text" value="'.$max1.'" size="10" /></td>
		  <td> ('.$max1.')</td>
		</tr>
	  </table>
      </div>
	</fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[279], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>
</div>
<br />
<div class="w-100 m-auto" style="max-width:360px;">
  <form name="integrity2" action="admin.php?lng='.$lng.'&amp;pg=dbcheck" method="post">
	<input type="hidden" name="integr" value="2" />
	<fieldset>
      <div class="table-responsive-md">
	  <table class="table">
		<tr>
		  <td style="text-align:right;width:50%;">'.$admin[333].'</td>
		  <td><input name="range1" class="form-control texte" value="1" type="text" size="10" /></td>
		  <td> (1)</td>
		</tr>
		<tr>
		  <td style="text-align:right;">'.$admin[334].'</td>
		  <td><input name="range2" class="form-control texte" value="'.$max2.'" type="text" size="10" /></td>
		  <td> ('.$max2.')</td>
		</tr>
		<tr>
		  <td style="text-align:right;">'.$admin[686].'</td>
		  <td><input name="delta" class="form-control texte" value="'.$delta.'" type="text" size="10" /></td>
		  <td> ('.DBCHK_MAX.')</td>
		</tr>
	  </table>
      </div>
    </fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[575], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>
</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
ddmenu.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/ddmenu.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Articles
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1216];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_DDMENUBOX;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 0;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[1348];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1034&mnuid=937&tconfig=0#z2').'</p>'.$admin[1211].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[1212];
$qwrite    = $admin[1213];
$qcat      = $admin[1221];
$qtitre    = $admin[1214];
$qcontenu  = '';
$qnouveau  = $admin[1230];

function ShowValidMenus($accept = '') {
    global $admin;
    $valid = array(
        BOX_TOP => false, BOX_BOTTOM => false,
        BOX_LEFT => false, BOX_RIGHT => false,
        BOX_ABOVE => false, BOX_UNDER => false,
        BOX_EDITO => false );
    for ($i = 0; $i < strlen($accept); $i++) {
        $letter = substr($accept, $i, 1);
        if (isset($valid[$letter])) $valid[$letter] = true;
    }
    return '
<div class="text-left p-1 m-auto" style="width:420px;">
  <div class="pt-1" style="width:402px;border:1px solid;">
    <label for="valid['.BOX_TOP.']" style="margin-left:152px;">'.$admin[1085].'</label>
    <input type="checkbox" id="valid['.BOX_TOP.']" name="valid['.BOX_TOP.']"'.Checked($valid[BOX_TOP]).' />
  </div>
  <div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_LEFT.']" class="pt-1" style="margin-left:10px;">'.$admin[1086].'</label>
      <input type="checkbox" id="valid['.BOX_LEFT.']" name="valid['.BOX_LEFT.']"'.Checked($valid[BOX_LEFT]).' />
    </div>
    <div class="float-left" style="width:200px;">
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_ABOVE.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1087].'</label>
        <input type="checkbox" id="valid['.BOX_ABOVE.']" name="valid['.BOX_ABOVE.']"'.Checked($valid[BOX_ABOVE]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_EDITO.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1088].'</label>
        <input type="checkbox" id="valid['.BOX_EDITO.']" name="valid['.BOX_EDITO.']"'.Checked($valid[BOX_EDITO]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_UNDER.']" class="pt-1" style="margin-left:50px;">'.$admin[1089].'</label>
        <input type="checkbox" id="valid['.BOX_UNDER.']" name="valid['.BOX_UNDER.']"'.Checked($valid[BOX_UNDER]).' />
      </div>
    </div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_RIGHT.']" class="pt-1" style="margin-left:10px;">'.$admin[1090].'</label>
      <input type="checkbox" id="valid['.BOX_RIGHT.']" name="valid['.BOX_RIGHT.']"'.Checked($valid[BOX_RIGHT]).' />
    </div>
  </div>
  <div style="width:402px;border:1px solid;">
    <label for="valid['.BOX_BOTTOM.']" class="pt-1" style="margin-left:152px;">'.$admin[1091].'</label>
    <input type="checkbox" id="valid['.BOX_BOTTOM.']" name="valid['.BOX_BOTTOM.']"'.Checked($valid[BOX_BOTTOM]).' />
  </div>
</div><div class="clearfix"></div>
';
}

include 'inc/admin.inc';
?>
ddmtomnu.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/ddmtomnu.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Menu to DDM
 *******************************************************************************
 *   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.19 (August 26, 2024) : Correct TOhelp
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1216];
        include 'access.inc';
        exit();
    }
}

$act     = import('act');
$id      = import('id');
$titre1  = import('titre1');
$titre2  = import('titre2');
$typmenu = import('typmenu');
$posimg  = import('posimg');

$erreur     = '';
$err_titre1 = false;
$err_titre2 = false;
$err_titre1 = empty($titre1) && ($act == 1) ? true : false;
$erreur    .= $err_titre1 ? '<li>'.$admin[1585].$qtitre.$admin[1586].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
if ($lang[1] != '') {
    $err_titre2 = empty($titre2) && ($act == 1) ? true : false;
    $erreur    .= $err_titre2 ? '<li>'.$admin[1585].$qtitre.$admin[1586].$admin[1178].'</li>': '';
}
$act = empty($erreur) ? $act : 0;

function ShowValidMenus($accept = '') {
    global $admin;
    $valid = array(
        BOX_TOP => false, BOX_BOTTOM => false,
        BOX_LEFT => false, BOX_RIGHT => false,
        BOX_ABOVE => false, BOX_UNDER => false,
        BOX_EDITO => false);
    for ($i = 0; $i < strlen($accept); $i++) {
        $letter = substr($accept, $i, 1);
        if (isset($valid[$letter])) $valid[$letter] = true;
    }
    return '
<div class="text-left p-1 mx-auto mb-2" style="width:420px;">
  <div class="pt-1" style="width:402px;border:1px solid;">
    <label for="valid['.BOX_TOP.']" style="margin-left:152px;">'.$admin[1085].'</label>
    <input type="checkbox" id="valid['.BOX_TOP.']" name="valid['.BOX_TOP.']"'.Checked($valid[BOX_TOP]).' />
  </div>
  <div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_LEFT.']" class="pt-1" style="margin-left:10px;">'.$admin[1086].'</label>
      <input type="checkbox" id="valid['.BOX_LEFT.']" name="valid['.BOX_LEFT.']"'.Checked($valid[BOX_LEFT]).' />
    </div>
    <div class="float-left" style="width:200px;">
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_ABOVE.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1087].'</label>
        <input type="checkbox" id="valid['.BOX_ABOVE.']" name="valid['.BOX_ABOVE.']"'.Checked($valid[BOX_ABOVE]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_EDITO.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1088].'</label>
        <input type="checkbox" id="valid['.BOX_EDITO.']" name="valid['.BOX_EDITO.']"'.Checked($valid[BOX_EDITO]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_UNDER.']" class="pt-1" style="margin-left:50px;">'.$admin[1089].'</label>
        <input type="checkbox" id="valid['.BOX_UNDER.']" name="valid['.BOX_UNDER.']"'.Checked($valid[BOX_UNDER]).' />
      </div>
    </div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_RIGHT.']" class="pt-1" style="margin-left:10px;">'.$admin[1090].'</label>
      <input type="checkbox" id="valid['.BOX_RIGHT.']" name="valid['.BOX_RIGHT.']"'.Checked($valid[BOX_RIGHT]).' />
    </div>
  </div>
  <div style="width:402px;border:1px solid;">
    <label for="valid['.BOX_BOTTOM.']" class="pt-1" style="margin-left:152px;">'.$admin[1091].'</label>
    <input type="checkbox" id="valid['.BOX_BOTTOM.']" name="valid['.BOX_BOTTOM.']"'.Checked($valid[BOX_BOTTOM]).' />
  </div>
</div>
<div class="clearfix"></div>';
}

$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
    var lng2   = "'.$lang[1].'";
    var tit1 = document.inputmenu.titre1.value;
    if (tit1.length < 1) {
        sto += "  - '.addslashes($admin[1585].$admin[1214].$admin[1586].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.inputmenu.titre1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var tit2 = document.inputmenu.titre2.value;
        if (tit2.length < 3) {
            sto += "  - '.addslashes($admin[1585].$admin[1214].$admin[1586].$admin[1178]).'\n";
			document.inputmenu.titre2.className = "errorInputText";
            erreur = true;
        }
    }
    if (erreur == true) {
        sto = "'.addslashes($admin[1589]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

ReadDoc($id);
$mnu = $lng == $lang[0] ? $fieldb1 : $fieldb2;
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.sprintf($admin[1542], $mnu);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable(sprintf($admin[1542], $mnu), '100%');
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1036&mnuid=937&tconfig=0#z2').'</p>';

if (empty($act)) {
    $types_menu = array($admin[397], $admin[398], $admin[504], $admin[621], $admin[1354]);
    echo '
<div class="text-center mt-2">'.$admin[1213].'</div>';
    if (!empty($erreur))
        echo displayErrorMsg($admin[1589], $erreur);
    echo '
<form name="inputmenu" id="inputmenu" action="admin.php?lng='.$lng.'&amp;pg=ddmtomnu" method="post" onsubmit="return VerifyForm(); return false;">
  <input type="hidden" name="act" value="1" />
  <input type="hidden" name="id" value="'.$id.'" />
  <fieldset class="w-100 mx-auto mt-3" style="max-width:560px;">
    <div class="table-responsive-md">
    <table class="w-100 m-auto">
      <tr><td class="text-center pt-2">'.$admin[1214].'</td></tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_titre1 ? 'errorInputText' : 'texte').'" type="text" name="titre1" size="45" value="'.$fieldb1.'" />
          </div>
        </td>
      </tr>';
    if ($lang[1] != '') {
        echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_titre2 ? 'errorInputText' : 'texte').'" type="text" name="titre2" size="45" value="'.$fieldb2.'" />
          </div>
        </td>
      </tr>';
    } else {
        echo '
  <input type="hidden" name="titre2" value="" />';
    }
    echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$admin[1221].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="typmenu">';
			for ($jj = 0; $jj < count($types_menu); $jj++) {
				echo '
              <option value="'.$jj.'"'.Selected($typmenu == $jj).'>'.$types_menu[$jj].'</option>';
			}
				echo '
            </select>
          </div>
        </td>
      </tr>
      <tr>
        <td style="text-align:center">
          <div class="d-inline-block">'.$admin[1475].'&nbsp;:&nbsp;</div>
          <div class="d-inline-block">
            <select class="form-control" name="posimg">
              <option value="L"'.Selected($fieldd1 == 'L').'>'.$admin[494].'</option>
              <option value="R"'.Selected($fieldd1 == 'R').'>'.$admin[495].'</option>
            </select>
          </div>
        </td>
      </tr>
      <tr><td class="text-center pt-2">'.$admin[1230].'</td></tr>
      <tr><td class="text-center">'.ShowValidMenus().'</td></tr>
    </table>
    </div>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[1349], 'self.location.href=\'admin.php?lng='.$lng.'&pg=ddmenu&tri=ch\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </fieldset>
</form>';
}

if ($act == 1 && empty($erreur)) {
    ReadDoc($id);
    $data     = array_fill(0, 17, '');
    $data[0]  = TYP_MENUBOX;
    $data[2]  = 'a';
    $data[5]  = empty($userprefs[1]) ? $author : $userprefs[1];
    $data[6]  = empty($userprefs[2]) ? $email : $userprefs[2];
    $data[7]  = isset($_POST['valid']) ? implode('', array_keys($_POST['valid'])) : 'TLAEURB';
    $data[8]  = 'off|off';
    $data[9]  = $titre1;
    $data[10] = $titre2;
    $data[13] = $posimg;
    $data[15] = $typmenu;
    $data[17] = $fieldmod;
    $idmnu    = ActionOnFields('add', $data);
    
    $dbw      = SelectDbFieldsByField(ReadDBFields(DBOPTDDMENU), 5, $id);
    $optmenu  = array();
    $curr_cat = '';
    foreach ($dbw as $item) {
        ReadDoc($item[4]);
        if ($status != 'a') continue;
        $optmenu[] = array(trim($item[0]), $item[4]);
    }
    unset($dbw);
    sort($optmenu);
    if (!empty($optmenu)) {
        $i = $cnivs = $cpnivs = 0;
        $cat1 = $cat2 = $pniv = '';
        foreach ($optmenu as $item) {
            ReadDoc($item[1]);
            $nivs  = explode('-', $item[0]);
            $cnivs = count($nivs);
            $niv   = '';
            for ($i = 0; $i < count($nivs) - 1; $i++) $niv .= $nivs[$i].'-';
            if ($fieldd1 != '?' && count($nivs) == 1) {
                $cat1 = '';
                $cat2 = '';
            }
            if ($fieldd1 == '?') {
                if (count($nivs) == 1) {
                    $cat1 = '';
                    $cat2 = '';
                }
                $acats = explode('|', $cat1);
                // $cat1  = $acats[0];
                if ($niv != $pniv && $cpnivs > $cnivs) array_splice($acats, $cnivs-1, $cpnivs-$cnivs);
                $cat1 = '';
                for ($i = 0; $i < $cnivs-2; $i++) $cat1 .= (empty($acats[$i]) ? '' : '|').$acats[$i];
                for ($i = $cnivs-2; $i < $cnivs; $i++) $cat1 .= (empty($acats[$i]) ? '' : '|').$acats[$i];
                $cat1 .= '|'.$fieldb1;
                $cat1  = substr($cat1, 0, 1) == '|' ? substr($cat1, 1) : $cat1;
                $acats = explode('|', $cat2);
                // $cat2  = $acats[0];
                if ($niv != $pniv && $cpnivs > $cnivs) array_splice($acats, $cnivs-1, $cpnivs-$cnivs);
                $cat2 = '';
                for ($i = 0; $i < $cnivs-2; $i++) $cat2 .= (empty($acats[$i]) ? '' : '|').$acats[$i];
                for ($i = $cnivs-2; $i < $cnivs; $i++) $cat2 .= (empty($acats[$i]) ? '' : '|').$acats[$i];
                $cat2 .= '|'.$fieldb2;
                $cat2  = substr($cat2, 0, 1) == '|' ? substr($cat2, 1) : $cat2;
            }
            if ($fieldd1 != '?') {
                $data     = array_fill(0, 17, '');
                $data[0]  = TYP_OPTMENU;
                $data[2]  = 'a';
                $data[5]  = empty($userprefs[1]) ? $author : $userprefs[1];
                $data[6]  = empty($userprefs[2]) ? $email : $userprefs[2];
                $data[7]  = $cat1;
                $data[8]  = $cat2;
                $data[9]  = $fieldb1;
                $data[10] = $fieldb2;
                $data[11] = $fieldc1;
                $data[12] = 'S';
                $data[13] = $fieldd1;
                $data[14] = $fieldd2;                
                $data[15] = $idmnu;
                $data[16] = $fieldmail;
                $data[17] = $fieldmod;
                $idopt    = ActionOnFields('add', $data);
            }
            $pniv   = $niv;
            $cpnivs = count($nivs);
        }
        $titre = $lng == $lng[0] ? $titre1 : $titre2;
        echo '
<p class="text-center">'.sprintf($admin[1546], $titre).'</p>';
    }
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
dnload.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/dnload.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Downloads
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[19] == '') {
        $nomzone = $admin[18];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_DNLOAD;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[135];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1056&mnuid=937&tconfig=0#z2').'</p>'.$admin[228].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[136];
$qwrite    = $admin[137];
$qcat      = $admin[251];
$qtitre    = $admin[138];
$qcontenu  = $admin[140];
$qnouveau  = $admin[139];

include 'inc/admin.inc';
?>
faq.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/faq.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Links
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[21] == '') {
        $nomzone = $admin[206];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_FAQ;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 2;
$bcontenu  = 1;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[200];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1060&mnuid=937&tconfig=0#z2').'</p>'.$admin[201].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[202];
$qwrite    = $admin[203];
$qcat      = $admin[233];
$qtitre    = $admin[204];
$qcontenu  = $admin[205];
$qnouveau  = '';

include 'inc/admin.inc';
?>
forum.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/forum.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Forum
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[23] == '') {
        $nomzone = $admin[9];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_FORUM;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 2;
$qformonly = 0;
$qtitle    = $admin[210];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1072&mnuid=937&tconfig=0#z2').'</p>'.$admin[225].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[172];
$qwrite    = '';
$qcat      = '';
$qtitre    = $admin[258];
$qcontenu  = $admin[174];
$qnouveau  = $admin[261];

include 'inc/admin.inc';
?>
frcateg.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/frcateg.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Categories of forum
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[24] == '') {
    $nomzone = $admin[253];
    include 'access.inc';
    exit();
    }
}

$upd    = import('upd');
$xfrcat = import('xfrcat', 'POST');
$xfrgrp = import('xfrgrp', 'POST');

function Deplacer($i) {
    global $lng, $forum4, $page, $frcat, $admin, $sid;
	$ispred = $i == 0 || ($i > 0 && empty($frcat[$i][0])) ? false : true;
	$issucc = $i == $forum4 - 1 || ($i < $forum4 - 1 && empty($frcat[$i + 1][0])) ? false : true;
    $i++;
    $img1  = '<i class="fas fa-caret-up text-primary" style="font-size: 1.8rem;" title="'.$admin[1686].'"></i>';
    $img2  = '<i class="fas fa-caret-down text-danger" style="font-size: 1.8rem;" title="'.$admin[1687].'"></i>';
    $img1g = '<i class="fas fa-caret-up text-secondary" style="font-size: 1.8rem;" title=""></i>';
    $img2g = '<i class="fas fa-caret-down text-secondary" style="font-size: 1.8rem;" title=""></i>';
	$apred = $ispred ? '<a href="admin.php?lng='.$lng.'&amp;pg=frcateg&amp;upd=-'.$i.'">'.$img1.'</a>' : $img1g;
	$asucc = $issucc ? '<a href="admin.php?lng='.$lng.'&amp;pg=frcateg&amp;upd='.$i.'">'.$img2.'</a>' : $img2g;
	return $apred.'<br />'.$asucc;
}

function ReadForumCat() {
    global $frcat, $frgrp, $forum4;
    $frcat = ReadDbFields(DBFORUMCAT);
    $frgrp = array();
    for ($i = 0; $i < $forum4; $i++) {
        if (isset($frcat[$i][0])) {
            $tmp = explode(',', $frcat[$i][0]);
            $frcat[$i][0] = $tmp[0];
            $frgrp[$i]    = isset($tmp[1]) ? trim($tmp[1]) : '';
        } else {
            $frcat[$i] = array_pad(array(), 7, '');
            $frgrp[$i] = '';
        }
    }
}

function WriteForumCat($dbcat, $dbgrp) {
    global $frcat, $frgrp, $site, $lng;
    global $type,$fileid,$status,$creadate,$moddate,$author,$email,
         $fielda1,$fielda2,$fieldb1,$fieldb2,$fieldc1,$fieldc2,$fieldd1,$fieldd2,
         $fieldweb,$fieldmail,$fieldmod;
    $frcat2 = array();
    $update = FALSE;
    for ($i = 0; $i < count($dbcat); $i++) {
        if ($dbcat[$i][0] != '') {
            if ($frcat[$i][0] != $dbcat[$i][0] || $frgrp[$i] != $dbgrp[$i]) {
                UpdateDBForumCat($frcat[$i][0], $dbcat[$i][0], $frgrp[$i], $dbgrp[$i]);
                $update = TRUE;
            }
            if ($dbgrp[$i] != '') {
                $dbcat[$i][0] = str_replace(',', '', $dbcat[$i][0]).','.$dbgrp[$i];
            }
			$dbcat[$i][1] = stripslashes($dbcat[$i][1]);
			if (isset($dbcat[$i][2]))  $dbcat[$i][2] = stripslashes($dbcat[$i][2]); //langue 1
			else
				$dbcat[$i][2] = '';
			if (isset($dbcat[$i][3])) $dbcat[$i][3] = stripslashes($dbcat[$i][3]);
			else
			    $dbcat[$i][3] = '';
			if (isset($dbcat[$i][4])) $dbcat[$i][4] = stripslashes($dbcat[$i][4]); // Langue 1
			else
				$dbcat[$i][4] = '';
            if (isset($dbcat[$i][5])) $dbcat[$i][5] = $dbcat[$i][1] == '' ? '' : $dbcat[$i][5];
			else
				$dbcat[$i][5] = '';
            if (isset($dbcat[$i][6])) $dbcat[$i][6] = $dbcat[$i][1] == '' ? '' : $dbcat[$i][6];
			else
				$dbcat[$i][6] = '';
            if (!empty($dbcat[$i][1]))
                $frcat2[] = array($dbcat[$i][0].CONNECTOR.$dbcat[$i][1].CONNECTOR.$dbcat[$i][2].CONNECTOR.$dbcat[$i][3].CONNECTOR.$dbcat[$i][4].CONNECTOR.$dbcat[$i][5].CONNECTOR.$dbcat[$i][6]);
        }
    }
    if (!empty($frcat2)) WriteDBFields(DBFORUMCAT, $frcat2);
    if ($update) UpdateDBForum('', 0);
    if (($site[7] == 'on' || PHP700) && !empty($frcat2)) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo '<script>window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=frcateg&upd=yes";</script>';
    }
}

function UpdateDBForumCat($icat1, $icat2, $grp1, $grp2) {
    global $type,$fileid,$status,$creadate,$moddate,$author,$email,
         $fielda1,$fielda2,$fieldb1,$fieldb2,$fieldc1,$fieldc2,$fieldd1,$fieldd2,
         $fieldweb,$fieldmail,$fieldmod;
    $cat1 = $icat1.(empty($grp1) ? '' : ','.$grp1);
    $cat2 = $icat2.(empty($grp2) ? '' : ','.$grp2);
    $dbforum = SelectDbFields(TYP_FORUM, "", "");
    foreach ($dbforum as $doc) {
        ReadDoc($doc[1]);
        if ($fieldb2 == $cat1) {
            $fieldb1 = addslashes($fieldb1);
            $fieldb2 = $cat2;
            $fieldc1 = addslashes($fieldc1);
            $fieldc2 = addslashes($fieldc2);
            WriteDoc();
        }
    }
}

$frcat  = ReadDbFields(DBFORUMCAT);
$forum4 = count($frcat) + 4;
if (is_numeric($upd)) {
    ReadForumCat();
    if (0 == $upd) {
        $xfrcat = $_POST['xfrcat'];
        foreach($xfrcat as &$db) {
            ksort($db);
        }
        $xfrgrp = $_POST['xfrgrp'];
        WriteForumCat($xfrcat, $xfrgrp);
    } else {
        $i = abs($upd) -1;          // rang de la ligne à déplacer
        $ud = $upd > 0 ? 1 : -1;    // sens +1 ou -1 du déplacement
        $temp = isset($frcat[$i]) ? $frcat[$i] : array_pad(array(), 7, '');
        $frcat[$i] = isset($frcat[$i+$ud]) ? $frcat[$i+$ud] : array_pad(array(), 7, '');
        $frcat[$i+$ud] = $temp;
        $temp = isset($frgrp[$i]) ? $frgrp[$i] : '';
        $frgrp[$i] = isset($frgrp[$i+$ud]) ? $frgrp[$i+$ud] : '';
        $frgrp[$i+$ud] = $temp;
        WriteForumCat($frcat, $frgrp);
        unset($temp);
    }
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=frcateg";'.EndJavascript();
    }
}
elseif ($upd == 'yes') UpdateDBForum('', 0);

ReadForumCat();
$widepage = 'on';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[953]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[953], "100%");
$bilingue = !empty($lang[1]);
$rowspan  = $bilingue ? ' rowspan="2"' : '';

echo '
<div style="width:100%; margin:auto;">
<p style="text-align:center;">'.ToHelp($lng, '&pg=1068&mnuid=937&tconfig=0#z2').$admin[948].'<br /><br />'.$admin[933].'</p>
<hr />
<form action="admin.php?lng='.$lng.'&amp;pg=frcateg" method="post">
  <div class="quest" style="padding:2px 20px;">
    <div style="float:right;">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
    <div style="clear:both;"></div>
  </div>
  <fieldset>'.legend($admin[864]).'
    <input type="hidden" name="upd" value="0" />
    <div class="table-responsive-md">
    <table class="table bord m-auto table-bordered w-100">
      <tr class="forum2">
        <td class="text-center p-3" style="max-width:30px;">&nbsp;</td>
        <td class="text-center p-3" style="max-width:30px;"><b>'.$admin[256].'</b></td>
        <td class="text-center p-3" style="max-width:180px;"><b>'.$admin[1059].'</b></td>
        <td class="text-center p-3" style="max-width:40px;"><b>'.$admin[765].'</b></td>
		<td class="text-center p-3" style="max-width:50px;"><b>'.$admin[1821].'</b></td>';
if ($bilingue) {
    echo '
        <td class="text-center p-3" style="max-width:40px;"><b>'.$admin[947].'</b></td>';
}
echo '
        <td class="text-center p-3" style="max-width:260px;"><b>'.$admin[255].'</b></td>
        <td class="text-center p-3" style="max-width:520px;"><b>'.$admin[949].'</b></td>
      </tr>';

$dbgroups = ReadDBFields(GROUPS);
$dbfr     = ReadDBFields(DBFORUM);
$maxnocat = 0;
for ($i = 0; $i < $forum4; $i++) {
    $acat     = explode(',', $frcat[$i][0]);
    $maxnocat = max($acat[0], $maxnocat);
}
foreach ($dbfr as $fr) {
    $acat     = explode(',', $fr[12]);
    $maxnocat = max($acat[0], $maxnocat);
}
for ($i = 0; $i < $forum4; $i++) {
    $color = $i %2 == 0 ? "rep" : "quest";
    $acat  = explode(',', $frcat[$i][0]);
    echo '
      <tr class="'.$color.' text-center">
        <td'.$rowspan.' class="align-middle">'.Deplacer($i).'</td>
        <td'.$rowspan.' class="align-middle text-center">
          <input type="text" name="xfrcat['.$i.'][0]" value="'.(empty($frcat[$i][0]) ? ++$maxnocat : $acat[0]).'" />
		  <div class="forum mx-auto text-center" style="width:40px;border:1px solid #000;border-radius:4px;">
            '.(empty($frcat[$i][0]) ? $i + 1 : $acat[0]).'
          </div>
        </td>';
    echo '
        <td'.$rowspan.' class="align-middle text-center">
          <select class="form-control mx-auto" style="max-width:160px;" name="xfrgrp['.$i.']">
            <option value=""> -- '.$admin[1604].' -- </option>
			<option value="all_members"'.Selected('all_members' == $frgrp[$i]).'>'.$admin[690].'</option>';
    foreach ($dbgroups as $dbgroup) {
        echo '
            <option value="'.$dbgroup[0].'"'.Selected($dbgroup[0] == $frgrp[$i]).'>'.$dbgroup[0].'</option>';
    }
    echo '
          </select>
        </td>
        <td'.$rowspan.' class="align-middle text-center">
          <input type="checkbox" name="xfrcat['.$i.'][5]"'.Checked($frcat[$i][5] == 'on').' />
        </td>';
	if (!isset($frcat[$i][6])) $frcat[$i][6] = '';
	echo '
        <td'.$rowspan.' class="align-middle text-center">
          <input type="checkbox" name="xfrcat['.$i.'][6]"'.Checked($frcat[$i][6] == 'on').' />
        </td>';
    if ($bilingue) {
        echo '
        <td class="align-middle text-center">'.$flag1.'</td>
        <td class="align-middle text-center">
          <input class="form-control texte align-middle" style="max-width:260px;" type="text" name="xfrcat['.$i.'][1]" value="'.$frcat[$i][1].'" />
        </td>
        <td class="align-middle text-center">
          <input class="form-control texte align-middle" style="max-width:520px;" type="text" name="xfrcat['.$i.'][3]" value="'.$frcat[$i][3].'" />
        </td>
      </tr>
      <tr class="'.$color.'" class="align-middle text-center">
        <td class="align-middle text-center">'.$flag2.'</td>
        <td class="align-middle text-center">
          <input class="form-control texte align-middle" style="max-width:260px;" type="text" name="xfrcat['.$i.'][2]" value="'.$frcat[$i][2].'" />
        </td>
        <td class="align-middle text-center">
          <input class="form-control texte align-middle" style="max-width:520px;" type="text" name="xfrcat['.$i.'][4]" value="'.$frcat[$i][4].'" />
        </td>';
    } else {
        echo '
        <td class="align-middle text-center">
          <input class="form-control texte align-middle" style="max-width:260px;" type="text" name="xfrcat['.$i.'][1]" value="'.$frcat[$i][1].'" />
        </td>
        <td class="align-middle text-center">
          <input class="form-control texte align-middle" style="max-width:520px;" type="text" name="xfrcat['.$i.'][3]" value="'.$frcat[$i][3].'" />
        </td>';
    }
    echo '
      </tr>';
}
echo '
  </table>
  </div>
  </fieldset>
  <div class="quest" style="padding:2px 20px;">
    <div style="float:right;">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
    <div style="clear:both;"></div>
  </div>
</form>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
frconfig.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/frconfig.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Forum
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[24] == '') {
        $nomzone = $admin[253];
        include 'access.inc';
        exit();
    }
}

$regit = import('regit');

if ($regit == 1) {
    if (is_file ($meskin.'confskin.inc')) {
        include $meskin.'confskin.inc';
    } else {
        die(sprintf('DEBUG : $meskin incorrect "%s" : STOP !', $meskin));
        include CHEMIN.'confskin.inc';
    }

    $serviz[34] = import('serviz34'); // Compteur de lecture Threads Forum
    $forum[3]   = import('forum3'); // Forum pleine page
    $forum[4]   = import('forum4'); // Position des boîtes
    $forum[5]   = import('forum5', 'POST', true, ''); // Durée up en heures
    $forum[6]   = import('forum6'); // Durée au top en jours
    $forum[7]   = import('forum7'); // Echelle
    $forum[8]   = import('forum8', 'POST', true, ''); // Durée nouveau en jours
    $forum[9]   = import('forum9'); // Affichage charte du forum ON / OFF
    $forum[10]  = import('forum10'); // Affichage du lien uniquement ON / OFF
    $forum[15]  = import('forum15'); // Affichage topforum ON / OFF

    include 'inc/confupdt.inc';
    include 'inc/confskin.inc';
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=frconfig";'.EndJavascript();
    }
}

include $meskin.'confskin.inc';

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[952]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[952], '100%');
$serviz34 = 'on';
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1066&mnuid=937&tconfig=0#z2').$admin[948].'</p>
<hr />
<div class="w-100 m-auto text-center" style="max-width:580px;">
  <br />
  <div style="text-align:left;">
    <form action="admin.php?lng='.$lng.'&amp;pg=frconfig" method="post">
    <input type="hidden" name="regit" value="1" />
	<div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
      <div class="clearfix"></div>
    </div>
    <fieldset>
      <fieldset>'.legend($admin[863]).'
        <div class="table-responsive-md">
        <table class="table w-100 m-auto">
          <tr>
            <td class="py-1 align-middle">&bull; <label for="forum9">'.$admin[869].'</label></td>
            <td class="py-1 form-check">
              <input class="form-check-input" type="checkbox" id="forum9" name="forum9"'.Checked($forum[9]).' />
            </td>
          </tr>
          <tr>
            <td class="py-1 align-middle"><span style="padding-left:16px;">&bull; <label for="forum10">'.$admin[500].'</label></span></td>
            <td class="py-1 form-check">
              <input class="form-check-input" type="checkbox" id="forum10" name="forum10"'.Checked($forum[10]).' />
            </td>
          </tr>
          <tr>
            <td class="py-1 align-middle">&bull; <label for="forum3">'.$admin[768].'</label></td>
            <td class="py-1 form-check">
              <input class="form-check-input" type="checkbox" id="forum3" name="forum3"'.Checked($forum[3]).' />
            </td>
          </tr>
          <tr>
            <td class="align-middle" style="padding-left:16px;">&bull; '.$admin[1656].'</td>
            <td>
              <select class="form-control" name="forum4">
                <option value="'.BOX_LEFT.'"'.Selected($forum[4] == BOX_LEFT).'>'.$admin[1658].'</option>
                <option value="'.BOX_RIGHT.'"'.Selected($forum[4] == BOX_RIGHT).'>'.$admin[1659].'</option>
              </select>
            </td>
          </tr>
          <tr>
            <td class="py-1 align-middle">&bull; <label for="forum15">'.$admin[1774].'</label></td>
            <td class="py-1 form-check">
              <input class="form-check-input" type="checkbox" id="forum15" name="forum15"'.Checked($forum[15]).' />
            </td>
          </tr>
          <tr>
            <td class="py-1 align-middle">&bull; <label for="serviz34">'.$admin[483].'</label></td>
            <td class="py-1 form-check">
              <input class="form-check-input" type="checkbox" id="serviz34" name="serviz34"'.Checked($serviz[34]).' disabled />
            </td>
          </tr>
          <tr>
            <td class="align-middle">&bull; '.$admin[855].'</td>
            <td>
              <select class="form-control w-50" name="forum8">
                <option value=""'. Selected($forum[8] == '' ).'>&nbsp;</option>
                <option value="1"'.Selected($forum[8] == '1').'>1</option>
                <option value="2"'.Selected($forum[8] == '2').'>2</option>
                <option value="3"'.Selected($forum[8] == '3').'>3</option>
                <option value="4"'.Selected($forum[8] == '4').'>4</option>
                <option value="5"'.Selected($forum[8] == '5').'>5</option>
              </select>
            </td>
          </tr>
          <tr>
            <td class="align-middle">&bull; '.$admin[856].'</td>
            <td>
              <select class="form-control w-50" name="forum5">
                <option value=""'. Selected($forum[5] == '' ).'>&nbsp;</option>
                <option value="1"'.Selected($forum[5] == '1').'>1</option>
                <option value="2"'.Selected($forum[5] == '2').'>2</option>
                <option value="3"'.Selected($forum[5] == '3').'>3</option>
                <option value="4"'.Selected($forum[8] == '4').'>4</option>
                <option value="5"'.Selected($forum[8] == '5').'>5</option>
              </select>
            </td>
          </tr>
          <tr>
            <td class="align-middle">&bull; '.$admin[1688].'</td>
            <td>
              <div class="d-inline-block">
                <input class="form-control" type="text" name="forum6"  size="2" value="'.$forum[6].'" />
              </div>
              <div class="d-inline-block">
                <script>
                  $(document).ready(function(){
                    $(\'.hforum6\').popover({
                      title:"'.$admin[1688].'",
                      content:"'.$help[5].'",
                      trigger:"hover",
                      placement:"auto",
                      html:true
                    });
                  });
                </script>
                <span class="overpop float-left">&nbsp;
                  <a class="hforum6" title="">
                    <i class="far fa-comment-dots"></i>
                  </a>
                </span>
              </div>
		    </td>
          </tr>
        </table>
        </div>
      </fieldset>
  
      <fieldset>'.legend($admin[862]).'
        <div class="table-responsive-md">
        <table class="table m-auto" style="max-width:483px;">
          <tr style="text-align:center">
            <td class="py-1">'.$admin[858].'</td>
            <td class="py-1"><i class="frm-rank1"></i></td>
            <td class="py-1"><i class="frm-rank2"></i></td>
            <td class="py-1"><i class="frm-rank2"></i></td>
            <td class="py-1"><i class="frm-rank4"></i></td>
            <td class="py-1"><i class="frm-rank5"></i></td>
            <td class="py-1">&nbsp;</td>
          </tr>
          <tr class="quest" style="text-align:center">
            <td class="py-1">'.$admin[766].'</td>
            <td class="py-1">&nbsp;</td>
            <td class="py-1">&nbsp;</td>
            <td class="py-1">&nbsp;</td>
            <td class="py-1">&nbsp;</td>
            <td class="py-1">&nbsp;</td>
            <td class="py-1">
              <input type="radio" name="forum7" value=""'.Checked($forum[7] == '').' />
            </td>
          </tr>
          <tr class="rep" style="text-align:center">
            <td class="py-1">'.$admin[859].'</td>
            <td class="py-1">10</td>
            <td class="py-1">30</td>
            <td class="py-1">60</td>
            <td class="py-1">100</td>
            <td class="py-1">+ 100</td>
            <td class="py-1">
              <input type="radio" name="forum7" value="10-30-60-100"'.Checked($forum[7] == '10-30-60-100').' />
            </td>
          </tr>
          <tr class="quest" style="text-align:center">
            <td class="py-1">'.$admin[860].'</td>
            <td class="py-1">10</td>
            <td class="py-1">50</td>
            <td class="py-1">100</td>
            <td class="py-1">200</td>
            <td class="py-1">+ 200</td>
            <td class="py-1">
              <input type="radio" name="forum7" value="10-50-100-200"'.Checked($forum[7] == '10-50-100-200').' />
            </td>
          </tr>
          <tr class="rep" style="text-align:center">
            <td>'.$admin[861].'</td>
            <td class="py-1">20</td>
            <td class="py-1">100</td>
            <td class="py-1">200</td>
            <td class="py-1">300</td>
            <td class="py-1">+ 300</td>
            <td class="py-1">
              <input type="radio" name="forum7" value="20-100-200-300"'.Checked($forum[7] == '20-100-200-300').' />
            </td>
          </tr>
        </table>
        </div>
        <br />
      </fieldset>
    </fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>
</div>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
freebox.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/freebox.inc'
View Content
<?php
/*******************************************************************************
 *   Admin extra Free Boxes
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[26] == '') {
        $nomzone = $admin[270].'1';
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_FREEBOX;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[989];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1020&mnuid=937&tconfig=0#z2').'</p>'.$admin[272].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[503];
$qwrite    = $admin[988];
$qcat      = '';
$qtitre    = $admin[274];
$qcontenu  = $admin[273];
$qnouveau  = $admin[1092];

function ShowValidBoxes($accept = '') {
    global $admin;
    $valid = array(
        BOX_TOP => false, BOX_BOTTOM => false,
        BOX_LEFT => false, BOX_RIGHT => false,
        BOX_ABOVE => false, BOX_UNDER => false,
        BOX_EDITO => false );
    for ($i = 0; $i < strlen($accept); $i++) {
        $letter = substr($accept, $i, 1);
        if (isset($valid[$letter])) $valid[$letter] = true;
    }
    return '
<div class="text-left p-1 m-auto" style="width:420px;">
  <div class="pt-1" style="width:402px;border:1px solid;">
    <label for="valid['.BOX_TOP.']" style="margin-left:152px;">'.$admin[1085].'</label>
    <input type="checkbox" id="valid['.BOX_TOP.']" name="valid['.BOX_TOP.']"'.Checked($valid[BOX_TOP]).' />
  </div>
  <div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_LEFT.']" class="pt-1" style="margin-left:10px;">'.$admin[1086].'</label>
      <input type="checkbox" id="valid['.BOX_LEFT.']" name="valid['.BOX_LEFT.']"'.Checked($valid[BOX_LEFT]).' />
    </div>
    <div class="float-left" style="width:200px;">
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_ABOVE.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1087].'</label>
        <input type="checkbox" id="valid['.BOX_ABOVE.']" name="valid['.BOX_ABOVE.']"'.Checked($valid[BOX_ABOVE]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_EDITO.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1088].'</label>
        <input type="checkbox" id="valid['.BOX_EDITO.']" name="valid['.BOX_EDITO.']"'.Checked($valid[BOX_EDITO]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_UNDER.']" class="pt-1" style="margin-left:50px;">'.$admin[1089].'</label>
        <input type="checkbox" id="valid['.BOX_UNDER.']" name="valid['.BOX_UNDER.']"'.Checked($valid[BOX_UNDER]).' />
      </div>
    </div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_RIGHT.']" class="pt-1" style="margin-left:10px;">'.$admin[1090].'</label>
      <input type="checkbox" id="valid['.BOX_RIGHT.']" name="valid['.BOX_RIGHT.']"'.Checked($valid[BOX_RIGHT]).' />
    </div>
  </div>
  <div style="width:402px;border:1px solid;">
    <label for="valid['.BOX_BOTTOM.']" class="pt-1" style="margin-left:152px;">'.$admin[1091].'</label>
    <input type="checkbox" id="valid['.BOX_BOTTOM.']" name="valid['.BOX_BOTTOM.']"'.Checked($valid[BOX_BOTTOM]).' />
  </div>
</div><div class="clearfix"></div>
';
}

include 'inc/admin.inc';
?>
frsign.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/frsign.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Forum
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2014 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = http://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V5 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.03 (August 10, 2021) : adaptation to php 8
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[24] == '') {
        $nomzone = $admin[253];
        include 'access.inc';
        exit();
    }
}

$act  = import('act');
$code = import('code');

switch ($act) {
case 'add' :
    $frcode    = '';
    $frimage   = '';
    $frstatus  = 'a';
    $frorigine = 'i';
    $act       = 'edit';
    break;
case 'edit' :
    $frsigns   = ReadFrSigns();
    $frcode    = $code;
    $frimage   = $frsigns[$code]['image'];
    $frstatus  = $frsigns[$code]['status'];
    $frorigine = $frsigns[$code]['origine'];
    $act       = 'edit';
    break;
case 'change' :
	$frcode    = import('frcode');
	$oldcode   = import('oldcode');
	$frstatus  = import('frstatus');
	$frimage   = import('frimage');
    $frorigine = 'i';
    $newcode   = strtr($frcode, '[]?&%#<>', '_');
    if (empty($frcode)) {
        $msg = $admin[967];
        $act = 'edit';
    }
    elseif ($frcode != $newcode) {
        $msg = $admin[968];
        $act = 'edit';
    }
    elseif (strlen($frcode) < 5) {
        $msg = $admin[969];
        $act = 'edit';
    }
    elseif (empty($frimage)) {
        $msg = $admin[970];
        $act = 'edit';
    }
    else {
        $msg     = '';
        $frsigns = ReadFrSigns();
        if (!empty($oldcode)) unset($frsigns[$oldcode]);
        $frsigns[$frcode]['image']   = $frimage;
        $frsigns[$frcode]['status']  = 'on' == $frstatus ? 'a' : 'i';
        $frsigns[$frcode]['origine'] = $frorigine;
        WriteFrSigns($frsigns);
        $act = 'list';
    }
    break;
case 'status' :
    $frsigns = ReadFrSigns();
    $frsigns[$code]['status'] = 'a' == $frsigns[$code]['status'] ? 'i' : 'a';
    WriteFrSigns($frsigns);
    $act = 'list';
    break;
case 'delete' :
    $frsigns = ReadFrSigns();
    unset($frsigns[$code]);
    WriteFrSigns($frsigns);
    $act = 'list';
    break;
case 'list' :
default :
    $act = 'list';
}

$widepage = 'on';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[954]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[954], '100%');

echo '
<div style="text-align:center;margin:auto;width:98%;">
<p style="text-align:center;">'.ToHelp($lng, 'frsign').$admin[956].'</p>
<hr />
<br />';

if ('list' == $act) {
    $frsigns = ReadFrSigns();
    echo '
<p style="text-align:center;">
  <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=add">'.$admin[963].'</a>
</p>

  <fieldset>'.legend($admin[957]);
    if (0 == count($frsigns)) {
        echo '
    <p>'.$admin[962].'</p>';
    } else {
        foreach ($frsigns as $frcode => $frsign) {
            $frtxtact = $frsign['status'] != 'a' ? $admin[959] : $admin[960];
            $frimgact = $frsign['status'] != 'a' ? 'on' : 'off';
            echo '
    <div class="rep" style="float:left; width:100px; height:100px; border:1px solid; margin:1px; position:relative;">
      <div class="quest" style="text-align:center; font-weight:bold; padding:2px;margin-bottom:4px;">'.$frcode.'</div>
      <div style="text-align:center;">';
		if ($frsign['origine'] == 'i') {
			echo '
        <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=edit&amp;code='.$frcode.'" title="'.$admin[958].'">
          <img src="'.CHEMIN.FRSIGNS_IMG.$frsign['image'].'" alt="" title="" style=" max-width:75px; max-height:60px;"/>
        </a>';
		} else {
			echo '
        <img src="'.$frsign['image'].'" alt="" title="" style=" max-width:75px; max-height:60px;"/>';
		}
		echo '
      </div>
      <div style="text-align:center; position:absolute; bottom:2px; width:100%;">';
		if ($frsign['origine'] == 'i') {
			echo '
        <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=edit&amp;code='.$frcode.'" title="'.$admin[958].'">
		  <img src="'.CHEMIN.'admin/inc/img/files/edit.gif" alt="'.$admin[958].'" title="'.$admin[958].'" style="padding:0 3px;" />
		</a>';
		}
		echo '
        <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=status&amp;code='.$frcode.'" title="'.$frtxtact.'">
		  <img src="'.CHEMIN.'admin/inc/img/files/'.$frimgact.'.gif" alt="'.$frtxtact.'" title="'.$frtxtact.'" style="padding:0 3px;" />
		</a>
        <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=delete&amp;code='.$frcode.'" title="'.$admin[961].'">
		  <img src="'.CHEMIN.'admin/inc/img/files/sup.gif" alt="'.$admin[961].'" title="'.$admin[961].'" style="padding:0 3px;" />
		</a>
      </div>
    </div>';
        }
    }
    echo '
    <div style="clear:left"></div>
  </fieldset>';
}
elseif ('edit' == $act) {
    $frallimg = ExploreImg(FRSIGNS_IMG);
    echo '
<p style="text-align:center;">
  <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=list">'.$admin[964].'</a> ||
  <a href="admin.php?lng='.$lng.'&amp;pg=frsign&amp;act=add">'.$admin[963].'</a>
</p>
<form name="frsignedit" action="admin.php?lng='.$lng.'&amp;pg=frsign" method="post">
  <input type="hidden" name="act" value="change" />
  <input type="hidden" name="oldcode" value="'.$frcode.'" />
  <fieldset>'.legend($admin[963]);
    if (!empty($msg)) {
        echo '
  <p class="quest" style="text-align:center;font-weight:bold;">
    <img src="'.CHEMIN.'admin/inc/img/files/off.gif" alt="" title="" style="padding-right:3px;vertical-align:middle;" />
    '.$msg.'
  </p>';
    }
    echo '
    <p>
      <span style="padding:4px 10px;">'.$admin[965].' <input type="text" name="frcode" value="'.$frcode.'" /></span>
      <span style="padding:4px 10px;">'.$admin[966].' <input type="checkbox" name="frstatus"'.Checked($frstatus == 'a').' /></span>
    </p>
    <hr />
    <p> Image</p>';
    foreach($frallimg as $frimg) {
        echo '
      <div style="float:left; width:100px; height:75px;">
        <label>
        <input type="radio" name="frimage" value="'.$frimg.'"'.Checked($frimg == $frimage).' />
        <img src="'.CHEMIN.FRSIGNS_IMG.$frimg.'" style=" vertical-align:middle; max-width:75px; max-height:60px;" alt="'.$frimg.'" title="'.$frimg.'" />
        </label>
      </div>';
    }
  
    echo '
    <div style="clear:left"></div>
  </fieldset>
  <div class="quest" style="padding:2px 20px;">
    <div style="float:right">'.SubmitButton($admin[66].' &gt;&gt;&gt;').'</div>
    <div style="clear:both"></div>
  </div>
</form>';
}

echo '
</div>';

btable();
include CHEMIN.'admin/bpage.inc' ;
?>
funcdbchk.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/funcdbchk.inc'
View Content
<?php
/*******************************************************************************
 *   DataBase Integrity Check
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.11 (March 09, 2023) : correction integrity data control
 ******************************************************************************/

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

function CheckDBmP($docmin, $docmax, $quiet=0) {
    global $serviz,
        $type, $fileid, $status, $creadate, $moddate, $author, $email, 
        $fielda1, $fielda2, $fieldb1, $fieldb2, $fieldc1, $fieldc2, 
        $fieldd1, $fieldd2, $fieldweb, $fieldmail, $fieldmod, $admin;

    $error_reporting = ini_get('error_reporting');
    error_reporting($error_reporting ^ E_NOTICE);

    $dbnewdocid = array();
    $timenow    = time();
    $docdates   = IndexDbFieldsByField(ReadDBFields(DOCDATES), 0);
    $children   = IndexDbFieldsByField(ReadDBFields(CHILDREN), 0);
    for ($i = $docmin; $i <= $docmax; $i++) {
        if (isset($docdates[$i])) unset($docdates[$i]);
        if (isset($children[$i])) unset($children[$i]);
    }
    $j = 0;
    for ($i = $docmin; $i <= $docmax; $i++) {
        if (FileDBExist(DBBASE.TestFileId($i).INCEXT)) {
            ReadDoc($i);
            if ($type == '' || $fileid == '' || $status == '') {
                DestroyDBFile(DBBASE.TestFileId($i).INCEXT);
                DestroyDBFile(DBCOUNT.TestFileId($i).DBEXT);
                DestroyDBFile(DBIPBASE.TestFileId($i).DBEXT);
                continue;
            }
            $dbnewdocid[$j][0] = $type;
            $dbnewdocid[$j][1] = $fileid;
            $dbnewdocid[$j][2] = $status;
            $docdates[$fileid] = array($fileid, $creadate, $moddate);
            switch ($type) {
            case TYP_GUESTBK :
            case TYP_REACT :
            case TYP_REBLOG :
                $children[$fileid] = array($fileid, $type, $fielda1, $fielda2);
                break;
            case TYP_FORUM :
                if (0 != $fielda2) $children[$fileid] = array($fileid, $type, $fielda2, $fielda1);
                break;
            }
            $j++;
            if (FileDBExist(DBIPBASE.TestFileId($i).DBEXT)) {
                $timefile = filemtime(DBIPBASE.TestFileId($i).DBEXT);
                if ($timenow - $timefile > HIT_TIME) {
                    DestroyDBFile(DBIPBASE.TestFileId($i).DBEXT);
                }
            }
        }
        else {
            if (FileDBExist(DBCOUNT.TestFileId($i).DBEXT)) {
                DestroyDBFile(DBCOUNT.TestFileId($i).DBEXT);
            }
            if (FileDBExist(DBIPBASE.TestFileId($i).DBEXT)) {
                DestroyDBFile(DBIPBASE.TestFileId($i).DBEXT);
            }
        }
    }
    unset($fr);
    $dbdocid   = ReadDBFields(DOCID);
    $tempdocid = array();
    $i = 0; // index $dbnewdocid
    $j = 0; // index $dbdocid
    $k = 0; // index tempodocid
    $onerror = 0;
    $reindex = array();
    if (count($dbnewdocid) == 0) {
        for ($j = 0; $j < count($dbdocid); $j++) {
            if ($dbdocid[$j][1] >= $docmin && $dbdocid[$j][1] <= $docmax) {
                $onerror++;
                if ($quiet == 0) {
                    echo $admin[282].$dbdocid[$j][1].$admin[288];
                    echo $admin[284].$dbdocid[$j][1].$admin[285].$dbdocid[$j][0].$admin[286].$dbdocid[$j][2].$admin[287];
                }
                $reindex[$dbdocid[$j][0]] = TRUE;
            }
            else {
                $tempdocid[$k][0] = $dbdocid[$j][0];
                $tempdocid[$k][1] = $dbdocid[$j][1];
                $tempdocid[$k][2] = $dbdocid[$j][2];
                $k++;
            }
        }
    } else {
        if ($docmax > $dbdocid[count($dbdocid)-1][1] && $dbnewdocid[count($dbnewdocid)-1][1] < $dbdocid[count($dbdocid)-1][1]) {
            $whiletoomuch = 1;
        }
        else {
            $whiletoomuch = 0;
        }
        $docmax = $dbnewdocid[count($dbnewdocid)-1][1];
        if ($quiet == 0) {
            echo $admin[301].$docmin.$admin[302].$docmax.$admin[303];
        }
        $whiletest = 0;
        $whileloop = Max($docmax,$dbdocid[count($dbdocid)-1][1]);
        while ($whiletest < $whileloop && ($j < count($dbdocid) || $i < count($dbnewdocid)))  {
            if ($j == count($dbdocid)) {
                $dbdocid[$j][1] = '999999999999';
            }
            $i = Min($i,count($dbnewdocid));
            if ($dbdocid[$j][1] < $docmin) {
                $tempdocid[$k][0] = $dbdocid[$j][0];
                $tempdocid[$k][1] = $dbdocid[$j][1];
                $tempdocid[$k][2] = $dbdocid[$j][2];
                $k++;
                $j++;
            } elseif ($dbdocid[$j][1] > $docmax && $whiletoomuch == 0 && $dbdocid[$j][1] != '999999999999' && $i != (count($dbnewdocid)-1)) {
                $tempdocid[$k][0] = $dbdocid[$j][0];
                $tempdocid[$k][1] = $dbdocid[$j][1];
                $tempdocid[$k][2] = $dbdocid[$j][2];
                $k++;
                $j++;
            } elseif ($dbdocid[@$j][0] == $dbnewdocid[@$i][0] && $dbdocid[@$j][1] == $dbnewdocid[@$i][1] && $dbdocid[@$j][2] == $dbnewdocid[@$i][2]) {
                $tempdocid[$k][0] = $dbdocid[$j][0];
                $tempdocid[$k][1] = $dbdocid[$j][1];
                $tempdocid[$k][2] = $dbdocid[$j][2];
                $k++;
                $j++;
                $i++;
            } else {
                $onerror++;
                if ($dbdocid[@$j][0] == $dbnewdocid[@$i][0] && $dbdocid[@$j][1] == $dbnewdocid[@$i][1]) {
                    if ($quiet == 0) {
                        echo $admin[282].$dbnewdocid[$i][1].$admin[299];
                        echo $admin[284].$dbnewdocid[$i][1].$admin[285].$dbnewdocid[$i][0].$admin[286].$dbnewdocid[$i][2].$admin[287];
                    }
                    $reindex[$dbnewdocid[$i][0]] = TRUE;
                    $tempdocid[$k][0] = $dbnewdocid[$i][0];
                    $tempdocid[$k][1] = $dbnewdocid[$i][1];
                    $tempdocid[$k][2] = $dbnewdocid[$i][2];
                    $i++;
                    $j++;
                    $k++;
                } elseif ($dbdocid[@$j][1] == $dbnewdocid[@$i][1] && $dbdocid[@$j][2] == $dbnewdocid[@$i][2]) {
                    if ($quiet == 0) {
                        echo $admin[282].$dbnewdocid[$i][1].$admin[300];
                        echo $admin[284].$dbnewdocid[$i][1].$admin[285].$dbnewdocid[$i][0].$admin[286].$dbnewdocid[$i][2].$admin[287];
                    }
                    $reindex[$dbnewdocid[$i][0]] = TRUE;
                    $reindex[$dbdocid[$i][0]] = TRUE;
                    $tempdocid[$k][0] = $dbnewdocid[$i][0];
                    $tempdocid[$k][1] = $dbnewdocid[$i][1];
                    $tempdocid[$k][2] = $dbnewdocid[$i][2];
                    $i++;
                    $j++;
                    $k++;
                } elseif ($dbdocid[@$j][1] < $dbnewdocid[@$i][1] || ($dbdocid[@$j][1] > $docmax && $whiletoomuch == 1)) {
                    if ($quiet == 0) {
                        echo $admin[282].$dbdocid[$j][1].$admin[288];
                        echo $admin[284].$dbdocid[$j][1].$admin[285].$dbdocid[$j][0].$admin[286].$dbdocid[$j][2].$admin[287];
                    }
                    $reindex[$dbdocid[$i][0]] = TRUE;
                    $j++;
                } elseif ($dbdocid[$j][1] > $dbnewdocid[$i][1]) {
                    if ($quiet == 0) {
                        echo $admin[282].$dbnewdocid[$i][1].$admin[283];
                        echo $admin[284].$dbnewdocid[$i][1].$admin[285].$dbnewdocid[$i][0].$admin[286].$dbnewdocid[$i][2].$admin[287];
                    }
                    $reindex[$dbnewdocid[$i][0]] = TRUE;
                    $tempdocid[$k][0] = $dbnewdocid[$i][0];
                    $tempdocid[$k][1] = $dbnewdocid[$i][1];
                    $tempdocid[$k][2] = $dbnewdocid[$i][2];
                    $i++;
                    $k++;
                }
            }
            $whiletest = $tempdocid[$k-1][1];
        }
    }
    ksort($docdates);
    WriteDBFields(DOCDATES, $docdates);
    ksort($children);
    WriteDBFields(CHILDREN, $children);
    if (ReadCounter(NEXTID) != $tempdocid[count($tempdocid)-1][1]) {
        WriteCounter(NEXTID, $tempdocid[count($tempdocid)-1][1]);
        if ($quiet == 0) {
            echo $admin[304].' ('.$tempdocid[count($tempdocid)-1][1].')<br />';
        }
        $onerror++;
    }
    if ($onerror > 0) {
        WriteDBFields(DOCID, $tempdocid);
        if ($quiet == 0) {
            echo $admin[289];
        }
        $reindexstr = array(
            TYP_AGENDA => $admin[913],
            TYP_ART => $admin[290],
            TYP_REACT => $admin[479],
            TYP_BLOG => $admin[911],
            TYP_REBLOG => $admin[914],
            TYP_BSS => $admin[1120],
            TYP_DNLOAD => $admin[292],
            TYP_FAQ => $admin[912],
            TYP_FREEBOX => $admin[1122],
            TYP_FORUM => $admin[294],
            TYP_LINKS => $admin[291],
            TYP_MENUICO => $admin[1360],
            TYP_NEWS => $admin[293],
            TYP_DDMENUBOX => $admin[1358],
            TYP_OPTDDMENU => $admin[1361],
            TYP_MENUBOX => $admin[1359],
            TYP_OPTMENU => $admin[1362],
            TYP_PHOTO => $admin[332],
            TYP_RSS => $admin[1121],
            TYP_SOCNET => $admin[1363]
            );
        foreach ($reindex as $reindex_type => $val) {
            switch ($reindex_type) {
            case TYP_GUESTBK :
            case TYP_BANNER :
            case TYP_THINK :
            case TYP_RULES :
            case TYP_RECO :
                // Pas d'index à régénérer pour ces documents
                break;
            default :
                ActionOnFields('reindex', array($reindex_type, 0));
                if ($quiet == 0) {
                    echo isset($reindexstr[$reindex_type]) ? $reindexstr[$reindex_type] : '... reindex for "'.$reindex_type.'" type !<br>';
                }
            }
        }
    }
	$temp = ReadDBFields(DOCID);
	$docid = array();
	foreach ($temp as $tmp) {
		if (FileDBExist(DBBASE.TestFileId($tmp[1]).INCEXT)) {
			$docid[] = $tmp;
		}
	}
	WriteDBFields(DOCID, $docid);
    
    error_reporting($error_reporting);

    return $onerror;
}

function majIndexAROM() {
    global $lng, $lang;
    global $fielda1, $fielda2, $fieldd1, $fieldd2, $fieldweb;
    $aom = SelectDBFieldsByNotStatus(SelectDBFieldsByType(ReadDBFields(DOCID), TYP_OPTMENU), 'd');
    $dbw = array();
    foreach($aom as $om) {
        $fid = TestFileID($om[1]);
        if (FileDBExist(DBBASE.$fid.INCEXT)) {
            include DBBASE.$fid.INCEXT;
            $flds = explode(CONNECTOR, $lng == $lang[0] ? $fieldd1 : $fieldd2);
            $fld  = $flds[0];
            if (strpos($fld, 'articles.php') !== false) {
                $pg    = substr($fld, strpos($fld, 'pg=') + 3);
                $pos   = strpos($pg, '&');
                $pg    = $pos === false ? $pg : substr($pg, 0, $pos);
                $menus = SelectDBFieldsByField(ReadDBFields(DBMENUBOX), 4, $fieldweb);
                $pos   = strpos($fielda1, '-->');
                $flda1 = substr($fielda1, ($pos !== false ? $pos + 3 : 0));
                $pos   = strpos($fielda2, '-->');
                $flda2 = substr($fielda2, ($pos !== false ? $pos + 3 : 0));
				$mnus2 = $mnus3 = '';
                if (isset($menus[0][2]))
				{
					
					$pos   = strpos($menus[0][2], '-->');
					$mnus2 = substr($menus[0][2], ($pos !== false ? $pos + 3 : 0));
					$pos   = strpos($menus[0][3], '-->');
					$mnus3 = substr($menus[0][3], ($pos !== false ? $pos + 3 : 0));
				}
				else $menus[0][2] = '';
                $dbw[] = array($pg, $om[1], $fieldweb, $mnus2, $mnus3, $flda1, $flda2);
            }
        }
    }
    WriteDBFields(DBARTMENU, $dbw);
}
?>
generic.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/generic.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Technicals Information
 *******************************************************************************
 *   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
 *******************************************************************************

      PARTI PRIS :<br>
      ============<br><br>
      Ce n\'est pas un VRAI générique comme les génériques de film.<br>
      Car dans les productions hollywoodiennes les personnes sont citées plusieurs fois.<br><br>
      Spielberg Producteur<br>Spielberg réalisateur<br>
      Scénario Spielberg<br>Montage Spielberg<br>etc...<br><br>
      Nous n’avons pas procédé ainsi parce que le générique serait six fois plus long et vingt fois plus difficile à mettre à jour.<br><br>
      Mais aussi parce que chaque fichier de GuppY a sa propre liste de contributeurs.<br>
      Or dans un film il n\'y a pas de générique pour chaque plan séquence.<br>
      D\'où la différence de présentation.<br><br>CQFD<br><br>
      Quelques points importants :<br>============================<br><br>
      - Les noms sont classés alphabétiquement sous chaque titre<br>
      - en premier les noms réels sans guillemets.<br>
      - suivi des pseudos, initiales et diminutifs, entre guillemets.<br>
      - Toutes les orthographes et casses de caractères utilisées dans les sources doivent être scrupuleusement respectées.<br>
      - Si l\'on souhaite diminuer le nombre de pseudonymes et graphie, il faut ajuster les commentaires des sources.<br>
      - La liste des pseudos d’une même personne doit se résumer uniquement à ceux utilisé dans les sources.<br>
      - Seules les contributions existantes dans les packages officiels sont strictement obligatoires.<br>- Toute personne citée dans les sources de quelque façon que ce soit DOIT figurer au présent générique.<br>
      - Les contributions en tant que plug-in externes, coup de mains, fanzine etc ne sont pas obligatoirement citées dans le générique.<br>
      - Jamais d\'e-mails (pour des raisons de lutte contre le spam).<br>
      - Jamais de liens cliquables (par ce que ce n\'est pas une page de liens).<br>
      - Les titres de la liste sont en anglais (un point c\'est tout).<br>
      - Les titres ne sont là que pour le fun.<br>
      - Une seule ligne par personne.<br>
      - Chacun ne peut choisir qu\'un seul titre
      - Chacun peut suggérer un titre qui lui conviendrait mieux.<br>
      - Les personnes CITEES DANS LES SOURCES ne peuvent pas retirer leur nom ou pseudo de la présente liste.<br>
      - Pour retirer son nom ou pseudo de la présente liste : il faut également renoncer à ce qu\'il figure dans les sources de GuppY.<br>
      - Le retrait de son nom ou pseudo de la présente liste ne pose de problème si l\'on est jamais cité dans les sources de GuppY.<br><br>
      NE PAS EFFACER LE PRESENT COMMENTAIRES... METTRE A JOUR SVP.<br>
 ******************************************************************************/
 ?>
<br />
<div class="w-98 m-auto text-center overflow-auto" style="max-width:640px;height:300px;">
  <h1 style="text-align:center;"><font color="#000099" size="4">Aldweb & the GuppY_Team</font><font size="4"><br>
    <strong><font color="#0000FF">Aldweb & la GuppY_Team</font></strong></font></h1>
  <div style="text-align:center;"><font size="2">present :<br>
    pr&eacute;sentent :</font></div>
  <h1 style="text-align:center;color: rgb(0,153,0);font-size:6;">GuppY<span style="color:#009900;font-size:6;font-weight: bold;"><sup>©</sup></span></h1>
  <div align="center"><strong><font size="2">Initial project by :</font></strong><font size="2">&nbsp;&nbsp;
    <br>
    <strong>Projet initial de:&nbsp; </strong></font><strong>&nbsp; </strong></div>
  <h1 align="center"><font color="#FF3300" size="4">Laurent Duveau &quot;Aldweb&quot;</font></h1>
  <hr align="center" style="width: 100%; height: 2px" />
  <h2 align="center"><font color="#000099" size="3">Made and additional code by
    :</font><font size="3"><br>
    <font color="#0000FF">Création et code additionnel par :</font> </font></h2>
  <div align="center"><strong><font size="2">Nicolas Alves &quot;Nico&quot; &quot;nico&quot;</font></strong><font size="2"><br>
    <strong>Lud Bienaim&eacute; &quot;Saxbar&quot;</strong><br />
    Jean-Michel Misrachi &quot;Jean-Mi&quot; &quot;jmmis&quot;<br />
    J&eacute;r&ocirc;me Croux &quot;Djchouix&quot; &quot;Jchouix&quot;<br>
    Albert Aymard &quot;Icare&quot;<br>	
    Sylvain Leconte &quot;Hpsam&quot;<br>
    Isabelle Marchina &quot;Isa&quot; &quot;Realia&quot; &quot;Isabelle&quot;<br></font></div>
  <h3 align="center"><font color="#000099" size="3">Sub programs :</font><font size="3"><br>
    <font color="#0000FF">Sous-programmes </font>:</font></h3>
  <div style="text-align:left; padding-left:50px;"><font size="2">
<strong>CKEditor</strong><br>
  Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.<br>
  For licensing, see LICENSE.html or http://ckeditor.com/license<br><br>

<strong>miniditortextarea</strong><br>
  MinieditorTextarea réalisé par Djchouix - Licence CeCILL<br>
  Author   : jérôme CROUX (Djchouix)<br>
  Web site : http://lebrikabrak.info/<br><br>

<strong>Color picker</strong><br>
  Author: Stefan Petre www.eyecon.ro<br>
  Dual licensed under the MIT and GPL licenses<br><br>

<strong>PostGuestEditor</strong><br>
  Licence  : GNU Lesser General Public License<br>
  Author   : jérôme CROUX (Djchouix)<br>
  Web site : http://lebrikabrak.info/<br><br>

<strong>Cryptographp</strong><br>
  (c) 2006-2007 Sylvain BRISON<br>
  adaptation Lud Bienaimé pour GuppY 5.0<br>
  www.captcha.fr<br>
  Licence CeCILL modifiée => Voir fichier Licence_CeCILL_V2-fr.txt<br><br>

<strong>PHPMailer</strong><br>
  Contact: via sourceforge.net support pages (also www.worxware.com)<br>
  Info: http://phpmailer.sourceforge.net<br>
  Authors: Andy Prevost (codeworxtech) codeworxtech[at]users.sourceforge.net<br>
         : Marcus Bointon (coolbru) coolbru[at]users.sourceforge.net<br>
  License: Distributed under the Lesser General Public License (LGPL)<br>
    http://www.gnu.org/copyleft/lesser.html<br><br>
    
<strong>Lightbox v2.6</strong><br>
  by Lokesh Dhakar - http://www.lokeshdhakar.com<br>
  http://lokeshdhakar.com/projects/lightbox2/<br>
  Licensed under the Creative Commons Attribution 2.5<br>
  License - http://creativecommons.org/licenses/by/2.5/<br>
  - free for use in both personal and commercial projects<br>
  - attribution requires leaving author name, author link, and the license info intact<br><br>

<strong>Lytebox v5.5</strong><br>
  Author: Markus F. Hay<br>
  Website: http://lytebox.com  (http://dolem.com/lytebox)<br>
  Date: January 26, 2012<br>
  License: Creative Commons Attribution 3.0 <br>
  License (http://creativecommons.org/licenses/by/3.0/)<br><br>
	 </font></div>
  <h3 align="center"><font color="#000099" size="3">Additional code, optimization
    and corrections :</font><font size="3"><br>
    <font color="#0000FF">Code additionnel, optimisation et corrections :</font>
    </font><font size="4"> </font></h3>
  <div align="center"><font size="2">&quot;Alex&quot;<br>
    &quot;Arnaud&quot;<br>
    &quot;bugs974&quot;<br>
    &quot;C&eacute;sar&quot;<br>
    &quot;Das&quot;<br>
    &quot;deherve&quot;<br>
    &quot;Eddie&quot;<br>
    &quot;Erik&quot;<br>
    &quot;FabriceV&quot;<br>
    &quot;Florent&quot;<br>
    &quot;Frannyz&quot;<br>
    &quot;frog-m@n&quot;<br>
    &quot;Graznok&quot;<br>
    &quot;Henri&quot;<br>
    &quot;jacky&quot;<br>
    &quot;Jib&eacute;&quot;<br>
    &quot;jmmis&quot;<br>
    &quot;JonnyQuest&quot;<br>
    &quot;JP&quot;<br>
    &quot;KnoB&quot;<br>
    &quot;Kromonos&quot;<br>	
    &quot;L0rd L4m3R&quot;<br>
    &quot;Laroche&quot;<br>	
    &quot;Laurent Roger&quot;<br>
    &quot;lordloose&quot;<br>
    &quot;Marc&quot;<br>
    &quot;Maxrebo&quot;<br>
    Michel<br>
    &quot;Mitch&quot;<br>
    &quot;Neil&quot;<br>
    &quot;Ouly&quot;<br>
    &quot;Papinou&quot;<br>	
    Pascal aka &quot;Le Sorcier&quot;<br>
    &quot;Pascal31&quot;<br>	
    &quot;Pavol&quot;<br>
    &quot;Raiponce&quot;<br>
    &quot;reddog&quot;<br>
    &quot;Ricsen&quot;<br>
    Vojtech Semecky<br>
    .../... </font></div>
  <h3 align="center"><font color="#000099" size="3">Plugin-makers and beta test
    pre-versions :</font><font size="3"><br>
    <font color="#0000FF">Création de Plugin et b&ecirc;ta-test des pr&eacute;-versions
    :</font> </font></h3>
  <div align="center"><font size="2">&quot;Airhero&quot;<br>
    &quot;Al1-net&quot;<br>  
    &quot;Bernard&quot;<br>
    &quot;BTSCPIfr&quot;<br>	
    &quot;Charly&quot;<br>
    &quot;Charlyone&quot;<br>	
    &quot;Chris&quot;<br>
    &quot;equitathome&quot;<br>	
    &quot;Damien&quot;<br>
    &quot;Dipisoft&quot;<br>	
    &quot;Kamila&quot; <br>
    &quot;Keltiad&quot;<br>
    &quot;jerlal&quot;<br>	
    &quot;Linuxmr&quot; <br>
    &quot;Ludo&quot;<br>	
    &quot;OpenGuppY&quot;<br>
    &quot;Pascal31&quot;<br>	
    &quot;Phil-ogm&quot;<br>
    &quot;Roule&quot;<br>	
    &quot;RV&quot;<br>
    &quot;rvknobzh&quot;<br>
    &quot;Skin all&quot;<br>
    &quot;SkippY&quot;<br>
    &quot;Tanet&quot;<br>
    &quot;WebSlider&quot;<br>
    &quot;Xiva&quot;<br>
    .../... </font></div>
  <h3 align="center"><font color="#000099" size="3">Skinners :</font><font size="3"><br>
    <font color="#0000FF">Skinneurs :</font></font></h3>
  <div align="center">
    <p><font size="2">
      &quot;Sabine&quot;<br>
      &quot;Papinou&quot;<br>
	  &quot;Skippy&quot;<br>
      &quot;Valou&quot;<br>
      &quot;Charly&quot;<br>
      &quot;Skinall&quot;<br>
      .../...</font></p>
    </div>
  <h3 align="center"><font color="#000099" size="3">Documentation :</font><font size="3"><br>
    <font color="#0000FF">Documentation :</font></font></h3>
  <div align="center"><font size="2"> &quot;La Vache Qui Rêve&quot;<br>
    &quot;Fred68&quot;<br>&quot;Corrector&quot;<br>&quot;Jeande Peyrat&quot;<br>&quot;Papinou&quot;<br></font></div>
  <h3 align="center"><font color="#000099" size="3">Official websites :</font><font size="3"><br>
    <font color="#0000FF">Sites officiels :</font></font></h3>
  <div align="center"><font size="2">GuppY (FR &amp; EN) http://www.freeguppy.org/<br></font><br />
    <h3 align="center"><font color="#000099" size="3">Official ressources for
      teachers :</font><font size="3"><br>
      <font color="#0000FF">Ressources pour l'enseignement :</font>
      </font></h3>
    <font size="2">&quot;Fred68, La Vache Qui Rêve&quot; (FR) http://guppyed.org/</font><br />
    <h3 align="center"><span style="font-weight: bold"><font color="#000099" size="3">Resources 
      for GuppY :</font><font size="3"><br>
      <font color="#0000FF">Ressources pour GuppY :</font> </font></span></h3>
    <font size="2">&quot;Pascal31, jerlal&quot; (FR) http://www.guppyland.org/</font><br />
  </div>
  <h3 align="center"><font color="#000099" size="3">Translations :</font><font size="3"><br>
    <font color="#0000FF">Traductions :</font></font></h3>
  <div align="center"><font size="2">
  &quot;Agi Sagita&quot;<br>
    &quot;Alberto Giudice&quot;<br>
    &quot;Alex&quot;<br>
    &quot;Alexandru-Ionut Chiuta&quot;<br>
    &quot;Ali&quot;<br>
    &quot;Augusto Uehara&quot;<br>
    &quot;Bartek Zoltowski&quot;<br>
    &quot;Bent Nielsen&quot;<br>
    &quot;Cees&quot;<br>
    &quot;C&eacute;sar&quot;<br>
	&quot;Corrector&quot;<br>
    &quot;Cvrnda&quot;<br>
    &quot;Damski&quot;<br>
    &quot;Dark Jackal&quot;<br>
    &quot;Dyane&quot;<br>
    &quot;eugenij&quot;<br>
    &quot;Ezekiel&quot;<br>
    &quot;Fernando Ortenzi&quot;<br>
    &quot;Francisco&quot;<br>
    &quot;Frank Wang&quot;<br>
    &quot;G&ouml;ran Eriksson&quot;<br>
    &quot;Imre Sz&ucirc;cs&quot;<br>
    &quot;WackoJacko&quot;<br>
    &quot;Jan Schmidt&quot;<br>
    &quot;Jerol&quot;<br>
    &quot;Jordan&quot;<br>
    &quot;Juha Ryh&auml;nen&quot;<br>
    &quot;Juraci Costa&quot;<br>
    &quot;Karol Wasilec&quot;<br>
    &quot;K&eacute;vin Killer&quot;<br>
    &quot;Kristian W. Johnsen&quot;<br>
    &quot;Leontyev Roman aka Vortex&quot;<br>
    &quot;Libert&quot;<br>
    &quot;lmo Jensen&quot;<br>
    &quot;Mahmoud Hani&quot;<br>
    &quot;Marcelo Alves&quot;<br>
    &quot;Melih Tari&quot;<br>
    &quot;Melvin Hendrik&quot;<br>
    &quot;Morten G. Sevland&quot;<br>
    &quot;Neil&quot;<br>
    &quot;Nikos Varopoulos&quot;<br>
    &quot;Pampeliska&quot;<br>
    &quot;Pedro Ribeiro&quot;<br>
    &quot;Pepsalas&quot;<br>
    &quot;Per Kongebro&quot;<br>
    &quot;Riklaunim Mali&ntilde;ski&quot;<br>
    &quot;Roberto Marcolin&quot;<br>
    &quot;S. Yordanov&quot;<br>
    &quot;Slavakov&quot;<br>
    &quot;Surat&quot;<br>
    &quot;Teodoras Poskus&quot;<br>
    &quot;Ute&quot;<br>
    &quot;Vania Rupeni&quot;<br>
    &quot;Waldemar Chadzynski&quot;<br>
    &quot;Wen-Yu Huang&quot;<br>
    &quot;ZeVs&quot;</font></div>
  <h3 align="center"><font color="#000099" size="3">Designer and OsX :</font><font size="3"><br>
    <font color="#0000FF">Designer et OsX :</font></font></h3>
  <div align="center"><font size="2">&quot;benoit&quot;</font></div>
  <h3 align="center"><font color="#000099" size="3">Design :</font><font size="3"><br>
    Design :</font></h3>
  <div align="center"><font size="2">&quot;Sabine&quot; &quot;Papinou &quot;ArtGraph&quot;<br>
    &quot;Ricsen&quot; &quot;Valric-Design&quot; </font>
<h3 align="center"><font color="#000099" size="3">Music by :</font><font size="3"><br>
      <font color="#0000FF">Musique par :</font></font><font size="4"> </font></h3>
    <div align="center"><font size="2">&quot;BillyZecat&quot;</font></div>
  </div>
  <h3 align="center"><font color="#000099" size="3">Forum :</font><font size="3"><br>
    <font color="#0000FF">Forum :</font></font></h3>
  <div align="center"><font size="2">&quot;JeandePeyrat&quot;<br>
    &quot;Papinou&quot;<br></font></div>
    <h3 align="center"><font color="#000099" size="3">Partner :</font><font size="3"><br>Partenaire :</font><font size="3"><br>
    </font></font><br />
    </h3>
   <div><font size="2">Thanks to our webhoster o2switch who kindly offered us webhosting
    www.freeguppy.org<br>
    Merci à notre hébergeur o2switch qui nous met à disposition un serveur dédié
    pour www.freeguppy.org </font><br />
    <br />
    <hr align="center" style="width: 100%; height: 2px" />
    <h3 align="center"> <font color="#000099" size="3">CeCILL licence :</font></h3>
  </div>
  <div align="center">
    <p><font size="2">Centre National de la Recherche Scientifique - CNRS,<br>
      Commissariat &agrave; l'Energie Atomique - CEA,<br>
      Institut National de Recherche en Informatique et en Automatique - INRIA</font></p>
  </div>
  <h3 align="center"><font color="#000099" size="3">Markup Validation :<br>
    <font color="#0000FF">Validation XHTML :</font></font></h3>
  <div align="center"><font size="2">World Wide Web Consortium &quot;W3C&quot;</font></div>
  <h3 align="center"><font color="#000099" size="3">Donate :<br>
    <font color="#0000FF">Donation :</font></font></h3>
  <div align="center"><font size="2">PayPal</font><br />
    <hr align="center" style="width: 100%; height: 2px" />
    <h3 align="center"><font color="#000099" size="3">Thanks :</font></h3>
  </div>
  <div align="center">
    <p><font size="2">to our wives and husbands for their understanding the time
      we devote to this project </font></p>
    <h3><font color="#000099" size="3">Remerciements :</font></h3>
    <font size="2"> &agrave; nos proches! pour leur compr&eacute;hension et
    patience pour le temps que nous avons consacr&eacute; au projet </font><br />
  </div>
  <h3 align="center"><font color="#000099" size="3">This work is dedicated in
    particular to :</font></h3>
  <div align="center">
    <p><font size="2">children and those who have known how to remain children.</font></p>
    <h3><font color="#000099" size="3">Ce travail est particuli&egrave;rement
      d&eacute;di&eacute; :</font></h3>
    <p> <font size="2">aux enfants et &agrave; ceux qui ont toujours su rester
      des enfants.</font><br />
    </p>
    <hr align="center" style="width: 100%; height: 2px" />
    <br />
    <br />
    <hr align="center" style="width: 100%; height: 2px" />
  </div>
</div>
<br />
gestcounter.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/gestcounter.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Counters
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp cancel
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[31] == '') {
        $nomzone = $admin[17];
        include 'access.inc';
        exit();
    }
}

$mod   = import('mod');
$del   = import('del');
$cnum  = import('cnum');
$id    = import('id');
$regit = import('regit');

$docdtb = DBCOUNT.TestFileId($id).DBEXT;
$docinc = DBBASE.TestFileId($id).INCEXT;

if ($cnum == 1) {
    $countername = 'countdwnl';
    $namecount = $admin[18];
}

if ($cnum == 2) {
    $countername = 'countart';
    $namecount = $admin[5];
}

if ($cnum == 3) {
    $countername = 'countforum';
    $namecount = $admin[253];
}

if ($regit == 1) {
	$newcount = import('newcount');
    WriteCounter($docdtb, $newcount);
}

if ($mod == 1) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.'&amp;pg='.$countername.'">'.$admin[17].' '.$namecount.'</a> > '.$admin[660];
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[660].' '.$namecount, '100%');
    $dbcounter = ReadCounter($docdtb);
    ReadDoc($docinc);
    if ($cnum == 1) {
        if ($lng == $lang[0]) {
            $txt = $admin[670].' '.$fieldb1;
        }
        else {
            $txt = $admin[670].' '.$fieldb2;
        }
    }
    if ($cnum == 2) {
        if ($lng == $lang[0]) {
            $txt = $admin[671].' '.$fieldb1;
        }
        else {
            $txt = $admin[671].' '.$fieldb2;
        }
    }
    if ($cnum == 3) {
        $txt = $admin[672].' '.$fieldb1;
    }
    echo '
<hr />
<div style="width:300px; margin:0 auto 4px;">
<p class="forum" style="text-align:left; padding:5px 20px;">doc'.TestFileId($id).INCEXT.'</p>
<form name="gestcounter" action="admin.php?lng='.$lng.'&amp;pg=gestcounter" method="post">
  <input type="hidden" name="id" value="'.$id.'" />
  <input type="hidden" name="mod" value="1" />
  <input type="hidden" name="cnum" value="'.$cnum.'" />
  <input type="hidden" name="regit" value="1" />
  <fieldset>
  <div class="table-responsive-md">
  <table class="table w-100">
    <tr>
      <td style="white-space:nowrap;">
          <input class="form-control w-80 mx-auto" type="text" name="newcount" value="'.$dbcounter.'" style="max-width:80px;" />
      </td>
    </tr>
  </table>
  </div>
  </fieldset>
  <div class="quest" style="padding:2px 20px;">
    <div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
    <div style="clear:both"></div>
  </div>
</form>
</div>
'.BeginJavascript().'document.gestcounter.newcount.focus()'.Endjavascript();
}

if ($del == 1) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.'&amp;pg=count">'.str_replace('Admin - ', '', $admin[652]).'</a> > 
	  <a href="admin.php?lng='.$lng.'&amp;pg='.$countername.'">'.$admin[17].' '.$namecount.'</a> > '.$admin[666];
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[666].' '.$namecount, '100%');
    SetChmod($docdtb);
    @unlink($docdtb);
    echo '
<p style="text-align:center;">'.$admin[667].'<b> doc'.TestFileId($id).DBEXT.' </b>'.$admin[668].'</p>';
}

echo'
<br />
<hr />
<p style="text-align:center;">
  <a href="admin.php?lng='.$lng.'&amp;pg='.$countername.'">'.$admin[669].' '.$namecount.'</a>
</p>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
gestredac.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/gestredac.inc'
View Content
<?php
/*******************************************************************************''
 *   Admin Droits
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2021 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.20 (October 24, 2024) : Modify script
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[12] == '') {
        $nomzone = $admin[821];
        include 'access.inc';
        exit();
    }
}

$del    = import('del');
$act    = import('act');
$regit  = import('regit');
$group  = import('group');
$member = import('member');
if (!isset($droitaccegroupredac)) $droitaccegroupredac = '';
include_once CHEMIN.'inc/func_groupscol.php';

if (empty($act)) {
    $topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.'&amp;pg=attribdroits">'.str_replace('Admin - ', '', $admin[820]).'</a> > '.str_replace('Admin - ', '', $admin[819]);
    include CHEMIN.'admin/hpage.inc';
    if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
    if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[819], '100%');
    if (!empty($del)) {
		if (FileDBExist(REDACREP.$del.INCEXT)) 
		{
			include REDACREP.$del.INCEXT;
			if ($droitaccegroupredac == 'on')
			{					
				if ($drtuser[42] == "redac1" || $drtuser[42] == "redac2")
				{					
					if (FileDBExist(REDACREP.'redacaccessdossier/accessdossier'.$del.INCEXT)) 
					{
						echo 'debut lecture del: '.$del.'<br />';
						include REDACREP.'redacaccessdossier/accessdossier'.$del.INCEXT;
						$accessRepUpload = explode(',',$drtaccessRepUpload);       //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
						$accessRepUploadImage = explode(',',$drtaccessRepUploadImage);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
						$accessRepUploadLink = explode(',',$drtaccessRepUploadLink);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
						$accessRepUploadMedia = explode(',',$drtaccessRepUploadMedia);
						echo 'count 1er: '.count($accessRepUpload).'<br />';
						var_dump($accessRepUpload);
						echo '<br />';
						$drtaccessRepUpload = '';
						for ($i =0; $i < count($accessRepUpload); $i++)
						{
							if (strpos($accessRepUpload[$i], $del))
							{
								$drtaccessRepUpload = $accessRepUpload[$i];
							}
								
						}
						$drtaccessRepUploadImage = '';
						for ($i =0; $i < count($accessRepUploadImage)-1; $i++)
						{
							if (strpos($accessRepUploadImage[$i], $del))
								$drtaccessRepUploadImage .= $accessRepUploadImage[$i];
						}
						$drtaccessRepUploadLink = '';
						for ($i =0; $i < count($accessRepUploadLink)-1; $i++)
						{
							if (strpos($accessRepUploadLink[$i], $del))
								$drtaccessRepUploadLink .= $accessRepUploadLink[$i];
						}
						$drtaccessRepUploadMedia = '';
						for ($i =0; $i < count($accessRepUploadMedia)-1; $i++)
						{
							if (strpos($accessRepUploadMedia[$i], $del))
								$drtaccessRepUploadMedia .= $accessRepUploadMedia[$i];
						}
// Copie des dossier conetant  les Images, les videos etc ...
						@recursiveCopy(CHEMIN.$drtaccessRepUploadMedia, CHEMIN.'redacgroupdocs/'.$drtaccessRepUploadMedia);
// Suppression du dossier du Redacteur
						@RecursiveDeleteDirComplet(CHEMIN.$drtaccessRepUploadMedia);					
// Suppression des dossiers					
						DestroyDBFile(REDACREP.'redacaccessdossier/accessdossier'.$del.INCEXT);
						echo 'nom dossieer drtaccessRepUpload: '.$drtaccessRepUpload.'<br />';	
						echo 'nom dossieer drtaccessRepUploadImage: '.$drtaccessRepUploadImage.'<br />';	
						echo 'nom dossieer drtaccessRepUploadLink: '.$drtaccessRepUploadLink.'<br />';
						echo 'nom dossieer drtaccessRepUploadMedia: '.$drtaccessRepUploadMedia.'<br />';	
						$dbw    = SelectDBFieldsByNotStatus(ReadDBFields(DOCID),'d');
						for ($i = 0; $i < count($dbw); $i++) 
						{					
							$modif = 0;
							ReadDoc($dbw[$i][1]);	
							$temp   = explode('|', $author);
							$authorcontrol = $temp[0];
;							$id = $dbw[$i][1];
							if ($authorcontrol == $del) 
							{					
								echo 'doc modifié: no  '.$dbw[$i][1].'<br />';
								if (strpos($fieldc1, $del)) {
									echo 'doc pos trouvé: no  '.$dbw[$i][1].'<br />';
									$contenu = stripslashes($fieldc1);
									$contenu = str_replace('redac_'.$del.'img', 'redacgroupdocs/redac_'.$del.'img', $contenu);
									$fieldc1 = $contenu;
									$modif = 1;	
								}	
								if (strpos($fieldc2, $del)) {
									$contenu = stripslashes($fieldc2);
									$contenu = str_replace('redac_'.$del.'img', 'redacgroupdocs/redac_'.$del.'img', $contenu);
									$fieldc2 = $contenu;
									$modif = 1;	
								}	
								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);			
								}
							}
						}

					} // fin acces dossiers pour redac			
				}
			} // fin d'existence du dossier droits acces membre   
		}
        DestroyDBFile(REDACREP.$del.INCEXT);
        $dbadm = ReadDBFields(ADMINS);
        for ($k = 0; $k < count($dbadm); $k++) {
            if ($dbadm[$k][0] == $del) {
                unset($dbadm);
                DeleteDBFieldById(ADMINS, $id=$k);
                break;
            }
        }
        DestroyMemberCol($del);

    }
    echo '
<p class="text-center">'.ToHelp($lng, '&pg=984&mnuid=937&tconfig=0#z2').$admin[702].'</p>
<div class="m-auto text-center" style="max-width:480px;">
  <div class="row quest p-0 w-100 m-auto">
    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6">
      <div class="float-right">
        '.SubmitButton($admin[820], 'self.location.href=\'admin.php?lng='.$lng.'&pg=attribdroits&etape=1\'', '', $imgdroite, 'button').'
      </div>
    </div>
  </div>
  <div class="mt-2 table-responsive-md">
  <table class="table table-striped table-bordered w-100 m-auto">
    <tr class="forum2">
      <td class="w-45"><b>'.$admin[827].'</b></td>
      <td class="w-35"><b>'.$admin[1612].'</b></td>
      <td class="w-20 text-center"><b>'.$admin[680].'</b></td>
    </tr>';
    $dbdrtredac = array();
    $file_drtredac = opendir(REDACREP);
    while ($nomfichier = readdir($file_drtredac)) {
        if( substr($nomfichier,-3) == 'inc' ) {
            $dbdrtredac[] = str_replace(substr($nomfichier,-4),"",$nomfichier);
        }
    }
    closedir($file_drtredac);
    @usort($dbdrtredac,'AsciiCompare');
    $fonctions = array('' => '???', 'redac1' => $admin[715].'1', 'redac2' => $admin[715].'2', 'modo' => $admin[712], 'webm' => $admin[718], 'admin' => $admin[1261]);
    for ($i = 0; $i < count($dbdrtredac); $i++) {
        if ($dbdrtredac[$i] != $userprefs[1]) {
            include REDACREP.$dbdrtredac[$i].INCEXT;
		if ($drtuser[42] == 'redac') $drtuser[42] = 'redac1';
            echo '
    <tr>
      <td class="align-middle text-left py-3">'.$dbdrtredac[$i].'</td>
      <td class="align-middle text-left py-3">'.$fonctions[$drtuser[42]].'</td>
      <td class="align-middle text-center py-3">
        <a href="admin.php?lng='.$lng.'&amp;pg=attribdroits&amp;etape=2&amp;namedroits='.$dbdrtredac[$i].'">
          <i class="far fa-edit" style="font-size: 1.2rem;" title="'.$admin[144].'"></i>
        </a>&nbsp;&nbsp;
        <a href="admin.php?lng='.$lng.'&amp;pg=gestredac&amp;del='.$dbdrtredac[$i].'">
          <i class="fas fa-times text-danger" style="font-size: 1.4rem;" title="'.$admin[186].'"></i>
        </a>
      </td>
    </tr>';
      }
    }
    echo '
  </table>
  </div>  
</div>';
    btable();
} 
################################################################################
// gestion des groupes de collaborateurs
elseif ($act == 2) {
    $mess = '';
    if ($regit == 1 && $group != '') { //ajouter groupe
        $group = preg_replace('! !', '_', $group);
        $mess = '<br />'.AddGroupCol($group) ? ucfirst($admin[928]).' '.$group.$admin[929].' !<br />' : ucfirst($admin[928]).' '.$group.$admin[931].' !<br />';
    } elseif ($regit == 2) { // supprimer groupe
        $mess = '<br />'.DelGroupCol($group) ? ucfirst($admin[928]).' '.$group.$admin[930].' !<br />' : ucfirst($admin[928]).' '.$group.' '.mb_strtolower($admin[1604], $charset).$admin[930].' !<br />';
    }
    $grps    = ReadGroupsCol();
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1476]);
    include CHEMIN.'admin/hpage.inc';
    if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
    if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1476], '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=986&mnuid=937&tconfig=0#z2').$admin[1477].'</p>
<hr />'.$mess.'
<div class="w-100 m-auto" style="max-width:400px;">
  <form name="membgrp" action="admin.php?lng='.$lng.'&amp;pg=gestredac"  method="post">
    <fieldset style="padding-top:12px;">
      <div class="table-responsive-md">
	  <table class="table bord" style="text-align:center;width:300px;margin:auto;">
	    <tr class="forum">
		  <td style="width:66%;text-align:left;"><b>'.ucfirst($admin[928]).'</b></td>
		  <td colspan="2" style="text-align:center;"><b>'.$admin[680].'</b></td>
		</tr>';
    foreach ($grps as $grp=>$mbrs) {
    echo '
		<tr class="rep">
		  <td style="width:33%;text-align:left;padding:4px 0;">'.$grp.'</td>
		  <td style="text-align:center;padding:4px 0;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=gestredac&amp;act=3&amp;group='.$grp.'" title="'.$admin[144].' '.$grp.'">
            <i class="far fa-edit" style="font-size: 1.2rem;" title="'.$admin[144].'"></i>
		  </td>
		  <td style="text-align:center;padding:4px 0;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=gestredac&amp;act=2&amp;regit=2&amp;group='.$grp.'" title="'.$admin[186].' '.$grp.'">
			<i class="fas fa-times text-danger" style="font-size: 1.4rem;" title="'.$admin[186].'"></i>
		  </td>
		</tr>';
    }
    unset($grps);
    echo '
	  </table>
      </div>
      <br />';
    echo '
      <input type="hidden" name="regit" value="1" />
	  <input type="hidden" name="act" value="2" />
	  <p style="text-align:center">'.$admin[1590].' '.$admin[928].' : <input class="form-control mx-auto texte" type="text" name="group" value="" style="width:196px;" /></p>
	</fieldset>
    <div class="row quest p-0 mt-2 w-98 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';
    btable();
}
################################################################################
// gestion des collaborateurs du groupe
elseif ($act == 3) { 
	$aMembers = (array)import('aMembers', 'POST', FALSE);
    $mess = '';
    if ($regit == 'add' && $group != '' && count($aMembers) > 0) { 
		foreach ($aMembers as $member) {  // ajout membre
            if (!empty($member))
			{
                $mess .= AddMemberCol($group, $member) ? ucfirst($admin[928]).' '.$group.' : '.$admin[1478].' '.$member.$admin[929].' !<br />' : ucfirst($admin[1478]).' '.$member.$admin[931].' !<br />';
				if ($droitaccegroupredac == 'on')
				{
					if (FileDBExist(REDACREP.$member.INCEXT)) 
					{
						include REDACREP.$member.INCEXT;
						if ($drtuser[42] == "redac1" || $drtuser[42] == "redac2")
						{					
							if (FileDBExist(REDACREP.'redacaccessdossier/accessdossier'.$member.INCEXT)) 
							{
								include REDACREP.'redacaccessdossier/accessdossier'.$member.INCEXT;
								$accessRepUpload = explode(',',$drtaccessRepUpload);       //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
								$accessRepUploadImage = explode(',',$drtaccessRepUploadImage);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
								$accessRepUploadLink = explode(',',$drtaccessRepUploadLink);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
								$accessRepUploadMedia = explode(',',$drtaccessRepUploadMedia);

								$drtaccessRepUpload .= ',groupe'.$group.'img';

								$drtaccessRepUploadImage .= ',groupe'.$group.'img';

								$drtaccessRepUploadLink .= ',groupe'.$group.'img';

								$drtaccessRepUploadMedia .= ',groupe'.$group.'img';
								   
								if (!is_dir(CHEMIN.'groupe'.$group.'img')) // Creation dossier image acces en Upload Image, AUdio,Link et média
								{
									@mkdir(CHEMIN.'groupe'.$group.'img');
									SetChmod(CHEMIN.'groupe'.$group.'img');
									@copy(CHEMIN.'img/index.php', CHEMIN.'groupe'.$group.'img/index.php');	
									SetChmod(CHEMIN.'img/index.php', CHEMIN.'groupe'.$group.'img/index.php');
								}
		
$mettre    = "<?php
if (stristr(\$_SERVER['SCRIPT_NAME'], 'accessdossier".$member.".inc')) {
    header('location:../index.php');
    die();
}

\$drtaccessRepUpload = \"".$drtaccessRepUpload ."\"; //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
\$drtaccessRepUploadImage = \"".$drtaccessRepUploadImage ."\"; //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
\$drtaccessRepUploadLink = \"".$drtaccessRepUploadLink ."\"; //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
\$drtaccessRepUploadMedia = \"".$drtaccessRepUploadMedia."\"; //Accès aux répertoires à la racine de Guppy pour les fichiers Audio et Video (accès avec variable uptype='Media')";                                                        //Attention: vous devez choisir les répertoires uniquement parmi la liste des répertoires contenus dans la variable $accessRepUpload ci-dessus
$mettre .='
?>';
								if (!is_dir(REDACREP.'redacaccessdossier')) // Generation des access utilisés en upload.php
								{
									@mkdir(REDACREP.'redacaccessdossier');
									SetChmod(REDACREP.'redacaccessdossier');
									@copy(REDACREP.'index.php', REDACREP.'redacaccessdossier/index.php');
									SetChmod(REDACREP.'redacaccessdossier/index.php');
								}
								if (!is_dir(CHEMIN.'redac_'.$member.'img')) // Creation dossier acces en Upload Image, AUdio,Link et média
								{
									@mkdir(CHEMIN.'redac_'.$member.'img');
									SetChmod(CHEMIN.'redac_'.$member.'img');
									@copy(CHEMIN.'img/index.php', CHEMIN.'redac_'.$member.'img/index.php');	
									SetChmod(CHEMIN.'redac_'.$member.'img/index.php');
								}
								if (!is_dir(CHEMIN.'redacgroupdocs')) // Creation dossier Redacgroupdocs pour tous les rédacteurs
								{
									@mkdir(CHEMIN.'redacgroupdocs');
									SetChmod(CHEMIN.'redacgroupdocs');
									@copy(CHEMIN.'img/index.php', CHEMIN.'redacgroupdocs/index.php');	
									SetChmod(CHEMIN.'redacgroupdocs/index.php');
								}
								$filedroitdossierredac = REDACREP.'redacaccessdossier/accessdossier'.$member.INCEXT;
								WriteFullDB($filedroitdossierredac, $mettre);
								echo 'fin ajout <br />';
							} // fin acces dossiers pour redac			
			
						}
					} // fin d'existence du dossier droits acces membre
				}
			}
		} // fin ajout
									
    } 
	elseif ($regit == 'del' && $group != '' && $member != '') 
	{ // suppression membre du groupe
        $mess = DelMemberCol($group, $member) ? ucfirst($admin[928]).' '.$group.' : '.$admin[1693].' '.$member.$admin[930].' !<br />' : ucfirst($admin[1478]).' '.$member.' '.mb_strtolower($admin[1604], $charset).$admin[930].' !<br />';
		if (FileDBExist(REDACREP.$member.INCEXT)) 
		{
			include REDACREP.$member.INCEXT;
			if ($droitaccegroupredac == 'on')
			{					
				if ($drtuser[42] == "redac1" || $drtuser[42] == "redac2")
				{					
					if (FileDBExist(REDACREP.'redacaccessdossier/accessdossier'.$member.INCEXT)) 
					{
						include REDACREP.'redacaccessdossier/accessdossier'.$member.INCEXT;
						$accessRepUpload = explode(',',$drtaccessRepUpload);       //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
						$accessRepUploadImage = explode(',',$drtaccessRepUploadImage);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
						$accessRepUploadLink = explode(',',$drtaccessRepUploadLink);  //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
						$accessRepUploadMedia = explode(',',$drtaccessRepUploadMedia);
						echo 'count 1er: '.count($accessRepUpload).'<br />';
						var_dump($accessRepUpload);
						echo '<br />';
						echo 'nom rech: '.strlen('groupe'.$group.'img').'<br />';
						echo 'nom rech: groupe'.$group.'img<br />';
						$drtaccessRepUpload = '';
						for ($i =0; $i < count($accessRepUpload); $i++)
						{
							if (trim($accessRepUpload[$i]) != trim('groupe'.$group.'img'))
							{
								if ($i > 0) $drtaccessRepUpload.= ',';
								$drtaccessRepUpload.= $accessRepUpload[$i];
							}
								
						}
						$drtaccessRepUploadImage = '';
						for ($i =0; $i < count($accessRepUploadImage)-1; $i++)
						{
							if (trim($accessRepUploadImage[$i]) != trim('groupe'.$group.'img'))
								if ($i > 0) $drtaccessRepUploadImage.= ',';
								$drtaccessRepUploadImage .= $accessRepUploadImage[$i];
						}
						$drtaccessRepUploadLink = '';
						for ($i =0; $i < count($accessRepUploadLink)-1; $i++)
						{
							if (trim($accessRepUploadLink[$i]) != trim('groupe'.$group.'img'))
								if ($i > 0) $drtaccessRepUploadLink.= ',';
								$drtaccessRepUploadLink .= $accessRepUploadLink[$i];
						}
						$drtaccessRepUploadMedia = '';
						for ($i =0; $i < count($accessRepUploadMedia)-1; $i++)
						{
							if (trim($accessRepUploadMedia[$i]) != trim('groupe'.$group.'img'))
								if ($i > 0) $drtaccessRepUploadMedia.= ',';
								$drtaccessRepUploadMedia .= $accessRepUploadMedia[$i];
						}							
		
$mettre    = "<?php
if (stristr(\$_SERVER['SCRIPT_NAME'], 'accessdossier".$member.".inc')) {
    header('location:../index.php');
    die();
}

\$drtaccessRepUpload = \"".$drtaccessRepUpload ."\"; //Nom des répertoires à la racine de Guppy accessibles pour le fichier Upload
\$drtaccessRepUploadImage = \"".$drtaccessRepUploadImage ."\"; //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion d'Images.(accès avec variable uptype='Image')
\$drtaccessRepUploadLink = \"".$drtaccessRepUploadLink ."\"; //Nom des répertoires à la racine de Guppy accessibles via le menu pour l'insertion de Liens (accès avec variable uptype='Link')
\$drtaccessRepUploadMedia = \"".$drtaccessRepUploadMedia."\"; //Accès aux répertoires à la racine de Guppy pour les fichiers Audio et Video (accès avec variable uptype='Media')";                                                        //Attention: vous devez choisir les répertoires uniquement parmi la liste des répertoires contenus dans la variable $accessRepUpload ci-dessus
$mettre .='
?>';
						if (!is_dir(CHEMIN.'admin/redac/redacaccessdossier')) // Generation des access utilisés en upload.php
						{
							@mkdir(CHEMIN.'admin/redac/redacaccessdossier');
							SetChmod(CHEMIN.'admin/redac/redacaccessdossier');
							@copy(CHEMIN.'admin/redac/index.php', CHEMIN.'admin/redac/redacaccessdossier/index.php');
							SetChmod(CHEMIN.'admin/redac/redacaccessdossier/index.php');
						}
						if (!is_dir(CHEMIN.'redac_'.$member.'img')) // Creation dossier acces en Upload Image, AUdio,Link et média
						{
							@mkdir(CHEMIN.'redac_'.$member.'img');
							SetChmod(CHEMIN.'redac_'.$member.'img');
							@copy(CHEMIN.'img/index.php', CHEMIN.'redac_'.$member.'img/index.php');	
							SetChmod(CHEMIN.'redac_'.$member.'img/index.php');
						}
						if (!is_dir(CHEMIN.'redacgroupdocs')) // Creation dossier Redacgrupdocs pour tous les rédacteurs
						{
							@mkdir(CHEMIN.'redacgroupdocs');
							SetChmod(CHEMIN.'redacgroupdocs');
							@copy(CHEMIN.'img/index.php', CHEMIN.'redacgroupdocs/index.php');	
							SetChmod(CHEMIN.'redacgroupdocs/index.php');
						}
						$filedroitdossierredac = REDACREP.'redacaccessdossier/accessdossier'.$member.INCEXT;
						WriteFullDB($filedroitdossierredac, $mettre);
					} // fin acces dossiers pour redac			
		
				}
			} // fin d'existence du dossier droits acces membre   
		}
	} // fin de suppression du membre
	$mess    = $mess == '' ? '' : '<br />'.$mess;
    $grps    = ReadGroupsCol();
	$lst     = $grps[$group];
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.'&amp;pg=gestredac&amp;act=2">'.$admin[1476].'</a> > '.ucfirst($admin[928]).' '.$group;
    include CHEMIN.'admin/hpage.inc';
    if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
    if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable(ucfirst($admin[928]).' '.$group, '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=986&mnuid=937&tconfig=0#z2').$admin[1479].'</p>
<hr />'.$mess;
    if (FileDBExist(GROUPSCOL)) {
        echo '
<div class="w-100 m-auto" style="max-width:400px;">
  <div class="row quest p-0 mt-2 w-100 m-auto">
    <div class="col-md-12">'.SubmitButton($admin[1476], 'self.location.href=\'admin.php?lng='.$lng.'&pg=gestredac&act=2\'', $imggauche, '', 'button').'</div>
  </div>
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$group.'</p>
  <form name="memberscol" action="admin.php?lng='.$lng.'&amp;pg=gestredac"  method="post">
    <fieldset style="padding-top:12px;">
      <div class="table-responsive-md">
	  <table class="table bord" style="text-align:center;margin:auto;width:300px;">
		<tr class="forum">
		  <td style="width:66%;text-align:left;"><b>'.ucfirst($admin[1692]).'</b></td>
		  <td style="text-align:center;"><b>'.$admin[186].'</b></td>
		</tr>';
        foreach ($lst as $mbr) {
			if (!empty($mbr))  // voir Rosier
				echo '
		<tr class="rep">
		  <td style="width:33%;text-align:left;padding:4px 0;">'.$mbr.'</td>
		  <td style="text-align:center;padding:4px 0;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=gestredac&amp;act=3&amp;regit=del&amp;group='.$group.'&amp;member='.$mbr.'" title="'.$admin[186].' '.$mbr.' de '.$group.'">
              <i class="fas fa-times text-danger" style="font-size: 1.4rem;" title="'.$admin[186].'"></i>
            </a>
		  </td>
		</tr>
            ';
        }
        unset($grps);
        echo '
	  </table>
      </div>
      <br />';
        echo '
	  <input type="hidden" name="regit" value="add" />
	  <input type="hidden" name="act" value="3" />
	  <input type="hidden" name="group" value="'.$group.'" />
	  <p style="text-align:center">'.$admin[1590].' '.$admin[1478].' :</p>
	  <p style="text-align:center">';
        $dbuserspref = array();
        $file_users=opendir(REDACREP);
        while ($nomfichier=readdir($file_users)) {
			if ( substr($nomfichier,-3) == "inc") {
				$nomuser = str_replace(substr($nomfichier,-4),"",$nomfichier);
				if (!in_array($nomuser, $lst)) $dbuserspref[] = $nomuser;
			}
        }
        closedir($file_users);
        @usort($dbuserspref,'AsciiCompare');
		$size = min(20, count($dbuserspref) + 2);
        echo '
		<select class="form-control mx-auto" name="aMembers[]" id="aMembers" size="'.$size.'" multiple="multiple" style="width:160px;">';
        for ($i = 0; $i < count($dbuserspref); $i++) {
			echo '
		  <option value="'.$dbuserspref[$i].'">'.$dbuserspref[$i].'</option>';
        }
        echo '
		</select><br />
	  </p>
	</fieldset>
    <div class="row quest p-0 mt-2 w-98 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';
    }
    btable();
}

include CHEMIN.'admin/bpage.inc';
?>
guestbk.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/guestbk.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Guestbook
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[22] == '') {
        $nomzone = $admin[11];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_GUESTBK;
$bname     = 1;
$bemail    = 1;
$bcat      = 0;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 2;
$qformonly = 0;
$qtitle    = $admin[113];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1062&mnuid=937&tconfig=0#z2').'</p>'.$admin[226].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[172];
$qwrite    = '';
$qcat      = '';
$qtitre    = $admin[173];
$qcontenu  = $admin[174];
$qnouveau  = $admin[261];

include 'inc/admin.inc';
?>
import.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/import.inc'
View Content
<?php
/*******************************************************************************
 *   Import
 *******************************************************************************
 *   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.19 (August 15, 2029) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[44] == '') {
        $nomzone = $admin[1093];
        include 'access.inc';
        exit();
    }
}

function InputFileId($oid, $bnew) {
    global $admin;
    if ($bnew) {
        return $admin[1111].'<input type="hidden" name="new[fileid]" value="-1" />';
    } else {
        return '
    <select class="form-control" name="new[fileid]">
      <option value="-1" selected="selected">'.$admin[1111].'</option>
      <option value="'.$oid.'">'.$admin[1112].'</option>
    </select>';
    }
}

function SelectStatus($ostatus){
    global $admin;
    return '
    <select class="form-control" name="new[status]">
      <option value="a"'.Selected($ostatus == 'a').'>'.$admin[765].'</option>
      <option value="i"'.Selected($ostatus == 'i').'>'.$admin[766].'</option>
    </select>';
}

function InputType($otype) {
    global $admin;
    if (in_array($otype, array('f1', 'f2', 'f3', 'f4', 'ed', 'ft', 'sp'))) {
        return '
    <input class="form-control" type="text" name="new[type]" value="fb" size="2" readonly="readonly" />';
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[type]" value="'.$otype.'" />';
    }
}

function InputAuthor($oauthor) {
    global $user, $serviz, $userprefs, $admin;
    if (!empty($user[0]) && $oauthor == $user[0]) {
        return $admin[1108].'
	<input type="hidden" name="new[author]" value="'.$oauthor.'" />';
    } elseif (!empty($serviz[31]) && $oauthor == $serviz[31]) {
        return $admin[1108].'
	<input type="hidden" name="new[author]" value="'.$oauthor.'" />';
    } elseif (!empty($serviz[176]) && $oauthor == $serviz[176]) {
        return $admin[1108].'
	<input type="hidden" name="new[author]" value="'.$oauthor.'" />';
    } elseif (!empty($userprefs[1]) && $oauthor == $userprefs[1]) {
        return $admin[1108].'
	<input type="hidden" name="new[author]" value="'.$oauthor.'" />';
    } else {
        $out = '
    <select class="form-control" name="new[author]" style="width:170px;">';
        if (!empty($oauthor)) {
            $out.= '
      <option value="'.$oauthor.'" selected="selected">'.$oauthor.'</option>';
        } else {
            $out.= '
      <option value="">'.$admin[1108].'</option>';
        }
        if (!empty($user[0])) {
            $out.= '
      <option value="'.$user[0].'">'.$user[0].'</option>';
        }
        if (!empty($serviz[31]) && $serviz[31] != $user[0]) {
            $out.= '
      <option value="'.$serviz[31].'">'.$serviz[31].'</option>';
        }
        if (!empty($serviz[176]) && $serviz[176] != $user[0]) {
            $out.= '
      <option value="'.$serviz[176].'">'.$serviz[176].'</option>';
        }
        if (!empty($userprefs[1]) && $userprefs[1] != $serviz[31] && $userprefs[1] != $serviz[176] && $userprefs[1] != $user[0]) {
            $out.= '
      <option value="'.$userprefs[1].'">'.$userprefs[1].'</option>';
        }
        $out .= '
    </select>';
        return $out;
    }
}

function InputEmail($oemail) {
    global $user, $userprefs, $admin, $oauthor;
    if (!empty($user[1]) && $oemail == $user[1]) {
        return $admin[1108].'
	<input type="hidden" name="new[email]" value="'.$oemail.'" />';
    } elseif (!empty($userprefs[2]) && $oauthor == $userprefs[1]) {
        return $admin[1108].'
	<input type="hidden" name="new[email]" value="'.$oemail.'" />';
    } else {
        $out = '
    <select class="form-control" name="new[email]" style="width:170px;">';
        if (!empty($oemail)) {
            $out.= '
      <option value="'.$oemail.'" selected="selected">'.$oemail.'</option>';
        } else {
            $out.= '
      <option value="">'.$admin[1108].'</option>';
        }
        if (!empty($user[1])) {
            $out.= '
      <option value="'.$user[1].'">'.$user[1].'</option>';
        }
        if (!empty($userprefs[2]) && $userprefs[2] != $user[1]) {
            $out.= '
      <option value="'.$userprefs[2].'">'.$userprefs[2].'</option>';
        }
        $out .= '
    </select>';
        return $out;
    }

}

function InputCreaDate($odate, $bnew) {
    global $admin;
    $now = GetCurrentDateTime();
    if ($bnew) {
        return '
    <select class="form-control" name="new[creadate]">
      <option value="'.$odate.'">'.$admin[1108].'</option>
      <option value="'.$now.'" selected="selected">'.FormatDate($now).'</option>
    </select>';
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[creadate]" value="'.$odate.'" />';
    }
}

function InputModDate($odate, $bnew) {
    global $admin;
    $now = GetCurrentDateTime();
    if ($bnew) {
        return '
    <select class="form-control" name="new[moddate]">
      <option value="'.$odate.'">'.$admin[1108].'</option>
      <option value="'.$now.'" selected="selected">'.FormatDate($now).'</option>
    </select>';
    } else {
        return FormatDate($now).' <input type="hidden" name="new[moddate]" value="'.$now.'" />';
    }
}

function InputFielda1($otype, $ofielda1) {
    global $admin;
    if ($otype == 'ed') {
        return '
    <input class="form-control" type="text" name="new[fielda1]" value="E" size="25" readonly="readonly" />';
    } elseif ($otype == 'ft') {
        return '
    <input class="form-control" type="text" name="new[fielda1]" value="B" size="25" readonly="readonly" />';
    } elseif (in_array($otype, array('f1', 'f2', 'f3', 'f4', 'sp'))) {
        return '
    <input class="form-control" type="text" name="new[fielda1]" value="TLAEURB" size="25" readonly="readonly" />';
    } elseif ($otype == 'sp') {
        return '
    <input class="form-control" type="text" name="new[fielda1]" value="LAEUR" size="25" readonly="readonly" />';
    } elseif ($otype == 'ar') {
        return '
    <input class="form-control" type="text" class="texte" name="new[fielda1]" value="'.$ofielda1.'" size="25" />';
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[fielda1]" value="'.$ofielda1.'" />';
    }
}

function InputFielda2($otype, $ofielda2) {
    global $admin;
    if ($otype == 'ar') {
        return '
    <input class="form-control" type="text" class="texte" name="new[fielda2]" value="'.$ofielda2.'" size="25" />';
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[fielda2]" value="'.$ofielda2.'" />';
    }
}

function InputFieldb1($otype, $ofieldb1, $doc) {
    global $admin;
	$titre = '§ImportDoc ed '.substr($doc, 0, -4);
    if ($otype == 'ed') {
        return '
    <input class="form-control" type="text" name="new[fieldb1]" value="'.$titre.'" size="25" readonly="readonly" />';
    } elseif ($otype == 'ft') {
        return '
    <input class="form-control" type="text" name="new[fieldb1]" value="'.$titre.'" size="25" readonly="readonly" />';
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[fieldb1]" value="'.strip_tags($ofieldb1).'" />';
    }
}

function InputFieldb2($otype, $ofieldb2, $doc) {
    global $admin;
	$titre = '§ImportDoc ed '.substr($doc, 0, -4);
    if ($otype == 'ed') {
        return '
    <input class="form-control" type="text" name="new[fieldb2]" value="'.$titre.'" size="25" readonly="readonly" />';
    } elseif ($otype == 'ft') {
        return '
    <input class="form-control" type="text" name="new[fieldb2]" value="'.$titre.'" size="25" readonly="readonly" />';
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[fieldb2]" value="'.strip_tags($ofieldb2).'" />';
    }
}

function InputFieldd1($otype, $ofieldd1, $doc) {
    global $admin, $lang, $lng;
	$mnus = ReadDBFields(DBMENUBOX);
    if ($otype == 'ar') {
        $ret = '
    <select class="form-control" name="new[fieldd1]" style="width:170px;">
	  <option value="none">'.$admin[681].'</option>';
		foreach($mnus as $mnu) $ret .= '
	  <option value="MNU '.$mnu[4].'">MNU '.$mnu[4].'-'.$mnu[$lng == $lang[0] ? 2 : 3].'</option>';
		$ret .= '
	</select>';
		return $ret;
    } else {
        return $admin[1108].'<input type="hidden" name="new[fieldd1]" value="'.$ofieldd1.'" />';
    }
}

function InputFieldweb($otype, $ofieldweb, $doc) {
    global $admin;
    if ($otype == 'od') {
		$dbmenu = ReadDBFields(DBDDMENUBOX);
		$dbwork = array();
		for ($i = 0; $i < count($dbmenu); $i++) {
			$dbwork[$i][0] = $dbmenu[$i][$lang[0] == $lng ? 2 : 3];
			$dbwork[$i][1] = $dbmenu[$i][4];
		}
		sort($dbwork);
		if (!empty($dbwork)) {
			$ret = '
     <select class="form-control" name="new[fieldweb]">
        <option value="" select="selected">'.$admin[1222].'</option>';
			foreach ($dbwork as $menu) {
				$ret .= '
        <option value="'.$menu[1].'">'.$menu[0].'</option>';
			}
			$ret .= '
    </select>';
		} else 
			$ret = $ofieldweb;
		return $ret;
    } else {
        return $admin[1108].'
	<input type="hidden" name="new[fieldweb]" value="'.$ofieldweb.'" />';
    }
}

function IsNew($oid, $otype) {
    $id = TestFileID($oid);
    if (is_file(DBBASE.$id.INCEXT)) {
        include DBBASE.$id.INCEXT;
        return $type != $otype;
    } else {
        return TRUE;
    }
}


$headinc = '
<style type="text/css">
	#doc { border:1px solid; border-collapse:collapse;  margin:0 auto 10px; }
	#doc td { border:1px solid; padding:2px 5px; }
	#doc input { background-color : #CCC; }
	#doc .short { max-height:75px; max-width:500px; overflow:hidden; }
	.error { text-align:center; color:red; background-color:yellow; font-weight:bold; }
</style>';


$pats = array(chr(36), chr(146), chr(128), chr(140), chr(156), chr(138), chr(154), '&#8230;', '&#x2026;', '&#133;'); 
$patr = array('&dollar;', '&rsquo;', '&euro;', '&OElig;', '&oelig;', '&Scaron;', '&scaron;', '&hellip;', '&hellip;', '&hellip;');
$step = isset($_POST['step']) ? $_POST['step'] : 1;
if (!in_array($step, array(1, 2, 3))) $step = 1;

$intro = $admin[1095];
switch ($step) {
case 1 :
    $introStep = $admin[1096];
    $content = '
<form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import" enctype="multipart/form-data">
  <input type="hidden" name="step" value="2" />
  <fieldset class="w-100 m-0 mb-2 py-0 px-2">
	<br />
	<div style="text-align:center">'.$admin[1099].' 
      <input class="form-control w-100 mx-auto" style="max-width:610px;" type="file" name="file" />
    </div>
	<br />
  </fieldset>
  <div class="row quest p-0 mt-2 w-100 m-auto">
    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1100], '', '', $imgdroite).'</div></div>
  </div>
</form>
';
    break;
    
case 2 :
    $introStep = $admin[1097];
    $file = $_FILES['file']['name'];
    if (!empty($file)) {
        $extension = mb_strtolower(substr($file, -4), $charset);
        if ('.inc' != $extension) {
            // Erreur : Mauvaise extension
            $content = '
<form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import">
<input type="hidden" name="step" value="1" />
<fieldset class="w-100 m-0 p-0" style="padding-top:12px;">
  <p class="error">'.$admin[1102].'</p>
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
  <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1101], '', '', $imgdroite).'</div></div>
</div>
</form>';
        } else {
            if (is_uploaded_file($_FILES['file']['tmp_name'])) {
                move_uploaded_file($_FILES['file']['tmp_name'], TEMPREP.$file);
                $datas = file(TEMPREP.$file);
                $cr = preg_match('!type = \'([^\']*)\';!', trim($datas[1]), $res);
                if ($cr != 1) $cr = preg_match('!type = "([^"]*)";!', trim($datas[1]), $res);
                if ($cr != 1) {
                    // Format inconnu (type non trouvé)
                    unlink(TEMPREP.$file);
                    $content = '
<form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import">
<input type="hidden" name="step" value="1" />
<fieldset class="w-100 m-0 p-0" style="padding-top:12px;">
  <p class="error">'.$cr.'<br>'.$datas[1].'<br>'.$admin[1105].'</p>
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
  <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1101], '', '', $imgdroite).'</div></div>
</div>
</form>';
                } else {
                    // Corriger les short_open_tag <? -> <?php si besoin
                    $file_contents = file_get_contents(TEMPREP.$file);
                    if (preg_match("!\<\?\s!", $file_contents)) {
                        $file_contents = preg_replace('!\<\?!', '<?php', $file_contents);
                        $file_contents = preg_replace('!\<\?phpphp!', '<?php', $file_contents);
                        file_put_contents(TEMPREP.$file, $file_contents);
                    }
                    unset($file_contents);
                    // Type trouvé
                    $type = $res[1];
                    $typesImportables = array(
                        'ag', 'ar', 'ba', 'bl', 'bs', 'ci', 'dn', 
						'fa', 'gb', 'fb', 'f1', 'f2', 'f3', 'f4', 
						'sp', 'ed', 'fr', 'ft', 'li', 'ne', 'nl', 
						'ph', 'rs',	'mb', 'om', 'dm', 'od', 'sn', 
						'mi', 'rb', 'ru');
                    if (!in_array($type, $typesImportables)) {
                        // Type non importable
                        unlink(TEMPREP.$file);
                        $content ='
<form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import">
<fieldset class="w-100 m-0 p-0">
  <input type="hidden" name="step" value="1" />
  <p class="error">'.$admin[1104].'</p>
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
  <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1101], '', '', $imgdroite).'</div></div>
</div>
</form>';
                    } else {
                        include TEMPREP.$file;
						$in_charset = preg_match('!doc!', $file) ? 'ISO-8859-1' : $charset;
                        $new        = IsNew($fileid, $type);
						$fieldweb   = empty($fieldweb) ? '' : $fieldweb;
						$fieldmail  = empty($fieldmail) ? '' : $fieldmail;
						$fieldmod   = empty($fieldmod) ? '' : $fieldmod;
						$fielda1    = $in_charset == $charset ? $fielda1 : str_replace($pats, $patr, $fielda1);
						$fielda2    = $in_charset == $charset ? $fielda2 : str_replace($pats, $patr, $fielda2);
						$fieldb1    = $in_charset == $charset ? $fieldb1 : str_replace($pats, $patr, $fieldb1);
						$fieldb2    = $in_charset == $charset ? $fieldb2 : str_replace($pats, $patr, $fieldb2);
						$fieldc1    = $in_charset == $charset ? $fieldc1 : str_replace($pats, $patr, $fieldc1);
						$fieldc2    = $in_charset == $charset ? $fieldc2 : str_replace($pats, $patr, $fieldc2);
						$content    = '
<form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="file" value="'.$file.'" />
<fieldset class="w-100 m-0 p-0" style="padding-top:12px;">
<p style="text-align:center;">'.$admin[1106].'<br />'.$file.' - '.$in_charset.'</p>
<div class="table-responsive-md">
<table id="doc" class="table table-bordered">
<tr style="text-align:center;">
  <td class="align-middle" style="width:70px;"></td>
  <td class="align-middle" style="width:560px;"><b>'.$admin[1109].'</b></td>
  <td class="align-middle" style="width:170px;"><b>'.$admin[1110].'</b></td>
</tr>
<tr>
  <td class="align-middle">$type</td>
  <td class="align-middle">'.$type.'</td>
  <td class="align-middle">'.InputType($type).'</td>
</tr>
<tr>
  <td class="align-middle">$fileid</td>
  <td class="align-middle">'.$fileid.'</td>
  <td class="align-middle">'.InputFileId($fileid, $new).'</td>
</tr>
<tr>
  <td class="align-middle">$status</td>
  <td class="align-middle">'.$status.'</td>
  <td class="align-middle">'.SelectStatus($status).'</td>
</tr>
<tr>
  <td class="align-middle">$author</td>
  <td class="align-middle">'.iconv($in_charset, $charset, $author).'</td>
  <td class="align-middle">'.InputAuthor(iconv($in_charset, $charset, $author)).'</td>
</tr>
<tr>
  <td class="align-middle">$creadate</td>
  <td class="align-middle">'.FormatDate($creadate).'</td>
  <td class="align-middle">'.InputCreaDate($creadate, $new).'</td> 
</tr>
<tr>
  <td class="align-middle">$moddate</td>
  <td class="align-middle">'.FormatDate($moddate).' </td>
  <td class="align-middle">'.InputModDate($moddate, $new).'</td>
</tr>
<tr><td>$email</td>  <td>'.$email.'</td> <td>'.InputEmail($email).'</td> </tr>
<tr>
  <td class="align-middle">$fielda1</td>
  <td class="align-middle">'.iconv($in_charset, $charset, $fielda1).'</td>
  <td class="align-middle">'.InputFielda1($type, iconv($in_charset, $charset, $fielda1)).'</td>
</tr>
<tr>
  <td class="align-middle">$fielda2</td>
  <td class="align-middle">'.iconv($in_charset, $charset, $fielda2).'</td>
  <td class="align-middle">'.InputFielda2($type, iconv($in_charset, $charset, $fielda2)).'</td>
</tr>
<tr>
  <td class="align-middle">$fieldb1</td>
  <td class="align-middle">'.iconv($in_charset, $charset, $fieldb1).'</td>
  <td class="align-middle">'.InputFieldb1($type, iconv($in_charset, $charset, $fieldb1), $file).'</td>
</tr>
<tr>
  <td class="align-middle">$fieldb2</td>
  <td class="align-middle">'.iconv($in_charset, $charset, $fieldb2).'</td>
  <td class="align-middle">'.InputFieldb2($type, iconv($in_charset, $charset, $fieldb2), $file).'</td>
</tr>
<tr>
  <td class="align-middle">$fieldc1</td>
  <td class="align-middle"><div class="short">'.iconv($in_charset, $charset, $fieldc1).'</div></td>
  <td class="align-middle">'.$admin[1108].'</td>
</tr>
<tr>
  <td class="align-middle">$fieldc2</td>
  <td class="align-middle"><div class="short">'.iconv($in_charset, $charset, $fieldc2).'</div></td>
  <td class="align-middle">'.$admin[1108].'</td>
</tr>
<tr>
  <td class="align-middle">$fieldd1</td>
  <td class="align-middle">'.$fieldd1.'</td>
  <td class="align-middle">'.InputFieldd1($type, $fieldd1, $file).'</td>
</tr>
<tr>
  <td class="align-middle">$fieldd2</td>
  <td class="align-middle">'.$fieldd2.'</td>
  <td class="align-middle">'.$admin[1108].'</td>
</tr>
<tr>
  <td class="align-middle">$fieldweb </td>
  <td class="align-middle">'.$fieldweb .'</td>
  <td class="align-middle">'.InputFieldweb($type, iconv($in_charset, $charset, $fieldweb), $file).'</td>
</tr>
<tr>
  <td class="align-middle">$fieldmail</td>
  <td class="align-middle">'.$fieldmail.'</td>
  <td class="align-middle">'.$admin[1108].'</td>
</tr>
<tr>
  <td class="align-middle">$fieldmod </td>
  <td class="align-middle">'.$fieldmod .'</td>
  <td class="align-middle">'.$admin[1108].'</td>
</tr>
</table>
</div>
</fieldset>
<div class="quest" style="padding:2px 20px;">
  <div style="float:left">'.SubmitButton($admin[1101], 'step.value=1;', $imggauche, '').'</div>
  <div style="float:right">'.SubmitButton($admin[1107], '', '', $imgdroite).'</div>
  <div style="clear:both"></div>
</div>
</form>';
                    }
                }
            } else {
                // Le fichier n'est pas chargé
                $content = '
<form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import">
<input type="hidden" name="step" value="1" />
<fieldset class="w-100 m-0 p-0" style="padding-top:12px;">
  <p class="error">'.$admin[1103].'</p>
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
  <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1101], '', '', $imgdroite).'</div></div>
</div>
</form>';
            }
        }
    } else {
        // Pas de nom de fichier
        header('location:admin.php?lng='.$lng.'&pg=import');
        exit;
    }
	break;

case 3 :
    $new        = import('new', 'POST', FALSE);
    $file       = import('file');
    $introStep  = $admin[1098];
	$in_charset = preg_match('!doc!', $file) ? 'ISO-8859-1' : $charset;
    include TEMPREP.$file;
	$fieldweb  = empty($fieldweb) ? '' : $fieldweb;
	$fieldmail = empty($fieldmail) ? '' : $fieldmail;
	$fieldmod  = empty($fieldmod) ? '' : $fieldmod;
	$fieldc1   = $in_charset == $charset ? $fieldc1 : str_replace($pats, $patr, $fieldc1);
	$fieldc2   = $in_charset == $charset ? $fieldc2 : str_replace($pats, $patr, $fieldc2);
    $data[0]   = $new['type'];
    $data[1]   = -1 == $new['fileid'] ? '' : $new['fileid'];
    $data[2]   = $new['status'];
    $data[3]   = $new['creadate'];
    $data[4]   = $new['moddate'];
    $data[5]   = $new['author'];
    $data[6]   = $new['email'];
    $data[7]   = $new['fielda1'];
    $data[8]   = $new['fielda2'];
    $data[9]   = $type == TYP_ART ? iconv($in_charset, $charset, $fieldb1) : $new['fieldb1'];
    $data[10]  = $type == TYP_ART ? iconv($in_charset, $charset, $fieldb2) : $new['fieldb2'];
    $data[11]  = $in_charset == $charset ? $fieldc1 : iconv($in_charset, $charset, $fieldc1);
    $data[12]  = $in_charset == $charset ? $fieldc2 : iconv($in_charset, $charset, $fieldc2);
    $data[13]  = $new['fieldd1'];
    $data[14]  = $fieldd2;
    $data[15]  = $new['fieldweb'];
    $data[16]  = $fieldmail;
    $data[17]  = $fieldmod;
    $id  = ActionOnFields(-1 == $new['fileid'] ? 'add' : 'mod', $data);
    $txt = sprintf((-1 == $new['fileid'] ? $admin[1113] : $admin[1114]), $id);
    unlink(TEMPREP.$file);
	if ($new['type'] == TYP_ART && substr($new['fieldd1'], 0, 3) == 'MNU') {
		$mnu_id   = substr($new['fieldd1'], 4);
		$dbw      = SelectDbFieldsByField(ReadDBFields(DBOPTMENU), 5, $mnu_id);
		if (!isset($tconf)) $tconf=0;
		$url1     = 'articles.php?lng='.$lang[0].'&pg='.$id.'&mnuid='.$mnu_id.'&tconfig='.$tconf.'||'.$lang[0].'-'.$urlrw[20].'-103-'.$id.'-'.$mnu_id.'-'.$tconf;
		$url2     = 'articles.php?lng='.$lang[1].'&pg='.$id.'&mnuid='.$mnu_id.'&tconfig='.$tconf.'||'.$lang[1].'-'.$urlrw[20].'-103-'.$id.'-'.$mnu_id.'-'.$tconf;
		$data[0]  = TYP_OPTMENU;
		$data[1]  = '';
		$data[11] = '_SELF';
		$data[12] = $new['fieldweb'];
		$data[13] = $url1;
		$data[14] = $url2;
		$data[15] = $mnu_id;
		$data[16] = 0;
		$id = ActionOnFields('add', $data);
	}
	$typeToEdit = array(
		'ag' => 'agenda',  'ar' => 'art',     'ba' => 'banner', 'bl' => 'blog', 
		'bs' => 'bss',     'ci' => 'think',   'dn' => 'dnload', 'fa' => 'faq', 
		'gb' => 'guestbk', 'fb' => 'freebox', 'fr' => 'forum',  'li' => 'links', 
		'ne' => 'news',    'nl' => 'nwl',     'ph' => 'photo',  'rs' => 'rss',
		'mb' => 'menu',    'om' => 'optmenu', 'dm' => 'ddmenu', 'od' => 'optddmenu', 
		'sn' => 'socnet',  'mi' => 'menuico', 'rb' => 'reblog', 'ru' => 'rules');
    $content = '
<fieldset class="w-100 m-0 p-0" style="padding-top:12px;">
<p style="text-align:center; font-weight:bold;">'.$txt.'</p>
</fieldset>
<div class="quest" style="padding:2px 20px;">
  <form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg=import">
  <input type="hidden" name="step" value="1" />
  <div style="float:left">'.SubmitButton($admin[1115], '', $imggauche, '').'</div>
  </form>
  <form name="import" method="post" action="admin.php?lng='.$lng.'&amp;pg='.$typeToEdit[$data[0]].'&amp;form=2&amp;id='.$id.'">
  <div style="float:right">'.SubmitButton($admin[1383], '', '', $imgdroite).'</div>
  </form>
  <div style="clear:both"></div>
</div>';
	break;
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1094]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1094], '100%');
CreateDir(TEMPREP);

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=998&mnuid=937&tconfig=0#z2').$intro.'</p>
<hr />
<div class="w-100 m-auto" style="max-width:800px;">
<p class="forum" style="text-align:left; padding:5px 20px;">'.$introStep.'</p>
'.$content.'
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
infos.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/infos.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Technicals Information
 *******************************************************************************
 *   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.03 (August 10, 2021) : adaptation to php 8
 ******************************************************************************/

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

$itact = import('itact');

// Show phpinfo() output
if ($itact == 'phpinfo') {
	phpinfo();
	exit();
}
else {
	// Check for upgrade : code inspired from punbb and pwg
	$version           = array();
	$version['actual'] = trim(MP_VERSION);
	$version['url']    = 'https://www.guppyland.org/update.txt';
	$load_ok           = FALSE;
	$lines             = array();
	if (ini_get('allow_url_fopen')) {
		$lines = @file($version['url']);
		$load_ok = TRUE;
	}
	elseif ($curl = @curl_init($version['url'])){
		$timeout = 5; // set to zero for no timeout
		curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
		curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
		$version_content = curl_exec($curl);
		curl_close($curl);
		if ($version_content != FALSE) {
			$lines   = explode("\n", $version_content);
			$load_ok = TRUE;
		}
	}
	else {
		$version['errors'] = $admin[898];
	}
    if ($load_ok) {
        $version['latest']   = @trim($lines[0]);
        $version['previous'] = @trim($lines[2]);
        $version['note']     = $lng == $lang[0] ? @trim($lines[6]) : @trim($lines[7]);
        $version['cur'] = str_replace('-', '.0', $version['actual']);
        $version['lat'] = str_replace('-', '.0', $version['latest']);
        $version['pre'] = str_replace('-', '.0', $version['previous']);
        $acur = explode('.', $version['cur']);
        $alat = explode('.', $version['lat']);
        $apre = explode('.', $version['pre']);
        $an   = max(count($acur), count($alat), count($apre));
        if ($an > count($alat)) $version['lat'] .= '.00';
        if ($an > count($acur)) $version['cur'] .= '.00';
        if ($an > count($apre)) $version['pre'] .= '.00';
        $ncur = intval(str_replace('.', '', $version['cur']));
        $npre = intval(str_replace('.', '', $version['pre']));
        $nlat = intval(str_replace('.', '', $version['lat']));
        $rpre = intval(substr(str_replace('.', '', $version['pre']), 0, 3));
        $rlat = intval(substr(str_replace('.', '', $version['lat']), 0, 3));
        $cmp  = version_compare($version['cur'], $version['lat']);
        $cmp  = $ncur == $nlat ? 0 : $cmp;
        switch ($version['latest']){
        case '':
            $version['errors'] = $admin[899];
            break;
        default:
            switch ($cmp) {
            case -1 :
                $reco1 = '';
                $reco2 = '';
                $reco3 = '';
                if ($acur[0] < $lat[0]) {
                    $reco3 = $admin[1273];
                } else {
                    if ((($ncur - $npre) == 0 || ($rlat - $rpre) == 1) && ($npre - $ncur) < 100) $reco1 = $admin[1273]; else $reco2 = $admin[1273];
                }
                $version['ok'] = '
                  <span style="color:green;">'.
                    $admin[900].'<br />'.
                    $admin[901].' '.$version['latest'].' '.$admin[902].' '.trim($lines[1]).'
                  </span><br /><br />'.
                  $admin[1271].'
                  <ul>
                    <li><a href="'.trim($lines[4]).'" target="_blank" title="'.$admin[1269].'">'.$admin[1269].'</a> '.$reco1.'</li>
                    <li><a href="'.trim($lines[5]).'" target="_blank" title="'.$admin[1270].'">'.$admin[1270].'</a> '.$reco2.'</li>
                    <li><a href="'.trim($lines[3]).'" target="_blank" title="'.$admin[1272].$version['latest'].'">'.$admin[1272].$version['latest'].'</a> '.$reco3.'</li>
                  </ul>';
                break;
            case 0 :
                $version['ok'] = $admin[903];
                break;
            case 1 :
                $version['ok'] = $admin[1274];
                break;
            }
        }
    }
	$php_os  = PHP_OS;
	$php_rel = @php_uname('r');
	echo '
  <hr />
  <p style="text-align:center;"><strong>'.$admin[895].'</strong></p>
  <hr />
  <br />
  <div class="rep w-98 m-auto text-left overflow-auto p-4" style="max-width:632px;height:220px;">
    <fieldset>'.legend($admin[904]).'
	  <ul>
	    <li>GuppY '.$version['actual'].'</li>
	    <li>';
	if (!empty($version['ok'])) {
		echo '
		  <span style="color:green;">'.$version['ok'];
	}
	else {
		echo '
		  <span style="color:red;">'.$version['errors'];
	}
    $apache = function_exists('apache_get_version') ? @apache_get_version().'/' : '';
	$met    = 'MET='.@ini_get('max_execution_time');
	$ml     = 'ML='.@ini_get('memory_limit');
	$umf    = 'UMF='.@ini_get('upload_max_filesize');
	$pms    = 'PMS='.@ini_get('post_max_size');
	$mfu    = 'MFU='.@ini_get('max_file_uploads');
    echo '</span>
	    </li>
	  </ul>
    </fieldset>
    <fieldset>'.legend($admin[905]).'
	  <ul>
        <li>'.$admin[906].'&nbsp;:&nbsp;'.$apache.$php_os.' '.$php_rel.'</li>
        <li>PHP&nbsp;:&nbsp;'.phpversion().' ( <a href="admin.php?lng='.$lng.'&amp;pg=infos&amp;itact=phpinfo" target="_blank" title="'.$admin[907].'"><span style="color:#FF0000;"><strong>'.$admin[907].'</strong></span></a> )</li>
		<li>'.$met.' - '.$ml.' - '.$umf.' - '.$pms.' - '.$mfu.'</li>
	    <li>'.$admin[53].$site[3].'</li>
		<li>UA: '.$_SERVER["HTTP_USER_AGENT"].'</li>
	  </ul>
    </fieldset>';
	$pluginlist = ExploreDir('plugins/');
	if (!empty($pluginlist)) {
        echo '
    <fieldset>'.legend($admin[908]).'
	  <ul>';
        $listplugin = 'Plugins : ';
        for ($i = 0; $i < count($pluginlist); $i++) {
            include("plugins/".$pluginlist[$i]."/plugin.inc");
            echo '
        <li><a href="admin.php?lng='.$lng.'&amp;pg=plugin&amp;plug='.$plugin_admin_url.'">'.strip_tags($plugin_admin_name).'</a></li>';
            $listplugin .= ($i != 0) ? ', ' : '';
            $listplugin .= strip_tags($plugin_admin_name);
        }
        echo '
	  </ul>
    </fieldset>';
	}
    echo '
    <br />
  </div>
  <br />
  <div class="w-98 m-auto text-left overflow-auto" style="max-width:640px;">
  <hr />
  <p class="text-center"><strong>'.$admin[909].' :</strong></p>
  <hr />'.BeginJavascript().'
window.CopyToClipboard = function (rSource) {
    rSource.select();
    if(window.clipboardData){
        var r=clipboardData.setData("Text",rSource.value);
        rSource.blur();
        return 1;
    } else
        return 0;
}'.EndJavascript().'

    <textarea id="infos" rows="10" class="w-100 text-left p-2" style="max-width:620px;" 
      onfocus="if(window.CopyToClipboard(this)) alert(\''.$admin[910].'\');">
GuppY '.$version['actual'].'
'.$admin[906].'&nbsp;:&nbsp;'.$apache.$php_os.' '.$php_rel.'
PHP&nbsp;:&nbsp;'.phpversion().' / '.$met.' - '.$ml.' - '.$umf.' - '.$pms.' - '.$mfu.'
'.$admin[53].$site[3];
	if (!empty($pluginlist)) {
        echo "\n".$listplugin;
    }
    echo '
UA: '.$_SERVER["HTTP_USER_AGENT"].'
    </textarea>
  </div>';
}
?>
install.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/install.inc'
View Content
<?php
/*******************************************************************************
 *   Installer une mise à jour ou extension de GuppY
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

if (stristr($_SERVER['SCRIPT_NAME'], 'install.inc')) {
    header('location:../index.php');
    die();
}
function MakeDirectory($fulldir) {
    /// $fulldir est un chemin de répertoire relatif à la racine
    /// utiliser MakeDirectory("data/plugin/toto") et non CHEMIN."data/plugin/toto"
    $dirs    = explode('/', $fulldir);
    $currdir = '';
    foreach ($dirs as $dir) {
        $currdir .= $dir.'/';
        if (!is_dir(CHEMIN.$currdir)) {
            MakeDir(CHEMIN.$currdir);
			SetChmod(CHEMIN.$currdir);
        }
    }
    return is_dir($fulldir);
}

function RemoveDirectory($basedir) {
    /// $basedir est un chemin relatif au répertoire courant
    /// utiliser RemoveDirectory(CHEMIN."data/plugins/toto");
    if (!is_dir($basedir)) return FALSE;
    $items = scandir($basedir);
    foreach($items as $item) {
        switch ($item) {
        case '.' :
        case '..' :
            break;
        case '.htaccess' : /// bizarre mais nécessaire
        default :
            if (is_file($basedir.'/'.$item)) {
                @unlink($basedir.'/'.$item);
            } elseif (is_dir($basedir.'/'.$item)) {
                RemoveDirectory($basedir.'/'.$item);
            }
        }
    }
    usleep(1000); /// bizarre mais nécessaire
    return @rmdir($basedir);
}

if (!function_exists('parse_ini_string')) {
	function parse_ini_string($str) {
		if (empty($str)) return false;
		$lines          = explode("\n", $str);
		$ret            = Array();
		$inside_section = false;
		foreach ($lines as $line) {   
			$line = trim($line);
			if (!$line || $line[0] == "#" || $line[0] == ";") continue;	   
			if ($line[0] == "[" && $endIdx = strpos($line, "]")) {
				$inside_section = substr($line, 1, $endIdx-1);
				continue;
			}
			if (!strpos($line, '=')) continue;
			$tmp = explode("=", $line, 2);
			if ($inside_section) {
				$key   = rtrim($tmp[0]);
				$value = ltrim($tmp[1]);
				if (preg_match("/^\".*\"$/", $value) || preg_match("/^'.*'$/", $value)) {
					$value = mb_substr($value, 1, mb_strlen($value) - 2);
				}
				$t = preg_match("^\[(.*?)\]^", $key, $matches);
				if (!empty($matches) && isset($matches[0])) {
					$arr_name = preg_replace('#\[(.*?)\]#is', '', $key);
					if (!isset($ret[$inside_section][$arr_name]) || !is_array($ret[$inside_section][$arr_name])) {
						$ret[$inside_section][$arr_name] = array();
					}
					if (isset($matches[1]) && !empty($matches[1])) {
						$ret[$inside_section][$arr_name][$matches[1]] = $value;
					} else {
						$ret[$inside_section][$arr_name][] = $value;
					}
				} else {
					$ret[$inside_section][trim($tmp[0])] = $value;
				}           
			} else {	   
				$ret[trim($tmp[0])] = ltrim($tmp[1]);
			}
		}
		return $ret;
	}
}

$headinc = '
<style type="text/css">
.error { text-align: center; color: red; background-color: yellow; font-weight: bold; padding: 5px; }
.c { text-align: center; }
.b { font-weight: bold; }
.cb { text-align: center; font-weight: bold; }
.li { position: relative; }
.c1 { float: left; width: 100px; }
.c2 { float: left; width: 10px; }
.c3 { font-weight: bold; margin-left: 110px;}
.fl { float: left; }
.fr { float: right; }
.clear { clear: both; }
fieldset { padding: 8px; }
</style>';


$step = isset($_POST['step']) ? $_POST['step'] : 1;
if (!in_array($step, array(1, 2, 3))) $step = 1;

$intro = $admin[1127];

switch ($step) {
case 1 :
	$pmax      = substr(@ini_get('post_max_size'), 0, -1);
	$umax      = substr(@ini_get('upload_max_filesize'), 0, -1);
	$maxsize   = min($pmax, $umax);
    $introStep = $admin[1128];
    $content   = ($maxsize > 0 ? sprintf($admin[1444], $maxsize.'M') : 'No values set !').'
<br />
<form name="zipinst" method="post" action="admin.php?lng='.$lng.'&amp;pg=install" enctype="multipart/form-data">
<fieldset class="w-100 m-0 p-3">
<input type="hidden" name="step" value="2" />
<div class="c">'.$admin[1129].' 
  <input class="form-control w-70 mx-auto mt-2" type="file" name="filezip" accept="application/zip" />
</div>
</fieldset>
<div class="quest mt-2" style="padding:2px 20px;">
  <div class="fr">'.SubmitButton($admin[1100], '', '', $imgdroite).'</div>
  <div class="clear"></div>
</div>
</form>
';
    break;
    
case 2 :
    $introStep = $admin[1130];
    $zipfile   = trim(strip_tags($_FILES['filezip']['name']));
	$tmpname   = $_FILES['filezip']['tmp_name'];
	$zipname   = TEMPREP.$zipfile;
    $error     = '';
    $stop      = FALSE;
    if (!empty($zipfile)) {
        $extension = mb_strtolower(substr($zipfile, -4), $charset);
        if ('.zip' != $extension) {
            // Erreur : Mauvaise extension
            $content = '
<form name="zipinst" method="post" action="admin.php?lng='.$lng.'&amp;pg=install">
<fieldset class="w-100 m-0 p-0">
<input type="hidden" name="step" value="1" />
<p class="error">'.$admin[1131].'</p>
</fieldset>
<div class="quest" style="padding:2px 20px;">
  <div class="fl">'.SubmitButton($admin[1101], '', $imggauche, '', '').'</div>
  <div class="clear"></div>
</div>
</form>';
        } else {
            if ($zipname != '' && is_uploaded_file($tmpname)) {
                move_uploaded_file($tmpname, $zipname);
                $zip = new ZipArchive;
                $cr  = $zip->open($zipname);
                if (FALSE === $cr) {
                    // Echec ouverture du fichier zip
                    DestroyDBFile($zipname);
                    $content = '
<form name="zipinst" method="post" action="admin.php?lng='.$lng.'&amp;pg=install">
<fieldset class="w-100 m-0 p-0">
<input type="hidden" name="step" value="1" />
<p class="error">'.$admin[1132].'</p>
</fieldset>
<div class="quest" style="padding:2px 20px;">
  <div class="fl">'.SubmitButton($admin[1101], '', $imggauche, '').'</div>
  <div class="clear"></div>
</div>
</form>';
                } else {
                    $comment = '
<ul>
  <li>'.$admin[184].' : <strong>'.$zipfile.'</strong></li>
</ul>';
                    $cr = $zip->getArchiveComment();
                    if (FALSE !== $cr) {
						$cr = mb_check_encoding($cr, 'UTF-8') ? $cr : utf8_encode($cr);
                        $comment .= '
<ul>
  <li>'.$admin[1133].'
    <ul>
      <li><strong>'.nl2br($cr).'</strong></li>
    </ul>
  </li>
</ul>';
                    } else {
                        // Pas de commentaire
                        $comment .= '
<ul>
  <li>'.$admin[1134].'</li>
</ul>';
                    }
                    $cr = $zip->locateName('Manifest');
                    $manifest = '';
                    if (FALSE !== $cr) {
                        // Il y a un fichier 'Manifest'...
                        $manifest = '
<ul>
  <li>'.$admin[1135].'
    <ul>';
                        $str = $zip->getFromIndex($cr);
                        $datas = parse_ini_string($str, TRUE);
                        if (isset($datas['infos'])) {
                            foreach ($datas['infos'] as $key => $val) {
								$val = mb_check_encoding($val, 'UTF-8') ? $val : utf8_encode($val);
                                $manifest .= '
      <li class="li">
        <div class="c1">'.ucfirst($key).'</div><div class="c2"> : </div><div class="c3">'.nl2br($val).'</div>
      </li>';
                            }
                            $manifest .= '
    </ul>
  </li>
</ul>';
                        }
                        if (isset($datas['check']) && isset($datas['check']['type'])) {
                            $guppy_vmin = isset($datas['check']['guppy-vmin']) ? $datas['check']['guppy-vmin'] : NULL;
                            $guppy_vmax = isset($datas['check']['guppy-vmax']) ? $datas['check']['guppy-vmax'] : NULL;
                            $ok_vmin = isset($guppy_vmin) ? version_compare($guppy_vmin, MP_VERSION, '<=') : TRUE;
                            $ok_vmax = isset($guppy_vmax) ? version_compare(MP_VERSION, $guppy_vmax, '<') : TRUE;
                            $stop = !$ok_vmin;
                            $msg = !$ok_vmin ? sprintf($admin[1394], $guppy_vmin, MP_VERSION) : '';
                            $stop |= !$ok_vmax;
                            switch ($datas['check']['type']) {
                            case 'guppy-pack' :
                                $msg = !$ok_vmax ? sprintf($admin[1395], $guppy_vmax, MP_VERSION) : $msg;
                            break;
                            case 'guppy-cumul' :
                                $msg = !$ok_vmax ? sprintf($admin[1396], $guppy_vmax, MP_VERSION) : $msg;
                            break;
                            case 'guppy-non-cumul' :
                                $msg = !$ok_vmax ? sprintf($admin[1397], $guppy_vmin, MP_VERSION) : $msg;
                            break;
                            case 'plugin' :
                            case 'skin' :
                                $msg = !$ok_vmax ? sprintf($admin[1398], $guppy_vmax, MP_VERSION) : $msg;
                            break;
                            }
                        }
                        $error = '';
                        if ($stop) {
                            $error = '
<p class="error">'.$admin[1393].'<br /><br />'.$msg.'</p>';
                        }
                    }
                    $zip->close();
                    $content = '
<form name="zipinst" method="post" action="admin.php?lng='.$lng.'&amp;pg=install">
<fieldset class="w-100 m-0 p-2">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="zipname" value="'.$zipname.'" />
<p style="text-align:center;">'.$admin[1137].'</p>
<fieldset class="w-100 m-0 p-0"><legend>Informations sur le fichier ZIP</legend>
'.$comment.'
'.$manifest.'
'.$error.'
</fieldset>
<div class="quest mt-2" style="padding:2px 20px;">
  <div class="fl">'.SubmitButton($admin[1138], 'step.value=1;', $imggauche, '').'</div>';
                    if (!$stop) {
                        $content .= '
  <div class="fr">'.SubmitButton($admin[1139], '', '', $imgdroite).'</div>';
                    }
                    $content .= '
  <div class="clear"></div>
</div>
</form>';
                }
            } else {
                // Le fichier n'est pas chargé
                $content = '
<form name="zipinst" method="post" action="admin.php?lng='.$lng.'&amp;pg=install">
<fieldset class="w-100 m-0 p-0">
<input type="hidden" name="step" value="1" />
<p class="error">'.$admin[1103].'</p>
</fieldset>
<div class="quest" style="padding:2px 20px;">
  <div class="fl">'.SubmitButton($admin[1101], '', $imggauche, '').'</div>
  <div class="clear"></div>
</div>
</form>';
            }
        }
    } else {
        // Pas de nom de fichier
        header('location:admin.php?lng='.$lng.'&pg=install');
        exit;
    }
	break;

case 3 :
    // Installation des fichiers contenus dans l'archive
    $zipname = import('zipname');
    $introStep = $admin[1141];
    $msg = $errors = '';
    $zip = new ZipArchive;
    $cr  = $zip->open($zipname);
    if (FALSE === $cr) {
        // Problème à l'ouverture de l'archive
        $error = $admin[1140];
    } else {
        $cr = $zip->locateName('Manifest');
        $manifest = array();
        $excludes = array();
        if (FALSE !== $cr) {
            // Il y a un fichier 'Manifest'...
			$str = $zip->getFromIndex($cr);
			$manifest = parse_ini_string($str, TRUE);

			// Traitement des effacements préalables
			if (isset($manifest['delete'])) {
				$dirs = isset($manifest['delete']['dirs']) ? explode(' ', $manifest['delete']['dirs']) : '';
				$files = isset($manifest['delete']['files']) ? explode(' ', $manifest['delete']['files']) : '';
				$cr = '';
				if (!empty($files)) {
					foreach($files as $file) {
						if (is_file(CHEMIN.$file)) {
							@unlink(CHEMIN.$file);
							$cr .= sprintf($admin[1400], $file).(is_file(CHEMIN.$file) ? $admin[1404] : $admin[1403]);
						}
					}
				}
				if (!empty($dirs)) {
					foreach($dirs as $dir) {
						if (is_dir(CHEMIN.$dir)) {
							RemoveDirectory(CHEMIN.$dir);
							$cr .= sprintf($admin[1401], $dir).(is_dir(CHEMIN.$dir) ? $admin[1404] : $admin[1403]);
						}
					}
				}
				if (!empty($cr)) {
					$msg .= $admin[1399].$cr;
				}
			}

			// Préparation de la liste des exclusions (à ne pas installer)
			$excludes = array('Manifest');
			if (isset($manifest['script']['include'])) {
				$include = $manifest['script']['include'];
				$cr = $zip->locateName($include);
				if (FALSE === $cr) {
					// rien à inclure => pas de script
					unset($manifest['script']);
				} else {
					$datas = $zip->getFromIndex($cr);
					file_put_contents(TEMPREP.$include, $datas);
					include_once TEMPREP.$include;
					$excludes[] = $include;
				}
			}
		}

        // Installation de l'archive
        $cr  = $zip->open($zipname);
        $index = 0;
        do {
            $name = $zip->getNameIndex($index);
            if (FALSE !== $name && !in_array($name, $excludes)) {
                if ('/' == substr($name, -1, 1)) {
                    // Cas d'un répertoire
                    MakeDirectory($name);
                } else {
                    // cas d'un fichier
                    if (!is_dir(dirname(CHEMIN.$name))) {
                        MakeDirectory(dirname($name));
                    }
                    $data = $zip->getFromIndex($index);
                    if (is_file(CHEMIN.$name)) {
                        $perms = substr(sprintf('%o', fileperms(CHEMIN.$name)), -4);
                        SetChmod(CHEMIN.$name);
                        @file_put_contents(CHEMIN.$name, $data);
                        SetChmod(CHEMIN.$name, $perms);
                    } else
                        @file_put_contents(CHEMIN.$name, $data);
                }
            }
            $index++;
        } while (FALSE != $name);

        // Traitement des CHMOD (sauf sous Windows)
        if (isset($manifest['chmod']) && !defined(PHP_WINDOWS_VERSION_MAJOR)) {
            $cr = '';
            if (!empty($manifest['chmod'])) {
                foreach($manifest['chmod'] as $file => $chmod) {
                    if (is_file(CHEMIN.$file)) {
                        $bool = @chmod(CHEMIN.$file, intval($chmod, 8));
                        $cr .= sprintf($admin[1400], $file).($bool ? $admin[1403] : $admin[1405]);
                    }
                    elseif (is_dir(CHEMIN.$file)) {
                        $bool = @chmod(CHEMIN.$file, intval($chmod, 8));
                        $cr .= sprintf($admin[1401], $file).($bool ? $admin[1403] : $admin[1405]);
                    }
                }
            }
            if (!empty($cr)) {
                $msg .= $admin[1402].$cr;
            }
        }

        // Exécution du script de post-installation
        if (isset($manifest['script']['function'])) {
            if (function_exists($manifest['script']['function'])) {
                $msg .= $manifest['script']['function']($manifest);
            }
            @unlink(TEMPREP.$include);
        }
        // Nettoyage
        $zip->close();
        DestroyDBFile($zipname);
        $content = '
<form name="zipinst" method="post" action="admin.php?lng='.$lng.'&amp;pg=install">
<fieldset class="w-100 m-0 p-0">
<input type="hidden" name="step" value="1" />';
        if (!empty($msg)) {
            $content .= '
<p class="c">'.$msg.'</p>';
        }
        if (empty($error)) {
            $content .= '
<p class="cb">'.$admin[1142].'</p>';
        } else {
            $content .= '
<p class="error">'.$error.'</p>';
        }
        $content .= '
</fieldset>
<div class="quest mt-2" style="padding:2px 20px;">
  <div class="fr">'.SubmitButton($admin[1143], '', '', $imgdroite).'</div>
  <div class="clear"></div>
</div>
</form>';
    }
	break;
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[1126];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1126], '100%');
CreateDir(TEMPREP);

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=994&mnuid=937&tconfig=0#z2').$intro.'</p>
<hr />';

if (empty(trim($serviz[31]).trim($serviz[176]))) {
    echo BeginJavascript().'
alert("'.$admin[1753].'");
window.location = "admin.php?lng='.$lng.'&pg=config5";'.EndJavascript();
} 
elseif (!class_exists('ZipArchive'))
    echo '
<div style="text-align:center;padding:24px;">'.$help[19].'</div><hr />';
else
    echo '
<div class="w-100 m-auto" style="max-width:800px;">
<p class="forum" style="text-align:left; padding:5px 20px;">'.$introStep.'</p>
'.$content.'
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
links.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/links.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Links
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[20] == '') {
        $nomzone = $admin[10];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_LINKS;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[106];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1058&mnuid=937&tconfig=0#z2').'</p>'.$admin[107].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[108];
$qwrite    = $admin[109];
$qcat      = $admin[250];
$qtitre    = $admin[110];
$qcontenu  = $admin[112];
$qnouveau  = $admin[111];

include 'inc/admin.inc';
?>
liquidslider.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/liquidslider.inc'
View Content
<?php
/*******************************************************************************
 *   Text slider
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

$act   = import('act');
$tri   = import('tri');
$idls  = import('idls');
$idpg  = import('idpg');
$regit = import('regit');
$def   = import('def');

$baseurl  = CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=liquidslider';
$nbresult = 25;
$easefunc = array(
    ''=>'-- '.$admin[77].' --',
    'animate.css'=>'Animate',
    'linear'=>'Linear',
    'swing'=>'Swing',
    'easeInOutQuad'=>'Quad',
    'easeInOutCubic'=>'Cubic',
    'easeInOutQuart'=>'Quart',
    'easeInOutQuint'=>'Quint',
    'easeInOutExpo'=>'Expo',
    'easeInOutSine'=>'Sine',
    'easeInOutCirc'=>'Circ',
    'easeInOutElastic'=>'Elastic',
    'easeInOutBack'=>'Back',
    'easeInOutBounce'=>'Bounce'
);
$animeIn = array(
    'No Animate'=>'bounceInRight',
    'Seekers'=>'flash,bounce,shake,tada,swing,woobe,wiggle,pulse',
    'Fading'=>'fadeIn,fadeInUp,fadeInDown,fadeInLeft,fadeInRight,fadeInUpBig,fadeInDownBig,fadeInLeftBig,fadeInRightBig',
    'Bouncing'=>'bounceIn,bounceInDown,bouneInUp,bounceInLeft,bouceInRight',
    'Rotating'=>'rotateIn,rotateInDownLeft,rotateInDownRight,rotateInUpLeft,rotateInUpRight',
    'Lightspeed'=>'lightSpeedIn',
    'Specials'=>'hinge,rollIn'
);
$animeOut = array(
    'No Animate'=>'bounceOutRight',
    'Seekers'=>'flash,bounce,shake,tada,swing,woobe,wiggle,pulse',
    'Fading'=>'fadeOut,fadeOutUp,fadeOutDown,fadeOutLeft,fadeOutRight,fadeOutUpBig,fadeOutDownBig,fadeOutLeftBig,fadeOutRightBig',
    'Bouncing'=>'bounceOut,bounceOutDown,bouneOutUp,bounceOutLeft,bouceOutRight',
    'Rotating'=>'rotateOut,rotateOutDownLeft,rotateOutDownRight,rotateOutUpLeft,rotateOutUpRight',
    'Lightspeed'=>'lightSpeedOut',
    'Specials'=>'hinge,rollOut'
);
$direction      = array(''=>'-- '.$admin[77].' --', 'right'=>$admin[495], 'left'=>$admin[494]);
$tabshorizalign = array(''=>'-- '.$admin[77].' --', 'left'=>$admin[494], 'right'=>$admin[495], 'middle'=>$admin[397]);
$tabsvertalign  = array(''=>'-- '.$admin[77].' --', 'top'=>$admin[1583], 'bottom'=>$admin[1667]);

$strvalues = array('left','center','right','top','bottom','animate.css','linear','swing','easeInOutQuad','easeInOutCubic','easeInOutQuart',
                   'easeInOutQuint','easeInOutExpo','easeInOutSine','easeInOutCirc','easeInOutElastic','easeInOutBack','easeInOutBounce',
                   'flash','bounce','shake','tada','swing','woobe','wiggle','pulse','fadeIn','fadeInUp','fadeInDown','fadeInLeft','fadeInRight',
                   'fadeInUpBig','fadeInDownBig','fadeInLeftBig','fadeInRightBig','bounceIn','bounceInDown','bouneInUp','bounceInLeft',
                   'bouceInRight','rotateIn','rotateInDownLeft','rotateInDownRight','rotateInUpLeft','rotateInUpRight','lightSpeedIn','hinge',
                   'rollIn','fadeOut','fadeOutUp','fadeOutDown','fadeOutLeft','fadeOutRight','fadeOutUpBig','fadeOutDownBig','fadeOutLeftBig',
                   'fadeOutRightBig','bounceOut','bounceOutDown','bouneOutUp','bounceOutLeft','bouceOutRight','rotateOut','rotateOutDownLeft',
                   'rotateOutDownRight','rotateOutUpLeft','rotateOutUpRight','lightSpeedOut','rollOut','bounceInRight','bounceOutRight');

define('LSDATAREP', CHEMIN.DATAREP.'other/liquidslider/');
if (is_file(CHEMIN.'inc/lang/'.$lng.'-lsadmin.inc'))
    include CHEMIN.'inc/lang/'.$lng.'-lsadmin.inc';
else
    include CHEMIN.'inc/lang/en-lsadmin.inc';

// actions rapides
if ($act == "fast") { 
	$ids   = import('ids');
	$dbids = explode(" ", trim($ids));
	$data  = array();
	for ($ij = 0; $ij < count($dbids); $ij++) {
		$ii = $dbids[$ij];
		echo $ii;
        if (isset($_POST['a_'.$ii]) && $_POST['a_'.$ii] == 'on') {
			$data[] = array($ii, "a");
		}
        elseif (isset($_POST['i_'.$ii]) && $_POST['i_'.$ii] == 'on') {
			$data[] = array($ii, "i");
		}
        elseif (isset($_POST['d_'.$ii]) && $_POST['d_'.$ii] == 'on') {
			$data[] = array($ii, "d");
		}
	}
	unset($dbids);
	
	if (!empty($data)) {
		$lsidx = ReadDBFields(LSDATAREP.'lsindex.dtb');
		for ($i=0; $i<count($lsidx); $i++) {
			for ($j=0; $j<count($data); $j++) {
				if ($data[$j][0] == $lsidx[$i][0]) {
					$lsidx[$i][1] = $data[$j][1];
					break;
				}
			}
		}
		WriteDBFields(LSDATAREP.'lsindex.dtb', $lsidx);
		unset($lsidx);
	}
	unset($data);
	$act = 1;
}

function constructLS() {
    global $idls, $lsadmin;
    
    $def_ls = array(1=>'true','0','1500','easeInOutExpo','bounceInRight','bounceOutRight','500','500','false','right','6000',
                       'false','false','true','true','false','true','left','top','true','1');
    $lbl_ls = array(1=>'autoHeight','minHeight','slideEaseDuration','slideEaseFunction','animateIn','animateOut','fadeInDuration',
                       'fadeOutDuration','autoSlide','autoSlideDirection','autoSlideInterval','forceAutoSlide','pauseOnHover',
                       'dynamicArrows','dynamicArrowsGraphical','hideSideArrows','dynamicTabs','dynamicTabsAlign',
                       'dynamicTabsPosition','includeTitle','firstPanelToLoad');
        
    $construct = '
<link href="inc/liquidslider/css/liquid-slider.css" rel="stylesheet" />
<link href="inc/liquidslider/css/animate.css" rel="stylesheet" />
<script src="inc/liquidslider/js/jquery.liquid-slider.min.js"></script>
<script src="inc/liquidslider/js/jquery.touchSwipe.min.js"></script>
<script type="text/javascript">
$(function(){
  $(\'#lstext-'.$idls.'\').liquidSlider({';
    if (file_exists(LSDATAREP.'/lsvalues_'.$idls.INCEXT)) include LSDATAREP.'/lsvalues_'.$idls.INCEXT;
    foreach ($def_ls as $key => $value) {
        if (!empty($ls_val[$key]) && $ls_val[$key] != $value) 
            $construct .= chr(10).'    '.$lbl_ls[$key].': '.(in_array($ls_val[$key], array('true', 'false')) || 1 == preg_match('!^[0-9]!', $ls_val[$key]) ? $ls_val[$key] : '"'.$ls_val[$key].'"').',';
        if ($ls_val[15] == 'false' && $lbl_ls[$key] == 'dynamicArrowsGraphical')
            $construct .= chr(10).'    dynamicArrowLeftText: "&#171; '.$lsadmin[37].'",'.chr(10).'    dynamicArrowRightText: "'.$lsadmin[38].' &#187;",';
    }
    if ($ls_val[4] == 'animate.css') {
        $construct .= '
    callback: function() {
      var self = this;
      $(\'.lstext-'.$idls.'-panel\').each(function() {
        $(this).removeClass(\'animated \' + self.options.animateIn);
      });
    }';
    }
    $construct .= '
  });';
    if ($btnStartStop == 'true') $construct .= '
  $(\'.lstext-'.$idls.'-btn\').on(\'click\', function() {
    var api = $.data( $(\'#lstext-'.$idls.'\')[0], \'liquidSlider\'),
      text = $(this).text() === \''.$lsadmin[32].'\' ? \''.$lsadmin[33].'\' : \''.$lsadmin[32].'\';
      if (text === \''.$lsadmin[33].'\')
          api.startAutoSlide();
      else
          api.stopAutoSlide();
      $(this).text(text);
  });';
    $construct .= '
});
</script>
<style>
.ls-main, #lstext-'.$idls.'-wrapper {
  max-width: '.(empty($diaporamaWidth) ? '600px' : $diaporamaWidth.(substr($diaporamaWidth, -1) != '%' ? 'px' : '')).' !important;
  margin: auto;
}
#lstext-'.$idls.' .ls-item {
  width: 100%; '.($ls_val[1] == 'true' ? '' : (empty($ls_val[2]) ? '' : 'min-height: '.$ls_val[2].'px;')).'
  background: transparent !important;
}
.liquid-slider {
  background: '.(!empty($backgroundDiaporama) ? $backgroundDiaporama : 'transparent').' !important;
  color: '.(!empty($colorDiaporama) ? $colorDiaporama : '#000000').' !important;
}
.ls-nav { background: '.(!empty($backgroundDiaporama) ? $backgroundDiaporama : 'transparent').' !important; }
ul#lstext-'.$idls.'-nav-ul li a {
  font-weight: bold;
  background: '.(!empty($backgroundTabs) ? $backgroundTabs : 'transparent').' !important;
  color: '.(!empty($colorTabs) ? $colorTabs : '#000000').' !important;
}
ul#lstext-'.$idls.'-nav-ul li a:hover, ul#lstext-'.$idls.'-nav-ul li.current a {
  background: '.(!empty($backgroundCurrentTab) ? $backgroundCurrentTab : 'transparent').' !important;
  color: '.(!empty($colorCurrentTab) ? $colorCurrentTab : '#000000').' !important;
}
#lstext-'.$idls.' .ls-select-box select { width: 100%; font-size: 18px; font-weight: bold; }
</style>
<div class="ls-main">
  <div class="liquid-slider" id="lstext-'.$idls.'">';
    for ($n = 0; $n < $minPanels; $n++) $construct .= '
    <div class="ls-item">
      <h2 class="title">Text '.($n + 1).'</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Sed volutpat ante id mauris laoreet vestibulum. Nam blandit felis non neque cursus aliquet. Morbi vel enim dignissim massa dignissim commodo vitae quis tellus. Nunc non mollis nulla. Sed consectetur elit id mi consectetur bibendum. Ut enim massa, sodales tempor convallis et, iaculis ac massa. Etiam suscipit nisl eget lorem pellentesque quis iaculis mi mattis. Aliquam sit amet purus lectus. Maecenas tempor ornare sollicitudin.</p>
    </div>';
    $construct .= '
  </div>';
    if ($btnStartStop == 'true') $construct .= '
  <p class="text-center"><button class="lstext-'.$idls.'-btn">'.($ls_val[9] == 'true' ? $lsadmin[33] : $lsadmin[32]).'</button></p>';
    $construct .= '
</div>';

    return $construct;
}

if ($regit == 1) {
    $diaporamaTitle0 = import('diaporamaTitle0');
    $diaporamaTitle1 = import('diaporamaTitle1');
    
    if (empty($idls)) {
        $nextid = ReadCounter(LSDATAREP.'nextls.dtb');
        $nextid = empty($nextid) ? 1 : $nextid + 1;
        $lsid = array($nextid, 'a', $diaporamaTitle0, $diaporamaTitle1);
        AppendDBFields(LSDATAREP.'lsindex.dtb', $lsid);
        WriteCounter(LSDATAREP.'nextls.dtb', $nextid);
        $idls = $nextid;
    } else {
		$dbdocs = ReadDBFields(LSDATAREP.'lsindex.dtb');
		for ($i=0; $i<count($dbdocs); $i++) {
			if ($dbdocs[$i][0] == $idls) {
				$dbdocs[$i][2] = $diaporamaTitle0;
				$dbdocs[$i][3] = $diaporamaTitle1;
				break;
			}
		}
		WriteDBFields(LSDATAREP.'lsindex.dtb', $dbdocs);
    }
    
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"lsvalues_".$idls.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$diaporamaTitle0 = stripslashes(\"".$diaporamaTitle0."\");
\$diaporamaTitle1 = stripslashes(\"".$diaporamaTitle1."\");

\$diaporamaWidth = stripslashes(\"".($def == 'on' ? '600' : import('diaporamaWidth'))."\");
\$backgroundDiaporama = stripslashes(\"".($def == 'on' ? '#F2F2F2' : import('backgroundDiaporama'))."\");
\$colorDiaporama = stripslashes(\"".($def == 'on' ? '#000000' : import('colorDiaporama'))."\");
\$backgroundTabs = stripslashes(\"".($def == 'on' ? '#F2F2F2' : import('backgroundTabs'))."\");
\$colorTabs = stripslashes(\"".($def == 'on' ? '#000000' : import('colorTabs'))."\");
\$backgroundCurrentTab = stripslashes(\"".($def == 'on' ? '#F2F2F2' : import('backgroundCurrentTab'))."\");
\$colorCurrentTab = stripslashes(\"".($def == 'on' ? '#000000' : import('colorCurrentTab'))."\");
\$btnStartStop = stripslashes(\"".($def == 'on' ? 'false' : (import('btnStartStop') == 'on' ? 'true' : 'false'))."\");
\$minPanels = stripslashes(\"".($def == 'on' ? '2' : import('minPanels'))."\");

\$ls_val[1] = stripslashes(\"".($def == 'on' ? 'true' : (import('autoHeight') == 'on' ? 'true' : 'false'))."\");
\$ls_val[2] = stripslashes(\"".($def == 'on' ? '0' : import('minHeight'))."\");
\$ls_val[3] = stripslashes(\"".($def == 'on' ? '1500' : import('slideEaseDuration'))."\");
\$ls_val[4] = stripslashes(\"".($def == 'on' ? 'easeInOutExpo' : import('slideEaseFunction'))."\");
\$ls_val[5] = stripslashes(\"".($def == 'on' ? 'bounceInRight' : import('animateIn'))."\");
\$ls_val[6] = stripslashes(\"".($def == 'on' ? 'bounceOutRight' : import('animateOut'))."\");
\$ls_val[7] = stripslashes(\"".($def == 'on' ? '500' : import('fadeInDuration'))."\");
\$ls_val[8] = stripslashes(\"".($def == 'on' ? '500' : import('fadeOutDuration'))."\");
\$ls_val[9] = stripslashes(\"".($def == 'on' ? 'false' : (import('autoSlide') == 'on' ? 'true' : 'false'))."\");
\$ls_val[10] = stripslashes(\"".($def == 'on' ? 'right' : import('autoSlideDirection'))."\");
\$ls_val[11] = stripslashes(\"".($def == 'on' ? '6000' : import('autoSlideInterval'))."\");
\$ls_val[12] = stripslashes(\"".($def == 'on' ? 'false' : (import('forceAutoSlide') == 'on' ? 'true' : 'false'))."\");
\$ls_val[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('pauseOnHover') == 'on' ? 'true' : 'false'))."\");
\$ls_val[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('dynamicArrows') == 'on' ? 'true' : 'false'))."\");
\$ls_val[15] = stripslashes(\"".($def == 'on' ? 'true' : (import('dynamicArrowsGraphical') == 'on' ? 'true' : 'false'))."\");
\$ls_val[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('hideSideArrows') == 'on' ? 'true' : 'false'))."\");
\$ls_val[17] = stripslashes(\"".($def == 'on' ? 'true' : (import('dynamicTabs') == 'on' ? 'true' : 'false'))."\");
\$ls_val[18] = stripslashes(\"".($def == 'on' ? 'left' : import('dynamicTabsAlign'))."\");
\$ls_val[19] = stripslashes(\"".($def == 'on' ? 'top' : import('dynamicTabsPosition'))."\");
\$ls_val[20] = stripslashes(\"".($def == 'on' ? 'true' : (import('includeTitle') == 'on' ? 'true' : 'false'))."\");
\$ls_val[21] = stripslashes(\"".($def == 'on' ? '1' : import('firstPanelToLoad'))."\");
?>";
    WriteFullDB(LSDATAREP.'/lsvalues_'.$idls.INCEXT, $mettre);
    WriteFullDB(LSDATAREP.'/lsconstr_'.$idls.INCEXT, constructLS());
}

// chargement des données
$dbdocs = ReadDBFields(LSDATAREP.'lsindex.dtb');
$tmpi   = 0;
$tmp[0] = array();
$tmp[1] = array();
$tmp[2] = array();
$tmp[3] = array();
for ($i = 0; $i < count($dbdocs); $i++) {
	$tmp[0][$tmpi] = $dbdocs[$i][0];
	$tmp[1][$tmpi] = $dbdocs[$i][1];
	$tmp[2][$tmpi] = $dbdocs[$i][2];
	$tmp[3][$tmpi] = $dbdocs[$i][3];
	$tmpi++;
}
if (empty($idpg)) {
	$idpg = 1;
}
else {
	while ($tmpi <= ($idpg - 1)* $nbresult) $idpg--;
}
if (empty($tri)) $tri = "id";

if ($act == 1) {
    $topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $lsadmin[1]);
    include CHEMIN.'admin/hpage.inc'; 
    if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
    if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($lsadmin[1], "100%");
	echo '
<p style="text-align:center">'.ToHelp($lng, '&pg=1044&mnuid=937&tconfig=0#z2').$lsadmin[2].'<hr />'.$lsadmin[6].'</p><hr />
<div style="text-align:center">
  <a href="'.$baseurl.'&amp;tri='.$tri.'&amp;act=1">'.$lsadmin[3].'</a> || <a href="'.$baseurl.'&amp;tri='.$tri.'&amp;act=2">'.$lsadmin[4].'</a>
</div><hr />';
	if ($tmpi > 0) {
        switch ($tri) {
        case 'id' :
			$cr = array_multisort($tmp[0], SORT_NUMERIC, SORT_ASC, $tmp[1], $tmp[2], $tmp[3]);
            break;
        case '-id' :
			$cr = array_multisort($tmp[0], SORT_NUMERIC, SORT_DESC, $tmp[1], $tmp[2], $tmp[3]);
            break;
        case 'ch' :
            if ($lng == $lang[0])
                $cr = array_multisort($tmp[2], SORT_ASC, $tmp[0], $tmp[1], $tmp[3]);
            else
                $cr = array_multisort($tmp[3], SORT_ASC, $tmp[0], $tmp[1], $tmp[2]);
            break;
        case '-ch' :
            if ($lng == $lang[0])
                $cr = array_multisort($tmp[2], SORT_DESC, $tmp[0], $tmp[1], $tmp[3]);
            else
                $cr = array_multisort($tmp[3], SORT_DESC, $tmp[0], $tmp[1], $tmp[2]);
            break;
        }
		$navbar = GetNavBar($baseurl."&amp;tri=".$tri."&amp;idpg=", $tmpi, $idpg, $nbresult);
		echo '
<div class="w-100 text-center m-auto" style="max-width:840px;">'.$navbar.'
  <form name="fast_actions" action="'.$baseurl.'&amp;idpg='.$idpg.'&amp;idls='.$idls.'&amp;act=fast&amp;tri='.$tri.'" method="post">
    <div class="table-responsive-md">
	<table class="table table-bordered w-100">';
		$idup     = $tri == 'id' ? '<i class="fas fa-caret-up text-danger" style="font-size: 1.8rem;"></i>': '<i class="fas fa-caret-up" style="font-size: 1.8rem;"></i>';
		$iddown   = $tri == '-id' ? '<i class="fas fa-caret-down text-danger" style="font-size: 1.8rem;"></i>': '<i class="fas fa-caret-down" style="font-size: 1.8rem;"></i>';
		$descup   = $tri == 'ch' ? '<i class="fas fa-caret-up text-danger" style="font-size: 1.8rem;"></i>': '<i class="fas fa-caret-up" style="font-size: 1.8rem;"></i>';
		$descdown = $tri == '-ch' ? '<i class="fas fa-caret-down text-danger" style="font-size: 1.8rem;"></i>': '<i class="fas fa-caret-down" style="font-size: 1.8rem;"></i>';
		echo '
      <tr>
        <td colspan="3">
          <div style="text-align:right; padding-right:24px;">'.SubmitButton($admin[1602]).'
            <i class="fas fa-level-down-alt"></i>
          </div>
        </td>
      </tr>
	  <tr class="forum">
        <td class="text-center text-nowrap p-4" style="max-width:100px;">
	      <a href="'.$baseurl.'&amp;act=1&amp;tri=id" title="'.$admin[674].'" style="top:-1px;left:-1px;">'.$idup.'</a>
		    '.$admin[678].'
	      <a href="'.$baseurl.'&amp;act=1&amp;tri=-id" title="'.$admin[675].'" style="top:-1px;left:1px;">'.$iddown.'</a>
		</td>
        <td class="text-nowrap p-4">
	      <a href="'.$baseurl.'&amp;act=1&amp;tri=ch" title="'.$admin[676].'" style="top:-1px;left:1px;">'.$descup.'</a>
		    '.$admin[679].'
	      <a href="'.$baseurl.'&amp;act=1&amp;tri=-ch" title="'.$admin[677].'" style="top:-1px;left:1px;">'.$descdown.'</a>
		</td>
		<td>'.$admin[680].'</td>
	  </tr>';
			$ids = "";
			for ($i = $nbresult*($idpg-1); $i < Min($nbresult*$idpg, $tmpi); $i++) {
				if ($wri == $userprefs[1] && $drtuser[42] == 'redac1' && $wri != $tmp[4][$i]) continue;
				$fileid = $tmp[0][$i];
				$statut = $tmp[1][$i];
				if ($statut != "d") {
					echo '
	  <tr class="'.($i%2 == 0 ? 'rep' : 'quest').'">
	    <td class="text-center w-15" style="max-width:80px;">'.$fileid.'</td>
		<td class="text-center">
		  <span class="float-left">
			<a href="'.$baseurl.'&amp;act=2&amp;idls='.$fileid.'" title="'.$admin[144].'">
			  <i class="far fa-file-alt" title="'.$admin[33].'"></i> 
			  <span style="font-size:11pt;">'.$tmp[$lng == $lang[0] ? 2 : 3][$i].'</span>
			</a>
		  </span>
		  <span style="clear:both"></span>
		</td>
	    <td class="text-center w-15" style="max-width:80px;">';
					if ($statut == "a") {
						MakeRadioGroup(array( array("a", "i", $fileid), array("a", "d", $fileid) ));
					}
					elseif ($statut == "i") {
						MakeRadioGroup(array( array("i", "a", $fileid), array("i", "d", $fileid) ));
					}
					elseif ($status == "d") {
						MakeRadioGroup(array( array("d", "s", $fileid), array("d", "i", $fileid) ));
					}
					echo '
		</td>
	  </tr>';
					$ids .= $fileid." ";
				}
			}
			echo '
      <tr>
        <td colspan="3">
          <div style="text-align:right; padding-right:24px;">'.SubmitButton($admin[1602]).'
            <i class="fas fa-level-up-alt"></i>
          </div>
        </td>
      </tr>
	</table>
    </div>
	<input type="hidden" name="ids" value="'.$ids.'" />
  </form>
  '.$navbar.'
</div>';
	}
}

function GetSelector($padding, $label, $inputname, $color) { // Palette de couleurs
    return '
        <tr style="text-align:left;">
          <td class="align-middle" style="padding:4px 0 2px '.$padding.'px;width:55%;">&bull; '.$label.'</td>
		  <td style="padding:4px 0 2px 4px;">
			<div>
			  <input class="form-control" id="'.$inputname.'" name="'.$inputname.'" type="text" size="6" value="'.$color.'" 
                style="font:14px Arial;text-align:center;width:92px;height:29px;border:1px solid #000;border-radius:4px 0 0 4px;float:left;" />
			  <div style="float:left;width:40px;height:29px;vertical-align:top;border:1px solid #000;border-left:none;background-color:'.$color.';padding:-4px 0 4px 0;"></div>
			  <div id="'.$inputname.'div" style="float:left;width:40px;height:29px;border:1px solid #000;border-left:none;background-color:'.$color.';border-radius:0 4px 4px 0;">&nbsp;</div>
			</div>'.
			BeginJavascript()."
			$('#".$inputname."').ColorPicker({
				onSubmit: function(hsb, hex, rgb, el) {
					$(el).val('#' + hex.toUpperCase());
					$(el).ColorPickerHide();
				},
				onChange: function (hsb, hex, rgb) {
					$('#".$inputname."div').css('backgroundColor', '#' + hex);
				},
				onBeforeShow: function () {
					$(this).ColorPickerSetColor(this.value);
				}
			})
			.bind('keyup', function(){
				$(this).ColorPickerSetColor(this.value);
			});".EndJavascript().'
          </td>
        </tr>';
}

function SelectText($padding, $label, $name, $value, &$textarray) {
    $out = '
        <tr style="text-align:left;">
          <td class="align-middle w-65" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
    foreach($textarray as $key => $text) {
        $out .= '
              <option value="'.$key.'"'.Selected($value == $key).'>'.$text.'</option>';
    }
    $out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function SelectTextGroup($padding, $label, $name, $value, &$textarray) {
    $out = '
        <tr style="text-align:left;">
          <td class="align-middle w-65" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;">
            <select class="form-control" name="'.$name.'">';
    foreach($textarray as $key => $text) {
        $out .= '
              <optgroup label="'.$key.'">';
        $opts = explode(',', $text);
        foreach($opts as $opt) $out .= '
                <option value="'.$opt.'"'.Selected($value == $opt).'>'.$opt.'</option>';
        $out .= '
              </optgroup>';
    }
    $out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function InputTexte($padding, $label, $name, $value, $size) {
    return '
        <tr style="text-align:left;">
          <td class="align-middle w-65" style="padding-left:'.$padding.'px;">&bull; '.$label.'</td>
          <td style="padding:0 0 0 4px;"><input name="'.$name.'" class="form-control texte" type="text" size="'.$size.'" value="'.$value.'" /></td>
        </tr>';
}

function InputCheckbox($padding, $label, $name, $value) {
    return '
        <tr style="text-align:left;">
          <td class="align-middle w-65" style="padding:6px 0 3px '.$padding.'px;">&bull; <label for="'.$name.'">'.$label.'</label></td>
          <td style="padding:6px 0 3px 4px;"><input type="checkbox" id="'.$name.'" name="'.$name.'"'.Checked($value == 'on').' /></td>
        </tr>';
}

if ($act == 2) {
    $headinc .= '
<link rel="stylesheet" media="screen" type="text/css" href="../inc/colorpicker/css/colorpicker.css" /> 
<script type="text/javascript" src="../inc/colorpicker/js/colorpicker.js"></script>
';
    $topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="'.$baseurl.'&amp;act=1">'.str_replace('Admin - ', '', $lsadmin[1]).'</a> > '.$lsadmin[4];
    include CHEMIN.'admin/hpage.inc'; 
    if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
    if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($lsadmin[4], "100%");
    if (file_exists(LSDATAREP.'/lsvalues_'.$idls.INCEXT)) include LSDATAREP.'/lsvalues_'.$idls.INCEXT;
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1044&mnuid=937&tconfig=0#z2').$lsadmin[5].'</p>
<hr />
<div class="w-100 text-center m-auto" style="max-width:680px;">
  <fieldset class="m-0">
    <form name="retdiapo" action="'.$baseurl.'&amp;act=1" method="post">
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton(str_replace('Admin - ', '', $lsadmin[1]), '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div>
    </form>
  </fieldset>
  <fieldset class="m-0">'.legend(!empty($idls) ? $idls.' => '.($lng == $lang[0] ? $diaporamaTitle0 : $diaporamaTitle1) : $lsadmin[4]).'
    <form name="diapotext" action="'.$baseurl.'&amp;idls='.$idls.'#constructpanel" method="post">
      <input type="hidden" name="act" value="2" />
      <input type="hidden" name="regit" value="1" />
      <div class="quest" style="margin-bottom: 5px; padding:2px 20px;">
        <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
        <div style="float:right;margin-right:24px;padding-top:8px;"><label for="def">'.$lsadmin[7].'</label>
          <input type="checkbox" id="def" name="def" style="vertical-align:middle;" />
        </div>
        <div style="clear:both"></div>
      </div>
      <div class="table-responsive-md">
      <table class="table table-bordered w-90">
        '.InputTexte(32, $lsadmin[8].' '.$flag1, 'diaporamaTitle0', @$diaporamaTitle0, 30);
    if (!empty($lang[1])) echo 
        InputTexte(32, $lsadmin[8].' '.$flag2, 'diaporamaTitle1', @$diaporamaTitle1, 30);
    echo '
        '.InputTexte(32, $lsadmin[30].' (600)', 'diaporamaWidth', @$diaporamaWidth, 4).'
        '.GetSelector(32, $lsadmin[31].' (#F2F2F2)', 'backgroundDiaporama', @$backgroundDiaporama).'
        '.GetSelector(32, $lsadmin[40].' (#000000)', 'colorDiaporama', @$colorDiaporama).'
        '.GetSelector(32, $lsadmin[41].' (#F2F2F2)', 'backgroundTabs', @$backgroundTabs).'
        '.GetSelector(32, $lsadmin[42].' (#000000)', 'colorTabs', @$colorTabs).'
        '.GetSelector(32, $lsadmin[43].' (#F2F2F2)', 'backgroundCurrentTab', @$backgroundCurrentTab).'
        '.GetSelector(32, $lsadmin[44].' (#000000)', 'colorCurrentTab', @$colorCurrentTab).'
        '.InputCheckbox(32, $lsadmin[34].' ('.$admin[1604].')', 'btnStartStop', (@$btnStartStop == 'true' ? true : false)).'
        '.InputTexte(32, $lsadmin[35].' (2)', 'minPanels', @$minPanels, 4).'
      </table>
      </div>
      <hr />
      <div class="table-responsive-md">
      <table class="table table-bordered w-90">
        '.InputCheckbox(32, $lsadmin[9].' ('.$admin[1605].')', 'autoHeight', (@$ls_val[1] == 'true' ? true : false)).'
        '.InputTexte(32, $lsadmin[10].' (0)', 'minHeight', @$ls_val[2], 4).'
        '.InputTexte(32, $lsadmin[11].' (1500)', 'slideEaseDuration', @$ls_val[3], 4).'
        '.SelectText(32, $lsadmin[12], 'slideEaseFunction', @$ls_val[4], $easefunc).'
        '.SelectTextGroup(32, $lsadmin[13], 'animateIn', @$ls_val[5], $animeIn).'
        '.SelectTextGroup(32, $lsadmin[14], 'animateOut', @$ls_val[6], $animeOut).'
        '.InputTexte(32, $lsadmin[15].' (500)', 'fadeInDuration', @$ls_val[7], 4).'
        '.InputTexte(32, $lsadmin[16].' (500)', 'fadeOutDuration', @$ls_val[8], 4).'
        '.InputCheckbox(32, $lsadmin[17].' ('.$admin[1604].')', 'autoSlide', (@$ls_val[9] == 'true' ? true : false)).'
        '.SelectText(32, $lsadmin[18], 'autoSlideDirection', @$ls_val[10], $direction).'
        '.InputTexte(32, $lsadmin[19].' (6000)', 'autoSlideInterval', @$ls_val[11], 4).'
        '.InputCheckbox(32, $lsadmin[20].' ('.$admin[1604].')', 'forceAutoSlide', (@$ls_val[12] == 'true' ? true : false)).'
        '.InputCheckbox(32, $lsadmin[21].' ('.$admin[1604].')', 'pauseOnHover', (@$ls_val[13] == 'true' ? true : false)).'
        '.InputCheckbox(32, $lsadmin[22].' ('.$admin[1605].')', 'dynamicArrows', (@$ls_val[14] == 'true' ? true : false)).'
        '.InputCheckbox(32, $lsadmin[23].' ('.$admin[1605].')', 'dynamicArrowsGraphical', (@$ls_val[15] == 'true' ? true : false)).'
        '.InputCheckbox(32, $lsadmin[24].' ('.$admin[1604].')', 'hideSideArrows', (@$ls_val[16] == 'true' ? true : false)).'
        '.InputCheckbox(32, $lsadmin[25].' ('.$admin[1605].')', 'dynamicTabs', (@$ls_val[17] == 'true' ? true : false)).'
        '.SelectText(32, $lsadmin[26], 'dynamicTabsAlign', @$ls_val[18], $tabshorizalign).'
        '.SelectText(32, $lsadmin[27], 'dynamicTabsPosition', @$ls_val[19], $tabsvertalign).'
        '.InputCheckbox(32, $lsadmin[28].' ('.$admin[1605].')', 'includeTitle', (@$ls_val[20] == 'true' ? true : false)).'
        '.InputTexte(32, $lsadmin[29].' (1)', 'firstPanelToLoad', @$ls_val[21], 4).'
      </table>
      </div>
      <div class="quest" style="margin-top: 5px; padding:2px 20px;">
        <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
        <div style="float:right;margin-right:24px;padding-top:8px;"><label for="def">'.$lsadmin[7].'</label>
          <input type="checkbox" id="def" name="def" style="vertical-align:middle;" />
        </div>
        <div style="clear:both"></div>
      </div>
    </form>';
    if (!empty($idls)) echo '
    <a id="constructpanel"></a>
    <div id="lsconstruct"><hr />
      <fieldset style="margin:-6px 0 0;padding:8px 10px 0 6px;">'.legend($lsadmin[36]).'
        <textarea style="width:100%;height:320px;margin:-12px 0 6px;" onfocus="window.CopyToClipboard(this);">'.constructLS().'</textarea>
      </fieldset>
    </div>'.BeginJavascript().'
window.CopyToClipboard = function (source) {
  source.select();
  if(window.clipboardData){
    var r=clipboardData.setData("Text",source.value);
    source.blur();
    return 1;
  } else
    return 0;
}'.EndJavascript();
    echo '
    <form name="viewls" action="'.CHEMIN.'lstest.php?lng='.$lng.'&amp;tconfig=0&amp;idls='.$idls.'#z2" target="_blank" method="post">
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton(str_replace('Admin - ', '', $lsadmin[39]), '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div>
    </form>
  </fieldset>
</div>
';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
logconfig.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/logconfig.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Logbook Configuration
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[35] == '') {
        $nomzone = $admin[553];
        include 'access.inc';
        exit();
    }
}

function GetBeginFieldset($name, $title, $droits = TRUE) {
    global $admin;
    return '
    <fieldset>'.
    legend('<input type="checkbox" id="'.$name.'" name="'.$name.'" title="'.$admin[893].'" style="vertical-align:middle"'.
    Checked($droits).' onclick="selectAll(this)" /> <label for="'.$name.'">'.$title.'</label>');
}

function GetDiv($index, $label) {
    global $configlog;
    return '
      <div style="float:left; width:170px; text-align:right; padding:4px 0;">
        <label for="cfglog'.$index.'">'.$label.'</label>
        <input id="cfglog'.$index.'" type="checkbox" name="cfglog['.$index.']"'.Checked($configlog[$index]).' style="vertical-align:middle" />
      </div>';
}

function GetEndFieldset() {
    return '
      <div class="clearfix"></div>
    </fieldset>
';
}

$headinc .= BeginJavascript().'
function selectAll(opt)
{
	var allSelected = opt.checked;
	var xId = new Array(0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19);
	if (xId.length != undefined) {
		for (i = 0; i < xId.length; i++) {
			document.forms["logconfig"].elements["cfglog[" + xId[i] + "]"].checked = (allSelected ? true : false);
		}
	}
	return false;
}'.EndJavascript();


$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[1311];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1311], '100%');

if (isset($_POST['cfglogNB'])) {
    $configlogNB = $_POST['cfglogNB'];
    $configlog = isset($_POST['cfglog']) ? $_POST['cfglog'] : array();
    for ($i = 0; $i < 19; $i++) {
        if (!isset($configlog[$i])) {
            $configlog[$i] = '';
        }
    }
    include('inc/confupdt.inc');
}

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1016&mnuid=937&tconfig=0#z2').$admin[566].'></p>
<hr />';

$nblignes = array(10,25,50,75,100,150,200,250,300,400,500,750,1000);

echo '
<div class="w-100 m-auto" style="max-width:640px;">
  <form name="logconfig" action="admin.php?lng='.$lng.'&amp;pg=logconfig" method="post">
    <fieldset>
    <div class="table-responsive-md">
    <table class="table w-100 m-auto" style="max-width:250px;">
      <tr>
        <td style="padding:7px;">'.$admin[565].'</td>
        <td style="padding:7px;">
          <select class="form-control" name="cfglogNB">';
    foreach ($nblignes as $nb) {
        echo '
            <option value="'.$nb.'"'.Selected($configlogNB == $nb).'>'.$nb.'</option>';
    }
echo '
          </select>
        </td>
      </tr>
    </table>
    </div>'.
GetBeginFieldset('cfglogall', $admin[1047],
    $configlog[0] == 'on' && $configlog[1] == 'on' && $configlog[2] == 'on' &&
    $configlog[3] == 'on' && $configlog[4] == 'on' && $configlog[5] == 'on' &&
    $configlog[6] == 'on' && $configlog[7] == 'on' && $configlog[8] == 'on' &&
    $configlog[9] == 'on' && $configlog[10] == 'on' && $configlog[11] == 'on' &&
    $configlog[12] == 'on' && $configlog[13] == 'on' && $configlog[14] == 'on' &&
    $configlog[15] == 'on' && $configlog[16] == 'on' && $configlog[17] == 'on' &&
    $configlog[18] == 'on' && $configlog[19]
).
GetDiv( 0, $admin[1049]). // 0 = articles
GetDiv( 1, $admin[570]).  // 1 = dwnld
GetDiv( 2, $admin[572]).  // 2 = faq
GetDiv( 3, $admin[574]).  // 3 = forum
GetDiv( 4, $admin[573]).  // 4 = guestbk
GetDiv( 5, $admin[567]).  // 5 = accueil
GetDiv( 6, $admin[571]).  // 6 = liens
GetDiv( 7, $admin[568]).  // 7 = news
GetDiv( 8, $admin[569]).  // 8 = photo
GetDiv(10, $admin[1051]). // 10 = search
GetDiv(11, $admin[552]).  // 11 = stats
GetDiv(12, $admin[551]).  // 12 = admin
GetDiv(13, $admin[1048]). // 13 = blog
GetDiv(14, $admin[1052]). // 14 = newsletter
GetDiv(15, $admin[1053]). // 15 = news RSS
GetDiv(16, $admin[1054]). // 16 = blog RSS
GetDiv(17, $admin[1055]). // 17 = agenda
GetDiv(18, $admin[1056]). // 18 = plugins
GetDiv(19, $admin[1061]). // 19 = pages
GetEndFieldset().'

  </fieldset>
  <div class="row quest p-0 mt-2 w-100 m-auto">
    <div class="col-md-6">'.SubmitButton($admin[554], 'self.location.href=\'admin.php?lng='.$lng.'&pg=logread\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
  </div>
  </form>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
logread.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/logread.inc'
View Content
<?php
/*******************************************************************************
 *   Read Admin Logbook
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.20 (October 24, 2024) : modify script 
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[35] == '') {
        $nomzone = $admin[553];
        include 'access.inc';
        exit();
    }
}

function CutField($field, $max = 15, $more = '...') {
	global $charset;
    $len = strlen($field);
    if ($len > $max) {
        return '<acronym title="'.htmlentities($field, ENT_COMPAT, $charset).'" class="cursorHelp">'.substr($field, 0, $max).$more.'</acronym>';
    } else {
        return $field;
    }
}

$headinc .= BeginJavascript().'
function ConfirmDeleteAll(url) {
    if (confirm("'.$admin[559].'")) location.href=url;
}'.EndJavascript();

$action = import('action');

if ($action == "delall") {
    DestroyDBFile(DBLOGBOOK);
	DestroyDBFile(DBCOUNTERLOGBK);
    echo BeginJavascript().'
window.location="admin.php?lng='.$lng.'&pg=logread";'.EndJavascript();
}

$amsglog = ReadDBFields(DBLOGBOOK);

$widepage = 'on';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[1310];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1310], '100%');
echo '
<p style="text-align:center;">
  '.ToHelp($lng, '&pg=1018&mnuid=937&tconfig=0#z2').'<div class="mt-5 pt-2">'.$admin[557].' '.getIPadress($site[6] == 'on' ? (isset($_SERVER['HTTP_X_FORWARDED_FOR'])? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']): $_SERVER['REMOTE_ADDR']).'</div>
</p>';

if (empty($amsglog)) {
    echo '
<p style="text-align:center;"><i class="far fa-meh-rolling-eyes"></i><b>'.$admin[558].'</b></p>';
}
else {
    echo '
<div class="row quest p-0 mb-2 w-100 m-auto">
  <div class="col-md-6">'.SubmitButton($admin[7].' Log', 'self.location.href=\'admin.php?lng='.$lng.'&pg=logconfig\'', $imggauche, '', 'button').'</div>
  <div class="col-md-6">
    <div style="float:right">
      '.SubmitButton($admin[218], 'ConfirmDeleteAll(\'admin.php?lng='.$lng.'&amp;pg=logread&amp;action=delall\')', '', $imgdroite).'
    </div>
  </div>
</div>
<fieldset class="mx-0">'.legend(sprintf($admin[1380], min($configlogNB, count($amsglog)))).'
  <div class="table-responsive-md">
  <table class="table table-bordered w-100">
    <tr class="forum2" style="text-align:center;white-space:nowrap;height:2.5em;">
      <td class="align-middle font-weight-bold py-1 px-1 4px w-10"> '.$admin[521].' </td>
      <td class="align-middle font-weight-bold py-1 px-1 4px w-20"> '.$admin[518].' </td>
      <td class="align-middle font-weight-bold py-1 px-1 4px w-25"> '.$admin[560].' </td>
      <td class="align-middle font-weight-bold py-1 px-1 4px w-25"> '.$admin[986].' </td>
      <td class="align-middle font-weight-bold py-1 px-1 4px w-20"> '.$admin[561].' </td>
      <td class="align-middle font-weight-bold py-1 px-1 4px"> '.substr($admin[562], 0, 4).'...</td>
      <td class="align-middle font-weight-bold py-1 px-1 4px"> '.substr($admin[563], 0, 4).'...</td>
    </tr>';
    $nnav = array('netscape', 'msie', 'mozilla', 'da', 'opera', 'icab',
        'konqueror', 'robot', 'unknown', 'wget', 'avant browser', 'crazy',
        'maxthon', 'lynx', 'safari', 'seamonkey', 'psp', 'ps3', 'wii',
        'firefox', 'flock', 'iceweasel', 'chrome', 'camino', 'dillo',
        'element', 'epiphany', 'galeon', 'k-meleon', 'kazehakase', 'minifield'
        );
    $serviz[85] .= @$serviz[85][@strlen($serviz[85])] != '/' ? '/' : '';
    for ($i = count($amsglog)-1; $i >= 0; $i--) {
		if (isset($amsglog[$i][3])) {
			$imgflag = substr($amsglog[$i][3], 1 + strrpos($amsglog[$i][3], '.'));
			if (!CheckDB1Field(CHEMIN.'inc/lang/flags.inc', $imgflag, 0)) {
				$imgflag = 'unknown';
			}
		}
        else
            $imgflag = 'unknown';
 //       $xurl = str_replace('&', '&amp;', $amsglog[$i][2]);
		$xurl = rawurldecode(htmlspecialchars($amsglog[$i][2]));
        $xurl = empty($xurl) ? '&nbsp;' : '&nbsp;<a style="font-weight:normal;" href="'.$xurl.'" target="_blank" title="'.$xurl.'">'.CutField($xurl, 80).'</a>';
        $IP   = substr($amsglog[$i][1], 0, 18).(mb_strlen($amsglog[$i][1]) > 15 ? ' ...' : '');
        echo '
    <tr '.( $i % 2 ? 'class="rep"' : 'class="quest"').'">
      <td class="align-middle p-2 text-center" style="font-size:0.9em;">'.FormatDateSec($amsglog[$i][0]).'</td>
      <td class="align-middle p-2 text-center" style="font-size:0.9em;">
	    <a href="'.$serviz[85].$amsglog[$i][1].'" title="'.$amsglog[$i][1].'" target="_blank">'.$IP.'</a>
	  </td>';
	  $amsglog[$i][5] = rawurldecode(htmlspecialchars($amsglog[$i][5]));
	  $amsglog[$i][3] = rawurldecode(htmlspecialchars($amsglog[$i][3]));
	  echo '
      <td class="align-middle p-2" style="font-size:0.9em;">'.$xurl.'</td>
      <td class="align-middle p-2" style="font-size:0.9em;">'.(isset($amsglog[$i][5]) ? CutField($amsglog[$i][5], 80) : '').'</td>
      <td class="align-middle p-2" style="font-size:0.9em;">'.(isset($amsglog[$i][3]) ? CutField($amsglog[$i][3], 25) : '').'</td>
      <td class="align-middle p-2 text-center" style="font-size:0.9em;">
	    <i class="flg-'.$imgflag.'" title="'.$imgflag.'"></i>
	  </td>
      <td class="align-middle" style="font-size:0.9em;padding:0 2px;text-align:center;">';
		if (isset($amsglog[$i][4]))
			echo '
	    <i class="brw-'.$nnav[$amsglog[$i][4]].'" title="'.ucfirst($nnav[$amsglog[$i][4]]).'"></i>';
		else
			echo '
	    <i class="brw-unknown" title="Unknown"></i>';
		echo '
	  </td>
    </tr>';
    }
    echo '
  </table>
  </div>
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">'.SubmitButton($admin[7].' Log', 'self.location.href=\'admin.php?lng='.$lng.'&pg=logconfig\'', $imggauche, '', 'button').'</div>
  <div class="col-md-6">
    <div style="float:right">
      '.SubmitButton($admin[218], 'ConfirmDeleteAll(\'admin.php?lng='.$lng.'&amp;pg=logread&amp;action=delall\')', '', $imgdroite).'
    </div>
  </div>
</div>
<hr />';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
maintain.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/maintain.inc'
View Content
<?php
/*******************************************************************************
 *   Maintenance Routine
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.19 (Decembre 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[6] == '') {
        $nomzone = $admin[170];
        include 'access.inc';
        exit();
    }
}

$act    = import('act');
$see    = import('see');
$mod    = import('mod');
$modify = import('modify');

function CreateIdxArOm() {
	$aom = SelectDBFieldsByNotStatus(SelectDBFieldsByType(ReadDBFields(DOCID), TYP_OPTMENU), 'd');
	$dbw = array();
	foreach($aom as $om) {
		$fid = TestFileID($om[1]);
		if (FileDBExist(DBBASE.$fid.INCEXT)) {
			include DBBASE.$fid.INCEXT;
			$flds = explode(CONNECTOR, $lng == $lang[0] ? $fieldd1 : $fieldd2);
			$fld  = $flds[0];
			if (strpos($fld, 'articles.php') !== false) {
				$pg    = substr($fld, strpos($fld, 'pg=') + 3);
				$pos   = strpos($pg, '&');
				$pg    = $pos === false ? $pg : substr($pg, 0, $pos);
				$menus = SelectDBFieldsByField(ReadDBFields(DBMENUBOX), 4, $fieldweb);
				$pos   = strpos($fielda1, '-->');
				$flda1 = substr($fielda1, ($pos !== false ? $pos + 3 : 0));
				$pos   = strpos($fielda2, '-->');
				$flda2 = substr($fielda2, ($pos !== false ? $pos + 3 : 0));
				$pos   = strpos($menus[0][2], '-->');
				$mnus2 = substr($menus[0][2], ($pos !== false ? $pos + 3 : 0));
				$pos   = strpos($menus[0][3], '-->');
				$mnus3 = substr($menus[0][3], ($pos !== false ? $pos + 3 : 0));
				$dbw[] = array($pg, $om[1], $fieldweb, $mnus2, $mnus3, $flda1, $flda2);
			}
		}
	}
	WriteDBFields(DBARTMENU, $dbw);
}

if ($act == 'fast') {
    $dbids   = explode(' ', trim(import('ids')));
    $datas   = array();
    $dbdocid = IndexDbFieldsByField(ReadDBFields(DOCID), 1);
    $types   = array();
	$idxarom = false;
    foreach ($dbids as $id) {
        $type = @$dbdocid[$id][0];
        if (import('i_'.$id) == 'on') {
            $types[$type] = $type;
            ActionOnFields('act', array($type, $id, 'i'), FALSE);
			$idxarom = in_array($type, array(TYP_ART, TYP_MENUBOX, TYP_OPTMENU));
        }
        elseif (import('s_'.$id) == 'on') {
            $types[$type] = $type;
            ActionOnFields('sup', array($type, $id), FALSE);
			if ($type == TYP_PHOTO) {
				RecursiveRemoteDir(PHOTOREP.'gal_'.$id);
			}
            if ($type == TYP_MENUBOX) {
                $types[TYP_OPTMENU] = TYP_OPTMENU;
                $opts = SelectDBFieldsByField(ReadDBFields(DBOPTMENU), 5, $id);
                foreach ($opts as $opt) ActionOnFields('sup', array(TYP_OPTMENU, $opt[4]), FALSE);
            }
            if ($type == TYP_DDMENUBOX) {
                $types[TYP_OPTDDMENU] = TYP_OPTDDMENU;
                $opts = SelectDBFieldsByField(ReadDBFields(DBOPTDDMENU), 5, $id);
                foreach ($opts as $opt) ActionOnFields('sup', array(TYP_OPTDDMENU, $opt[4]), FALSE);
            }
        }
    }
    unset($dbids);
    foreach($types as $type) {
        ActionOnFields('reindex', array($type, 0));
    }
	if ($idxarom) CreateIdxArOm();
}
elseif (!empty($modify)) {
    $mcreadate = import('mcreadate');
    $mmoddate  = import('mmoddate');
    $mauthor   = import('mauthor');
    $memail    = import('memail');
    ReadDoc($modify);
    $data     = array_fill(0, 17, '');
    $data[0]  = $type;
    $data[1]  = $fileid;
    $data[2]  = $status;
    $data[3]  = $mcreadate;
    $data[4]  = $mmoddate;
    $data[5]  = $mauthor;
    $data[6]  = $memail;
    $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);
}

$headinc .= JavascriptFile(CHEMIN.'admin/inc/maintain.js');
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[192];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[192], '100%');

if (empty($see) && empty($mod)) {
    $dbwork = SelectDBFieldsByStatus(ReadDBFields(DOCID),'d');
    @rsort($dbwork);
	echo '
<p>'.ToHelp($lng, '&pg=990&mnuid=937&tconfig=0#z2').'</p>
<div class="text-center w-100 m-auto" style="max-width:700px;">'.$admin[221].'</div>
<hr />
<div class="w-100 m-auto text-center" style="max-width:600px;">';
    if (count($dbwork) > 0) {
        echo '
  <form name="fast_actions" action="admin.php?lng='.$lng.'&amp;pg=maintain" method="post">
    <div class="table-responsive-md">
    <table class="table table-bordered w-100 border-1">
      <tr>
        <td>
          <div style="float:right;padding-right:25px">
            '.SubmitButton($admin[1602]).' <i class="fas fa-level-down-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
    </table>
    </div>
    <input type="hidden" id="lang_maintain_js"  value="'.$admin[60].': '.mb_strtolower($admin[893], $charset).'" />
    <input type="hidden" name="act" value="fast" />
    <div class="table-responsive-md">
    <table id="tableDB" class="table table-bordered w-100 border-1">
      <tr class="forum">
        <td class="align-middle p-2">Id/Type</td>
        <td class="align-middle p-2">'.$admin[679].'</td>
        <td class="p-2 text-center">'.$admin[680].'</td>
      </tr>';
        $ids = '';
        $flng = ($lng == $lang[0]);
        $format_nextid = '%'.ceil(log10(ReadCounter(NEXTID))).'u';
        $format_fr = '%'.ceil(log10(ReadCounter(DBFORUMCOUNTER))).'u';
        for ($i = 0; $i < count($dbwork); $i++) {
            ReadDoc($dbwork[$i][1]);

            $fielda1 = strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fielda1)));
            $fielda2 = strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fielda2)));
            $fieldb1 = strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fieldb1)));
            $fieldb2 = strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fieldb2)));
            $fieldc1 = strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fieldc1)));
            $fieldc2 = strip_tags(str_replace('<!--', '', str_replace('-->', ' ', $fieldc2)));
            $champs0 = '';
            $champs1 = '';
            $champs2 = '';
            switch ($type) {
            case TYP_GUESTBK :
                $champs1 = $admin[175].$fielda1.' - ';
                $champs2 = $author;
                break;
            case TYP_BANNER :
                $champs1 = $fieldb1.' - ';
                $champs2 = $fielda1;
                break;
            case TYP_REACT :
                $champs0 = $admin[1599].Formatage($format_nextid, $fielda2).' - ';
                $champs1 = $admin[175].Formatage('%\' 2u', $fielda1).' - ';
                $champs2 = $author;
                break;
            case TYP_REBLOG :
                $champs0 = $admin[1117].Formatage($format_nextid, $fielda2).' - ';
                $champs1 = $admin[1600].Formatage('%\' 2u', $fielda1).' - ';
                $champs2 = $author;
                break;
            case TYP_NEWS :
                $champs1 = ($flng ? $fieldb1 : $fieldb2).' - ';
                $champs2 = $author;
                break;
            case TYP_MENUBOX :
            case TYP_DDMENUBOX :
            case TYP_MENUICO :
            case TYP_NWL :
            case TYP_FREEBOX :
            case TYP_SOCNET :
                $champs1 = ($flng ? $fieldb1 : $fieldb2);
                break;
            case TYP_FORUM :
                if ($fielda2 == '0') {
                    $champs1 = $admin[208].Formatage($format_fr, $fielda1).' + ';
                    $champs2 = '<b>'.$fieldb1.'</b>';
                }
                else {
                    $champs1 = $admin[208].Formatage($format_fr, $fielda1).' - ';
                    $champs2 = $admin[209].Formatage('%\' 2u', $fielda2);
                }
                break;
            case TYP_ART :
				if (substr($fieldd1, 0, 3) == 'MNU') {
					$mnu_id  = substr($fieldd1, 4);
					$fieldd1 = 'MNU';
					$boxname = '';
					$mbs     = ReadDbFields(DBMENUBOX);
					foreach ($mbs as $mb) {
						if ($mb[4] == $mnu_id) {
							$boxname = $lng == $lang[0] ? $mb[2] : $mb[3];
							break;
						}
					}
				}
				switch($fieldd1) {
				case 'MNU' :
					$champs0 = $boxname.' : ';
					break;
				case 'none' :
				default :
					$champs0 = $admin[681].' : ';
				}
                $champs1 = ($flng ? $fielda1 : $fielda2).' - ';
                $champs2 = ($flng ? $fieldb1 : $fieldb2);
                break;
            case TYP_BLOG :
                if ($serviz[54] == 'on' && $serviz[55] == 'on') {
                    if ($fieldd1 == 'right') {
                        $champs0 = $admin[353].' ';
                    }
                    else {
                        $champs0 = $admin[352].' ';
                    }
                    if (empty($fielda1)) {
                        $champs0 = $admin[681].' ';
                    }
                }
                $champs1 = ($flng ? $fielda1 : $fielda2).' - ';
                $champs2 = ($flng ? $fieldb1 : $fieldb2);
                break;
            case TYP_BRUB :
            case TYP_OPTMENU :
            case TYP_OPTDDMENU :
            case TYP_DNLOAD :
            case TYP_FAQ :
            case TYP_LINKS :
            case TYP_PHOTO :
            case TYP_RSS :
            case TYP_BSS :
                $champs1 = ($flng ? $fielda1 : $fielda2).' - ';
                $champs2 = ($flng ? $fieldb1 : $fieldb2);
                break;
            case TYP_THINK :
                $champs1 = ($flng ? $fieldb1 : $fieldb2).' - ';
                $champs2 = ($flng ? $fieldc1 : $fieldc2);
                break;
            case TYP_RECO :
                $champs1 = $fieldb1.' - ';
                $champs2 = ($flng ? $fieldc1 : $fieldc2);
                break;
            case TYP_AGENDA :
                $champs1 = $fielda1.' - ';
                $champs2 = ($flng ? $fieldc1 : $fieldc2);
                break;
            }

            echo '
      <tr '.($i %2 == 0 ? 'class="quest"' : 'class="rep"').'>
        <td style="padding:6px 4px;white-space: nowrap;"><b>'.$fileid.' - '.$type.'</b></td>
        <td style="padding:6px 4px;width:100%;text-align:left;">
          <a href="admin.php?lng='.$lng.'&amp;pg=maintain&amp;see='.$fileid.'" title="'.$admin[190].'">
            <i class="far fa-eye px-3" title="'.$admin[190].'"></i>
          </a>
          <a href="admin.php?lng='.$lng.'&amp;pg=maintain&amp;mod='.$fileid.'" title="'.$admin[33].'">
            <i class="far fa-edit px-3" title="'.$admin[33].'"></i>
          </a>
          '.$champs0.'<b>'.$champs1.'</b>'.$champs2.'
        </td>
        <td class="text-center" style="padding:6px 4px;">';
        MakeRadioGroup(array( array('d', 'i', $fileid), array('d', 's', $fileid)));
            echo '
        </td>
      </tr>';
            $ids .= $fileid.' ';
        }
        echo '
      <tr>
        <td colspan="3">
          <div style="float:right;padding-right:25px">
            '.SubmitButton($admin[1602]).' <i class="fas fa-level-up-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
    </table>
    </div>
    <input type="hidden" name="ids" value="'.$ids.'" />
  </form>';
    }
    else {
        echo '
  <p style="text-align: center;">'.$admin[854].'</p>';
    }
    echo '
</div>';
}
################################################################################
elseif (!empty($see)) {
    ReadDoc($see);
    $datecrea= FormatDate($creadate); $datemod= FormatDate($moddate);
    echo '<p>'.ToHelp($lng, '&pg=990&mnuid=937&tconfig=0#z2').'
<div class="w-100 m-auto" style="max-width:800px;">
  <div class="table-responsive-md">
  <table class="table">
    <tr>
        <td style="white-space:nowrap;">&nbsp;&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[193].'</b></td><td>'.$fileid.'</td>
    </tr>
    <tr>
        <td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[194].'</b></td><td>'.$type.'</td>
    </tr>
    <tr>
        <td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[195].'</b></td><td>'.$status.'</td>
    </tr>
    <tr>
        <td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[196].'</b></td><td>'.$datecrea.'</td>
    </tr>
    <tr>
        <td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[197].'</b></td><td>'.$datemod.'</td>
    </tr>
    <tr>
        <td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[198].'</b></td><td>'.$author.'</td>
    </tr>
    <tr>
        <td style="white-space:nowrap;">&nbsp;</td><td style="white-space:nowrap;"><b>'.$admin[199].'</b></td><td>'.$email.'</td>
    </tr>
  </table>
  </div>
  <hr />
  <br />';
    if (!empty($fielda1)) {
        echo '<fieldset><legend>FIELD A1</legend>'.$fielda1.'</fieldset>';
    }
    if (!empty($fielda2)) {
        echo '<fieldset><legend>FIELD A2</legend>'.$fielda2.'</fieldset>';
    }
    if (!empty($fieldb1)) {
        echo '<fieldset><legend>FIELD B1</legend>'.$fieldb1.'</fieldset>';
    }
    if (!empty($fieldb2)) {
        echo '<fieldset><legend>FIELD B2</legend>'.$fieldb2.'</fieldset>';
    }
    if (!empty($fieldc1)) {
        echo '<fieldset><legend>FIELD C1</legend>'.$fieldc1.'</fieldset>';
    }
    if (!empty($fieldc2)) {
        echo '<fieldset><legend>FIELD C2</legend>'.$fieldc2.'</fieldset>';
    }
    if (!empty($fieldd1)) {
        echo '<fieldset><legend>FIELD D1</legend>'.$fieldd1.'</fieldset>';
    }
    if (!empty($fieldd2)) {
        echo '<fieldset><legend>FIELD D2</legend>'.$fieldd2.'</fieldset>';
    }
    echo '
  <div class="row quest p-0 mt-2 w-100 m-auto" style="font-size:1.1rem;">
    <div class="col-md-6">'.SubmitButton($admin[191], 'self.location.href=\'admin.php?lng='.$lng.'&pg=maintain\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
  </div>
</div>';
}
################################################################################
elseif (!empty($mod)) {
    ReadDoc($mod);
    echo '
<p>'.ToHelp($lng, '&pg=990&mnuid=937&tconfig=0#z2').'</p>
<div class="w-100 m-auto mb-4" style="max-width:600px;font-size:1.1rem;">
<form name="hardmod" action="admin.php?lng='.$lng.'&amp;pg=maintain" method="post">
  <input type="hidden" name="modify" value="'.$mod.'" />
  <fieldset>
  <div class="table-responsive-md">
  <table class="table">
    <tr>
      <td class="align-middle"><b>'.$admin[193].'</b></td>
      <td>'.$fileid.'</td>
    </tr>
    <tr>
      <td class="align-middle"><b>'.$admin[194].'</b></td>
      <td>'.$type.'</td>
    </tr>
    <tr>
      <td class="align-middle"><b>'.$admin[195].'</b>
      </td><td>'.$status.'</td>
    </tr>
    <tr>
      <td class="align-middle"><b>'.$admin[196].'</b></td>
      <td><input class="form-control texte" type="text" name="mcreadate" size="20" value="'.$creadate.'" /></td>
    </tr>
    <tr>
      <td class="align-middle"><b>'.$admin[197].'</b></td>
      <td><input class="form-control texte" type="text" name="mmoddate" size="20" value="'.$moddate.'" /></td>
    </tr>
    <tr>
      <td class="align-middle"><b>'.$admin[198].'</b></td>
      <td><input class="form-control texte" type="text" name="mauthor" size="30" value="'.$author.'" /></td>
    </tr>
    <tr>
      <td class="align-middle"><b>'.$admin[199].'</b></td>
      <td><input class="form-control texte" type="text" name="memail" size="40" value="'.$email.'" /></td>
    </tr>
  </table>
  </div>
  <br />
  </fieldset>
  <div class="row quest p-0 mt-2 w-100 m-auto" style="font-size:1.1rem;">
    <div class="col-md-6">'.SubmitButton($admin[191], 'self.location.href=\'admin.php?lng='.$lng.'&pg=maintain\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
  </div>
</form>
</div>';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
maintain.js
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/maintain.js'
View Content
(function()
{
	/**
	 * addCheckBoxActionsToTable
	 * ajoute les cases à cocher des actions dans un tableau
	 * @param id string Identifiant du tableau
	 */
	function addCheckBoxActionsToTable(table, lang)
	{
		var tbody = table.getElementsByTagName("tbody")[0];
		var tr = tbody.getElementsByTagName("tr")[0];

		// Ajout de l'attribut rowspan aux cellules du groupe
		var td = tr.getElementsByTagName("td");
		for (var i = 0; i < (td.length - 1); i ++) {
			td[i].rowSpan = "2";
		}

		// Création d'une nouvelle ligne de tableau
		var newTr = document.createElement("tr");
		newTr.className = "forum";

		// Création de la cellule contenant les cases à cocher
		var tdAction = createTdAction(table, lang);

		newTr.appendChild(tdAction);
		tbody.insertBefore(newTr, tr.nextSibling);
	}

	/**
	 * createTdAction
	 * ajoute les cases à cocher des actions dans l'entête ou le pied du tableau
	 * @param table object Element représentant le tableau
	 * @param id string Identifiant des cases à cocher dans la cellule
	 */
	function createTdAction(table, lang)
	{
		var td = document.createElement('td');
		td.className = "action";
		td.noWrap = "nowrap";

		// Ajout du groupe Restaurer tout
		//addCheckboxAction(table, td, 'i', "restoreAllItems", "Restaurer tous les items", "inc/img/files/save.gif");
		addSpace(td, 7);

		// Ajout du groupe Supprimer tout
		addCheckboxAction(table, td, 's', "destroyAllItems", lang[0], "fadm-sup");

		return td;
	}

	/**
	 * addCheckboxAction
	 * Ajoute une case à cocher
	 * @param table object Tableau contenant la case à cocher
	 * @param td object Cellule du tableau contenant la case à cocher
	 * @param action string Action de la case à cocher (évènement onclick)
	 * @param id string Identifiant de la case à cocher
	 * @param title string Titre de la case à cocher
	 * @param imgPath string Chemin de l'image associée à la case à cocher
	 * @return false
	 */
	function addCheckboxAction(table, td, action, id, title, imgPath)
	{
		var checkbox = createCheckbox(id, title);
		var img = createImg(imgPath, title);
		var label = createLabel(id, img);
        img.setAttribute('class', imgPath);

		checkbox.onclick = function () {
			checkAllCheckboxByStatus(table, checkbox, action);
		}

		td.appendChild(checkbox);
		td.appendChild(label);
	}

	/**
	 * checkAllCheckboxByStatus
	 * coche toutes cases selon leur status
	 * @param table object Tableau contenant les cases à cocher
	 * @param checkbox object Case à cocher responsable de l'action
	 * @param action string Status des cases qui doivent être cochées
	 * @return false
	 */
	function checkAllCheckboxByStatus(table, checkbox, action)
	{
		var items = table.getElementsByTagName('input');

		for (var i = 2; i < items.length; i ++) {
			var itemStatus = items[i].id.substring(0, 1);
			if (itemStatus == action) {
				items[i].value = (checkbox.checked)? "on" : "";
				var img0 = items[i].nextSibling;
				var img1 = img0.nextSibling;
				img0.style.display = (checkbox.checked)? "none" : "inline-block";
				img1.style.display = (checkbox.checked)? "inline-block" : "none";
			}
		}
	}

	/**
	 * createCheckbox
	 * crée une case à cocher <input type="checkbox" />
	 * @param id string id de la case à cocher
	 * @return object case à cocher
	 */
	function createCheckbox(id, title)
	{
		var checkbox = document.createElement('input');
		checkbox.type = 'checkbox';
		checkbox.id = id;
		checkbox.name = id;
		checkbox.title = title;

		return checkbox;
	}

	/**
	 * createLabel
	 * crée un libellé <label>
	 * @param id string id de la balise <label>
	 * @param contents string contenu de la balise <label>
	 * @return object label
	 */
	function createLabel(id, contents)
	{
		var label = document.createElement('label');
		label.htmlFor = id;
		label.appendChild(contents);

		return label;
	}

	/**
	 * createImg
	 * crée une image <img />
	 * @param path string Chemin de l'image
	 * @param alt string Texte alternatif de l'image
	 * @return object image
	 */
	function createImg(path, alt)
	{
		var img = document.createElement('i');
		img.src = path;
		img.alt = alt;
		img.title = alt;

		return img;
	}

	/**
	 * addSpace
	 * ajoute un ou des espaces insécables
	 * @param parent object Element parent contenant les espaces
	 * @param nbSpace integer Nombre d'espaces
	 */
	function addSpace(parent, nbSpace)
	{
		var space = document.createTextNode(createSpace(nbSpace));
		parent.appendChild(space);
	}

	/**
	 * createSpace
	 * crée un ou des espaces insécables
	 * @param nb integer nombre d'espace insécable
	 * @return string espace insécable
	 */
	function createSpace(nb)
	{
		var space = '';
		for (var i = 0; i < nb; i ++) {
			space += String.fromCharCode(160);
		}

		return space;
	}

	/**
	 * getInfos
	 * Récupère des informations d'une page html
	 * @param id string Identifiant du champ contenant les informations à récupérer
	 * @param connector string Connecteur pour séparer les infos dans le champ
	 * @return array tableau contenant contenant les informations à récupérer
	 */
	function getInfos(id, connector)
	{
		if (document.getElementById(id)) {
			var infos = document.getElementById(id).value.split(connector);
		} else {
			var infos = new Array();
		}

		return infos;
	};

	/**
	 * addLoadListener
	 * ajoute une fonction au gestionnaire d'évènement onload
	 * @param func string nom de la fonction
	 */
	function addLoadListener(func)
	{
		if (window.addEventListener) {
			window.addEventListener("load", func, false);
		} else if (document.addEventListener) {
			document.addEventListener("load", func, false);
		} else if (window.attachEvent) {	// IE
			window.attachEvent("onload", func);
		} else if (typeof window.onload != "function") {	// Autres navigateurs
			window.onload = func;
		} else {
			var oldOnload = window.onload;
			window.onload = function()
			{
				oldOnload();
				func();
			}
		}
	}

	/**
	 * init
	 * initialisation des fonctions
	 */
	function init()
	{
		if (document.getElementById("tableDB")) {
			var table = document.getElementById("tableDB");
			var lang = getInfos("lang_maintain_js", "``");

			addCheckBoxActionsToTable(table, lang);
		}

	}

	// Exécution des fonctions
	if (document.getElementById && document.createElement && document.createTextNode) {
		addLoadListener(init);
	}

}) ();
maintenance.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/maintenance.inc'
View Content
<?php
/*******************************************************************************
 *   Admin maintenance
 *******************************************************************************
 *   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.19 August 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[11] == '') {
        $nomzone = $admin[817];
        include 'access.inc';
        exit();
    }
}

$regit = import('regit');

if ($regit == 1) {
    $user1 = import('user');
    switch ($user1) {
    case 'serviz31' : $serviz[31] = import('serviz31'); break;
    case 'serviz176' : $serviz[176] = import('serviz176'); break;
    }
    $serviz[44] = import('serviz44');
    include 'inc/confupdt.inc';

    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=maintenance";'.EndJavascript();
    }
}
include CONFIG;

if (is_file(CHEMIN.'skins/'.$page[14].'/confskin'.INCEXT)){
    include CHEMIN.'skins/'.$page[14].'/confskin'.INCEXT;
} else {
    include CHEMIN.'skins/no_skin/confskin'.INCEXT;
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', substr($admin[815], 0, -1));
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[811], '100%');

$user = ($userprefs[1] == $serviz[31] ? 'serviz31' : ($userprefs[1] == $serviz[176] ? 'serviz176' : ''));
if (!empty($user)) {
    echo '
<p class="text-center">'.ToHelp($lng, '&pg=950&mnuid=937&tconfig=0#z2').$admin[812].'</p>
<hr />
<div class="w-100 m-auto" style="max-width:560px;">
  <form name="conf4" action="admin.php?lng='.$lng.'&amp;pg=maintenance" method="post">
    <input type="hidden" name="regit" value="1" />
    <input type="hidden" name="user" value="'.$user.'" />
    <fieldset>
      <div class="row">
        <div class="col-md-12 p-4 text-center" style="font-weight:bold;">'.$admin[813].'</div>
      </div>
      <div class="w-80 m-auto">';
    if (!empty($user)) echo '
        <div class="row">
          <div class="col-md-6 pt-2">'.$admin[814].'</div>
          <div class="col-md-6">
            <input class="form-control texte" type="text" name="'.$user.'" size="20" value="'.$userprefs[1].'" readonly="readonly" />
          </div>
        </div>';
    echo '      
        <div class="row py-2">
          <div class="col-md-6"><label for="serviz44">'.$admin[815].'</label></div>
          <div class="col-md-6">
            <input type="checkbox" name="serviz44" id="serviz44" '.Checked($serviz[44]).' />
          </div>
        </div>
      </div>
    </fieldset>
    <div class="row quest p-0 w-98 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
      <div class="clearfix"></div>
    </div>
  </form>
</div>';
}
else echo '
<p class="text-center">'.$admin[847].'</p>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
members.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/members.inc'
View Content
<?php
/*******************************************************************************
 *   Zone members configuration
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[10] == '') {
        $nomzone = $admin[816];
        include 'access.inc';
        exit();
    }
}

$regit   = import('regit');
$act     = import('act');
$idpg    = import('idpg');
$del     = import('del');
$acc     = import('acc');
$susp    = import('susp');
$suppr   = import('suppr');
$group   = import('group');
$member  = import('member');
$msg1    = import('msg1');
$msg2    = import('msg2');
$msg3    = import('msg3');
$msg4    = import('msg4', 'POST', FALSE);

$usearch = import('usearch');
$search  = import('search');
$depuis  = import('depuis');
$tri     = import('tri');
$nokey   = import('nokey', 'GET', TRUE, 0);

if ($regit == 'fast') {
    $dbids = explode(' ', trim(import('ids')));
    $grps  = ReadGroups();
    $lst   = $grps[$group];
    @usort($lst, 'AsciiCompare');
    $mess = '';
    foreach ($dbids as $ii) {
        $member = $lst[$ii];
        if (isset($_POST['s_'.$ii]) && $_POST['s_'.$ii] == 'on') {
            $mess .= DelMember($group, $member) ? ucfirst($admin[928]).' '.$group.' : '.$admin[1693].' '.$member.$admin[930].' !<br />' : ucfirst($admin[1693]).' '.$member.' '.mb_strtolower($admin[1604], $charset).$admin[930].' !<br />';
        }
    }
    $act = 6;
}

if ($regit == 2) {
    include CONFIG;
    $menuico[11] = import('menuico11'); // Icône connexion
    $nom[14]     = import('nom14', 'POST', false); // Bouton Connexion langue principale
    $nom[15]     = import('nom15', 'POST', false); // Bouton connexion deuxième langue
    $nom[28]     = import('nom28', 'POST', false); // Bouton déconnexion langue principale
    $nom[29]     = import('nom29', 'POST', false); // Bouton déonnexion deuxième langue
    include('inc/confupdt.inc');
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=members&act=2";'.EndJavascript();
    }
}
if ($regit == 3) {
    include CONFIG;
    $members[19] = import('members19'); // Inscription membres on/off/mail/ok webmaster
    include('inc/confupdt.inc');
    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo BeginJavascript().'window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=members&act=2";'.EndJavascript();
    }
}
if ($regit == 4) {
    $msg = '';
    for($i=0; $i<20; $i++) {
		$upseudo = KeepGoodChars(RemoveConnector(RemoveQuote(stripslashes(CutLongWord(import('upseudo'.$i), $serviz[148])))));
        $uemail  = checkEmail(CutLongWord(import('uemail'.$i)));
        if (empty($upseudo) || mb_strtolower($upseudo) == 'admin' || empty($uemail) || is_file(MSGREP.$upseudo.DBEXT)) continue;
        if (!empty($upseudo) && is_file(MSGREP.$upseudo.DBEXT)) $msg .= '-'.$upseudo.' : '.$admin[1714];
		$dbmail  = array();
		$bad     = array('.', '..', 'index.php');
		$files   = scandir(MSGREP);
		$files   = array_diff($files, $bad);
        $ok      = true;
		foreach ($files as $file) {
			if (is_file(MSGREP.$file) && substr($file, -3) == 'dtb') {
                $userdb = ReadDBFields(MSGREP.$file);
                if ($userdb[1][3] == $uemail) {
                    $ok = false;
                    $msg .= '-'.$upseudo.' : '.$admin[1626];
                    break;
                }
			}
		}
        if (!$ok) continue;
        $uuid          = trim(import('uuid'.$i));
        $uuid          = empty($uuid) ? GenerateUID() : $uuid;
//        $cryptpass     = crypt($uuid);
		$apachepassword  = Md5Crypt::apache ($uuid, $salt ='');
		$cryptpass     = $apachepassword;
        $userdb        = array();
        $userdb[0][0]  = md5($uuid);
        $userdb[0][1]  = $cryptpass;
        $userdb[1][0]  = '0';
        $userdb[1][1]  = $lang[0];
        $userdb[1][2]  = $upseudo;
        $userdb[1][3]  = trim($uemail);
        $userdb[1][4]  = 'LR';
        $userdb[1][5]  = $lang[0];
        $userdb[1][6]  = 'on';
        $userdb[1][7]  = '';
        $userdb[1][8]  = md5($uuid);
        $userdb[1][9]  = '';
        $userdb[1][10] = '';
        $userdb[1][11] = '';
        $userdb[1][12] = 'on';
        $userdb[1][13] = 'on';
        $userdb[1][14] = GetCurrentDateTime();
        $userdb[1][15] = '';
        $userdb[1][16] = '';
        $userdb[1][17] = '';
        $userdb[1][18] = import('uusemp'.$i);
        $userdb[1][19] = import('uctmail'.$i);
        $userdb[1][20] = import('uprfmemb'.$i);
        $userdb[1][21] = import('ulstmemb'.$i);
        $userdb[1][22] = import('uavaext'.$i);
        $userdb[1][23] = import('uimgext'.$i);
        $userdb[1][24] = '';
        $userdb[1][25] = '';
        $userdb[1][26] = '';
        $userdb[1][27] = '';
        $userdb[1][28] = '';
        $userdb[1][29] = import('unobox'.$i);
        $userdb[1][30] = '';
        $userdb[1][31] = 'ok';
        if ($userprefs[1] == $serviz[31]) {
            $userdb[2][0] = $serviz[31].CONNECTOR.GetCurrentDateTime().CONNECTOR.'&nbsp; '.
            $admin[1629].' '.sprintf($admin[1630], stripslashes($site[($lang[0] == $lng ? 0 : 11)]), $upseudo).CONNECTOR.'new'.CONNECTOR.''.
                CONNECTOR.''.CONNECTOR.''.CONNECTOR.$serviz[43].CONNECTOR.substr($page[23], 4);
        }
        if ($userprefs[1] == $serviz[176]) {
            $userdb[2][0] = $serviz[176].CONNECTOR.GetCurrentDateTime().CONNECTOR.'&nbsp; '.
            $admin[1629].' '.sprintf($admin[1630], stripslashes($site[($lang[0] == $lng ? 0 : 11)]), $upseudo).CONNECTOR.'new'.CONNECTOR.''.
                CONNECTOR.''.CONNECTOR.''.CONNECTOR.$serviz[43].CONNECTOR.substr($page[23], 4);
        }
        WriteDBFields(MSGREP.$upseudo.DBEXT, $userdb);
        $adrimg = $skn_logo != '' ? $skn_logo : CHEMIN.'img/'.mb_substr($page[4], mb_strpos($page[4], '|'));
        $tconf  = $serviz[172] == 'ALL' ? 0 : $serviz[172];
        while ('../' == substr($adrimg, 0, 3)) $adrimg = substr($adrimg, 3);
        $to    = $uemail;
        $sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[1631];
        $bodycorps  = '<div style="margin:auto;padding:8px;width:600px;border: solid 1px #000000;border-radius:4px;">';
        $bodycorps .= '<p style="text-align:center;"><img src="'.$site[3].$adrimg.'" style="max-width:600px;" /></p><hr />';
        $bodycorps .= '<p style="text-align:left;font:12pt Arial;">';
        $bodycorps .= $admin[1632].sprintf($admin[1633], $upseudo, stripslashes($site[($lang[0] == $lng ? 0 : 11)])).'<br /><br />';
        $bodycorps .= $admin[1013].' <b>'.$upseudo.'</b><br />'.$admin[1634].' : <b>'.$uuid.'</b><br /><br />';
        $bodycorps .= $admin[1635];
        $bodycorps .= '<a href="'.$site[3].($site['URLR'] == 'on'? $lng.'-'.$urlrw[3].'-4-'.$upseudo.'-'.$uuid.'-'.$tconf : 'connect.php?lng='.$lng.'&pseudo='.$upseudo.'&uid='.$uuid.'&tconfig='.$tconf).'">'.stripslashes($site[($lang[0] == $lng ? 0 : 11)]).'</a><br />';
        $bodycorps .= $admin[1760].'<br />'.$user[0].'<br />';
        $bodycorps .= '</p></div>';
        eMailHtmlTo($sujet, $bodycorps, $to);			
        $sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[1631];
        $bodycorps  = $admin[1629].' '.$user[0].'<br /><br />';
        $bodycorps .= $admin[1631].' : <b>'.$upseudo.'</b> '.stripslashes($site[($lang[0] == $lng ? 0 : 11)]).'<br /><br />';
        $bodycorps .= $admin[518].' '.getIPadress($site[6] == 'on' ? (isset($_SERVER['HTTP_X_FORWARDED_FOR'])? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']): $_SERVER['REMOTE_ADDR']).'<br /><br />';
        $to    = $user[1];
        eMailHtmlTo($sujet, $bodycorps, $to);
    }
    echo '<script>window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=members&act=2&msg='.$msg.'";</script>';
}

include CONFIG;
if (is_file(CHEMIN.'skins/'.$page[14].'/confskin'.INCEXT)){
    @include CHEMIN.'skins/'.$page[14].'/confskin'.INCEXT;
} else {
    @include CHEMIN.'skins/no_skin/confskin'.INCEXT;
}

if ($act == 3)
	$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
    var lng2   = "'.$lang[1].'";

    var m1 = document.membmsg.msg1.value;
    if (m1.length < 3) {
        sto += "  - '.addslashes($admin[1692].$admin[1177]).'\n";
		document.membmsg.msg1.className = "errorInputText";
        erreur = true;
    }
    if (erreur == true) {
        sto = "'.addslashes($admin[1695]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

$err_msg1 = empty($msg1) && $regit == 4 ? true: false;
$err_msg2 = empty($msg2) && $regit == 4 && $lang[1] != '' ? true: false;
$erreur  = '';
$erreur .= $err_msg1 ? '<li>'.$admin[1692].$admin[1177].'</li>': '';
$erreur .= $err_msg2 ? '<li>'.$admin[1692].$admin[1178].'</li>': '';
if (!empty($erreur) && $act == 4 && $regit == 4) $act = 3;

include_once CHEMIN.'inc/func_groups.php';

function InputSelectGroups($name, $value) {
    global $admin, $dbgroups;
    $out = '
          <select name="'.$name.'">
            <option value=""> -- '.$admin[1604].' -- </option>
			<option value="all_members"'.Selected('all_members' == $value).'>'.$admin[690].'</option>';
    foreach ($dbgroups as $dbgroup) {
        $out .= '
            <option value="'.$dbgroup[0].'"'.Selected($dbgroup[0] == $value).'>'.$dbgroup[0].'</option>';
    }
    $out .= '
          </select>';
    return $out;
}

################################################################################
// gestion membres
if ($act == 2) {
	$deladmins = array();
	
	function DeleteRedac($redacname) {
		global $deladmins;
		$dbredac    = array();
		$file_redac = opendir(REDACREP);
		while ($nomfichier = readdir($file_redac)) {
			if( substr($nomfichier, -3) == 'inc' ) {
				$dbredac[] = str_replace(substr($nomfichier, -4), '', $nomfichier);
			}
		}
		closedir($file_redac);
		foreach ($dbredac as $redac) {
			if ($redac == $redacname) {
				DestroyDBFile(REDACREP.$redacname.'.inc');
				$deladmins[] = $redacname;
				break;
			}
		}
	}
	
    if (!empty($del)) {
        DeleteMemberProtect($del);
        DestroyMemberCol($del);
        DestroyMember($del);
        DestroyDBFile(MSGREP.$del.DBEXT);
        DestroyDBFile(COUNTMSGREP.$del.DBEXT);
		DeleteRedac($del);
    }
    if (!empty($acc)) {
		$userdb        = ReadDBFields(MSGREP.$acc.DBEXT);
		$uuid          = $userdb[0][0];
		$okmail        = $uuid != $userdb[1][8];
		$userdb[0][0]  = $uuid == $userdb[1][8] ? $userdb[1][8] : md5($uuid);
		$userdb[1][31] = 'ok';
		WriteDBFields(MSGREP.$acc.DBEXT, $userdb);
		if ($okmail) {
			$to    = $userdb[1][3];
			$sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[1696];
			$bodycorps  = $admin[1632].sprintf($admin[1697], $acc, stripslashes($site[($lang[0] == $lng ? 0 : 11)])).'<br /><br />';
			$bodycorps .= $admin[1013].' '.$acc.'<br />'.$admin[1634].' : ???<br />'.$admin[1698];
			$bodycorps .= '<a href="'.$site[3].'index.php?lng='.$lng.'">'.stripslashes($site[($lang[0] == $lng ? 0 : 11)]).'</a><br />';
			$bodycorps .= $admin[1760].'<br />'.$user[0].'<br />';
			eMailHtmlTo($sujet,$bodycorps,$to);
		}
    }
	if (!empty($susp) && $susp != $userprefs[1]) {
		$userdb = ReadDBFields(MSGREP.$susp.DBEXT);
		$userdb[1][13] = ($userdb[1][13] == 'on' ? 'off' : 'on');
		WriteDBFields(MSGREP.$susp.DBEXT, $userdb);
        $to = $userdb[1][3];
		if ($userdb[1][13] == 'on') {
            $sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[696];
            $bodycorps  = $admin[1629].sprintf($admin[852], $susp, stripslashes($site[($lang[0] == $lng ? 0 : 11)])).'<br /><br />';
            $bodycorps .= '<a href="'.$site[3].'index.php?lng='.$lng.'">'.stripslashes($site[($lang[0] == $lng ? 0 : 11)]).'</a><br />';
            eMailHtmlTo($sujet, $bodycorps, $to);
		}
		else {
            $sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[696];
            $bodycorps  = $admin[1629].sprintf($admin[1136], $susp, stripslashes($site[($lang[0] == $lng ? 0 : 11)])).'<br /><br />';
            $bodycorps .= $admin[1699].'<br />'.$user[($lang[0] == $lng ? 0 : 11)].'<br />';
            eMailHtmlTo($sujet, $bodycorps, $to);
		}
        unset($susp);
        echo '<script>window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=members&act=2#tblmemb";</script>';
	}
	if ($suppr == 'ok') {
        if (!empty($depuis)) {
            $datesup    = date('Ymd', time() - ($depuis * 24 * 3600));
            $file_users = opendir(MSGREP);
            set_time_limit(0);
            while ($nomfichier = readdir($file_users)) {
                if (substr($nomfichier, -3) == 'dtb') {
                    $pseudo = str_replace(substr($nomfichier, -4), '', $nomfichier);
                    if ($pseudo != $userprefs[1]) {
                        $userdb = ReadDBFields(MSGREP.$nomfichier);
                        $to     = $userdb[1][3];
                        $ok1    = substr($userdb[1][15], 0, 8) > substr($userdb[1][14], 0, 8);
                        $del    = $ok1 ? substr($userdb[1][15], 0, 8) < $datesup : substr($userdb[1][14], 0, 8) < $datesup;
                        if ($del) {
                            DestroyDBFile(MSGREP.$nomfichier);
                            DeleteRedac($pseudo);
                        }
                    }
                }
            }
            closedir($file_users);
        }
	}
	if (!empty($deladmins)) {
		$deladmins = array_unique($deladmins);
		$admins    = ReadDBFields(ADMINS);
		$dbadmin   = array();
		foreach ($admins as $adm) {
			foreach ($deladmins as $del) {
				if ($adm[0] != $del) $dbadmin[] = $adm;
			}
		}
		WriteDBFields(ADMINS, $dbadmin);
	}
	unset($deladmins);
    $dbusers = array();
    $file_users = opendir(MSGREP);
    while ($nomfichier = readdir($file_users)) {
        if (substr($nomfichier, -3) == 'dtb') {
			$pseudo = str_replace(substr($nomfichier, -4), '', $nomfichier);
			if ($pseudo == $userprefs[1]) {
				$dbusers[] = array('pseudo' => $pseudo, 'ok' => 'on', 'reg' => $userprefs[13], 'date' => $userprefs[14], 
                                   'mail' => $userprefs[2], 'status' => $userprefs[30], 'web' => $userprefs[9], 'rgpd' => $userprefs[27]);
			} else {
				$userdb = ReadDBFields(MSGREP.$nomfichier);
				if (isset($userdb[1][13])) {
					$userdb[1][31] = empty($userdb[1][31]) ? '0' : $userdb[1][31];
					$dbusers[] = array('pseudo' => $pseudo, 'ok' => $userdb[1][13], 'reg' => $userdb[1][14], 'date' => $userdb[1][15], 
                                       'mail' => $userdb[1][3], 'status' => $userdb[1][31], 'web' => $userdb[1][10], 'rgpd' => $userdb[1][28]);
				}
			}
        }
    }
    closedir($file_users);
	sort($dbusers);
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[696];
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[696], '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=978&mnuid=937&tconfig=0#z2').$admin[701].$admin[700].'<br /></p>
<hr /><br />
<div style="z-index:999;background:#EFEFEF;">
  <fieldset id="newmembers" style="display:none;width:100%;height:1480px;margin:0 auto 36px;">
    <p style="padding:0 36px;text-align:center;">'.$help[27].'</p>
    <i class="fas fa-times text-danger float-right c-pointer" style="font-size:1.4rem;margin:-70px 6px 0 0;" 
      title="'.$admin[458].'" onmouseup="cache(\'newmembers\');"></i>
    <form name="membconnect" action="admin.php?lng='.$lng.'&amp;pg=members" method="post">
      <input type="hidden" name="regit" value="4" />
      <div class="table-responsive-md">
      <table class="table table-bordered w-100" style="max-height:700px;">
        <tr>
          <td style="border:1px solid #000;text-align:center;width:13%;vertical-align:middle;">'.$admin[1013].'</td>
          <td style="border:1px solid #000;text-align:center;width:12%;vertical-align:middle;">'.$admin[1634].'</td>
          <td style="border:1px solid #000;text-align:center;width:19%;vertical-align:middle;">'.$admin[1646].'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.sprintf($admin[1637], '').'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.sprintf($admin[1638], '').'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.sprintf($admin[1639], '').'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.sprintf($admin[1640], '').'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.$admin[1641].'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.$admin[1642].'</td>
          <td style="border:1px solid #000;text-align:center;width:8%;vertical-align:middle;">'.$admin[1643].'</td>
        </tr>';
    for ($i=0;$i<20;$i++) {
        echo '
        <tr>
          <td style="width:13%;vertical-align:middle;"><input type="text" class="form-control texte" name="upseudo'.$i.'" style="width:130px;" /></td>
          <td style="width:12%;vertical-align:middle;"><input type="text" class="form-control texte" name="uuid'.$i.'" style="width:120px;" /></td>
          <td style="width:19%;vertical-align:middle;"><input type="text" class="form-control texte" name="uemail'.$i.'" style="width:190px;" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="uusemp'.$i.'" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="uctmail'.$i.'" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="uprfmemb'.$i.'" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="ulstmemb'.$i.'" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="uavaext'.$i.'" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="uimgext'.$i.'" /></td>
          <td style="width:8%;text-align:center;vertical-align:middle;"><input type="checkbox" name="unobox'.$i.'" /></td>
        </tr>';
    }
    echo '
      </table>
      </div>
      <p style="text-align:center;">'.SubmitButton($admin[38]).'</p>
    </form>';
    echo '
  </fieldset>
</div>';

    $msg = import('msg');
    if (!empty($msg)) {
        $msg = str_replace('-', '<br />- ', $msg);
        echo '
<div class="modal fade" id="myModal" role="dialog">
  <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title">'.$admin[20].'</h2>
        <button class="close" data-dismiss="modal" type="button">×</button>
      </div>
      <div class="modal-body">
        <p>'.$msg.'</p>
      </div>
    </div>
  </div>
</div>
        ';
        unset($msg);
    }

    echo '
<div class="w-100 my-0 mx-auto p-0" style="max-width:968px;">
  <div style="border:0;margin:-20px 0px 10px -10px;">
    <fieldset class="w-98 float-left" style="max-width:424px;height:auto;">
      <form name="membconnect" action="admin.php?lng='.$lng.'&amp;pg=members" method="post">
        <input type="hidden" name="regit" value="2" />
        <input type="hidden" name="act" value="2" />
        <div class="table-responsive-md">
        <table class="table table-bordered m-auto text-center" style="max-width:400px;">
          <tr>
	        <td colspan="2" style="text-align:center;">
              <label for="menuico11"><strong>'.$admin[703].'</strong></label>
              <input id="menuico11" name="menuico11" type="checkbox" '.Checked($menuico[11]).' />
	        </td>
          </tr>
          <tr class="rep">
            <td class="w-35" style="vertical-align:middle; text-align:center;">'.$admin[704].'</td>
            <td class="w-65">
              <div>
                '.($lang[1] != '' ? '<div class="d-inline-block">'.$flag1.'</div>' : '').'
	            <div class="d-inline-block">
                  <input class="form-control texte" type="text" name="nom14" value="'.$nom[14].'" size="20" />
                </div>
              </div>'.($lang[1] != '' ? '
              <div>
                <div class="d-inline-block">'.$flag2.'</div>
	            <div class="d-inline-block">
    	          <input class="form-control texte" type="text" name="nom15" value="'.$nom[15].'" size="20" />
                </div>
              </div>' : '').'
	        </td>
          </tr>
          <tr class="rep">
            <td style="vertical-align:middle;text-align:center;">'.$admin[705].'</td>
            <td>
              <div>
                '.($lang[1] != '' ? '<div class="d-inline-block">'.$flag1.'</div>' : '').'
	            <div class="d-inline-block">
                  <input class="form-control texte" type="text" name="nom28" value="'.$nom[28].'" size="20" />
                </div>
              </div>'.($lang[1] != '' ? '
              <div>
                <div class="d-inline-block">'.$flag2.'</div>
                <div class="d-inline-block">
	              <input class="form-control texte" type="text" name="nom29" value="'.$nom[29].'" size="20" />
                </div>
              </div>' : '').'
	        </td>
          </tr>
          <tr><td colspan="2" style="text-align:center;">'.SubmitButton($admin[38]).'</td></tr>
        </table>
        </div>
      </form>
    </fieldset>
    <fieldset class="w-98 mr-0 float-right" style="max-width:514px;">
      <form name="membnew" action="admin.php?lng='.$lng.'&amp;pg=members" method="post">
        <input type="hidden" name="regit" value="3" />
        <input type="hidden" name="act" value="2" />
        <div style="text-align:center;">
          <div class="d-inline-block"><strong>'.$admin[1283].' :&nbsp;</strong></div>
          <div class="d-inline-block">
            <select class="form-control" name="members19" onchange="javascript:membnew.submit();">
              <option value = ""'.Selected($members[19] == "").'>'.$admin[1300].'</option>
              <option value = "0"'.Selected($members[19] == "0").'>'.$admin[1301].'</option>
              <option value = "1"'.Selected($members[19] == "1").'>'.$admin[1302].'</option>
              <option value = "2"'.Selected($members[19] == "2").'>'.$admin[1303].'</option>
              <option value = "3"'.Selected($members[19] == "3").'>'.$admin[1277].'</option>
            </select>
          </div>
        </div>
      </form>
      <form name="newmember" action="admin.php?lng='.$lng.'&amp;pg=compte&amp;uuser=new" method="post">
        <p style="text-align:center;">'.SubmitButton($admin[1278]).'</p>
      </form>';
    if ($userprefs[1] == $serviz[31] || $userprefs[1] == $serviz[176]) echo '
      <p style="text-align:center;">'.SubmitButton($admin[1763], 'montre(\'newmembers\');').'</p>';
    echo '
    </fieldset>
  </div>';
	$nbdb = count($dbusers);
	echo '
  <a id="lstmemb"></a>
  <fieldset class="w-100 m-0 mt-2 mr-2 p-0">'.legend(sprintf($admin[1428], $nbdb)).'
	<fieldset style="border:0;margin:0 0 -10px;">
      <div class="table-responsive-md">
      <table class="table table-bordered w-100">
        <tr>
          <td class="w-50">
            <fieldset>'.legend($admin[1429]).'
              <form name="searchname" method="post" action="admin.php?lng='.$lng.'&amp;pg=members#lstmemb">
                <input type="hidden" name="search" value="ok" />
                <input type="hidden" name="act" value="2" />
                <div class="w-100 m-auto text-center pr-3">
                  '.$admin[517].' / '.$admin[199].'
                  <input type="text" class="form-control texte" name="usearch" value="'.$usearch.'" size="36" />
                </div>
                <div style="margin:auto;text-align:center;">
                  '.SubmitButton($admin[1700]).'
                </div>
              </form>';
    if (!empty($usearch)) {
        $nm = $nokey - 1;
        $np = $nokey + 1;
        echo '
              <div style="text-align:center;margin:auto;margin-top:-3px;">
                <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;search=ok&amp;act=2&amp;usearch='.$usearch.'&amp;nokey='.($nm).'#lstmemb" title="">
                  <b>'.$admin[1701].'</b>
                </a>&nbsp;&nbsp;
                <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;search=ok&amp;act=2&amp;usearch='.$usearch.'&amp;nokey='.($np).'#lstmemb" title="">
                  <b>'.$admin[1702].'</b>
                </a>
              </div>';
    }
    echo '
            </fieldset>
          </td>
          <td class="w-50">
            <fieldset>'.legend($admin[1463]).'
              <form name="membersup" method="post" action="admin.php?lng='.$lng.'&amp;pg=members#lstmemb">
                <input type="hidden" name="suppr" value="ok" />
                <input type="hidden" name="act" value="2" />
                <div style="margin:auto;text-align:center;">
                  '.$admin[1376].' : <input type="text" class="form-control w-100 mx-auto texte" name="depuis" style="max-width:64px;" />
                  '.SubmitButton(ucfirst($admin[31])).'
                </div>
              </form>
            </fieldset>
          </td>
        </tr>
      </table>
      </div>
	</fieldset>';
    if (empty($idpg)) {
        $idpg = 1;
    }
    else {
        while ($nbdb <= ($idpg - 1)* $serviz[75]) $idpg--;
    }
	if (empty($tri)) $tri = 'P';
	$tmpi   = 0;
	$tmp[0] = array();
	$tmp[1] = array();
	$tmp[2] = array();
	$tmp[3] = array();
	$tmp[4] = array();
	$tmp[5] = array();
	$tmp[6] = array();
	$tmp[7] = array();
	$tmp[8] = array();
	for ($i = 0; $i < $nbdb; $i++) {
		$tmp[0][$tmpi] = strtolower($dbusers[$i]['pseudo']);
		$tmp[1][$tmpi] = $dbusers[$i]['ok'];
		$tmp[2][$tmpi] = $dbusers[$i]['reg'];
		$tmp[3][$tmpi] = $dbusers[$i]['date'];
		$tmp[4][$tmpi] = $dbusers[$i]['mail'];
		$tmp[5][$tmpi] = $dbusers[$i]['status'];
		$tmp[6][$tmpi] = $dbusers[$i]['pseudo'];
		$tmp[7][$tmpi] = $dbusers[$i]['web'];
		$tmp[8][$tmpi] = $dbusers[$i]['rgpd'];
		$tmpi++;
	}
	if ($nbdb > 0 ) {
        switch ($tri) {
        case 'P' :
			$cr = array_multisort($tmp[0], SORT_ASC, $tmp[1], $tmp[2], $tmp[3], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case '-P' :
			$cr = array_multisort($tmp[0], SORT_DESC, $tmp[1], $tmp[2], $tmp[3], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case 'R' :
			$cr = array_multisort($tmp[2], SORT_ASC, $tmp[0], $tmp[1], $tmp[3], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case '-R' :
			$cr = array_multisort($tmp[2], SORT_DESC, $tmp[0], $tmp[1], $tmp[3], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case 'C' :
			$cr = array_multisort($tmp[3], SORT_ASC, $tmp[0], $tmp[1], $tmp[2], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case '-C' :
			$cr = array_multisort($tmp[3], SORT_DESC, $tmp[0], $tmp[1], $tmp[2], $tmp[4], $tmp[5], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case 'E' :
			$cr = array_multisort($tmp[5], SORT_ASC, $tmp[0], $tmp[1], $tmp[2], $tmp[3], $tmp[4], $tmp[6], $tmp[7], $tmp[8]);
            break;
        case '-E' :
			$cr = array_multisort($tmp[5], SORT_DESC, $tmp[0], $tmp[1], $tmp[2], $tmp[3], $tmp[4], $tmp[6], $tmp[7], $tmp[8]);
            break;
		}
        $spseudo = '';
		if ($search == 'ok' && !empty($usearch)) {
            $keys = array();
            $pseudos = array();
			for ($ii = 0; $ii < $nbdb; $ii++)
				if (strpos($tmp[0][$ii], strtolower($usearch)) !== false || strpos($tmp[4][$ii], trim($usearch)) !== false) {
					$keys[]    = $ii;
					$pseudos[] = $tmp[0][$ii];
				}
            $nokey   = min($nokey, count($keys));
            $nokey   = $nokey == count($keys) ? 0 : $nokey;
			if (isset($keys[$nokey])) $key     = $keys[$nokey];
			else  $key     = 0;
			if (isset($pseudos[$nokey])) $spseudo = $pseudos[$nokey];
			else
				$spseudo = '';
			$idpg    = floor($key / $serviz[75]) + 1;
		}
		$pseudoup    = $tri == 'P' ? '<i class="fas fa-angle-up text-danger" style="font-size: 1.4rem;"></i>' : '<i class="fas fa-angle-down" style="font-size: 1.4rem;"></i>';
		$pseudodown  = $tri == '-P' ? '<i class="fas fa-angle-down text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$regup       = $tri == 'R' ? '<i class="fas fa-angle-up text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$regdown     = $tri == '-R' ? '<i class="fas fa-angle-down text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$connectup   = $tri == 'C' ? '<i class="fas fa-angle-up text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$connectdown = $tri == '-C' ? '<i class="fas fa-angle-down text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$stateup     = $tri == 'R' ? '<i class="fas fa-angle-up text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$statedown   = $tri == '-R' ? '<i class="fas fa-angle-down text-danger"></i>' : '<i class="fas fa-angle-down"></i>';
		$navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;tri='.$tri.'&amp;idpg=', $nbdb, $idpg, $serviz[75]);
		echo $navbar.'
    <br />
    <a id="tblmemb"></a>
    <div class="table-responsive-md">
    <table class="table table-bordered w-100 m-auto">
      <tr style="background-color:#bababa;height:64px;">
        <td style="width:25%;text-align:center;vertical-align:middle;">
		  <div>
            <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;tri='.($tri == 'P' ? '-P' : 'P').'&amp;idpg='.$idpg.'#lstmemb" title="'.$admin[517].'">
		      <b>'.$admin[517].'</b>'.($tri == 'P' ? $pseudoup : $pseudodown).'
            </a><b> / '.$admin[1014].'</b>
		  </div>
		</td>
        <td style="width:17%;text-align:center;vertical-align:middle;"><div><b>'.ucfirst($admin[928]).'</b></div></td>
        <td style="width:13%;text-align:center;vertical-align:middle;">
		  <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;tri='.($tri == 'R' ? '-R' : 'R').'&amp;idpg='.$idpg.'#lstmemb" title="'.$admin[1462].'">
		    <div><b>'.$admin[1462].'</b></div><div>'.($tri == 'R' ? $regup : $regdown).'</div>
		  </a>
		</td>
        <td style="width:14%;text-align:center;vertical-align:middle;">
		  <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;tri='.($tri == 'C' ? '-C' : 'C').'&amp;idpg='.$idpg.'#lstmemb" title="'.$admin[1664].'">
		    <div><b>'.$admin[1664].'</b></div><div>'.($tri == 'C' ? $connectup : $connectdown).'</div>
		  </a>
		</td>
        <td style="width:11%;text-align:center;vertical-align:middle;"><div><b>'.$admin[1757].'</b></div></td>
        <td style="width:8%;text-align:center;vertical-align:middle;"><div><b>'.$admin[186].'</b></div></td>
        <td style="width:6%;text-align:center;vertical-align:middle;">
		  <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;tri='.($tri == 'E' ? '-E' : 'E').'&amp;idpg='.$idpg.'#lstmemb" title="'.$admin[851].'">
		    <div><b>'.$admin[851].'</b></div><div>'.($tri == 'E' ? $stateup : $statedown).'</div>
		  </a>
		</td>
        <td style="width:6%;text-align:center;vertical-align:middle;"><div><b>'.$admin[1019].'</b></div></td>
      </tr>';	
		$grps = ReadGroups();
		for ($i = $serviz[75]*($idpg-1); $i < Min($serviz[75]*$idpg, $tmpi); $i++) {
			$alt = $tmp[5][$i] == '1' || $tmp[5][$i] == '2' ? '?' : ($tmp[1][$i] == 'on' ? $admin[1021] : $admin[1020]);
			$img = $tmp[5][$i] == '1' || $tmp[5][$i] == '2' 
              ? '<i class="fas fa-question text-warning" style="font-size: 1.4rem;"></i>' 
              : ($tmp[1][$i] == 'off' 
                ? '<i class="fas fa-toggle-off text-danger" style="font-size: 1.4rem;"></i>' 
                : '<i class="fas fa-toggle-on text-primary" style="font-size: 1.4rem;"></i>');
			$userdb = ReadDBFields(GROUPS);
			echo '
      <tr '.($i % 2 == 0 ? 'class="rep"' : 'class="quest"').' style="text-align:center;margin:auto;">
        <td style="vertical-align:middle;text-align:left;padding:4px 0;'.($spseudo == $tmp[0][$i] ? 'background-color:#00FF00;' : '').'">'.$tmp[6][$i].
          ($tmp[4][$i] == '' ? '' : '
          <ul class="keyword keyword-horizontal" style="float:right;height:auto;">
            <li class="dir" style="margin:0 10px 0 5px;"><strong>=></strong>
              <ul>
                <li style="max-width:700px;">
                  <a href="mailto:'.$tmp[4][$i].'">'.$tmp[4][$i].'</a>
                  '.($tmp[7][$i] == '' ? '' : ' <a href="'.$tmp[7][$i].'" title="'.$tmp[7][$i].'" target="_blank">
                    <i class="fas fa-globe"></i>
                  </a>').'
                </li>
              </ul>
            </li>
          </ul>').'
        </td>';
			echo '
        <td style="vertical-align:middle;text-align:left;">';
			$dbgroup = ReadDBFields(GROUPS);
			for ($x = 0; $x < count($dbgroup); $x++) {
				for ($m = 0; $m < count($dbgroup[$x]); $m++) {
					if ($dbgroup[$x][$m] == $tmp[6][$i])
						echo $dbgroup[$x][0].'<br />';
				}
			}
			echo '
        </td>
        <td class="align-middle">'.FormatDate(substr($tmp[2][$i], 0, 8)).'</td>
        <td class="align-middle">'.FormatDate(substr($tmp[3][$i], 0, 8)).'</td>
        <td class="align-middle">'.FormatDate(substr($tmp[8][$i], 0, 8)).'</td>';
            if ($wri == $userprefs[1] && ($tmp[6][$i] == $serviz[31] || $tmp[6][$i] == $serviz[176]))
                echo '
        <td colspan="2"></td>';
            else {
                echo '
        <td class="align-middle">';
                if ($tmp[6][$i] != $userprefs[1]) 
                    echo '
          <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;idpg='.$idpg.'&amp;del='.$tmp[6][$i].'#lstmemb">
	        <i class="fas fa-times text-danger" style="font-size: 1.4rem;" title="'.$admin[186].'"></i>
		  </a>';
                echo '
        </td>
        <td class="align-middle">';
                if ($tmp[6][$i] != $userprefs[1]) {
                    echo '
          <script>
            $(document).ready(function(){
              $(\'.popuserpwd\').popover({
                title:"'.$admin[851].'",
                content:"'.$help[7].'",
                trigger:"hover",
                placement:"auto",
                html:true
              });
            });
          </script>';
                    if ($tmp[5][$i] != '1' && $tmp[5][$i] != '2') {
                        echo '
		  <div class="popuserpwd" style="padding-left:30%;">
	        <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;idpg='.$idpg.'&amp;susp='.$tmp[6][$i].'#lstmemb">
		      '.$img.'
			</a>
		  </div>';
                    } 
                    else {
                        $urlsup = 'admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;idpg='.$idpg.'&amp;del='.$tmp[6][$i].'#lstmemb';
                        $urlacc = 'admin.php?lng='.$lng.'&amp;pg=members&amp;act=2&amp;idpg='.$idpg.'&amp;acc='.$tmp[6][$i].'#lstmemb';
                        echo '
		  <div class="popuserpwd" style="padding-left:42%;">
	        <a onmouseup="montre(\'moveto\');">
		      '.$img.'
			</a>
		  </div>
		  <div id="moveto" class="rep" style="position:absolute;right:112px;display:none;width:auto;height:auto;text-align:center;border:1px solid;border-radius:8px;">
		    <div style="padding-bottom:6px;"><b>'.$admin[$tmp[5][$i] == '1' ? 1302 : 1303].'</b></div>
			<div>'.SubmitButton($admin[186], 'self.location.href=\''.$urlsup.'\'').'  '.SubmitButton($admin[1471], 'self.location.href=\''.$urlacc.'\'').'</div>
			<div style="float:right;margin:2px 4px 0 0;">
              <i class="fas fa-caret-up" title="'.$admin[458].'" onmouseup="cache(\'moveto\')"></i>
            </div>
		    <div style="clear:both;"></div>
		  </div>';
                    }
                }
                echo '
        </td>';
            }
            echo '
        <td style="vertical-align:middle;text-align:center;">
          <a href="admin.php?lng='.$lng.'&amp;pg=compte&amp;edit='.$tmp[6][$i].'">
		    <i class="far fa-edit" title="'.$admin[1019].'"></i>
		  </a>
        </td>
      </tr>';
        }
        echo '
    </table>
    </div>
    <br />'.$navbar;
	}
	echo '
  </fieldset>
</div>';
}
################################################################################
// écrire aux membres
elseif ($act == 3) {
	$topmess = '
	<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[697];
    $dbusers = array();
    $file_users = opendir(MSGREP);
    while ($nomfichier = readdir($file_users)) {
        if (substr($nomfichier, -3) == 'dtb') {
			$pseudo = str_replace(substr($nomfichier, -4), '', $nomfichier);
			if ($pseudo != $userprefs[1]) $dbusers[] = $pseudo;
        }
    }
    closedir($file_users);
    @usort($dbusers, 'AsciiCompare');
    $dbgroup = ReadDBFields(GROUPS);

	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[697], "100%");
	if (!empty($erreur))
		echo displayErrorMsg($admin[1636], $erreur);
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=980&mnuid=937&tconfig=0#z2').$admin[698].'<br />'.$admin[699].'</p>
<hr />
'.JavascriptFile(CHEMIN.'admin/inc/tinymsg.js').'
<div class="w-100 m-auto" style="max-width:540px;">
  <form name="membmsg" action="admin.php?lng='.$lng.'&amp;pg=members" method="post" onsubmit="return VerifyForm(); return false;">
    <fieldset>
      <input type="hidden" name="regit" value="5" />
	  <input type="hidden" name="act" value="4" />
      <div class="table-responsive-md">
      <table class="table table-bordered text-center m-auto">
	    <tr>
		  <td style="text-align:right;vertical-align:top;padding-top:6px;"><strong>'.$admin[697].': </strong></td>
		  <td style="text-align:left;">
			<select multiple="multiple" size="'.(count($dbusers) > 8 ? 9 : count($dbusers) + 1).'" name="msg4[]" class="form-control" style="width:120px;">
			 <option value="ALL" >'.$admin[690].'</option>'; 
    foreach($dbusers as $user) {
        echo '
			  <option value="'.$user.'">'.$user.'</option>';
    }
    echo '
			</select>
		  </td>
		</tr>
		<tr>
		  <td style="text-align:right;"><strong>'.$admin[1123].': </strong></td>
		  <td style="text-align:left;">
			<select name="msg3" class="form-control" style="width:100px;">
			  <option value=""> -- '.$admin[1604].' -- </option>';
    for ($x = 0; $x < count($dbgroup); $x++) {
        echo '
			  <option value="'.$dbgroup[$x][0].'">'.$dbgroup[$x][0].'</option>';
    }
    echo '
			</select>
		  </td>
		</tr>
	  </table>
      </div>';
    echo '
      <div class="table-responsive-md">
	  <table class="table table-bordered w-100">
	    <tr>
		  <td style="text-align:center;">'.$flag1.'</td>
	    </tr>
	    <tr>
		  <td style="background-color:#FFFFFF;text-align:center;">
            <textarea class="w-98 mx-auto form-control '.($err_msg1 ? 'errorInputText' : '').'" rows="10" name="msg1">
              '.trim($msg1).'
            </textarea>
          </td>
	    </tr>
	    <tr>
		  <td  style="text-align:center;vertical-align:middle">
            <a href="javascript:format1(\'b\')" class="c-pointer" title="'.$admin[1703].'"><i class="fas fa-bold"></i></a>&nbsp;
            <a href="javascript:format1(\'i\')" class="c-pointer" title="'.$admin[1705].'"><i class="fas fa-italic"></i></a>&nbsp;
            <a href="javascript:format1(\'u\')" class="c-pointer" title="'.$admin[1704].'"><i class="fas fa-underline"></i></a>&nbsp;
            <a href="javascript:dolink1(\'href=http://\')" class="c-pointer" title="'.$admin[1706].'"><i class="fas fa-link"></i></a>&nbsp;&nbsp;';
      if ($page[12] != 'none') DrawSmileys("1");
      echo '
		  </td>
	    </tr>';
    if ($lang[1] != "") {
        echo '
	    <tr>
		  <td style="text-align:center;"><br />'.$flag2.'</td>
	    </tr>
	    <tr>
		  <td style="background-color:#FFFFFF;text-align:center;">
            <textarea class="w-98 mx-auto form-control '.($err_msg2 ? 'errorInputText' : '').'" rows="10" name="msg2">
              '.trim($msg2).'
            </textarea>
          </td>
	    </tr>
	    <tr>
		  <td  style="text-align:center;vertical-align:middle">
            <a href="javascript:format2(\'b\')" class="c-pointer" title="'.$admin[1703].'"><i class="fas fa-bold"></i></a>&nbsp;
            <a href="javascript:format2(\'i\')" class="c-pointer" title="'.$admin[1705].'"><i class="fas fa-italic"></i></a>&nbsp;
            <a href="javascript:format2(\'u\')" class="c-pointer" title="'.$admin[1704].'"><i class="fas fa-underline"></i></a>&nbsp;
            <a href="javascript:dolink2(\'href=http://\')" class="c-pointer" title="'.$admin[1706].'"><i class="fas fa-link"></i></a>&nbsp;&nbsp;';
        if ($page[12] != 'none') DrawSmileys("2");
        echo '
		  </td>
	    </tr>';
    }
    echo '
	  </table>
      </div>
	  <br />
	</fieldset>
    <div class="row quest p-0 mt-2 w-98 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[694], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';
}
################################################################################
// envoyer un message
elseif ($act == 4) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[697];
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[697], '100%');
    CreateDir(TEMPREP);

	if ($regit == 5) {
		$m1   = $msg1;
		$m2   = $msg2;
		$msg1 = str_replace(chr(10),'<br />', $msg1);
		$msg1 = str_replace(chr(13),'', $msg1);
		$msg1 = str_replace('[b]',  '<b>', $msg1);
		$msg1 = str_replace('[/b]', '</b>', $msg1);
		$msg1 = str_replace('[i]',  '<i>', $msg1);
		$msg1 = str_replace('[/i]', '</i>', $msg1);
		$msg1 = str_replace('[u]',  '<u>', $msg1);
		$msg1 = str_replace('[/u]', '</u>', $msg1);
		$msg1 = str_replace('[l]href=','<a href="', $msg1);
		$msg1 = str_replace('[/l]', '" target="_blank"><i class="fas fa-globe align-middle" title="'.$admin[1038].'"></i></a>', $msg1);
		$msg1 = str_replace('"',    "'", $msg1);

		$msg2 = str_replace(chr(10),'<br />', $msg2);
		$msg2 = str_replace(chr(13),'', $msg2);
		$msg2 = str_replace('[b]',  '<b>', $msg2);
		$msg2 = str_replace('[/b]', '</b>', $msg2);
		$msg2 = str_replace('[i]',  '<i>', $msg2);
		$msg2 = str_replace('[/i]', '</i>', $msg2);
		$msg2 = str_replace('[u]',  '<u>', $msg2);
		$msg2 = str_replace('[/u]', '</u>', $msg2);
		$msg2 = str_replace('[l]href=','<a href="', $msg2);
		$msg2 = str_replace('[/l]', '" target="_blank"><i class="fas fa-globe align-middle" title="'.$admin[1038].'"></i></a>', $msg2);
		$msg2 = str_replace('"',    "'", $msg2);

		$users = '';
		foreach ($msg4 as $user)
			$users .= $user.' ';
		$users = trim($users);
		if ($msg3 == $admin[1604]) $msg3 = '';
		else $users = '';
		$rec = '<?php
$tinymsg1 = stripslashes("'.$msg1.'");
$tinymsg2 = stripslashes("'.$msg2.'");
$tinymsg3 = stripslashes("'.$msg3.'");
$tinymsg4 = stripslashes("'.$users.'");
?>';
		WriteFullDB(TEMPREP.'sendtinymsg.inc', $rec);
		include TEMPREP.'sendtinymsg.inc';
		echo '
<p style="text-align:center;">'.$admin[689].'<br /></p>
<hr />';
		$msgdest  = (trim($tinymsg3.$tinymsg4) == '') ? $admin[691].' :' : (($tinymsg3 != '') ? $admin[1123].': <strong>'.$tinymsg3.'</strong>' : '');
		$msgdest .= ($tinymsg4 != '') ? '<br />'.$admin[1345].' : <strong>'.$tinymsg4.'</strong>' : '';
		echo '
<div class="w-100 m-auto" style="max-width:540px;">
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$msgdest.'</p>
  <fieldset>
  <p style="text-align:center;">'.$flag1.'</p>
  <div class="bord w-100 mx-auto my-0" style="max-width:500px;">
'.PathToImage(replaceimg($tinymsg1));
		if ($lang[1] != "") {
			echo '
  </div>
  <br />
  <p style="text-align:center;">'.$flag2.'</p>
  <div class="bord w-100 mx-auto my-0" style="max-width:500px;">
'.PathToImage(replaceimg($tinymsg2));
		}
		echo '
  </div>
  </fieldset>
  <div class="row quest p-0 mt-2 w-100 m-auto">
    <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
    <div class="col-md-6">
      <div style="float:right">
        '.SubmitButton($admin[694], 'self.location.href=\'admin.php?lng='.$lng.'&amp;pg=members&amp;act=4\'', '', $imgdroite).'
      </div>
    </div>
  </div>
</div>';
		echo '
<hr />
<p style="text-align:center;">
  <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=3&amp;msg1='.$m1.'&amp;msg2='.$m2.'">'.$admin[688].'</a>
</p>';
	} else {
		include(TEMPREP.'sendtinymsg.inc');
		$mbrs = array();
		if ($tinymsg3 != '') {
			$groups = ReadGroups();
			$mbrs   = $groups[$tinymsg3];
		}
		if ($tinymsg4 != 'ALL') {
			$mbrs = array_merge($mbrs, explode(' ', $tinymsg4));
		} else {
			$file_users = opendir(MSGREP);
			while ($nomfichier = readdir($file_users)) {
				if ('.dtb' == $nomfichier) {
					@unlink(MSGREP.$nomfichier);
					continue;
				}
				if (substr($nomfichier, -3) == 'dtb' && $nomfichier != $userprefs[1].DBEXT) {
					$nomuser = str_replace(substr($nomfichier, -4), '', $nomfichier);
					$mbrs[] = $nomuser;
				}
			}
			closedir($file_users);
		}
		$mbrs       = array_unique($mbrs);
		$dbusers    = array();
		$file_users = opendir(MSGREP);
		while ($nomfichier = readdir($file_users)) {
			if (substr($nomfichier, -3) == 'dtb' && $nomfichier != $userprefs[1].DBEXT) {
				$nomuser = str_replace(substr($nomfichier, -4), '', $nomfichier);
				if (in_array($nomuser, $mbrs)) $dbusers[] = $nomuser;
			}
		}
		closedir($file_users);
		@sort($dbusers);
		echo '
<fieldset>
  <br />
  <p style="text-align:center;">'.$admin[692].'</p>
  <p style="text-align:center;">'.count($dbusers).' '.$admin[516].'</p>';
		if (FileDBExist(MSGREP.$userprefs[1].DBEXT)) {
			$dbmsg = ReadDBFields(MSGREP.$userprefs[1].DBEXT);
		}
		$tinymsgsend = $tinymsg2 != '' ? $tinymsg1.'<br /><hr /><br />'.$tinymsg2 : $tinymsg1;
		
		$dbmsg    = array();
		$dbmsg[0] = $admin[690];
		$dbmsg[1] = GetCurrentDateTime();
		$dbmsg[2] = RemoveConnector(stripslashes($tinymsgsend));
		$dbmsg[3] = 'lu';
		$dbmsg[4] = 'send';
		$dbmsg[5] = '';
		$dbmsg[6] = '';
		$dbmsg[7] = $userprefs[8];
		AppendDBFields(MSGREP.$userprefs[1].DBEXT, $dbmsg);
		foreach ($dbusers as $uuser) {
			$userdb      = ReadDBFields(MSGREP.$uuser.DBEXT);
			$tinymsgsend = $lang[0] == $userdb[1][1] ? $tinymsg1 : $tinymsg2;
			$dbmsg       = array(
				$userprefs[1],
				GetCurrentDateTime(),
				RemoveConnector(stripslashes($tinymsgsend)),
				'new',
				'',
				'',
				'',
				$userprefs[8]);
			AppendDBFields(MSGREP.$uuser.DBEXT, $dbmsg);
            $sender = empty($userprefs[1]) ? $user[0] : $userprefs[1];
			if (isset($userdb[1][26])) 
			{
				if ($userdb[1][26] == 'on') {
					$eto   = $userdb[1][3];
					$sujet = stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' - '.$admin[1707];
					$bodycorps  = '<div style="margin:auto;padding:8px;width:440px;border: solid 1px #000000;border-radius:4px;">';
					$bodycorps .= '<p style="text-align:left;font:12pt Arial;">';
					$bodycorps .= $admin[1632].sprintf($admin[1708], $uuser, $sender).'<a href="'.$site[3].'" title="'.$site[3].'">'.$site[3].'</a>';
					$bodycorps .= '</p></div>';
					eMailHtmlTo($sujet, $bodycorps, $eto);
				}
			}
		}
		echo '
  <hr />
  <p style="text-align:center;"><b>'.$admin[693].'</b></p>
  <br />';
		@unlink(TEMPREP.'sendtinymsg.inc');
		echo '
</fieldset>';
	}
}
################################################################################
// gestion des groupes
elseif ($act == 5) {
    $mess = '';
    if ($regit == 5 && $group != '') { //ajouter groupe
        $group = preg_replace('! !', '_', $group);
        $mess = '<br />'.AddGroup($group) ? ucfirst($admin[928]).' '.$group.$admin[929].' !<br />' : ucfirst($admin[928]).' '.$group.$admin[931].' !<br />';
    } elseif ($regit == 6) { // supprimer groupe
        $mess = '<br />'.DelGroup($group) ? ucfirst($admin[928]).' '.$group.$admin[930].' !<br />' : ucfirst($admin[928]).' '.$group.' '.mb_strtolower($admin[1604], $charset).$admin[930].' !<br />';
    }
    $grps = ReadGroups();
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[925]);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[925], '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=976&mnuid=937&tconfig=0#z2').$admin[701].'<br />'.$admin[926].'</p>
<hr />'.$mess.'
<div class="w-100 m-auto" style="max-width:400px;">
  <form name="membgrp" action="admin.php?lng='.$lng.'&amp;pg=members"  method="post">
    <fieldset style="padding-top:12px;">
      <div class="table-responsive-md">
	  <table class="table table-bordered w-100 text-center m-auto" style="max-width:300px;">
	    <tr class="forum">
		  <td style="width:66%;text-align:left;"><b>'.ucfirst($admin[928]).'</b></td>
		  <td colspan="2" style="text-align:center;"><b>'.$admin[680].'</b></td>
		</tr>';
    foreach ($grps as $grp=>$mbrs) {
    echo '
		<tr class="rep">
		  <td style="width:33%;text-align:left;">'.$grp.'</td>
		  <td style="text-align:center;padding:4px 0;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=6&amp;group='.$grp.'" title="'.$admin[144].' '.$grp.'">
			  <i class="far fa-edit" style="font-size: 1.3rem;"></i>
            </a>
		  </td>
		  <td style="text-align:center;padding:4px 0;">
		    <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=5&amp;regit=6&amp;group='.$grp.'" title="'.$admin[186].' '.$grp.'">
			  <i class="fas fa-times text-danger" style="font-size: 1.4rem;"></i>
            </a>
		  </td>
		</tr>';
    }
    unset($grps);
    echo '
	  </table>
      </div>
      <br />';
    echo '
      <input type="hidden" name="regit" value="5" />
	  <input type="hidden" name="act" value="5" />
	  <div class="text-center">
        <div class="d-inline-block">'.$admin[1590].' '.$admin[928].' : </div>
        <div class="d-inline-block"><input class="form-control texte" type="text" name="group" value="" style="width:196px;" /></div>
      </div>
	</fieldset>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';
}
################################################################################
// gestion des membres du groupe
elseif ($act == 6) { 
	$aMembers = (array)import('aMembers', 'POST');
    if ($regit == 'add' && $group != '' && count($aMembers) > 0) { 
        $mess = '';
		foreach ($aMembers as $member) {
            if (!empty($member))
                $mess .= AddMember($group, $member) ? ucfirst($admin[928]).' '.$group.' : '.$admin[1693].' '.$member.$admin[929].' !<br />' : ucfirst($admin[1693]).' '.$member.$admin[931].' !<br />';
		}
    }
	$mess = empty($mess) ? '' : '<br />'.$mess;
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.'&amp;pg=members&amp;act=5">'.$admin[925].'</a> > '.str_replace('Admin - ', '', $admin[928]);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable(ucfirst($admin[928]).' '.$group, '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=976&mnuid=937&tconfig=0#z2').$admin[701].$admin[927].'</p>
<hr />'.$mess;
    if (FileDBExist(GROUPS)) {
        echo '
<div class="w-100 m-auto" style="max-width:400px;">
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$group.'</p>
  <form name="fast_actions" action="admin.php?lng='.$lng.'&amp;pg=members" method="post">
  <fieldset style="padding-top:12px;">
    <input type="hidden" name="regit" value="fast" />
	<input type="hidden" name="act" value="6" />
	<input type="hidden" name="group" value="'.$group.'" />
    <div class="table-responsive-md">
	<table class="table table-bordered w-100 text-center m-auto" style="max-width:330px;">
      <tr>
        <td colspan="2">
          <div class="float-right mb-2" style="padding-right:32px;">
            '.SubmitButton($admin[1602]).'
            <i class="fas fa-level-down-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
	  <tr class="forum">
		<td class="text-left pl-1 py-1"><b>'.ucfirst($admin[1692]).'</b></td>
		<td class="text-center py-1" style="width:76px;"><b>'.$admin[680].'</b></td>
	  </tr>';
        $grps = ReadGroups();
        $lst  = $grps[$group];
        @usort($lst, 'AsciiCompare');
        $count = count($lst);
        $nbpg  = 15;
        if (empty($idpg)) {
            $idpg = 1;
        } else {
            while ($count <= ($idpg - 1)* $nbpg) $idpg--;
        }
        $navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=members&amp;act=6&amp;group='.$group.'&amp;idpg=', $count, $idpg, $nbpg);
        $ids    = '';
        for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
			if (!empty($lst[$i])) {
				echo '
	  <tr class="rep">
		<td class="text-left pl-1 py-1">'.$lst[$i].'</td>
		<td class="text-center py-1">';
                MakeRadioGroup(array( array("d", "s", $i)));
                echo '
		</td>
	  </tr>';
            }
            $ids .= $i." ";
        }
        unset($grps);
        echo '
	</table>
    </div>
    <br />
    <input type="hidden" name="ids" value="'.$ids.'" />
  </form>
  <div class="text-center">'.$navbar.'</div>';
        echo '
  <form name="members" action="admin.php?lng='.$lng.'&amp;pg=members"  method="post">
    <input type="hidden" name="regit" value="add" />
	<input type="hidden" name="act" value="6" />
	<input type="hidden" name="group" value="'.$group.'" />
	<div class="text-center">'.$admin[1590].' '.$admin[1693].' :</div>
	<div class="text-center mb-4">';
        $dbuserspref = array();
        $file_users=opendir(MSGREP);
        while ($nomfichier=readdir($file_users)) {
			if ( substr($nomfichier,-3) == "dtb") {
				$nomuser = str_replace(substr($nomfichier,-4),"",$nomfichier);
				if (!in_array($nomuser, $lst)) $dbuserspref[] = $nomuser;
			}
        }
        closedir($file_users);
        @usort($dbuserspref,'AsciiCompare');
		$size = min(20, count($dbuserspref) + 2);
        echo '
	  <select name="aMembers[]" id="aMembers" size="'.$size.'" multiple="multiple" class="form-control mx-auto" style="width:160px;">';
        for ($i = 0; $i < count($dbuserspref); $i++) {
			echo '
		<option value="'.$dbuserspref[$i].'">'.$dbuserspref[$i].'</option>';
        }
        echo '
	  </select>
	</div>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[925], 'self.location.href=\'admin.php?lng='.$lng.'&pg=members&act=5\'', $imggauche, '', 'button').'
      </div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </fieldset>
  </form>
</div>';
    }
    echo '
  <hr />
  <p class="text-center"><a href="admin.php?lng='.$lng.'&pg=members&act=5" title="">'.$admin[857].$admin[925].'</a></p>
  <hr />';
}
btable();
include CHEMIN.'admin/bpage.inc';
?>
menu.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/menu.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Menu boxes
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1216];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_MENUBOX;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[1210];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1030&mnuid=937&tconfig=0#z2').'</p>'.$admin[1211].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[1212];
$qwrite    = $admin[1213];
$qcat      = $admin[1221];
$qtitre    = $admin[1214];
$qcontenu  = $admin[1215];
$qnouveau  = $admin[1230];

function ShowValidMenus($accept = '') {
    global $admin;
    $valid = array(
        BOX_TOP => false, BOX_BOTTOM => false,
        BOX_LEFT => false, BOX_RIGHT => false,
        BOX_ABOVE => false, BOX_UNDER => false,
        BOX_EDITO => false);
    for ($i = 0; $i < strlen($accept); $i++) {
        $letter = substr($accept, $i, 1);
        if (isset($valid[$letter])) $valid[$letter] = true;
    }
    return '
<div class="text-left p-1 m-auto" style="width:420px;">
  <div class="pt-1" style="width:402px;border:1px solid;">
    <label for="valid['.BOX_TOP.']" style="margin-left:152px;">'.$admin[1085].'</label>
    <input type="checkbox" id="valid['.BOX_TOP.']" name="valid['.BOX_TOP.']"'.Checked($valid[BOX_TOP]).' />
  </div>
  <div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_LEFT.']" class="pt-1" style="margin-left:10px;">'.$admin[1086].'</label>
      <input type="checkbox" id="valid['.BOX_LEFT.']" name="valid['.BOX_LEFT.']"'.Checked($valid[BOX_LEFT]).' />
    </div>
    <div class="float-left" style="width:200px;">
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_ABOVE.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1087].'</label>
        <input type="checkbox" id="valid['.BOX_ABOVE.']" name="valid['.BOX_ABOVE.']"'.Checked($valid[BOX_ABOVE]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_EDITO.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1088].'</label>
        <input type="checkbox" id="valid['.BOX_EDITO.']" name="valid['.BOX_EDITO.']"'.Checked($valid[BOX_EDITO]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_UNDER.']" class="pt-1" style="margin-left:50px;">'.$admin[1089].'</label>
        <input type="checkbox" id="valid['.BOX_UNDER.']" name="valid['.BOX_UNDER.']"'.Checked($valid[BOX_UNDER]).' />
      </div>
    </div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_RIGHT.']" class="pt-1" style="margin-left:10px;">'.$admin[1090].'</label>
      <input type="checkbox" id="valid['.BOX_RIGHT.']" name="valid['.BOX_RIGHT.']"'.Checked($valid[BOX_RIGHT]).' />
    </div>
  </div>
  <div style="width:402px;border:1px solid;">
    <label for="valid['.BOX_BOTTOM.']" class="pt-1" style="margin-left:152px;">'.$admin[1091].'</label>
    <input type="checkbox" id="valid['.BOX_BOTTOM.']" name="valid['.BOX_BOTTOM.']"'.Checked($valid[BOX_BOTTOM]).' />
  </div>
</div><div class="clearfix"></div>
';
}

include 'inc/admin.inc';
?>
menubox.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/menubox.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Menus
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1216];
        include 'access.inc';
        exit();
    }
}

$act     = import('act');
$id      = import('id');
$idpg    = import('idpg');
$selmenu = import('selmenu');
$newopt  = import('newopt');
$typ     = import('typ');

include_once CHEMIN.'inc/func_groupscol.php';
$grpcols = ReadMembersCol();
if (!empty($userprefs[1])) {
	$myname  = $userprefs[1];
	$myemail = $userprefs[2];
}
else {
	$myname  = $user[0];
	$myemail = $user[1];
}
$grpcol  = empty($grpcol) ? (isset($grpcols[$myname]) ? (isset($grpcols[$myname][0]) ? $grpcols[$myname][0] : '') : '') : $grpcol;
################################################################################
// choix de la boîte menu
if ($act == 1) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1219]);
    include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1219], '100%');
    $dbmenu = ReadAuthorizedIndex(DBMENUBOX, $myname, $grpcol, $fctwri);
    $dbwork = array();
    for ($i = 0; $i < count($dbmenu); $i++) {
        $dbwork[$i][0] = $dbmenu[$i][$lang[0] == $lng ? 2 : 3];
        $dbwork[$i][1] = $dbmenu[$i][4];
    }
    sort($dbwork);
	echo '
<p class="text-center;">'.ToHelp($lng, '&pg=1032&mnuid=937&tconfig=0#z2');
    if (!empty($dbwork)) {
		echo '
<form name="selmenubox" action="admin.php?lng='.$lng.'&amp;pg=optmenu" method="post">';
		if ($newopt == 'ok') echo '
  <input type="hidden" name="id" value="'.$id.'" />
  <input type="hidden" name="typ" value="'.$typ.'" />
  <input type="hidden" name="form" value="1" />';		
		echo '
  <fieldset class="w-100 mx-auto mt-5" style="max-width:360px;"><legend>'.$admin[1218].'</legend>
  <div class="table-responsive-md">
  <table class="m-auto">
    <tr>
      <td class="text-center">
        <p>
          <select class="form-control" name="menubox" onchange="submit();">
            <option value="" select="selected">'.$admin[1222].'</option>';
    foreach ($dbwork as $menu) {
        echo '
            <option value="'.$menu[1].'">'.$menu[0].'</option>';
    }
    echo '
          </select>
        </p>
      </td>
    </tr>
  </table>
  </div>
  </fieldset>
</form>';
    } else {
        echo '
  <p class="text-center">'.$admin[854].'</p>';
    }
}
################################################################################
// choix du menu déroulant
elseif ($act == 2) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1219]);
    include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1219], '100%');
    $dbmenu = ReadAuthorizedIndex(DBDDMENUBOX, $myname, $grpcol, $fctwri);
    $dbwork = array();
    for ($i = 0; $i < count($dbmenu); $i++) {
        $dbwork[$i][0] = $dbmenu[$i][$lang[0] == $lng ? 2 : 3];
        $dbwork[$i][1] = $dbmenu[$i][4];
    }
    sort($dbwork);
	echo '
<p class="text-center">'.ToHelp($lng, '&pg=1036&mnuid=937&tconfig=0#z2');
    if (!empty($dbwork)) {
		echo '
<form name="selddmenubox" action="admin.php?lng='.$lng.'&amp;pg=optddmenu" method="post">
  <fieldset class="w-100 mx-auto mt-5" style="max-width:300px;"><legend>'.$admin[1218].'</legend>
  <div class="table-responsive-md">
  <table class="m-auto">
    <tr>
      <td class="text-center">
        <p><select class="form-control" name="ddmenubox" onchange="submit();">
          <option value="" select="selected">'.$admin[1222].'</option>';
    foreach ($dbwork as $menu) {
        echo '
          <option value="'.$menu[1].'">'.$menu[0].'</option>';
    }
    echo '
        </select></p>
      </td>
    </tr>
  </table>
  </div>
  </fieldset>
</form>';
    } else {
        echo '
  <p class="text-center">'.$admin[854].'</p>';
    }
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
menuico.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/menuico.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Menubox
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[29] == '') {
        $nomzone = $admin[876];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_MENUICO;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[1238];
$qintro    = '<br />'.$admin[1239].ToHelp($lng, '&pg=1028&mnuid=937&tconfig=0#z2').(empty($form) ? $admin[223] : '');
$qseeall   = $admin[1224];
$qwrite    = $admin[1225];
$qcat      = $admin[193];
$qtitre    = $admin[1237];
$qcontenu  = $admin[1231];
$qnouveau  = $admin[1228];

include 'inc/admin.inc';
?>
mnutoddm.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/mnutoddm.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Menu to DDM
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1216];
        include 'access.inc';
        exit();
    }
}

$act     = import('act');
$id      = import('id');
$typmenu = import('typmenu');
$titre1  = import('titre1');
$titre2  = import('titre2');

$erreur     = '';
$err_titre1 = false;
$err_titre2 = false;
$err_titre1 = empty($titre1) && ($act == 2) ? true : false;
$erreur    .= $err_titre1 ? '<li>'.$admin[1585].$qtitre.$admin[1586].($lang[1] != '' ? $admin[1177] : '').'</li>': '';
if ($lang[1] != '') {
    $err_titre2 = empty($titre2) && ($act == 2) ? true : false;
    $erreur    .= $err_titre2 ? '<li>'.$admin[1585].$qtitre.$admin[1586].$admin[1178].'</li>': '';
}
$act = empty($erreur) ? $act : 1;

function ShowValidMenus($accept = '') {
    global $admin;
    $valid = array(
        BOX_TOP => false, BOX_BOTTOM => false,
        BOX_LEFT => false, BOX_RIGHT => false,
        BOX_ABOVE => false, BOX_UNDER => false,
        BOX_EDITO => false );
    for ($i = 0; $i < strlen($accept); $i++) {
        $letter = substr($accept, $i, 1);
        if (isset($valid[$letter])) $valid[$letter] = true;
    }
    return '
<div class="text-left p-1 mx-auto mb-2" style="width:420px;">
  <div class="pt-1" style="width:402px;border:1px solid;">
    <label for="valid['.BOX_TOP.']" style="margin-left:152px;">'.$admin[1085].'</label>
    <input type="checkbox" id="valid['.BOX_TOP.']" name="valid['.BOX_TOP.']"'.Checked($valid[BOX_TOP]).' />
  </div>
  <div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_LEFT.']" class="pt-1" style="margin-left:10px;">'.$admin[1086].'</label>
      <input type="checkbox" id="valid['.BOX_LEFT.']" name="valid['.BOX_LEFT.']"'.Checked($valid[BOX_LEFT]).' />
    </div>
    <div class="float-left" style="width:200px;">
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_ABOVE.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1087].'</label>
        <input type="checkbox" id="valid['.BOX_ABOVE.']" name="valid['.BOX_ABOVE.']"'.Checked($valid[BOX_ABOVE]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_EDITO.']" class="pt-1" style="margin-left:50px;margin-top:2px;">'.$admin[1088].'</label>
        <input type="checkbox" id="valid['.BOX_EDITO.']" name="valid['.BOX_EDITO.']"'.Checked($valid[BOX_EDITO]).' />
      </div>
      <div style="width:200px;border:1px solid;height:2em;">
        <label for="valid['.BOX_UNDER.']" class="pt-1" style="margin-left:50px;">'.$admin[1089].'</label>
        <input type="checkbox" id="valid['.BOX_UNDER.']" name="valid['.BOX_UNDER.']"'.Checked($valid[BOX_UNDER]).' />
      </div>
    </div>
    <div class="float-left pt-3" style="width:100px;height:6em;border:1px solid;">
      <label for="valid['.BOX_RIGHT.']" class="pt-1" style="margin-left:10px;">'.$admin[1090].'</label>
      <input type="checkbox" id="valid['.BOX_RIGHT.']" name="valid['.BOX_RIGHT.']"'.Checked($valid[BOX_RIGHT]).' />
    </div>
  </div>
  <div style="width:402px;border:1px solid;">
    <label for="valid['.BOX_BOTTOM.']" class="pt-1" style="margin-left:152px;">'.$admin[1091].'</label>
    <input type="checkbox" id="valid['.BOX_BOTTOM.']" name="valid['.BOX_BOTTOM.']"'.Checked($valid[BOX_BOTTOM]).' />
  </div>
</div><div class="clearfix"></div>
';
}

$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
    var lng2   = "'.$lang[1].'";
    var tit1 = document.inputmenu.titre1.value;
    if (tit1.length < 1) {
        sto += "  - '.addslashes($admin[1585].$admin[1214].$admin[1586].($lang[1] != '' ? $admin[1177] : '')).'\n";
		document.inputmenu.titre1.className = "errorInputText";
        erreur = true;
    }
    if (lng2 > "") {
        var tit2 = document.inputmenu.titre2.value;
        if (tit2.length < 3) {
            sto += "  - '.addslashes($admin[1585].$admin[1214].$admin[1586].$admin[1178]).'\n";
			document.inputmenu.titre2.className = "errorInputText";
            erreur = true;
        }
    }
    if (erreur == true) {
        sto = "'.addslashes($admin[1589]).'\n\n" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

ReadDoc($id);
$mnu = $lng == $lang[0] ? $fieldb1 : $fieldb2;
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.sprintf($admin[1541], $mnu);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable(sprintf($admin[1541], $mnu), '100%');
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1148&mnuid=1030&tconfig=0#z2').'</p>';
$types_menu = array('DDV'=>$admin[1351], 'DDH'=>$admin[1352]);

if (empty($act)) {
    echo '
<form name="seltypmenu" action="admin.php?lng='.$lng.'&amp;pg=mnutoddm" method="post">
  <input type="hidden" name="act" value="1" />
  <input type="hidden" name="id" value="'.$id.'" />
  <fieldset class="w-100 mx-auto mt-5" style="max-width:280px;"><legend>'.$admin[1222].'</legend>
  <div class="table-responsive-md">
  <table style="margin:auto;">
    <tr>
      <td style="text-align:center;">
        <p>
          <select class="form-control" name="typmenu" onchange="submit();">
            <option value="" select="selected">'.$admin[1058].'</option>';
	foreach ($types_menu as $key=>$value) {
		echo '
            <option value="'.$key.'"'.Selected($typmenu == $key).'>'.$value.'</option>';
	}
	echo '
          </select>
        </p>
      </td>
    </tr>
  </table>
  </div>
  <div class="row quest p-0 mt-2 w-100 m-auto">
    <div class="col-md-12">'.SubmitButton($admin[1220], 'self.location.href=\'admin.php?lng='.$lng.'&pg=menu&tri=ch\'', $imggauche, '', 'button').'</div>
  </div>
  </fieldset>
</form>';
}

if ($act == 1) {
    echo '
<div class="text-center">'.$admin[1213].' => '.$types_menu[$typmenu].'</div>';
    if (!empty($erreur))
        echo displayErrorMsg($admin[1589], $erreur);
    echo '
<form name="inputmenu" id="inputmenu" action="admin.php?lng='.$lng.'&amp;pg=mnutoddm" method="post" onsubmit="return VerifyForm(); return false;">
  <input type="hidden" name="act" value="2" />
  <input type="hidden" name="id" value="'.$id.'" />
  <input type="hidden" name="typmenu" value="'.$typmenu.'" />
  <fieldset class="w-100 mx-auto" style="max-width:520px;">
    <div class="table-responsive-md">
    <table class="w-100 m-auto">
      <tr><td class="text-center"><br />'.$admin[1214].'</td></tr>
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag1.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_titre1 ? 'errorInputText' : 'texte').'" type="text" name="titre1" size="45" value="'.$fieldb1.'" />
          </div>
        </td>
      </tr>';
    if ($lang[1] != '') {
        echo '
      <tr>
        <td class="text-center">
          <div class="d-inline-block">'.$flag2.'</div>
          <div class="d-inline-block">
            <input class="form-control '.($err_titre2 ? 'errorInputText' : 'texte').'" type="text" name="titre2" size="45" value="'.$fieldb2.'" />
          </div>
        </td>
      </tr>';
    } else {
        echo '
  <input type="hidden" name="titre2" value="" />';
    }
    echo '
      <tr><td class="text-center"><br />'.$admin[1230].'</td></tr>
      <tr><td class="text-center">'.ShowValidMenus().'</td></tr>
    </table>
    </div>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[1216], 'self.location.href=\'admin.php?lng='.$lng.'&pg=menu&tri=ch\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </fieldset>
</form>';
}

if ($act == 2 && empty($erreur)) {
    ReadDoc($id);
    $data     = array_fill(0, 17, '');
    $data[0]  = TYP_DDMENUBOX;
    $data[2]  = 'a';
    $data[5]  = empty($userprefs[1]) ? $author : $userprefs[1];
    $data[6]  = empty($userprefs[2]) ? $email : $userprefs[2];
    $data[7]  = isset($_POST['valid']) ? implode('', array_keys($_POST['valid'])) : 'TLAEURB';
    $data[8]  = $typmenu;
    $data[9]  = $titre1;
    $data[10] = $titre2;
    $data[17] = $fieldmod;
    $idmnu    = ActionOnFields('add', $data);
    
    $dbw      = SelectDbFieldsByField(ReadDBFields(DBOPTMENU), 5, $id);
    $optmenu  = array();
    $curr_cat = '';
    foreach ($dbw as $item) {
        ReadDoc($item[4]);
        if ($status != 'a') continue;
        $optmenu[] = array(trim($item[0]), $item[4]);
    }
    unset($dbw);
    sort($optmenu);
    $curcats = array();
    $liste   = array();
    $n       = 0;
    $n2      = -1;
    $p       = 1;
    foreach ($optmenu as $item) {
        if (empty($item[0])) {
            $i = 0;
        } else {
            $cats = explode('|', $item[0]);
            $xcat = '';
            for ($i = 0; $i < count($cats); $i++) {
                $xcat .= (empty($xcat) ? '' : '|').$cats[$i];
                if (@$curcats[$i] != @$cats[$i]) {
                    if ($i == 0) $n++;
                    $ast = array();
                    for ($j = 1; $j < $i+1; $j++) $ast[] = '-01';
                    if ($i > 0) $ast[$i-1] = '-'.sprintf("%'.02d", $n2+1);
                    if ($i > 1) for ($k = 0; $k < count($past); $k++) $ast[$k] = $past[$k];
                    $liste[] = array('cat' => TRUE, 'niv' => $i+1, 'attn' => sprintf("%'.02d", $n).implode($ast), 'opt' => $item[1]);
                    $curcats[$i] = $cats[$i];
                    array_splice($curcats, $i+1);
                    $p    = $i;
                    $past = $ast;
                    $n2   = 0;
                }
            }
        }
        if (empty($item[0]) || $i == 0) { $n++; $n2 = 0; }
        if ($i > $p) $n2++;
        $ast = array();
        for ($j = 1; $j < $i+1; $j++) $ast[] = '-01';
        if ($n2 > 1) $ast[$i-1] = '-'.sprintf("%'.02d", $n2);
        if ($i > 1) for ($k = 0; $k < count($past); $k++) $ast[$k] = $past[$k];
        $liste[] = array('cat' => FALSE, 'niv' => $i+1, 'attn' => sprintf("%'.02d", $n).implode($ast), 'opt' => $item[1]);
    }
    unset($cats, $curcats);
    
    if (!empty($liste)) {
        if (in_array($typmenu, array('DDH', 'DDV'))) {
            foreach ($liste as $item) {
                $opt = $item['opt'];
                ReadDoc($opt);
                $data     = array_fill(0, 17, '');
                $data[0]  = TYP_OPTDDMENU;
                $data[2]  = 'a';
                $data[5]  = empty($userprefs[1]) ? $author : $userprefs[1];
                $data[6]  = empty($userprefs[2]) ? $email : $userprefs[2];
                $data[7]  = $item['attn'];
                $data[11] = $fieldc1;
                if ($item['cat']) {
                    $cats1 = explode('|', $fielda1);
                    $cats2 = explode('|', $fielda2);
                    $data[9]  = $cats1[$item['niv'] - 1];
                    $data[10] = $cats2[$item['niv'] - 1];
                    $data[13] = '?';
                    $data[14] = '?';
                } else {
                    $data[9]  = $fieldb1;
                    $data[10] = $fieldb2;
                    $data[13] = $fieldd1;
                    $data[14] = $fieldd2;
                }
                $data[15] = $idmnu;
                $data[16] = $fieldmail;
                $data[17] = $fieldmod;
                $idopt    = ActionOnFields('add', $data);
            }
            $titre = $lng == $lng[0] ? $titre1 : $titre2;
            echo '
<p style="text-align:center;">'.sprintf($admin[1544], $titre).'</p>';
        }
        elseif ($typmenu == 'DDM') {
            foreach ($liste as $item) {
                if ($item['cat'] && $item['niv'] > 1) continue;
                $opt = $item['opt'];
                ReadDoc($opt);
                $data     = array_fill(0, 17, '');
                $data[0]  = TYP_OPTDDMENU;
                $data[2]  = 'a';
                $data[5]  = empty($userprefs[1]) ? $author : $userprefs[1];
                $data[6]  = empty($userprefs[2]) ? $email : $userprefs[2];
                $data[7]  = $item['attn'];
                $data[11] = $fieldc1;
                if ($item['cat']) {
                    $cats = explode('|', $fielda1);
                    $data[9]  = $cats[0];
                    $data[10] = $fielda2;
                    $data[13] = '?';
                    $data[14] = '?';
                }
                if (!$item['cat']) {
                    $data[9]  = $fieldb1;
                    $data[10] = $fieldb2;
                    $data[13] = $fieldd1;
                    $data[14] = $fieldd2;
                }
                $data[15] = $idmnu;
                $data[16] = $fieldmail;
                $data[17] = $fieldmod;
                $idopt    = ActionOnFields('add', $data);
            }
            $titre = $lng == $lng[0] ? $titre1 : $titre2;
            echo '
<p class="text-center">'.sprintf($admin[1544], $titre).'</p>';
        }
    }
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
news.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/news.inc'
View Content
<?php
/*******************************************************************************
 *   Admin News
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[14] == '') {
        $nomzone = $admin[13];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_NEWS;
$bname     = 1;
$bemail    = 1;
$bcat      = 0;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 2;
$qformonly = 0;
$qtitle    = $admin[125];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1050&mnuid=937&tconfig=0#z2').'</p>'.$admin[227].(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[126];
$qwrite    = $admin[127];
$qcat      = '';
$qtitre    = $admin[162];
$qcontenu  = $admin[128];
$qnouveau  = $admin[261];

include 'inc/admin.inc';
?>
newsmail.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/newsmail.php'
View Content
<?php
/*******************************************************************************
 *   Send News
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.11 (March 09, 2023) : correction $bodycorps
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../../');
include CHEMIN.'admin/includes.inc';
CreateDir(TEMPREP);

$lng      = import('lng');
$lsn      = import('lsn', '', true, 0);
$id       = import('id');
$selgroup = import('selgroup');
$npp      = import('npp', '', true, $lsn);
$dep      = import('dep', '', true, 1);
$from     = import('from');

if (is_file(CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT))
    include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
else
    die('BAD Language name !');

$lst = ReadDBFields(TEMPREP.'newstemp.dtb');

echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
<title>'.$admin[546].'</title>
'.JavascriptFile(CHEMIN.'inc/hpage.js').'
</head>
<body bgcolor="#FFFFFF" style="margin:5px; overflow: hidden;">
<fieldset style="max-width:300px;margin:auto;">';
if ($lsn != -1) {
    echo '
<p style="width:100%;margin:auto;text-align:center;">'.$admin[524].'</p>
<p style="width:100%;margin:auto;text-align:center;">'.Min($lsn+1,count($lst)).' / '.count($lst).' '.$admin[516].'</p>';
}
if ($lsn < count($lst)) {
	$nom38 = getLabel($nom[38]);
	$nom38 = mb_substr($nom38, 0, 1, $charset) == '§' ? mb_substr($nom38, 1, mb_strlen($nom38 ,$charset) ,$charset) : $nom38;
	$nom39 = getLabel($nom[39]);
	$nom39 = mb_substr($nom39, 0, 1, $charset) == '§' ? mb_substr($nom39, 1, mb_strlen($nom39 ,$charset) ,$charset) : $nom39;
    ReadDoc($id);
	$to = $lst[$lsn][1];
	if ($lst[$lsn][2] == $lang[0]) {
		include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
		$sujet = strip_tags($fieldb1);
		$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NE'].'.php?lng='.$lang[0].'&pg='.$id.'">';
		$bodycorps .= $site[3].$site['NE'].'.php?lng='.$lang[1].'&pg='.$id.'</a></p>';
		$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom38.' </legend>'.ForceToAbsolute($fieldc1).'</fieldset>';
		$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1].'">';
		$bodycorps .= $site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1]."</a></p>";
	}
	else {
		include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
		$sujet = strip_tags($fieldb2);
		$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NE'].'.php?lng='.$lang[1].'&pg='.$id.'">';
		$bodycorps .= $site[3].$site['NE'].'.php?lng='.$lang[1].'&pg='.$id.'</a></p>';
		$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom39.' </legend>'.ForceToAbsolute($fieldc2).'</fieldset>';
		$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1].'">';
		$bodycorps .= $site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1]."</a></p>";
	}
	eMailHtmlTo($sujet, $bodycorps, $to, $from);
	$lsn++;
    if ($lsn < count($lst) && !empty($npp) && !empty($dep) && $lsn%$npp == 0 ) sleep($dep);
	$nextstep = "PopupWindow(\"newsmail.php?lng=".$lng."&id=".$id."&selgroup=".$selgroup."&from=".$from."&lsn=".$lsn."&npp=".$npp."&dep=".$dep."\",\"newsmail\",400,225,\"no\",\"no\")";
}
else {
    echo '
<hr />
<p style="width:100%;margin:auto;text-align:center;"><b>'.$admin[522].'</b></p>
<br />';
    $nextstep = "";
	@unlink(TEMPREP.'newstemp.dtb');
}
echo '
</fieldset>';
if ($nextstep != "") {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
newssend.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/newssend.inc'
View Content
<?php
/*******************************************************************************
 *   Send News
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[33] == '') {
        $nomzone = $admin[546];
        include 'access.inc' ;
        exit();
    }
}
$actioncomplete = '';
$action   = import('action');
$idpg     = import('idpg', '', true, 1);
$lsn      = import('lsn', '', true, 0);
$id       = import('id');
$selgroup = import('selgroup', 'POST');
$from     = import('from', 'POST');

/// Nombre de nouvelles par page
$nbpg = 8;

include_once CHEMIN.'inc/func_groupsnwl.php';

$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1148]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1148], '100%');
CreateDir(TEMPREP);


$dbwork = SelectDBFieldsByStatus(SelectDBFieldsByType(ReadDBFields(DOCID),TYP_NEWS),'a');
@rsort($dbwork);

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1092&mnuid=937&tconfig=0#z2').$admin[529].'</p>
<hr />
';

$count = count($dbwork);
if (!isset($idpg)) {
    $idpg = 1;
} else {
    while ($count <= ($idpg - 1)* $nbpg) $idpg--;
}

if ($action != 'send') {
	if (empty($dbwork)) {
		echo '
<p style="text-align:center;">
	<strong>'.$admin[1149].'</strong>
</p>
		';
	} else {
		echo '
<br />
<p class="forum w-100 my-0 mx-auto" style="max-width:900px;">
  '.$admin[1082].'
</p>
		';
		$navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=newssend&amp;idpg=', $count, $idpg, $nbpg);
		if (!empty($navbar)) {
			echo '
<hr />
<div style="text-align:center">'.$navbar.'</div>
<hr />
			';
		}
		for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
			ReadDoc($dbwork[$i][1]);
			$class = $i % 2 == 0 ? 'rep' : 'quest';
			echo '
<p class="'.$class.' w-100 my-0 mx-auto" style="max-width:900px;">
  <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=newssend&amp;id='.$dbwork[$i][1].'&amp;action=edit" title="">'.$admin[756].'<b>'.($lng == $lang[0] ? $fieldb1 : $fieldb2).'</b></a>
</p>
			';
		}
	}
	echo '
<br />';
}

if ($action == "edit") {
	ReadDoc($id);
	$bodycorps1 = ForceToAbsolute($fieldc1);
	echo '
<hr />
<p style="text-align:center;"><b>'.$admin[528].'</b> '.$flag1.'</p>
<br />
<p>'.$admin[527].' '.$user[1].'</p>
<p>'.$admin[526].'</p>
<p>'.$admin[525].' '.$fieldb1.'</p>
<p style="text-align:center;">'.$admin[1709].$admin[1710].'</p>
<fieldset style="padding:15px;"><legend> '.getLabel($nom[38]).' </legend>'.$bodycorps1.'</fieldset>
	';
	include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
	echo '
<p style="text-align:center;font-size:0.75em;">'.$admin[533].'</p>
	';
	include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
	if ($lang[1] != "") {
		$bodycorps2 = ForceToAbsolute($fieldc2);
		echo '
<p><br /></p>
<p style="text-align:center;"><b>'.$admin[528].'</b> '.$flag2.'</p>
<br />
<p>'.$admin[527].' '.$user[1].'</p>
<p>'.$admin[526].'</p>
<p>'.$admin[525].' '.$fieldb2.'</p>
<p style="text-align:center;">'.$admin[1709].$admin[1710].'</p>
<fieldset style="padding:15px;"><legend> '.getLabel($nom[39]).' </legend>'.$bodycorps2.'</fieldset>
		';
		include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
		echo '
<p style="text-align:center;font-size:0.75em;"">'.$admin[533].'</p>
		';
		include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
	}
	echo '
<p style="text-align:center;">'
  .$boutonleft.'
  <button type="button" title="'.$admin[757].'" class="btn btn-info btn-md" 
    onClick="self.location.href=\'admin.php?lng='.$lng.'&amp;pg=newssend&amp;action=send&amp;id='.$id.'&amp;lsn=-1\'">'.$admin[757].'</button>'
  .$boutonright.'
</p>
	';
	$listabon = ReadDBFields(NEWSLET_LIST);
	if (!empty($listabon)) {
		echo '
<br />
<fieldset>
<legend>'.$admin[1151].'</legend>
<div style="text-align:center;">
<form name="sellist" method="POST" action="admin.php?lng='.$lng.'&amp;pg=newssend&amp;action=send&amp;id='.$id.'">';
    $domserv = $_SERVER['HTTP_HOST'];
    $domcol  = explode('@', $userprefs[2])[1];
/*
    if (strpos($domserv, $domcol) !== false) {
        echo '
    <p style="text-align:center;">
      <b>'.$admin[1191].'</b> :&nbsp;&nbsp;<label for="webmestre">'.$admin[718].'</label>&nbsp;
      <input type="radio" id="webmestre" name="from" value="'.$user[1].'"'.checked($from == $admin[718]).' /> &nbsp;
      <label for="user">'.$userprefs[1].'</label> <input type="radio" id="user" name="from" value="'.$userprefs[2].'"'.checked($from == $userprefs[1]).' /> 
    </p>';
    }
    else {
*/
        $from = $user[1];
        echo '
    <p style="text-align:center;">
      <b>'.$admin[1191].'</b> :&nbsp;&nbsp;'.$from.'
    </p>';
 //   }
    echo '
	<select class="form-control mx-auto" name="selgroup" style="width:160px;">
		<option value="all_subscribers">'.$admin[1150].'</option>
		';
		$grps = ReadGroupsNewsletter();
		foreach ($grps as $grp=>$group) {
			echo '
		<option value="'.$grp.'"'.Selected($fieldmod == $grp).'>'.$grp.' ('.count($grps[$grp]).')</option>
			';
		}
		echo '
	</select>
	<br />
	<p style="text-align:center;">'.SubmitButton($admin[523]).'</p>
</form>
</div>
</fieldset>
		';
	}
} 
elseif ($action == 'send') {
    CreateDir(TEMPREP);
	echo '
<fieldset>
	';
	if ($lsn != -1) {
		$listabon = ReadDBFields(NEWSLET_LIST);
		if ($selgroup == 'all_subscribers') {
			$lst = $listabon;
		}
		else {
			$lst  = array();
			$grps = ReadGroupsNewsletter();
			if (count($grps[$selgroup]) > 0)
				foreach ($grps[$selgroup] as $abongrp) {
					foreach ($listabon as $abonlst) {
						if ($abongrp == $abonlst[0]) {
							$lst[] = $abonlst;
							break;
						}
					}
				}
		}
		WriteDBFields(TEMPREP.'newstemp.dtb', $lst);
        echo '
<p style="text-align:center;">'.$admin[524].'</p>
<p style="text-align:center;">'.count($lst).' '.$admin[516].'</p>
<hr />
<p style="text-align:center;"><b>'.$admin[522].'</b></p>
<br />';
		$firststep = "PopupWindow(\"inc/newsmail.php?lng=".$lng."&id=".$id."&selgroup=".$selgroup."&from=".$from."&lsn=".$lsn."&npp=".$serviz[58]."&dep=".$serviz[168]."\",\"newsmail\",400,225,\"no\",\"no\")";
		echo BeginJavascript().$firststep.EndJavascript();
	}
	else {
		$nom38 = getLabel($nom[38]);
		$nom38 = mb_substr($nom38, 0, 1, $charset) == '§' ? mb_substr($nom38, 1, mb_strlen($nom38 ,$charset) ,$charset) : $nom38;
		$nom39 = getLabel($nom[39]);
		$nom39 = mb_substr($nom39, 0, 1, $charset) == '§' ? mb_substr($nom39, 1, mb_strlen($nom39 ,$charset) ,$charset) : $nom39;
		ReadDoc($id);
		include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
		include CHEMIN.'inc/lang/'.$lang[0].'-web'.INCEXT;
		$to = trim(trim($supervision[10]).' '.$user[1]);
		$sujet = strip_tags($fieldb1);
		$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NE'].'.php?lng='.$lang[0].'&pg='.$id.'">';
		$bodycorps .= $site[3].$site['NE'].'.php?lng='.$lang[1].'&pg='.$id.'</a></p>';
		$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom38.' </legend>'.ForceToAbsolute($fieldc1).'</fieldset>';
		$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lang[0]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1].'">';
		$bodycorps .= $site[3].$site['NL'].".php?lng=".$lang[0]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1]."</a></p>";
		$actioncomplete = 'L';
		eMailHtmlTo($sujet, $bodycorps, $to, $from);
		if (!empty($lang[1])) {
			include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
			include CHEMIN.'inc/lang/'.$lang[1].'-web'.INCEXT;
			$sujet = strip_tags($fieldb2);
			$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
			$bodycorps .= '<a href="'.$site[3].$site['NE'].'.php?lng='.$lang[1].'&pg='.$id.'">';
			$bodycorps .= $site[3].$site['NE'].'.php?lng='.$lang[1].'&pg='.$id.'</a></p>';
			$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom39.' </legend>'.ForceToAbsolute($fieldc2).'</fieldset>';
			$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
			$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lang[1]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1].'">';
			$bodycorps .= $site[3].$site['NL'].".php?lng=".$lang[1]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1]."</a></p>";
			eMailHtmlTo($sujet, $bodycorps, $to, $from);
		}
		include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
		echo '
<p style="text-align:center;">'.$admin[758].'</p>
<p style="text-align:center;">'.$admin[759].$to.'</p>
<hr />
<p style="text-align:center;"><b>'.$admin[760].'</b></p>
<br />
		';
		echo '
<p style="text-align:center;">'.SubmitButton($admin[1152], 'self.location.href=\'admin.php?lng='.$lng.'&amp;pg=newssend&amp;action=edit&amp;id='.$id.'\'').'</p>';
	}
	echo '
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">
    '.SubmitButton($admin[1152], 'self.location.href=\'admin.php?lng='.$lng.'&pg=nwlsend&action=edit\'', $imggauche, '', 'button').'
  </div>
</div>
	';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
notes.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/notes.inc'
View Content
<?php
/*******************************************************************************
 *   Carnet de bord des administrateurs et rédacteurs
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2022 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.07 (February 24, 2022) : adaptation to php 8.1
 ******************************************************************************/

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

if ($serviz[3] == 'on' && isAdmin($userprefs[1])) {
    $lignes = ReadDBFields(ADMNOTES);
    $lignes1 = array();
    foreach ($lignes as $key => $ligne) {
        $lignes1[] = array_pad($ligne, 4, $key);
    }
    WriteDBFields(ADMNOTES, $lignes1);
    unset($lignes1);
    $lignes = ReadDBFields(ADMNOTES);
    $editor = import('editor');
    if ($editor == 'on') {
        $nblg = count($lignes);
        $idlg = import('idlg');
        $note = trim(stripslashes(import('editnote')));
        for ($i = 0; $i < $nblg; $i++) {
            if ($lignes[$i][3] == $idlg) $lignes[$i][2] = $note;
        }
        WriteDBFields(ADMNOTES, $lignes);
        $lignes = ReadDBFields(ADMNOTES);
    }
    $suppr  = import('suppr');
    if ($suppr == 'on') {
        $idlg    = import('idlg');
        $lignes1 = array();
        foreach ($lignes as $ligne) {
            if ($ligne[3] != $idlg) $lignes1[] = $ligne;
        }
        WriteDBFields(ADMNOTES, $lignes1);
        unset($lignes1);
        $lignes = ReadDBFields(ADMNOTES);
    }
    $nblg = count($lignes);
    for ($i = 0; $i < $nblg; $i++) {
        $lignes[$i][3] = $i;
    }
    WriteDBFields(ADMNOTES, $lignes);
    $lignes = ReadDBFields(ADMNOTES);
    $note = trim(stripslashes(import('note')));
    if (!empty($note)) {
        $lignes[] = array(
            GetCurrentDateTime(),
            $userprefs[1],
            $note,
            count($lignes)
            );
        while (count($lignes) > NB_NOTES) {
            array_shift($lignes);
        }
        WriteDBFields(ADMNOTES, $lignes);
    }
    $nblignes = count($lignes);
    echo '
  <style>
    .modal {
      display: inline-block;
      position: fixed;
      z-index: 99;
      left: calc(50% - 400px);
      top: 136px;
      width: 100%;
      max-width: 800px;
      height: auto;
      background-color: #FFF;
      border-radius: 8px;
    }
    @media screen and (max-width: 760px), screen and (max-device-width: 760px) {
      .modal {
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
      }
    }
  </style>
  <fieldset>'.legend($admin[937]).'
    <div class="table-responsive-md overflow-auto" style="height:300px;">
      <table class="table table-striped table-bordered w-100 bg-white">';
    $lignes = array_reverse($lignes);
    for ($i = 0; $i < $nblignes; $i++) {
        echo '
        <tr>
          <td class="p-2" style="width:140px;">'.FormatDate($lignes[$i][0]).'</td>
          <td class="p-2" style="width:160px;">'.$lignes[$i][1].'</td>
          <td class="p-2">'.htmlentities($lignes[$i][2], ENT_QUOTES, $charset).'</td>
          <td class="text-center font-weight-bold p-2" style="width:70px;font-size:1.3rem;">
            <div class="d-inline-block">
              <i class="far fa-edit align-middle c-pointer" onmouseup="montre(\'edit'.$lignes[$i][3].'\')" title="'.$admin[144].'"></i>
            </div>
            <div id="edit'.$lignes[$i][3].'" class="modal border py-2 px-4" style="display: none;">
              <div class="modal-content border-0">
                <form name="editform" action="#" method="post">
                  <input type="hidden" name="validForm" value="send" />
                  <input type="hidden" name="editor" value="on" />
                  <input type="hidden" name="idlg" value="'.$lignes[$i][3].'" />
                  <input class="form-control" type="text" name="editnote" value="'.$lignes[$i][2].'" style="max-width:100%;font-size:14px;" />
                  <div class="text-center mt-3">
                    <div class="d-inline-block">'.SubmitButton($admin[38], 'cache(\'edit'.$lignes[$i][3].'\')').'</div>
                    <div class="d-inline-block">'.SubmitButton($admin[121], 'cache(\'edit'.$lignes[$i][3].'\')', '', '', 'button').'</div>
                  </div>
                  <div class="clearfix"></div>
                </form>
              </div>
            </div>
            <div class="d-inline-block">
              <i class="far fa-times-circle align-middle text-danger c-pointer" 
                title="'.$admin[186].'" onmouseup="ConfirmSuppr'.$lignes[$i][3].'()">
              </i>
              <script>
              function ConfirmSuppr'.$lignes[$i][3].'() {
                if (confirm("'.$admin[1028].' ?'.'")) {
                  window.location="admin.php?lng='.$lng.'&suppr=on&idlg='.$lignes[$i][3].'";
                }
              }
              </script>
            </div>
          </td>
        </tr>';
    }
    echo '
      </table>
    </div>';
    echo '
    <form name="notes" method="post" action="admin.php?lng='.$lng.'">
	  <div class="text-center w-100 mx-auto mt-3">
        <div class="d-inline-block">'.$admin[938].'</div>
        <div class="d-inline-block w-100" style="max-width:800px;">
	      <input class="form-control" type="text" name="note" style="font-size:14px;"/>
        </div>
  	    <div class="d-inline-block">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
	  </div>
    </form>
  </fieldset>
<hr />';
}
?>
nwl.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/nwl.inc'
View Content
<?php
/*******************************************************************************
 *   Admin newsletter
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[33] == '') {
        $nomzone = $admin[546];
        include 'access.inc';
        exit();
    }
}

$qtype     = TYP_NWL;
$qmenu     = '<a href="admin/admin.php?lng='.$lng.'&amp;pg=newsletter">'.$admin[535].'</a> ||';
$qseeall   = $admin[539];
$qwrite    = $admin[538];
$bname     = 0;
$bemail    = 0;
$bcat      = 0;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[545];
$qintro    = '<br />'.ToHelp($lng, '&pg=1088&mnuid=937&tconfig=0#z2').$admin[531].(empty($form) ? $admin[223].$admin[1733] : '');
$qcat      = '';
$qtitre    = $admin[537];
$qcontenu  = $admin[536];
$qnouveau  = '';

include 'inc/admin.inc';
?>
nwlgroup.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/nwlgroup.inc'
View Content
<?php
/*******************************************************************************
 *   Admin newsletter groups
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
	include REDACREP.$userprefs[1].INCEXT;
	if ($drtuser[33] == '') {
		$nomzone = $admin[546];
		include 'access.inc';
		exit();
	}
}

$act    = import('act');
$group  = import('group');
$abonne = import('abonne');
$regit  = import('regit');
$idpg   = import('idpg', '', true, 1);

function abonne_sort($a, $b) {
	$a = strtolower($a[0]);
	$b = strtolower($b[0]);
	if ($a == $b) {
		return 0;
	} else {
		return $a < $b ? -1 : +1;
	}
}

include_once CHEMIN.'inc/func_groupsnwl.php';

if ($act == 'fast') {
    $dbids = explode(' ', trim(import('ids')));
    $grps  = ReadGroupsNewsletter();
    $lst   = $grps[$group];
    @sort($lst);
    $mess = '';
    foreach ($dbids as $ii) {
        $abonne = $lst[$ii];
        if (isset($_POST['s_'.$ii]) && $_POST['s_'.$ii] == 'on') {
            $mess .= (DelAbonne($group, $abonne) 
              ? ucfirst($admin[928]).' '.$group.' : '.$admin[1711].' '.$abonne.$admin[930].' !<br />' 
              : $admin[1711].' '.$abonne.' '.mb_strtolower($admin[1604], $charset).$admin[930].' !<br />');
        }
    }
    $act = 6;
}

// gestion groupes
if ($act == 5) { 
	$mess = '';
	if ($regit == 5 && $group != '') { //ajouter groupe
		$group = preg_replace('! !', '_', $group);
		$mess  = AddGroupNEWSLETTER($group) ? ucfirst($admin[928]).' '.$group.$admin[929].' !<br />' : ucfirst($admin[928]).' '.$group.$admin[931].' !<br />';
	} 
	elseif ($regit == 6) { // supprimer groupe
		$mess = (DelGroupNEWSLETTER($group) 
          ? ucfirst($admin[928]).' '.$group.$admin[930].' !<br />' 
          : ucfirst($admin[928]).' '.$group.' '.mb_strtolower($admin[1604], $charset).$admin[930].' !<br />');
	}
	$grps = ReadGroupsNewsletter();

	$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1209]);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
	htable($admin[1209], '100%');
	echo '			
	<p style="text-align:center;">'.ToHelp($lng, '&pg=1086&mnuid=937&tconfig=0#z2').$admin[1146].'</p>
	<hr />
	';
		
	echo '
<p style="text-align:center;">'.$admin[1144].'</p>
<hr />'.$mess.'
<div class="w-100 m-auto" style="max-width:420px;">
  <form name="abonnegrp" action="admin.php?lng='.$lng.'&amp;pg=nwlgroup" method="post">
    <fieldset class="w-100 m-0" style="padding:12px;">
    <div class="table-responsive-md">
    <table class="table table-bordered w-100 m-auto" style="max-width:340px;">
	  <tr class="forum">
	    <td colspan="2" style="width:68%;text-align:center;"><b>'.ucfirst($admin[928]).'</b></td>
	    <td colspan="2" style="text-align:center;"><b>'.$admin[680].'</b></td>
	  </tr>
';

	foreach ($grps as $grp=>$abonnes) {
		echo '
	  <tr class="rep">
		<td style="width:51%;text-align:left;padding:4px 0;">'.$grp.'</td>
		<td style="width:17%;text-align:center;">'.count($abonnes).'</td>
		<td style="text-align:center;">
          <a href="admin.php?lng='.$lng.'&amp;pg=nwlgroup&amp;act=6&amp;group='.$grp.'" title="'.$admin[144].' '.$grp.'">
            <i class="far fa-edit align-middle" style="font-size: 1.3rem;"></i>
          </a><br />
        </td>
		<td style="text-align:center;">
          <a href="admin.php?lng='.$lng.'&amp;pg=nwlgroup&amp;act=5&amp;regit=6&amp;group='.$grp.'" title="'.$admin[186].' '.$grp.'">
            <i class="fas fa-times text-danger align-middle" style="font-size: 1.5rem;"></i>
          </a><br />
        </td>
	  </tr>';
	}
	unset($grps);
	echo '
	</table>
    </div>
	<br />
    <input type="hidden" name="regit" value="5" />
    <input type="hidden" name="act" value="5" />
    <div class="text-center mb-3">
      <div class="d-inline-block">'.$admin[1590].' '.$admin[928].' :</div>
      <div class="d-inline-block"><input class="form-control texte" type="text" name="group" value="" style="width:196px;" /></div>
	</div>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[540], 'self.location.href=\'admin.php?lng='.$lng.'&pg=nwllist\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </fieldset>
</form>
</div>
';
}
//ajout et suppression des abonnés 
elseif ($act == 6) { 
	$aAbonnes = (array)import('aAbonnes', 'POST', FALSE);
    $mess     = '';
    if ($regit == 'add' && $group != '' && count($aAbonnes) != 0) { 
		for ($ijk = 0; $ijk < count($aAbonnes); $ijk++) {
			$abonne = $aAbonnes[$ijk];
            if (!empty($abonne))
                $mess  .= AddAbonne($group, $abonne) 
                    ? ucfirst($admin[928]).' '.$group.' 
                    : '.$admin[1711].' '.$abonne.$admin[929].' !<br />' : $admin[1711].' '.$abonne.$admin[931].' !<br />';
		}
	}
	$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="admin.php?lng='.$lng.
                '&amp;pg=nwlgroup&amp;act=5">'.$admin[925].'</a> > '.str_replace('Admin - ', '', $admin[1209].' : '.$group);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1209].' : '.$group, '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1086&mnuid=937&tconfig=0#z2').$admin[1145].'</p>
<hr />'.$mess;
    if (FileDBExist(GROUPSNWL)) {
        $grps      = ReadGroupsNewsletter();
        $lst       = $grps[$group];
        $lstabon   = array();
        $dbabonnes = ReadDBFields(NEWSLET_LIST);
        $abonnes   = array();
        $maxlen    = 0;
        foreach ($dbabonnes as $abonne) {
			if (!in_array($abonne[0], $lst)) {
                $maxlen = max($maxlen, strlen($abonne[0].$abonne[1]));
                $abonnes[] = array($abonne[0], $abonne[1]);
            } else {
                $lstabon[] = array($abonne[0], $abonne[1]);
            }
        }
        @usort($abonnes, 'abonne_sort');
        @sort($lstabon);
        $count = count($lstabon);
		echo '
<div class="w-100 m-auto" style="max-width:580px;">
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$group.' ('.$count.')</p>
  <fieldset class="w-100 m-0 pt-4">
  <form name="fast_actions" action="admin.php?lng='.$lng.'&amp;idpg='.$idpg.'&amp;pg=nwlgroup&amp;group='.$group.'&amp;act=fast" method="post">
    <div class="table-responsive-md w-100 m-auto px-1">
    <table class="table table-bordered">
	  <tr>
        <td colspan="3">
          <div class="float-right mb-2" style="padding-right:32px;">
            '.SubmitButton($admin[1602]).'
            <i class="fas fa-level-down-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </tr>
      <tr class="forum">
        <td colspan="2" style="text-align:center;"><b>'.$admin[1712].'</b></td>
        <td style="width:76px;text-align:center;"><b>'.$admin[680].'</b></td>
      </tr>';
        $nbpg = 15;
        if (!isset($idpg)) {
            $idpg = 1;
        } else {
            while ($count <= ($idpg - 1)* $nbpg) $idpg--;
        }
        $navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=nwlgroup&amp;act=6&amp;group='.$group.'&amp;idpg=', $count, $idpg, $nbpg);
        $ids    = '';
        for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
			if (!empty($lstabon[$i][0])) {
				echo '
      <tr>
	    <td class="text-left pl-1">'.$lstabon[$i][0].'</td>
	    <td class="text-left">'.$lstabon[$i][1].'</td>
	    <td class="text-center">';
                MakeRadioGroup(array( array("d", "s", $i)));
                echo '
        </td>
      </tr>';
            }
            $ids .= $i." ";
        }
        unset($grps);
        echo '
    </table>
    </div>
    <br />
    <input type="hidden" name="ids" value="'.$ids.'" />
  </form>
  <div style="text-align:center">'.$navbar.'</div><br />';
        echo '
  <form name="frmabonnes" action="admin.php?lng='.$lng.'&amp;pg=nwlgroup" method="post">
    <input type="hidden" name="regit" value="add" />
    <input type="hidden" name="act" value="6" />
    <input type="hidden" name="group" value="'.$group.'" />
    <p style="text-align:center">'.$admin[1713].' '.mb_strtolower($admin[1711], $charset).' :</p>
    <p style="text-align:center">';
        
		$size = min(20, count($abonnes) + 2);
        echo '
	  <select class="form-control w-85 m-auto" name="aAbonnes[]" multiple="multiple" size="'.$size.'" style="font-size:14px;">';
        foreach ($abonnes as $abonne) {
            $len = $maxlen + 10 - strlen($abonne[0].$abonne[1]);
            echo '
	    <option value="'.$abonne[0].'">'.$abonne[0].str_repeat('.', $len).$abonne[1].'</option>';
		}
        echo '
      </select>
    </p>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[857].' '.$admin[925], 'self.location.href=\'admin.php?lng='.$lng.'&pg=nwlgroup&act=5\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div></div>
    </div>
  </form>
  </fieldset>
</div>';
    } 
}
btable();
include CHEMIN.'admin/bpage.inc';
?>
nwllist.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/nwllist.inc'
View Content
<?php
/*******************************************************************************
 *   Admin newsletter list
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[33] == '') {
        $nomzone = $admin[546];
        include 'access.inc';
        exit();
    }
}

$idpg    = import('idpg', '', true, 1);
$tri     = import('tri', '', true, -1);
$action  = import('action');
$search  = import('search');
$spseudo = import('spseudo');
$semail  = import('semail');

/// Nombre d'abonnés par page
$nbpg = 25;

$state0 = '<br /><span style="color:red">'.$admin[732].'</span>';
$state1 = '<br /><span style="color:red">'.$admin[733].'</span>';
$state2 = '<br /><span style="color:green">'.$admin[734].'</span>';
$state3 = '<br /><span style="color:black">'.$admin[735].'</span>';
$state4 = '<br /><span style="color:black">'.$admin[736].'</span>';
$state5 = '<br /><span style="color:green">'.$admin[737].'</span>';

function pseudo_sort($a, $b) {
	global $charset;
	$a = mb_strtolower($a[0], $charset);
	$b = mb_strtolower($b[0], $charset);
	if ($a == $b) {
		return 0;
	} else {
		return $a < $b ? -1 : +1;
	}
}

function pseudo_rsort($a, $b) {
	return - pseudo_sort($a, $b);
}

function address_sort($a, $b) {
	global $charset;
	$a[1] = mb_strtolower($a[1], $charset);
	$b[1] = mb_strtolower($b[1], $charset);
	list($an, $ad) = explode('@', $a[1]);
	list($bn, $bd) = explode('@', $b[1]);
	if ($ad == $bd) {
		if ($an == $bn) {
			return 0;
		} else {
			return $an < $bn ? -1 : +1;
		}
	} else {
		return $ad < $bd ? -1 : +1;
	}
}

function address_rsort($a, $b) {
  return - address_sort($a, $b);
}

function TestEmail($email) {
	global $state0, $state1, $state2, $state3, $state4, $state5;
	$result = $state5;
	if (!preg_match("`^[a-zA-Z0-9][a-zA-Z0-9_-]*(?:\.[a-zA-Z0-9_-]+)*@[a-zA-Z0-9][a-zA-Z0-9-]*(?:\.[a-zA-Z0-9-]+)*\.[a-z]{2,6}$`", $email)) {
		$result = $state0;
	}
	return $result;
}

include_once CHEMIN.'inc/func_groupsnwl.php';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[542]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
$list = ReadDBFields(NEWSLET_LIST);
if ($search == 'ok') {
	$lst = array();
	foreach ($list as $abon) 
		if (!empty($abon[0]) && !empty($abon[1]) && ($abon[0] == $spseudo || $abon[1] == $semail)) {
			$lst[] = $abon;
			break;
		}
	if (!empty($lst)) $list = $lst;
}
for ($i = 0; $i < count($list); $i++) {
	$list[$i][3] = $i;
}

$tri = isset($tri) ? $tri : -1;
switch ($tri) {
case  1 : break;
case -1 : $list = array_reverse($list); break;
case  2 : usort($list, 'pseudo_sort'); break;
case -2 : usort($list, 'pseudo_rsort'); break;
case  3 : usort($list, 'address_sort'); break;
case -3 : usort($list, 'address_rsort'); break;
default : $tri = 1;
}

if ($action == 'fastact') {
    $list0 = ReadDBFields(NEWSLET_LIST);
    if ($search == 'ok' && 1 == count($list)) {
        $lst = array();
        foreach ($list0 as $abon) 
            if (!empty($abon[0]) && !empty($abon[1]) && $abon[0] != $spseudo && $abon[1] != $semail) {
                $lst[] = $abon;
            }
        if (!empty($lst)) {
            $list0 = $lst;
            $list  = $lst;
        }
        unset($idpg, $search);
    } else {
        $count = count($list);
        for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
            if (isset($_POST['s_'.$i]) && $_POST['s_'.$i] == 'on') {
                DestroyAbonne($list[$i][0]); // suppression dans les groupes
                unset($list0[$list[$i][3]], $list[$i]);
            }
            if (isset($_POST['selgrp_'.$i]) && $_POST['selgrp_'.$i] != '') {
                AddAbonne($_POST['selgrp_'.$i], $list[$i][0]); // ajout dans un groupe
            }
        }
        $list  = array_values($list);
        $list0 = array_values($list0);
    }
    WriteDBFields(NEWSLET_LIST, $list0);
    unset($list0);
}

$count = count($list);
if (!isset($idpg)) {
    $idpg = 1;
} else {
    while ($count <= ($idpg - 1)* $nbpg) $idpg--;
}

htable($admin[542], '100%');
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1084&mnuid=937&tconfig=0#z2').$admin[541].'</p>
<hr />';


// if (empty($list)) {
if (strlen($list[0][0]) == 0) {
    echo '
<p style="text-align:center;">
  <i class="far fa-meh-rolling-eyes"></i>
  <strong>'.$admin[543].'</strong>
</p>';
} else {
    $tris = array (1=>$admin[738], -1=>$admin[739], 2=>$admin[740], -2=>$admin[741], 3=>$admin[742], -3=>$admin[743]);
    $navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=nwllist&amp;tri='.$tri.'&amp;idpg=', $count, $idpg, $nbpg);
    echo '
<div class="w-98 m-auto">
  <div class="d-inline-block w-48 m-auto" style="height:150px; padding-bottom:20px;">
    <fieldset class="m-0">'.legend($admin[748]).'
      <form name="nwlistsort" method="post" action="admin.php?lng='.$lng.'&amp;pg=nwllist">
		<input type="hidden" name="idpg" value="'.$idpg.'" />
        <div class="text-center">
          <div class="d-inline-block">'.$admin[744].'</div>
          <div class="d-inline-block">
            <select name="tri" class="form-control align-middle">';
    foreach ($tris as $k=>$v) {
      echo '
              <option value="'.$k.'"'.Selected($k == $tri).'>'.($k == $tri ? '&bull; ' : '- ').$v.'</option>';
    }
    echo '
            </select>
          </div>
		</div>
		<div class="text-center mt-2 mx-auto">'.SubmitButton($admin[747]).'</div>
	  </form>
    </fieldset>
  </div>
  <div class="d-inline-block w-48" style="height:186px;">
    <fieldset>'.legend($admin[1392]).'
      <form name="nwlistsearch" method="post" action="admin.php?lng='.$lng.'&amp;pg=nwllist">
	    <input type="hidden" name="search" value="ok" />
        <div class="pl-2 w-100">
          <div class="d-inline-block">'.$admin[517].' :</div>
          <div class="d-inline-block w-90"><input type="text" class="form-control texte" name="spseudo" /></div>
        </div>
        <div class="mt-3 pl-2 w-100">
          <div class="d-inline-block">'.$admin[1014].' :</div>
          <div class="d-inline-block w-90"><input type="text" class="form-control texte" name="semail" /></div>
        </div>
		<div class="w-50 mt-2 mx-auto">'.SubmitButton($admin[1700]).'</div>
      </form>
    </fieldset>
  </div>
</div>
<div class="w-100 m-auto">
  <fieldset class="m-0">'.legend($admin[540].' ('.$count.')').'
    <div class="text-center">'.$navbar.'</div>
    <div class="text-center w-100 m-auto">
      <form name="nwlistdel" method="post" action="admin.php?lng='.$lng.'&amp;pg=nwllist">
      <div class="table-responsive-md">
      <table class="table table-bordered w-100">
        <td colspan="4">
          <div class="float-right mb-2" style="padding-right:30px;">
            '.SubmitButton($admin[1602]).'
            <i class="fas fa-level-down-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
        <tr class="forum">
          <td style="padding:4px;width:25%;"><strong>'.$admin[517].'</strong></td>
          <td style="padding:4px;width:42%;"><strong>'.$admin[1014].'</strong></td>
          <td style="padding:4px;width:28%;"><strong>'.ucfirst($admin[928]).'</strong></td>
          <td style="padding:4px;width:5%;"><strong>'.$admin[186].'</strong></td>
        </tr>';
    $abonnes = ReadAbonnes();
    for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
        echo '
        <tr class="'.($i % 2 == 0 ? 'rep' : 'quest').'">
          <td style="padding:4px;vertical-align:top;"><strong>'.$list[$i][0].'</strong></td>
          <td style="padding:4px;"><strong>'.$list[$i][1].'</strong>'.TestEmail($list[$i][1]).'</td>';
        $grps    = !empty($abonnes[$list[$i][0]]) ? $abonnes[$list[$i][0]] : array();
        $strgrps = '';
        foreach ($grps as $grp) $strgrps .= $grp.'<br />';
        $groups = ReadGroupsNewsletter();
        $lstgrp = '';
        foreach ($groups as $group=>$abon) {
            if (!in_array($group, $grps)) $lstgrp .= '<option value="'.$group.'">'.$group.'</option>';
        }
        $select = empty($lstgrp) ? '' : '
          <div class="float-right">
            <select class="form-control" name="selgrp_'.$i.'" style="width:120px;">
              <option value="">-- '.$admin[1485].' --</option>
              '.$lstgrp.'
            </select>
          </div>';
        echo '
          <td>'.$strgrps.$select.'<div class="c-right"></div></td>
          <td class="align-middle text-center">';
        echo MakeRadioGroup(array(array('d', 's', $i)));
        echo '
          </td>
        </tr>';
    }
    echo '
        <td colspan="4">
          <div class="float-right mb-2" style="padding-right:30px;">
            '.SubmitButton($admin[1602]).'
            <i class="fas fa-level-up-alt align-middle" style="font-size: 1.4rem;"></i>
          </div>
        </td>
      </table>
      </div>
      <input type="hidden" name="search" value="'.$search.'" />';
    if ($search == 'ok' && 1 == count($list)) {
        echo '
      <input type="hidden" name="spseudo" value="'.$list[0][0].'" />
      <input type="hidden" name="semail" value="'.$list[0][1].'" />';
    }
    echo '
      <input type="hidden" name="action" value="fastact" />
      <input type="hidden" name="idpg" value="'.$idpg.'" />
      <input type="hidden" name="tri" value="'.$tri.'" />
    </form>
  </div>';
	echo '
  <div style="text-align:center">'.$navbar.'</div>
</fieldset>
</div>';
}
btable();
include CHEMIN.'admin/bpage.inc';
?>
nwlmail.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/nwlmail.php'
View Content
<?php
/*******************************************************************************
 *   Send Newsletter
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.11 (March 09, 2023) : correction $bodycorps
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../../');
include CHEMIN.'admin/includes.inc';
CreateDir(TEMPREP);

$lng      = import('lng');
$lsn      = import('lsn', '', true, 0);
$id       = import('id');
$selgroup = import('selgroup');
$npp      = import('npp', '', true, $lsn);
$dep      = import('dep', '', true, 1);
$from     = import('from');

if (is_file(CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT))
    include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
else
    die('BAD Language name !');

$lst = ReadDBFields(TEMPREP.'nwltemp.dtb');

echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
<title>'.$admin[546].'</title>
'.JavascriptFile(CHEMIN.'inc/hpage.js').'
</head>
<body bgcolor="#FFFFFF" style="margin:5px; overflow: hidden;">
<fieldset style="width:100%;margin:auto;max-width:300px;">';
if ($lsn != -1) {
    echo '
<p style="width:100%;margin:auto;text-align:center;">'.$admin[524].'</p>
<p style="width:100%;margin:auto;text-align:center;">'.Min($lsn+1,count($lst)).' / '.count($lst).' '.$admin[516].'</p>';
}
if ($lsn < count($lst)) {
	$nom38 = getLabel($nom[38]);
	$nom38 = mb_substr($nom38, 0, 1, $charset) == '§' ? mb_substr($nom38, 1, mb_strlen($nom38 ,$charset) ,$charset) : $nom38;
	$nom39 = getLabel($nom[39]);
	$nom39 = mb_substr($nom39, 0, 1, $charset) == '§' ? mb_substr($nom39, 1, mb_strlen($nom39 ,$charset) ,$charset) : $nom39;
    ReadDoc($id);
	$to = $lst[$lsn][1];
	if ($lst[$lsn][2] == $lang[0]) {
		include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
		$sujet = strip_tags($fieldb1);
		$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].'.php?lng='.$lang[0].'&pg='.$id.'&nlpseudo='.$lst[$lsn][0].'&nlgrp='.$selgroup.'">';
		$bodycorps .= $site[3].$site['NL'].'.php?lng='.$lang[0].'&pg='.$id.'&nlpseudo='.$lst[$lsn][0].'&nlgrp='.$selgroup.'</a></p>';
		$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom38.' </legend>'.ForceToAbsolute($fieldc1).'</fieldset>';
		$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlsecure=on&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1].'">';
		$bodycorps .= $site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlsecure=on&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1]."</a></p>";
	}
	else {
		include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
		$sujet = strip_tags($fieldb2);
		$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].'.php?lng='.$lang[1].'&pg='.$id.'&nlpseudo='.$lst[$lsn][0].'&nlgrp='.$selgroup.'">';
		$bodycorps .= $site[3].$site['NL'].'.php?lng='.$lang[1].'&pg='.$id.'&nlpseudo='.$lst[$lsn][0].'&nlgrp='.$selgroup.'</a></p>';
		$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom39.' </legend>'.ForceToAbsolute($fieldc2).'</fieldset>';
		$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlsecure=on&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1].'">';
		$bodycorps .= $site[3].$site['NL'].".php?lng=".$lst[$lsn][2]."&action=unsub&nlsecure=on&nlpseudo=".$lst[$lsn][0]."&nlmail=".$lst[$lsn][1]."</a></p>";
	}
	eMailHtmlTo($sujet, $bodycorps, $to, $from);
	$lsn++;
    if ($lsn < count($lst) && !empty($npp) && !empty($dep) && $lsn%$npp == 0 ) sleep($dep);
	$nextstep = "PopupWindow(\"nwlmail.php?lng=".$lng."&id=".$id."&selgroup=".$selgroup."&from=".$from."&lsn=".$lsn."&npp=".$npp."&dep=".$dep."\",\"nwlmail\",400,225,\"no\",\"no\")";
}
else {
    echo '
<hr />
<p style="width:100%;margin:auto;text-align:center;"><b>'.$admin[522].'</b></p>
<br />';
    $nextstep = "";
	@unlink(TEMPREP.'nwltemp.dtb');
}
echo '
</fieldset>';
if ($nextstep != "") {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
nwlsend.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/nwlsend.inc'
View Content
<?php
/*******************************************************************************
 *   Send Newsletter
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[33] == '') {
        $nomzone = $admin[546];
        include 'access.inc';
        exit();
    }
}

include_once CHEMIN.'inc/func_groupsnwl.php';
$actioncomplete = '';
$action   = import('action');
$idpg     = import('idpg', '', true, 1);
$lsn      = import('lsn', '', true, 0);
$id       = import('id');
$selgroup = import('selgroup', 'POST');
$from     = import('from', 'POST');

/// Nombre de lettres par page
$nbpg = 8;

$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[530]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[530], '100%');

$dbwork = SelectDBFieldsByStatus(SelectDBFieldsByType(ReadDBFields(DOCID),TYP_NWL),'a');
@rsort($dbwork);

$count = count($dbwork);
if (!isset($idpg)) {
    $idpg = 1;
} else {
    while ($count <= ($idpg - 1)* $nbpg) $idpg--;
}

if ($action != 'send') {
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1090&mnuid=937&tconfig=0#z2').$admin[529].'</p>
<hr />
';
	if (empty($dbwork)) {
		echo '
<p style="text-align:center;">
  <strong>'.$admin[1149].'</strong>
</p>
		';
	} else {
		echo '
<br />
<p class="forum w-100 my-0 mx-auto" style="max-width:900px;">
  '.$admin[1081].'
</p>
		';
		$navbar = GetNavBar('admin.php?lng='.$lng.'&amp;pg=nwlsend&amp;idpg=', $count, $idpg, $nbpg);
		if (!empty($navbar)) {
			echo '
<hr />
<div style="text-align:center">'.$navbar.'</div>
<hr />
			';
		}
		for ($i = ($idpg - 1)*$nbpg; $i < Min($nbpg*$idpg, $count); $i++) {
			ReadDoc($dbwork[$i][1]);
			$class = $i % 2 == 0 ? 'rep' : 'quest';
			echo '
<p class="'.$class.' w-100 my-0 mx-auto" style="max-width:900px;">
  <a href="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=nwlsend&amp;id='.$dbwork[$i][1].'&amp;action=edit" title="">'.$admin[756].'<b>'.$fieldb1.'</b></a>
</p>
			';
		}
	}
	echo '
<br />
	';
}

if ($action == "edit") {
    ReadDoc($id);
    $bodycorps1 = ForceToAbsolute($fieldc1);
    include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
    echo '
<hr />
<p style="text-align:center;"><b>'.$admin[528].'</b> '.$flag1.'</i></p>
<br />
<p>'.$admin[527].' '.$user[1].'</p>
<p>'.$admin[526].'</p>
<p>'.$admin[525].' '.$fieldb1.'</p>
<p style="text-align:center;">'.$admin[1709].$admin[1710].'</p>
<fieldset style="padding:15px;"><legend> '.getLabel($nom[38]).' </legend>'.$bodycorps1.'</fieldset>
	';
    echo '
<p style="text-align:center;font-size:0.75em;">'.$admin[533].'</p>
	';
    if ($lang[1] != "") {
        include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
        $bodycorps2 = ForceToAbsolute($fieldc2);
        echo '
<p><br /></p>
<p style="text-align:center;"><b>'.$admin[528].'</b> '.$flag2.'</p>
<br />
<p>'.$admin[527].' '.$user[1].'</p>
<p>'.$admin[526].'</p>
<p>'.$admin[525].' '.$fieldb2.'</p>
<p style="text-align:center;">'.$admin[1709].$admin[1710].'</p>
<fieldset style="padding:15px;"><legend> '.getLabel($nom[39]).' </legend>'.$bodycorps2.'</fieldset>
		';
        echo '
<p style="text-align:center;font-size:0.75em;">'.$admin[533].'</p>
		';
    }
    include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
    echo '
<p style="text-align:center;">'
  .$boutonleft.'
  <button type="button" title="'.$admin[757].'" class="btn btn-info btn-md" 
    onClick="self.location.href=\'admin.php?lng='.$lng.'&amp;pg=nwlsend&amp;action=send&amp;id='.$id.'&amp;lsn=-1\'">'.$admin[757].'</button>'
  .$boutonright.'
</p>
	';
    $listabon = ReadDBFields(NEWSLET_LIST);
    if (!empty($listabon)) {
        echo '
<br />
<fieldset>
<legend>'.$admin[1151].'</legend>
<div style="text-align:center;">
<form name="sellist" method="POST" action="admin.php?lng='.$lng.'&amp;pg=nwlsend&amp;action=send&amp;id='.$id.'">';
    $domserv = $_SERVER['HTTP_HOST'];
    $domcol  = explode('@', $userprefs[2])[1];
/*
	if (strpos($domserv, $domcol) !== false) {
        echo '
    <p style="text-align:center;">
      <b>'.$admin[1191].'</b> :&nbsp;&nbsp;<label for="webmestre">'.$admin[718].'</label>&nbsp;
      <input type="radio" id="webmestre" name="from" value="'.$user[1].'"'.checked($from == $admin[718]).' /> &nbsp;
      <label for="user">'.$userprefs[1].'</label> <input type="radio" id="user" name="from" value="'.$userprefs[2].'"'.checked($from == $userprefs[1]).' /> 
    </p>';
    }
    else {
*/
        $from = $user[1];
        echo '
    <p style="text-align:center;">
      <b>'.$admin[1191].'</b> :&nbsp;&nbsp;'.$from.'
    </p>';
//    }
    echo '
	<select class="form-control w-100 mx-auto" name="selgroup" style="max-width:160px;">
		<option value="all_subscribers">'.$admin[1150].'</option>
		';
		$grps = ReadGroupsNewsletter();
		foreach ($grps as $grp=>$group) {
			echo '
		<option value="'.$grp.'"'.Selected($fieldmod == $grp).'>'.$grp.' ('.count($grps[$grp]).')</option>
			';
		}
		echo '
	</select>
	<br />
	<p style="text-align:center;">'.SubmitButton($admin[523]).'</p>
</form>
</div>
</fieldset>
		';
    }
}
elseif ($action == 'send') {
    CreateDir(TEMPREP);
	echo '
<fieldset>
	';
	if ($lsn != -1) {
    echo BeginJavascript().'alert("'.$serviz[58].' - '.$serviz[168].' - '.$lsn.'";'.EndJavascript();
		$listabon = ReadDBFields(NEWSLET_LIST);
		if ($selgroup == 'all_subscribers') {
			$lst = $listabon;
		}
		else {
			$lst  = array();
			$grps = ReadGroupsNewsletter();
			if (count($grps[$selgroup]) > 0)
				foreach ($grps[$selgroup] as $abongrp) {
					foreach ($listabon as $abonlst) {
						if ($abongrp == $abonlst[0]) {
							$lst[] = $abonlst;
							break;
						}
					}
				}
		}
		WriteDBFields(TEMPREP.'nwltemp.dtb', $lst);
        echo '
<p style="text-align:center;">'.$admin[524].'</p>
<p style="text-align:center;">'.count($lst).' '.$admin[516].'</p>
<hr />
<p style="text-align:center;"><b>'.$admin[522].'</b></p>
<br />';
		$firststep = "PopupWindow(\"inc/nwlmail.php?lng=".$lng."&id=".$id."&selgroup=".$selgroup."&from=".$from."&lsn=".$lsn."&npp=".$serviz[58]."&dep=".$serviz[168]."\",\"nwlmail\",400,225,\"no\",\"no\")";
		echo BeginJavascript().$firststep.EndJavascript();
	}
	else {
		$nom38 = getLabel($nom[38]);
		$nom38 = mb_substr($nom38, 0, 1, $charset) == '§' ? mb_substr($nom38, 1, mb_strlen($nom38 ,$charset) ,$charset) : $nom38;
		$nom39 = getLabel($nom[39]);
		$nom39 = mb_substr($nom39, 0, 1, $charset) == '§' ? mb_substr($nom39, 1, mb_strlen($nom39 ,$charset) ,$charset) : $nom39;
		ReadDoc($id);
		include CHEMIN.'inc/lang/'.$lang[0].'-admin'.INCEXT;
		$to = trim(trim($supervision[10]).' '.$user[1]);
		$sujet = strip_tags($fieldb1);
		$bodycorps  = '<p style="text-align:center;">'.$admin[1709].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].'.php?lng='.$lang[0].'&pg='.$id.'&nlpseudo='.$user[0].'&nlgrp=all_subscribers">';
		$bodycorps .= $site[3].$site['NL'].'.php?lng='.$lang[0].'&pg='.$id.'</a></p>';
		$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom38.' </legend>'.ForceToAbsolute($fieldc1).'</fieldset>';
		$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
		$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lang[0]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1].'">';
		$bodycorps .= $site[3].$site['NL'].".php?lng=".$lang[0]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1]."</a></p>";
		$actioncomplete = 'L';
		eMailHtmlTo($sujet, $bodycorps, $to, $from);
		if (!empty($lang[1])) {
			include CHEMIN.'inc/lang/'.$lang[1].'-admin'.INCEXT;
			$sujet = strip_tags($fieldb2);
			$bodycorps .= '<br /><br /><p style="text-align:center;">'.$admin[1709].'<br />';
			$bodycorps .= '<a href="'.$site[3].$site['NL'].'.php?lng='.$lang[1].'&pg='.$id.'&nlpseudo='.$user[0].'&nlgrp=all_subscribers">';
			$bodycorps .= $site[3].$site['NL'].'.php?lng='.$lang[1].'&pg='.$id.'</a></p>';
			$bodycorps .= '<fieldset style="padding:15px;"><legend> '.$nom39.' </legend>'.ForceToAbsolute($fieldc2).'</fieldset>';
			$bodycorps .= '<p style="text-align:center;font-size:0.75em;">'.$admin[549].'<br />';
			$bodycorps .= '<a href="'.$site[3].$site['NL'].".php?lng=".$lang[1]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1].'">';
			$bodycorps .= $site[3].$site['NL'].".php?lng=".$lang[1]."&action=unsub&nlpseudo=".$user[0]."&nlmail=".$user[1]."</a></p>";
			eMailHtmlTo($sujet, $bodycorps, $to, $from);
		}
		include CHEMIN.'inc/lang/'.$lng.'-admin'.INCEXT;
		echo '
<p style="text-align:center;">'.$admin[758].'</p>
<p style="text-align:center;">'.$admin[759].$to.'</p>
<hr />
<p style="text-align:center;"><b>'.$admin[760].'</b></p>
<br />
		';
		echo '
<p style="text-align:center;">'.SubmitButton($admin[1153], 'self.location.href=\'admin.php?lng='.$lng.'&amp;pg=nwlsend&amp;action=edit&amp;id='.$id.'\'').'</p>';
	}
	echo '
</fieldset>
<div class="row quest p-0 mt-2 w-100 m-auto">
  <div class="col-md-6">
    '.SubmitButton($admin[1153], 'self.location.href=\'admin.php?lng='.$lng.'&pg=nwlsend&action=edit\'', $imggauche, '', 'button').'
  </div>
</div>
	';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
optddmenu.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/optddmenu.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Articles
 *******************************************************************************
 *   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.19 (August 26, 2024) : Correct TOhelp
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1210];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$ddmenubox = import('ddmenubox');
$dbmenu    = SelectDBFieldsByField(ReadDBFields(DBDDMENUBOX), 4, $ddmenubox);
$typmenu   = $dbmenu[0][1];

$qtype     = TYP_OPTDDMENU;
$bname     = 1;
$bemail    = 1;
$bcat      = $typmenu == 'DDL' ? 0 : 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = $typmenu == 'DDL' ? 0 : 1;
$qformonly = 0;
$qtitle    = $admin[1219];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1036&mnuid=937&tconfig=0#z2').'</p>'.$admin[1223].'<strong>'.$dbmenu[0][$lang[0] == $lng ? 2 : 3].'</strong>'.(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[1224];
$qwrite    = $admin[1225];
$qcat      = $typmenu == 'DDL' ? '' : $admin[1353];
$qtitre    = $admin[1226];
$qcontenu  = $typmenu == 'DDL' ? $admin[1389] : $admin[1231];
$qnouveau  = $typmenu == 'DDL' ? '' : $admin[1228];

include 'inc/admin.inc';
?>
optmenu.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/optmenu.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Articles
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1210];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$menubox   = import('menubox');
$dbmenu    = SelectDBFieldsByField(ReadDBFields(DBMENUBOX), 4, $menubox);

$qtype     = TYP_OPTMENU;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[1219];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1148&mnuid=1030&tconfig=0#z2').'</p>'.$admin[1223].'<strong>'.$dbmenu[0][$lang[0] == $lng ? 2 : 3].' ( n° '.$menubox.' )</strong>'.(empty($form) ? $admin[223].$admin[1733] : '');
$qseeall   = $admin[1224];
$qwrite    = $admin[1225];
$qcat      = $admin[1227];
$qtitre    = $admin[1226];
$qcontenu  = $admin[1231];
$qnouveau  = $admin[1228];

include 'inc/admin.inc';
?>
photo.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/photo.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Photos
 *******************************************************************************
 *   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 :
 * vv6.00.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[18] == '') {
        $nomzone = $admin[322];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_PHOTO;
$bname     = 1;
$bemail    = 1;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[323];
$qintro    = '<br />'.ToHelp($lng, '&pg=1038&mnuid=937&tconfig=0#z2').$admin[634].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[635];
$qwrite    = $admin[636];
$qcat      = $admin[327];
$qtitre    = $admin[328];
$qcontenu  = $admin[329];
$qnouveau  = $admin[330];

include 'inc/admin.inc';
?>
photorama.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/photorama.inc'
View Content
<?php
/*******************************************************************************
 *   Galeries photos
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Order Number and Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[18] == '') {
        $nomzone = $admin[322];
        include 'access.inc';
        exit();
    }
}

include CONFIG;
include CHEMIN.INCREP.'lang/'.$lng.'-ugadmin'.INCEXT;
$catgal = '';
$nomgal = '';
$regit  = import('regit');
$act    = import('act');
$sel    = import('sel');
$id     = import('id');
$idpg   = import('idpg');
$numgal = import('numgal');
$messageinfurgent = import('messageinfurgent');
$messageinfo = import('messageinfo');
$typevideo = array('youtube','vimeo','wistia','html5video');
$gal    = SelectDBFieldsByField(ReadDBFields(DBPHOTO), 4, $numgal);
if (@$gal[0]!= '' ) $catgal = @$gal[0][$lng == $lang[0] ? 0 : 1];
if ($catgal!= '' ) $pos    = mb_strpos($catgal, '-->');
if ($catgal!= '' ) $catgal = mb_substr($catgal, ($pos !== false ? $pos + 3 : 0));
if ($catgal!= '' ) $catgal = empty($catgal) ? '' : $catgal.' => ';
if (@$gal[0]!= '' )  $nomgal = @$gal[0][$lng == $lang[0] ? 2 : 3];
if ($nomgal!= '' ) $pos    = mb_strpos($nomgal, '-->');
if ($nomgal!= '' ) $nomgal = mb_substr($nomgal, ($pos !== false ? $pos + 3 : 0));
// LOg 
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/photorama.inc'.'_'.$dateheureminiutesecl.'.log';
$dirgal = 'gal_'.$numgal;
$dirmin = $dirgal.'/vgnt';
$def    = import('def');
$param1 = ''; // Nombre maximum de miniatures par galerie
$param2 = ''; // Largeur maximum d'une miniature
$param3 = ''; // Hauteur maximum d'une miniature
$param4 = ''; // Choix effet pour le phototrama
$param5 = ''; // Intervalle entre diapos en secondes
$param6 = ''; // Nombre maximum de miniatures par ligne
$param7 = ''; // Espace en pixels entre les miniatures
$param8 = ''; // Position des miniatures L / C / R
$param9 = ''; // Inclure dans le slishow on/off
$param10 = ''; // Galerie indépendante on/off
$param11 = ''; // Galerie indépendante on/off
$param12 = ''; // Galerie indépendante on/off
$baseurl  = 'admin.php?lng='.$lng.'&amp;pg=photorama';
$galleryvideos = array('ugdt','ugct','uggt','ugsl','ugvg');
$allowed_extensions = array("webm", "mp3", "mp4", "ogv");
$video_types = array("video/webm", "video/mp3", "video/mp4", "video/ogv");
	
$mfu      = @ini_get('max_file_uploads');

/*
max_file_uploads=20
$mfu      = @ini_get('max_file_uploads');

upload_max_filesize=256M
$maxsizefiles = @ini_get('upload_max_filesize');

post_max_size=256M
$maxpostsize = @ini_get('post_max_size');
*/
$maxsizefiles = @ini_get('upload_max_filesize');
$maxpostsizes = @ini_get('post_max_size');

function return_bytes($val) {
    $val = trim($val);
	$last = strtolower($val[strlen($val)-1]);
	$val = substr($val, 0, -1);
    switch($last) {
        // Le modifieur 'G' est disponible
        case 'g':
            $val *= 1024;
        case 'm':
            $val *= 1024;
        case 'k':
            $val *= 1024;
    }

    return $val;
}

include_once CHEMIN.'inc/func_groupscol.php';
$grpcols = ReadMembersCol();
if (!empty($userprefs[1])) {
	$myname  = $userprefs[1];
	$myemail = $userprefs[2];
}
else {
	$myname  = $user[0];
	$myemail = $user[1];
}
$grpcol  = empty($grpcol) ? (isset($grpcols[$myname]) ? (isset($grpcols[$myname][0]) ? $grpcols[$myname][0] : '') : '') : $grpcol;

function info_gd() {
	if (function_exists('gd_info')) {
		$gdinfo = gd_info();
		return '<p style="text-align:center;">GD Version : <b>'.$gdinfo['GD Version'].'</b></p>';
	}
	else return '<p style="text-align:center;color:#FF0000;">ALERTE - WARNING : Librairie GD2 absente - No library GD2</p>';
}
if ($act == '')
{	
	$act = 3;

}
if (!isset($act)) 
{
	$act = 2;

}

// actions rapides
if ($act == 'fast') { 
    $ids   = import('ids');
    $dbids = explode(' ', trim($ids));
    $data  = array();
    for ($ij = 0; $ij < count($dbids); $ij++) {
        $ii = $dbids[$ij];
        if (isset($_POST['a_'.$ii]) && $_POST['a_'.$ii] == 'on') {
            $data[] = array($ii, 'a');
        }
        elseif (isset($_POST['i_'.$ii]) && $_POST['i_'.$ii] == 'on') {
            $data[] = array($ii, 'i');
        }
        elseif (isset($_POST['d_'.$ii]) && $_POST['d_'.$ii] == 'on') {
            $data[] = array($ii, 'd');
        }
    }
    unset($dbids);
	
	if (!empty($data)) {
        $dbphoto = ReadDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
		for ($i = 0; $i < count($dbphoto); $i++) {
			for ($j = 0; $j < count($data); $j++) {
				if ($data[$j][0] == $dbphoto[$i][0]) {
					$dbphoto[$i][1] = $data[$j][1];
					break;
				}
			}
		}
		WriteDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT, $dbphoto);
		unset($dbphoto);
	}
	unset($data);
	$messageinfo = $admin[1824];
    $act = 3;
}

if ($act == 'fast2') { // suppression ou restauration apres suppression par fast
    $ids2  = import('ids2');
    $dbids = explode(' ', trim($ids2));
    $data  = array();
	for ($ij=0; $ij < count($dbids); $ij++) {
		$ii = $dbids[$ij];
        if (isset($_POST['i_'.$ii]) && $_POST['i_'.$ii] == 'on') {
			$data[] = array($ii, 'i');
		}
		elseif (isset($_POST['s_'.$ii]) && $_POST['s_'.$ii] == 'on') {
			$data[] = array($ii, 's');
		}
	}
	unset($dbids);
	
	if (!empty($data)) {
        $dbphoto = ReadDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
		for ($i = 0; $i < count($dbphoto); $i++) {
			for ($j = 0; $j < count($data); $j++) {
				if ($data[$j][0] == $dbphoto[$i][0]) {
					$dbphoto[$i][1] = $data[$j][1];
					break;
				}
			}
		}
        $dbw = array();
        for ($i = 0; $i < count($dbphoto); $i++) 
            if ($dbphoto[$i][1] == 's') {
                if (is_file(PHOTOREP.$dirgal.'/'.$dbphoto[$i][2])) unlink(PHOTOREP.$dirgal.'/'.$dbphoto[$i][2]);
				if (is_file(PHOTOREP.$dirgal.'/'.$dbphoto[$i][11])) unlink(PHOTOREP.$dirgal.'/'.$dbphoto[$i][11]);
                if (is_file(PHOTOREP.$dirmin.'/'.$dbphoto[$i][2])) unlink(PHOTOREP.$dirmin.'/'.$dbphoto[$i][2]);
            } else
                $dbw[] = $dbphoto[$i];
		WriteDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT, $dbw);
		unset($dbphoto, $dbw);
	}
	unset($data, $dbphoto);
	$messageinfo = $admin[1825];
    $act = 3;
}

/////////////////////////////////////////////////////////////////////////////////////////

$textalign = array(''=>'-- '.$admin[77].' --', 'left'=>$admin[494], 'center'=>$admin[391], 'right'=>$admin[495]);
$vertalign = array(''=>'-- '.$admin[77].' --', 'top'=>$admin[1583], 'center'=>$admin[391], 'bottom'=>$admin[1667]);
$textdir   = array(''=>'-- '.$admin[77].' --', 'left'=>$admin[494], 'right'=>$admin[495]);
$effects   = array(''=>'-- '.$admin[77].' --', 'bw'=>$ugadmin[91], 'blur'=>$ugadmin[92], 'sepia'=>$ugadmin[93]);
$appears   = array(''=>'-- '.$admin[77].' --', 'slide'=>$ugadmin[94], 'fade'=>$ugadmin[95]);
$panelpos  = array(''=>'-- '.$admin[77].' --', 'inside_bottom'=>$ugadmin[96], 'inside_top'=>$ugadmin[97], 'inside_center'=>$ugadmin[98], 'top'=>$admin[1583], 'bottom'=>$admin[1667]);
$lightbox  = array(''=>'-- '.$admin[77].' --', 'wide'=>$ugadmin[99], 'compact'=>$ugadmin[100]);
$arrowspos = array(''=>'-- '.$admin[77].' --', 'sides'=>$ugadmin[101], 'inside'=>$ugadmin[102]);
$navtype   = array(''=>'-- '.$admin[77].' --', 'bullets'=>$ugadmin[103], 'arrows'=>$ugadmin[104]);
$bullcolor = array(''=>'-- '.$admin[77].' --', 'gray'=>$ugadmin[105], 'blue'=>$ugadmin[106], 'brown'=>$ugadmin[107], 'green'=>$ugadmin[108], 'red'=>$ugadmin[109]);
$vertpos   = array(''=>'-- '.$admin[77].' --', 'top'=>$admin[1583], 'bottom'=>$admin[1667]);
$vertpos2  = array(''=>'-- '.$admin[77].' --', 'top'=>$admin[1583], 'middle'=>$admin[1666], 'bottom'=>$admin[1667]);
$transit   = array(''=>'-- '.$admin[77].' --', 'fit'=>$ugadmin[110],'down'=>$ugadmin[111],'fill'=>$ugadmin[112]);
$blorwh    = array(''=>'-- '.$admin[77].' --', 'black'=>$ugadmin[113], 'white'=>$ugadmin[114]);
$progress  = array(''=>'-- '.$admin[77].' --', 'pie'=>$ugadmin[115], 'pie2'=>$ugadmin[116], 'bar'=>$ugadmin[117]);
$thumbrole = array(''=>'-- '.$admin[77].' --', 'scroll_strip'=>$ugadmin[118], 'advance_item'=>$ugadmin[119]);
$panalign  = array(''=>'-- '.$admin[77].' --', 'top'=>$admin[1583], 'middle'=>$admin[1666], 'bottom'=>$admin[1667], 'left'=>$admin[494], 'center'=>$admin[391], 'right'=>$admin[495]);
$panelpos2 = array(''=>'-- '.$admin[77].' --', 'top'=>$admin[1583], 'bottom'=>$admin[1667], 'left'=>$admin[494], 'right'=>$admin[495]);
$gridvert  = array(''=>'-- '.$admin[77].' --', 'borders'=>$ugadmin[120], 'grid'=>$ugadmin[121], 'middle'=>$admin[1666]);
$gridhoriz = array(''=>'-- '.$admin[77].' --', 'borders'=>$ugadmin[120], 'grid'=>$ugadmin[121], 'center'=>$admin[391]);
$griddir   = array(''=>'-- '.$admin[77].' --', 'left'=>$admin[494], 'bottom'=>$admin[1667]);
$themeskin = array(''=>'-- '.$admin[77].' --', 'right-thumb'=>$ugadmin[122], 'right-title-only'=>$ugadmin[123], 'right-no-thumb'=>$ugadmin[124]);
$typvideo  = array(''=>'-- '.$admin[77].' --', 'youtube'=>'Youtube Video', 'vimeo'=>'Vimeo Video', 'html5video'=>'Html5 Video', 'wistia'=>'Wistia Video');

$strvalues = array('left','center','right','top','bottom','bw','blur','sepia','slide','fade','inside_top','inside_bottom','inside_center','wide','compact','sides',
                   'inside','bullets','arrows','gray','blue','brown','green','red','fit','down','fill','black','white','pie','pie2','bar','scroll_strip','advance_item',
                   'middle','borders','grid','right-thumb','right-title-only','right-no-thumb');

/////////////////////////////////////////////////////////////////////////////////////////

function constructTC($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal,$strvalues;
    if ($lg == '') $lg = $lng;
    
    $def_tcgo   = array(1=>'100%','150','');
    $lbl_tcgo   = array(1=>'gallery_width','gallery_min_width','gallery_background_color');
    $def_tcto   = array(1=>'250','center','3','false','3','true','2','0');
    $lbl_tcto   = array(1=>'tiles_col_width','tiles_align','tiles_space_between_cols','tiles_exact_width','tiles_space_between_cols_mobile','tiles_include_padding','tiles_min_columns','tiles_max_columns');
    $def_tctdo  = array(1=>'false','3','#F0F0F0','0','false','#8B8B8B','true','#8B8B8B','true','0.4','#000000','true','false','true','26','false','bw','false');
    $lbl_tctdo  = array(1=>'tile_enable_border','tile_border_width','tile_border_color','tile_border_radius','tile_enable_outline','tile_outline_color','tile_enable_shadow','tile_shadow_color','tile_enable_overlay','tile_overlay_opacity','tile_overlay_color','tile_enable_icons','tile_show_link_icon','tile_link_newpage','tile_space_between_icons','tile_enable_image_effect','tile_image_effect_type','tile_image_effect_reverse');
    $def_tcttpo = array(1=>'false','false','slide','inside_bottom','0.4','#000000');
    $lbl_tcttpo = array(1=>'tile_enable_textpanel','tile_textpanel_always_on','tile_textpanel_appear_type','tile_textpanel_position','tile_textpanel_background_opacity','tile_textpanel_background_color');
    $def_tclo   = array(1=>'wide','sides','false','true','10','#','0');
    $lbl_tclo   = array(1=>'lightbox_type','lightbox_arrows_position','lightbox_arrows_inside_alwayson','lightbox_slider_image_border','lightbox_slider_image_border_width','lightbox_slider_image_border_color','lightbox_slider_image_border_radius');
        
    $construct = '
<script src="inc/unitegallery/themes/tiles/ug-theme-tiles.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "tiles",';
    if (file_exists(PHOTOREP.$dirgal.'/ugtc_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugtc_'.$numgal.INCEXT;
    foreach ($def_tcgo as $key => $value) 
        if (!empty($ugtc_go[$key]) && $ugtc_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tcgo[$key].': '.(!in_array($ugtc_go[$key], $strvalues) && substr($ugtc_go[$key], -1) != '%' && $ugtc_go[$key][0] != '#' ? $ugtc_go[$key] : '"'.$ugtc_go[$key].'"').',';
    foreach ($def_tcto as $key => $value) 
        if (!empty($ugtc_to[$key]) && $ugtc_to[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tcto[$key].': '.(!in_array($ugtc_to[$key], $strvalues) && $ugtc_to[$key][0] != '#' ? $ugtc_to[$key] : '"'.$ugtc_to[$key].'"').',';
    foreach ($def_tctdo as $key => $value) 
        if (!empty($ugtc_tdo[$key]) && $ugtc_tdo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tctdo[$key].': '.(!in_array($ugtc_tdo[$key], $strvalues) && $ugtc_tdo[$key][0] != '#' ? $ugtc_tdo[$key] : '"'.$ugtc_tdo[$key].'"').',';
    foreach ($def_tcttpo as $key => $value) 
        if (!empty($ugtc_ttpo[$key]) && $ugtc_ttpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tcttpo[$key].': '.(!in_array($ugtc_ttpo[$key], $strvalues) && $ugtc_ttpo[$key][0] != '#' ? $ugtc_ttpo[$key] : '"'.$ugtc_ttpo[$key].'"').',';
    foreach ($def_tclo as $key => $value) 
        if (!empty($ugtc_lo[$key]) && $ugtc_lo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tclo[$key].': '.(!in_array($ugtc_lo[$key], $strvalues) && $ugtc_lo[$key][0] != '#' ? $ugtc_lo[$key] : '"'.$ugtc_lo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) $construct .= '
  <a href="'.(!empty($photo[9]) ? $photo[9] : '#z2').'">
    <img alt="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
      data-image="photo/'.$dirgal.'/'.$photo[2].'"
      data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      style="display:none;" />
  </a>';
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveTC() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugtc_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugtc_go[1] = stripslashes(\"".($def == 'on' ? '100%' : import('tcgo1'))."\");
\$ugtc_go[2] = stripslashes(\"".($def == 'on' ? '150' : import('tcgo2'))."\");
\$ugtc_go[3] = stripslashes(\"".($def == 'on' ? '' : import('tcgo3'))."\");

\$ugtc_to[1] = stripslashes(\"".($def == 'on' ? '250' : import('tcto1'))."\");
\$ugtc_to[2] = stripslashes(\"".($def == 'on' ? 'center' : import('tcto2'))."\");
\$ugtc_to[3] = stripslashes(\"".($def == 'on' ? '3' : import('tcto3'))."\");
\$ugtc_to[4] = stripslashes(\"".($def == 'on' ? 'false' : (import('tcto4') == 'on' ? 'true' : 'false'))."\");
\$ugtc_to[5] = stripslashes(\"".($def == 'on' ? '3' : import('tcto5'))."\");
\$ugtc_to[6] = stripslashes(\"".($def == 'on' ? 'true' : (import('tcto6') == 'on' ? 'true' : 'false'))."\");
\$ugtc_to[7] = stripslashes(\"".($def == 'on' ? '2' : import('tcto7'))."\");
\$ugtc_to[8] = stripslashes(\"".($def == 'on' ? '0' : import('tcto8'))."\");
    
\$ugtc_tdo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tctdo1') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[2] = stripslashes(\"".($def == 'on' ? '3' : import('tctdo2'))."\");
\$ugtc_tdo[3] = stripslashes(\"".($def == 'on' ? '#F0F0F0' : import('tctdo3'))."\");
\$ugtc_tdo[4] = stripslashes(\"".($def == 'on' ? '0' : import('tctdo4'))."\");
\$ugtc_tdo[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('tctdo5') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[6] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tctdo6'))."\");
\$ugtc_tdo[7] = stripslashes(\"".($def == 'on' ? 'true' : (import('tctdo7') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[8] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tctdo8'))."\");
\$ugtc_tdo[9] = stripslashes(\"".($def == 'on' ? 'true' : (import('tctdo9') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[10] = stripslashes(\"".($def == 'on' ? '0.4' : import('tctdo10'))."\");
\$ugtc_tdo[11] = stripslashes(\"".($def == 'on' ? '#000000' : import('tctdo11'))."\");
\$ugtc_tdo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('tctdo12') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('tctdo13') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('tctdo14') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[15] = stripslashes(\"".($def == 'on' ? '26' : import('tctdo15'))."\");
\$ugtc_tdo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('tctdo16') == 'on' ? 'true' : 'false'))."\");
\$ugtc_tdo[17] = stripslashes(\"".($def == 'on' ? 'bw' : import('tctdo17'))."\");
\$ugtc_tdo[18] = stripslashes(\"".($def == 'on' ? 'false' : (import('tctdo18') == 'on' ? 'true' : 'false'))."\");
    
\$ugtc_ttpo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tcttpo1') == 'on' ? 'true' : 'false'))."\");
\$ugtc_ttpo[2] = stripslashes(\"".($def == 'on' ? 'false' : (import('tcttpo2') == 'on' ? 'true' : 'false'))."\");
\$ugtc_ttpo[3] = stripslashes(\"".($def == 'on' ? 'slide' : import('tcttpo3'))."\");
\$ugtc_ttpo[4] = stripslashes(\"".($def == 'on' ? 'inside_bottom' : import('tcttpo4'))."\");
\$ugtc_ttpo[5] = stripslashes(\"".($def == 'on' ? '0.4' : import('tcttpo5'))."\");
\$ugtc_ttpo[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('tcttpo6'))."\");

\$ugtc_lo[1] = stripslashes(\"".($def == 'on' ? 'wide' : import('tclo1'))."\");
\$ugtc_lo[2] = stripslashes(\"".($def == 'on' ? 'sides' : import('tclo2'))."\");
\$ugtc_lo[3] = stripslashes(\"".($def == 'on' ? 'false' : (import('tclo3') == 'on' ? 'true' : 'false'))."\");
\$ugtc_lo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('tclo4') == 'on' ? 'true' : 'false'))."\");
\$ugtc_lo[5] = stripslashes(\"".($def == 'on' ? '10' : import('tclo5'))."\");
\$ugtc_lo[6] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('tclo6'))."\");
\$ugtc_lo[7] = stripslashes(\"".($def == 'on' ? '0' : import('tclo7'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugtc_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugtc_'.$numgal.INCEXT, constructTC($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugtc_'.$numgal.INCEXT, constructTC($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructTJ($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues;
    if ($lg == '') $lg = $lng;
    
    $def_tjgo   = array(1=>'100%','150','');
    $lbl_tjgo   = array(1=>'gallery_width','gallery_min_width','gallery_background_color');
    $def_tjto   = array(1=>'150','3');
    $lbl_tjto   = array(1=>'tiles_justified_row_height','tiles_justified_space_between');
    $def_tjtdo  = array(1=>'false','3','#F0F0F0','0','false','#8B8B8B','true','#8B8B8B','true','0.4','#000000','true','false','true','26','false','bw','false');
    $lbl_tjtdo  = array(1=>'tile_enable_border','tile_border_width','tile_border_color','tile_border_radius','tile_enable_outline','tile_outline_color','tile_enable_shadow','tile_shadow_color','tile_enable_overlay','tile_overlay_opacity','tile_overlay_color','tile_enable_icons','tile_show_link_icon','tile_link_newpage','tile_space_between_icons','tile_enable_image_effect','tile_image_effect_type','tile_image_effect_reverse');
    $def_tjttpo = array(1=>'false','false','slide','inside_bottom','0.4','#000000');
    $lbl_tjttpo = array(1=>'tile_enable_textpanel','tile_textpanel_always_on','tile_textpanel_appear_type','tile_textpanel_position','tile_textpanel_background_opacity','tile_textpanel_background_color');
    $def_tjlo   = array(1=>'wide','sides','false','true','10','#FFFFFF','0');
    $lbl_tjlo   = array(1=>'lightbox_type','lightbox_arrows_position','lightbox_arrows_inside_alwayson','lightbox_slider_image_border','lightbox_slider_image_border_width','lightbox_slider_image_border_color','lightbox_slider_image_border_radius');
    
    $construct = '
<script src="inc/unitegallery/themes/tiles/ug-theme-tiles.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "tiles",
      tiles_type: "justified",';
    if (file_exists(PHOTOREP.$dirgal.'/ugtj_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugtj_'.$numgal.INCEXT;
    foreach ($def_tjgo as $key => $value) 
        if (!empty($ugtj_go[$key]) && $ugtj_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tjgo[$key].': '.(!in_array($ugtj_go[$key], $strvalues) && substr($ugtj_go[$key], -1) != '%' && $ugtj_go[$key][0] != '#' ? $ugtj_go[$key] : '"'.$ugtj_go[$key].'"').',';
    foreach ($def_tjto as $key => $value) 
        if (!empty($ugtj_to[$key]) && $ugtj_to[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tjto[$key].': '.(!in_array($ugtj_to[$key], $strvalues) && $ugtj_to[$key][0] != '#' ? $ugtj_to[$key] : '"'.$ugtj_to[$key].'"').',';
    foreach ($def_tjtdo as $key => $value) 
        if (!empty($ugtj_tdo[$key]) && $ugtj_tdo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tjtdo[$key].': '.(!in_array($ugtj_tdo[$key], $strvalues) && $ugtj_tdo[$key][0] != '#' ? $ugtj_tdo[$key] : '"'.$ugtj_tdo[$key].'"').',';
    foreach ($def_tjttpo as $key => $value) 
        if (!empty($ugtj_ttpo[$key]) && $ugtj_ttpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tjttpo[$key].': '.(!in_array($ugtj_ttpo[$key], $strvalues) && $ugtj_ttpo[$key][0] != '#' ? $ugtj_ttpo[$key] : '"'.$ugtj_ttpo[$key].'"').',';
    foreach ($def_tjlo as $key => $value) 
        if (!empty($ugtj_lo[$key]) && $ugtj_lo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tjlo[$key].': '.(!in_array($ugtj_lo[$key], $strvalues) && $ugtj_lo[$key][0] != '#' ? $ugtj_lo[$key] : '"'.$ugtj_lo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) $construct .= '
  <a href="'.(!empty($photo[9]) ? $photo[9] : '#z2').'">
    <img alt="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
      data-image="photo/'.$dirgal.'/'.$photo[2].'"
      data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      style="display:none;" />
  </a>';
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveTJ() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugtj_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugtj_go[1] = stripslashes(\"".($def == 'on' ? '100%' : import('tjgo1'))."\");
\$ugtj_go[2] = stripslashes(\"".($def == 'on' ? '150' : import('tjgo2'))."\");
\$ugtj_go[3] = stripslashes(\"".($def == 'on' ? '' : import('tjgo3'))."\");
    
\$ugtj_to[1] = stripslashes(\"".($def == 'on' ? '150' : import('tjto1'))."\");
\$ugtj_to[2] = stripslashes(\"".($def == 'on' ? '3' : import('tjto2'))."\");

\$ugtj_tdo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjtdo1') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[2] = stripslashes(\"".($def == 'on' ? '3' : import('tjtdo2'))."\");
\$ugtj_tdo[3] = stripslashes(\"".($def == 'on' ? '#F0F0F0' : import('tjtdo3'))."\");
\$ugtj_tdo[4] = stripslashes(\"".($def == 'on' ? '0' : import('tjtdo4'))."\");
\$ugtj_tdo[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjtdo5') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[6] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tjtdo6'))."\");
\$ugtj_tdo[7] = stripslashes(\"".($def == 'on' ? 'true' : (import('tjtdo7') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[8] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tjtdo8'))."\");
\$ugtj_tdo[9] = stripslashes(\"".($def == 'on' ? 'true' : (import('tjtdo9') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[10] = stripslashes(\"".($def == 'on' ? '0.4' : import('tjtdo10'))."\");
\$ugtj_tdo[11] = stripslashes(\"".($def == 'on' ? '#000000' : import('tjtdo11'))."\");
\$ugtj_tdo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('tjtdo12') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjtdo13') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('tjtdo14') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[15] = stripslashes(\"".($def == 'on' ? '26' : import('tjtdo15'))."\");
\$ugtj_tdo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjtdo16') == 'on' ? 'true' : 'false'))."\");
\$ugtj_tdo[17] = stripslashes(\"".($def == 'on' ? 'bw' : import('tjtdo17'))."\");
\$ugtj_tdo[18] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjtdo18') == 'on' ? 'true' : 'false'))."\");
    
\$ugtj_ttpo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjttpo1') == 'on' ? 'true' : 'false'))."\");
\$ugtj_ttpo[2] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjttpo2') == 'on' ? 'true' : 'false'))."\");
\$ugtj_ttpo[3] = stripslashes(\"".($def == 'on' ? 'slide' : import('tjttpo3'))."\");
\$ugtj_ttpo[4] = stripslashes(\"".($def == 'on' ? 'inside_bottom' : import('tjttpo4'))."\");
\$ugtj_ttpo[5] = stripslashes(\"".($def == 'on' ? '0.4' : import('tjttpo5'))."\");
\$ugtj_ttpo[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('tjttpo6'))."\");

\$ugtj_lo[1] = stripslashes(\"".($def == 'on' ? 'wide' : import('tjlo1'))."\");
\$ugtj_lo[2] = stripslashes(\"".($def == 'on' ? 'sides' : import('tjlo2'))."\");
\$ugtj_lo[3] = stripslashes(\"".($def == 'on' ? 'false' : (import('tjlo3') == 'on' ? 'true' : 'false'))."\");
\$ugtj_lo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('tjlo4') == 'on' ? 'true' : 'false'))."\");
\$ugtj_lo[5] = stripslashes(\"".($def == 'on' ? '10' : import('tjlo5'))."\");
\$ugtj_lo[6] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('tjlo6'))."\");
\$ugtj_lo[7] = stripslashes(\"".($def == 'on' ? '0' : import('tjlo7'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugtj_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugtj_'.$numgal.INCEXT, constructTJ($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugtj_'.$numgal.INCEXT, constructTJ($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructTN($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues;
    if ($lg == '') $lg = $lng;
    
    $def_tngo   = array(1=>'100%','150','');
    $lbl_tngo   = array(1=>'gallery_width','gallery_min_width','gallery_background_color');
    $def_tnto   = array(1=>'true','3','3','250','2');
    $lbl_tnto   = array(1=>'tiles_enable_transition','tiles_space_between_cols','tiles_space_between_cols_mobile','tiles_nested_optimal_tile_width','tiles_min_columns');
    $def_tntdo  = array(1=>'false','3','#F0F0F0','0','false','#8B8B8B','true','#8B8B8B','true','0.4','#000000','true','false','true','26','false','bw','false');
    $lbl_tntdo  = array(1=>'tile_enable_border','tile_border_width','tile_border_color','tile_border_radius','tile_enable_outline','tile_outline_color','tile_enable_shadow','tile_shadow_color','tile_enable_overlay','tile_overlay_opacity','tile_overlay_color','tile_enable_icons','tile_show_link_icon','tile_link_newpage','tile_space_between_icons','tile_enable_image_effect','tile_image_effect_type','tile_image_effect_reverse');
    $def_tnttpo = array(1=>'false','false','slide','inside_bottom','0.4','#000000');
    $lbl_tnttpo = array(1=>'tile_enable_textpanel','tile_textpanel_always_on','tile_textpanel_appear_type','tile_textpanel_position','tile_textpanel_background_opacity','tile_textpanel_background_color');
    $def_tnlo   = array(1=>'wide','sides','false','true','10','#FFFFFF','0');
    $lbl_tnlo   = array(1=>'lightbox_type','lightbox_arrows_position','lightbox_arrows_inside_alwayson','lightbox_slider_image_border','lightbox_slider_image_border_width','lightbox_slider_image_border_color','lightbox_slider_image_border_radius');
        
    $construct = '
<script src="inc/unitegallery/themes/tiles/ug-theme-tiles.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "tiles",
      tiles_type: "nested",';
    if (file_exists(PHOTOREP.$dirgal.'/ugtn_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugtn_'.$numgal.INCEXT;
    foreach ($def_tngo as $key => $value) 
        if (!empty($ugtn_go[$key]) && $ugtn_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tngo[$key].': '.(!in_array($ugtn_go[$key], $strvalues) && substr($ugtn_go[$key], -1) != '%' && $ugtn_go[$key][0] != '#' ? $ugtn_go[$key] : '"'.$ugtn_go[$key].'"').',';
    foreach ($def_tnto as $key => $value) 
        if (!empty($ugtn_to[$key]) && $ugtn_to[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tnto[$key].': '.(!in_array($ugtn_to[$key], $strvalues) && $ugtn_to[$key][0] != '#' ? $ugtn_to[$key] : '"'.$ugtn_to[$key].'"').',';
    foreach ($def_tntdo as $key => $value) 
        if (!empty($ugtn_tdo[$key]) && $ugtn_tdo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tntdo[$key].': '.(!in_array($ugtn_tdo[$key], $strvalues) && $ugtn_tdo[$key][0] != '#' ? $ugtn_tdo[$key] : '"'.$ugtn_tdo[$key].'"').',';
    foreach ($def_tnttpo as $key => $value) 
        if (!empty($ugtn_ttpo[$key]) && $ugtn_ttpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tnttpo[$key].': '.(!in_array($ugtn_ttpo[$key], $strvalues) && $ugtn_ttpo[$key][0] != '#' ? $ugtn_ttpo[$key] : '"'.$ugtn_ttpo[$key].'"').',';
    foreach ($def_tnlo as $key => $value) 
        if (!empty($ugtn_lo[$key]) && $ugtn_lo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tnlo[$key].': '.(!in_array($ugtn_lo[$key], $strvalues) && $ugtn_lo[$key][0] != '#' ? $ugtn_lo[$key] : '"'.$ugtn_lo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) $construct .= '
  <a href="'.(!empty($photo[9]) ? $photo[9] : '#z2').'">
    <img alt="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
      data-image="photo/'.$dirgal.'/'.$photo[2].'"
      data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      style="display:none;" />
  </a>';
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveTN() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugtn_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugtn_go[1] = stripslashes(\"".($def == 'on' ? '100%' : import('tngo1'))."\");
\$ugtn_go[2] = stripslashes(\"".($def == 'on' ? '150' : import('tngo2'))."\");
\$ugtn_go[3] = stripslashes(\"".($def == 'on' ? '' : import('tngo3'))."\");

\$ugtn_to[1] = stripslashes(\"".($def == 'on' ? 'true' : (import('tnto1') == 'on' ? 'true' : 'false'))."\");
\$ugtn_to[2] = stripslashes(\"".($def == 'on' ? '3' : import('tnto2'))."\");
\$ugtn_to[3] = stripslashes(\"".($def == 'on' ? '3' : import('tnto3'))."\");
\$ugtn_to[4] = stripslashes(\"".($def == 'on' ? '250' : import('tnto4'))."\");
\$ugtn_to[5] = stripslashes(\"".($def == 'on' ? '2' : import('tnto5'))."\");
    
\$ugtn_tdo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tntdo1') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[2] = stripslashes(\"".($def == 'on' ? '3' : import('tntdo2'))."\");
\$ugtn_tdo[3] = stripslashes(\"".($def == 'on' ? '#F0F0F0' : import('tntdo3'))."\");
\$ugtn_tdo[4] = stripslashes(\"".($def == 'on' ? '0' : import('tntdo4'))."\");
\$ugtn_tdo[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('tntdo5') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[6] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tntdo6'))."\");
\$ugtn_tdo[7] = stripslashes(\"".($def == 'on' ? 'true' : (import('tntdo7') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[8] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tntdo8'))."\");
\$ugtn_tdo[9] = stripslashes(\"".($def == 'on' ? 'true' : (import('tntdo9') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[10] = stripslashes(\"".($def == 'on' ? '0.4' : import('tntdo10'))."\");
\$ugtn_tdo[11] = stripslashes(\"".($def == 'on' ? '#000000' : import('tntdo11'))."\");
\$ugtn_tdo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('tntdo12') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('tntdo13') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('tntdo14') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[15] = stripslashes(\"".($def == 'on' ? '26' : import('tntdo15'))."\");
\$ugtn_tdo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('tntdo16') == 'on' ? 'true' : 'false'))."\");
\$ugtn_tdo[17] = stripslashes(\"".($def == 'on' ? 'bw' : import('tntdo17'))."\");
\$ugtn_tdo[18] = stripslashes(\"".($def == 'on' ? 'false' : (import('tntdo18') == 'on' ? 'true' : 'false'))."\");
    
\$ugtn_ttpo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tnttpo1') == 'on' ? 'true' : 'false'))."\");
\$ugtn_ttpo[2] = stripslashes(\"".($def == 'on' ? 'false' : (import('tnttpo2') == 'on' ? 'true' : 'false'))."\");
\$ugtn_ttpo[3] = stripslashes(\"".($def == 'on' ? 'slide' : import('tnttpo3'))."\");
\$ugtn_ttpo[4] = stripslashes(\"".($def == 'on' ? 'inside_bottom' : import('tnttpo4'))."\");
\$ugtn_ttpo[5] = stripslashes(\"".($def == 'on' ? '0.4' : import('tnttpo5'))."\");
\$ugtn_ttpo[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('tnttpo6'))."\");

\$ugtn_lo[1] = stripslashes(\"".($def == 'on' ? 'wide' : import('tnlo1'))."\");
\$ugtn_lo[2] = stripslashes(\"".($def == 'on' ? 'sides' : import('tnlo2'))."\");
\$ugtn_lo[3] = stripslashes(\"".($def == 'on' ? 'false' : (import('tnlo3') == 'on' ? 'true' : 'false'))."\");
\$ugtn_lo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('tnlo4') == 'on' ? 'true' : 'false'))."\");
\$ugtn_lo[5] = stripslashes(\"".($def == 'on' ? '10' : import('tnlo5'))."\");
\$ugtn_lo[6] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('tnlo6'))."\");
\$ugtn_lo[7] = stripslashes(\"".($def == 'on' ? '0' : import('tnlo7'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugtn_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugtn_'.$numgal.INCEXT, constructTN($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugtn_'.$numgal.INCEXT, constructTN($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructTG($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues;
    if ($lg == '') $lg = $lng;
    
    $def_tgmo   = array(1=>'180','150','10','20','20');
    $lbl_tgmo   = array(1=>'tile_width','tile_height','grid_padding','grid_space_between_cols','grid_space_between_rows');
    $def_tggo   = array(1=>'100%','150','');
    $lbl_tggo   = array(1=>'gallery_width','gallery_min_width','gallery_background_color');
    $def_tgno   = array(1=>'3','bullets','40','gray','12','20','5');
    $lbl_tgno   = array(1=>'grid_num_rows','theme_navigation_type','theme_bullets_margin_top','theme_bullets_color','bullets_space_between','theme_arrows_margin_top','theme_space_between_arrows');
    $def_tgtdo  = array(1=>'false','3','#F0F0F0','0','false','#8B8B8B','true','#8B8B8B','true','0.4','#000000','true','false','true','26','false','bw','false');
    $lbl_tgtdo  = array(1=>'tile_enable_border','tile_border_width','tile_border_color','tile_border_radius','tile_enable_outline','tile_outline_color','tile_enable_shadow','tile_shadow_color','tile_enable_overlay','tile_overlay_opacity','tile_overlay_color','tile_enable_icons','tile_show_link_icon','tile_link_newpage','tile_space_between_icons','tile_enable_image_effect','tile_image_effect_type','tile_image_effect_reverse');
    $def_tgttpo = array(1=>'false','false','slide','inside_bottom','0.4','#000000');
    $lbl_tgttpo = array(1=>'tile_enable_textpanel','tile_textpanel_always_on','tile_textpanel_appear_type','tile_textpanel_position','tile_textpanel_background_opacity','tile_textpanel_background_color');
    $def_tglo   = array(1=>'wide','sides','false','true','10','#FFFFFF','0');
    $lbl_tglo   = array(1=>'lightbox_type','lightbox_arrows_position','lightbox_arrows_inside_alwayson','lightbox_slider_image_border','lightbox_slider_image_border_width','lightbox_slider_image_border_color','lightbox_slider_image_border_radius');
        
    $construct = '
<script src="inc/unitegallery/themes/tilesgrid/ug-theme-tilesgrid.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "tilesgrid",';
    if (file_exists(PHOTOREP.$dirgal.'/ugtg_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugtg_'.$numgal.INCEXT;
    foreach ($def_tgmo as $key => $value) 
        if (!empty($ugtg_mo[$key]) && $ugtg_mo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tgmo[$key].': '.(!in_array($ugtg_mo[$key], $strvalues) && $ugtg_mo[$key][0] != '#' ? $ugtg_mo[$key] : '"'.$ugtg_mo[$key].'"').',';
    foreach ($def_tggo as $key => $value) 
        if (!empty($ugtg_go[$key]) && $ugtg_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tggo[$key].': '.(!in_array($ugtg_go[$key], $strvalues) && substr($ugtg_go[$key], -1) != '%' && $ugtg_go[$key][0] != '#' ? $ugtg_go[$key] : '"'.$ugtg_go[$key].'"').',';
    foreach ($def_tgno as $key => $value) 
        if (!empty($ugtg_no[$key]) && $ugtg_no[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tgno[$key].': '.(!in_array($ugtg_no[$key], $strvalues) && $ugtg_no[$key][0] != '#' ? $ugtg_no[$key] : '"'.$ugtg_no[$key].'"').',';
    foreach ($def_tgtdo as $key => $value) 
        if (!empty($ugtg_tdo[$key]) && $ugtg_tdo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tgtdo[$key].': '.(!in_array($ugtg_tdo[$key], $strvalues) && $ugtg_tdo[$key][0] != '#' ? $ugtg_tdo[$key] : '"'.$ugtg_tdo[$key].'"').',';
    foreach ($def_tgttpo as $key => $value) 
        if (!empty($ugtg_ttpo[$key]) && $ugtg_ttpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tgttpo[$key].': '.(!in_array($ugtg_ttpo[$key], $strvalues) && $ugtg_ttpo[$key][0] != '#' ? $ugtg_ttpo[$key] : '"'.$ugtg_ttpo[$key].'"').',';
    foreach ($def_tglo as $key => $value) 
        if (!empty($ugtg_lo[$key]) && $ugtg_lo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_tglo[$key].': '.(!in_array($ugtg_lo[$key], $strvalues) && $ugtg_lo[$key][0] != '#' ? $ugtg_lo[$key] : '"'.$ugtg_lo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) $construct .= '
  <a href="'.(!empty($photo[9]) ? $photo[9] : '#z2').'">
    <img alt="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
      data-image="photo/'.$dirgal.'/'.$photo[2].'"
      data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      style="display:none;" />
  </a>';
        }
    }
    $construct .= '
</div>';

    return $construct;
}

/////////////////////////////////////////////////////////////////////////////////////////

function saveTG() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugtg_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugtg_mo[1] = stripslashes(\"".($def == 'on' ? '180' : import('tgmo1'))."\");
\$ugtg_mo[2] = stripslashes(\"".($def == 'on' ? '150' : import('tgmo2'))."\");
\$ugtg_mo[3] = stripslashes(\"".($def == 'on' ? '10' : import('tgmo3'))."\");
\$ugtg_mo[4] = stripslashes(\"".($def == 'on' ? '20' : import('tgmo4'))."\");
\$ugtg_mo[5] = stripslashes(\"".($def == 'on' ? '20' : import('tgmo5'))."\");

\$ugtg_go[1] = stripslashes(\"".($def == 'on' ? '100%' : import('tggo1'))."\");
\$ugtg_go[2] = stripslashes(\"".($def == 'on' ? '150' : import('tggo2'))."\");
\$ugtg_go[3] = stripslashes(\"".($def == 'on' ? '' : import('tggo3'))."\");

\$ugtg_no[1] = stripslashes(\"".($def == 'on' ? '3' : import('tgno1'))."\");
\$ugtg_no[2] = stripslashes(\"".($def == 'on' ? 'bullets' : import('tgno2'))."\");
\$ugtg_no[3] = stripslashes(\"".($def == 'on' ? '40' : import('tgno3'))."\");
\$ugtg_no[4] = stripslashes(\"".($def == 'on' ? 'gray' : import('tgno4'))."\");
\$ugtg_no[5] = stripslashes(\"".($def == 'on' ? '12' : import('tgno5'))."\");
\$ugtg_no[6] = stripslashes(\"".($def == 'on' ? '20' : import('tgno6'))."\");
\$ugtg_no[7] = stripslashes(\"".($def == 'on' ? '5' : import('tgno7'))."\");

\$ugtg_tdo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgtdo1') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[2] = stripslashes(\"".($def == 'on' ? '3' : import('tgtdo2'))."\");
\$ugtg_tdo[3] = stripslashes(\"".($def == 'on' ? '#F0F0F0' : import('tgtdo3'))."\");
\$ugtg_tdo[4] = stripslashes(\"".($def == 'on' ? '0' : import('tgtdo4'))."\");
\$ugtg_tdo[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgtdo5') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[6] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tgtdo6'))."\");
\$ugtg_tdo[7] = stripslashes(\"".($def == 'on' ? 'true' : (import('tgtdo7') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[8] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('tgtdo8'))."\");
\$ugtg_tdo[9] = stripslashes(\"".($def == 'on' ? 'true' : (import('tgtdo9') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[10] = stripslashes(\"".($def == 'on' ? '0.4' : import('tgtdo10'))."\");
\$ugtg_tdo[11] = stripslashes(\"".($def == 'on' ? '#000000' : import('tgtdo11'))."\");
\$ugtg_tdo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('tgtdo12') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgtdo13') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('tgtdo14') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[15] = stripslashes(\"".($def == 'on' ? '26' : import('tgtdo15'))."\");
\$ugtg_tdo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgtdo16') == 'on' ? 'true' : 'false'))."\");
\$ugtg_tdo[17] = stripslashes(\"".($def == 'on' ? 'bw' : import('tgtdo17'))."\");
\$ugtg_tdo[18] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgtdo18') == 'on' ? 'true' : 'false'))."\");
    
\$ugtg_ttpo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgttpo1') == 'on' ? 'true' : 'false'))."\");
\$ugtg_ttpo[2] = stripslashes(\"".($def == 'on' ? 'false' : (import('tgttpo2') == 'on' ? 'true' : 'false'))."\");
\$ugtg_ttpo[3] = stripslashes(\"".($def == 'on' ? 'slide' : import('tgttpo3'))."\");
\$ugtg_ttpo[4] = stripslashes(\"".($def == 'on' ? 'inside_bottom' : import('tgttpo4'))."\");
\$ugtg_ttpo[5] = stripslashes(\"".($def == 'on' ? '0.4' : import('tgttpo5'))."\");
\$ugtg_ttpo[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('tgttpo6'))."\");

\$ugtg_lo[1] = stripslashes(\"".($def == 'on' ? 'wide' : import('tglo1'))."\");
\$ugtg_lo[2] = stripslashes(\"".($def == 'on' ? 'sides' : import('tglo2'))."\");
\$ugtg_lo[3] = stripslashes(\"".($def == 'on' ? 'false' : (import('tglo3') == 'on' ? 'true' : 'false'))."\");
\$ugtg_lo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('tglo4') == 'on' ? 'true' : 'false'))."\");
\$ugtg_lo[5] = stripslashes(\"".($def == 'on' ? '10' : import('tglo5'))."\");
\$ugtg_lo[6] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('tglo6'))."\");
\$ugtg_lo[7] = stripslashes(\"".($def == 'on' ? '0' : import('tglo7'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugtg_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugtg_'.$numgal.INCEXT, constructTG($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugtg_'.$numgal.INCEXT, constructTG($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructCA($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues;
    if ($lg == '') $lg = $lng;
    
    $def_camo   = array(1=>'160','160','center');
    $lbl_camo   = array(1=>'tile_width','tile_height','theme carousel align');
    $def_cago   = array(1=>'100%','150','');
    $lbl_cago   = array(1=>'gallery_width','gallery_min_width','gallery_background_color');
    $def_caco   = array(1=>'20','3','true','3000','right');
    $lbl_caco   = array(1=>'carousel_space_between_tiles','carousel_navigation_numtiles','carousel_autoplay','carousel_autoplay_timeout','carousel_autoplay_direction');
    $def_cano   = array(1=>'true','bottom','20');
    $lbl_cano   = array(1=>'theme_enable_navigation','theme_navigation_position','theme_navigation_margin');
    $def_catdo  = array(1=>'false','3','#F0F0F0','0','false','#8B8B8B','true','#8B8B8B','true','0.4','#000000','true','false','true','26','false','bw','false');
    $lbl_catdo  = array(1=>'tile_enable_border','tile_border_width','tile_border_color','tile_border_radius','tile_enable_outline','tile_outline_color','tile_enable_shadow','tile_shadow_color','tile_enable_overlay','tile_overlay_opacity','tile_overlay_color','tile_enable_icons','tile_show_link_icon','tile_link_newpage','tile_space_between_icons','tile_enable_image_effect','tile_image_effect_type','tile_image_effect_reverse');
    $def_cattpo = array(1=>'false','false','slide','inside_bottom','0.4','#000000');
    $lbl_cattpo = array(1=>'tile_enable_textpanel','tile_textpanel_always_on','tile_textpanel_appear_type','tile_textpanel_position','tile_textpanel_background_opacity','tile_textpanel_background_color');
    $def_calo   = array(1=>'wide','sides','false','true','10','#FFFFFF','0');
    $lbl_calo   = array(1=>'lightbox_type','lightbox_arrows_position','lightbox_arrows_inside_alwayson','lightbox_slider_image_border','lightbox_slider_image_border_width','lightbox_slider_image_border_color','lightbox_slider_image_border_radius');
        
    $construct = '
<script src="inc/unitegallery/themes/carousel/ug-theme-carousel.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "carousel",';
    if (file_exists(PHOTOREP.$dirgal.'/ugca_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugca_'.$numgal.INCEXT;
    foreach ($def_camo as $key => $value) 
        if (!empty($ugca_mo[$key]) && $ugca_mo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_camo[$key].': '.(!in_array($ugca_mo[$key], $strvalues) && $ugca_mo[$key][0] != '#' ? $ugca_mo[$key] : '"'.$ugca_mo[$key].'"').',';
    foreach ($def_cago as $key => $value) 
        if (!empty($ugca_go[$key]) && $ugca_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_cago[$key].': '.(!in_array($ugca_go[$key], $strvalues) && substr($ugca_go[$key], -1) != '%' && $ugca_go[$key][0] != '#' ? $ugca_go[$key] : '"'.$ugca_go[$key].'"').',';
    foreach ($def_caco as $key => $value) 
        if (!empty($ugca_co[$key]) && $ugca_co[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_caco[$key].': '.(!in_array($ugca_co[$key], $strvalues) && $ugca_co[$key][0] != '#' ? $ugca_co[$key] : '"'.$ugca_co[$key].'"').',';
    foreach ($def_cano as $key => $value) 
        if (!empty($ugca_no[$key]) && $ugca_no[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_cano[$key].': '.(!in_array($ugca_no[$key], $strvalues) && $ugca_no[$key][0] != '#' ? $ugca_no[$key] : '"'.$ugca_no[$key].'"').',';
    foreach ($def_catdo as $key => $value) 
        if (!empty($ugca_tdo[$key]) && $ugca_tdo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_catdo[$key].': '.(!in_array($ugca_tdo[$key], $strvalues) && $ugca_tdo[$key][0] != '#' ? $ugca_tdo[$key] : '"'.$ugca_tdo[$key].'"').',';
    foreach ($def_cattpo as $key => $value) 
        if (!empty($ugca_ttpo[$key]) && $ugca_ttpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_cattpo[$key].': '.(!in_array($ugca_ttpo[$key], $strvalues) && $ugca_ttpo[$key][0] != '#' ? $ugca_ttpo[$key] : '"'.$ugca_ttpo[$key].'"').',';
    foreach ($def_calo as $key => $value) 
        if (!empty($ugca_lo[$key]) && $ugca_lo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_calo[$key].': '.(!in_array($ugca_lo[$key], $strvalues) && $ugca_lo[$key][0] != '#' ? $ugca_lo[$key] : '"'.$ugca_lo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) $construct .= '
  <a href="'.(!empty($photo[9]) ? $photo[9] : '#z2').'">
    <img alt="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
      data-image="photo/'.$dirgal.'/'.$photo[2].'"
      data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'"
      style="display:none;" />
  </a>';
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveCA() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugca_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugca_mo[1] = stripslashes(\"".($def == 'on' ? '160' : import('camo1'))."\");
\$ugca_mo[2] = stripslashes(\"".($def == 'on' ? '160' : import('camo2'))."\");
\$ugca_mo[3] = stripslashes(\"".($def == 'on' ? 'center' : import('camo3'))."\");

\$ugca_go[1] = stripslashes(\"".($def == 'on' ? '100%' : import('cago1'))."\");
\$ugca_go[2] = stripslashes(\"".($def == 'on' ? '150' : import('cago2'))."\");
\$ugca_go[3] = stripslashes(\"".($def == 'on' ? '' : import('cago3'))."\");

\$ugca_co[1] = stripslashes(\"".($def == 'on' ? '20' : import('caco1'))."\");
\$ugca_co[2] = stripslashes(\"".($def == 'on' ? '3' : import('caco2'))."\");
\$ugca_co[3] = stripslashes(\"".($def == 'on' ? 'true' : (import('caco3') == 'on' ? 'true' : 'false'))."\");
\$ugca_co[4] = stripslashes(\"".($def == 'on' ? '3000' : import('caco4'))."\");
\$ugca_co[5] = stripslashes(\"".($def == 'on' ? 'right' : import('caco5'))."\");

\$ugca_no[1] = stripslashes(\"".($def == 'on' ? 'true' : (import('cano1') == 'on' ? 'true' : 'false'))."\");
\$ugca_no[2] = stripslashes(\"".($def == 'on' ? 'bottom' : import('cano2'))."\");
\$ugca_no[3] = stripslashes(\"".($def == 'on' ? '20' : import('cano3'))."\");

\$ugca_tdo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('catdo1') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[2] = stripslashes(\"".($def == 'on' ? '3' : import('catdo2'))."\");
\$ugca_tdo[3] = stripslashes(\"".($def == 'on' ? '#F0F0F0' : import('catdo3'))."\");
\$ugca_tdo[4] = stripslashes(\"".($def == 'on' ? '0' : import('catdo4'))."\");
\$ugca_tdo[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('catdo5') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[6] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('catdo6'))."\");
\$ugca_tdo[7] = stripslashes(\"".($def == 'on' ? 'true' : (import('catdo7') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[8] = stripslashes(\"".($def == 'on' ? '#8B8B8B' : import('catdo8'))."\");
\$ugca_tdo[9] = stripslashes(\"".($def == 'on' ? 'true' : (import('catdo9') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[10] = stripslashes(\"".($def == 'on' ? '0.4' : import('catdo10'))."\");
\$ugca_tdo[11] = stripslashes(\"".($def == 'on' ? '#000000' : import('catdo11'))."\");
\$ugca_tdo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('catdo12') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('catdo13') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('catdo14') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[15] = stripslashes(\"".($def == 'on' ? '26' : import('catdo15'))."\");
\$ugca_tdo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('catdo16') == 'on' ? 'true' : 'false'))."\");
\$ugca_tdo[17] = stripslashes(\"".($def == 'on' ? 'bw' : import('catdo17'))."\");
\$ugca_tdo[18] = stripslashes(\"".($def == 'on' ? 'false' : (import('catdo18') == 'on' ? 'true' : 'false'))."\");
    
\$ugca_ttpo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('cattpo1') == 'on' ? 'true' : 'false'))."\");
\$ugca_ttpo[2] = stripslashes(\"".($def == 'on' ? 'false' : (import('cattpo2') == 'on' ? 'true' : 'false'))."\");
\$ugca_ttpo[3] = stripslashes(\"".($def == 'on' ? 'slide' : import('cattpo3'))."\");
\$ugca_ttpo[4] = stripslashes(\"".($def == 'on' ? 'inside_bottom' : import('cattpo4'))."\");
\$ugca_ttpo[5] = stripslashes(\"".($def == 'on' ? '0.4' : import('cattpo5'))."\");
\$ugca_ttpo[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('cattpo6'))."\");

\$ugca_lo[1] = stripslashes(\"".($def == 'on' ? 'wide' : import('calo1'))."\");
\$ugca_lo[2] = stripslashes(\"".($def == 'on' ? 'sides' : import('calo2'))."\");
\$ugca_lo[3] = stripslashes(\"".($def == 'on' ? 'false' : (import('calo3') == 'on' ? 'true' : 'false'))."\");
\$ugca_lo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('calo4') == 'on' ? 'true' : 'false'))."\");
\$ugca_lo[5] = stripslashes(\"".($def == 'on' ? '10' : import('calo5'))."\");
\$ugca_lo[6] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('calo6'))."\");
\$ugca_lo[7] = stripslashes(\"".($def == 'on' ? '0' : import('calo7'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugca_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugca_'.$numgal.INCEXT, constructCA($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugca_'.$numgal.INCEXT, constructCA($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructDT($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues, $typevideo;
    if ($lg == '') $lg = $lng;
    
    $def_dttmo  = array(1=>'true','true','true','true','left','480');
    $lbl_dttmo  = array(1=>'theme_enable_fullscreen_button','theme_enable_play_button','theme_enable_hidepanel_button','theme_enable_text_panel','theme_text_align','theme_hide_panel_under_width');
    $def_dtgo   = array(1=>'900','500','400','300','false','3000','');
    $lbl_dtgo   = array(1=>'gallery_width','gallery_height','gallery_min_width','gallery_min_height','gallery_autoplay','gallery_play_interval','gallery_background_color');
    $def_dtslo  = array(1=>'fill','slide','300','true','true','pie','right','top','#FFFFFF','0.6','true','true','true','true','true','false','middle','#000000','0.4');
    $lbl_dtslo  = array(1=>'slider_scale_mode','slider_transition','slider_transition_speed','slider_enable_arrows','slider_enable_progress_indicator','slider_progress_indicator_type','slider_progress_indicator_align_hor','slider_progress_indicator_align_vert','slider_progressbar_color','slider_progressbar_opacity','slider_enable_play_button','slider_enable_fullscreen_button','slider_enable_zoom_panel','slider_controls_always_on','slider_controls_appear_ontap','slider_textpanel_enable_title','slider_textpanel_text_valign','slider_textpanel_bg_color','slider_textpanel_bg_opacity');
    $def_dttho  = array(1=>'88','50','true','true','0','#000000','0','#D9D9D9','1','#D9D9D9','0','true','#000000','0.4');
    $lbl_dttho  = array(1=>'thumb_width','thumb_height','thumb_fixed_size','thumb_border_effect','thumb_border_width','thumb_border_color','thumb_over_border_width','thumb_over_border_color','thumb_selected_border_width','thumb_selected_border_color','thumb_round_corners_radius','thumb_color_overlay_effect','thumb_overlay_color','thumb_overlay_opacity');
    $def_dtstpo = array(1=>'false','2','scroll_strip','top','','left');
    $lbl_dtstpo = array(1=>'strippanel_enable_buttons','strippanel_padding_buttons','strippanel_buttons_role','strippanel_handle_align','strippanel_background_color','strip_thumbs_align');
    
    $construct = '
<script src="inc/unitegallery/themes/default/ug-theme-default.js"></script>
<link href="inc/unitegallery/themes/default/ug-theme-default.css" rel="stylesheet" type="text/css" />
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({';
    $st = '';
    if (file_exists(PHOTOREP.$dirgal.'/ugdt_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugdt_'.$numgal.INCEXT;
    foreach ($def_dttmo as $key => $value) 
        if (!empty($ugdt_tmo[$key]) && $ugdt_tmo[$key] != $value) 
            $st .= chr(10).'      '.$lbl_dttmo[$key].': '.(!in_array($ugdt_tmo[$key], $strvalues) && $ugdt_tmo[$key][0] != '#' ? $ugdt_tmo[$key] : '"'.$ugdt_tmo[$key].'"').',';
    foreach ($def_dtgo as $key => $value) 
        if (!empty($ugdt_go[$key]) && $ugdt_go[$key] != $value) 
            $st .= chr(10).'      '.$lbl_dtgo[$key].': '.(!in_array($ugdt_go[$key], $strvalues) && substr($ugdt_go[$key], -1) != '%' && $ugdt_go[$key][0] != '#' ? $ugdt_go[$key] : '"'.$ugdt_go[$key].'"').',';
    foreach ($def_dtslo as $key => $value) 
        if (!empty($ugdt_slo[$key]) && $ugdt_slo[$key] != $value) 
            $st .= chr(10).'      '.$lbl_dtslo[$key].': '.(!in_array($ugdt_slo[$key], $strvalues) && $ugdt_slo[$key][0] != '#' ? $ugdt_slo[$key] : '"'.$ugdt_slo[$key].'"').',';
    foreach ($def_dttho as $key => $value) 
        if (!empty($ugdt_tho[$key]) && $ugdt_tho[$key] != $value) 
            $st .= chr(10).'      '.$lbl_dttho[$key].': '.(!in_array($ugdt_tho[$key], $strvalues) && $ugdt_tho[$key][0] != '#' ? $ugdt_tho[$key] : '"'.$ugdt_tho[$key].'"').',';
    foreach ($def_dtstpo as $key => $value) 
        if (!empty($ugdt_stpo[$key]) && $ugdt_stpo[$key] != $value) 
            $st .= chr(10).'      '.$lbl_dtstpo[$key].': '.(!in_array($ugdt_stpo[$key], $strvalues) && $ugdt_stpo[$key][0] != '#' ? $ugdt_stpo[$key] : '"'.$ugdt_stpo[$key].'"').',';
    $construct .= empty($st) ? '' : substr($st, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) {
                $construct .= '
  <img alt="'.$nomgal.'"';
                if (in_array($photo[10], array('youtube','vimeo','html5video','wistia'))) $construct .= '
    data-type="'.$photo[10].'"';
                if ($photo[10] != 'youtube') $construct .= '
    src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
    data-image="photo/'.$dirgal.'/'.$photo[2].'"';
                if (in_array($photo[10], $typevideo)) $construct .= '
    data-videoid="'.$photo[11].'"';
                if ($photo[10] == 'html5video') {
                    $infos      = pathinfo($photo[11]);
//                    $photoname  = $infos['dirname'].'/'.$infos['filename'];
					$photoname  = $infos['filename'];
                    $construct .= '
    data-videoogv="photo/'.$dirgal.'/'.$photoname.'.ogv"
    data-videowebm="photo/'.$dirgal.'/'.$photoname.'.webm"
    data-videomp4="photo/'.$dirgal.'/'.$photoname.'.mp4"';
                }
                $construct .= '
    data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'" />';
            }
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveDT() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugdt_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugdt_tmo[1] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttmo1') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tmo[2] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttmo2') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tmo[3] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttmo3') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tmo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttmo4') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tmo[5] = stripslashes(\"".($def == 'on' ? 'left' : import('dttmo5'))."\");
\$ugdt_tmo[6] = stripslashes(\"".($def == 'on' ? '480' : import('dttmo6'))."\");

\$ugdt_go[1] = stripslashes(\"".($def == 'on' ? '900' : import('dtgo1'))."\");
\$ugdt_go[2] = stripslashes(\"".($def == 'on' ? '500' : import('dtgo2'))."\");
\$ugdt_go[3] = stripslashes(\"".($def == 'on' ? '400' : import('dtgo3'))."\");
\$ugdt_go[4] = stripslashes(\"".($def == 'on' ? '300' : import('dtgo4'))."\");
\$ugdt_go[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('dtgo5') == 'on' ? 'true' : 'false'))."\");
\$ugdt_go[6] = stripslashes(\"".($def == 'on' ? '3000' : import('dtgo6'))."\");
\$ugdt_go[7] = stripslashes(\"".($def == 'on' ? '' : import('dtgo7'))."\");

\$ugdt_slo[1] = stripslashes(\"".($def == 'on' ? 'fill' : import('dtslo1'))."\");
\$ugdt_slo[2] = stripslashes(\"".($def == 'on' ? 'slide' : import('dtslo2'))."\");
\$ugdt_slo[3] = stripslashes(\"".($def == 'on' ? '300' : import('dtslo3'))."\");
\$ugdt_slo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo4') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[5] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo5') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[6] = stripslashes(\"".($def == 'on' ? 'pie' : import('dtslo6'))."\");
\$ugdt_slo[7] = stripslashes(\"".($def == 'on' ? 'right' : import('dtslo7'))."\");
\$ugdt_slo[8] = stripslashes(\"".($def == 'on' ? 'top' : import('dtslo8'))."\");
\$ugdt_slo[9] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('dtslo9'))."\");
\$ugdt_slo[10] = stripslashes(\"".($def == 'on' ? '0.6' : import('dtslo10'))."\");
\$ugdt_slo[11] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo11') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo12') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[13] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo13') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo14') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[15] = stripslashes(\"".($def == 'on' ? 'true' : (import('dtslo15') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('dtslo16') == 'on' ? 'true' : 'false'))."\");
\$ugdt_slo[17] = stripslashes(\"".($def == 'on' ? 'middle' : import('dtslo17'))."\");
\$ugdt_slo[18] = stripslashes(\"".($def == 'on' ? '#000000' : import('dtslo18'))."\");
\$ugdt_slo[19] = stripslashes(\"".($def == 'on' ? '0.4' : import('dtslo19'))."\");

\$ugdt_tho[1] = stripslashes(\"".($def == 'on' ? '88' : import('dttho1'))."\");
\$ugdt_tho[2] = stripslashes(\"".($def == 'on' ? '50' : import('dttho2'))."\");
\$ugdt_tho[3] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttho3') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tho[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttho4') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tho[5] = stripslashes(\"".($def == 'on' ? '0' : import('dttho5'))."\");
\$ugdt_tho[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('dttho6'))."\");
\$ugdt_tho[7] = stripslashes(\"".($def == 'on' ? '0' : import('dttho7'))."\");
\$ugdt_tho[8] = stripslashes(\"".($def == 'on' ? '#D9D9D9' : import('dttho8'))."\");
\$ugdt_tho[9] = stripslashes(\"".($def == 'on' ? '1' : import('dttho9'))."\");
\$ugdt_tho[10] = stripslashes(\"".($def == 'on' ? '#D9D9D9' : import('dttho10'))."\");
\$ugdt_tho[11] = stripslashes(\"".($def == 'on' ? '0' : import('dttho11'))."\");
\$ugdt_tho[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('dttho12') == 'on' ? 'true' : 'false'))."\");
\$ugdt_tho[13] = stripslashes(\"".($def == 'on' ? '#000000' : import('dttho13'))."\");
\$ugdt_tho[14] = stripslashes(\"".($def == 'on' ? '0.4' : import('dttho14'))."\");

\$ugdt_stpo[1] = stripslashes(\"".($def == 'on' ? 'false' : (import('dtstpo1') == 'on' ? 'true' : 'false'))."\");
\$ugdt_stpo[2] = stripslashes(\"".($def == 'on' ? '2' : import('dtstpo2'))."\");
\$ugdt_stpo[3] = stripslashes(\"".($def == 'on' ? 'scroll_strip' : import('dtstpo3'))."\");
\$ugdt_stpo[4] = stripslashes(\"".($def == 'on' ? 'top' : import('dtstpo4'))."\");
\$ugdt_stpo[5] = stripslashes(\"".($def == 'on' ? '' : import('dtstpo5'))."\");
\$ugdt_stpo[6] = stripslashes(\"".($def == 'on' ? 'left' : import('dtstpo6'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugdt_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugdt_'.$numgal.INCEXT, constructDT($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugdt_'.$numgal.INCEXT, constructDT($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructCT($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues, $typevideo;
    if ($lg == '') $lg = $lng;
    
    $def_cttmo  = array(1=>'bottom','480');
    $lbl_cttmo  = array(1=>'theme_panel_position','theme_hide_panel_under_width');
    $def_ctgo   = array(1=>'900','500','400','300','false','3000','');
    $lbl_ctgo   = array(1=>'gallery_width','gallery_height','gallery_min_width','gallery_min_height','gallery_autoplay','gallery_play_interval','gallery_background_color');
    $def_ctslo  = array(1=>'fill','slide','300','true','true','pie','right','top','#FFFFFF','0.6','true','true','true','true','true','false','middle','#000000','0.4');
    $lbl_ctslo  = array(1=>'slider_scale_mode','slider_transition','slider_transition_speed','slider_enable_arrows','slider_enable_progress_indicator','slider_progress_indicator_type','slider_progress_indicator_align_hor','slider_progress_indicator_align_vert','slider_progressbar_color','slider_progressbar_opacity','slider_enable_play_button','slider_enable_fullscreen_button','slider_enable_zoom_panel','slider_controls_always_on','slider_controls_appear_ontap','slider_enable_text_panel','slider_textpanel_always_on','slider_textpanel_text_valign','slider_textpanel_bg_color','slider_textpanel_bg_opacity');
    $def_cttho  = array(1=>'88','50','true','true','0','#000000','0','#D9D9D9','1','#D9D9D9','0','true','#000000','0.4');
    $lbl_cttho  = array(1=>'thumb_width','thumb_height','thumb_fixed_size','thumb_border_effect','thumb_border_width','thumb_border_color','thumb_over_border_width','thumb_over_border_color','thumb_selected_border_width','thumb_selected_border_color','thumb_round_corners_radius','thumb_color_overlay_effect','thumb_overlay_color','thumb_overlay_opacity');
    $def_ctstpo = array(1=>'true','2','scroll_strip','top','','left');
    $lbl_ctstpo = array(1=>'strippanel_enable_handle','strippanel_padding_buttons','strippanel_buttons_role','strippanel_handle_align','strippanel_background_color','strip_thumbs_align');
        
    $construct = '
<script src="inc/unitegallery/themes/compact/ug-theme-compact.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "compact",';
    if (file_exists(PHOTOREP.$dirgal.'/ugct_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugct_'.$numgal.INCEXT;
    foreach ($def_cttmo as $key => $value) 
        if (!empty($ugct_tmo[$key]) && $ugct_tmo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_cttmo[$key].': '.(!in_array($ugct_tmo[$key], $strvalues) && $ugct_tmo[$key][0] != '#' ? $ugct_tmo[$key] : '"'.$ugct_tmo[$key].'"').',';
    foreach ($def_ctgo as $key => $value) 
        if (!empty($ugct_go[$key]) && $ugct_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_ctgo[$key].': '.(!in_array($ugct_go[$key], $strvalues) && substr($ugct_go[$key], -1) != '%' && $ugct_go[$key][0] != '#' ? $ugct_go[$key] : '"'.$ugct_go[$key].'"').',';
    foreach ($def_ctslo as $key => $value) 
        if (!empty($ugct_slo[$key]) && $ugct_slo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_ctslo[$key].': '.(!in_array($ugct_slo[$key], $strvalues) && $ugct_slo[$key][0] != '#' ? $ugct_slo[$key] : '"'.$ugct_slo[$key].'"').',';
    foreach ($def_cttho as $key => $value) 
        if (!empty($ugct_tho[$key]) && $ugct_tho[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_cttho[$key].': '.(!in_array($ugct_tho[$key], $strvalues) && $ugct_tho[$key][0] != '#' ? $ugct_tho[$key] : '"'.$ugct_tho[$key].'"').',';
    foreach ($def_ctstpo as $key => $value) 
        if (!empty($ugct_stpo[$key]) && $ugct_stpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_ctstpo[$key].': '.(!in_array($ugct_stpo[$key], $strvalues) && $ugct_stpo[$key][0] != '#' ? $ugct_stpo[$key] : '"'.$ugct_stpo[$key].'"').',';
    $construct  = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) {
                $construct .= '
  <img alt="'.$nomgal.'"';
                if (in_array($photo[10], array('youtube','vimeo','html5video','wistia'))) $construct .= '
    data-type="'.$photo[10].'"';
                if ($photo[10] != 'youtube') $construct .= '
    src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
    data-image="photo/'.$dirgal.'/'.$photo[2].'"';
                if (in_array($photo[10], $typevideo)) $construct .= '
    data-videoid="'.$photo[11].'"';
                if ($photo[10] == 'html5video') {
                    $infos      = pathinfo($photo[11]);
//                    $photoname  = $infos['dirname'].'/'.$infos['filename'];
					$photoname  = $infos['filename'];
                    $construct .= '
    data-videoogv="photo/'.$dirgal.'/'.$photoname.'.ogv"
    data-videowebm="photo/'.$dirgal.'/'.$photoname.'.webm"
    data-videomp4="photo/'.$dirgal.'/'.$photoname.'.mp4"';
                }
                $construct .= '
    data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'" />';
            }
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveCT() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugct_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugct_tmo[1] = stripslashes(\"".($def == 'on' ? 'bottom' : import('cttmo1'))."\");
\$ugct_tmo[2] = stripslashes(\"".($def == 'on' ? '480' : import('cttmo2'))."\");

\$ugct_go[1] = stripslashes(\"".($def == 'on' ? '900' : import('ctgo1'))."\");
\$ugct_go[2] = stripslashes(\"".($def == 'on' ? '500' : import('ctgo2'))."\");
\$ugct_go[3] = stripslashes(\"".($def == 'on' ? '400' : import('ctgo3'))."\");
\$ugct_go[4] = stripslashes(\"".($def == 'on' ? '300' : import('ctgo4'))."\");
\$ugct_go[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('ctgo5') == 'on' ? 'true' : 'false'))."\");
\$ugct_go[6] = stripslashes(\"".($def == 'on' ? '3000' : import('ctgo6'))."\");
\$ugct_go[7] = stripslashes(\"".($def == 'on' ? '' : import('ctgo7'))."\");

\$ugct_slo[1] = stripslashes(\"".($def == 'on' ? 'fill' : import('ctslo1'))."\");
\$ugct_slo[2] = stripslashes(\"".($def == 'on' ? 'slide' : import('ctslo2'))."\");
\$ugct_slo[3] = stripslashes(\"".($def == 'on' ? '300' : import('ctslo3'))."\");
\$ugct_slo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo4') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[5] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo5') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[6] = stripslashes(\"".($def == 'on' ? 'pie' : import('ctslo6'))."\");
\$ugct_slo[7] = stripslashes(\"".($def == 'on' ? 'right' : import('ctslo7'))."\");
\$ugct_slo[8] = stripslashes(\"".($def == 'on' ? 'top' : import('ctslo8'))."\");
\$ugct_slo[9] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('ctslo9'))."\");
\$ugct_slo[10] = stripslashes(\"".($def == 'on' ? '0.6' : import('ctslo10'))."\");
\$ugct_slo[11] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo11') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo12') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[13] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo13') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo14') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[15] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctslo15') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('ctslo16') == 'on' ? 'true' : 'false'))."\");
\$ugct_slo[17] = stripslashes(\"".($def == 'on' ? 'middle' : import('ctslo17'))."\");
\$ugct_slo[18] = stripslashes(\"".($def == 'on' ? '#000000' : import('ctslo18'))."\");
\$ugct_slo[19] = stripslashes(\"".($def == 'on' ? '0.4' : import('ctslo19'))."\");

\$ugct_tho[1] = stripslashes(\"".($def == 'on' ? '88' : import('cttho1'))."\");
\$ugct_tho[2] = stripslashes(\"".($def == 'on' ? '50' : import('cttho2'))."\");
\$ugct_tho[3] = stripslashes(\"".($def == 'on' ? 'true' : (import('cttho3') == 'on' ? 'true' : 'false'))."\");
\$ugct_tho[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('cttho4') == 'on' ? 'true' : 'false'))."\");
\$ugct_tho[5] = stripslashes(\"".($def == 'on' ? '0' : import('cttho5'))."\");
\$ugct_tho[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('cttho6'))."\");
\$ugct_tho[7] = stripslashes(\"".($def == 'on' ? '0' : import('cttho7'))."\");
\$ugct_tho[8] = stripslashes(\"".($def == 'on' ? '#D9D9D9' : import('cttho8'))."\");
\$ugct_tho[9] = stripslashes(\"".($def == 'on' ? '1' : import('cttho9'))."\");
\$ugct_tho[10] = stripslashes(\"".($def == 'on' ? '#D9D9D9' : import('cttho10'))."\");
\$ugct_tho[11] = stripslashes(\"".($def == 'on' ? '0' : import('cttho11'))."\");
\$ugct_tho[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('cttho12') == 'on' ? 'true' : 'false'))."\");
\$ugct_tho[13] = stripslashes(\"".($def == 'on' ? '#000000' : import('cttho13'))."\");
\$ugct_tho[14] = stripslashes(\"".($def == 'on' ? '0.4' : import('cttho14'))."\");

\$ugct_stpo[1] = stripslashes(\"".($def == 'on' ? 'true' : (import('ctstpo1') == 'on' ? 'true' : 'false'))."\");
\$ugct_stpo[2] = stripslashes(\"".($def == 'on' ? '2' : import('ctstpo2'))."\");
\$ugct_stpo[3] = stripslashes(\"".($def == 'on' ? 'scroll_strip' : import('ctstpo3'))."\");
\$ugct_stpo[4] = stripslashes(\"".($def == 'on' ? 'top' : import('ctstpo4'))."\");
\$ugct_stpo[5] = stripslashes(\"".($def == 'on' ? '' : import('ctstpo5'))."\");
\$ugct_stpo[6] = stripslashes(\"".($def == 'on' ? 'left' : import('ctstpo6'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugct_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugct_'.$numgal.INCEXT, constructCT($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugct_'.$numgal.INCEXT, constructCT($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructGT($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues, $typevideo;
    if ($lg == '') $lg = $lng;
    
    $def_gttmo  = array(1=>'right','480');
    $lbl_gttmo  = array(1=>'theme_panel_position','theme_hide_panel_under_width');
    $def_gtgo   = array(1=>'900','500','400','300','false','3000','');
    $lbl_gtgo   = array(1=>'gallery_width','gallery_height','gallery_min_width','gallery_min_height','gallery_autoplay','gallery_play_interval','gallery_background_color');
    $def_gtslo  = array(1=>'fill','slide','300','true','true','pie','right','top','#FFFFFF','0.6','true','true','true','true','true','true','true','middle','#000000','0.4');
    $lbl_gtslo  = array(1=>'slider_scale_mode','slider_transition','slider_transition_speed','slider_enable_arrows','slider_enable_progress_indicator','slider_progress_indicator_type','slider_progress_indicator_align_hor','slider_progress_indicator_align_vert','slider_progressbar_color','slider_progressbar_opacity','slider_enable_play_button','slider_enable_fullscreen_button','slider_enable_zoom_panel','slider_controls_always_on','slider_controls_appear_ontap','slider_enable_text_panel','slider_textpanel_enable_title','slider_textpanel_text_valign','slider_textpanel_bg_color','slider_textpanel_bg_opacity');
    $def_gttho  = array(1=>'88','50', 'true','true','0','#000000','1','#D9D9D9','0','true','#000000','0.4');
    $lbl_gttho  = array(1=>'thumb_width','thumb_height','thumb_fixed_size','thumb_border_effect','thumb_border_width','thumb_border_color','thumb_selected_border_width','thumb_selected_border_color','thumb_round_corners_radius','thumb_color_overlay_effect','thumb_overlay_color','thumb_overlay_opacity');
    $def_gtgpo  = array(1=>'true','middle','middle','center','left','2','10','10');
    $lbl_gtgpo  = array(1=>'gridpanel_vertical_scroll','gridpanel_grid_align','gridpanel_arrows_align_vert','gridpanel_arrows_align_hor','grid_panes_direction','grid_num_cols','grid_space_between_cols','grid_space_between_rows');
        
    $construct = '
<script src="inc/unitegallery/themes/grid/ug-theme-grid.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "grid",';
    if (file_exists(PHOTOREP.$dirgal.'/uggt_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/uggt_'.$numgal.INCEXT;
    foreach ($def_gttmo as $key => $value) 
        if (!empty($uggt_tmo[$key]) && $uggt_tmo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_gttmo[$key].': '.(!in_array($uggt_tmo[$key], $strvalues) ? $uggt_tmo[$key] : '"'.$uggt_tmo[$key].'"').',';
    foreach ($def_gtgo as $key => $value) 
        if (!empty($uggt_go[$key]) && $uggt_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_gtgo[$key].': '.(!in_array($uggt_go[$key], $strvalues) && substr($uggt_go[$key], -1) != '%' && $uggt_go[$key][0] != '#' ? $uggt_go[$key] : '"'.$uggt_go[$key].'"').',';
    foreach ($def_gtslo as $key => $value) 
        if (!empty($uggt_slo[$key]) && $uggt_slo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_gtslo[$key].': '.(!in_array($uggt_slo[$key], $strvalues) && $uggt_slo[$key][0] != '#' ? $uggt_slo[$key] : '"'.$uggt_slo[$key].'"').',';
    foreach ($def_gttho as $key => $value) 
        if (!empty($uggt_tho[$key]) && $uggt_tho[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_gttho[$key].': '.(!in_array($uggt_tho[$key], $strvalues) && $uggt_tho[$key][0] != '#' ? $uggt_tho[$key] : '"'.$uggt_tho[$key].'"').',';
    foreach ($def_gtgpo as $key => $value) 
        if (!empty($uggt_gpo[$key]) && $uggt_gpo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_gtgpo[$key].': '.(!in_array($uggt_gpo[$key], $strvalues) && $uggt_gpo[$key][0] != '#' ? $uggt_gpo[$key] : '"'.$uggt_gpo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) {
                $construct .= '
  <img alt="'.$nomgal.'"';
				if (!isset($photo[10])) $photo[10] = '';
				if (!isset($photo[11])) $photo[11] = '';
                if (in_array($photo[10], array('youtube','vimeo','html5video','wistia'))) $construct .= '
    data-type="'.$photo[10].'"';
                if ($photo[10] != 'youtube') $construct .= '
    src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
    data-image="photo/'.$dirgal.'/'.$photo[2].'"';
                if (in_array($photo[10], $typevideo)) $construct .= '
    data-videoid="'.$photo[11].'"';
                if ($photo[10] == 'html5video') {
                    $infos      = pathinfo($photo[11]);
//                    $photoname  = $infos['dirname'].'/'.$infos['filename'];
					$photoname  = $infos['filename'];
                    $construct .= '
    data-videoogv="photo/'.$dirgal.'/'.$photoname.'.ogv"
    data-videowebm="photo/'.$dirgal.'/'.$photoname.'.webm"
    data-videomp4="photo/'.$dirgal.'/'.$photoname.'.mp4"';
                }
                $construct .= '
    data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'" />';
            }
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveGT() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"uggt_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$uggt_tmo[1] = stripslashes(\"".($def == 'on' ? 'right' : import('gttmo1'))."\");
\$uggt_tmo[2] = stripslashes(\"".($def == 'on' ? '480' : import('gttmo2'))."\");

\$uggt_go[1] = stripslashes(\"".($def == 'on' ? '900' : import('gtgo1'))."\");
\$uggt_go[2] = stripslashes(\"".($def == 'on' ? '500' : import('gtgo2'))."\");
\$uggt_go[3] = stripslashes(\"".($def == 'on' ? '400' : import('gtgo3'))."\");
\$uggt_go[4] = stripslashes(\"".($def == 'on' ? '300' : import('gtgo4'))."\");
\$uggt_go[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('gtgo5') == 'on' ? 'true' : 'false'))."\");
\$uggt_go[6] = stripslashes(\"".($def == 'on' ? '3000' : import('gtgo6'))."\");
\$uggt_go[7] = stripslashes(\"".($def == 'on' ? '' : import('gtgo7'))."\");

\$uggt_slo[1] = stripslashes(\"".($def == 'on' ? 'fill' : import('gtslo1'))."\");
\$uggt_slo[2] = stripslashes(\"".($def == 'on' ? 'slide' : import('gtslo2'))."\");
\$uggt_slo[3] = stripslashes(\"".($def == 'on' ? '300' : import('gtslo3'))."\");
\$uggt_slo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo4') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[5] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo5') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[6] = stripslashes(\"".($def == 'on' ? 'pie' : import('gtslo6'))."\");
\$uggt_slo[7] = stripslashes(\"".($def == 'on' ? 'right' : import('gtslo7'))."\");
\$uggt_slo[8] = stripslashes(\"".($def == 'on' ? 'top' : import('gtslo8'))."\");
\$uggt_slo[9] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('gtslo9'))."\");
\$uggt_slo[10] = stripslashes(\"".($def == 'on' ? '0.6' : import('gtslo10'))."\");
\$uggt_slo[11] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo11') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[12] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo12') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[13] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo13') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo14') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[15] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo15') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[16] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo16') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[17] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtslo17') == 'on' ? 'true' : 'false'))."\");
\$uggt_slo[18] = stripslashes(\"".($def == 'on' ? 'middle' : import('gtslo18'))."\");
\$uggt_slo[19] = stripslashes(\"".($def == 'on' ? '#000000' : import('gtslo19'))."\");
\$uggt_slo[20] = stripslashes(\"".($def == 'on' ? '0.4' : import('gtslo20'))."\");

\$uggt_tho[1] = stripslashes(\"".($def == 'on' ? '88' : import('gttho1'))."\");
\$uggt_tho[2] = stripslashes(\"".($def == 'on' ? '50' : import('gttho2'))."\");
\$uggt_tho[3] = stripslashes(\"".($def == 'on' ? 'true' : (import('gttho3') == 'on' ? 'true' : 'false'))."\");
\$uggt_tho[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('gttho4') == 'on' ? 'true' : 'false'))."\");
\$uggt_tho[5] = stripslashes(\"".($def == 'on' ? '0' : import('gttho5'))."\");
\$uggt_tho[6] = stripslashes(\"".($def == 'on' ? '#000000' : import('gttho6'))."\");
\$uggt_tho[7] = stripslashes(\"".($def == 'on' ? '1' : import('gttho7'))."\");
\$uggt_tho[8] = stripslashes(\"".($def == 'on' ? '#D9D9D9' : import('gttho8'))."\");
\$uggt_tho[9] = stripslashes(\"".($def == 'on' ? '0' : import('gttho9'))."\");
\$uggt_tho[10] = stripslashes(\"".($def == 'on' ? 'true' : (import('gttho10') == 'on' ? 'true' : 'false'))."\");
\$uggt_tho[11] = stripslashes(\"".($def == 'on' ? '#000000' : import('gttho11'))."\");
\$uggt_tho[12] = stripslashes(\"".($def == 'on' ? '0.4' : import('gttho12'))."\");

\$uggt_gpo[1] = stripslashes(\"".($def == 'on' ? 'true' : (import('gtgpo1') == 'on' ? 'true' : 'false'))."\");
\$uggt_gpo[2] = stripslashes(\"".($def == 'on' ? 'middle' : import('gtgpo2'))."\");
\$uggt_gpo[3] = stripslashes(\"".($def == 'on' ? 'middle' : import('gtgpo3'))."\");
\$uggt_gpo[4] = stripslashes(\"".($def == 'on' ? 'center' : import('gtgpo4'))."\");
\$uggt_gpo[5] = stripslashes(\"".($def == 'on' ? 'left' : import('gtgpo5'))."\");
\$uggt_gpo[6] = stripslashes(\"".($def == 'on' ? '2' : import('gtgpo6'))."\");
\$uggt_gpo[7] = stripslashes(\"".($def == 'on' ? '10' : import('gtgpo7'))."\");
\$uggt_gpo[8] = stripslashes(\"".($def == 'on' ? '10' : import('gtgpo8'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/uggt_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thuggt_'.$numgal.INCEXT, constructGT($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thuggt_'.$numgal.INCEXT, constructGT($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructSL($lg = '') {
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues, $typevideo;
    if ($lg == '') $lg = $lng;
    
    $def_slgo   = array(1=>'900','500','400','300','false','3000','');
    $lbl_slgo   = array(1=>'gallery_width','gallery_height','gallery_min_width','gallery_min_height','gallery_autoplay','gallery_play_interval','gallery_background_color');
    $def_slslo  = array(1=>'fill','slide','300','true','true','pie','right','top','#FFFFFF','0.6','false','false','false','true','true','false','true','middle','#000000','0.4','true','0');
    $lbl_slslo  = array(1=>'slider_scale_mode','slider_transition','slider_transition_speed','slider_enable_arrows','slider_enable_progress_indicator','slider_progress_indicator_type','slider_progress_indicator_align_hor','slider_progress_indicator_align_vert','slider_progressbar_color','slider_progressbar_opacity','slider_enable_play_button','slider_enable_fullscreen_button','slider_enable_zoom_panel','slider_controls_always_on','slider_controls_appear_ontap','slider_enable_text_panel','slider_textpanel_enable_title','slider_textpanel_text_valign','slider_textpanel_bg_color','slider_textpanel_bg_opacity','slider_enable_bullets','slider_bullets_offset_vert');
        
    $construct = '
<script src="inc/unitegallery/themes/slider/ug-theme-slider.js"></script>
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "slider",';
    if (file_exists(PHOTOREP.$dirgal.'/ugsl_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugsl_'.$numgal.INCEXT;
    foreach ($def_slgo as $key => $value) 
        if (!empty($ugsl_go[$key]) && $ugsl_go[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_slgo[$key].': '.(!in_array($ugsl_go[$key], $strvalues) && substr($ugsl_go[$key], -1) != '%' && $ugsl_go[$key][0] != '#' ? $ugsl_go[$key] : '"'.$ugsl_go[$key].'"').',';
    foreach ($def_slslo as $key => $value) 
        if (!empty($ugsl_slo[$key]) && $ugsl_slo[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_slslo[$key].': '.(!in_array($ugsl_slo[$key], $strvalues) && $ugsl_slo[$key][0] != '#' ? $ugsl_slo[$key] : '"'.$ugsl_slo[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) {
                $construct .= '
  <img alt="'.$nomgal.'"';
                if (in_array($photo[10], array('youtube','vimeo','html5video','wistia'))) $construct .= '
    data-type="'.$photo[10].'"';
                if ($photo[10] != 'youtube') $construct .= '
    src="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
    data-image="photo/'.$dirgal.'/'.$photo[2].'"';
                if (in_array($photo[10], $typevideo)) $construct .= '
    data-videoid="'.$photo[11].'"';
                if ($photo[10] == 'html5video') {
                    $infos      = pathinfo($photo[11]);
//                    $photoname  = $infos['dirname'].'/'.$infos['filename'];
					$photoname  = $infos['filename'];
                    $construct .= '
    data-videoogv="photo/'.$dirgal.'/'.$photoname.'.ogv"
    data-videowebm="photo/'.$dirgal.'/'.$photoname.'.webm"
    data-videomp4="photo/'.$dirgal.'/'.$photoname.'.mp4"';
                }
                $construct .= '
    data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'" />';
            }
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveSL() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugsl_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugsl_go[1] = stripslashes(\"".($def == 'on' ? '900' : import('slgo1'))."\");
\$ugsl_go[2] = stripslashes(\"".($def == 'on' ? '500' : import('slgo2'))."\");
\$ugsl_go[3] = stripslashes(\"".($def == 'on' ? '400' : import('slgo3'))."\");
\$ugsl_go[4] = stripslashes(\"".($def == 'on' ? '300' : import('slgo4'))."\");
\$ugsl_go[5] = stripslashes(\"".($def == 'on' ? 'false' : (import('slgo5') == 'on' ? 'true' : 'false'))."\");
\$ugsl_go[6] = stripslashes(\"".($def == 'on' ? '3000' : import('slgo6'))."\");
\$ugsl_go[7] = stripslashes(\"".($def == 'on' ? '' : import('slgo7'))."\");

\$ugsl_slo[1] = stripslashes(\"".($def == 'on' ? 'fill' : import('slslo1'))."\");
\$ugsl_slo[2] = stripslashes(\"".($def == 'on' ? 'slide' : import('slslo2'))."\");
\$ugsl_slo[3] = stripslashes(\"".($def == 'on' ? '300' : import('slslo3'))."\");
\$ugsl_slo[4] = stripslashes(\"".($def == 'on' ? 'true' : (import('slslo4') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[5] = stripslashes(\"".($def == 'on' ? 'true' : (import('slslo5') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[6] = stripslashes(\"".($def == 'on' ? 'pie' : import('slslo6'))."\");
\$ugsl_slo[7] = stripslashes(\"".($def == 'on' ? 'right' : import('slslo7'))."\");
\$ugsl_slo[8] = stripslashes(\"".($def == 'on' ? 'top' : import('slslo8'))."\");
\$ugsl_slo[9] = stripslashes(\"".($def == 'on' ? '#FFFFFF' : import('slslo9'))."\");
\$ugsl_slo[10] = stripslashes(\"".($def == 'on' ? '0.6' : import('slslo10'))."\");
\$ugsl_slo[11] = stripslashes(\"".($def == 'on' ? 'false' : (import('slslo11') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[12] = stripslashes(\"".($def == 'on' ? 'false' : (import('slslo12') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[13] = stripslashes(\"".($def == 'on' ? 'false' : (import('slslo13') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[14] = stripslashes(\"".($def == 'on' ? 'true' : (import('slslo14') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[15] = stripslashes(\"".($def == 'on' ? 'true' : (import('slslo15') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[16] = stripslashes(\"".($def == 'on' ? 'false' : (import('slslo16') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[17] = stripslashes(\"".($def == 'on' ? 'true' : (import('slslo17') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[18] = stripslashes(\"".($def == 'on' ? 'middle' : import('slslo18'))."\");
\$ugsl_slo[19] = stripslashes(\"".($def == 'on' ? '#000000' : import('slslo19'))."\");
\$ugsl_slo[20] = stripslashes(\"".($def == 'on' ? '0.4' : import('slslo20'))."\");
\$ugsl_slo[21] = stripslashes(\"".($def == 'on' ? 'true' : (import('slslo21') == 'on' ? 'true' : 'false'))."\");
\$ugsl_slo[22] = stripslashes(\"".($def == 'on' ? '0' : import('slslo22'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugsl_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugsl_'.$numgal.INCEXT, constructSL($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugsl_'.$numgal.INCEXT, constructSL($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructVG($lg = '') { //pour lng-thugvg_nogal.inc
    global $lng, $lang, $dirgal, $numgal, $catgal, $nomgal, $strvalues, $typevideo;
    if ($lg == '') $lg = $lng;
    
    $def_vgto   = array(1=>'right-thumb','false','2500');
    $lbl_vgto   = array(1=>'theme_skin','theme_autoplay','theme_disable_panel_timeout');
        
    $construct = '
<script src="inc/unitegallery/themes/video/ug-theme-video.js"></script>
<link  href="inc/unitegallery/themes/video/skin-right-no-thumb.css" rel="stylesheet" type="text/css" />
<link  href="inc/unitegallery/themes/video/skin-right-thumb.css" rel="stylesheet" type="text/css" />
<link  href="inc/unitegallery/themes/video/skin-right-title-only.css" rel="stylesheet" type="text/css" />
<script>
  jQuery(document).ready(function(){
    jQuery("#'.$dirgal.'").unitegallery({
      gallery_theme: "video",';
    if (file_exists(PHOTOREP.$dirgal.'/ugvg_'.$numgal.INCEXT)) include PHOTOREP.$dirgal.'/ugvg_'.$numgal.INCEXT;
    foreach ($def_vgto as $key => $value) 
        if (!empty($ugvg_to[$key]) && $ugvg_to[$key] != $value) 
            $construct .= chr(10).'      '.$lbl_vgto[$key].': '.(!in_array($ugvg_to[$key], $strvalues) ? $ugvg_to[$key] : '"'.$ugvg_to[$key].'"').',';
    $construct = substr($construct, 0, -1);
    $construct .= '
      });
    });
</script>
<style> .css'.$numgal.' { display: none; margin: auto; padding: 6px 0; } </style>
<div id="'.$dirgal.'" class="css'.$numgal.'">';
    if (file_exists(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT)) {
        $dbphoto = SelectDBFieldsByField(ReadDBFields(PHOTOREP.$dirgal.'/gal_'.$numgal.DBEXT), 1, 'a');
        if (!empty($dbphoto)) {
            foreach($dbphoto as $photo) {
                $construct .= '
<div data-type="'.$photo[10].'"
     data-title="'.$nomgal.'"
     data-thumb="photo/'.$dirgal.'/vgnt/'.$photo[2].'"
     data-image="photo/'.$dirgal.'/'.$photo[2].'"';
                if (in_array($photo[10], $typevideo)) $construct .= '
     data-videoid="'.$photo[11].'"';
                if ($photo[10] == 'html5video') {
                    $infos      = pathinfo($photo[11]);
//                    $photoname  = $infos['dirname'].'/'.$infos['filename'];
					$photoname  = $infos['filename'];
                    $construct .= '
     data-videoogv="photo/'.$dirgal.'/'.$photoname.'.ogv"
     data-videowebm="photo/'.$dirgal.'/'.$photoname.'.webm"
     data-videomp4="photo/'.$dirgal.'/'.$photoname.'.mp4"';
                }
                $construct .= '
     data-description="'.$photo[$lg == $lang[0] ? 5 : 6].'">
</div>';
            }
        }
    }
    $construct .= '
</div>';

    return $construct;
}

function saveVG() {
    global $lang, $dirgal, $numgal, $def;
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"ugvg_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$ugvg_to[1] = stripslashes(\"".($def == 'on' ? 'right-thumb' : import('vgto1'))."\");
\$ugvg_to[2] = stripslashes(\"".($def == 'on' ? 'false' : (import('vgto2') == 'on' ? 'true' : 'false'))."\");
\$ugvg_to[3] = stripslashes(\"".($def == 'on' ? '2500' : import('vgto3'))."\");
?>";
    WriteFullDB(PHOTOREP.$dirgal.'/ugvg_'.$numgal.INCEXT, $mettre);
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[0].'-thugvg_'.$numgal.INCEXT, constructVG($lang[0]));
    WriteFullDB(PHOTOREP.$dirgal.'/'.$lang[1].'-thugvg_'.$numgal.INCEXT, constructVG($lang[1]));
}

/////////////////////////////////////////////////////////////////////////////////////////

function constructUG($theme) {
    global $lng;
    switch ($theme) {
    case 'ugtc' : $construct = constructTC(); break;
    case 'ugtj' : $construct = constructTJ(); break;
    case 'ugtn' : $construct = constructTN(); break;
    case 'ugtg' : $construct = constructTG(); break;
    case 'ugca' : $construct = constructCA(); break;
    case 'ugdt' : $construct = constructDT(); break;
    case 'ugct' : $construct = constructCT(); break;
    case 'uggt' : $construct = constructGT(); break;
    case 'ugsl' : $construct = constructSL(); break;
    case 'ugvg' : $construct = constructVG(); break;
    default : $construct = '';
    }
    return $construct;
}

/////////////////////////////////////////////////////////////////////////////////////////

if ($regit == 1) { // config galerie
    $param1 = import('param1'); // Nombre maximum de miniatures par galerie
	if (empty($param1)) $param1 =1;
    $param2 = import('param2'); // Largeur maximum d'une miniature

    $param3 = import('param3'); // Hauteur maximum d'une miniature

    $param4 = import('param4'); // Choix effet pour le photorama
    $param5 = import('param5'); // Intervalle entre diapos en secondes
	if (empty($param5)) $param5 =1;
	$param6 = import('param6'); // Nombre maximum de miniatures par ligne
	$param7 = import('param7'); // Espace en pixels entre les miniatures
	if (empty($param7)) $param7 =1;
	$param8 = import('param8'); // Position des miniatures L / C / R
	$param9 = import('param9'); // Inclure dans le slishow on/off
	$param10 = import('param10'); // Galerie indépendante on/off
	$param11 = import('param11'); // Cacher le compteur des photos on/off
	$param12 = import('param12'); // Cacher le compteur des visites on/off
	$param13 = import('param13'); // Thème UniteGallery
    
    if ($param4 == 'unitegallery') {
        $param9  = '';
        $param10 = 'on';
    }
	
	$mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"params_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$param1 = stripslashes(\"$param1\"); // Nombre maximum de miniatures par galerie
\$param2 = stripslashes(\"$param2\"); // Largeur maximum d'une miniature
\$param3 = stripslashes(\"$param3\"); // Hauteur maximum d'une miniature
\$param4 = stripslashes(\"$param4\"); // Choix effet pour le phototrama
\$param5 = stripslashes(\"$param5\"); // Intervalle entre diapos en secondes
\$param6 = stripslashes(\"$param6\"); // Nombre maximum de miniatures par ligne
\$param7 = stripslashes(\"$param7\"); // Espace en pixels entre les miniatures
\$param8 = stripslashes(\"$param8\"); // Position des miniatures L / C / R
\$param9 = stripslashes(\"$param9\"); // Inclure dans le slishow on/off
\$param10 = stripslashes(\"$param10\"); // Galerie indépendante on/off
\$param11 = stripslashes(\"$param11\"); // Cacher le compteur des photos on/off
\$param12 = stripslashes(\"$param12\"); // Cacher le compteur des visites on/off
\$param13 = stripslashes(\"$param13\"); // Thème UniteGallery

?>";
    WriteFullDB(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT, $mettre);

    if ($param4 == 'unitegallery') {
        switch ($param13) {
        case 'ugtc' : saveTC(); break;
        case 'ugtj' : saveTJ(); break;
        case 'ugtn' : saveTN(); break;
        case 'ugtg' : saveTG(); break;
        case 'ugca' : saveCA(); break;
        case 'ugdt' : saveDT(); break;
        case 'ugct' : saveCT(); break;
        case 'uggt' : saveGT(); break;
        case 'ugsl' : saveSL(); break;
        case 'ugvg' : saveVG(); break;
        }
    }
    
	$act = 1;
	$messageinfo = $admin[1822];
}
if ($regit == 2) { // gérer les photos
    $wmax    = @intval($param2);
    $hmax    = @intval($param3);
	$wmax    = @$vmax > 0 ? @$vmax : 100;
	$hmax    = $hmax > 0 ? $hmax : 75;
    $nextid  = 1;
/*
max_file_uploads=20
$mfu      = @ini_get('max_file_uploads');

upload_max_filesize=256M
$maxsizefiles = @ini_get('upload_max_filesize');

post_max_size=256M
$maxpostsize = @ini_get('post_max_size');
*/
    $filecom = PHOTOREP.$dirgal.'/'.$dirgal.DBEXT;
    if (is_file($filecom)) {
        $dbphoto = ReadDBFields($filecom);
        if (!empty($dbphoto)) {
            foreach ($dbphoto as $photo) $nextid = max($nextid, $photo[0]);
            $nextid++;
        }
    }
   if (file_exists(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT))
		include PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT;	
	$is_video = in_array($param13, $galleryvideos);
	$nbf = min($mfu, count(@$_FILES['new_photo']['name']));
	$totalfiles_size =0;
	// limite de la taille des fichiers en upload des fichiers maxsizefiles
	// limite de la taille des zones saisies y compris les fichiers maxpostsizes
	for ($i = 0; $i < $nbf; $i++) 
	{
		$filename = @$_FILES['new_photo']['name'][$i];
		$tmpname  = @$_FILES['new_photo']['tmp_name'][$i];
		$file_type = @$_FILES['new_photo']['type'][$i];
		$file_size = @$_FILES['new_photo']['size'][$i];
		$totalfiles_size = $totalfiles_size + $file_size;
		if ($filename != "" && is_uploaded_file($tmpname)) {
			$filename = trim($filename);
			$filename = str_replace(' ','_', $filename);
			$filename = str_replace('à','a', $filename);
			$filename = preg_replace('![éèê]!','e', $filename);
			$filename = preg_replace('![îï]!','i', $filename);
			$filename = preg_replace('![^-a-zA-Z0-9_\.]!', '', $filename);
			$uperror = false;

			if (!preg_match("`^([-a-z0-9_]+)(\.)([a-z0-9]{2,4})$`i", $filename)) { // controle nom de fichier valide
				$messageinfurgent = $admin[1829];
				$uperror = true;
			}
			if (is_file(PHOTOREP.$dirgal.'/'.$filename)) { // controle présence fichier
				$messageinfurgent = $admin[1828];
				$uperror = true; 
			}
// si galerie est unite gallery, videos et photos sont possibles
			$file_name_temp = explode(".", $filename);
			$extension = end($file_name_temp);		
			if (in_array($file_type, $video_types) 
					   && in_array($extension, $allowed_extensions))
			{
				if ($is_video)
				{
				   if (in_array($file_type, $video_types) 
					   && in_array($extension, $allowed_extensions))
					{
						if (!$uperror)
						{
							if (move_uploaded_file($tmpname, PHOTOREP.$dirgal.'/'.$filename))
							{
								SetChmod(PHOTOREP.$dirgal.'/'.$filename);
							}
						}
					}
				}
			}
		   else
			{
				if (!IsImage(pathinfo($filename, PATHINFO_EXTENSION))) {
					$messageinfurgent = $admin[1830];
					$uperror = true; 
				}
				$typimg = getimagesize($tmpname);
				if ($typimg == 1)
				{
					$uperror = true; 
				}
				if(!$uperror) { // UPLOAD	
					list($wimg, $himg, $typimg) = getimagesize($tmpname);

					if ($wimg > $himg) {
						$wmin = $wmax;
						$hmin = ceil($himg * $wmax / $wimg);
						if ($hmin > $hmax) {
							$wmin = ceil($wmin * $hmax / $hmin);
							$hmin = $hmax;
						}
					} else 
					{
						if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
						  $wimg = 630;
						  $himg = 420;						  
						}
						
						$hmin = $hmax;        
						$wmin = ceil($wimg * $hmax / $himg);
						if ($wmin > $wmax) {
							$hmin = ceil($hmin * $wmax / $wmin);
							$wmin = $wmax;
						}
					}
					if (@$param4 == 'unitegallery') {
						$wmin = intval(floor($wimg * 0.30));
						$hmin = intval(floor($himg * 0.30));
					}
					if (move_uploaded_file($tmpname, PHOTOREP.$dirgal.'/'.$filename)) {
						SetChmod(PHOTOREP.$dirgal.'/'.$filename);
						// création des miniatures
						switch($typimg) {

						case 1 :
							$hfic = ImageCreateFromGif(PHOTOREP.$dirgal.'/'.$filename);
							$hvig = @ImageCreateTrueColor($wmin, $hmin);
							$cr   = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
							@ImageGif($hvig, PHOTOREP.$dirmin.'/'.$filename);
							SetChmod(PHOTOREP.$dirmin.'/'.$filename);
							break;

						case 2 : // JPG
							$hfic = ImageCreateFromJpeg(PHOTOREP.$dirgal.'/'.$filename);
							$hvig = @ImageCreateTrueColor($wmin, $hmin);
							$cr   = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
							@ImageJpeg($hvig, PHOTOREP.$dirmin.'/'.$filename, 75);
							SetChmod(PHOTOREP.$dirmin.'/'.$filename);
							break;
						case 3 : // PNG
							$hfic = ImageCreateFromPng(PHOTOREP.$dirgal.'/'.$filename);
							$hvig = @ImageCreateTrueColor($wmin, $hmin);
							$cr = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
							@ImagePng($hvig, PHOTOREP.$dirmin.'/'.$filename);
							SetChmod(PHOTOREP.$dirmin.'/'.$filename);
							break;
						case 18 : // webp*

							$hfic = imagecreatefromwebp(PHOTOREP.$dirgal.'/'.$filename);
							$hvig = @ImageCreateTrueColor($wmin, $hmin);
							$cr = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
							@imagewebp($hvig, PHOTOREP.$dirmin.'/'.$filename);
							SetChmod(PHOTOREP.$dirmin.'/'.$filename);

							break;
						case 19 : // avif
						    if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
								$hfic = imagecreatefromavif(PHOTOREP.$dirgal.'/'.$filename);
								$hvig = @ImageCreateTrueColor($wmin, $hmin);
								$cr = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
								@imageavif($hvig, PHOTOREP.$dirmin.'/'.$filename);
								SetChmod(PHOTOREP.$dirmin.'/'.$filename);
							}
							break;
						default ;
							echo 'erreur: <br/>';
							break;
						}
						if (isset($hfic)) @imagedestroy($hfic);
						if (isset($hvig)) @imagedestroy($hvig);
						unset($hfic, $hvig);
						// ajout dans le fichier commentaires
						$datas   = array($nextid, 'a', $filename, $wmin, $hmin, '', '', '', '', '', '', '');
						AppendDBFields($filecom, $datas);
						$nextid++;
						$messageinfo = $admin[1827];
						$messageinfurgent = '';
					} // fin de Upload
				} // Fin de control erreur
			} // fin du else et traitement image
		} // fichier non vide
	} // fin de la boucle des fichiers
} // fin de regit 2
if ($regit == 3) { // ajout de commentaires
    $dbids   = explode(' ', trim(import('ids3')));
    $dbphoto = ReadDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
    for ($i = 0; $i < count($dbids); $i++) {
		$ii = $dbids[$i];
        $jj = 0;
        for ($j = 0; $j < count($dbphoto); $j++) if ($ii == $dbphoto[$j][0]) { $jj = $j; break; }
		if (isset($_POST['comment1_'.$ii]) && $_POST['comment1_'.$ii] != '') $dbphoto[$jj][5] = $_POST['comment1_'.$ii];
        if (isset($_POST['comment2_'.$ii]) && $_POST['comment2_'.$ii] != '') $dbphoto[$jj][6] = $_POST['comment2_'.$ii];
//       if (isset($_POST['imglink_'.$ii]) && $_POST['imglink_'.$ii] != '') $dbphoto[$jj][9] = $_POST['imglink_'.$ii];
		if (isset($_POST['nordre_'.$ii]) && $_POST['nordre_'.$ii] != '') $dbphoto[$jj][9] = $_POST['nordre_'.$ii];
        if (isset($_POST['typevideo_'.$ii]) && $_POST['typevideo_'.$ii] != '') $dbphoto[$jj][10] = $_POST['typevideo_'.$ii];
        if (isset($_POST['videolink_'.$ii]) && $_POST['videolink_'.$ii] != '') $dbphoto[$jj][11] = $_POST['videolink_'.$ii];

    }
    WriteDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT, $dbphoto);
	unset($dbids, $dbphoto);
}

if ($regit == 4) { // reconstruire les miniatures
	if (file_exists(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT))
		include PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT;
    $wmax    = intval($param2);
    $hmax    = intval($param3);
	$wmax    = $wmax > 0 ? $wmax : 100;
	$hmax    = $hmax > 0 ? $hmax : 75;
	$dbwork  = $dbw = array();
	$bad     = array('.', '..', 'vgnt', 'index.php', $dirgal.DBEXT, 'params_'.$numgal.INCEXT, 
      'ugtc_'.$numgal.INCEXT, 'ugtj_'.$numgal.INCEXT, 'ugtn_'.$numgal.INCEXT, 'ugtg_'.$numgal.INCEXT, 'ugca_'.$numgal.INCEXT, 
      'ugdt_'.$numgal.INCEXT, 'ugct_'.$numgal.INCEXT, 'uggt_'.$numgal.INCEXT, 'ugsl_'.$numgal.INCEXT, 'ugvg_'.$numgal.INCEXT, 
      'thugtc_'.$numgal.INCEXT, 'thugtj_'.$numgal.INCEXT, 'thugtn_'.$numgal.INCEXT, 'thugtg_'.$numgal.INCEXT, 'thugca_'.$numgal.INCEXT, 
      'thugdt_'.$numgal.INCEXT, 'thugct_'.$numgal.INCEXT, 'thuggt_'.$numgal.INCEXT, 'thugsl_'.$numgal.INCEXT, 'thugvg_'.$numgal.INCEXT
    );
	$dbphoto = scandir(PHOTOREP.$dirgal);
	foreach ($dbphoto as $photo) {
		if (in_array($photo, $bad)) continue;
		if (IsImage(pathinfo($photo, PATHINFO_EXTENSION))) $dbwork[] = $photo;
	}
	$dbvgnts = ReadDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
    $n       = 0;
	foreach ($dbvgnts as $photo) {
		$dbw[] = $photo[2];
		$n     = max($n, $photo[0]);
	}
	$dbphoto = array_diff($dbwork, $dbw);
	foreach ($dbphoto as $photo) $dbvgnts[] = array(++$n, 'a', $photo, $wmax, $hmax, '', '', '', '', '', '', '');
	$n = 0;
	foreach ($dbvgnts as $photo) {
		$filename = $photo[2];
		list($wimg, $himg, $typimg) = @getimagesize(PHOTOREP.$dirgal.'/'.$filename);
		// si type image est avif (19), wimg et himg = 0 pour une version Php < 8.2.0
		if ($typimg == 19 && (version_compare(PHP_VERSION, '8.0.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0)) {
		  $wimg = 630;
		  $himg = 420;						  
		}	
		if (intval($wimg) <= 0) $wimg = $wmax;
		if (intval($himg) <= 0) $himg = $hmax;
		if ($wimg > $himg) {
			$wmin = $wmax;
			$hmin = ceil($himg * $wmax / $wimg);
			if ($hmin > $hmax) {
				$wmin = ceil($wmin * $hmax / $hmin);
				$hmin = $hmax;
			}
		} else {
			if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
			  $wimg = 630;
			  $himg = 420;						  
			}			
			$hmin = $hmax;        
			$wmin = ceil($wimg * $hmax / $himg);
			if ($wmin > $wmax) {
				$hmin = ceil($hmin * $wmax / $wmin);
				$wmin = $wmax;
			}
		}
		if ($param4 == 'unitegallery') {
			$wmin = intval(floor($wimg * 0.30));
			$hmin = intval(floor($himg * 0.30));
		}

		if (file_exists(PHOTOREP.$dirmin.'/'.$filename)) unlink(PHOTOREP.$dirmin.'/'.$filename);
		// création des miniatures
		switch($typimg) {
		case 1 : // GIF
			$hfic = ImageCreateFromGif(PHOTOREP.$dirgal.'/'.$filename);
			$hvig = @ImageCreateTrueColor($wmin, $hmin);
			$cr   = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
			@ImageGif($hvig, PHOTOREP.$dirmin.'/'.$filename);
			SetChmod(PHOTOREP.$dirmin.'/'.$filename);
			break;
		case 2 : // JPG
			$hfic = ImageCreateFromJpeg(PHOTOREP.$dirgal.'/'.$filename);
			$hvig = @ImageCreateTrueColor($wmin, $hmin);
			$cr   = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
			@ImageJpeg($hvig, PHOTOREP.$dirmin.'/'.$filename, 75);
			SetChmod(PHOTOREP.$dirmin.'/'.$filename);
			break;
		case 3 : // PNG
			$hfic = ImageCreateFromPng(PHOTOREP.$dirgal.'/'.$filename);
			$hvig = @ImageCreateTrueColor($wmin, $hmin);
			$cr = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
			@ImagePng($hvig, PHOTOREP.$dirmin.'/'.$filename);
			SetChmod(PHOTOREP.$dirmin.'/'.$filename);
			break;
		case 18 : // webp
			$hfic = imagecreatefromwebp(PHOTOREP.$dirgal.'/'.$filename);
			$hvig = @ImageCreateTrueColor($wmin, $hmin);
			$cr = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
			@imagewebp($hvig, PHOTOREP.$dirmin.'/'.$filename);
			SetChmod(PHOTOREP.$dirmin.'/'.$filename);
			break;
		case 19 : // avif
			if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
				$hfic = imagecreatefromavif(PHOTOREP.$dirgal.'/'.$filename);
				$hvig = @ImageCreateTrueColor($wmin, $hmin);
				$cr = @ImageCopyResampled($hvig, $hfic, 0, 0, 0, 0, $wmin, $hmin, $wimg, $himg);
				@imageavif($hvig, PHOTOREP.$dirmin.'/'.$filename);
				SetChmod(PHOTOREP.$dirmin.'/'.$filename);
			}
			break;
		}
		if (isset($hfic)) @imagedestroy($hfic);
		if (isset($hvig)) @imagedestroy($hvig);
		unset($hfic, $hvig);
		$photo[3]    = $wmin;
		$photo[4]    = $hmin;
		$photo[7]    = $wimg;
		$photo[8]    = $himg;
		$dbvgnts[$n] = $photo;
		$n++;
	}
	WriteDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT, $dbvgnts);
	$messageinfo = $admin[1823];
}

################################################################################
function initGallery($dirgal) {
    global $numgal, $dirmin;
    if (!is_dir(PHOTOREP.$dirgal)) {
        if (MakeDir(PHOTOREP.$dirgal)) {
            @copy(CHEMIN.'data/index.php', PHOTOREP.$dirgal.'/index.php');
            SetChmod(PHOTOREP.$dirgal.'/index.php');
            WriteFullDB(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT, '');
            SetChmod(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
            $mettre = "<?php
if (stristr(\$_SERVER[\"SCRIPT_NAME\"], \"params_".$numgal.".inc\")) {
    header(\"location:../index.php\");
    die();
}

\$param1 = stripslashes(\"10\"); // Nombre maximum de miniatures par galerie
\$param2 = stripslashes(\"100\"); // Largeur maximum d'une miniature
\$param3 = stripslashes(\"75\"); // Hauteur maximum d'une miniature
\$param4 = stripslashes(\"lytebox\"); // Choix effet pour le photorama
\$param5 = stripslashes(\"4\"); // Intervalle entre diapos en secondes
\$param6 = stripslashes(\"5\"); // Nombre maximum de miniatures par ligne
\$param7 = stripslashes(\"20\"); // Espace en pixels entre les miniatures
\$param8 = stripslashes(\"L\"); // Position des miniatures L / C / R
\$param9 = stripslashes(\"\"); // Inclure dans le slideshow on/off
\$param10 = stripslashes(\"\"); // Galerie indépendante on/off
\$param11 = stripslashes(\"\"); // Cacher le compteur des photos on/off
\$param12 = stripslashes(\"\"); // Cacher le compteur des visites on/off
\$param13 = stripslashes(\"\"); // Thème UniteGallery

?>";
	
            WriteFullDB(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT, $mettre);
            SetChmod(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT);
        }
    }
    if (!is_dir(PHOTOREP.$dirmin)) {
        if (MakeDir(PHOTOREP.$dirmin)) {
            @copy(CHEMIN.'data/index.php', PHOTOREP.$dirmin.'/index.php');
            SetChmod(PHOTOREP.$dirmin.'/index.php');
        }
    }
}

function GetSelector($padding, $label, $inputname, $color) { // Palette de couleurs
    return '
        <tr style="text-align:left;">
          <td class="align-middle" style="padding:4px 0 2px '.$padding.'px;width:55%;">&bull; '.$label.'</td>
		  <td class="align-middle" style="padding:4px 0 2px 8px;">
			<div>
			  <input class="form-control" id="'.$inputname.'" name="'.$inputname.'" type="text" size="6" value="'.$color.'" 
                style="font:14px Arial;text-align:center;width:92px;height:29px;border:1px solid #000;border-radius:4px 0 0 4px;float:left;" />
			  <div style="float:left;width:40px;height:29px;vertical-align:top;border:1px solid #000;border-left:none;background-color:'.$color.';padding:-4px 0 4px 0;"></div>
			  <div id="'.$inputname.'div" style="float:left;width:40px;height:29px;border:1px solid #000;border-left:none;background-color:'.$color.';border-radius:0 4px 4px 0;">&nbsp;</div>
			</div>'.
			BeginJavascript()."
			$('#".$inputname."').ColorPicker({
				onSubmit: function(hsb, hex, rgb, el) {
					$(el).val('#' + hex.toUpperCase());
					$(el).ColorPickerHide();
				},
				onChange: function (hsb, hex, rgb) {
					$('#".$inputname."div').css('backgroundColor', '#' + hex);
				},
				onBeforeShow: function () {
					$(this).ColorPickerSetColor(this.value);
				}
			})
			.bind('keyup', function(){
				$(this).ColorPickerSetColor(this.value);
			});".EndJavascript().'
          </td>
        </tr>';
}

function SelectText($padding, $label, $name, $value, &$textarray) {
    $out = '
        <tr style="text-align:left;">
          <td class="align-middle" style="padding-left:'.$padding.'px;width:65%;">&bull; '.$label.'</td>
          <td class="align-middle text-left" style="padding:0 0 0 8px;">
            <select class="form-control w-95" name="'.$name.'">';
    foreach($textarray as $key => $text) {
        $out .= '
              <option value="'.$key.'"'.Selected($value == $key).'>'.$text.'</option>';
    }
    $out .= '
            </select>
          </td>
        </tr>';
    return $out;
}

function InputTexte($padding, $label, $name, $value, $size) {
    return '
        <tr style="text-align:left;">
          <td class="align-middle" style="padding-left:'.$padding.'px;width:65%;">&bull; '.$label.'</td>
          <td class="align-middle text-left" style="padding:0 0 0 4px;">
            <input name="'.$name.'" class="form-control w-95 texte" type="text" size="'.$size.'" value="'.$value.'" />
          </td>
        </tr>';
}

function InputNumber($padding, $label, $name, $min, $max, $value, $step=1) {
    return '
        <tr style="text-align:left;">
          <td class="align-middle" style="padding:0 0 0 '.$padding.'px;width:65%;">&bull; '.$label.'</td>
          <td class="align-middle text-left" style="padding:0 0 0 4px;">
            <input name="'.$name.'" class="form-control w-95 texte" type="number" min="'.$min.'" max="'.$max.'" step="'.$step.'" value="'.$value.'" />
          </td>
        </tr>';
}

function InputCheckbox($padding, $label, $name, $value) {
    return '
        <tr style="text-align:left;">
          <td class="align-middle" style="padding-left:'.$padding.'px;width:65%;">
            <label for="'.$name.'">&bull; '.$label.'</label>
          </td>
          <td class="align-middle" style="padding:2px 0 3px 14px;">
            <input id="'.$name.'" type="checkbox" name="'.$name.'" '.Checked($value == 'on').' />
          </td>
        </tr>';
}

################################################################################
// config galeries
if($act == 1) {
    $headinc .= '
<script>
  function cacheallug() {
    cache(\'ugtc\'); cache(\'ugtj\'); cache(\'ugtn\'); cache(\'ugtg\'); cache(\'ugca\');
    cache(\'ugdt\'); cache(\'ugct\'); cache(\'uggt\'); cache(\'ugsl\'); cache(\'ugvg\');
    cache(\'ugconstruct\');
  }
</script>

<link rel="stylesheet" media="screen" type="text/css" href="../inc/colorpicker/css/colorpicker.css" /> 
<script src="../inc/colorpicker/js/colorpicker.js"></script>
';
    
	$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[638]);
    include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[638], '100%');
    initGallery($dirgal);
	if (file_exists(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT)) {
		include PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT;
        if (file_exists(PHOTOREP.$dirgal.'/'.$param13.'_'.$numgal.INCEXT))
            include PHOTOREP.$dirgal.'/'.$param13.'_'.$numgal.INCEXT;
    }
// Sélection galerie faite
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1042&mnuid=937&tconfig=0#z2').$admin[331].'</p>
<hr />'.info_gd().'<hr />
<div style="max-width:680px;margin:auto auto 12px auto;">
  <fieldset>'.legend($admin[132]).'
    <form name="galsel1" action="'.$baseurl.'&amp;act='.$act.'&amp;sel='.$sel.'" method="POST">
      <div class="table-responsive-md">
      <table class="table table-bordered w-80 m-auto">
        <tr>
		  <td style="text-align:center;">
            <select class="form-control" name="numgal" style="width:300px;" onchange="submit();">';
    $lstgal = ReadAuthorizedIndex(DBPHOTO, $myname, $grpcol, $fctwri);
    sort($lstgal);
    foreach ($lstgal as $gal) {
		$cat  = $gal[$lng == $lang[0] ? 0 : 1];
		$pos  = strpos($cat, '-->');
		$cat  = substr($cat, ($pos !== false ? $pos + 3 : 0));
		$cat  = empty($cat) ? '' : $cat.' => ';
		$name = $gal[$lng == $lang[0] ? 2 : 3];
		$pos  = strpos($name, '-->');
		$name = substr($name, ($pos !== false ? $pos + 3 : 0));
		echo '
              <option value="'.$gal[4].'"'.Selected($numgal == $gal[4]).'>'.$gal[4].' : '.$cat.$name.'</option>';
    }
    echo '
            </select>
          </td>
		</tr>
		<noscript>
        <tr>
		  <td style="text-align:center;">'.SubmitButton($admin[519]).'</td>
		</tr>
		</noscript>
      </table>
      </div>
    </form>
  </fieldset>
</div>
<div style="max-width:680px;text-align:center;margin:auto;">
  <fieldset>
    <form name="galvgnt" action="'.$baseurl.'" method="POST">
      <input type="hidden" name="act" value="3" />
	  <input type="hidden" name="messageinfo" value="'.$messageinfo.'" /> 
	  <input type="hidden" name="messageinfurgent" value="'.$messageinfurgent.'" />
	  <input type="hidden" name="numgal" value="'.$numgal.'" />
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton(str_replace('Admin - ', '', $admin[133]), '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div>
    </form>
  </fieldset>
</div>
<div style="max-width:680px;margin: 0 auto;">';
if ($messageinfurgent !='')
{
	echo '
	<div class="alert alert-dark" role="alert">
	</div>';
}
if ($messageinfo !='')
{
	echo '
	<div class="alert alert-primary" role="alert">
	  '.$messageinfo.'
	</div>';
}
echo '
  <fieldset class="m-0">'.legend($numgal.' : '.$catgal.$nomgal).'
    <form name="uggalleries" action="'.$baseurl.'&amp;regit=1&amp;numgal='.$numgal.($param4 == 'unitegallery' ? '#constructpanel' : '').'" method="POST">
      <fieldset class="m-0"><legend> '.$admin[134].' </legend>
        <div style="margin:6px 0 16px 26px;text-ailgn:center;">
          <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
            <input type="radio" name="param4" 
              onclick="cacheallug(); cache(\'bydef\'); cache(\''.$param13.'\'); cache(\'inter\'); cache(\'unitegallery\'); montre(\'commun\');" 
              value="lightbox"'.Checked($param4 == 'lightbox').' />
            '.$admin[1034].'
          </label>
          <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
            <input type="radio" name="param4" 
              onclick="cacheallug(); cache(\'bydef\'); cache(\''.$param13.'\'); cache(\'unitegallery\'); montre(\'inter\'); montre(\'commun\');" 
              value="lytebox"'.Checked($param4 == 'lytebox').' />
            '.$admin[1035].'
          </label>
          <label style="cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
            <input type="radio" name="param4" 
              onclick="montre(\'bydef\'); cache(\'inter\'); cache(\'commun\'); montre(\'unitegallery\'); montre(\''.$param13.'\'); montre(\'ugconstruct\');" 
              value="unitegallery"'.Checked($param4 == 'unitegallery').' />
            '.$admin[1740].'
          </label>
        </div>
        <div id="commun" style="display:'.(in_array($param4, array('lytebox','lightbox')) ? 'block' : 'none').';"><hr />
          <div class="table-responsive-md">
          <table class="table table-bordered w-100 m-auto">
            <tr id="inter" style="display:'.($param4 == 'lytebox' ? 'block' : 'none').';">
              <td style="margin-left:40px;">&bull; '.$admin[1313].'</td>
              <td><input class="form-control texte" type="text" name="param5" size="2" value="'.$param5.'" /></td>
          </tr>
          <tr>
            <td style="margin-left:40px;">&bull; '.$admin[1452].'</td>
            <td>
              <select class="form-control" name="param8">
                <option value="L"'.Selected('L' == $param8).'>'.$admin[390].'</option>
                <option value="C"'.Selected('C' == $param8).'>'.$admin[391].'</option>
                <option value="R"'.Selected('R' == $param8).'>'.$admin[392].'</option>
              </select>
            </td>
          </tr>
          <tr>
            <td style="margin-left:40px;">&bull; '.$admin[129].'</td>
            <td><input class="form-control texte" type="text" name="param1" size="2" value="'.$param1.'" /></td>
          </tr>
          <tr>
            <td style="margin-left:40px;">&bull; '.$admin[130].'</td>
            <td><input class="form-control texte" type="text" name="param2" size="4" value="'.$param2.'" /></td>
          </tr>
          <tr>
            <td style="margin-left:40px;">&bull; '.$admin[131].'</td>
            <td><input class="form-control texte" type="text" name="param3" size="4" value="'.$param3.'" /></td>
          </tr>
          <tr>
            <td style="margin-left:40px;">&bull; '.$admin[1450].'</td>
            <td><input class="form-control texte" type="text" name="param6" size="2" value="'.$param6.'" /></td>
          </tr>
          <tr>
            <td style="margin-left:40px;">&bull; '.$admin[1451].'</td>
            <td><input class="form-control texte" type="text" name="param7" size="3" value="'.$param7.'" /></td>
          </tr>
          '.InputCheckbox(10, $admin[1457], 'param9', $param9).'
          '.InputCheckbox(10, $admin[1458], 'param10', $param10).'
          '.InputCheckbox(10, $admin[1557], 'param11', $param11).'
          '.InputCheckbox(10, $admin[1558], 'param12', $param12).'
          </table>
          </div>
        </div>';
    $ugs   = array('ugtc','ugtj','ugtn','ugtg','ugca','ugdt','ugct','uggt','ugsl','ugvg');
    $ugsts = array('ugtc'=>$ugadmin[1],'ugtj'=>$ugadmin[2],'ugtn'=>$ugadmin[3],'ugtg'=>$ugadmin[4],'ugca'=>$ugadmin[5],
                   'ugdt'=>$ugadmin[6],'ugct'=>$ugadmin[7],'uggt'=>$ugadmin[8],'ugsl'=>$ugadmin[9],'ugvg'=>$ugadmin[10]);
    echo '
        <div id="unitegallery" style="display:'.($param4 == 'unitegallery' ? 'block' : 'none').';"><hr />
          <div style="margin:16px 0 10px 16px;text-align:center;">
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[0].'\');"  checked value="'.$ugs[0].'"'.Checked($param13 == $ugs[0]).' />
              '.$ugsts[$ugs[0]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[1].'\');" value="'.$ugs[1].'"'.Checked($param13 == $ugs[1]).' />
              '.$ugsts[$ugs[1]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[2].'\');" value="'.$ugs[2].'"'.Checked($param13 == $ugs[2]).' />
              '.$ugsts[$ugs[2]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[3].'\');" value="'.$ugs[3].'"'.Checked($param13 == $ugs[3]).' />
              '.$ugsts[$ugs[3]].'
            </label>
          </div>
          <div style="margin:20px 0 10px 16px;text-align:center;">
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[4].'\');" value="'.$ugs[4].'"'.Checked($param13 == $ugs[4]).' />
              '.$ugsts[$ugs[4]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[5].'\');" value="'.$ugs[5].'"'.Checked($param13 == $ugs[5]).' />
              '.$ugsts[$ugs[5]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[6].'\');" value="'.$ugs[6].'"'.Checked($param13 == $ugs[6]).' />
              '.$ugsts[$ugs[6]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[7].'\');" value="'.$ugs[7].'"'.Checked($param13 == $ugs[7]).' />
              '.$ugsts[$ugs[7]].'
            </label>
          </div>
          <div style="margin:20px 0 20px 26px;text-align:center;">
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[8].'\');" value="'.$ugs[8].'"'.Checked($param13 == $ugs[8]).' />
              '.$ugsts[$ugs[8]].'
            </label>
            <label style="margin-right:12px;cursor:pointer;background-color:#DCD9E0;padding:8px;border:1px solid #000;border-radius:6px;">
              <input type="radio" name="param13" onclick="cacheallug(); montre(\''.$ugs[9].'\');" value="'.$ugs[9].'"'.Checked($param13 == $ugs[9]).' />
              '.$ugsts[$ugs[9]].'
            </label>
          </div>
        </div>
        <div id="ugtc" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugtc' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:0 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100 m-auto">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (100%)', 'tcgo1', $ugtc_go[1], 4).'
              '.InputTexte(32, $ugadmin[27].' (150)', 'tcgo2', $ugtc_go[2], 4).'
              '.GetSelector(32, $ugadmin[31], 'tcgo3', $ugtc_go[3]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[12].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[32].' (250)', 'tcto1', $ugtc_to[1], 4).'
              '.SelectText(32, $ugadmin[33], 'tcto2', $ugtc_to[2], $textalign).'
              '.InputTexte(32, $ugadmin[34].' (3)', 'tcto3', $ugtc_to[3], 4).'
              '.InputCheckbox(32, $ugadmin[36].' ('.$admin[1604].')', 'tcto4', ($ugtc_to[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[35].' (3)', 'tcto5', $ugtc_to[5], 4).'
              '.InputCheckbox(32, $ugadmin[37].' ('.$admin[1605].')', 'tcto6', ($ugtc_to[6] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[38].' (2)', 'tcto7', $ugtc_to[7], 4).'
              '.InputTexte(32, $ugadmin[40].' ('.$ugadmin[139].')', 'tcto8', $ugtc_to[8], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[13].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[41].' ('.$admin[1604].')', 'tctdo1', ($ugtc_tdo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[42].' (3)', 'tctdo2', $ugtc_tdo[2], 4).'
              '.GetSelector(32, $ugadmin[43].' (#F0F0F0)', 'tctdo3', $ugtc_tdo[3]).'
              '.InputTexte(32, $ugadmin[44].' (0)', 'tctdo4', $ugtc_tdo[4], 4).'
              '.InputCheckbox(32, $ugadmin[46].' ('.$admin[1604].')', 'tctdo5', ($ugtc_tdo[5] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[47].' (#8B8B8B)', 'tctdo6', $ugtc_tdo[6]).'
              '.InputCheckbox(32, $ugadmin[48].' ('.$admin[1605].')', 'tctdo7', ($ugtc_tdo[7] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[49].' (#8B8B8B)', 'tctdo8', $ugtc_tdo[8]).'
              '.InputCheckbox(32, $ugadmin[53].' ('.$admin[1605].')', 'tctdo9', ($ugtc_tdo[9] == 'true' ? true : false)).'
              '.InputNumber(32, $ugadmin[54].' (0.4)', 'tctdo10', 0, 1, $ugtc_tdo[10], 0.1).'
              '.GetSelector(32, $ugadmin[55].' (#000000)', 'tctdo11', $ugtc_tdo[11]).'
              '.InputCheckbox(32, $ugadmin[57].' ('.$admin[1605].')', 'tctdo12', ($ugtc_tdo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[51].' ('.$admin[1604].')', 'tctdo13', ($ugtc_tdo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[52].' ('.$admin[1604].')', 'tctdo14', ($ugtc_tdo[14] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[58].' (26)', 'tctdo15', $ugtc_tdo[15], 4).'
              '.InputCheckbox(32, $ugadmin[59].' ('.$admin[1604].')', 'tctdo16', ($ugtc_tdo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[60], 'tctdo17', $ugtc_tdo[17], $effects).'
              '.InputCheckbox(32, $ugadmin[61].' ('.$admin[1604].')', 'tctdo18', ($ugtc_tdo[18] == 'true' ? true : false)).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[14].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[62].' ('.$admin[1604].')', 'tcttpo1', ($ugtc_ttpo[1] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[63].' ('.$admin[1604].')', 'tcttpo2', ($ugtc_ttpo[2] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[64], 'tcttpo3', $ugtc_ttpo[3], $appears).'
              '.SelectText(32, $ugadmin[65], 'tcttpo4', $ugtc_ttpo[4], $panelpos).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'tcttpo5', 0, 1, $ugtc_ttpo[5], 0.1).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'tcttpo6', $ugtc_ttpo[6]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[15].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[68], 'tclo1', $ugtc_lo[1], $lightbox).'
              '.SelectText(32, $ugadmin[69], 'tclo2', $ugtc_lo[2], $arrowspos).'
              '.InputCheckbox(32, $ugadmin[70].' ('.$admin[1604].')', 'tclo3', ($ugtc_lo[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[71].' ('.$admin[1605].')', 'tclo4', ($ugtc_lo[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[72].' (10)', 'tclo5', $ugtc_lo[5], 4).'
              '.GetSelector(32, $ugadmin[73].' (#FFFFFF)', 'tclo6', $ugtc_lo[6]).'
              '.InputTexte(32, $ugadmin[74].' (0)', 'tclo7', $ugtc_lo[7], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugtj" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugtj' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (100%)', 'tjgo1', $ugtj_go[1], 4).'
              '.InputTexte(32, $ugadmin[27].' (150)', 'tjgo2', $ugtj_go[2], 4).'
              '.GetSelector(32, $ugadmin[31], 'tjgo3', $ugtj_go[3]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:-12px 0 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[12].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[75].' (150)', 'tjto1', $ugtj_to[1], 4).'
              '.InputTexte(32, $ugadmin[76].' (3)', 'tjto2', $ugtj_to[2], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[13].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[41].' ('.$admin[1604].')', 'tjtdo1', ($ugtj_tdo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[42].' (3)', 'tjtdo2', $ugtj_tdo[2], 4).'
              '.GetSelector(32, $ugadmin[43].' (#F0F0F0)', 'tjtdo3', $ugtj_tdo[3]).'
              '.InputTexte(32, $ugadmin[44].' (0)', 'tjtdo4', $ugtj_tdo[4], 4).'
              '.InputCheckbox(32, $ugadmin[46].' ('.$admin[1604].')', 'tjtdo5', ($ugtj_tdo[5] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[47].' (#8B8B8B)', 'tjtdo6', $ugtj_tdo[6]).'
              '.InputCheckbox(32, $ugadmin[48].' ('.$admin[1605].')', 'tjtdo7', ($ugtj_tdo[7] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[49].' (#8B8B8B)', 'tjtdo8', $ugtj_tdo[8]).'
              '.InputCheckbox(32, $ugadmin[53].' ('.$admin[1605].')', 'tjtdo9', ($ugtj_tdo[9] == 'true' ? true : false)).'
              '.InputNumber(32, $ugadmin[54].' (0.4)', 'tjtdo10', 0, 1, $ugtj_tdo[10], 0.1).'
              '.GetSelector(32, $ugadmin[55].' (#000000)', 'tjtdo11', $ugtj_tdo[11]).'
              '.InputCheckbox(32, $ugadmin[57].' ('.$admin[1605].')', 'tjtdo12', ($ugtj_tdo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[51].' ('.$admin[1604].')', 'tjtdo13', ($ugtj_tdo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[52].' ('.$admin[1604].')', 'tjtdo14', ($ugtj_tdo[14] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[58].' (26)', 'tjtdo15', $ugtj_tdo[15], 4).'
              '.InputCheckbox(32, $ugadmin[59].' ('.$admin[1604].')', 'tjtdo16', ($ugtj_tdo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[60], 'tjtdo17', $ugtj_tdo[17], $effects).'
              '.InputCheckbox(32, $ugadmin[61].' ('.$admin[1604].')', 'tjtdo18', ($ugtj_tdo[18] == 'true' ? true : false)).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[14].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[62].' ('.$admin[1604].')', 'tjttpo1', ($ugtj_ttpo[1] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[63].' ('.$admin[1604].')', 'tjttpo2', ($ugtj_ttpo[2] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[64], 'tjttpo3', $ugtj_ttpo[3], $appears).'
              '.SelectText(32, $ugadmin[65], 'tjttpo4', $ugtj_ttpo[4], $panelpos).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'tjttpo5', 0, 1, $ugtj_ttpo[5], 0.1).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'tjttpo6', $ugtj_ttpo[6]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0; padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[15].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[68], 'tjlo1', $ugtj_lo[1], $lightbox).'
              '.SelectText(32, $ugadmin[69], 'tjlo2', $ugtj_lo[2], $arrowspos).'
              '.InputCheckbox(32, $ugadmin[70].' ('.$admin[1604].')', 'tjlo3', ($ugtj_lo[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[71].' ('.$admin[1605].')', 'tjlo4', ($ugtj_lo[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[72].' (10)', 'tjlo5', $ugtj_lo[5], 4).'
              '.GetSelector(32, $ugadmin[73].' (#FFFFFF)', 'tjlo6', $ugtj_lo[6]).'
              '.InputTexte(32, $ugadmin[74].' (0)', 'tjlo7', $ugtj_lo[7], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugtn" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugtn' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (100%)', 'tngo1', $ugtn_go[1], 4).'
              '.InputTexte(32, $ugadmin[27].' (150)', 'tngo2', $ugtn_go[2], 4).'
              '.GetSelector(32, $ugadmin[31], 'tngo3', $ugtn_go[3]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[12].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[77].' ('.$admin[1605].')', 'tnto1', ($ugtn_to[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[34].' (3)', 'tnto2', $ugtn_to[2], 4).'
              '.InputTexte(32, $ugadmin[35].' (3)', 'tnto3', $ugtn_to[3], 4).'
              '.InputTexte(32, $ugadmin[39].' (250)', 'tnto4', $ugtn_to[4], 4).'
              '.InputTexte(32, $ugadmin[38].' (2)', 'tnto5', $ugtn_to[5], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[13].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[41].' ('.$admin[1604].')', 'tntdo1', ($ugtn_tdo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[42].' (3)', 'tntdo2', $ugtn_tdo[2], 4).'
              '.GetSelector(32, $ugadmin[43].' (#F0F0F0)', 'tntdo3', $ugtn_tdo[3]).'
              '.InputTexte(32, $ugadmin[44].' (0)', 'tntdo4', $ugtn_tdo[4], 4).'
              '.InputCheckbox(32, $ugadmin[46].' ('.$admin[1604].')', 'tntdo5', ($ugtn_tdo[5] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[47].' (#8B8B8B)', 'tntdo6', $ugtn_tdo[6]).'
              '.InputCheckbox(32, $ugadmin[48].' ('.$admin[1605].')', 'tntdo7', ($ugtn_tdo[7] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[49].' (#8B8B8B)', 'tntdo8', $ugtn_tdo[8]).'
              '.InputCheckbox(32, $ugadmin[53].' ('.$admin[1605].')', 'tntdo9', ($ugtn_tdo[9] == 'true' ? true : false)).'
              '.InputNumber(32, $ugadmin[54].' (0.4)', 'tntdo10', 0, 1, $ugtn_tdo[10], 0.1).'
              '.GetSelector(32, $ugadmin[55].' (#000000)', 'tntdo11', $ugtn_tdo[11]).'
              '.InputCheckbox(32, $ugadmin[57].' ('.$admin[1605].')', 'tntdo12', ($ugtn_tdo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[51].' ('.$admin[1604].')', 'tntdo13', ($ugtn_tdo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[52].' ('.$admin[1604].')', 'tntdo14', ($ugtn_tdo[14] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[58].' (26)', 'tntdo15', $ugtn_tdo[15], 4).'
              '.InputCheckbox(32, $ugadmin[59].' ('.$admin[1604].')', 'tntdo16', ($ugtn_tdo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[60], 'tntdo17', $ugtn_tdo[17], $effects).'
              '.InputCheckbox(32, $ugadmin[61].' ('.$admin[1604].')', 'tntdo18', ($ugtn_tdo[18] == 'true' ? true : false)).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[14].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[62].' ('.$admin[1604].')', 'tnttpo1', ($ugtn_ttpo[1] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[63].' ('.$admin[1604].')', 'tnttpo2', ($ugtn_ttpo[2] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[64], 'tnttpo3', $ugtn_ttpo[3], $appears).'
              '.SelectText(32, $ugadmin[65], 'tnttpo4', $ugtn_ttpo[4], $panelpos).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'tnttpo5', 0, 1, $ugtn_ttpo[5], 0.1).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'tnttpo6', $ugtn_ttpo[6]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[15].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[68], 'tnlo1', $ugtn_lo[1], $lightbox).'
              '.SelectText(32, $ugadmin[69], 'tnlo2', $ugtn_lo[2], $arrowspos).'
              '.InputCheckbox(32, $ugadmin[70].' ('.$admin[1604].')', 'tnlo3', ($ugtn_lo[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[71].' ('.$admin[1605].')', 'tnlo4', ($ugtn_lo[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[72].' (10)', 'tnlo5', $ugtn_lo[5], 4).'
              '.GetSelector(32, $ugadmin[73].' (#FFFFFF)', 'tnlo6', $ugtn_lo[6]).'
              '.InputTexte(32, $ugadmin[74].' (0)', 'tnlo7', $ugtn_lo[7], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugtg" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugtg' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[17].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[78].' (180)', 'tgmo1', $ugtg_mo[1], 4).'
              '.InputTexte(32, $ugadmin[79].' (150)', 'tgmo2', $ugtg_mo[2], 4).'
              '.InputTexte(32, $ugadmin[80].' (10)', 'tgmo3', $ugtg_mo[3], 4).'
              '.InputTexte(32, $ugadmin[81].' (20)', 'tgmo4', $ugtg_mo[4], 4).'
              '.InputTexte(32, $ugadmin[82].' (20)', 'tgmo5', $ugtg_mo[5], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (100%)', 'tggo1', $ugtg_go[1], 4).'
              '.InputTexte(32, $ugadmin[27].' (150)', 'tggo2', $ugtg_go[2], 4).'
              '.GetSelector(32, $ugadmin[31], 'tggo3', $ugtg_go[3]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:0 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[18].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[83].' (3)', 'tgno1', $ugtg_no[1], 4).'
              '.SelectText(32, $ugadmin[84], 'tgno2', $ugtg_no[2], $navtype).'
              '.InputTexte(32, $ugadmin[85].' (40)', 'tgno3', $ugtg_no[3], 4).'
              '.SelectText(32, $ugadmin[86], 'tgno4', $ugtg_no[4], $bullcolor).'
              '.InputTexte(32, $ugadmin[87].' (12)', 'tgno5', $ugtg_no[5], 4).'
              '.InputTexte(32, $ugadmin[88].' (20)', 'tgno6', $ugtg_no[6], 4).'
              '.InputTexte(32, $ugadmin[89].' (5)', 'tgno7', $ugtg_no[7], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[13].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[41].' ('.$admin[1604].')', 'tgtdo1', ($ugtg_tdo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[42].' (3)', 'tgtdo2', $ugtg_tdo[2], 4).'
              '.GetSelector(32, $ugadmin[43].' (#F0F0F0)', 'tgtdo3', $ugtg_tdo[3]).'
              '.InputTexte(32, $ugadmin[44].' (0)', 'tgtdo4', $ugtg_tdo[4], 4).'
              '.InputCheckbox(32, $ugadmin[46].' ('.$admin[1604].')', 'tgtdo5', ($ugtg_tdo[5] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[47].' (#8B8B8B)', 'tgtdo6', $ugtg_tdo[6]).'
              '.InputCheckbox(32, $ugadmin[48].' ('.$admin[1605].')', 'tgtdo7', ($ugtg_tdo[7] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[49].' (#8B8B8B)', 'tgtdo8', $ugtg_tdo[8]).'
              '.InputCheckbox(32, $ugadmin[53].' ('.$admin[1605].')', 'tgtdo9', ($ugtg_tdo[9] == 'true' ? true : false)).'
              '.InputNumber(32, $ugadmin[54].' (0.4)', 'tgtdo10', 0, 1, $ugtg_tdo[10], 0.1).'
              '.GetSelector(32, $ugadmin[55].' (#000000)', 'tgtdo11', $ugtg_tdo[11]).'
              '.InputCheckbox(32, $ugadmin[57].' ('.$admin[1605].')', 'tgtdo12', ($ugtg_tdo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[51].' ('.$admin[1604].')', 'tgtdo13', ($ugtg_tdo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[52].' ('.$admin[1605].')', 'tgtdo14', ($ugtg_tdo[14] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[58].' (26)', 'tgtdo15', $ugtg_tdo[15], 4).'
              '.InputCheckbox(32, $ugadmin[59].' ('.$admin[1604].')', 'tgtdo16', ($ugtg_tdo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[60], 'tgtdo17', $ugtg_tdo[17], $effects).'
              '.InputCheckbox(32, $ugadmin[61].' ('.$admin[1604].')', 'tgtdo18', ($ugtg_tdo[18] == 'true' ? true : false)).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[14].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[62].' ('.$admin[1604].')', 'tgttpo1', ($ugtg_ttpo[1] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[63].' ('.$admin[1604].')', 'tgttpo2', ($ugtg_ttpo[2] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[64], 'tgttpo3', $ugtg_ttpo[3], $appears).'
              '.SelectText(32, $ugadmin[65], 'tgttpo4', $ugtg_ttpo[4], $panelpos).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'tgttpo5', 0, 1, $ugtg_ttpo[5], 0.1).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'tgttpo6', $ugtg_ttpo[6]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[15].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[68], 'tglo1', $ugtg_lo[1], $lightbox).'
              '.SelectText(32, $ugadmin[69], 'tglo2', $ugtg_lo[2], $arrowspos).'
              '.InputCheckbox(32, $ugadmin[70].' ('.$admin[1604].')', 'tglo3', ($ugtg_lo[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[71].' ('.$admin[1605].')', 'tglo4', ($ugtg_lo[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[72].' (10)', 'tglo5', $ugtg_lo[5], 4).'
              '.GetSelector(32, $ugadmin[73].' (#FFFFFF)', 'tglo6', $ugtg_lo[6]).'
              '.InputTexte(32, $ugadmin[74].' (0)', 'tglo7', $ugtg_lo[7], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugca" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugca' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[17].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[78].' (160)', 'camo1', $ugca_mo[1], 4).'
              '.InputTexte(32, $ugadmin[79].' (160)', 'camo2', $ugca_mo[2], 4).'
              '.SelectText(32, $ugadmin[90], 'camo3', $ugca_mo[3], $textalign).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (100%)', 'cago1', $ugca_go[1], 4).'
              '.InputTexte(32, $ugadmin[27].' (150)', 'cago2', $ugca_go[2], 4).'
              '.GetSelector(32, $ugadmin[31], 'cago3', $ugca_go[3]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[19].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[125].' (20)', 'caco1', $ugca_co[1], 4).'
              '.InputTexte(32, $ugadmin[126].' (3)', 'caco2', $ugca_co[2], 4).'
              '.InputCheckbox(32, $ugadmin[127].' ('.$admin[1605].')', 'caco3', ($ugca_co[3] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[128].' (3000)', 'caco4', $ugca_co[4], 4).'
              '.SelectText(32, $ugadmin[129], 'caco5', $ugca_co[5], $textdir).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[18].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[130].' ('.$admin[1605].')', 'cano1', ($ugca_no[1] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[131], 'cano2', $ugca_no[2], $vertpos).'
              '.InputTexte(32, $ugadmin[132].' (20)', 'cano3', $ugca_no[3], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[13].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[41].' ('.$admin[1604].')', 'catdo1', ($ugca_tdo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[42].' (3)', 'catdo2', $ugca_tdo[2], 4).'
              '.GetSelector(32, $ugadmin[43].' (#F0F0F0)', 'catdo3', $ugca_tdo[3]).'
              '.InputTexte(32, $ugadmin[44].' (0)', 'catdo4', $ugca_tdo[4], 4).'
              '.InputCheckbox(32, $ugadmin[46].' ('.$admin[1604].')', 'catdo5', ($ugca_tdo[5] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[47].' (#8B8B8B)', 'catdo6', $ugca_tdo[6]).'
              '.InputCheckbox(32, $ugadmin[48].' ('.$admin[1605].')', 'catdo7', ($ugca_tdo[7] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[49].' (#8B8B8B)', 'catdo8', $ugca_tdo[8]).'
              '.InputCheckbox(32, $ugadmin[53].' ('.$admin[1605].')', 'catdo9', ($ugca_tdo[9] == 'true' ? true : false)).'
              '.InputNumber(32, $ugadmin[54].' (0.4)', 'catdo10', 0, 1, $ugca_tdo[10], 0.1).'
              '.GetSelector(32, $ugadmin[55].' (#000000)', 'catdo11', $ugca_tdo[11]).'
              '.InputCheckbox(32, $ugadmin[57].' ('.$admin[1605].')', 'catdo12', ($ugca_tdo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[51].' ('.$admin[1604].')', 'catdo13', ($ugca_tdo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[52].' ('.$admin[1605].')', 'catdo14', ($ugca_tdo[14] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[58].' (26)', 'catdo15', $ugca_tdo[15], 4).'
              '.InputCheckbox(32, $ugadmin[59].' ('.$admin[1604].')', 'catdo16', ($ugca_tdo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[60], 'catdo17', $ugca_tdo[17], $effects).'
              '.InputCheckbox(32, $ugadmin[61].' ('.$admin[1604].')', 'catdo18', ($ugca_tdo[18] == 'true' ? true : false)).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[14].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[62].' ('.$admin[1604].')', 'cattpo1', ($ugca_ttpo[1] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[63].' ('.$admin[1604].')', 'cattpo2', ($ugca_ttpo[2] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[64], 'cattpo3', $ugca_ttpo[3], $appears).'
              '.SelectText(32, $ugadmin[65], 'cattpo4', $ugca_ttpo[4], $panelpos).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'cattpo5', 0, 1, $ugca_ttpo[5], 0.1).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'cattpo6', $ugca_ttpo[6]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[15].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[68], 'calo1', $ugca_lo[1], $lightbox).'
              '.SelectText(32, $ugadmin[69], 'calo2', $ugca_lo[2], $arrowspos).'
              '.InputCheckbox(32, $ugadmin[70].' ('.$admin[1604].')', 'calo3', ($ugca_lo[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[71].' ('.$admin[1605].')', 'calo4', ($ugca_lo[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[72].' (10)', 'calo5', $ugca_lo[5], 4).'
              '.GetSelector(32, $ugadmin[73].' (#FFFFFF)', 'calo6', $ugca_lo[6]).'
              '.InputTexte(32, $ugadmin[74].' (0)', 'calo7', $ugca_lo[7], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugdt" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugdt' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[20].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[133].' ('.$admin[1605].')', 'dttmo1', ($ugdt_tmo[1] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[134].' ('.$admin[1605].')', 'dttmo2', ($ugdt_tmo[2] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[135].' ('.$admin[1605].')', 'dttmo3', ($ugdt_tmo[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[136].' ('.$admin[1605].')', 'dttmo4', ($ugdt_tmo[4] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[137], 'dttmo5', $ugdt_tmo[5], $textalign).'
              '.InputTexte(32, $ugadmin[138].' (480)', 'dttmo6', $ugdt_tmo[6], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (900)', 'dtgo1', $ugdt_go[1], 4).'
              '.InputTexte(32, $ugadmin[26].' (500)', 'dtgo2', $ugdt_go[2], 4).'
              '.InputTexte(32, $ugadmin[27].' (400)', 'dtgo3', $ugdt_go[3], 4).'
              '.InputTexte(32, $ugadmin[28].' (300)', 'dtgo4', $ugdt_go[4], 4).'
              '.InputCheckbox(32, $ugadmin[29].' ('.$admin[1604].')', 'dtgo5', ($ugdt_go[5] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[30].' (3000)', 'dtgo6', $ugdt_go[6], 4).'
              '.GetSelector(32, $ugadmin[31], 'dtgo7', $ugdt_go[7]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[21].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[140], 'dtslo1', $ugdt_slo[1], $transit).'
              '.SelectText(32, $ugadmin[141], 'dtslo2', $ugdt_slo[2], $appears).'
              '.InputTexte(32, $ugadmin[142].' (300)', 'dtslo3', $ugdt_slo[3], 4).'
              '.InputCheckbox(32, $ugadmin[145].' ('.$admin[1605].')', 'dtslo4', ($ugdt_slo[4] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[146].' ('.$admin[1605].')', 'dtslo5', ($ugdt_slo[5] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[147], 'dtslo6', $ugdt_slo[6], $progress).'
              '.SelectText(32, $ugadmin[148], 'dtslo7', $ugdt_slo[7], $textalign).'
              '.SelectText(32, $ugadmin[149], 'dtslo8', $ugdt_slo[8], $vertalign).'
              '.GetSelector(32, $ugadmin[150].' (#FFFFFF)', 'dtslo9', $ugdt_slo[9]).'
              '.InputNumber(32, $ugadmin[151].' (0.6)', 'dtslo10', 0, 1, $ugdt_slo[10], 0.1).'
              '.InputCheckbox(32, $ugadmin[134].' ('.$admin[1605].')', 'dtslo11', ($ugdt_slo[11] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[133].' ('.$admin[1605].')', 'dtslo12', ($ugdt_slo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[152].' ('.$admin[1605].')', 'dtslo13', ($ugdt_slo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[153].' ('.$admin[1605].')', 'dtslo14', ($ugdt_slo[14] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[154].' ('.$admin[1605].')', 'dtslo15', ($ugdt_slo[15] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[156].' ('.$admin[1604].')', 'dtslo16', ($ugdt_slo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[157], 'dtslo17', $ugdt_slo[17], $vertpos2).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'dtslo18', $ugdt_slo[18]).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'dtslo19', 0, 1, $ugdt_slo[19], 0.1).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[22].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[159].' (88)', 'dttho1', $ugdt_tho[1], 4).'
              '.InputTexte(32, $ugadmin[160].' (50)', 'dttho2', $ugdt_tho[2], 4).'
              '.InputCheckbox(32, $ugadmin[161].' ('.$admin[1605].')', 'dttho3', ($ugdt_tho[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[162].' ('.$admin[1605].')', 'dttho4', ($ugdt_tho[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[163].' (0)', 'dttho5', $ugdt_tho[5], 4).'
              '.GetSelector(32, $ugadmin[164].' (#000000)', 'dttho6', $ugdt_tho[6]).'
              '.InputTexte(32, $ugadmin[165].' (0)', 'dttho7', $ugdt_tho[7], 4).'
              '.GetSelector(32, $ugadmin[166].' (#D9D9D9)', 'dttho8', $ugdt_tho[8]).'
              '.InputTexte(32, $ugadmin[167].' (1)', 'dttho9', $ugdt_tho[9], 4).'
              '.GetSelector(32, $ugadmin[168].' (#D9D9D9)', 'dttho10', $ugdt_tho[10]).'
              '.InputTexte(32, $ugadmin[169].' (0)', 'dttho11', $ugdt_tho[11], 4).'
              '.InputCheckbox(32, $ugadmin[170].' ('.$admin[1605].')', 'dttho12', ($ugdt_tho[12] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[171].' (#000000)', 'dttho13', $ugdt_tho[13]).'
              '.InputNumber(32, $ugadmin[172].' (0.4)', 'dttho14', 0, 1, $ugdt_tho[14], 0.1).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[23].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[173].' ('.$admin[1604].')', 'dtstpo1', ($ugdt_stpo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[174].' (2)', 'dtstpo2', $ugdt_stpo[2], 4).'
              '.SelectText(32, $ugadmin[175], 'dtstpo3', $ugdt_stpo[3], $thumbrole).'
              '.SelectText(32, $ugadmin[176], 'dtstpo4', $ugdt_stpo[4], $panalign).'
              '.GetSelector(32, $ugadmin[177], 'dtstpo5', $ugdt_stpo[5]).'
              '.SelectText(32, $ugadmin[178], 'dtstpo6', $ugdt_stpo[6], $panalign).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugct" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugct' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[20].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[179], 'cttmo1', $ugct_tmo[1], $panelpos2).'
              '.InputTexte(32, $ugadmin[180].' (480)', 'cttmo2', $ugct_tmo[2], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (900)', 'ctgo1', $ugct_go[1], 4).'
              '.InputTexte(32, $ugadmin[26].' (500)', 'ctgo2', $ugct_go[2], 4).'
              '.InputTexte(32, $ugadmin[27].' (400)', 'ctgo3', $ugct_go[3], 4).'
              '.InputTexte(32, $ugadmin[28].' (300)', 'ctgo4', $ugct_go[4], 4).'
              '.InputCheckbox(32, $ugadmin[29].' ('.$admin[1604].')', 'ctgo5', ($ugct_go[5] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[30].' (3000)', 'ctgo6', $ugct_go[6], 4).'
              '.GetSelector(32, $ugadmin[31], 'ctgo7', $ugct_go[7]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[21].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[140], 'ctslo1', $ugct_slo[1], $transit).'
              '.SelectText(32, $ugadmin[141], 'ctslo2', $ugct_slo[2], $appears).'
              '.InputTexte(32, $ugadmin[142].' (300)', 'ctslo3', $ugct_slo[3], 4).'
              '.InputCheckbox(32, $ugadmin[145].' ('.$admin[1605].')', 'ctslo4', ($ugct_slo[4] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[146].' ('.$admin[1605].')', 'ctslo5', ($ugct_slo[5] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[147], 'ctslo6', $ugct_slo[6], $progress).'
              '.SelectText(32, $ugadmin[148], 'ctslo7', $ugct_slo[7], $textalign).'
              '.SelectText(32, $ugadmin[149], 'ctslo8', $ugct_slo[8], $vertalign).'
              '.GetSelector(32, $ugadmin[150].' (#FFFFFF)', 'ctslo9', $ugct_slo[9]).'
              '.InputNumber(32, $ugadmin[151].' (0.6)', 'ctslo10', 0, 1, $ugct_slo[10], 0.1).'
              '.InputCheckbox(32, $ugadmin[134].' ('.$admin[1605].')', 'ctslo11', ($ugct_slo[11] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[133].' ('.$admin[1605].')', 'ctslo12', ($ugct_slo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[152].' ('.$admin[1605].')', 'ctslo13', ($ugct_slo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[153].' ('.$admin[1605].')', 'ctslo14', ($ugct_slo[14] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[154].' ('.$admin[1605].')', 'ctslo15', ($ugct_slo[15] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[156].' ('.$admin[1604].')', 'ctslo16', ($ugct_slo[16] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[157], 'ctslo17', $ugct_slo[17], $vertpos2).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'ctslo18', $ugct_slo[18]).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'ctslo19', 0, 1, $ugct_slo[19], 0.1).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[22].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[159].' (88)', 'cttho1', $ugct_tho[1], 4).'
              '.InputTexte(32, $ugadmin[160].' (50)', 'cttho2', $ugct_tho[2], 4).'
              '.InputCheckbox(32, $ugadmin[161].' ('.$admin[1605].')', 'cttho3', ($ugct_tho[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[162].' ('.$admin[1605].')', 'cttho4', ($ugct_tho[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[163].' (0)', 'cttho5', $ugct_tho[5], 4).'
              '.GetSelector(32, $ugadmin[164].' (#000000)', 'cttho6', $ugct_tho[6]).'
              '.InputTexte(32, $ugadmin[165].' (1)', 'cttho7', $ugct_tho[7], 4).'
              '.GetSelector(32, $ugadmin[166].' (#D9D9D9)', 'cttho8', $ugct_tho[8]).'
              '.InputTexte(32, $ugadmin[167].' (1)', 'cttho9', $ugct_tho[9], 4).'
              '.GetSelector(32, $ugadmin[168].' (#D9D9D9)', 'cttho10', $ugct_tho[10]).'
              '.InputTexte(32, $ugadmin[169].' (0)', 'cttho11', $ugct_tho[11], 4).'
              '.InputCheckbox(32, $ugadmin[170].' ('.$admin[1605].')', 'cttho12', ($ugct_tho[12] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[171].' (#000000)', 'cttho13', $ugct_tho[13]).'
              '.InputNumber(32, $ugadmin[172].' (0.4)', 'cttho14', 0, 1, $ugct_tho[14], 0.1).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[23].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[173].' ('.$admin[1604].')', 'ctstpo1', ($ugct_stpo[1] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[174].' (2)', 'ctstpo2', $ugct_stpo[2], 4).'
              '.SelectText(32, $ugadmin[175], 'ctstpo3', $ugct_stpo[3], $thumbrole).'
              '.SelectText(32, $ugadmin[176], 'ctstpo4', $ugct_stpo[4], $panalign).'
              '.GetSelector(32, $ugadmin[177], 'ctstpo5', $ugct_stpo[5]).'
              '.SelectText(32, $ugadmin[178], 'ctstpo6', $ugct_stpo[6], $panalign).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="uggt" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'uggt' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[20].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[179], 'gttmo1', $uggt_tmo[1], $panelpos2).'
              '.InputTexte(32, $ugadmin[180].' (480)', 'gttmo2', $uggt_tmo[2], 4).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (900)', 'gtgo1', $uggt_go[1], 4).'
              '.InputTexte(32, $ugadmin[26].' (500)', 'gtgo2', $uggt_go[2], 4).'
              '.InputTexte(32, $ugadmin[27].' (400)', 'gtgo3', $uggt_go[3], 4).'
              '.InputTexte(32, $ugadmin[28].' (300)', 'gtgo4', $uggt_go[4], 4).'
              '.InputCheckbox(32, $ugadmin[29].' ('.$admin[1604].')', 'gtgo5', ($uggt_go[5] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[30].' (3000)', 'gtgo6', $uggt_go[6], 4).'
              '.GetSelector(32, $ugadmin[31], 'gtgo7', $uggt_go[7]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[21].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[140], 'gtslo1', $uggt_slo[1], $transit).'
              '.SelectText(32, $ugadmin[141], 'gtslo2', $uggt_slo[2], $appears).'
              '.InputTexte(32, $ugadmin[142].' (300)', 'gtslo3', $uggt_slo[3], 4).'
              '.InputCheckbox(32, $ugadmin[145].' ('.$admin[1605].')', 'gtslo4', ($uggt_slo[4] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[146].' ('.$admin[1605].')', 'gtslo5', ($uggt_slo[5] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[147], 'gtslo6', $uggt_slo[6], $progress).'
              '.SelectText(32, $ugadmin[148], 'gtslo7', $uggt_slo[7], $textalign).'
              '.SelectText(32, $ugadmin[149], 'gtslo8', $uggt_slo[8], $vertalign).'
              '.GetSelector(32, $ugadmin[150].' (#FFFFFF)', 'gtslo9', $uggt_slo[9]).'
              '.InputNumber(32, $ugadmin[151].' (0.6)', 'gtslo10', 0, 1, $uggt_slo[10], 0.1).'
              '.InputCheckbox(32, $ugadmin[134].' ('.$admin[1605].')', 'gtslo11', ($uggt_slo[11] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[133].' ('.$admin[1605].')', 'gtslo12', ($uggt_slo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[152].' ('.$admin[1605].')', 'gtslo13', ($uggt_slo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[153].' ('.$admin[1605].')', 'gtslo14', ($uggt_slo[14] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[154].' ('.$admin[1605].')', 'gtslo15', ($uggt_slo[15] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[155].' ('.$admin[1605].')', 'gtslo16', ($uggt_slo[16] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[156].' ('.$admin[1604].')', 'gtslo17', ($uggt_slo[17] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[157], 'gtslo18', $uggt_slo[18], $vertpos2).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'gtslo19', $uggt_slo[19]).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'gtslo20', 0, 1, $uggt_slo[20], 0.1).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[22].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[159].' (88)', 'gttho1', $uggt_tho[1], 4).'
              '.InputTexte(32, $ugadmin[160].' (50)', 'gttho2', $uggt_tho[2], 4).'
              '.InputCheckbox(32, $ugadmin[161].' ('.$admin[1605].')', 'gttho3', ($uggt_tho[3] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[162].' ('.$admin[1605].')', 'gttho4', ($uggt_tho[4] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[163].' (0)', 'gttho5', $uggt_tho[5], 4).'
              '.GetSelector(32, $ugadmin[164].' (#000000)', 'gttho6', $uggt_tho[6]).'
              '.InputTexte(32, $ugadmin[167].' (1)', 'gttho7', $uggt_tho[7], 4).'
              '.GetSelector(32, $ugadmin[168].' (#D9D9D9)', 'gttho8', $uggt_tho[8]).'
              '.InputTexte(32, $ugadmin[169].' (0)', 'gttho9', $uggt_tho[9], 4).'
              '.InputCheckbox(32, $ugadmin[170].' ('.$admin[1605].')', 'gttho10', ($uggt_tho[10] == 'true' ? true : false)).'
              '.GetSelector(32, $ugadmin[171].' (#000000)', 'gttho11', $uggt_tho[11]).'
              '.InputNumber(32, $ugadmin[172].' (0.4)', 'gttho12', 0, 1, $uggt_tho[12], 0.1).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[24].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputCheckbox(32, $ugadmin[181].' ('.$admin[1605].')', 'gtgpo1', ($uggt_gpo[1] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[179], 'gtgpo2', $uggt_gpo[2], $panalign).'
              '.SelectText(32, $ugadmin[182], 'gtgpo3', $uggt_gpo[3], $gridvert).'
              '.SelectText(32, $ugadmin[183], 'gtgpo4', $uggt_gpo[4], $gridhoriz).'
              '.SelectText(32, $ugadmin[184], 'gtgpo5', $uggt_gpo[5], $griddir).'
              '.InputTexte(32, $ugadmin[185].' (2)', 'gtgpo6', $uggt_gpo[6], 4).'
              '.InputTexte(32, $ugadmin[186].' (10)', 'gtgpo7', $uggt_gpo[7], 4).'
              '.InputTexte(32, $ugadmin[187].' (10)', 'gtgpo8', $uggt_gpo[8], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugsl" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugsl' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[11].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.InputTexte(32, $ugadmin[25].' (900)', 'slgo1', $ugsl_go[1], 4).'
              '.InputTexte(32, $ugadmin[26].' (500)', 'slgo2', $ugsl_go[2], 4).'
              '.InputTexte(32, $ugadmin[27].' (400)', 'slgo3', $ugsl_go[3], 4).'
              '.InputTexte(32, $ugadmin[28].' (300)', 'slgo4', $ugsl_go[4], 4).'
              '.InputCheckbox(32, $ugadmin[29].' ('.$admin[1604].')', 'slgo5', ($ugsl_go[5] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[30].' (3000)', 'slgo6', $ugsl_go[6], 4).'
              '.GetSelector(32, $ugadmin[31], 'slgo7', $ugsl_go[7]).'
            </table>
            </div>
          </fieldset>
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[21].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[140], 'slslo1', $ugsl_slo[1], $transit).'
              '.SelectText(32, $ugadmin[141], 'slslo2', $ugsl_slo[2], $appears).'
              '.InputTexte(32, $ugadmin[142].' (300)', 'slslo3', $ugsl_slo[3], 4).'
              '.InputCheckbox(32, $ugadmin[145].' ('.$admin[1605].')', 'slslo4', ($ugsl_slo[4] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[146].' ('.$admin[1605].')', 'slslo5', ($ugsl_slo[5] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[147], 'slslo6', $ugsl_slo[6], $progress).'
              '.SelectText(32, $ugadmin[148], 'slslo7', $ugsl_slo[7], $textalign).'
              '.SelectText(32, $ugadmin[149], 'slslo8', $ugsl_slo[8], $vertalign).'
              '.GetSelector(32, $ugadmin[150].' (#FFFFFF)', 'slslo9', $ugsl_slo[9]).'
              '.InputNumber(32, $ugadmin[151].' (0.6)', 'slslo10', 0, 1, $ugsl_slo[10], 0.1).'
              '.InputCheckbox(32, $ugadmin[134].' ('.$admin[1604].')', 'slslo11', ($ugsl_slo[11] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[133].' ('.$admin[1604].')', 'slslo12', ($ugsl_slo[12] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[152].' ('.$admin[1604].')', 'slslo13', ($ugsl_slo[13] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[153].' ('.$admin[1605].')', 'slslo14', ($ugsl_slo[14] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[154].' ('.$admin[1605].')', 'slslo15', ($ugsl_slo[15] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[155].' ('.$admin[1604].')', 'slslo16', ($ugsl_slo[16] == 'true' ? true : false)).'
              '.InputCheckbox(32, $ugadmin[156].' ('.$admin[1605].')', 'slslo17', ($ugsl_slo[17] == 'true' ? true : false)).'
              '.SelectText(32, $ugadmin[157], 'slslo18', $ugsl_slo[18], $vertpos2).'
              '.GetSelector(32, $ugadmin[67].' (#000000)', 'slslo19', $ugsl_slo[19]).'
              '.InputNumber(32, $ugadmin[66].' (0.4)', 'slslo20', 0, 1, $ugsl_slo[20], 0.1).'
              '.InputCheckbox(32, $ugadmin[190].' ('.$admin[1605].')', 'slslo21', ($ugsl_slo[21] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[191].' (0)', 'slslo22', $ugsl_slo[22], 4).'
            </table>
            </div>
          </fieldset>
        </div>
        <div id="ugvg" class="w-100 m-auto" style="display:'.($param4 == 'unitegallery' && $param13 == 'ugvg' ? 'block' : 'none').';"><hr />
          <fieldset style="margin:8px 0;padding:6px 10px 10px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[20].'</h4></legend>
            <div class="table-responsive-md">
            <table class="table table-bordered w-100">';
    echo '
              '.SelectText(32, $ugadmin[188], 'vgto1', $ugvg_to[1], $themeskin).'
              '.InputCheckbox(32, $ugadmin[29].' ('.$admin[1604].')', 'vgto2', ($ugvg_to[2] == 'true' ? true : false)).'
              '.InputTexte(32, $ugadmin[189].' timeout (2000)', 'vgto3', $ugvg_to[3], 4).'
            </table>
            </div>
          </fieldset>
        </div>
      </fieldset>
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
        <div id="bydef" style="float:right;margin-right:24px;padding-top:8px;display:'.($param4 == 'unitegallery' ? 'block' : 'none').';">
          <label for="def">'.$ugadmin[195].'</label><input type="checkbox" id="def" name="def" style="vertical-align:middle;" />
        </div>
        <div style="clear:both"></div>
      </div>
    </form>
    <a id="constructpanel"></a>
    <div id="ugconstruct" style="display:'.($param4 == 'unitegallery' ? 'block' : 'none').';"><hr />
      <fieldset style="margin:8px 0;padding:6px;"><legend style="margin-left:24px;"><h4>'.$ugadmin[16].'</h4></legend>
        <textarea style="width:100%;height:320px;margin:-12px 0 6px;" onfocus="if(window.CopyToClipboard(this)) alert(\''.$admin[910].'\');">'.constructUG($param13).'</textarea>
      </fieldset>
      <form name="themetest" action="'.CHEMIN.'photorama2.php?lng='.$lng.'&amp;pg='.$numgal.'&amp;tconfig=0#z2" target="_blank" method="POST">
        <div class="quest" style="padding:2px 20px;">
          <div style="float:right">'.SubmitButton($ugadmin[45], '', '', $imgdroite).'</div>
          <div style="clear:both"></div>
        </div>
      </form>
    </div>
  </fieldset>
</div>
<div style="max-width:680px;text-align:center;margin:auto;">
  <fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">
        '.SubmitButton($admin[1268], 'self.location.href=\''.$baseurl.'&regit=4&act=3&numgal='.$numgal.'\'', '', $imgdroite).'
      </div>
      <div style="float:left">
        '.SubmitButton($admin[368], 'self.location.href=\''.$baseurl.'&act=4&numgal='.$numgal.'\'', $imggauche, '').'
      </div>
      <div style="clear:both"></div>
    </div>
  </fieldset>
</div>';
}
################################################################################
// sélectionner une galerie
elseif ($act == 2) {
	$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[133]);
    include_once CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[133], '100%');
    $lstgal = ReadAuthorizedIndex(DBPHOTO, $myname, $grpcol, $fctwri);
    sort($lstgal);
// sélection galerie en debut de gerer les photos
    echo '
<p class="mb-5">'.ToHelp($lng, '&pg=1042&mnuid=937&tconfig=0#z2').'</p>
<form name="galsel" action="'.$baseurl.'&amp;act='.$sel.'&amp;sel='.$sel.'" method="POST">
  <div class="w-100 mx-auto" style="max-width:380px;">
    <fieldset><legend style="margin-left:24px;">'.$admin[132].'</legend>
      <div class="table-responsive-md">
      <table class="table table-bordered" style="width:80%;margin:auto;">
        <tr>
		  <td style="text-align:center;">
            <select class="form-control w-100 mx-auto" name="numgal" style="max-width:300px;" onchange="submit();">
              <option value="" select="selected">'.$admin[1241].'</option>';
    foreach ($lstgal as $gal) {
		$cat  = $gal[$lng == $lang[0] ? 0 : 1];
		$pos  = strpos($cat, '-->');
		$cat  = substr($cat, ($pos !== false ? $pos + 3 : 0));
		$cat  = empty($cat) ? '' : $cat.' => ';
		$name = $gal[$lng == $lang[0] ? 2 : 3];
		$pos  = strpos($name, '-->');
		$name = substr($name, ($pos !== false ? $pos + 3 : 0));
		echo '
              <option value="'.$gal[4].'">'.$gal[4].' : '.$cat.$name.'</option>';
    }
    echo '
            </select>
          </td>
		</tr>
		<noscript>
        <tr>
		  <td style="text-align:center;">'.SubmitButton($admin[519]).'</td>
		</tr>
		</noscript>
      </table>
      </div>
    </fieldset>
  </div>
  <br />
</form>';
}
################################################################################
// gérer les photos
elseif ($act == 3) {

	$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto    = "";
    var erreur = false;
	var mfu    = '.$mfu.';
	var files  = document.getElementById("new_photo").files;
	if (files.length > mfu) {
		erreur = true;
	}
    if (erreur == true) {
        sto = "'.addslashes(sprintf($admin[330], $mfu)).'" + sto;
        alert(sto);
        return false;
    }
}'.EndJavascript();

	$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[133]);
    include_once CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';

    htable($admin[133], '100%');
	
    $nbresult = 10;
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1040&mnuid=937&tconfig=0#z2').$admin[326].'<b>'.$numgal.' : '.$catgal.$nomgal.'</b>'.$admin[223].'</p>'.info_gd();
    if ($dirgal != '') {
        initGallery($dirgal);
        echo '
<hr />';
        echo '
<div style="max-width:640px;margin:auto auto 12px;">
  <fieldset>'.legend($admin[132]).'
    <form name="galsel1" action="'.$baseurl.'&amp;act='.$sel.'&amp;sel='.$sel.'" method="POST">
      <div class="table-responsive-md">
      <table class="table table-bordered w-80 m-auto">
        <tr>
		  <td style="text-align:center;">
            <select class="form-control" name="numgal" style="width:300px;" onchange="submit();">';
    $lstgal = ReadAuthorizedIndex(DBPHOTO, $myname, $grpcol, $fctwri);
    sort($lstgal);
    foreach ($lstgal as $gal) {
		$cat  = $gal[$lng == $lang[0] ? 0 : 1];
		$pos  = strpos($cat, '-->');
		$cat  = substr($cat, ($pos !== false ? $pos + 3 : 0));
		$cat  = empty($cat) ? '' : $cat.' => ';
		$name = $gal[$lng == $lang[0] ? 2 : 3];
		$pos  = strpos($name, '-->');
		$name = substr($name, ($pos !== false ? $pos + 3 : 0));
		echo '
              <option value="'.$gal[4].'"'.Selected($numgal == $gal[4]).'>'.$gal[4].' : '.$cat.$name.'</option>';
    }
    echo '
            </select>
          </td>
		</tr>
		<noscript>
        <tr>
		  <td style="text-align:center;">'.SubmitButton($admin[519]).'</td>
		</tr>
		</noscript>
      </table>
      </div>
    </form>
  </fieldset>
</div>
<div style="max-width:640px;text-align:center;margin:auto;">';
/*
max_file_uploads=20
$mfu      = @ini_get('max_file_uploads');

upload_max_filesize=256M
$maxsizefiles = @ini_get('upload_max_filesize');

post_max_size=256M
$maxpostsize = @ini_get('post_max_size');
*/
$messageinfo .= $admin[1831] . number_format(return_bytes($maxpostsizes),0,',',' ').'<br />';
$messageinfo .= $admin[1832] . number_format(return_bytes($maxsizefiles),0,',',' ').'<br />';
if ($messageinfurgent !='')
{
	echo '
<div class="alert alert-dark" role="alert">
  '.$messageinfurgent.'
</div>';
}
if ($messageinfo !='')
{
echo '
<div class="alert alert-primary" role="alert">
  '.$messageinfo.'
</div>';
}

echo '
  <fieldset>
    <form name="galvgnt" action="'.$baseurl.'&amp;act=1&amp;sel='.$sel.'&amp;numgal='.$numgal.'" method="POST">
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton(str_replace('Admin - ', '', $admin[631]), '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div>
    </form>
  </fieldset>
</div>';
// partie affichage ajouter photos

if (file_exists(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT))
	include PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT;
	$messageinfo = '';
	$messageinfurgent = '';
echo '
<form name="galadd" action="'.$baseurl.'" method="POST" enctype="multipart/form-data" onsubmit="return VerifyForm(); return false;" >
  <input type="hidden" name="regit" value="2" />
  <input type="hidden" name="act" value="3" />
  <input type="hidden" name="messageinfo" value="'.$messageinfo.'" />
  <input type="hidden" name="messageinfurgent" value="'.$messageinfurgent.'" />
  <input type="hidden" name="sel" value="'.$sel.'" />
  <input type="hidden" name="numgal" value="'.$numgal.'" />
  <div style="max-width:640px;text-align:center;margin:auto;">
    <fieldset><legend style="margin-left:24px;">'.$admin[325].' ('.$dirgal.')</legend><br />
      <div class="table-responsive-md">
      <table class="table table-bordered w-100 m-auto">
        <tr>
	      <td class="pl-3 align-middle">&bull; '.sprintf($admin[330], $mfu).'</td>
          <td>';
// si galerie est unite gallery, videos et photos sont possibles
	$is_video = in_array($param13, $galleryvideos);

if ($is_video)
{
	if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
		echo '  <div class="input-group mb-3"> 
				<input name="new_photo[]" id="new_photo" class="form-control" type="file" size="64" 
				alt="'.$admin[793].'" title="'.$admin[793].'" 
				  accept="image/jpg,image/jpeg,image/png,image/webp, image/avif, video/*"  multiple="multiple" />';
	}
	else
	{
		echo '  <div class="input-group mb-3"> 
		<input name="new_photo[]" id="new_photo" class="form-control" type="file" size="64" 
		alt="'.$admin[793].'" title="'.$admin[793].'" 
		  accept="image/jpg,image/jpeg,image/png,image/webp, video/*"  multiple="multiple" />';
	}
	if ($lng != 'fr')
		echo '
			<label class="input-group-text" for="new_photo">'.$admin[793].'</label>';
	echo '
		 </div>';
}
else
{
	if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
		echo '  <div class="input-group mb-3"> 
				<input name="new_photo[]" id="new_photo" class="form-control" type="file" size="64" 
				alt="'.$admin[793].'" title="'.$admin[793].'" 
					 accept="image/jpg,image/jpeg,image/png,image/webp, image/avif" multiple="multiple" />';
	}
	else
		echo '  <div class="input-group mb-3"> 
						<input name="new_photo[]" id="new_photo" class="form-control" type="file" size="64" 
						alt="'.$admin[793].'" title="'.$admin[793].'" 
							 accept="image/jpg,image/jpeg,image/png,image/webp" multiple="multiple" />';		
	if ($lng != 'fr')
		echo '
			<label class="input-group-text" for="new_photo">'.$admin[793].'</label>';
	echo '
			 </div>';
}
echo '
          </td>
	    </tr>
      </table>
      </div>
      <br />
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
    </fieldset>
  </div>
</form>
<div style="max-width:640px;text-align:center;margin:auto;">
  <fieldset>
    <form name="galvgnt" action="'.$baseurl.'" method="POST">
      <input type="hidden" name="regit" value="4" />
      <input type="hidden" name="act" value="3" />
      <input type="hidden" name="numgal" value="'.$numgal.'" />
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton($admin[1268], '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div>
    </form>
  </fieldset>
</div>';
        if (file_exists(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT))
            include PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT;
        $dbphoto = ReadDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
        $tmpi    = 0;
        $tmp[0]  = array();
        $tmp[1]  = array();
        $tmp[2]  = array();
        $tmp[3]  = array();
        $tmp[4]  = array();
        $tmp[5]  = array();
        $tmp[7]  = array();
        $tmp[8]  = array();
        $tmp[9]  = array(); // adresse du lien image
        $tmp[10] = array(); // type de vidéo
        $tmp[11] = array(); // code ou adresse de la vidéo
		$tmp[12] = array(); // No ordre affichage
        for ($i = 0; $i < count($dbphoto); $i++) {
            if ($dbphoto[$i][1] != 'd') {
                $tmp[0][$tmpi] = $dbphoto[$i][0];
                $tmp[1][$tmpi] = $dbphoto[$i][1];
                $tmp[2][$tmpi] = $dbphoto[$i][2];
                $tmp[3][$tmpi] = $dbphoto[$i][3];
                $tmp[4][$tmpi] = $dbphoto[$i][4];
                $tmp[5][$tmpi] = '<tr><td style="vertical-align:bottom;">'.$flag1.' '.$dbphoto[$i][5].'</td></tr>';
                if ($lang[1] != '')
                    $tmp[5][$tmpi] .= '<tr><td style="">'.$flag2.' '.$dbphoto[$i][6].'</td></tr>';
                $tmp[7][$tmpi]  = $dbphoto[$i][7];
                $tmp[8][$tmpi]  = $dbphoto[$i][8];
                $tmp[9][$tmpi]  = @$dbphoto[$i][9];
                $tmp[10][$tmpi] = @$dbphoto[$i][10];
                $tmp[11][$tmpi] = @$dbphoto[$i][11];
				$tmp[12][$tmpi] = @$dbphoto[$i][12]; // No ordre affichage
                $tmpi++;
            }
        }
        if (empty($idpg)) {
          $idpg = 1;
        }
        else {
          while ($tmpi <= ($idpg - 1)* $nbresult) $idpg--;
        }
        if ($tmpi > 0) {
            $navbar = GetNavBar($baseurl.'&amp;act=3&amp;numgal='.$numgal.'&amp;idpg=', $tmpi, $idpg, $nbresult);
            echo '
<div style="text-align:center;max-width:640px;margin: auto;">
  <fieldset class="m-0"><legend style="margin-left:24px;">'.$admin[633].' ('.$dirgal.')</legend>'.$navbar.'
    <form name="fast_actions" action="'.$baseurl.'&amp;idpg='.$idpg.'&amp;numgal='.$numgal.'&amp;act=fast" method="post">
      <div class="table-responsive-md">
      <table class="table table-bordered" w-100">
        <tr>
          <td colspan="3">
            <div style="text-align:right; padding-right:24px;">'.SubmitButton($admin[1602]).'
              <i class="fas fa-level-down-alt"></i>
            </div>
          </td>
        </tr>
        <tr class="forum">
          <td style="padding:4px;">'.substr($admin[834], 0, -1).'</td><td style="padding:4px;">'.$admin[679].'</td><td>'.$admin[680].'</td>
	    </tr>';
            $ids   = '';
            $nbdel = 0;
            for ($i = $nbresult*($idpg-1); $i < Min($nbresult*$idpg, $tmpi); $i++) {
                $fileid = $tmp[0][$i];
                $statut = $tmp[1][$i];
                echo '
        <tr class="'.($i %2 == 0 ? 'rep' : 'quest').'">';
				$wmin = $tmp[3][$i] >= $tmp[4][$i] ? 128 : 128 * $tmp[3][$i] / $tmp[4][$i];
                echo '
          <td  style="padding:4px;width:128px; text-align:center;">
            <a href="'.$baseurl.'&amp;act=4&amp;numgal='.$numgal.'&amp;idpg='.$idpg.'">
              <img src="'.PHOTOREP.$dirmin.'/'.$tmp[2][$i].'" style="width:'.$wmin.'px;vertical-align:bottom;" alt="'.$admin[368].'" title="'.$admin[368].'" />
            </a>
          </td>
		  <td style="padding:4px;">
            <div class="table-responsive-md">
            <table class="table table-bordered">
              <tr>
                <td style="padding:2px;">
                  &bull; '.$tmp[2][$i].' ('.$tmp[7][$i].'x'.$tmp[8][$i].')'.($param4 == 'unitegallery' && !empty($tmp[10][$i]) ? ' => <b>'.$typvideo[$tmp[10][$i]].'</b>' : '').'
                </td>
              </tr>
			  <tr><td>'.$admin[1843].' : '.$tmp[9][$i].'</td></tr>
			  <tr><td>'.$tmp[5][$i].'</td></tr>
            </table>
            </div>
		  </td>';
                echo '
          <td  style="padding:4px;width:60px; white-space:nowrap;text-align:center;">';
                if ($statut == 'a') {
                    MakeRadioGroup(array( array('a', 'i', $fileid), array('a', 'd', $fileid) ));
                }
                elseif ($statut == 'i') {
                    MakeRadioGroup(array( array('i', 'a', $fileid), array('i', 'd', $fileid) ));
                }
                elseif ($status == 'd') {
                    MakeRadioGroup(array( array('d', 's', $fileid), array('d', 'i', $fileid) ));
                }
                echo '
          </td>
	    </tr>';
                $ids .= $fileid.' ';
            }
            echo '
        <tr>
          <td colspan="3">
            <div style="text-align:right; padding-right:24px;">'.SubmitButton($admin[1602]).'
              <i class="fas fa-level-up-alt"></i>
            </div>
          </td>
        </tr>
      </table>
      </div>
      <input type="hidden" name="ids" value="'.$ids.'" />
    </form>'.$navbar.'
  </fieldset>
</div>';
        } else {
            echo '
  <p style="text-align:center"><strong>'.$admin[854].'</strong><br />';
        }
        $tmpi2    = 0;
        $tmp2[0]  = array();
        $tmp2[1]  = array();
        $tmp2[2]  = array();
        $tmp2[3]  = array();
        $tmp2[4]  = array();
        $tmp2[5]  = array();
        $tmp2[7]  = array();
        $tmp2[8]  = array();
        $tmp2[9]  = array();
        $tmp2[10] = array();
        $tmp2[11] = array();
        for ($i = 0; $i < count($dbphoto); $i++) {
            if ($dbphoto[$i][1] == 'd') {
                $tmp2[0][$tmpi2] = $dbphoto[$i][0];
                $tmp2[1][$tmpi2] = $dbphoto[$i][1];
                $tmp2[2][$tmpi2] = $dbphoto[$i][2];
                $tmp2[3][$tmpi2] = $dbphoto[$i][3];
                $tmp2[4][$tmpi2] = $dbphoto[$i][4];
                $tmp2[5][$tmpi2] = '<tr><td style="vertical-align:top;width:20px;">'.$flag1.'</td><td>'.$dbphoto[$i][5].'</td></tr>';
                if ($lang[1] != '')
                    $tmp2[5][$tmpi2] .= '<tr><td style="vertical-align:top;width:20px;">'.$flag2.'</td><td>'.$dbphoto[$i][6].'</td></tr>';
                $tmp2[7][$tmpi]  = $dbphoto[$i][7];
                $tmp2[8][$tmpi]  = $dbphoto[$i][8];
                $tmp2[9][$tmpi]  = $dbphoto[$i][9];
                $tmp2[10][$tmpi] = $dbphoto[$i][10];
                $tmp2[11][$tmpi] = $dbphoto[$i][11];
                $tmpi2++;
            }
        }
        if ($tmpi2 > 0) {
            $cr = array_multisort($tmp2[2], SORT_ASC, $tmp2[0], $tmp2[1], $tmp2[3], $tmp2[4], $tmp2[5]);
            echo '
<div style="text-align:center;width: 100%; max-width: 640px; margin: auto;"><br />
  <fieldset class="m-0"><legend style="margin-left:24px;">'.$admin[170].'</legend>
    <form name="fast_actions2" action="'.$baseurl.'&amp;idpg='.$idpg.'&amp;numgal='.$numgal.'&amp;act=fast2" method="post">
      <div class="table-responsive-md">
      <table class="table table-bordered w-100">
        <tr>
          <td colspan="3">
            <div style="text-align:right; padding-right:24px;">'.SubmitButton($admin[1602]).'
              <i class="fas fa-level-down-alt"></i>
            </div>
          </td>
        </tr>
        <tr class="forum">
          <td class="align-middle">'.substr($admin[834], 0, -1).'</td>
          <td class="align-middle">'.$admin[679].'</td>
          <td class="align-middle">'.$admin[680].'</td>
		</tr>';
            $ids2 = '';
            for ($i = 0; $i < $tmpi2; $i++) {
                $fileid = $tmp2[0][$i];
                echo '
        <tr class="'.($i %2 == 0 ? 'rep' : 'quest').'">';
				$wmin = $tmp2[3][$i] >= $tmp2[4][$i] ? 128 : 128 * $tmp2[3][$i] / $tmp2[4][$i];
                echo '
          <td  style="padding:4px;width:128px; text-align:center;">
            <img src="'.PHOTOREP.$dirmin.'/'.$tmp2[2][$i].'" style="width:'.$wmin.'px;vertical-align:bottom;" alt="'.$admin[368].'" title="'.$admin[368].'" />
          </td>
		  <td style="padding:4px;">
            <div class="table-responsive-md">
            <table cellpadding="0" cellspacing="2" width="100%" summary="">
              <tr><td colspan="2">&bull; '.$tmp2[2][$i].' ('.$tmp2[3][$i].'x'.$tmp2[4][$i].')</td></tr>'.$tmp2[5][$i].'
            </table>
            </div>';
                echo '
          <td  style="padding:4px;width:60px; white-space:nowrap;text-align:center;">';
                MakeRadioGroup(array( array('d', 'i', $fileid), array('d', 's', $fileid)));
                echo '
          </td>
		</tr>';
                $ids2 .= $fileid.' ';
            }
            echo '
        <tr>
          <td colspan="3">
            <div style="text-align:right; padding-right:24px;">'.SubmitButton($admin[1602]).'
              <i class="fas fa-level-up-alt"></i>
            </div>
          </td>
        </tr>
      </table>
      </div>
      <input type="hidden" name="ids2" value="'.$ids2.'" />
    </form>
  </fieldset>
</div>';
        }
    }
}
################################################################################
// ajouter des commentaires
elseif ($act == 4) {
	$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > <a href="'.$baseurl.'&amp;idpg='.$idpg.'&amp;numgal='.$numgal.'&amp;act=3">'.str_replace('Admin - ', '', $admin[1036]).'</a> > '.str_replace('Admin - ', '', $admin[368]);
    include_once CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[133], '100%');
	
	if (file_exists(PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT))
		include PHOTOREP.$dirgal.'/params_'.$numgal.INCEXT;
	$is_video = in_array($param13, $galleryvideos);
    $nbresult = 10;
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1040&mnuid=937&tconfig=0#z2').$admin[326].'<b>'.$numgal.' : '.$catgal.$nomgal.'</b>'.$admin[223].'</p>'.info_gd();
    $dbphoto = ReadDBFields(PHOTOREP.$dirgal.'/'.$dirgal.DBEXT);
    $tmpi3    = 0;
    $tmp3[0]  = array();
    $tmp3[1]  = array();
    $tmp3[2]  = array();
    $tmp3[3]  = array();
    $tmp3[4]  = array();
    $tmp3[5]  = array();
    $tmp3[6]  = array();
    $tmp3[7]  = array();
    $tmp3[8]  = array();
    $tmp3[9]  = array(); // adresse du lien image
    $tmp3[10] = array(); // type de vidéo
    $tmp3[11] = array(); // code ou adresse de la vidéo
	$tmp3[12] = array(); // no ordre affichage
    for ($i = 0; $i < count($dbphoto); $i++) {
        $tmp3[0][$tmpi3]  = $dbphoto[$i][0];
        $tmp3[1][$tmpi3]  = $dbphoto[$i][1];
        $tmp3[2][$tmpi3]  = $dbphoto[$i][2];
        $tmp3[3][$tmpi3]  = $dbphoto[$i][3];
        $tmp3[4][$tmpi3]  = $dbphoto[$i][4];
        $tmp3[5][$tmpi3]  = $dbphoto[$i][5];
        $tmp3[6][$tmpi3]  = $dbphoto[$i][6];
        $tmp3[7][$tmpi3]  = $dbphoto[$i][7];
        $tmp3[8][$tmpi3]  = $dbphoto[$i][8];
        $tmp3[9][$tmpi3]  = $dbphoto[$i][9];
        $tmp3[10][$tmpi3] = $dbphoto[$i][10];
        $tmp3[11][$tmpi3] = $dbphoto[$i][11];
		$tmp3[12][$tmpi3] = $dbphoto[$i][12]; //ordre affichage
        $tmpi3++;
    }
    if (empty($idpg)) {
      $idpg = 1;
    }
    else {
      while ($tmpi3 <= ($idpg - 1)* $nbresult) $idpg--;
    }
    echo '
<div style="max-width:740px;text-align:center;margin:auto;">
  <fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">
        '.SubmitButton(str_replace('Admin - ', '', $admin[631]), 'self.location.href=\''.$baseurl.'&act=1&sel='.$sel.'&numgal='.$numgal.'\'', '', $imgdroite).'
      </div>
      <div style="float:left">
        '.SubmitButton($admin[1036], 'self.location.href=\''.$baseurl.'&idpg='.$idpg.'&act=3&sel='.$sel.'&numgal='.$numgal.'\'', $imggauche, '').'
      </div>
      <div style="clear:both"></div>
    </div>
  </fieldset>
</div>';
    if ($tmpi3 > 0) {
        $navbar = GetNavBar($baseurl.'&amp;act=4&amp;numgal='.$numgal.'&amp;idpg=', $tmpi3, $idpg, $nbresult);
        echo '
<div style="text-align:center;max-width:740px;margin:auto;">';
if ($messageinfo !='')
{
echo '
<div class="alert alert-primary" role="alert">
  '.$messageinfo.'
</div>';
}
echo '
  <fieldset class="m-0"><legend style="margin-left:24px;">'.$admin[368].' ('.$dirgal.')</legend>'.$navbar.'
    <form name="fast_comments" action="'.$baseurl.'&amp;idpg='.$idpg.'&amp;numgal='.$numgal.'&amp;act=4&amp;sel='.$sel.'" method="post">
      <input type="hidden" name="regit" value="3" />
	  <input type="hidden" name="messageinfo" value="'.$admin[1826].'" />
	  <input type="hidden" name="messageinfurgent" value="'.$messageinfurgent.'" />
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div><br />
      <div class="table-responsive-md">
      <table class="table table-bordered w-100">
        <tr class="forum">
          <td style="padding:4px;">'.substr($admin[834], 0, -1).'</td><td style="padding:4px;">'.$admin[679].'</td>
	    </tr>';
        $ids3  = '';
        $nbdel = 0;
        for ($i = $nbresult*($idpg-1); $i < Min($nbresult*$idpg, $tmpi3); $i++) {
            $fileid = $tmp3[0][$i];
            if ($tmp3[1][$i] != 'd') {
                echo '
        <tr class="'.($i %2 == 0 ? 'rep' : 'quest').'">';
                $wmin = $tmp3[3][$i] >= $tmp3[4][$i] ? 128 : 128 * $tmp3[3][$i] / $tmp3[4][$i];
                $wmax = max($tmp3[7][$i], $tmp3[8][$i]);
				if ($wmax == '') $wmax=10;
                echo '
          <td  style="padding:4px;width:128px; text-align:center;">
            <a data-target="#myModal'.$i.'" data-toggle="modal">
              <img src="'.PHOTOREP.$dirmin.'/'.$tmp3[2][$i].'" style="width:'.$wmin.'px;vertical-align:bottom;" alt="'.$admin[368].'" title="'.$admin[368].'" />
            </a>
            <div class="modal fade" id="myModal'.$i.'" role="dialog">
              <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
                <div class="modal-content" style="width:initial;background:rgba(0,0,0,0.5);">
                  <button style="text-align:right;margin:2px 8px 0 -8px;color:#fff;" class="close" data-dismiss="modal" type="button">X</button>
                  <div class="modal-body">
                    <img src="'.PHOTOREP.$dirmin.'/'.$tmp3[2][$i].'" style="height:auto;width:'.round($wmax*4/5).'px;vertical-align:bottom;" alt="'.$admin[368].'" title="'.$admin[368].'" />
                  </div>
                </div>
              </div>
            </div>
          </td>
          <td  style="padding:0 8px;">
            '.$tmp3[2][$i].' ('.$tmp3[7][$i].'x'.$tmp3[8][$i].') &nbsp;&nbsp;&nbsp;&nbsp;';
			if ($tmp3[9][$i] == '') $tmp3[9][$i] = '9999';
			   echo '
					<br />			 
					<div class="d-inline-block">'.$admin[1843].'</div>
					<div class="d-inline-block "><input class="form-control texte" type="text" name="nordre_'.$fileid.'" value="'.$tmp3[9][$i].'" size="5" /></div><br/>';

			if ($param4 == 'unitegallery') {
                if ($is_video) {
					$mrnomfile = 'videolink_'.$fileid;
                    echo $ugadmin[192].'
            <select class="form-control" name="typevideo_'.$fileid.'">';
                    foreach($typvideo as $key => $lblvideo) {
                        echo '
              <option value="'.$key.'"'.Selected($tmp3[10][$i] == $key).'>'.$lblvideo.'</option>';
                    }
                    echo '
            </select><br />
            '.$ugadmin[194].'		
			<div class="d-inline-block">
				<input id="videolink_'.$fileid.'" name="videolink_'.$fileid.'"  class="form-control texte" type="text" size="95" value="'.$tmp3[11][$i].'" />
			</div>
			<div class="d-inline-block">
				<input type="button" class="btn btn-info bouton" name="browserver3" id="browserver3" 
				  onclick="PopupWindow(\''.CHEMIN.'admin/editors/upload/upload.php?lng='.$lng.
					'&uptype=Media&namerepconfig=guppy_config&pathconfig=admin/editors/\',\''.$mrnomfile.'\',\'700\',\'515\', \'yes\');" 
				  value="'.$admin[793].'" />
			</div>';
                } 
/*
				else {
                    echo '<br />'.$ugadmin[193].'<input name="imglink_'.$fileid.'" class="form-control texte" type="text" size="72" value="'.$tmp3[9][$i].'" />';
                }
*/
            }
		echo '
			<br />			 
              <div class="d-inline-block">'.$flag1.'</div>
              <div class="d-inline-block w-90"><input class="form-control texte" type="text" name="comment1_'.$fileid.'" value="'.$tmp3[5][$i].'" /></div>
            </div>';
            if ($lang[1] != "") {
                echo '
            <div>
              <div class="d-inline-block">'.$flag2.'</div>
              <div class="d-inline-block w-90"><input class="form-control texte" type="text" name="comment2_'.$fileid.'" value="'.$tmp3[6][$i].'" /></div>
            </div>';
            }
                echo '
		  </td>
	    </tr>';
            $ids3 .= $fileid.' ';
            }
        }
        echo '
      </table>
      </div>
      <br />
      <input type="hidden" name="ids3" value="'.$ids3.'" />
      <div class="quest" style="padding:2px 20px;">
        <div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
        <div style="clear:both"></div>
      </div>
    </form>'.$navbar.'
  </fieldset>
</div>';
    }
    echo '
<div style="max-width:740px;text-align:center;margin:auto;">
  <fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">
        '.SubmitButton(str_replace('Admin - ', '', $admin[631]), 'self.location.href=\''.$baseurl.'&act=1&sel='.$sel.'&numgal='.$numgal.'\'', '', $imgdroite).'
      </div>
      <div style="float:left">
        '.SubmitButton($admin[1036], 'self.location.href=\''.$baseurl.'&idpg='.$idpg.'&act=3&sel='.$sel.'&numgal='.$numgal.'\'', $imggauche, '').'
      </div>
      <div style="clear:both"></div>
    </div>
  </fieldset>
</div>
</div>';
$messageinfo = $admin[1826];
}
btable();
include CHEMIN.'admin/bpage.inc';
?>
protect.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/protect.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Protect admin
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2021 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 (January 23, 2024) : correction password
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[9] == '' && $userprefs[1] != $serviz[176]) {
        $nomzone = $admin[12];
        include 'access.inc';
        exit();
    }
}
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/debugprotect'.'_'.$dateheureminiutesecl.'.log';
if (isset($_GET['regit']))
// file_put_contents($nomficlog, ' Avant import Get protect regit: '.$_GET['regit']."\n", FILE_APPEND | LOCK_EX);
if (isset($_POST['regit']))
// file_put_contents($nomficlog, ' Avant import Get protect regit: '.$_POST['regit']."\n", FILE_APPEND | LOCK_EX);
$regit   = import('regit');
$upseudo = import('upseudo');
$uuid    = import('uuid');
$uuid2   = import('uuid2');
$unorm   = import('unorm');
$ufree   = import('ufree');
$uspec   = import('uspec');
$htspec  = import('htspec');

// file_put_contents($nomficlog, ' Apres import protect regit: '.$regit."\n", FILE_APPEND | LOCK_EX);

$erreur     = '';
$err_pseudo = empty($upseudo) && ($regit == 1 || $regit == 3 || $regit == 4) ? true: false;
$err_uid    = (empty($uuid) || !ctrlPasswordOK($uuid)) && ($regit == 1) ? true: false;
$err_uid2   = $uuid != $uuid2 && ($regit == 1) ? true: false;
$err_method = $unorm.$ufree.$uspec == '' && $regit == 1 ? true : false;
$erreur    .= $err_pseudo ? '<li>'.$admin[1588].'regit: '.$regit.'</li>': '';
$erreur    .= $err_uid ? '<li>'.$admin[1610].'</li>': '';
$erreur    .= $err_uid2 ? '<li>'.$admin[1611].'</li>': '';
$erreur    .= $err_method ? '<li>'.$admin[1736].'</li>': '';
$proot = dirname(__FILE__);
$proot = substr($proot, 0, strrpos($proot, '/admin/admin.php'));
@include $proot.'/data/config/testprotect.inc';
$upath = (@$testprotect == 'Success' ? true : false);
$path  = $upath ? $proot.'/data/config/.htpasswd' : '';
$mode  = '__FILE__';
if (empty($path)) {
    $proot = $_SERVER['SCRIPT_FILENAME'];
    $proot = substr($proot, 0, strrpos($proot, '/admin/admin.php'));
    @include $proot.'/data/config/testprotect.inc';
    $upath = $testprotect == 'Success' ? true : false;
    $path  = $upath ? $proot.'/data/config/.htpasswd' : '';
    $mode  = 'SCRIPT_FILENAME';
}
if (empty($path)) {
    $proot = $_SERVER['DOCUMENT_ROOT'];
    @include $proot.'/data/config/testprotect.inc';
    $upath = $testprotect == 'Success' ? true : false;
    $path  = $upath ? $proot.'/data/config/.htpasswd' : '';
    $mode  = 'DOCUMENT_ROOT';
}
if (empty($path)) {
    $proot = realpath(CHEMIN.'data/config/testprotect.inc');
    @include $proot;
    $upath = $testprotect == 'Success' ? true : false;
    $path  = realpath(CHEMIN.'data/config/.htpasswd');
    $mode  = 'realpath()';
}
if (empty($path)) $uspec == 'on';
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/debugprotect'.'_'.$dateheureminiutesecl.'.log';
/* file_put_contents($nomficlog, ' protect regit: '.$regit."\n", FILE_APPEND | LOCK_EX);
file_put_contents($nomficlog, ' protect erreur: '.$erreur."\n", FILE_APPEND | LOCK_EX);
file_put_contents($nomficlog, ' protect path: '.$path."\n", FILE_APPEND | LOCK_EX);
*/
if ($regit == 1 && !empty($path) && empty($erreur)) { // création et ajout 1er admin
	$apachepassword  = Md5Crypt::apache ($uuid, $salt ='');	
    $htpass = '#:'.($unorm == 'on' ? '1-0-0' : ($ufree == 'on' ? '0-1-0' : '0-0-1')).chr(10).$upseudo.':'.($ufree == 'on' ? $uuid : $apachepassword);
    WriteFullDB(CHEMIN.'data/config/.htpasswd', $htpass);
    
    $htnormal = '
AuthName "'.$admin[1762].$site[0].'"
AuthType Basic
AuthUserFile '.$path.'
require valid-user
#method = '.$mode.'
    ';
    
    $htfree = '
AuthName "'.$admin[1762].$site[0].'"
PerlSetVar AuthFile /data/config/.htpasswd
AuthType Basic
require valid-user
#method = '.$mode.'
    ';
    
    $htaccess = $ufree == 'on' ? $htfree : ($uspec == 'on' ? $htspec : $htnormal);
    WriteFullDB(CHEMIN.'admin/.htaccess', $htaccess);
//    file_put_contents($nomficlog, ' protect write htaccess: '.$htaccess."\n", FILE_APPEND | LOCK_EX);
    $regit = 5;
//	file_put_contents($nomficlog, ' protect write htaccess renvoi vers: '.$regit."\n", FILE_APPEND | LOCK_EX);
}

if ($regit == 2 && empty($erreur)) { // suppression de la protection
    $htaccess = 'Options -Indexes';
    WriteFullDB(CHEMIN.'admin/.htaccess', $htaccess);
    @unlink(CHEMIN.'data/config/.htpasswd');
    $location = 'admin.php?lng='.$lng.'&pg=protect';
    header('location: '.$location);
    exit();
}

if ($regit == 3 && empty($erreur)) { // ajoute un collaborateur ou admin principal voir linuxmr
    $addht   = true;
    $ahtpass = @file(CHEMIN.'data/config/.htpasswd');
	if (count($ahtpass))
	{
		$ahts    = array();
		for ($i = 2; $i < count($ahtpass); $i++) {
			if ($ahtpass[$i] != '')
			{
				$aht = explode(':', $ahtpass[$i]);
				if ($upseudo != $aht[0] && !empty($ahtpass[$i])) $ahts[] = $ahtpass[$i];
			}
		}
		$apachepassword  = Md5Crypt::apache ($uuid, $salt ='');	
		$aht = explode(':', $ahtpass[1]);
		if ($aht[0] != $upseudo) $ahts[] = chr(10).$upseudo.':'.($ufree == 'on' ? $uuid : $apachepassword);
		$htpass = $ahtpass[0].$ahtpass[1];
		foreach ($ahts as $ht) $htpass .= $ht;
		WriteFullDB(CHEMIN.'data/config/.htpasswd', $htpass);
	}
}

if ($regit == 4 && empty($erreur)) { // suppression collaborateur
    DeleteMemberProtect($upseudo);
}
//file_put_contents($nomficlog, ' protect regit avant 5 regit: '.$regit."\n", FILE_APPEND | LOCK_EX);
//file_put_contents($nomficlog, ' protect erreur: '.$erreur."\n", FILE_APPEND | LOCK_EX);
if ($regit == 5 && empty($erreur)) { // ajout ensemble collaborateurs voir linuxmr
//file_put_contents($nomficlog, ' protect apres if 5 regit: '.$regit."\n", FILE_APPEND | LOCK_EX);
    $ahts     = array();
	$ahtpass  = array();
	if (is_file(CHEMIN.'data/config/.htpasswd'))
		$ahtpass  = @file(CHEMIN.'data/config/.htpasswd');
    $dbadmins = ReadDBFields(ADMINS);
    foreach ($dbadmins as $row) {
        if (is_file(REDACREP.$row[0].INCEXT)) {
            $addht = true;
            for ($i = 2; $i < count($ahtpass); $i++) {
                $aht = explode(':', $ahtpass[$i]);
                if ($row[0] == $aht[0]) {
                    $addht = false;
                    break;
                }
            }
			if ($addht) $ahts[] = $row[0];
        }
    }
	if (isset($ahtpass[0]))
		$ufree = substr($ahtpass[0], 0, 7) == '#:0-1-0' ? 'on' : '';
    foreach ($ahts as $ht) {
        include_once REDACREP.$ht.INCEXT;
        $userdb    = ReadDBFields(MSGREP.$ht.DBEXT);
		$motdepassclair = gy_decrypt(CRYPT_KEY, $userdb[0][0]);
		$apachepassword  = Md5Crypt::apache ($motdepassclair, $salt ='');
		if (!isset($drtuser[38])) $drtuser[38] = $apachepassword;
		$drtuser[38] = $apachepassword;
        $htpass    = $ht.':'.(isset($userdb[0][1]) ? ($ufree == 'on' ? gy_decrypt(CRYPT_KEY, $userdb[0][0]) : $apachepassword) : $drtuser[38]);
        $htpasswd  = ReadFullDB(CHEMIN.'data/config/.htpasswd');
/*
		file_put_contents($nomficlog, ' protect user nom: '.$ht.' drtuser[38]: '.$drtuser[38]."\n", FILE_APPEND | LOCK_EX);
		file_put_contents($nomficlog, ' protect userdb[0][1]: '.$apachepassword."\n", FILE_APPEND | LOCK_EX);
		file_put_contents($nomficlog, ' protect userdb[0][0]: '.$userdb[0][0]."\n", FILE_APPEND | LOCK_EX);
		file_put_contents($nomficlog, ' protect key: '.CRYPT_KEY."\n", FILE_APPEND | LOCK_EX);
*/
        $htpasswd .= chr(10).$htpass;
        WriteFullDB(CHEMIN.'data/config/.htpasswd', $htpasswd);
		$userdb[0][1] = $apachepassword; //ecriture user avec le mot de pass
		WriteDBFields(MSGREP.$ht.DBEXT, $userdb);
		REDACREP.$ht.INCEXT;
//		file_put_contents($nomficlog, ' ecr userdb: '.$ht."\n", FILE_APPEND | LOCK_EX);

    }

    $ahts    = array();
	$ahtpass  = array();
	if (is_file(CHEMIN.'data/config/.htpasswd'))
		$ahtpass  = @file(CHEMIN.'data/config/.htpasswd');
    foreach ($ahtpass as $ht) if (!empty($ht)) $ahts[] = $ht;
    $htpass = '';
    foreach ($ahts as $ht) $htpass .= $ht;
    WriteFullDB(CHEMIN.'data/config/.htpasswd', $htpass);

}

$headinc .= BeginJavascript().'
function VerifyForm() {
    var sto = "";
    var erreur = false;
    var pseudo = document.protect.upseudo.value;
	var uid = document.protect.uuid.value;
	var uid2 = document.protect.uuid2.value;
    regexp = /^[-a-zA-Z0-9_]{2,'.$serviz[148].'}$/;
    if (pseudo == "" || !regexp.test(document.protect.upseudo.value)) {
        sto += \'  - '.addslashes($admin[1588]).'\n\';
		document.protect.upseudo.className = "errorInputText";
        erreur = true;
    }
    if (uid != "") {
        regexp = /^\\S{8,40}$/;
        if (!regexp.test(uid)) {
            sto += \'  - '.addslashes($admin[1610]).'\n\';
			document.protect.uuid.className = "errorInputText";
            erreur = true;
        }
    }
	if (uid != uid2) {
		sto += \'  - '.addslashes($admin[1611]).' !\n\';
		document.protect.uuid.className = "errorInputText";
		document.protect.uuid2.className = "errorInputText";
		erreur = true;
	}
    if (erreur == true) {
        sto = "'.addslashes($admin[1636]).'\n\n" + sto;
        alert(sto);
		return false;
    }
}
function displayht0(form) {
    if (form.unorm.checked) {
        form.uspec.checked = "";
        form.ufree.checked = "";
    }
}
function displayht1(form) {
    if (form.ufree.checked) {
        form.unorm.checked = "";
        form.uspec.checked = "";
    }
}
function displayht2(form) {
    if (form.uspec.checked) {
        form.unorm.checked = "";
        form.ufree.checked = "";
        montre(\'trht\');
    } else {        
        cache(\'trht\');
        form.unorm.checked = true;
    }
}
'.EndJavascript();

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1554]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1554], '100%');

$htpasswd = @file(CHEMIN.'data/config/.htpasswd');
echo '
<p style="text-align:center;">'.ToHelp($lng, 'protect').$admin[1555].'</p>
<hr />';
if (!empty($erreur)) echo displayErrorMsg($admin[1715], $erreur);
echo '
<style type="text/css">
.td-input-group div.input-group-append { margin-left: -5px; }
input.texte { font-size: 13px; }
</style>
<script text="javascript">
  $(document).ready(function(){
    $("#testuuid").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) {
        $("#uuid-strength").removeClass().addClass("alert alert-error").html("'.$help[21].'");
      } else if (strongRegex.test($(this).val())) {
        $("#uuid-strength").removeClass().addClass("alert alert-success").html("'.$help[22].'");
      } else if (mediumRegex.test($(this).val())) {
        $("#uuid-strength").removeClass().addClass("alert alert-info").html("'.$help[23].'");
      } else {
        $("#uuid-strength").removeClass().addClass("alert alert-error").html("'.$help[24].'");
      }
      return true;
    });
  });
</script>
<div class="w-100 m-auto" style="max-width:580px;">
  <form name="protect" action="admin.php?lng='.$lng.'&amp;pg=protect" method="post" onsubmit="return VerifyForm(); return false;">';

$method = '';
if (!empty($htpasswd)) {
    $method = trim(substr($htpasswd[0], 2));
    switch ($method) {
    case '1-0-0' : 
        echo '
    <input type="hidden" name="unorm" value="on" />';
        break;
    case '0-1-0' : 
        echo '
    <input type="hidden" name="ufree" value="on" />';
        break;
    case '0-0-1' : 
        echo '
    <input type="hidden" name="uspec" value="on" />';
        break;
    }
}
if (empty($htpasswd))
{
	echo '
		<div class="alert alert-primary" role="alert">'
		.$admin[1838].'
		</div>';
     $upseudo = $userprefs[1];
echo '
    <div class="row quest">
      <div class="col-md-6 p-0 pl-1">
         '.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'
      </div>';
//	file_put_contents($nomficlog, ' 1- htppasvd pas vide  ou inexistant: '.$regit."\n", FILE_APPEND | LOCK_EX);
}
else
echo '
    <div class="row quest">
      <div class="col-md-6 p-0 pl-1">
		'.SubmitButton($admin[1411], 'self.location.href=\'admin.php?lng='.$lng.'&pg=protect&regit=2\'', $imggauche, '', 'button').'
      </div>';
if (file_exists(CHEMIN.'data/config/.htpasswd'))
{
	if ($method != '0-0-1') 
	{
//		file_put_contents($nomficlog, ' methode : '.$method.'regit : '.$regit."\n", FILE_APPEND | LOCK_EX);	
		echo '
		  <div class="col-md-6 p-0 pr-1">
			<div class="float-right">
			'.SubmitButton($admin[1749], 'self.location.href=\'admin.php?lng='.$lng.'&pg=protect&regit=5\'', '', $imgdroite, 'button').'
			</div>
		  </div>';
	}
}
echo '
      <div class="clearfix"></div>
	</div>
    <fieldset>
      <div class="w-90 m-auto">';
if (empty($htpasswd))
    echo '
        <div class="row">
          <div class="col-md-6 p-0 pt-3"><b>'.$admin[1013].'</b></div>
          <div class="col-md-6 p-0">
            <input type="text" class="'.($err_pseudo ? 'errorInputText' : 'texte').' form-control" name="upseudo" value="'.$upseudo.'" readonly="readonly" />
          </div>
        </div>
        <div class="row">
          <div class="col-md-12 p-1" id="uuid-strength"></div>
        </div>
        <div class="row">
          <div class="col-md-6 p-0 pt-3"><b>'.$admin[1634].'</b></div>
          <div class="col-md-6 p-0 td-input-group">
            <input data-toggle="password" id="uuid" class="texte form-control" type="password" name="uuid" value="" data-message="" />
          </div>
        </div>
        <div class="row">
          <div class="col-md-6 p-0 pt-3"><b>'.$admin[1645].'</b></div>
          <div class="col-md-6 p-0 td-input-group">
            <input data-toggle="password" id="uuid2" class="texte form-control" type="password" name="uuid2" value="" data-message="" />
          </div>
        </div>
        <div class="row"></div>
        <div class="row">
          <div class="col-md-6 px-0 py-1"><label for="unorm"><b>'.$admin[1735].'</b></label></div>
          <div class="col-md-6 px-0 py-1">
            <input type="checkbox" class="btn-check" id="unorm" name="unorm" checked onchange="displayht0(this.form); cache(\'trht\');" />
          </div>
        </div>
        <div class="row">
          <div class="col-md-6 px-0 py-1"><label for="ufree"><b>'.$admin[1568].'</b></label></div>
          <div class="col-md-6 px-0 py-1">
            <input type="checkbox" id="ufree" name="ufree" onchange="displayht1(this.form); cache(\'trht\');" />
          </div>
        </div>
        <div class="row">
          <div class="col-md-6 px-0 py-1"><label for="uspec"><b>'.$admin[1734].'</b></label></div>
          <div class="col-md-6 px-0 py-1">
            <input type="checkbox" id="uspec" name="uspec" onchange="displayht2(this.form);" />
          </div>
        </div>';
echo '
      </div>
      <div id="trht" class="w-98 m-auto" style="display:none;">
        <textarea name="htspec" rows="4" class="w-100"></textarea>
      </div>
    </fieldset>
    <div class="row quest">
	  <div class="col-md-6 p-0 pl-1">
        '.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'
	  </div>';
if (empty($htpasswd) || !(file_exists(CHEMIN.'data/config/.htpasswd')))
{
	echo '
      <div class="col-md-6 p-0 pr-1">
        <div class="float-right">
		<input type="hidden" name="regit" id="regit" value="1">
          '.SubmitButton($admin[885], 'self.location.href=\'admin.php?lng='.$lng.'&pg=protect\'', '', $imgdroite).'
        </div>
      </div>';
//	file_put_contents($nomficlog, ' 2- htpasswd vide ou inexistant: '.$regit."\n", FILE_APPEND | LOCK_EX);
}
echo '
	  <div class="clear:both"></div>
	</div>
  </form>';
if (!empty($htpasswd)) {
    echo '
    <fieldset style="margin-top: 24px; padding: 6px 24px; width: 60%; margin: auto;">';
    $countht = count($htpasswd);
    for ($i = 1; $i < $countht; $i++) {
        $aht = explode(':', $htpasswd[$i]);
        echo '
      <div style="line-height: 20px;">
        <b>'.$aht[0].'</b>';
        if($i > 1) echo '
        <span style="float:right;">
          <img src="'.CHEMIN.'admin/inc/img/files/sup.gif" alt="X" title="'.$admin[186].'"  style="cursor: pointer;" 
            onclick="self.location.href=\'admin.php?lng='.$lng.'&pg=protect&regit=4&upseudo='.$aht[0].'\'" />
        </span>';
        echo '
      </div><div style="clear: both;"></div>';
    }
    echo '
    </fieldset>';
//	file_put_contents($nomficlog, ' htppasvd pas ou existant: '.$regit."\n", FILE_APPEND | LOCK_EX);
}
    echo '
</div>
'.BeginJavascript().'document.newpwd.uuid.focus()'.EndJavascript();

btable();
include CHEMIN.'admin/bpage.inc' ;
?>
react.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/react.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Articles Reactions
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[16] == '') {
        $nomzone = $admin[476];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_REACT;
$bname     = 1;
$bemail    = 1;
$bcat      = 0;
$btitre    = 0;
$bcontenu  = 1;
$bnouveau  = 2;
$qformonly = 0;
$qtitle    = $admin[477];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1054&mnuid=937&tconfig=0#z2').'</p>'.$admin[478].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[172];
$qwrite    = '';
$qcat      = '';
$qtitre    = $admin[173];
$qcontenu  = $admin[174];
$qnouveau  = $admin[261];

$dbart     = ReadDbFields(DBART);

include 'inc/admin.inc';
?>
reblog.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/reblog.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Blog Reactions
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[40] == '') {
        $nomzone = $admin[476];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_REBLOG;
$bname     = 1;
$bemail    = 1;
$bcat      = 0;
$btitre    = 0;
$bcontenu  = 1;
$bnouveau  = 2;
$qformonly = 0;
$qtitle    = $admin[771];
$qintro    = '<br />'.ToHelp($lng, '&pg=1080&mnuid=937&tconfig=0#z2').$admin[772].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[172];
$qwrite    = '';
$qcat      = '';
$qtitre    = $admin[36];
$qcontenu  = $admin[37];
$qnouveau  = $admin[261];

$dbblog    = ReadDbFields(DBBLOG);

include 'inc/admin.inc';
?>
rencat.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/rencat.inc'
View Content
<?php
/*******************************************************************************
 *   Admin : To rename a category in a menu box
 *******************************************************************************
 *   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.03 (August 10, 2021) : adaptation to php 8
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[17] == '') {
        $nomzone = $admin[1364];
        include 'access.inc';
        exit();
    }
}

$id      = import('id');
$rencat  = import('rencat', 'POST', NULL);

################################################################################
function _getPrefixCateg($prefix, $categ) {
    $x = explode('|', $prefix);
    if ('' == trim($x[0])) unset($x[0]);
    if ('' != $categ) $x[] = $categ;
    return count($x) > 0 ? implode('|', $x) : '';
}

function _changeCateg($prefix, $old, $new, $fielda) {
    $prefix_old = _getPrefixCateg($prefix, $old);
    $prefix_new = _getPrefixCateg($prefix, $new);
    if ('' == $prefix_old) {
        if ('' == $fielda) {
            return $prefix_new;
        } else {
            echo "## DEBUG 1 ## |$prefix|$old|$new|$fielda|<br>";
            return FALSE;
        }
    } else {
        $p = mb_strpos($fielda, $prefix_old);
        if (0 === $p) {
            return $prefix_new.mb_substr($fielda, $p + mb_strlen($prefix_old));
        } else {
            echo "## DEBUG 4 ## |$prefix|$old|$new|$fielda|<br>";
            return FALSE;
        }
    }
}

################################################################################
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1365]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1365], '100%');

$select = isset($rencat['select']) ? $rencat['select'] : -1;
$ok = FALSE;
/// Y-a-t-il un traitement valide à  effectuer ?
if (isset($rencat)) {
    $ok = isset($rencat['prefix']) && isset($rencat['old']) && isset($rencat['new']);
    $ok = $ok && isset($rencat['old'][$lang[0]]);
    $ok = $ok && isset($rencat['new'][$lang[0]]);
    if ('' == $lang[1]) {
        $ok = $ok && ('' == $rencat['prefix'][$lang[0]] || '' != $rencat['new'][$lang[0]]);
        $ok = $ok && ($rencat['old'][$lang[0]] != $rencat['new'][$lang[0]]);
    } else {
        $ok = $ok && isset($rencat['old'][$lang[1]]);
        $ok = $ok && isset($rencat['new'][$lang[1]]);
        $ok = $ok && (
            ('' == $rencat['prefix'][$lang[0]] || '' != $rencat['new'][$lang[0]]) &&
            ('' == $rencat['prefix'][$lang[1]] || '' != $rencat['new'][$lang[1]])
        );
        $ok = $ok && (
            ($rencat['old'][$lang[0]] != $rencat['new'][$lang[0]]) ||
            ($rencat['old'][$lang[1]] != $rencat['new'][$lang[1]])
        );
    }
}
/// Traitement du formulaire
if ($ok) {
    $select = -1;
    $path = empty($rencat['prefix'][$lng]) ? '' : $rencat['prefix'][$lng].'|';
    echo '
  <p style="text-align:center;">'.sprintf($admin[1370], htmlentities("$path"), htmlentities($rencat['old'][$lng]), htmlentities($rencat['new'][$lng])).'</p>';
    $oms = ReadDbFields(DBOPTMENU);

    foreach ($oms as $om) {
        if ($om[5] != $id) continue;
        $prefix_categ = _getPrefixCateg($rencat['prefix'][$lang[0]], $rencat['old'][$lang[0]]);
        if (('' == $om[0] && '' == $prefix_categ) || ('' != $prefix_categ && 0 === strpos($om[0] , $prefix_categ))) {
            ReadDoc($om[4]);
            $new = _changeCateg($rencat['prefix'][$lang[0]], $rencat['old'][$lang[0]], $rencat['new'][$lang[0]], $fielda1);
            $fielda1 = FALSE === $new ? $fielda1 : $new;

            if ('' != $lang[1]) {
                $new = _changeCateg($rencat['prefix'][$lang[1]], $rencat['old'][$lang[1]], $rencat['new'][$lang[1]], $fielda2);
                $fielda2 = FALSE === $new ? $fielda2 : $new;
            }

            $fielda1 = addslashes($fielda1);
            $fielda2 = addslashes($fielda2);
            $fieldb1 = addslashes($fieldb1);
            $fieldb2 = addslashes($fieldb2);
            WriteDoc();
        }
    }
    UpdateDBdtb(TYP_OPTMENU);
}
/// Préparation du formulaire
$oms = ReadDbFields(DBOPTMENU);
sort($oms);
$cats = array();
$currcat = '---';
$icat = -1;
foreach ($oms as $om) {
    if ($om[5] != $id) continue;
    if ($om[0] != $currcat) {
        $cats[++$icat] = array($om[0], $om[1], $om[4], 1);
        $currcat = $om[0];
    } else {
        $cats[$icat][3]++;
    }
}
sort($cats);
unset($oms, $icat, $currcat);

$curcats = array();
$liste = array();
foreach ($cats as $item) {
    if (empty($item[0])) {
        $liste[] = array(
            0, '', '', '', '', $item[2], $item[3]
            );
    } else {
        $cats0 = explode('|', $item[0]);
        $cats1 = explode('|', $item[1]);
        $xcat0 = $xcat1 = '';
        for ($i = 0; $i < count($cats0); $i++) {
            if (@$curcats[$i] != @$cats0[$i]) {
                $liste[] = array(
                    $i, $xcat0, $cats0[$i], $xcat1, @$cats1[$i], $item[2], ($item[0] ==  $xcat0 ? $item[3] : '*')
                    );
                $curcats[$i] = $cats0[$i];
                array_splice($curcats, $i+1);
            }
            $xcat0 .= (empty($xcat0) ? '' : '|').$cats0[$i];
            $xcat1 .= (empty($xcat1) ? '' : '|').@$cats1[$i];
        }
    }
}
unset($cats0, $cats1, $curcats, $xcat0, $xcat1);
$select = $select < count($liste) ? $select : -1;
if (1 == count($liste)) $select = 0;
// Affichage du formulaire
if (0 == count($liste)) {
    echo '
  <p>'.$admin[1369].'</p>';

} else {

    echo '
<div class="w-100 mx-auto" style="max-width:520px;">
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$admin[1364].'</p>
  <form name="frencat1" action="admin.php?lng='.$lng.'&amp;pg=rencat&amp;id='.$id.'" method="post">
    <fieldset class="w-100 mx-0 my-3 text-center">
      <input type="hidden" id="prefix_'.$lang[0].'" name="rencat[prefix]['.$lang[0].']" value="'.(-1 != $select ? htmlentities($liste[$select][1]) : '').'" />
      <input type="hidden" id="prefix_'.$lang[1].'" name="rencat[prefix]['.$lang[1].']" value="'.(-1 != $select ? htmlentities($liste[$select][3]) : '').'" />
      <input type="hidden" id="old_'.$lang[0].'" name="rencat[old]['.$lang[0].']" value="'.(-1 != $select ? htmlentities($liste[$select][2]) : '').'" />
      <input type="hidden" id="old_'.$lang[1].'" name="rencat[old]['.$lang[1].']" value="'.(-1 != $select ? htmlentities($liste[$select][4]) : '').'" />
      <div>'.$admin[1366].'</div>
      <div>
        <select name="rencat[select]" size="'.count($liste).'" class="form-control w-100 mx-auto" 
          style="overflow:none;max-width:320px;" onchange="change_rencat(this.value);">';
    foreach ($liste as $i=>$item) {
        $value = htmlentities($item[$lng == $lang[0] ? 2 : 4]);
        $value = empty($value) ? ' -- '.$admin[1125].' -- ' : $value;
        echo '
          <option value="'.$i.'"'.Selected($select == $i).'>'.str_pad('', 15*$item[0], ' &nbsp; &nbsp; ').$value.'</option>';
    }
    echo '
        </select>
		<noscript><br />'.SubmitButton($admin[1367]).'</noscript>
      </div>
      <p>'.$admin[1368].'</p>';
    if ('' == $lang[1]) {
        echo '
      <div class="w-100 mx-auto" style="max-width:320px;">
        <input class="form-control texte" type="text" id="new_'.$lang[0].'" name="rencat[new]['.$lang[0].']" 
          value="'.(-1 != $select ? htmlentities($liste[$select][2]) : '').'" />
      </div>';
    } else {
        echo '
      <div>
        <div class="d-inline-block w-100 mx-auto" style="max-width:24px;">'.$flag1.'</div>
        <div class="d-inline-block w-100 mx-auto" style="max-width:320px;">
          <input class="form-control texte" type="text" id="new_'.$lang[0].'" name="rencat[new]['.$lang[0].']" 
            value="'.(-1 != $select ? htmlentities($liste[$select][2]) : '').'" />
        </div>
      </div>
      <div>
        <div class="d-inline-block w-100 mx-auto" style="max-width:24px;">'.$flag2.'</div>
        <div class="d-inline-block w-100 mx-auto" style="max-width:320px;">
	      <input class="form-control texte" type="text" id="new_'.$lang[1].'" name="rencat[new]['.$lang[1].']" 
            value="'.(-1 != $select ? htmlentities($liste[$select][4]) : '').'" />
        </div>
      </div>';
    }

    echo '
    </fieldset>';
    echo '
    <div class="row quest p-0 mt-2 w-100 m-auto">
      <div class="col-md-6">'.SubmitButton($admin[1220], 'self.location.href=\'admin.php?lng='.$lng.'&pg=menu&tri=ch\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1318], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>
';
    echo BeginJavascript().'
var rencat = [';
    foreach ($liste as $i=>$item) {
        echo '
    '.(0 == $i ? '' : ',').'[ "'.addslashes($item[1]).'", "'.addslashes($item[2]).'", "'.addslashes($item[3]).'", "'.addslashes($item[4]).'" ]';
    }
    echo '
];
function change_rencat(value) {
    $("#prefix_'.$lang[0].'").val( rencat[value][0] );
    $("#prefix_'.$lang[1].'").val( rencat[value][2] );
    $("#old_'.$lang[0].'").val( rencat[value][1] );
    $("#old_'.$lang[1].'").val( rencat[value][3] );
    $("#new_'.$lang[0].'").val( rencat[value][1] );
    $("#new_'.$lang[1].'").val( rencat[value][3] );
}
$("#select").hide();
'.EndJavascript();

}

################################################################################

btable();
include CHEMIN.'admin/bpage.inc';
?>
rgpd.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/rgpd.inc'
View Content
<?php
/*******************************************************************************
 *   RGPD
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[51] == '') {
        $nomzone = $admin[1776];
        include 'access.inc';
        exit();
    }
}

// Récupération des variables
$regit = import('regit');
$act   = import('act');
if ($serviz[177] == '') $pgmentionslegales = '17';
else
 $pgmentionslegales = $serviz[177];
if ($regit == 1) {
	// Récupération des variables soumises
	$rgpd  = import('rgpd', 'POST');
    $rgpd["privacyUrl"] = 'articles.php?lng='.$lng.'&pg='.$pgmentionslegales;	
	/**
	 * Contrôle des variables récupérées
	 */
	$rgpd["groupServices"] = boolval($rgpd["groupServices"]) ? 'true' : 'false';
	$rgpd["showIcon"] = boolval($rgpd["showIcon"]) ? 'true' : 'false';
	$rgpd["DenyAllCta"] = boolval($rgpd["DenyAllCta"]) ? 'true' : 'false';
	$rgpd["AcceptAllCta"] = boolval($rgpd["AcceptAllCta"]) ? 'true' : 'false';
	$rgpd["hashtag"] = !empty($rgpd["hashtag"]) ? trim($rgpd["hashtag"]) : '#rgpd';
	$rgpd["cookieName"] = !empty($rgpd["cookieName"]) ? trim($rgpd["cookieName"]) : 'tarteaucitron';
	$rgpd["orientation"] = in_array($rgpd["orientation"], array('top', 'bottom')) ? $rgpd["orientation"] : 'top';
	$rgpd["iconSrc"] = !empty($rgpd["iconSrc"]) ? str_replace(SITE3, '', trim($rgpd["iconSrc"])) : '';	
	$rgpd["iconPosition"] = in_array($rgpd["iconPosition"], array('BottomRight', 'BottomLeft', 'TopRight', 'TopLeft')) ? $rgpd["iconPosition"] : 'BottomLeft';
	
	$rgpd["servicesCode"] = !empty($rgpd["servicesCode"]) ? trim(preg_replace('`</?script[^>]*>`i', '', $rgpd["servicesCode"])) : '';
	//
	
	/**
	 * Code à enregistrer dans le fichier rgpd.js
	 */
	$mettre = '
<script type="text/javascript">
    tarteaucitron.init({
      "privacyUrl": "'.$rgpd["privacyUrl"].'", /* Privacy policy url */

      "hashtag": "'.$rgpd["hashtag"].'", /* Open the panel with this hashtag */
      "cookieName": "'.$rgpd["cookieName"].'", /* Cookie name */

      "orientation": "'.$rgpd["orientation"].'", /* Banner position (top - bottom) */
   
      "groupServices": '.$rgpd["groupServices"].', /* Group services by category */
                       
      "showAlertSmall": false, /* Show the small banner on bottom right */
      "cookieslist": false, /* Show the cookie list */
                       
      "closePopup": false, /* Show a close X on the banner */

      "showIcon": '.$rgpd["showIcon"].', /* Show cookie icon to manage cookies */
      "iconSrc": "'.(!empty($rgpd["iconSrc"]) && !preg_match('`^http(s)?\:`', $rgpd["iconSrc"]) ? SITE3.$rgpd["iconSrc"] : $rgpd["iconSrc"]).'", /* Optionnal: URL image */
      "iconPosition": "'.$rgpd["iconPosition"].'", /* BottomRight, BottomLeft, TopRight and TopLeft */

      "adblocker": false, /* Show a Warning if an adblocker is detected */
                       
      "DenyAllCta" : '.$rgpd["DenyAllCta"].', /* Show the deny all button */
      "AcceptAllCta" : '.$rgpd["AcceptAllCta"].', /* Show the accept all button when highPrivacy on */
      "highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */
                       
      "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */

      "removeCredit": false, /* Remove credit link */
      "moreInfoLink": true, /* Show more info link */

      "useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
      "useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */

      //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
                      
      "readmoreLink": "", /* Change the default readmore link */

      "mandatory": true, /* Show a message about mandatory cookies */
    });
	
	'.$rgpd["servicesCode"].'
	
</script>';
	//
	
	WriteFullDB(CONFIGREP.'rgpd.js', $mettre);
	
	/**
	 * Code à enregistrer dans le fichier rgpd.inc
	 */	
	$rgpd_values = '<?php
$rgpd = array(	
      "privacyUrl" => stripslashes("'.addslashes($rgpd["privacyUrl"]).'"), /* Privacy policy url */

      "hashtag" => stripslashes("'.addslashes($rgpd["hashtag"]).'"), /* Open the panel with this hashtag */
      "cookieName" => stripslashes("'.addslashes($rgpd["cookieName"]).'"), /* Cookie name */

      "orientation" => "'.$rgpd["orientation"].'", /* Banner position (top - bottom) */
   
      "groupServices" => '.$rgpd["groupServices"].', /* Group services by category */
                       
      "showAlertSmall" => false, /* Show the small banner on bottom right */
      "cookieslist" => false, /* Show the cookie list */
                       
      "closePopup" => false, /* Show a close X on the banner */

      "showIcon" => '.$rgpd["showIcon"].', /* Show cookie icon to manage cookies */
      "iconSrc" => stripslashes("'.addslashes($rgpd["iconSrc"]).'"), /* Optionnal: URL image */
      "iconPosition" => "'.$rgpd["iconPosition"].'", /* BottomRight, BottomLeft, TopRight and TopLeft */

      "adblocker" => false, /* Show a Warning if an adblocker is detected */
                       
      "DenyAllCta"  => '.$rgpd["DenyAllCta"].', /* Show the deny all button */
      "AcceptAllCta"  => '.$rgpd["AcceptAllCta"].', /* Show the accept all button when highPrivacy on */
      "highPrivacy" => true, /* HIGHLY RECOMMANDED Disable auto consent */
                       
      "handleBrowserDNTRequest" => false, /* If Do Not Track == 1, disallow all */

      "removeCredit" => false, /* Remove credit link */
      "moreInfoLink" => true, /* Show more info link */

      "useExternalCss" => false, /* If false, the tarteaucitron.css file will be loaded */
      "useExternalJs" => false, /* If false, the tarteaucitron.js file will be loaded */

      //"cookieDomain" => ".my-multisite-domaine.fr", /* Shared cookie for multisite */
                      
      "readmoreLink" => "", /* Change the default readmore link */

      "mandatory" => true, /* Show a message about mandatory cookies */
	  
	  "servicesCode" => stripslashes("'.addslashes($rgpd["servicesCode"]).'"),   /* Declaration of services for rgpd */
);
	
?>';
	//
	WriteFullDB(CONFIGREP.'rgpd.inc', $rgpd_values);
}

include CONFIGREP.'rgpd.inc';

################################################################################
// code pour enregitrer les services soumis au rgpd et configurer le script tarteaucitron

if($act == 1) {
	if ($serviz[177] == '') $pgmentionslegales = '17';
	else
	 $pgmentionslegales = $serviz[177];
     $rgpd["privacyUrl"] = 'articles.php?lng='.$lng.'&pg='.$pgmentionslegales;
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1776]);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1776], '100%');

    echo '
  <p style="text-align:center;">'.ToHelp($lng, '&pg=1102&mnuid=937&tconfig=0#z2').$admin[1777].'</p>
  <hr /> 
  <div class="w-100 m-auto" style="max-width:510px;">
    <form name="form_rgpd" action="admin.php?lng='.$lng.'&amp;pg=rgpd&amp;act=1" method="post">
    <input type="hidden" name="regit" value="1" />
	<div class="quest" style="padding:2px 20px;">
	<div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
	<div style="clear:both"></div>
	</div>
	<br />
    <div class="table-responsive-md">
	<fieldset class="w-100">
		<legend>'.$admin[1778].'</legend>
		<p>'.$admin[1779].'</p>
		<p><label class="w-100">'.$admin[1780].'&nbsp;:&nbsp;
		<textarea name="rgpd[servicesCode]" class="w-100" style="max-width:510px;" rows="10">'.stripslashes($rgpd["servicesCode"]).'</textarea>
		</label>
		</p>
	</fieldset>

	<fieldset class="w-100">
	<legend>'.$admin[1781].'</legend>
		<p><label class="w-100">'.$admin[1782].'&nbsp;:&nbsp;
		<input type="text" name="rgpd[privacyUrl]" value="'.$rgpd["privacyUrl"].'" style="min-width:200px;" placeholder="'.$admin[1783].'" disabled readonly="readonly"/>
		</label>
		</p>
		<p><label class="w-100">'.$admin[1784].'&nbsp;:&nbsp;
		<input type="text" name="rgpd[hashtag]" value="'.$rgpd["hashtag"].'" style="max-width:80px;" placeholder="'.$admin[1785].'" />
		</label>
		</p>
		<p><label  class="w-100">'.$admin[1786].'&nbsp;:&nbsp;
		<input type="text" name="rgpd[cookieName]" value="'.$rgpd["cookieName"].'" placeholder="'.$admin[1787].'" />
		</label>
		</p>		
		<p><label>'.$admin[1788].'&nbsp;:&nbsp;
		<select name="rgpd[orientation]">
			<option value="top"'.Selected($rgpd["orientation"] == 'top').'>'.$admin[1789].'</option>
			<option value="bottom"'.Selected($rgpd["orientation"] == 'bottom').'>'.$admin[1790].'</option>
		</select>
		</label>
		</p>		
		<p><label>'.$admin[1791].'&nbsp;:&nbsp;
		<select name="rgpd[DenyAllCta]">
			<option value="1"'.Selected($rgpd["DenyAllCta"]).'>'.$admin[1605].'</option>
			<option value="0"'.Selected(!$rgpd["DenyAllCta"]).'>'.$admin[1604].'</option>
		</select>
		</label>
		</p>		
		<p><label>'.$admin[1792].'&nbsp;:&nbsp;
		<select name="rgpd[AcceptAllCta]">
			<option value="1"'.Selected($rgpd["AcceptAllCta"]).'>'.$admin[1605].'</option>
			<option value="0"'.Selected(!$rgpd["AcceptAllCta"]).'>'.$admin[1604].'</option>
		</select>
		</label>
		</p>		
		<p><label>'.$admin[1793].'&nbsp;:&nbsp;
		<select name="rgpd[groupServices]">
			<option value="0"'.Selected(!$rgpd["groupServices"]).'>'.$admin[1604].'</option>
			<option value="1"'.Selected($rgpd["groupServices"]).'>'.$admin[1605].'</option>
		</select>
		</label>
		</p>
		<fieldset>
		<legend>'.$admin[1794].'</legend>
			<p><label>'.$admin[1795].'&nbsp;:&nbsp;
			<select name="rgpd[showIcon]">
				<option value="0"'.Selected(!$rgpd["showIcon"]).'>'.$admin[1604].'</option>
				<option value="1"'.Selected($rgpd["showIcon"]).'>'.$admin[1605].'</option>
			</select>
			</label>
			</p>		
			<p><label>'.$admin[1796].'&nbsp;:&nbsp;
			<input type="text" name="rgpd[iconSrc]" value="'.$rgpd["iconSrc"].'" class="w-100" placeholder="'.$admin[1797].'" />
			</label>
			</p>	
			<p><label>'.$admin[1798].'&nbsp;:&nbsp;
			<select name="rgpd[iconPosition]">
				<option value="BottomRight"'.Selected($rgpd["iconPosition"] == 'BottomRight').'>'.$admin[1799].'</option>
				<option value="BottomLeft"'.Selected($rgpd["iconPosition"] == 'BottomLeft').'>'.$admin[1800].'</option>
				<option value="TopRight"'.Selected($rgpd["iconPosition"] == 'TopRight').'>'.$admin[1801].'</option>
				<option value="TopLeft"'.Selected($rgpd["iconPosition"] == 'TopLeft').'>'.$admin[1802].'</option>
			</select>
			</label>
			</p>
		</fieldset>
	</fieldset>
	<br />
	<div class="quest" style="padding:2px 20px;">
	<div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
	<div style="clear:both"></div>
	</div>
	</form>
  </div>
 ';
}
btable();
include CHEMIN.'admin/bpage.inc';
?>
rightsupdt.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/rightsupdt.inc'
View Content
<?php
/*******************************************************************************
 *   Update user rights
 *******************************************************************************
 *   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.19 (August 26, 2024) : Rights correction
 ******************************************************************************/

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

$filedroits = CHEMIN.'admin/'.REDACREP.$rightsname.INCEXT;
$mettre = "<?php
if (stristr(\$_SERVER['SCRIPT_NAME'], '".$rightsname.".inc')) {
    header('location:../index.php');
    die();
}

\$drtuser[0]  = \"".$drtuser[0]."\";  // Accès à config générale
\$drtuser[1]  = \"".$drtuser[1]."\";  // Accès à config site
\$drtuser[2]  = \"".$drtuser[2]."\";  // Accès à config accueil
\$drtuser[3]  = \"".$drtuser[3]."\";  // Accès à config section
\$drtuser[4]  = \"".$drtuser[4]."\";  // Accès à Config services
\$drtuser[5]  = \"".$drtuser[5]."\";  // Accès à Config boites
\$drtuser[6]  = \"".$drtuser[6]."\";  // Accès à Maintenance
\$drtuser[7]  = \"".$drtuser[7]."\";  // Accès à Archivage Forum
\$drtuser[8]  = \"".$drtuser[8]."\";  // Accès à Contrôle d'intégrité DB
\$drtuser[9]  = \"".$drtuser[9]."\";  // Accès à Mot de passe Collaborateur
\$drtuser[10] = \"".$drtuser[10]."\"; // Accès à Config zone membres
\$drtuser[11] = \"".$drtuser[11]."\"; // Accès à Travaux
\$drtuser[12] = \"".$drtuser[12]."\"; // Accès à Droits
\$drtuser[13] = \"".$drtuser[13]."\"; // Accès à Contact avancé
\$drtuser[14] = \"".$drtuser[14]."\"; // Accès à Nouvelles
\$drtuser[15] = \"".$drtuser[15]."\"; // Accès à Articles
\$drtuser[16] = \"".$drtuser[16]."\"; // Accès à Réactions Articles
\$drtuser[17] = \"".$drtuser[17]."\"; // Accès à Boîtes menus
\$drtuser[18] = \"".$drtuser[18]."\"; // Accès à Photos
\$drtuser[19] = \"".$drtuser[19]."\"; // Accès à Téléchargements
\$drtuser[20] = \"".$drtuser[20]."\"; // Accès à Liens
\$drtuser[21] = \"".$drtuser[21]."\"; // Accès à FAQ
\$drtuser[22] = \"".$drtuser[22]."\"; // Accès à Livre d'or
\$drtuser[23] = \"".$drtuser[23]."\"; // Accès à Forum
\$drtuser[24] = \"".$drtuser[24]."\"; // Accès à Config Forum
\$drtuser[25] = \"".$drtuser[25]."\"; // Accès personnalisation des fichiers Lang
\$drtuser[26] = \"".$drtuser[26]."\"; // Accès à Boites libres
\$drtuser[27] = \"".$drtuser[27]."\"; // Accès à Bannières
\$drtuser[28] = \"".$drtuser[28]."\"; // Accès à Citations
\$drtuser[29] = \"".$drtuser[29]."\"; // Accès à Menu icônes
\$drtuser[30] = \"".$drtuser[30]."\"; // Statut à afficher
\$drtuser[31] = \"".$drtuser[31]."\"; // Accès à Compteur
\$drtuser[32] = \"".$drtuser[32]."\"; // Accès à Statistiques
\$drtuser[33] = \"".$drtuser[33]."\"; // Accès à Newsletter
\$drtuser[34] = \"".$drtuser[34]."\"; // Accès à Nouvelles RSS
\$drtuser[35] = \"".$drtuser[35]."\"; // Accès à Logs
\$drtuser[36] = \"".$drtuser[36]."\"; // Accès à Fichiers
\$drtuser[37] = \"".$drtuser[37]."\"; // Accès à Agenda
\$drtuser[38] = \"".$drtuser[38]."\"; // Password
\$drtuser[39] = \"".$drtuser[39]."\"; // Accès à Blogs
\$drtuser[40] = \"".$drtuser[40]."\"; // Accès à Réactions Blogs
\$drtuser[41] = \"".$drtuser[41]."\"; // Accès à Blog RSS
\$drtuser[42] = \"".$drtuser[42]."\"; // Fonction
\$drtuser[43] = \"".$drtuser[43]."\"; // Accès à Config Style
\$drtuser[44] = \"".$drtuser[44]."\"; // Accès à Import
\$drtuser[45] = \"".$drtuser[45]."\"; // Accès à Sécurité
\$drtuser[46] = \"".$drtuser[46]."\"; // Accès à Mise à jour / Extension
\$drtuser[47] = \"".$drtuser[47]."\"; // Accès à Sauvegarde du site
\$drtuser[48] = \"".$drtuser[48]."\"; // Accès à Version de GuppY
\$drtuser[49] = \"".$drtuser[49]."\"; // Accès à Config Recherche
\$drtuser[50] = \"".$drtuser[50]."\"; // Accès à Réseaux sociaux
\$drtuser[51] = \"".$drtuser[51]."\"; // Declaration RGPD														 
\$drtusersv[0] = \"".$drtusersv[0]."\"; // e-mail publication article
\$drtusersv[1] = \"".$drtusersv[1]."\"; // e-mail publication réaction article
\$drtusersv[2] = \"".$drtusersv[2]."\"; // e-mail publication nouvelle
\$drtusersv[3] = \"".$drtusersv[3]."\"; // e-mail publication blog
\$drtusersv[4] = \"".$drtusersv[4]."\"; // e-mail publication commentaire blog
\$drtusersv[5] = \"".$drtusersv[5]."\"; // e-mail publication livre d\'or
\$drtusersv[6] = \"".$drtusersv[6]."\"; // e-mail publication forum";
if (!empty($drtuserplg))  
    foreach($drtuserplg as $plg => $value) {
        $mettre .= "
\$drtuserplg['$plg'] = \"".$value."\"; // Accès plugin $plg";
    }
$mettre .='
';
WriteFullDB($filedroits, $mettre);
?>
rss.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/rss.inc'
View Content
<?php
/*******************************************************************************
 *   Admin RSS News
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[34] == '') {
        $nomzone = $admin[602];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_RSS;
$bname     = 0;
$bemail    = 0;
$bcat      = 1;
$btitre    = 1;
$bcontenu  = 0;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[603];
$qintro    = '<br />'.ToHelp($lng, '&pg=1022&mnuid=937&tconfig=0#z2').$admin[604].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[605];
$qwrite    = $admin[606];
$qcat      = $admin[607];
$qtitre    = $admin[608];
$qcontenu  = '';
$qnouveau  = '';

include 'inc/admin.inc';
?>
rules.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/rules.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Forum rules
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[23] == '') {
        $nomzone = $admin[9];
        include 'access.inc';
        exit();
    }
}
$qtype = TYP_RULES;
$bname = 0;
$bemail = 0;
$bcat = 0;
$btitre = 0;
$bcontenu = 1;
$bnouveau = 0;
$qformonly = 2;
$qtitle = $admin[798];
$qintro = '<br />'.$admin[866].ToHelp($lng, '&pg=1070&mnuid=937&tconfig=0#z2');
$qseeall = '';
$qwrite = '';
$qcat = '';
$qtitre = '';
$qcontenu = $admin[867];
$qnouveau = '';
$dbwork = SelectDBFieldsByStatus(SelectDBFieldsByType(ReadDBFields(DOCID),$qtype),'a');
if (count($dbwork) == 0) {
    include(DBRULES);
    $data[0]  = $qtype;
    $data[1]  = '';
    $data[2]  = 'a';
    $data[3]  = '';
    $data[4]  = '';
    $data[5]  = $user[0];
    $data[6]  = $user[1];
    $data[7]  = '';
    $data[8]  = '';
    $data[9]  = '';
    $data[10] = '';
    $data[11] = stripslashes($rule1);
    $data[12] = stripslashes($rule2);
    $data[13] = '';
    $data[14] = '';
    $id       = ActionOnFields('add', $data);
}
else {
    $id = $dbwork[0][1];
}
include 'inc/admin.inc';
?>
save.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/save.inc'
View Content
<?php
/*******************************************************************************
 *   Save
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[9] == '') {
        $nomzone = $admin[12];
        include 'access.inc';
        exit();
    }
}

if (!class_exists('ZipArchive')) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1246]);
    include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1246], '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=996&mnuid=937&tconfig=0#z2').$admin[1258].'</p><hr />
<div style="text-align:center;padding:24px;">'.$help[19].'</div><hr />';
    btable();
    include CHEMIN.'admin/bpage.inc' ;
    exit();
}

$action    = import('action', 'POST');
$mode      = import('mode', 'POST');
$otherdirs = mb_strtolower(import('otherdirs', 'POST'), $charset);
$dirnames  = array('data', 'file', 'img', 'pages', 'photo', 'skins');
$vdirs     = array();
$seldirs   = '';

if ($mode == 'SEL') {
	for ($i = 0; $i < count($dirnames); $i++) {
		$vdirs[]  = import($dirnames[$i], 'POST');
		$seldirs .= $vdirs[$i] == 'on' ? $dirnames[$i].'/ ' : '';
	}
	if (!empty($otherdirs)) {	
		$dbw = explode(';', $otherdirs);
        $bad = array('.', '..');
        $dbw = array_diff($dbw, $bad);
        foreach ($dbw as $dir) {
            while (substr($dir, -1) == '/') $dir = substr($dir, 0, -1);
            if (is_dir(CHEMIN.$dir)) {
                $vdirs[]    = 'on';
                $seldirs   .= $dir.'/ ';
                $dirnames[] = $dir;
            }
        }
	}
}
if ($action == 'zip') {
    set_time_limit(0);
    if ($seldirs == '') {
        echo BeginJavascript().'
alert("'.addslashes($admin[1248]).'");
window.location="admin.php?lng='.$lng.'&pg=save";
        '.EndJavascript();
    } else {
        $errfile = '';
        $errzip  = '';
        $dirs    = array();
        for ($i = 0; $i < count($dirnames); $i++) {
            if ($vdirs[$i] == 'on' && is_dir(CHEMIN.$dirnames[$i])) {
                $dir    = $dirnames[$i];  
                $dirs[] = $dir;
            }
        }
        $zipname = $userprefs[1].'-'.date('Y-m-d-H-i-s').'.zip';
        $zip     = new ZipArchive();
        if ($zip->open(SAVEREP.$zipname, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true) {
            CreateDir(TEMPREP);
			StartTimer();
			$nf     = 0;
			$volume = 0;
			while (count($dirs)) {
				if (mb_strtolower($dir, $charset) == 'save') { // on exclue le répertoire des sauvegardes
					array_shift($dirs);
					continue;
				}
				$dir = $dirs[0] == '/' ? '' : $dirs[0];
				$zip->addEmptyDir($dir);
				if (false === ($files = scandir(CHEMIN.$dir))) {
					$errfile .= sprintf($admin[1257], $nf);
					break;
				} else {
					$bad   = array('.', '..');
					$files = array_diff($files, $bad); 
					foreach ($files as $file) {
						if (is_file(CHEMIN.$dir.'/'.$file)) {
							if (!$zip->addFile(CHEMIN.$dir.DIRECTORY_SEPARATOR.$file, $dir.DIRECTORY_SEPARATOR.$file)) {
								$errfile .= $dir.'/'.$file.$admin[1249]."\n ";
							} else {
								$volume += filesize(CHEMIN.$dir.'/'.$file);
								$nf++;
							}
						} elseif (is_dir(CHEMIN.$dir.'/'.$file) && mb_strtolower($file, $charset) != 'save') {
							if (!strpos(TEMPREP, $dir.'/'.$file)) $dirs[] = $dir.'/'.$file;
						}
					}
				}
				unset($files);
				array_shift($dirs);
			}
			$timer = StopTimer();
			if ($volume < 1024)
				$volume .= ' B';
			elseif ($volume < 1048576)
				$volume = round($volume / 1024, 2).' Kb';
			else
				$volume = round($volume / 1048576, 2) . ' Mb';
			$cr = "\n".$nf.$admin[1252].' ('.$volume.')'."\n".$seldirs."\n".$admin[1716].' '.$timer.' '.($timer <= 1 ? $admin[1717] : $admin[1718]);
			if (!$errfile) {
				if (false === $zip->setArchiveComment($admin[1245].' '.stripslashes($site[($lang[0] == $lng ? 0 : 11)]).' '.$admin[1601].' '.$userprefs[1]."\n".$nf.$admin[1252].' ('.$volume.')'."\n".$seldirs)) {
					$errzip .= $admin[1250].$zipname."\n\n";
				}
			}
			$zip->close();
        } else {
            $errzip .= $admin[1250].$zipname."\n\n";
        }
        unset($dirs, $zip);
        $erreur = $errzip.$errfile;
        if ($erreur) { 
            echo BeginJavascript().'
alert("'.addslashes($erreur).'");
window.location="admin.php?lng='.$lng.'&pg=save";
            '.EndJavascript();
			$action = '';
        } elseif ($nf > 0) {
            $action = 'save';
        }
    }
}

if ($action != 'save') {
	$headinc .= BeginJavascript().'
function setAllRep() {
	var lbl1="'.$admin[1719].'";
	var lbl2="'.$admin[1256].'";
	if (document.saverep.setbutton.value == lbl1) {
		var lbl  = lbl2;
		var bool = true;
	}
	else {
		var lbl  = lbl1;
		var bool = false;
	}
	document.saverep.setbutton.value = lbl;
	document.saverep.data.checked    = bool;
	document.saverep.file.checked    = bool;
	document.saverep.img.checked     = bool;
	document.saverep.pages.checked   = bool;
	document.saverep.photo.checked   = bool;
	document.saverep.skins.checked   = bool;
}
	'.EndJavascript();

	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1246]);
    include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1246], '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=996&mnuid=937&tconfig=0#z2').$admin[1258].'</p>
<hr />
<div class="w-100 m-auto text-center" style="max-width:480px;">
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$admin[1247].'</p>
  <div style="text-align:center;">
  <form name="saverep" action="admin.php?lng='.$lng.'&amp;pg=save" method="post">
    <input type="hidden" name="action" value="zip" />
    <input type="hidden" name="mode" value="SEL" />
    <fieldset>
	  <div id="selmode0" style="display:block;">'
        .$boutonleft.'<input name="setbutton" class="btn btn-info bouton" type="button" title="'.$admin[1719].'" onclick="setAllRep();" value="'.$admin[1719].'">'.$boutonright.'<br />';
    foreach ($dirnames as $dir) {
        echo '
        <div style="text-align:right; margin: 8px 200px 0 0">
          <label for="'.$dir.'">'.$dir.'/ <input type="checkbox" id="'.$dir.'" name="'.$dir.'" value="on" /></label>
        </div>';
    }
    echo '
	  </div>
	  <div id="selmode1" style="display:none; text-align:justify; color:#FF0000;">'.$help[18].'</div>
      <div id="selmode2" style="display:block;">
        <br />'.$admin[1255].'<br /><input type="text" class="form-control w-90 mx-auto texte" name="otherdirs" size="60" />
	  </div>
    </fieldset>
    <div class="row quest p-0 mt-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[1245], '', '', $imgdroite).'</div></div>
    </div>
  </form>
  </div>
</div>';
}

if ($action == 'save') {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1246]);
    include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[1246], '100%');
    echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=996&mnuid=937&tconfig=0#z2').$admin[1258].'</p>
<hr />
<div class="w-100 m-auto text-center" style="max-width:500px;">
  <p class="forum" style="text-align:left; padding:5px 20px;">'.$admin[1251].'</p>
  <fieldset>
    <br />
	<p style="text-align:center;"><b>'.$zipname.'</b></p>
	<p style="text-align:center;">'.str_replace("\n", '<br />', $cr).'</p>
	<br />
	<p style="text-align:center;">'.sprintf($admin[1253], 'admin.php?lng='.$lng.'&pg=upload').'</p>
	<br />
  </fieldset>
  <div class="quest" style="padding:2px 20px;">
    <div style="float:left">'.SubmitButton($admin[857], 'self.location.href=\'admin.php?lng='.$lng.'&pg=save\'', $imggauche, '').'</div>
    <div style="float:right">'.SubmitButton($admin[1720], 'self.location.href=\''.SAVEREP.$zipname.'\'', '', $imgdroite).'</div>
    <div style="clear:both"></div>
  </div>
</div>';
}

btable();
include CHEMIN.'admin/bpage.inc' ;
?>
search.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/search.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Search
 *******************************************************************************
 *   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.19 (August 26, 2024) : Search config modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[49] == '') {
        $nomzone = $admin[1264];
        include 'access.inc';
        exit();
    }
}

$regit = import('regit');
if (!isset($rech_article))	  $rech_article	 = 'ar';   // recherche sur article
if (!isset($rech_download))	  $rech_download = 'dn'; // recherche sur telechargements
if (!isset($rech_faq))		  $rech_faq 	 = 'fa';            // recherche sur faq
if (!isset($rech_forum ))	  $rech_forum 	 = 'fr';       // recherche sur forum
if (!isset($rech_livreor))	  $rech_livreor  = 'gb';   // recherche sur livre d'or
if (!isset($rech_liens))	  $rech_liens    = 'li';       // recherche sur liens
if (!isset($rech_news)) 	  $rech_news     = 'ne';         // recherche sur nouvelles
if (!isset($rech_blog)) 	  $rech_blog     = 'bl';         // recherche sur blog
if (!isset($rech_photo))	  $rech_photo    = 'ph';       // recherche sur photos
if (!isset($rech_agenda))     $rech_agenda   = 'ag';     // recherche sur agenda
if (!isset($rech_archive))    $rech_archive  = 'arch';   // recherche sur archives

if (is_file(CONFIGREP.'searchconfig.inc')) {
	include CONFIGREP.'searchconfig.inc';
} else {
	$pertinencemin   = 35;   // Affiche les résultats de pertinence supérieure à cette valeur
	$resultbypage    = 10;   // Nombre de résultats par page
	$barcolor        = 'vert';   // Couleur de la barre de pertinence
	$bargrey         = '3';   // Fond de la barre de pertinence
	$styleocc[0]     = '';   // Couleur de la police
	$styleocc[1]     = '';   // Italique
	$styleocc[2]     = 'bold';   // Caractères gras
	$styleocc[3]     = '';   // Souligné
	$styleocc[4]     = 'on';   // "on"/"" Surligné en couleur
	$bgcolor[0]      = '#ECBDA2';   // Couleur de l'occurence n° 1
	$bgcolor[1]      = '#B6F3A2';   // Couleur de l'occurence n° 2
	$bgcolor[2]      = '#ECF3A2';   // Couleur de l'occurence n° 3
	$bgcolor[3]      = '#D1BDF3';   // Couleur de l'occurence n° 4
	$bgcolor[4]      = '#ECD887';   // Couleur de l'occurence n° 5
	$bgcolor[5]      = '#ECBDF3';   // Couleur de l'occurence n° 6
	$bgcolor[6]      = '#D1F36C';   // Couleur de l'occurence n° 7
	$bgcolor[7]      = '#D1D8F3';   // Couleur de l'occurence n° 8
	
	$exclure0  = 'a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, un, une, d\', de, de la, du, des, l\', le, la, les, à, au, et, et un, et une, et de, et du, et des, et le, et la, et les, et à, et au, sur, sur le, sur la, dans, dans le, dans la, en, ce, cette, mon, ma, mes, ton, ta, tes, son, sa, ses, je, tu, il, on';
	$exclure1  = 'a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, an, the, on, in, of';
    $hideprint = '';
    $confpage  = 'ALL';
}

if ($regit == 1) { 

    $rech_article = import("rech_article"); 
    $rech_download = import("rech_download");
    $rech_faq= import("rech_faq"); 
    $rech_forum = import("rech_forum"); 
    $rech_livreor = import("rech_livreor");
    $rech_liens = import("rech_liens"); 
    $rech_news= import("rech_news"); 
    $rech_blog= import("rech_blog"); 
    $rech_photo= import("rech_photo"); 
    $rech_agenda = import("rech_agenda"); 
	$rech_archive = import("rech_archive"); 
	$pertmin       = intval(import('pertmin'));
	$pertmin       = ($pertmin < 0)   ? 0   : $pertmin;
	$pertmin       = ($pertmin > 100) ? 100 : $pertmin;
	$pertinencemin = $pertmin;
	$nbrslt        = intval(import('nbrslt'));
	$nbrslt        = ($nbrslt < 10) ? 10 : $nbrslt;
	$resultbypage  = $nbrslt;
	$barcolor      = import('barcol');
	$bargrey       = import('bargr');
	$styleocc[0]   = import('police');
	$styleocc[1]   = import('italic');
	$styleocc[2]   = import('bold');
	$styleocc[3]   = import('underline');
	$styleocc[4]   = import('hightlighted');
	$bgcolor[0]    = import('bgcolor0', 'POST', true, '#FF9999');
	$bgcolor[1]    = import('bgcolor1', 'POST', true, '#CCFF66');
	$bgcolor[2]    = import('bgcolor2', 'POST', true, '#CC99FF');
	$bgcolor[3]    = import('bgcolor3', 'POST', true, '#FFCC66');
	$bgcolor[4]    = import('bgcolor4', 'POST', true, '#CCCCFF');
	$bgcolor[5]    = import('bgcolor5', 'POST', true, '#FFCCCC');
	$bgcolor[6]    = import('bgcolor6', 'POST', true, '#FFFF99');
	$bgcolor[7]    = import('bgcolor7', 'POST', true, '#CCFFFF');
	
	$exclure0     = import('excl0');
	$exclure1     = import('excl1');
	$hideprint    = import('hideprint');
	$confpage     = import('confpage', 'POST', true, '0');
	
	$content = '<?php
/*******************************************************************************
 *   Config Search
 *******************************************************************************
 *   GuppY PHP Script - version 5.0
 *   CeCILL Copyright (C) 2004-2014 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = http://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V5 developed by Lud Bienaimé
 *      with the participation of the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.00 (December 15, 2019) : initial release
 ******************************************************************************/

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

$pertinencemin = '.$pertinencemin.';   // Affiche les résultats de pertinence supérieure à cette valeur
$resultbypage  = '.$resultbypage.';   // Nombre de résultats par page
$barcolor      = stripslashes("'.$barcolor.'");   // Couleur de la barre de pertinence
$bargrey       = stripslashes("'.$bargrey.'");   // Fond de la barre de pertinence
$styleocc[0]   = stripslashes("'.$styleocc[0].'");   // Couleur de la police
$styleocc[1]   = stripslashes("'.$styleocc[1].'");   // Italique
$styleocc[2]   = stripslashes("'.$styleocc[2].'");   // Caractères gras
$styleocc[3]   = stripslashes("'.$styleocc[3].'");   // Souligné
$styleocc[4]   = stripslashes("'.$styleocc[4].'");   // "on"/"" Surligné en couleur
$bgcolor[0]    = stripslashes("'.$bgcolor[0].'");   // Couleur de l\'occurence n° 1
$bgcolor[1]    = stripslashes("'.$bgcolor[1].'");   // Couleur de l\'occurence n° 2
$bgcolor[2]    = stripslashes("'.$bgcolor[2].'");   // Couleur de l\'occurence n° 3
$bgcolor[3]    = stripslashes("'.$bgcolor[3].'");   // Couleur de l\'occurence n° 4
$bgcolor[4]    = stripslashes("'.$bgcolor[4].'");   // Couleur de l\'occurence n° 5
$bgcolor[5]    = stripslashes("'.$bgcolor[5].'");   // Couleur de l\'occurence n° 6
$bgcolor[6]    = stripslashes("'.$bgcolor[6].'");   // Couleur de l\'occurence n° 7
$bgcolor[7]    = stripslashes("'.$bgcolor[7].'");   // Couleur de l\'occurence n° 8

$exclure0      = stripslashes("'.$exclure0.'");
$exclure1      = stripslashes("'.$exclure1.'");
$hideprint     = stripslashes("'.$hideprint.'");
$confpage      = stripslashes("'.$confpage.'");
$rech_article = stripslashes("'.$rech_article.'");   // recherche sur article
$rech_download = stripslashes("'.$rech_download.'"); // recherche sur telechargements
$rech_faq= stripslashes("'.$rech_faq.'");            // recherche sur faq
$rech_forum = stripslashes("'.$rech_forum.'");       // recherche sur forum
$rech_livreor = stripslashes("'.$rech_livreor.'");   // recherche sur livre d\'or
$rech_liens = stripslashes("'.$rech_liens.'");       // recherche sur liens
$rech_news = stripslashes("'.$rech_news.'");         // recherche sur nouvelles
$rech_blog = stripslashes("'.$rech_blog.'");         // recherche sur blog
$rech_photo = stripslashes("'.$rech_photo.'");       // recherche sur photos
$rech_agenda = stripslashes("'.$rech_agenda.'");     // recherche sur agenda
$rech_archive = stripslashes("'.$rech_archive.'");   // recherche sur archives
?>';

	WriteFullDB(CONFIGREP.'searchconfig.inc', $content);
    
    include CONFIG;
    $serviz[24]  = import('serviz24'); // Boîte recherche ON / OFF
    $members[23] = import('members23'); // Zone membre accès boîtes de recherche
    include 'inc/confupdt.inc';

    if ($site[7] == 'on' || PHP700) {
        @ob_flush();
        sleep(PHP700 ? 3 : $site[8]);
        echo '<script>window.location="'.CHEMIN.'admin/admin.php?lng='.$lng.'&pg=search";</script>';
    }
}

$headinc .= '
<link rel="stylesheet" media="screen" href="../inc/colorpicker/css/colorpicker.css" /> 
<script src="../inc/colorpicker/js/colorpicker.js"></script>
';

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1275]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1275], "100%");    

function GetSelector($inputname, $color) { // Palette de couleurs
	return '
			<div>
			  <input class="form-control" id="'.$inputname.'" name="'.$inputname.'" type="text" size="6" value="'.$color.'" 
                style="font:12px Arial;text-align:center;width:76px;border:1px solid #000;border-radius:4px 0 0 4px;float:left;" />
			  <div style="float:left;width:40px;height:30px;vertical-align:top;border:1px solid #000;border-left:none;background-color:'.$color.';padding:-4px 0 4px 0;"></div>
			  <div id="'.$inputname.'div" style="float:left;width:40px;height:30px;border:1px solid #000;border-left:none;background-color:'.$color.';border-radius:0 4px 4px 0;">&nbsp;</div>
			</div>'.
			BeginJavascript()."
			$('#".$inputname."').ColorPicker({
				onSubmit: function(hsb, hex, rgb, el) {
					$(el).val('#' + hex.toUpperCase());
					$(el).ColorPickerHide();
				},
				onChange: function (hsb, hex, rgb) {
					$('#".$inputname."div').css('backgroundColor', '#' + hex);
				},
				onBeforeShow: function () {
					$(this).ColorPickerSetColor(this.value);
				}
			})
			.bind('keyup', function(){
				$(this).ColorPickerSetColor(this.value);
			});".EndJavascript();
}

echo '
<div style="text-align:center">
  <br />'.ToHelp($lng, '&pg=962&mnuid=937&tconfig=0#z2').$admin[1276].'
  <hr />
</div>';

echo '
<br />
<div class="m-auto" style="max-width:600px;">
  <form action="'.CHEMIN.'admin/admin.php?lng='.$lng.'&amp;pg=search&amp;regit=1" method="POST" name="pres">
    <div class="row quest p-0 mb-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
    <fieldset class="m-0">'.legend('<b>'.$admin[1279].'</b>').'
      <div class="table-responsive-md">
      <table class="table" style="max-width:540px;margin:auto;">
	    <colgroup><col width="75%"><col width="25%"></colgroup>
        <tr>
          <td class="pt-2 pb-1 text-left"><label for="serviz24">'.$admin[163].'</label></td>
          <td class="pt-2 text-left">
			<div class="float-left">
			  <input type="checkbox" id="serviz24" name="serviz24"'.Checked($serviz[24] == 'on').' />
			</div>
		  </td>
        </tr>
        <tr>
          <td class="text-left align-middle">'.$admin[1280].'</td>
          <td class="text-left align-middle">
			<div class="float-left">
			  <div class="d-inline-block"><input class="form-control" type="text" name="pertmin" size="1" value="'.$pertinencemin.'"></div>
              <div class="d-inline-block">%</div>
			</div>
            <script>
              $(document).ready(function(){
                $(\'.hpertmin\').popover({
                  title:"'.$admin[1280].'",
                  content:"'.$help[1].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop float-left">&nbsp;
              <a class="hpertmin" title="">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </td>
        </tr>
        <tr>
          <td class="text-left align-middle">'.$admin[1282].'</td>
          <td style="text-align:left;">
			<div class="float-left">
  		      <input class="form-control" type="text" name="nbrslt" size="1" value="'.$resultbypage.'" />
			</div>
            <script>
              $(document).ready(function(){
                $(\'.hnbrslt\').popover({
                  title:"'.$admin[1282].'",
                  content:"'.$help[2].'",
                  trigger:"hover",
                  placement:"auto",
                  html:true
                });
              });
            </script>
            <span class="overpop float-left">&nbsp;
              <a class="hnbrslt" title="">
                <i class="far fa-comment-dots"></i>
              </a>
            </span>
		  </td>
        </tr>
        <tr>
          <td class="text-left align-middle"><label for="hideprint">'.$admin[1531].'</label></td>
          <td class="form-check text-left">
            <input class="form-check-input" type="checkbox" id="hideprint" name="hideprint"'.Checked($hideprint == 'on').' />
		  </td>
        </tr>
        <tr>
          <td class="text-left align-middle">'.$admin[1483].'</td>
          <td style="text-align:left;">
            <select class="form-control" name="confpage">
              <option value="ALL"'.Selected($confpage == 'ALL').'>'.$admin[1363].'</option>';
        foreach ($templates as $key=>$value)
            echo '
              <option value="'.$key.'"'.Selected($confpage != 'ALL' && $confpage == $key).'>'.$key.' - '.$value.'</option>';
        echo '
            </select>
		  </td>
        </tr>
        <tr>
          <td class="text-left align-middle">'.$admin[932].'</td>
          <td style="text-align:left;">
            <select class="form-control" name="members23">';
        $dbgroups = ReadDBFields(GROUPS);
        echo '
            <option value=""> -- '.$admin[1604].' -- </option>
			<option value="all_members"'.Selected('all_members' == $members[23]).'>'.$admin[690].'</option>';
        foreach ($dbgroups as $dbgroup) {
            echo '
            <option value="'.$dbgroup[0].'"'.Selected($dbgroup[0] == $members[23]).'>'.$dbgroup[0].'</option>';
        }
        echo '
            </select>
		  </td>
        </tr>
      </table>
      </div>
	  <br />';	  //

$barlist  = array();
$greylist = array();
$dossier  = opendir(CHEMIN.'admin/inc/img/search');
while ($element = readdir($dossier)) {
	if (is_file(CHEMIN.'admin/inc/img/search/'.$element)) {
		if (strpos($element, 'bar.gif')) {
			$coloroption = substr($element, 0, strlen($element)-7);
			$barlist[$coloroption] = $coloroption;
		} elseif (strpos($element, 'gris.gif')) {
			$greylist[] = substr($element, 0, strlen($element)-8);
		}
	}
}
closedir($dossier);
asort($barlist);
asort($greylist);
$baroptions = '';
foreach ($barlist as $key => $value) {
	if ($key == $barcolor) {
		$baroptions .= '<option value="'.$key.'" selected="selected">'.$key.'</option>';
	} else {
		$baroptions .= '<option value="'.$key.'">'.$key.'</option>';
	}
}
$greyoptions = '';
foreach ($greylist as $key => $value) {
	if ($key == $bargrey) {
		$greyoptions .= '<option value="'.$key.'" selected="selected">'.$admin[1285].$value.'</option>';
	} else {
		$greyoptions .= '<option value="'.$key.'">'.$admin[1285].$value.'</option>';
	}
}
 echo '
 	  <br />
      <fieldset class="m-0">'.legend($admin[1856]).'
        <div class="table-responsive-md">
        <table class="table m-auto" style="max-width:480px;">
          <colgroup><col width="50%"><col width="50%"></colgroup>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_article">'.$admin[1857].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_article" name="rech_article" value="'.TYP_ART.'" '.(($rech_article == TYP_ART) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_download">'.$admin[1858].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_download" name="rech_download" value="'.TYP_DNLOAD.'" '.(($rech_download == TYP_DNLOAD) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_faq">'.$admin[1859].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_faq" name="rech_faq" value="'.TYP_FAQ.'" '.(($rech_faq == TYP_FAQ) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_forum">'.$admin[1860].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_forum" name="rech_forum" value="'.TYP_FORUM.'" '.(($rech_forum == TYP_FORUM) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_livreor">'.$admin[1861].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_livreor" name="rech_livreor" value="'.TYP_GUESTBK.'" '.(($rech_livreor == TYP_GUESTBK) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_liens">'.$admin[1862].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_liens" name="rech_liens" value="'.TYP_LINKS.'" '.(($rech_liens == TYP_LINKS) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_news">'.$admin[1863].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_news" name="rech_news" value="'.TYP_NEWS.'" '.(($rech_news == TYP_NEWS) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_blog">'.$admin[1864].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_blog" name="rech_blog" value="'.TYP_BLOG.'" '.(($rech_blog == TYP_BLOG) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_photo">'.$admin[1865].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_photo" name="rech_photo" value="'.TYP_PHOTO.'" '.(($rech_photo == TYP_PHOTO) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_agenda">'.$admin[1866].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_agenda" name="rech_agenda" value="'.TYP_AGENDA.'" '.(($rech_agenda == TYP_AGENDA) ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="rech_archive">'.$admin[1867].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="rech_archive" name="rech_archive" value="'.TYP_ARCH.'" '.(($rech_archive == TYP_ARCH) ? 'checked="checked"' : '').'>
            </td>
          </tr>
        </table>
        </div>
	  </fieldset>
	  <br />';
echo '
	  <fieldset class="m-0">'.legend($admin[1284]).'
        <div class="table-responsive-md">
        <table class="table m-auto" style="max-width:540px;">
          <colgroup><col span="3"></colgroup>
          <tr>
            <td class="w-35 text-right" style="white-space:nowrap;">
              <select class="form-control w-50 mx-auto" name="barcol" 
                  onchange="images[\'bar\'].src=\''.CHEMIN.'admin/inc/img/search/\'+pres.barcol.options[pres.barcol.selectedIndex].value+\'bar.gif\'">
                '.$baroptions.'
			  </select>
            </td>
            <td class="w-30 text-center" style="text-align:center;white-space:nowrap;">
              <img id="bar" src="'.CHEMIN.'admin/inc/img/search/'.$barcolor.'bar.gif" style="width:33px;height:10px;" />
			  <img id="grey" src="'.CHEMIN.'admin/inc/img/search/'.$bargrey.'gris.gif" style="width:33px;height:10px;" />
            </td>
            <td class="w-35 text-left" style="white-space:nowrap;">
              <select class="form-control w-50 mx-auto" name="bargr" 
                  onchange="images[\'grey\'].src=\''.CHEMIN.'admin/inc/img/search/\'+pres.bargr.options[pres.bargr.selectedIndex].value+\'gris.gif\'">
                '.$greyoptions.'
              </select>
            </td>
          </tr>
        </table>
        </div>
	  </fieldset>
	  <br />
      <fieldset class="m-0">'.legend($admin[1286]).'
        <div class="table-responsive-md">
        <table class="table m-auto" style="max-width:480px;">
          <colgroup><col width="50%"><col width="50%"></colgroup>
		  <tr style="height:48px;">
            <td style="text-align:left;"><br />'.$admin[1287].'</td>
            <td style="text-align:left;vertical-align:top;"><br/>'.GetSelector('police', "$styleocc[0]").'</td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="italic">'.$admin[1288].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="italic" name="italic" value="italic" '.(($styleocc[1] == "italic") ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="bold">'.$admin[1289].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="bold" name="bold" value="bold" '.(($styleocc[2] == "bold") ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="underline">'.$admin[1290].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="underline" name="underline" name="underline" value="underline" '.(($styleocc[3] == "underline") ? 'checked="checked"' : '').'>
            </td>
          </tr>
          <tr style="height: 26px;">
            <td style="text-align:left;"><label for="hightlighted">'.$admin[1291].'</label></td>
            <td class="text-left align-top form-check">
              <input class="mt-2 form-check-input" type="checkbox" id="hightlighted" name="hightlighted" value="on" '.(($styleocc[4] == "on") ? 'checked="checked"' : '').'>
            </td>
          </tr>
        </table>
        </div>
	  </fieldset>
	  <br />
      <fieldset class="m-0">'.legend($admin[1292]).'
        <div class="table-responsive-md">
        <table class="table m-auto" style="max-width:480px;">
          <colgroup><col width="50%"><col width="50%"></colgroup>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 1</td>
			<td style="text-align:left;">'.GetSelector('bgcolor0', $bgcolor[0]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 2</td>
			<td style="text-align:left;">'.GetSelector('bgcolor1', $bgcolor[1]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 3</td>
			<td style="text-align:left;">'.GetSelector('bgcolor2', $bgcolor[2]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 4</td>
			<td style="text-align:left;">'.GetSelector('bgcolor3', $bgcolor[3]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 5</td>
			<td style="text-align:left;">'.GetSelector('bgcolor4', $bgcolor[4]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 6</td>
			<td style="text-align:left;">'.GetSelector('bgcolor5', $bgcolor[5]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 7</td>
			<td style="text-align:left;">'.GetSelector('bgcolor6', $bgcolor[6]).'</td>
		  </tr>
		  <tr style="height:32px;">
		    <td style="text-align:left;">'.$admin[1293].' 8</td>
			<td style="text-align:left;">'.GetSelector('bgcolor7', $bgcolor[7]).'</td>
		  </tr>
	    </table>
        </div>
	  </fieldset>
    </fieldset>
    <div class="row quest p-0 my-2 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
	</div>';
echo '
    <br />
    <fieldset class="m-0">'.legend('<b>'.$admin[1294].'</b>').'
      <div style="text-align:center">'.$admin[1295].'</div>
      <br />
	  <div class="text-center">
	    '.($lang[1] != '' ? ''.$flag1.'' : '').'
        <textarea class="form-control w-95 mx-auto" rows="12" name="excl0">'.stripslashes($exclure0).'</textarea>
	  </div>';
if ($lang[1] != '') {
	echo '
	  <br />
	  <div class="text-center">
	    '.$flag2.'
        <textarea class="form-control w-95 mx-auto" rows="12" name="excl1">'.stripslashes($exclure1).'</textarea>
	  </div>';
}
echo '
    </fieldset>
    <div class="row quest p-0 mt-3 w-100 m-auto">
	  <div class="col-md-6">'.SubmitButton($admin[22], 'self.location.href=\'admin.php?lng='.$lng.'\'', $imggauche, '', 'button').'</div>
      <div class="col-md-6"><div class="float-right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div></div>
    </div>
  </form>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
sec_ban_cfg.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/sec_ban_cfg.inc'
View Content
<?php
/*******************************************************************************
 *   Security Bannishment
 *******************************************************************************
 *   GuppY PHP Script - version 5.0
 *   CeCILL Copyright (C) 2004-2014 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = http://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V5 developed by Lud Bienaimé
 *      with the participation of Jean-Michel Misrachi and the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.20 (October 24, 2024) : Modify détection secuity
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[45] == '') {
        $nomzone = $admin[940];
        include 'access.inc';
        exit();
    }
}

include_once CHEMIN.INCREP.'security.inc';
$cfg = ReadSecurityConfig(BAN_CFG);
	
$xcfg = isset($_POST['xcfg']) ? $_POST['xcfg'] : null;
if (isset($xcfg)) {
    $cfg = $xcfg;
    WriteSecurityConfig(BAN_CFG, $cfg);
	$msg = $admin[1820];
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[997].' '.$admin[1721]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1431], '100%');

echo '
<div class="w-100 m-auto text-align-center" >
<p>'.ToHelp($lng, '&pg=1156&mnuid=937&tconfig=0#z2').'</p>
<p style="text-align:center;">'.$admin[1001].'</p>
<hr />';
echo '
<form name="security" action="admin.php?lng='.$lng.'&amp;pg=sec_ban_cfg" method="post">
  <input type="hidden" name="xcfg[nextid]" value="'.$cfg['nextid'].'" />';
      if (!empty($msg)) {
        echo '
    <div class="alert-success" role="alert"  style="font-weight:bold;text-align:center;">
      <i class="fas fa-file" style="font-size:1.3rem;color:#ba55d3;"></i>&nbsp;
      '.$msg.'
    </div>';
    }
 echo '
	<fieldset>'.legend($admin[1873]).'
		<div style="margin-bottom:12px;">
			<div class="d-inline-block" style="margin-left:10%;"><label for="xcfg[inforparmail]">'.$admin[1874].'</label>
				'.SelectSecurity("xcfg[inforparmail]", $cfg['inforparmail'], $sec_active).'
			</div>
		</div>
	</fieldset>';
echo '
  <fieldset>'.legend($admin[1437]);

    echo '
	<div style="margin-bottom:12px;">
	<div class="d-inline-block" style="margin-left:10%;">'.$admin[1031].'</div>
		<div class="d-inline-block">
			'.SelectSecurity("xcfg[status]", $cfg['status'], $sec_active).'
    </div></div>	
	
	<div style="margin-bottom:12px;">
	<div class="d-inline-block" style="margin-left:10%;">'.$admin[1032].'</div>
		<div class="d-inline-block">
			'.SelectSecurity("xcfg[record]", $cfg['record'], $sec_active).'
    </div></div>

	<div style="margin-bottom:12px;">
	<div class="d-inline-block" style="margin-left:10%;">'.$admin[1033].'</div>
		<div class="d-inline-block">
			'.SelectSecurity("xcfg[retention]", $cfg['retention'], $sec_retention).'
    </div></div>
  </fieldset>';
  if (!isset($xcfg['seuilmaxip'])) $xcfg['seuilmaxip'] = 100;
  if (!isset($cfg['seuilmaxip'])) $cfg['seuilmaxip'] = 100;
echo '
  <fieldset>'.legend($admin[1893]).'	
	<div style="margin-bottom:12px;">
	<div class="d-inline-block" style="margin-left:10%;">'.$admin[1041].'</div>
		<div class="d-inline-block">
			'.SelectSecurity("xcfg[pathlgmessage]", $cfg['pathlgmessage'], $sec_pathlgmessage).'
    </div></div>
	<div style="margin-bottom:12px;">
	<div class="d-inline-block" style="margin-left:10%;">'.$admin[1072].'</div>
		<div class="d-inline-block">
			'.SelectSecurity("xcfg[querylgmessage]", $cfg['querylgmessage'], $sec_querylgmessage).'
    </div></div>
	<div style="margin-bottom:12px;">
	<div class="d-inline-block" style="margin-left:10%;">'.$admin[1894].'</div>
		<div class="d-inline-block">
			'.SelectSecurity("xcfg[seuilmaxip]", $cfg['seuilmaxip'], $sec_seuilmaxip).'
    </div></div>	
  </fieldset>
  <div class="quest" style="padding:2px 20px;">
    <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
    <div style="clear:both"></div>
  </div>
</form>';

echo '
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
sec_ban_counters_ip.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/sec_ban_counters_ip.inc'
View Content
<?php
/*******************************************************************************
 *   Security Bannishment
 *******************************************************************************
 *   GuppY PHP Script - version 5.0
 *   CeCILL Copyright (C) 2004-2014 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = http://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V5 developed by Lud Bienaimé
 *      with the participation of Jean-Michel Misrachi and the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 *  v6.00.20 (October 24, 2024) : Integration counter IP Initial Release
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[45] == '') {
        $nomzone = $admin[940];
        include 'access.inc';
        exit();
    }
}

include_once CHEMIN.INCREP.'security.inc';
$cfg = ReadSecurityConfig(BAN_CFG);
$logsemaine = array_unique(ExploreFileSemaine(BAN_REPCOUNTERS));
$logs = $logsemaine;
$logs = array_reverse($logs);
$log       = import('log');
$tri       = import('tri');
$idpg      = import('idpg');
if (!empty($logs)) {
    $log = in_array($log, $logs) ? $log : $logs[0];
}

$widepage = 'on';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[1896];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1896], '100%');

echo '
<div class="w-100 m-auto text-align-center" >
<p>'.ToHelp($lng, '&pg=1160&mnuid=937&tconfig=0#z2').'</p>
<p style="text-align:center;">'.$admin[557].' '.getIPadress($_SERVER[$site[6] == 'on' ? 'HTTP_X_FORWARDED_FOR' : 'REMOTE_ADDR']).'</p>
<hr />';
if (empty($logs)) {
    echo '
<p style="text-align:center;"><b>'.$admin[1043].'</b></p>';
}
else {
    if (count($logs) > 1) {
        echo '
<div class="w-100 m-auto text-align-center" >
  <form name="security" action="admin.php?lng='.$lng.'&amp;pg=sec_ban_counters_ip" method="post">
	<fieldset style="margin:10px auto;">'.legend($admin[1897]).'
      <div class="d-inline-block" style="text-align:center;">
		  <div style="text-align:center;margin:auto;">
			<select name="log">';
			foreach ($logs as $value) {
				echo '
			  <option value="'.$value.'"'.Selected($log === $value).'>'.$value.'</option>';
			}
			echo '
			</select>
		  </div>
	  </div>
	</fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[1896], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>
</div>';
    }
    if (!empty($log)) 
	{
		$semainechoisi = substr($log, -2);
		$datafilesems = ExploreFileSemainechoisi(BAN_REPCOUNTERS,$semainechoisi);
		$tmpi   = 0;
		$tmp[0] = array();
		$tmp[1] = array();
		$tmp[2] = array();
		for ($i = 0; $i < count($datafilesems); $i++) 
		{
			$tmp[0][$tmpi] = $datafilesems[$i][0];
			$tmp[1][$tmpi] = $datafilesems[$i][1];
			$tmp[2][$tmpi] = $datafilesems[$i][2];
			$tmpi++;
		}
		unset($datafilesems);
		if ($tmpi > 0) {
			$href = CHEMIN.'admin/admin.php?lng='.$lng.'&amp;log='.$log.'&amp;pg=sec_ban_counters_ip';
			switch ($tri) {
			case 'datespam' :
			case '-datespam' :
				$cr = array_multisort($tmp[0], $tri == 'datespam' ? SORT_ASC : SORT_DESC, $tmp[1], $tmp[2]);
				break;
			case 'ipsem' :
			case '-ipsem' :
				$cr = array_multisort($tmp[1], $tri == 'ipsem' ? SORT_ASC : SORT_DESC, $tmp[0], $tmp[2]);
				break;
			case 'compteur' :
			case '-compteur' :
				$cr = array_multisort($tmp[2], $tri == 'compteur' ? SORT_ASC : SORT_DESC, $tmp[0], $tmp[1]);
				break;
			}
		}
		if (empty($idpg)) {
			$idpg = 1;
		}
		else {
			while ($tmpi <= ($idpg - 1)* $serviz[75]) $idpg--;
		}
		if ($tmpi > 0) 
		{
			$navbar = GetNavBar('admin.php?lng='.$lng.'&amp;log='.$log.'&amp;pg=sec_ban_counters_ip&amp;tri='.$tri.'&amp;idpg=', $tmpi, $idpg, $serviz[75]);
			echo $navbar.'
				<form name="fast_actions" id="fast_actions" action="admin.php?lng='.$lng.'&amp;log='.$log.'&amp;idpg='.$idpg.'&amp;pg=sec_ban_counters_ip&amptri='.$tri.'" method="post">
				  <fieldset class="w-100 m-0 p-2">'.legend($admin[1045].substr($log, -2));
			echo '
			<div class="table-responsive-md">
			<table class="table w-100 m-auto table-bordered">';
				$idup     = $tri == 'datespam' 
				  ? '<i class="fas fa-caret-up text-danger align-middle" style="font-size: 1.8rem;"></i>' 
				  : '<i class="fas fa-caret-up align-middle" style="font-size: 1.8rem;"></i>';
				$iddown   = $tri == '-datespam' 
				  ? '<i class="fas fa-caret-down text-danger align-middle" style="font-size: 1.8rem;"></i>' 
				  : '<i class="fas fa-caret-down align-middle" style="font-size: 1.8rem;"></i>';
				$descup   = $tri == 'ipsem' 
				  ? '<i class="fas fa-caret-up text-danger align-middle" style="font-size: 1.8rem;"></i>' 
				  : '<i class="fas fa-caret-up align-middle" style="font-size: 1.8rem;"></i>';
				$descdown = $tri == '-ipsem' 
				  ? '<i class="fas fa-caret-down text-danger align-middle" style="font-size: 1.8rem;"></i>' 
				  : '<i class="fas fa-caret-down align-middle" style="font-size: 1.8rem;"></i>';
				$moddup   = $tri == 'compteur' 
				  ? '<i class="fas fa-caret-up text-danger align-middle align-middle" style="font-size: 1.8rem;"></i>' 
				  : '<i class="fas fa-caret-up align-middle" style="font-size: 1.8rem;"></i>';
				$modddown = $tri == '-compteur' 
				  ? '<i class="fas fa-caret-down text-danger align-middle" style="font-size: 1.8rem;"></i>' 
				  : '<i class="fas fa-caret-down align-middle" style="font-size: 1.8rem;"></i>';
			echo '
				 <tr class="forum">';
			echo '
			<td style="vertical-align:middle;padding:5px;white-space:nowrap;text-align:center;width:15%;">
			  <a href="'.$href.'&amp;tri=datespam" title="'.$admin[1898].'" style="top:-1px;left:1px;"> '.$moddup.' </a>
			  '.$admin[521].'
			  <a href="'.$href.'&amp;tri=-datespam" title="'.$admin[1899].'" style="top:-1px;left:1px;"> '.$modddown.' </a>
			</td>
			<td style="vertical-align:middle;padding:5px;width: 70%;">
			  <a href="'.$href.'&amp;tri=ipsem" title="'.$admin[1900].'" style="top:-1px;left:1px;"> '.$descup.' </a>
			  '.$admin[518].'
			  <a href="'.$href.'&amp;tri=-ipsem" title="'.$admin[1901].'" style="top:-1px;left:1px;"> '.$descdown.' </a>
			</td>
			<td style="vertical-align:middle;padding:5px;white-space:nowrap;text-align:center;width:15%;">
			  <a href="'.$href.'&amp;tri=compteur" title="'.$admin[1902].'" style="top:-1px;left:1px;"> '.$moddup.' </a>
			  '.$admin[1895].'
			  <a href="'.$href.'&amp;tri=-compteur" title="'.$admin[1903].'" style="top:-1px;left:1px;"> '.$modddown.' </a>
			</td>
		  </tr>';
			for ($i = $serviz[75]*($idpg-1); $i < Min($serviz[75]*$idpg, $tmpi); $i++)
			{
				echo '
					<tr '.($i % 2 ? 'class="rep"' : 'class="quest"').'>
						<td style="font-size:0.9em;text-align:center;">'.$tmp[0][$i].'</td>
						<td style="font-size:0.9em;text-align:center;">'.$tmp[1][$i].'</td>
						<td style="font-size:0.9em;text-align:center;">'.$tmp[2][$i].'</td>	
					</tr>';
			}
			echo  $navbar;
		}
        echo '
			</table>
			</fieldset>
			</form>
			<hr />';


    }
}
echo '</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
sec_ban_def.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/sec_ban_def.inc'
View Content
<?php
/*******************************************************************************
 *   Security Bannishment
 *******************************************************************************
 *   GuppY PHP Script - version 5.0
 *   CeCILL Copyright (C) 2004-2014 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = http://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V5 developed by Lud Bienaimé
 *      with the participation of Jean-Michel Misrachi and the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * v6.00.19 (August 26, 2024) : Initial Release and Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[45] == '') {
        $nomzone = $admin[940];
        include 'access.inc';
        exit();
    }
}

?>
<style type="text/css">
	<!--
	.fa-trash{ /* Couleur pour action supprimer */
		color: red;
		width: 16px;
		height: 16px;
	
	}
	.fa-trash:hover { /* Couleur pour action supprimer */
		color: green;
		width: 16px;
		height: 16px;
	
	}
	.fa-edit	{ /* Couleur pour modif */
		color: #BDD3AC;
		width: 16px;
		height: 16px;
	
	}
	.fa-edit:hover	{ /* Couleur pour modif */
		color: blue;
		width: 16px;
		height: 16px;
	
	}
	.fa-eye-slash { /* Couleur pour action désactiver */
		color: red;
		width: 16px;
		height: 16px;
	
	}
	.fa-eye-slash:hover { /* Couleur pour action désactiver */
		color: blue;
		width: 16px;
		height: 16px;
	
	}
	.fa-eye {           /* Couleur pour action activer */
		color: green;
		width: 16px;
		height: 16px;
	
	}
	.fa-eye:hover {     /* Couleur pour action activer */
		color: blue;
		width: 16px;
		height: 16px;
	
	}
	.fa-exclamation-triangle {           /* Couleur pour action déactiver/activer */
		color: red;
		width: 16px;
		height: 16px;
	
	}
	.fa-exclamation-triangle:hover {     /* Couleur pour action déactiver/activer */
		color: green;
		width: 16px;
		height: 16px;
	
	}
-->
</style>
<?php
include_once CHEMIN.INCREP.'security.inc';
include_once CHEMIN.INCREP.'functions.php';
$cfg = ReadSecurityConfig(BAN_CFG);
$def = ReadSecurityDatas(BAN_DEF);
$actiondemande = import('actiondemande');

$act  = isset($_POST['act'])  ? $_POST['act']  : (isset($_GET['act']) ? $_GET['act'] : 'list');
$id   = isset($_GET['id'])    ? $_GET['id']    : null;
$xdef = isset($_POST['xdef']) ? $_POST['xdef'] : null;
$urlpardefaut = 'error403.php';
$errpardefaut = '403';
switch ($act) {
case 'add' :
    $xdef = array('id'     => $cfg['nextid'], 
	              'status' => 'on', 
				  'ip'     => '',
				  'host'   => '',
				  'pseudo' => '',
				  'email'  => '',
				  'path'   => '',				  
				  'agent'  => '',
				  'mots'   => '',
				  'msg'    => $errpardefaut,
				  'url'    => $urlpardefaut);
    $act  = 'edit';
	$actiondemande = 'add';
    break;
case 'edit' :
    $xdef = $def[$id];
    $act  = 'edit';
    break;
case 'change' :
	$rechdefsel = false;
	if ($actiondemande == 'add')
	{
		$rechdefsel = SelectBANReadSecurityDatas(trim($xdef['ip']), trim($xdef['host']));
	}
	if (!$rechdefsel)
	{
		$tmp1 = trim($xdef['ip']).trim($xdef['pseudo']).trim($xdef['email']).trim($xdef['host']).trim($xdef['path']).trim($xdef['agent']).trim($xdef['mots']);
		$tmp2 = trim($xdef['msg']).trim($xdef['url']);
		if (empty($tmp1)) {
			$msg = $admin[1029];
			$act = 'edit';
		}
		elseif (empty($tmp2)) {
			$msg = $admin[1030];
			$act = 'edit';
		}
		else {
			$msg = '';
			if ($xdef['url'] == '')  $xdef['url'] = $urlpardefaut;
			if ($xdef['msg'] == '')  $xdef['msg'] = $errpardefaut;
			$def[$xdef['id']] = $xdef;
			if ($cfg['nextid'] == $xdef['id']) {
				$cfg['nextid']++;
			}
			WriteSecurityConfig(BAN_CFG, $cfg);
			WriteSecurityDatas(BAN_DEF, $def);
			$act = 'list';
		}
	}
	else
	{
		echo '
		<p style="text-align:center;"><i class="far fa-meh-rolling-eyes"></i><b>'.$admin[1870].'</b></p>';
		 $act = 'list';
	}			
    break;
case 'status' :
    $def[$id]['status'] = $def[$id]['status'] == 'on' ? '' : 'on';
    WriteSecurityDatas(BAN_DEF, $def);
    $act = 'list';
    break;
case 'delete' :
    unset($def[$id]);
    WriteSecurityDatas(BAN_DEF, $def);
    $act = 'list';
    break;
case 'list' :
default :
}

if ('list' == $act) {
    $widepage = 'on';
}
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[996].' '.$admin[1721]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1430], '100%');

echo '
<div class="w-100 m-auto text-align-center" >
<p>'.ToHelp($lng, '&pg=780&mnuid=1157&tconfig=0#z2').'</p>
<p style="text-align:center;">'.$admin[1000].'</p>
<hr />';

if ('list' == $act) {
    echo '
<p style="text-align:center;">
  <a href="admin.php?lng='.$lng.'&amp;pg=sec_ban_def&amp;act=add">'.$admin[1006].'</a>
</p>

  <fieldset>'.legend($admin[1430]);
    if (0 == count($def)) {
        echo '
    <p>'.$admin[1008].'</p>';
    } else {
        echo '
    <br />
    <table style="border:1px;width:100%;">
      <tr class="forum" style="text-align:center;">
        <td rowspan="2"> ID </td>
        <td colspan="7">'.$admin[1009].'</td>
        <td colspan="2">'.$admin[1010].'</td>
        <td rowspan="2">'.$admin[1011].'</td>
      </tr>
      <tr class="forum" style="text-align:center;">
        <td style="width:18%;">'.$admin[1012].'</td>
        <td style="width:10%;">'.$admin[517].'</td>
        <td style="width:10%;">'.$admin[1014].'</td>
        <td style="width:18%;">'.$admin[1015].'</td>
        <td style="width:18%;">'.$admin[1040].'</td>
        <td style="width:18%;">'.$admin[1016].'</td>
		<td style="width:18%;">'.$admin[1118].'</td>
        <td style="width:18%;">'.$admin[1017].'</td>
        <td style="width:18%;">'.$admin[1018].'</td>
      </tr>
';
        $i = 0;
		$flagediter = '<i class="far fa-file-alt" alt="'.$admin[1025].'" title="'.$admin[1025].'"></i>'; // Icone devant le champs de modification

		$flagdelete = '<i class="fas fa-trash align-middle" alt="'.$admin[1028].'" titre="'.$admin[1028].'" style="vertical-align:middle; font-size: 1.2rem;"></i>'; // suppression
        foreach ($def as $id=>$def1) {
			if (!isset($def[$id]['status'])) $def[$id]['status'] = '';
			$txt = $def[$id]['status'] == 'on' ? $admin[1027] : $admin[1026];
			$flagactiver = '<i class="far fa-eye-slash align-middle " alt="'.$txt.'" titre="'.$txt.'" style="vertical-align:middle; font-size: 1.2rem;"></i>'; // desactiver		
			$flagdesactiver = '<i class="far fa-eye" alt="'.$txt.'" titre="'.$txt.'" style="vertical-align:middle; font-size: 1.2rem;"></i>'; // desactiver         
			$class = ++$i % 2 == 0 ? ' class="quest"' : ' class="rep"';
            $img = $def[$id]['status'] == 'on' ? $flagdesactiver : $flagactiver;
			if (!isset($xdef['path'])) $xdef['path'] = '';
			if (!isset($xdef['pseudo'])) $xdef['pseudo'] = '';
			if (!isset($xdef['email'])) $xdef['email'] = '';
            echo '
      <tr'.$class.'>
        <td style="text-align:center;">'.$id.'</td>
        <td style="text-align:center;">'.(empty($def1['ip'])? '': CutField($def1['ip'])).'</td>
        <td style="text-align:center;">'.(empty($def1['pseudo'])? '': CutField($def1['pseudo'])).'</td>
        <td style="text-align:center;">'.(empty($def1['email'])? '': CutField($def1['email'])).'</td>
        <td style="text-align:center;">'.(empty($def1['host'])? '': CutField($def1['host'])).'</td>
		<td style="text-align:center;">'.(empty($def1['path'])? '': CutField($def1['path'])).'</td>
        <td style="text-align:center;">'.(empty($def1['agent'])? '': CutField($def1['agent'])).'</td>
        <td style="text-align:center;">'.(empty($def1['mots'])? '': CutField($def1['mots'])).'</td>
        <td style="text-align:center;">'.CutField($def1['msg']).'</td>
        <td style="text-align:center;">'.CutField($def1['url']).'</td>

        <td style="white-space:nowrap; text-align:center;">
          <a href="admin.php?lng='.$lng.'&amp;pg=sec_ban_def&amp;act=edit&amp;id='.$id.'" title="'.$admin[1025].'">
   		  '.$flagediter.'
          </a>
          <a href="admin.php?lng='.$lng.'&amp;pg=sec_ban_def&amp;act=status&amp;id='.$id.'" title="'.$txt.'">
            '.$img.'
          </a>
          <a href="admin.php?lng='.$lng.'&amp;pg=sec_ban_def&amp;act=delete&amp;id='.$id.'" title="'.$admin[1028].'">
            '.$flagdelete.'
          </a>
        </td>
      </tr>

';
        }
    }
    echo '
    </table>
    <br />
  </fieldset>
';
}
elseif ('edit' == $act) {
    echo '<div style="margin-left:40%;">
  <div class="d-inline-block" style="text-align:center;">
    <a href="admin.php?lng='.$lng.'&amp;pg=sec_ban_def&amp;act=list">'.$admin[1023].'</a> ||
    <a href="admin.php?lng='.$lng.'&amp;pg=sec_ban_def&amp;act=add">'.$admin[1006].'</a>
  </div></div>
  <form name="security" action="admin.php?lng='.$lng.'&amp;pg=sec_ban_def" method="post">
    <input type="hidden" name="act" value="change" />
	<input type="hidden" name="actiondemande" value="'.$actiondemande.'" />
    <input type="hidden" name="xdef[id]" value="'.$xdef['id'].'" />
    <fieldset>'.legend($admin[1431].' <em>(ID='.$xdef['id'].')</em>');
    if (!empty($msg)) {
        echo '
   <div class="alert-error" role="alert"  style="font-weight:bold;text-align:center;">
      <i class="fadm-off" style="font-size:1.3rem;"></i>&nbsp;
      '.$msg.'
    </div>';
    }
	if (!isset($xdef['path'])) $xdef['path'] = '';
	if (!isset($xdef['status'])) $xdef['status'] = '';
	if (!isset($xdef['pseudo'])) $xdef['pseudo'] = '';
	if (!isset($xdef['email'])) $xdef['email'] = '';
	
    echo '
		<div style="margin-bottom:12px;">
			<div class="d-inline-block" style="margin-left:10%;"><label for="xdef[status]">'.$admin[1024].'</label>
				<input class="form-check-input" type="checkbox" id="xdef[status]" name="xdef[status]"'.Checked($xdef['status']).' />
    </div></div>
    <fieldset>'.legend($admin[1009]).'
	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[ip]">'.$admin[1012].'</label>
			<input type="text" class="form-control" id="xdef[ip]" name="xdef[ip]" value="'.trim($xdef['ip']).'" size="50" />
    </div></div>

	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[pseudo]">'.$admin[517].'</label>
			<input type="text" class="form-control" id="xdef[pseudo]" name="xdef[pseudo]" value="'.trim($xdef['pseudo']).'" size="30" />
    </div></div>
	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[email]">'.$admin[1014].'</label>
			<input type="text" class="form-control" id="xdef[email]" name="xdef[email]" value="'.trim($xdef['email']).'" size="30" />
    </div></div>
	
	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[host]">'.$admin[1015].'</label>
			<input type="text" class="form-control" id="xdef[host]" name="xdef[host]" value="'.trim($xdef['host']).'" size="50" />
    </div></div>
	<div style="margin-bottom:12px;">
		<div class="form-group" style="margin-left:10%;"><label for="xdef[path]">'.$admin[1040].'</label>
			<textarea class="form-control" id="xdef[path]" name="xdef[path]" rows="3" max-rows="6"/>'.trim($xdef["path"]).'</textarea>
    </div></div>
	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[agent]">'.$admin[1016].'</label>
			<input type="text" class="form-control" id="xdef[agent]" name="xdef[agent]" value="'.trim($xdef['agent']).'" size="50" />
    </div></div>

	<div style="margin-bottom:12px;">
		<div class="form-group" style="margin-left:10%;"><label for="xdef[mots]">'.$admin[1118].'</label>
				<textarea class="form-control" id="xdef[mots]" name="xdef[mots]" rows="3" max-rows="6"/>'.trim($xdef["mots"]).'</textarea>
				 <br />
			<em>'.$admin[1119].'</em>
		  <br /><br />
    </div></div>
    </fieldset>
    <fieldset>'.legend($admin[1010]).'
	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[msg]">'.$admin[1017].'</label>
			<input type="text" class="form-control" id="xdef[msg]" name="xdef[msg]" value="'.trim($xdef['msg']).'" size="50" />
    </div></div>
	
	<div style="margin-bottom:12px;">
		<div class="form-group d-inline-block" style="margin-left:10%;"><label for="xdef[url]">'.$admin[1018].'</label>
			<input type="text" class="form-control" id="xdef[url]" name="xdef[url]" value="'.trim($xdef['url']).'" size="50" />
    </div></div>';	
    echo   $admin[1039].'
    </fieldset>
    <div class="form-group quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>';
}

echo '
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
sec_ban_log.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/sec_ban_log.inc'
View Content
<?php
/*******************************************************************************
 *   Security Bannishment
 *******************************************************************************
 *   GuppY PHP Script - version 5.0
 *   CeCILL Copyright (C) 2004-2014 by Laurent Duveau
 *   Initiated by Laurent Duveau and Nicolas Alves
 *   Web site = http://www.freeguppy.org/
 *   e-mail   = guppy@freeguppy.org
 *   V5 developed by Lud Bienaimé
 *      with the participation of Jean-Michel Misrachi and the GuppY Team
 *******************************************************************************
 *   Latest Changes :
 * vv6.00.20 (October 24, 2024) : modify script
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[45] == '') {
        $nomzone = $admin[940];
        include 'access.inc';
        exit();
    }
}

include_once CHEMIN.INCREP.'security.inc';
$cfg = ReadSecurityConfig(BAN_CFG);
$logs = ExploreFile(BAN_REP);
$logs = array_reverse($logs);

$log = isset($_POST['log']) ? $_POST['log'] : '';
if (!empty($logs)) {
    $log = in_array($log, $logs) ? $log : $logs[0];
}

$widepage = 'on';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[1432];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1432], '100%');

echo '
<div class="w-100 m-auto text-align-center" >
<p>'.ToHelp($lng, '&pg=1160&mnuid=937&tconfig=0#z2').'</p>
<p style="text-align:center;">'.$admin[557].' '.getIPadress($_SERVER[$site[6] == 'on' ? 'HTTP_X_FORWARDED_FOR' : 'REMOTE_ADDR']).'</p>
<hr />';

if (empty($logs)) {
    echo '
<p style="text-align:center;"><b>'.$admin[1043].'</b></p>';
}
else {
    if (count($logs) > 1) {
        echo '
<div class="w-100 m-auto text-align-center" >
  <form name="security" action="admin.php?lng='.$lng.'&amp;pg=sec_ban_log" method="post">
	<fieldset style="margin:10px auto;">'.legend($admin[1044]).'
      <div class="d-inline-block" style="text-align:center;">
		  <div style="text-align:center;margin:auto;">
			<select name="log">';
			foreach ($logs as $value) {
				echo '
			  <option value="'.$value.'"'.Selected($log === $value).'>'.substr($value, 0, -4).'</option>';
			}
			echo '
			</select>
		  </div>
	  </div>
	</fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[1046], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>
</div>';
    }
    if (!empty($log)) {
        $datas = ReadDbFields(BAN_REP.$log);
        $datas = array_reverse($datas);
        echo '
<fieldset>'.legend($admin[1045].substr($log, 0, -4)).'
<table style="width:100%;">
  <tr class="forum2" style="text-align:center;white-space:nowrap;">
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[521].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1040].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1012].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1041].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[517].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1014].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1038].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1015].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[1016].' </td>
    <td style="font-weight:bold;padding:2px 4px;"> '.$admin[560].' </td>
	<td style="font-weight:bold;padding:2px 4px;"> '.$admin[986].' </td>
  </tr>';
        $i = 0;
        foreach ($datas as $data) {
            if (!isset($data[1])) continue;
            echo '
  <tr '.( $i++ % 2 ? 'class="rep"' : 'class="quest"').'>
    <td style="font-size:0.9em;padding:0 2px;text-align:center;">'.FormatDateSec(str_replace(' ', '', $data[0])).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[1]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[2]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[3]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[4]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[5]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[6]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[7]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[8]).'</td>
    <td style="font-size:0.9em;padding:0 2px;">'.CutField($data[9]).'</td>
	<td style="font-size:0.9em;padding:0 2px;">'.CutField(substr(rawurldecode(htmlspecialchars($data[10])), 1)).'</td>																				  
  </tr>';
        }
        echo '
</table>
</fieldset>
<hr />';
    }
}
echo '</div>';
btable();
include CHEMIN.'admin/bpage.inc';
?>
sec_ban_logguppy.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/sec_ban_logguppy.inc'
View Content
<?php
/*******************************************************************************
 *   Read Admin Sec_ban_logguppy
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2023 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.20 (October 24, 2024) : Modify détection
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[35] == '') {
        $nomzone = $admin[553];
        include 'access.inc';
        exit();
    }
}
	include CHEMIN.INCREP.'security.inc';
function SelectDBFieldsByIDSpam($Fields,$id) {
    $DataDB = array();
    foreach ($Fields as $row) {
        if ($row[6] == $id) {
            $DataDB[] = $row;
        }
    }
    return $DataDB;
}
function DeleteDBFieldsByIDSpam($amsglog,$id) {
	$datjourl = new DateTime('now');
	$dateheureminiutesecl = $datjourl->format('Y_m_d');
	$nomficlog = CHEMIN.'data/log/DeleteDBFieldsByIDSpam'.'_'.$dateheureminiutesecl.'.log';
	$DataDB = array();
	foreach ($amsglog as $row) {
        if ($row[6] != $id) {
            $DataDB[] = $row;
        }
    }
	return $DataDB;
}
function comparenomhost3asc($a, $b) {
   if ($a[3] == $b[3]) {
    return 0;
   }
   return ($a[3] < $b[3]) ? -1 : 1;
}
function CutField_log($field, $max = 15, $more = '...') {
	global $charset;
    $len = strlen($field);
    if ($len > $max) {
        return '<acronym title="'.htmlentities($field, ENT_COMPAT, $charset).'" class="cursorHelp">'.substr($field, 0, $max).$more.'</acronym>';
    } else {
        return $field;
    }
}
$datjourl = new DateTime('now');
$dateheureminiutesecl = $datjourl->format('Y_m_d');
$nomficlog = CHEMIN.'data/log/sec_ban_logoguppy'.'_'.$dateheureminiutesecl.'.log';

// file_put_contents($nomficlog, date('Y-m-d H:i:s'). "\Debut sec_ban\n", FILE_APPEND | LOCK_EX);

$messageinfo = '';
$action = import('action');
$act = import('act');
if ($act != 1) $act = 0;
else
	$act = import('act');

$widepage = 'on';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.$admin[1872];
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1872], '100%');
echo '
<p style="text-align:center;">
  '.ToHelp($lng, '&pg=1018&mnuid=937&tconfig=0#z2').'<div class="mt-5 pt-2">'.$admin[557].' '.getIPadress($site[6] == 'on' ? (isset($_SERVER['HTTP_X_FORWARDED_FOR'])? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']): $_SERVER['REMOTE_ADDR']).'</div>
</p>';


if ($act == 1)
{
	if (isset($_POST["inputnoligne"]))
		$inputnoligne     = import('inputnoligne', 'POST');
	$urlpardefaut = 'error403.php';
	$errpardefaut = '403';
	$cfg = ReadSecurityConfig(BAN_CFG);
	if ('on' == $cfg['status'])
	{
		$def = ReadSecurityDatas(BAN_DEF);
		$xdef = array('id'     => $cfg['nextid'], 
				  'status' => 'on', 
				  'ip'     => '',
				  'pseudo' => '',
				  'email'  => '',				  
				  'host'   => '',
				  'path'   => '',
				  'agent'  => '',
				  'mots'   => '',
				  'msg'    => '',
				  'url'    => '');
		$listhost = array();
		$nomhostsupprime = '';
		$amsglog = ReadDBFields(DBLOGBOOKSPAM);
		$datjourl = new DateTime('now');
		$dateheureminiutesecl = $datjourl->format('Y_m_d');
		$nomficlog = CHEMIN.'data/log/Secbanlogguppy'.'_'.$dateheureminiutesecl.'.log';
		foreach($inputnoligne as $key => $value) 
		{
			$idlogip = $value;
			$rechdefselip = ''; // IP retour '' ou nom
			$rechdefselhost = ''; // Hote retour '' ou nom
			$rechdefselpath = ''; // $_SERVER['SCRIPT_NAME'] retour '' ou nom
			$rechdefselagent = ''; // $_SERVER['HTTP_USER_AGENT'] retour '' ou nom
			$rechdefselmot = '';  // $_SERVER['QUERY_STRING'] retour '' ou nom
			$selectamsglogbook = SelectDBFieldsByField($amsglog,9,$idlogip);
		if ($selectamsglogbook[0][1] != '')
				$rechdefselip = SelectBANReadSecurityDatas($selectamsglogbook[0][1], ''); // IP retour '' ou nom
			if ($rechdefselip == '' && $selectamsglogbook[0][3] != '') 
					$rechdefselhost = Select5BANReadSecurityDatas($selectamsglogbook[0][3]); // Hote retour '' ou nom
			if ($rechdefselhost == '' && $selectamsglogbook[0][7] != '')
				$rechdefselpath = Select6BANReadSecurityDatas($selectamsglogbook[0][7]); // $_SERVER['SCRIPT_NAME'] retour '' ou nom
			if ($rechdefselpath == '' && $selectamsglogbook[0][6] != '')
				$rechdefselagent = Select8BANReadSecurityDatas($selectamsglogbook[0][6]); // $_SERVER['HTTP_USER_AGENT'] retour '' ou nom
			if ($rechdefselmot == '' && $selectamsglogbook[0][8] != '')
				$rechdefselmot = Select7BANReadSecurityDatas($selectamsglogbook[0][8]);  // $_SERVER['QUERY_STRING'] retour '' ou nom
			
			if ($rechdefselip == '' )
			{
				if ($xdef['url'] == '')  $xdef['url'] = $urlpardefaut;
				if ($xdef['msg'] == '')  $xdef['msg'] = $errpardefaut;
				$host = mb_strtolower(@gethostbyaddr(getIPadress($_SERVER[$site[6] == 'on' ? 'HTTP_X_FORWARDED_FOR' : 'REMOTE_ADDR'])), $charset);
				$values = explode(",", $xdef['host']);
				$xdef['id'] = $cfg['nextid'];
				$xdef['ip'] = $selectamsglogbook[0][1];
				if ($selectamsglogbook[0][1] != $selectamsglogbook[0][3])
					$xdef['host'] = $selectamsglogbook[0][3];
				else
					$xdef['host'] = '';
				$xdef['path'] = '';
				$xdef['agent'] = '';
				$xdef['mots'] = '';
				$def[$xdef['id']] = $xdef;
				if ($cfg['nextid'] == $xdef['id']) {
					$cfg['nextid']++;
				}
			
				WriteSecurityConfig(BAN_CFG, $cfg);
				WriteSecurityDatas(BAN_DEF, $def);
				$amsglogbook = ReadDBFields(DBLOGBOOKSPAM);
				$amsglogbook = DeleteDBFieldsByIDSpam($amsglogbook, $idlogip);
				
				WriteDBFields(DBLOGBOOKSPAM, $amsglogbook);
			
				$act = 2;
				$messageinfo = $admin[1882];
				
				$nomhostsupprime = $selectamsglogbook[0][3];
				$amsglogbook = ReadDBFields(DBLOGBOOKSPAM);
				
			}
			else
			{
				$amsglogbook = ReadDBFields(DBLOGBOOKSPAM);
				$amsglogbook = DeleteDBFieldsByIDSpam($amsglogbook, $idlogip);
				$messageinfo = $admin[1881];
			}
		}
	}
	else
	{
		echo '
		<p style="text-align:center;"><i class="far fa-meh-rolling-eyes"></i><b> '.$admin[1880].'</b></p>';
	}


}
if ($act == 0)
{
	$amsglogbook = ReadDBFields(DBLOGBOOK);
	usort($amsglogbook, "comparenomhost3asc");
	if (empty($amsglogbook)) {
		$act = 4;
	}
	if ($act == 0)
	{
        SetChmod(DBLOGBOOKSPAM);		
		@unlink(DBLOGBOOKSPAM);
		SetChmod(DBCOUNTERLOGBK);		
		@unlink(DBCOUNTERLOGBK);
		$amsglog = array();
		$indligne = 0;
		$indenreng = 1;
		if (!file_exists(DBCOUNTERLOGBK))
		{
		   $compteur = 1;
		}
		else
		{
			$compteur = ReadCounter(DBCOUNTERLOGBK);
		}
		foreach($amsglogbook as $lignelogbook) 
		{
			if ($lignelogbook[5] != '')
			{
				if (!isset($lignelogbook[9])) $lignelogbook[9] = '';
				$lignelogbook[9] = $compteur;
				if (isset($lignelogbook[3]))
				{
					$lignelogbook[3] = htmlspecialchars($lignelogbook[3], ENT_QUOTES, $charset);
					$lignelogbook[1] = htmlspecialchars($lignelogbook[1], ENT_QUOTES, $charset);
				}
				$amsglog[] = $lignelogbook;
				$compteur++;
			}
			
// suppression des XSS dans logbook.dtb
// dans la partie no 5 de ce logbook
			$motsrecherches = array('alert');
			$values = array('alert');
//           $values = explode(',', $motsrecherches)
			$rejet = false;			
			for ($ijrech = 0; $ijrech < count($values); $ijrech++)
			{
				if (!$rejet)
				{	
					$rejet1 = substr_count($lignelogbook[5], $values[$ijrech]);	
					if ($rejet1 != 0) 
					{
						$rejet = true;
					}
				}
			}
			if (!$rejet) {
				$arraylogbook[]  = $lignelogbook;

		
			}
		}
		WriteDBFields(DBLOGBOOKSPAM, $amsglog);
		WriteCounter(DBCOUNTERLOGBK,$compteur);
		//	Ecriture du fichier pour revoir les blocages à faire
		sort($arraylogbook);
		WriteDBFields(DBLOGBOOK, $arraylogbook);
		$compteurlogspams = CountDBFields(DBLOGBOOKSPAM);
		 $act = 2;
		  echo '
<p style="text-align:center;"><i class="far fa-meh-rolling-eyes"></i><b>'.$admin[1868].'</b></p>';
	}
}
if ($act == 4) 
{
    echo '
<p style="text-align:center;"><i class="far fa-meh-rolling-eyes"></i><b>'.$admin[558].'</b></p>';
}

else {
	$amsglog = ReadDBFields(DBLOGBOOKSPAM);
	usort($amsglog, "comparenomhost3asc");
	$ijaffichage = 0;
	$nomhost = '';
	$iphostadresse = '';
	$nbrehostidentique = 0;
	$arraynbrevaluehost = array();
	$arraylogbook = array();
	$ij = 0;
	for ($ijaffichage = 0; $ijaffichage < count($amsglog); $ijaffichage++)
	{
		if (isset($amsglog[$ijaffichage][3]))
		{

			if ($amsglog[$ijaffichage][3] != '')
			{
				if ($iphostadresse == '')
				{	
					$iphostadresse = $amsglog[$ijaffichage][1];
					$nomhost       = $amsglog[$ijaffichage][3];
					
				}
				$rechdefip = '';
				$rechdefnamehost = '';
				$rechdefselpath = '';
				$rechdefselmots = '';
				$datjourl = new DateTime('now');
				$dateheureminiutesecl = $datjourl->format('Y_m_d');
				$nomficlog = CHEMIN.'data/log/Select6BANReadSecurityDatas'.'_'.$dateheureminiutesecl.'.log';				
				if ($amsglog[$ijaffichage][1] != '')
				{
					$rechdefip = SelectBANReadSecurityDatas($amsglog[$ijaffichage][1], '');	
				}
				
				if ($amsglog[$ijaffichage][3] != '')
				{
					$rechdefnamehost = Select5BANReadSecurityDatas($amsglog[$ijaffichage][3]); //	
				}
				if ($amsglog[$ijaffichage][7] != '')
				{
					$amsglogrechpath = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][7]));
//					file_put_contents($nomficlog, 'Ip: '.$amsglog[$ijaffichage][1].' info 3: '.$amsglog[$ijaffichage][3].' rechdefselpath avant rech Phrase ou mot: '.$amsglogrechpath."\n", FILE_APPEND | LOCK_EX);
					$rechdefselpath = Select6BANReadSecurityDatas($amsglogrechpath); // rech path	
//					file_put_contents($nomficlog, 'Ip: '.$amsglog[$ijaffichage][1].' info 3: '.$amsglog[$ijaffichage][3].' rechdefselpath: '.$rechdefselpath. "\n", FILE_APPEND | LOCK_EX);
				}
				if ($amsglog[$ijaffichage][8] != '')
				{
					$amsglogrechmot = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][8]));
					file_put_contents($nomficlog, 'info 3: '.$amsglog[$ijaffichage][3].' rechdefselmots avant rech mot: '.$amsglogrechmot."\n", FILE_APPEND | LOCK_EX);
					$rechdefselmots = Select7BANReadSecurityDatas($amsglogrechmot); // rech mots
					file_put_contents($nomficlog, 'info 3: '.$amsglog[$ijaffichage][3].' rechdefselmots: '.$rechdefselmots. "\n", FILE_APPEND | LOCK_EX);
					
				}
				if ($nomhost == $amsglog[$ijaffichage][3])
				{
					$nbrehostidentique++;
					$arraynbrevaluehost[$ij][0]  = $amsglog[$ijaffichage][0]; // Date
					$arraynbrevaluehost[$ij][1]	 = $amsglog[$ijaffichage][1]; // IP
					$arraynbrevaluehost[$ij][2]  = $amsglog[$ijaffichage][2]; // 
					$arraynbrevaluehost[$ij][3]  = $amsglog[$ijaffichage][3]; // Host
					$arraynbrevaluehost[$ij][4]  = $amsglog[$ijaffichage][4]; // Browser
					$arraynbrevaluehost[$ij][5]  = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][5])); // Path
					$arraynbrevaluehost[$ij][6]  = $amsglog[$ijaffichage][6]; // Log2
					$arraynbrevaluehost[$ij][7]  = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][7])); // $_SERVER['SCRIPT_NAME'];
					$arraynbrevaluehost[$ij][8]  = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][8])); // $_SERVER['QUERY_STRING'];
					$arraynbrevaluehost[$ij][9]  = $amsglog[$ijaffichage][9]; // compteur
					$arraynbrevaluehost[$ij][10]  = $nbrehostidentique;   // nbre de Hosts
					$arraynbrevaluehost[$ij][11] = $rechdefnamehost;     
					$arraynbrevaluehost[$ij][12] = $rechdefselpath;
					$arraynbrevaluehost[$ij][13] = $rechdefselmots;
					$arraynbrevaluehost[$ij][14] = $rechdefip;
				}
				else
				{
					$nbrehostidentique = 1 ;
					$ij++;
					$arraynbrevaluehost[$ij][0]  = $amsglog[$ijaffichage][0];
					$arraynbrevaluehost[$ij][1]  = $amsglog[$ijaffichage][1];
					$arraynbrevaluehost[$ij][2]  = $amsglog[$ijaffichage][2];
					$arraynbrevaluehost[$ij][3]  = $amsglog[$ijaffichage][3];
					$arraynbrevaluehost[$ij][4]  = $amsglog[$ijaffichage][4];
					$arraynbrevaluehost[$ij][5]  = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][5])); // Path
					$arraynbrevaluehost[$ij][6]  = $amsglog[$ijaffichage][6];
					$arraynbrevaluehost[$ij][7]  = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][7])); // $_SERVER['SCRIPT_NAME'];
					$arraynbrevaluehost[$ij][8]  = rawurldecode(htmlspecialchars($amsglog[$ijaffichage][8])); // $_SERVER['QUERY_STRING'];
					$arraynbrevaluehost[$ij][9]  = $amsglog[$ijaffichage][9]; // compteur
					$arraynbrevaluehost[$ij][10] = $nbrehostidentique;   // nbre de Hosts
					$arraynbrevaluehost[$ij][11] = $rechdefnamehost;     
					$arraynbrevaluehost[$ij][12] = $rechdefselpath;
					$arraynbrevaluehost[$ij][13] = $rechdefselmots;
					$arraynbrevaluehost[$ij][14] = $rechdefip;
					$iphostadresse = $amsglog[$ijaffichage][1];
					$nomhost       = $amsglog[$ijaffichage][3];
				}
			}
		}
	}
//	Ecriture du fichier DBLOGBOOKSPAM pour revoir les blocages à faire
	sort($arraynbrevaluehost);
	WriteDBFields(DBLOGBOOKSPAM, $arraynbrevaluehost);

	$adressseipconnecte = getIPadress($site[6] == 'on' ? (isset($_SERVER['HTTP_X_FORWARDED_FOR'])? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']): $_SERVER['REMOTE_ADDR']);

if ($messageinfo != '') 
		echo '<p style="text-align:center;"><i class="far fa-meh-rolling-eyes"></i><b> '.$messageinfo.'</b></p>';
 echo '
   <form name="security" action="admin.php?lng='.$lng.'&amp;pg=sec_ban_logguppy" method="post">
       <input type="hidden" name="act" value="1" />
<fieldset >'.legend(sprintf($admin[1380], min($configlogNB, count($arraynbrevaluehost)))).'
  <div class="table-responsive">
  <table class="table table-hover table-bordered w-100">
    <tr lass="bg-primary" style="text-align:center;height:2.5em;">
	  <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[1877].'</td>
      <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[521].' </td>
      <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[518].' </td>
	  <td class="align-middle font-weight-bold py-1 px-1 4px">'.$admin[1879].'</td>
      <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[986].' </td>
	  <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[1883].'</td>
	  <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[1888].'</td>
	  <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[1884].'</td>
      <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[561].' </td>
	  <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[1885].'</td>
      <td class="align-middle font-weight-bold py-1 px-1 4px ">'.substr($admin[562], 0, 4).'...</td>
      <td class="align-middle font-weight-bold py-1 px-1 4px ">'.$admin[1886].'</td>
    </tr>';
    $nnav = array('netscape', 'msie', 'mozilla', 'da', 'opera', 'icab',
        'konqueror', 'robot', 'unknown', 'wget', 'avant browser', 'crazy',
        'maxthon', 'lynx', 'safari', 'seamonkey', 'psp', 'ps3', 'wii',
        'firefox', 'flock', 'iceweasel', 'chrome', 'camino', 'dillo',
        'element', 'epiphany', 'galeon', 'k-meleon', 'kazehakase', 'minifield'
        );
    $serviz[85] .= @$serviz[85][@strlen($serviz[85])] != '/' ? '/' : '';
    for ($i = count($arraynbrevaluehost)-1; $i >= 0; $i--) {
		if (isset($arraynbrevaluehost[$i][3])) {
			$imgflag = substr($arraynbrevaluehost[$i][3], 1 + strrpos($arraynbrevaluehost[$i][3], '.'));
			if (!CheckDB1Field(CHEMIN.'inc/lang/flags.inc', $imgflag, 0)) {
				$imgflag = 'unknown';
			}
		}
        else
            $imgflag = 'unknown';
        $xurl = str_replace('&', '&amp;', $arraynbrevaluehost[$i][2]);
        $xurl = empty($xurl) ? '&nbsp;' : '&nbsp;<a style="font-weight:normal;" href="'.$xurl.'" target="_blank" title="'.$xurl.'">'.CutField_log($xurl, 55).'</a>';
        $IP   = substr($arraynbrevaluehost[$i][1], 0, 18).(mb_strlen($arraynbrevaluehost[$i][1]) > 15 ? ' ...' : '');
		$IPsansubstr  = $arraynbrevaluehost[$i][1];
        echo '
    <tr '.( $i % 2 ? 'class="rep"' : 'class="quest"').'">
	  <td class="align-middle p-2" style="font-size:0.9em">';
	  	if (!isset($arraynbrevaluehost[$i][11]))
			$arraynbrevaluehost[$i][11] =  '';
		if (!isset($arraynbrevaluehost[$i][12]))
			$arraynbrevaluehost[$i][12] =  '';
		if (!isset($arraynbrevaluehost[$i][13]))
			$arraynbrevaluehost[$i][13] = '';
		if (!isset($arraynbrevaluehost[$i][14]))
			$arraynbrevaluehost[$i][14] = '';
		$cherchcaracteerror = substr_count($arraynbrevaluehost[$i][7], 'error');
		$cherchbotgoogle = substr_count($arraynbrevaluehost[$i][3], 'google-');
		$cherchbotgoogle2 = substr_count($arraynbrevaluehost[$i][3],'crawl-');
		$cherchbotgoogle = $cherchbotgoogle + $cherchbotgoogle2;
		if ($arraynbrevaluehost[$i][11] == '' && $arraynbrevaluehost[$i][12] == '' && $arraynbrevaluehost[$i][13] == '' && $arraynbrevaluehost[$i][14] == '' 
		&& $cherchbotgoogle == 0 && $cherchcaracteerror == 0 && $adressseipconnecte != $IPsansubstr)
		{	
			echo '<div class="inline-block">
				<input type="checkbox" class="btn-check" name="inputnoligne[]" value="'.$arraynbrevaluehost[$i][9].'" >'.' '.$arraynbrevaluehost[$i][9].'
			</div>';
				
		}
		else
		{
			echo '<div class="inline-block"> 
				<INPUT type="checkbox" class="btn-check" name="inputnoligne[]" disabled value="'.$arraynbrevaluehost[$i][9].'" >'.' '.$arraynbrevaluehost[$i][9].'
			</div>';
		}
		
		echo '
			</td>
			<td class="align-middle p-2 text-center" style="font-size:0.9em;">'.FormatDateSec($arraynbrevaluehost[$i][0]).'</td>
			<td class="align-middle p-2 text-center" style="font-size:0.9em;">
			<a href="'.$serviz[85].$arraynbrevaluehost[$i][1].'" title="'.$arraynbrevaluehost[$i][1].'" target="_blank">'.$IP.'</a>
			</td>
			<td class="bg-warning align-middle" style="font-size:0.9em;padding:0 2px;text-align:center;">';
				echo $arraynbrevaluehost[$i][14];
			echo '
			</td>
			<td class="align-middle p-2" style="font-size:0.9em;">'.(isset($arraynbrevaluehost[$i][7]) ? CutField_log($arraynbrevaluehost[$i][7], 55) : '').'</td>';
		echo '<td class="bg-warning align-middle" style="font-size:0.9em;padding:0 2px;text-align:center;">';
				echo $arraynbrevaluehost[$i][12];
		echo '
			</td>	
			<td class="align-middle p-2" style="font-size:0.9em;">'.(isset($arraynbrevaluehost[$i][8]) ? CutField_log($arraynbrevaluehost[$i][8], 55) : '').'</td>
			<td class="bg-warning align-middle" style="font-size:0.9em;padding:0 2px;text-align:center;">';
				echo $arraynbrevaluehost[$i][13];
		echo '
			</td>
			<td class="align-middle p-2" style="font-size:0.9em;">'.(isset($arraynbrevaluehost[$i][3]) ? CutField_log($arraynbrevaluehost[$i][3], 20) : '').'</td>
			<td class="bg-warning align-middle" style="font-size:0.9em;padding:0 2px;text-align:center;">';
				echo $arraynbrevaluehost[$i][11];
		echo '
			</td>
			<td class="align-middle p-2 text-center" style="font-size:0.9em;">
				<i class="flg-'.$imgflag.'" title="'.$imgflag.'"></i>
			</td>
			<td class="bg-warning align-middle" style="font-size:0.9em;padding:0 2px;text-align:center;">';
			if (isset($arraynbrevaluehost[$i][10]))
				echo $arraynbrevaluehost[$i][10];
			else
				echo '';
			echo '
		  </td>
		</tr>';
    }
    echo '
  </table>
  </div>
</fieldset>
    <div class="form-group quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[1871], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
</form>
<hr />';
}

btable();
include CHEMIN.'admin/bpage.inc';
?>
snmenu.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/snmenu.inc'
View Content
<?php
/*******************************************************************************
 *   Social Networks menu
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[50] == '') {
        $nomzone = $admin[336];
        include 'access.inc';
        exit();
    }
}

$regit  = import('regit');
$act    = import('act');
$coders = import('rscode', 'POST', false);

if ($regit == 1) {
$mettre = "<?php
\$coders = stripslashes('".addslashes($coders)."');
?>";
	WriteFullDB(CONFIGREP.'sncode.inc', $mettre);
}
include CONFIGREP.'sncode.inc';

################################################################################
// code pour les services
if($act == 1) {
	$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[348]);
	include CHEMIN.'admin/hpage.inc';
	if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
	if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
    htable($admin[348], '100%');
    echo '
  <p style="text-align:center;">'.ToHelp($lng, '&pg=1046&mnuid=937&tconfig=0#z2').$admin[352].'</p>
  <hr />
  <div class="w-100 m-auto" style="max-width:480px;">
    <form name="members" action="admin.php?lng='.$lng.'&amp;pg=snmenu&amp;act=1" method="post">
      <input type="hidden" name="regit" value="1" />
      <br />
      <div class="table-responsive-md">
	  <table class="table m-auto border-0">
		<tr><td style="text-align:center;"><b>'.$admin[348].'</td></tr>
        <tr>
          <td style="text-align:center;">
            <textarea name="rscode" class="w-100" style="max-width:470px;" rows="6">'.stripslashes($coders).'</textarea>
          </td>
        </tr>
	  </table>
      </div>
	  <br />
	  <div class="quest" style="padding:2px 20px;">
		<div style="float:right">'.SubmitButton($admin[38], '', '', $imgdroite).'</div>
		<div style="clear:both"></div>
	  </div>
	</form>
  </div>';
}
btable();
include CHEMIN.'admin/bpage.inc';
?>
socnet.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/socnet.inc'
View Content
<?php
/*******************************************************************************
 *   Social networks
 *******************************************************************************
 *   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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[50] == '') {
        $nomzone = $admin[336];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_SOCNET;
$bname     = 1;
$bemail    = 0;
$bcat      = 0;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 1;
$qformonly = 0;
$qtitle    = $admin[361];
$qintro    = '<br />'.$admin[362].ToHelp($lng, '&pg=1048&mnuid=937&tconfig=0#z2').(empty($form) ? $admin[223] : '');
$qseeall   = $admin[363];
$qwrite    = $admin[365];
$qcat      = '';
$qtitre    = $admin[396];
$qcontenu  = $admin[1231];
$qnouveau  = $admin[456];

include 'inc/admin.inc';
?>
statscfg.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/statscfg.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Statistiques
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[32] == '') {
        $nomzone = $admin[212];
        include 'access.inc';
        exit();
    }
}

$regit = import("regit");
if ($regit == 1) {
    $xstatscfg['Y'] = isset($_POST['statscfg']['Y']) ? 'on' : '';
    $xstatscfg['M'] = isset($_POST['statscfg']['M']) ? 'on' : '';
    $xstatscfg['D'] = isset($_POST['statscfg']['D']) ? 'on' : '';
    $xstatscfg['NBY'] = $_POST['statscfg']['NBY'];
    if (!is_numeric($xstatscfg['NBY']) && $xstatscfg['NBY'] < 0) $xstatscfg['NBY'] = 1;
	$statscfg['Y']= $xstatscfg['Y'];
	$statscfg['M']= $xstatscfg['M'];
	$statscfg['D']= $xstatscfg['D'];
	$statscfg['NBY']= $xstatscfg['NBY'];	
    include 'confupdt.inc';
}

include CHEMIN.'inc/statcalc.inc';
$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[980]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[980], '100%');
if (isset($xstatscfg['Y']))
	$statscfg['Y']= $xstatscfg['Y'];
if (isset($xstatscfg['M']))
	$statscfg['M']= $xstatscfg['M'];
if (isset($xstatscfg['D']))
	$statscfg['D']= $xstatscfg['D'];
if (isset($xstatscfg['NBY']))
	$statscfg['NBY']= $xstatscfg['NBY'];
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1014&mnuid=937&tconfig=0#z2').$admin[981].'</p>
<hr />';

echo '
<div class="w-100 m-auto" style="max-width:560px;">
  <form name="statraz" action="admin.php?lng='.$lng.'&amp;pg=statscfg" method="post">
  <input type="hidden" name="regit" value="1";
	<fieldset style="">'.legend($admin[974]).'<br />
	  <div style="margin-bottom:12px;">
		<div class="d-inline-block" style="margin-left:10%;"><label for="statscfg[Y]">'.$admin[982].'</label></div>
		<div class="d-inline-block"><input class="ml-2" type="checkbox" id="statscfg[Y]" name="statscfg[Y]"'.Checked($statscfg['Y']).' value="'.$statscfg['Y'].'" /></div>
	  </div>
	  <div style="margin-bottom:12px;">
		<div class="d-inline-block" style="margin-left:10%"><label for="statscfg[M]">'.$admin[983].'</label></div>
		<div class="d-inline-block"><input class="ml-2" type="checkbox" id="statscfg[M]" name="statscfg[M]"'.Checked($statscfg['M']).' value="'.$statscfg['M'].'" /></div>
	  </div>
	  <div style="margin-bottom:12px;">
		<div class="d-inline-block" style="margin-left:10%;"><label for="statscfg[D]">'.$admin[984].'</label></div>
		<div class="d-inline-block"><input class="ml-2" type="checkbox" id="statscfg[D]" name="statscfg[D]"'.Checked($statscfg['D']).' value="'.$statscfg['D'].'"/></div>
	  </div>
	  <div style="margin-bottom:12px;">
		<div class="d-inline-block" style="margin-left:10%;">'.$admin[985].'</div>
		<div class="d-inline-block">
		  <select class="ml-2 form-control" name="statscfg[NBY]">
			<option value="1"'.Selected(1 == $statscfg['NBY']).'>1</option>
			<option value="2"'.Selected(2 == $statscfg['NBY']).'>2</option>
			<option value="3"'.Selected(3 == $statscfg['NBY']).'>3</option>
			<option value="4"'.Selected(4 == $statscfg['NBY']).'>4</option>
			<option value="5"'.Selected(5 == $statscfg['NBY']).'>5</option>
		  </select>
		</div>
	  </div>
	</fieldset>
	<div class="quest" style="padding:2px 20px;">
	  <div style="float:right">'.SubmitButton($admin[66], '', '', $imgdroite).'</div>
	  <div style="clear:both"></div>
	</div>
  </form>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
statsprg.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/statsprg.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Statistiques
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[32] == '') {
        $nomzone = $admin[212];
        include 'access.inc';
        exit();
    }
}

$purge = import('purge');
$mper  = import('mper', 'POST', FALSE);

if ($purge == 1) {
    if (is_string($mper)) {
        $mper = array($mper);
    }
    foreach ($mper as $item) {
        $tmp = explode(',', $item);
        $xper = $tmp[0];
        $xfile = isset($tmp[1]) ? $tmp[1] : '';
        if ('current' == $xper) {
            $dbh = InitDBlog(1);
            WriteDBFields(DBLOGH,$dbh);
            $dbd = InitDBlog(24);
            WriteDBFields(DBLOGD,$dbd);
            $dbm = InitDBlog(31);
            WriteDBFields(DBLOGM,$dbm);
            $dby = InitDBlog(12);
            WriteDBFields(DBLOGY,$dby);
        } elseif (!empty($xfile)) {
            DestroyDBFile(OLDSSTATSREP.$xfile);
        }
    }
}
include CHEMIN.'inc/statcalc.inc';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[978]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[978], '100%');

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1012&mnuid=937&tconfig=0#z2').$admin[979].'</p>
<hr />';


echo '
<div class="w-100 m-auto" style="max-width:280px;">
  <form name="statraz" action="admin.php?lng='.$lng.'&amp;pg=statsprg" method="post">
    <input type="hidden" name="purge" value="1" />
    <fieldset>'.legend($admin[216]).'  
    <p style="text-align:center;"><b>'.$admin[1723].'</b></p>
    <p style="text-align:center;">
      <select class="form-control" name="mper[]" multiple="multiple" size="10">
        <option value="current">'.$admin[1726].'</option>';
$foptions = ListStatsFiles();
if (!empty($foptions)) {
    echo '
        <optgroup label="'.$admin[1727].'">';
    foreach ($foptions as $name => $value) {
    echo '
        <option value="'.$value.'">'.$name.'</option>';
    }
    echo '
        </optgroup>';
}
echo '
      </select>
    </p>
    <p style="text-align:center;"><b>'.$admin[26].'</b> '.$admin[48].'</p>
    </fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div style="float:right">'.SubmitButton($admin[218], '', '', $imgdroite).'</div>
      <div style="clear:both"></div>
    </div>
  </form>
</div>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
statsvw.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/statsvw.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Statistiques
 *******************************************************************************
 *   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.19 (December 15, 2024) : Tohelp modify and views statistics
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[32] == '') {
        $nomzone = $admin[212];
        include 'access.inc';
        exit();
    }
}

include CHEMIN.'inc/statcalc.inc';
$topmess  = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[976]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[976], '100%');

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=1010&mnuid=937&tconfig=0#z2').$admin[977].'</p>
<hr />';

echo '
<fieldset>'.legend($admin[219]);
if (strpos($endurl, '/admin/') !== false) include_once CHEMIN.INCREP.'lang/'.$lng.'-web'.INCEXT;
include CHEMIN.'inc/statshow.inc';
echo '
</fieldset>';

btable();
include CHEMIN.'admin/bpage.inc';
?>
think.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/think.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Thinkings
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2024 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[28] == '') {
        $nomzone = $admin[6];
        include 'access.inc';
        exit();
    }
}

$form      = import('form');

$qtype     = TYP_THINK;
$bname     = 1;
$bemail    = 1;
$bcat      = 0;
$btitre    = 1;
$bcontenu  = 1;
$bnouveau  = 0;
$qformonly = 0;
$qtitle    = $admin[40];
$qintro    = '<p style="text-align:center;">'.ToHelp($lng, '&pg=1026&mnuid=937&tconfig=0#z2').'</p>'.$admin[224].(empty($form) ? $admin[223] : '');
$qseeall   = $admin[41];
$qwrite    = $admin[42];
$qcat      = '';
$qtitre    = $admin[43];
$qcontenu  = $admin[44];
$qnouveau  = '';

include 'inc/admin.inc';
?>
tinymsg.js
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/tinymsg.js'
View Content
/*
    Members tinymsg Javascript for members - GuppY PHP Script -
      Web site = http://www.freeguppy.org/
      e-mail   = info@freeguppy.org

 *   Latest Changes :
 * v6.00.19 (August 26, 2024) : correction 
*/
  function AddSmiley1(zoop) {
  if (document.selection) {
    document.membmsg.msg1.focus();
    var sel = document.selection.createRange();
    sel.text = zoop;
	}
	else {
    document.membmsg.msg1.focus();
    document.membmsg.msg1.value=document.membmsg.msg1.value+zoop;
  }
    document.membmsg.msg1.focus();
 }
  function format1(f) {
  if (document.selection) {
    var str = document.selection.createRange().text;
    document.membmsg.msg1.focus();
    var sel = document.selection.createRange();
    sel.text = '[' + f + ']' + str + '[\/' + f + ']';
    document.membmsg.msg1.focus();
    return;
  }
  else if (navigator.product == "Gecko" && navigator.productSub >= 20030210) {
    var startPos = document.membmsg.msg1.selectionStart;
    var endPos = document.membmsg.msg1.selectionEnd;
    var chaine = document.membmsg.msg1.value;
    document.membmsg.msg1.value = chaine.substring(0, startPos) + '[' + f + ']' + chaine.substring(startPos, endPos) + '[\/' + f + ']' + chaine.substring(endPos, chaine.length);
    document.membmsg.msg1.focus();
    return;
  }
  else {
    var chaine = document.nmsg1r.msg1.value;
    document.membmsg.msg1.value = chaine + '[' + f + '] [\/' + f + ']';
    document.membmsg.msg1.focus();
    return;
	}
}
  function dolink1(f) {
  if (document.selection) {
     var str = document.selection.createRange().text;
     document.membmsg.msg1.focus();
     var sel = document.selection.createRange();
     sel.text = '[l]' + f + str + '[\/l]';
     document.membmsg.msg1.focus();
     return;
  }
  else if (navigator.product == "Gecko" && navigator.productSub >= 20030210) {
     var startPos = document.membmsg.msg1.selectionStart;
     var endPos = document.membmsg.msg1.selectionEnd;
     var chaine = document.membmsg.msg1.value;
     document.membmsg.msg1.value = chaine.substring(0, startPos) + '[l]' + f + chaine.substring(startPos, endPos) + '[\/l]' + chaine.substring(endPos, chaine.length);
     document.membmsg.msg1.focus();
     return;
  }
  else {
      var chaine = document.membmsg.msg1.value;
      document.membmsg.msg1.value = chaine + '[l]' + f + '[\/l]';
      document.membmsg.msg1.focus();
      return;
	}
}
  function AddSmiley2(zoop) {
  if (document.selection) {
    document.membmsg.msg2.focus();
    var sel = document.selection.createRange();
    sel.text = zoop;
	}
	else {
    document.membmsg.msg2.focus();
    document.membmsg.msg2.value=document.membmsg.msg2.value+zoop;
  }
    document.membmsg.msg2.focus();
 }
  function format2(f) {
  if (document.selection) {
    var str = document.selection.createRange().text;
    document.membmsg.msg2.focus();
    var sel = document.selection.createRange();
    sel.text = '[' + f + ']' + str + '[\/' + f + ']';
    document.membmsg.msg2.focus();
    return;
  }
  else if (navigator.product == "Gecko" && navigator.productSub >= 20030210) {
    var startPos = document.membmsg.msg2.selectionStart;
    var endPos = document.membmsg.msg2.selectionEnd;
    var chaine = document.membmsg.msg2.value;
    document.membmsg.msg2.value = chaine.substring(0, startPos) + '[' + f + ']' + chaine.substring(startPos, endPos) + '[\/' + f + ']' + chaine.substring(endPos, chaine.length);
    document.membmsg.msg2.focus();
    return;
  }
  else {
    var chaine = document.membmsg.msg2.value;
    document.membmsg.msg2.value = chaine + '[' + f + '] [\/' + f + ']';
    document.membmsg.msg2.focus();
    return;
	}
}
  function dolink2(f) {
  if (document.selection) {
     var str = document.selection.createRange().text;
     document.membmsg.msg2.focus();
     var sel = document.selection.createRange();
     sel.text = '[l]' + f + str + '[\/l]';
     document.membmsg.msg2.focus();
     return;
  }
  else if (navigator.product == "Gecko" && navigator.productSub >= 20030210) {
     var startPos = document.membmsg.msg2.selectionStart;
     var endPos = document.membmsg.msg2.selectionEnd;
     var chaine = document.membmsg.msg2.value;
     document.membmsg.msg2.value = chaine.substring(0, startPos) + '[l]' + f + chaine.substring(startPos, endPos) + '[\/l]' + chaine.substring(endPos, chaine.length);
     document.membmsg.msg2.focus();
     return;
  }
  else {
      var chaine = document.membmsg.msg2.value;
      document.membmsg.msg2.value = chaine + '[l]' + f + '[\/l]';
      document.membmsg.msg2.focus();
      return;
	}
}
tinymsg.php
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/tinymsg.php'
View Content
<?php
/*******************************************************************************
 *   Admin general tinymsg
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2024 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.19 (August 26, 2024) : correction
 ******************************************************************************/

header('Pragma: no-cache');
define('CHEMIN', '../../');
include CHEMIN.'admin/includes.inc';
CreateDir(TEMPREP);

if (FileDBExist('../'.REDACREP.$userprefs[1].INCEXT)) {
    $wri = $userprefs[1];
    include('../'.REDACREP.$wri.INCEXT);
    $mdp = md5($drtuser[38]);
}
else {
    $wri = 'admin';
    include(CHEMIN.'admin/mdp.php');
}
$admcookie = isset($_COOKIE[ADMP_COOKIE]) ? $_COOKIE[ADMP_COOKIE] : '';
$strlen    = substr($admcookie, 0, 2);
if (empty($admcookie) || substr($admcookie], 2, intval($strlen)) != abs(crc32($mdp))) {
    die('Procédure non autorisée -- illegal process');
}

$lsn    = import('lsn');
$redige = import('redige');

if (!isset($lsn)) {
    die('Illegal action');
}

$dbusers = array();
$j = 0;
$file_users = opendir(MSGREP);
while ($nomfichier = readdir($file_users)) {
    if ('.dtb' == $nomfichier) {
        @unlink(MSGREP.$nomfichier);
        continue;
    }
    if (substr($nomfichier,-3) == 'dtb' && $nomfichier != $userprefs[1].DBEXT) {
        $dbusers[$j][0] = str_replace(substr($nomfichier,-4), '', $nomfichier);
        $j++;
    }
}
closedir($file_users);
@sort($dbusers);

echo '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />
<title>'.$admin[691].'</title>
'.JavascriptFile(CHEMIN.'inc/hpage.js').'
</head>
<body style="overflow: hidden;margin:5px;">
<fieldset>
<br />
<p style="text-align:center;">'.$admin[692].'</p>
<p style="text-align:center;">'.Min($lsn+1,count($dbusers)).' / '.count($dbusers).' '.$admin[516].'</p>';

if (FileDBExist(MSGREP.$userprefs[1].DBEXT)) {
    $dbmsg = ReadDBFields(MSGREP.$userprefs[1].DBEXT);
}
if ($redige == 1) {
    include(TEMPREP.'sendtinymsg.inc');
    if($tinymsg2 != '') {
        $tinymsgsend = $tinymsg1.'<br /><hr /><br />'.$tinymsg2;
    }
    else {
        $tinymsgsend = $tinymsg1;
    }
    $dbmsg = array();
    $dbmsg[0] = $admin[690];
    $dbmsg[1] = GetCurrentDateTime();
    $dbmsg[2] = RemoveConnector(stripslashes($tinymsgsend));
    $dbmsg[3] = 'lu';
    $dbmsg[4] = 'send';
    $dbmsg[5] = RemoveConnector(stripslashes($ancienmsg));
    $dbmsg[6] = $anciendate;
    $dbmsg[7] = $userprefs[8];
    AppendDBFields(MSGREP.$userprefs[1].DBEXT,$dbmsg);
}
if ($lsn < count($dbusers)) {
    include(TEMPREP.'sendtinymsg.inc');
    if($tinymsg2 != '') {
        $tinymsgsend = $tinymsg1.'<br /><hr /><br />'.$tinymsg2;
    }
    else {
        $tinymsgsend = $tinymsg1;
    }
    $dbmsg = array(
        $userprefs[1],
        GetCurrentDateTime(),
        RemoveConnector(stripslashes($tinymsgsend)),
        'new',
        '',
        RemoveConnector(stripslashes($ancienmsg)),
        $anciendate,
        $userprefs[8]);
    AppendDBFields(MSGREP.$dbusers[$lsn][0].DBEXT,$dbmsg);
    $lsn++;
    $nextstep = 'PopupWindow(\'tinymsg.php?lng='.$lng.'&lsn='.$lsn.'\',\'tinymsg\',400,250,\'no\',\'no\');';
} else {
    echo '
<hr />
<p style="text-align:center;"><b>'.$admin[693].'</b></p>
<br />';
    $nextstep = '';
    unlink(TEMPREP.'sendtinymsg.inc');
}
echo '
</fieldset>';
if ($nextstep != '') {
    echo BeginJavascript().$nextstep.EndJavascript();
}
echo '
</body>
</html>';
?>
update.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/update.inc'
View Content
<?php
/*******************************************************************************
 *   Admin Technicals Information
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2024 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.19 (August 26, 2024) : Tohelp modify
 ******************************************************************************/

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

if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[48] == '') {
        $nomzone = $admin[904];
        include 'access.inc';
        exit();
    }
}

$version           = array();
$version['actual'] = trim(MP_VERSION);
$version['url']    = 'https://guppyland.org/update.txt';
$version['ok']     = '';
$load_ok           = FALSE;
$lines             = array();

if (ini_get('allow_url_fopen')) {
	$lines = @file($version['url']);
	$load_ok = TRUE;
}
elseif ($curl = curl_init($version['url'])) {
	$timeout = 5; // set to zero for no timeout
	curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
	curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true);
	$version_content = curl_exec($curl);
	curl_close($curl);
	if ($version_content != FALSE) {
		$lines   = explode("\n", $version_content);
		$load_ok = TRUE;
	}
}
else {
	$version['errors'] = $admin[898];
}

if ($load_ok) {
	$version['latest']   = @trim($lines[0]);
	$version['previous'] = @trim($lines[2]);
    $version['note']     = $lng == $lang[0] ? @trim($lines[6]) : @trim($lines[7]);
    $version['cur'] = str_replace('-', '.0', $version['actual']);
    $version['lat'] = str_replace('-', '.0', $version['latest']);
    $version['pre'] = str_replace('-', '.0', $version['previous']);
    $acur = explode('.', $version['cur']);
    $alat = explode('.', $version['lat']);
    $apre = explode('.', $version['pre']);
    $an   = max(count($acur), count($alat), count($apre));
    if ($an > count($alat)) $version['lat'] .= '.00';
    if ($an > count($acur)) $version['cur'] .= '.00';
    if ($an > count($apre)) $version['pre'] .= '.00';
    $ncur = intval(str_replace('.', '', $version['cur']));
    $npre = intval(str_replace('.', '', $version['pre']));
    $nlat = intval(str_replace('.', '', $version['lat']));
    $rpre = intval(substr(str_replace('.', '', $version['pre']), 0, 3));
    $rlat = intval(substr(str_replace('.', '', $version['lat']), 0, 3));
    $cmp  = version_compare($version['cur'], $version['lat']);
    $cmp  = $ncur == $nlat ? 0 : $cmp;
	switch ($version['latest']){
	case '':
		$version['errors'] = $admin[899];
		break;
	default:
		switch ($cmp) {
		case -1 :
			$reco1 = '';
			$reco2 = '';
			$reco3 = '';
			if ($acur[0] < $alat[0]) {
				$reco3 = $admin[1273];
			} else {
                if ((($ncur - $npre) == 0 || ($rlat - $rpre) == 1) && ($npre - $ncur) < 100) $reco1 = $admin[1273]; else $reco2 = $admin[1273];
			}
			$version['ok'] = '
			  <span style="color:green;">'.
			    $admin[900].'<br />'.
			    $admin[901].' '.$version['latest'].' '.$admin[902].' '.trim($lines[1]).'
			  </span><br /><br />'.
			  $admin[1271].'
			  <ul>
				<li><a href="'.trim($lines[4]).'" target="_blank" title="'.$admin[1269].'">'.$admin[1269].'</a> '.$reco1.'</li>
				<li><a href="'.trim($lines[5]).'" target="_blank" title="'.$admin[1270].'">'.$admin[1270].'</a> '.$reco2.'</li>
				<li><a href="'.trim($lines[3]).'" target="_blank" title="'.$admin[1272].$version['latest'].'">'.$admin[1272].$version['latest'].'</a> '.$reco3.'</li>
			  </ul>';
			break;
		case 0 :
			$version['ok'] = $admin[903];
			break;
		case 1 :
			$version['ok'] = $admin[1274];
			break;
		}
	}
}
elseif (empty($version['errors'])) {
	$version['errors'] = $admin[898];
}

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[1266]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[1266], '100%');
echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=942&mnuid=937&tconfig=0#z2').'</p>
<div style="padding:8px; width:480px; margin:auto; text-align:left;">
  <fieldset>'.legend($admin[904]).'
	<ul>
	  <li>GuppY '.$version['actual'].'</li>
	  <li>';
	if ($version['ok'] != '') {
		echo $version['ok'];
	}
	else {
		echo '<span style="color:red;">'.$version['errors'].'</span>';
	}
    echo '</li>
	</ul>';
	if ($cmp == -1 && $version['note'] != '') {
		echo '
    <ul style="margin: 0 6px;">
      <li>'.$version['note'].'</li>
    </ul>';
	}
    echo '
  </fieldset>
</div>';

btable();
include CHEMIN.'admin/bpage.inc' ;
?>
upload.inc
wget 'https://sme10.lists2.roe3.org/guppy/admin/inc/upload.inc'
View Content
<?php
/*******************************************************************************
 *   Upload / Delete files
 *******************************************************************************
 *   GuppY PHP Script - version 6.0
 *   CeCILL Copyright (C) 2004-2024 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.19 (August 26, 2024) : Tohelp modify, and security type img
 ******************************************************************************/

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

$rep    = import('rep');
$newrep = import('newrep');
$del    = import('del');
$actionfichier = import('actionfichier');

// Liste des répertoires où l'upload est autorisé
$list_baserep = array('file', 'img', 'pages', 'photo', 'save', 'skins');

// Extensions non autorisées
$deniedExtFileUpload = array('.php','.inc','.cmd','.sh','.ini','.dat','.bat','.txt','.css','.js', '.html', '.htm', '.xml', '.phtml');						 
if (is_file(REDACREP.$userprefs[1].INCEXT)) {
    include REDACREP.$userprefs[1].INCEXT;
    if ($drtuser[36] == '') {
        $nomzone = $admin[171];
        include 'access.inc';
        exit();
    }
}

//Fonction pour contrôler et corriger le nom d'un répertoire ou d'un fichier
function cleanName($name,$up=false) {
	$nameclean = trim($name);
	$nameclean = str_replace(' ','_',$nameclean);
	$nameclean = str_replace('à','a',$nameclean);
	$nameclean = preg_replace('![éèê]!','e',$nameclean);
	$nameclean = preg_replace('![îï]!','i',$nameclean);
	$nameclean =($up)? preg_replace('![^-a-zA-Z0-9_\.]!','',$nameclean) : preg_replace('![^-a-zA-Z0-9_]!','',$nameclean);
	return $nameclean;
}
// Fonctions d'exploration récursive des répertoires
function lister_sousrepertoires($dir){
    $r = $dir.' ';
    $h = opendir(CHEMIN.$dir);
    while ($f = readdir($h)) {
        if (is_dir(CHEMIN.$dir.'/'.$f) && ($f[0] != '.'))
            $r .= lister_sousrepertoires($dir.'/'.$f).' ';
    }
    closedir($h);
    return trim($r);
}

function lister_repertoires($list){
    $r = '';
    for($i=0; $i<count($list); $i++){
        if (is_dir(CHEMIN.$list[$i])) {
            $r .= ' '.lister_sousrepertoires($list[$i]);
        }
    }
    return explode(' ', trim($r));
}

if (empty($rep)) {
    $rep = 'file';
}

/// DELETE FILE
if (!empty($del) && $actionfichier == 2) {
    SetChmod(CHEMIN.$rep.'/'.$del);
    @unlink(CHEMIN.$rep.'/'.$del);
}

/// CREATE DIRECTORY
if (!empty($newrep)) {
    if (stristr($newrep, 'script') !== false) {
        echo BeginJavascript().'
alert("'.$admin[987].'");
history.back();'.EndJavascript();
    } else {
        $tmp = explode('/', $rep);
        if (in_array($tmp[0], $list_baserep)) {
            $subreps = explode('/', $newrep);
            if (!in_array('..', $tmp) && !in_array('..', $subreps)) {
                $path = CHEMIN.$rep.'/';
                foreach ($subreps as $subrep) {
                    if (!is_dir($path.$subrep)) {
                        if (Makedir($path.$subrep)) {
                            SetChmod($path.$subrep);
                            @copy(CHEMIN.'admin/inc/index.php', $path.$subrep.'/index.php');
                        } else {
                            $msg = $path.$subrep.' '.$admin[20];
                            break;
                        }
                    }
                    $path .= $subrep.'/';
                }
                if (empty($msg)) {
                    $rep .= '/'.$newrep;
                }
            }
        }
    }
}

/// DELETE DIRECTORY
if (isset($_GET['delrep'])) {
	$delrep = import('delrep');
    $tmp = explode('/', $delrep);
    if (count($tmp) > 1) {
        $last = array_pop($tmp);
        if ($dh = opendir(CHEMIN.$delrep)) {
            $empty = true;
            $notdel = true;
            while ($empty && ($file = readdir($dh)) !== false) {
                switch ($file) {
                case '.' :
                case '..' :
                    break;
                case 'index.php' :
                    SetChmod(CHEMIN.$delrep.'/index.php');
                    $empty = @unlink(CHEMIN.$delrep.'/index.php');
                    break;
                default :
                    $empty = false;
                }
            }
            closedir($dh);
            if ($empty) {
                SetChmod(CHEMIN.$delrep);
                if (@rmdir(CHEMIN.$delrep)) {
                    if (!is_dir(CHEMIN.$delrep)) {
                        $delrep = implode('/', $tmp);
                        $notdel = false;
                    }
                }
            }
            if ($notdel) {
                $msg = $delrep.' : '.$admin[20].'!! &nbsp;nb '.$admin[171].' > 0';
            }
        }
    }
    $rep = $delrep;
}

/// UPLOAD FILE
$pagerror = 0;
if (isset($_FILES['ficup']) && !empty($_FILES['ficup']['name'])) {
		if((count($deniedExtFileUpload) > 0 && in_array(strrchr($_FILES['ficup']['name'],'.'),$deniedExtFileUpload))) { //AUTORISATION EXTENSION DU FICHIER
	     	$pagerror = 1; 
		 	$erreur = $admin[1104];	
		}
 
    if (is_uploaded_file($_FILES['ficup']['tmp_name']) && $pagerror != 1) {	//UPLOAD) {
        move_uploaded_file($_FILES['ficup']['tmp_name'], CHEMIN.$rep.'/'.$_FILES['ficup']['name']);
	   	SetChmod(CHEMIN.$rep.'/'.$_FILES['ficup']['name']);
    }
}

function ExtClass($extn){
    switch(strtolower($extn)) {
    case 'bmp'  :
    case 'gif'  : return 'fas fa-image text-secondary';
    case 'png'  : return 'far fa-image text-success';
    case 'jpeg' :
	case 'webp' : 
	case 'avif' :
    case 'jpg'  : return 'far fa-file-image text-primary';
    case 'bat'  :
    case 'com'  :
    case 'exe'  : return 'fas fa-code text-muted';
    case 'inc'  :
    case 'php'  :
    case 'js'   : return 'far fa-file-code text-secondary';
    case 'css'  : return 'fab fa-css3 text-success';
    case 'htm'  :
    case 'html' : return 'fas fa-file-code text-muted';
    case 'pdf'  : return 'far fa-file-pdf text-muted';
    case 'ods'  :
    case 'xls'  : return 'far fa-file-excel text-muted';
    case 'csv'  : return 'fas fa-file-csv text-muted';
    case 'doc'  : 
    case 'docx' : 
    case 'odf'  : return 'far fa-file-word text-info';
    case 'ppt'  : return 'far fa-file-powerpoint text-info';
    case 'dtb'  :
    case 'ini'  :
    case 'txt'  : return 'far fa-file-alt text-dark';
    case 'avi'  :
    case 'mpeg' :
    case 'mpg'  :
    case 'mov'  : return 'far fa-file-video text-warning';
	case 'mp4'  : 
    case 'mp3'  : 
    case 'wav'  : return 'far fa-file-audio text-info';
    case 'ace'  :
    case 'cab'  :
    case 'gz'   :
    case 'rar'  :
    case 'tar'  :
    case 'tgz'  :
    case 'zip'  : return 'far fa-file-archive text-success';
    default     : return 'fas fa-question text-danger';
    }
}
if (version_compare(PHP_VERSION, '8.1.0') >= 0 && version_compare(PHP_VERSION, '8.2.0') < 0) {
	$imgTypes = array('bmp', 'gif', 'png', 'jpeg', 'jpg', 'webp', 'avif');
}
else
	$imgTypes = array('bmp', 'gif', 'png', 'jpeg', 'jpg', 'webp');
	
$newrep = '';
$candel = !in_array($rep, $list_baserep);
$list_rep = lister_repertoires($list_baserep);
$dbfiles = array();
$i = 0;
$dossier = opendir(CHEMIN.$rep);
while ($fichier = readdir($dossier)) {
    if (is_file(CHEMIN.$rep.'/'.$fichier) && $fichier != 'index.php' && $fichier != '.htaccess') {
        $dbfiles[$i][0] = $fichier;
        $path_parts = basename($fichier);
        $path_parts = strtolower(substr($path_parts, strrpos($path_parts, '.') + 1));
        $dbfiles[$i][1] = ExtClass($path_parts);
        $dbfiles[$i][2] = FileSizeInKb(CHEMIN.$rep.'/'.$fichier);
        $dbfiles[$i][3] = in_array($path_parts, $imgTypes);
        $i++;
    }
}
closedir($dossier);
sort($dbfiles);

$topmess = '<a href="admin.php?lng='.$lng.'">Admin</a> > '.str_replace('Admin - ', '', $admin[180]);
include CHEMIN.'admin/hpage.inc';
if ($wri == 'admin') include CHEMIN.'admin/administrateur.php';
if ($wri == $userprefs[1]) include CHEMIN.'admin/adminredac.php';
htable($admin[180], '100%');

echo '
<p style="text-align:center;">'.ToHelp($lng, '&pg=998&mnuid=937&tconfig=0#z2').$admin[181].'</p>
<hr />
<div class="w-100 m-auto" style="max-width:560px;">
  <fieldset>
  <form name="changedir" action="admin.php?lng='.$lng.'&amp;pg=upload" method="post">
    <div class="table-responsive-md">
    <table class="table">
      <tr>
        <td style="padding:5px;">
	      <p class="text-center mb-2">
            <div class="d-inline-block">
              <strong>'.$admin[182].'</strong>&nbsp;:&nbsp;<i class="fas fa-folder-open text-warning align-middle" style="font-size: 1.3rem;"></i>&nbsp;
            </div>
            <div class="d-inline-block">
              <select class="form-control font-weight-bold" name="rep" onchange="document.changedir.submit();">';
sort($list_rep);
for($i=0; $i<count($list_rep); $i++) {
    echo '
                <option value="'.$list_rep[$i].'"'.Selected($list_rep[$i] == $rep).">".$list_rep[$i]."</option>";
}
echo '
		      </select>
            </div>';
    if ($candel) {
        echo '
            <div class="d-inline-block">
		      <a class="btn btn-info bg-white ml-4" href="admin.php?lng='.$lng.'&amp;pg=upload&amp;delrep='.$rep.'" title="'.$admin[1724].' '.$rep.'"> 
		        <i class="fas fa-times text-danger align-middle" style="font-size: 1.3rem;" title="'.$admin[1724].' '.$rep.'"></i>
			  </a>
            </div>';
    }
    echo '
          </p>';
if (!empty($msg)) {
    echo '
		  <p class="text-center">'.$msg.'</p>';
}
?>
<style>
div.corpsFilenoScroll table {
 width:630px;
} 

div.corpsFileScroll table {
 width:100% !important;
 width:613px;
}
div.corpsFileScroll {
  margin-right: auto;
  margin-left: auto;
  max-width: 630px;
  height: 291px;
  border: 1px solid #C7C78F;
  overflow: auto;
}
</style>
<?php
echo '
		  <div class="text-center" style="padding-left:76px;">
		    <div class="d-inline-block mr-2">
              <i class="far fa-plus-square align-middle"></i>
              <i class="fas fa-folder-open text-warning align-middle" style="font-size: 1.3rem;" title="'.$admin[182].'"></i>
            </div>
            <div class="d-inline-block mr-1">
		      <input class="form-control" type="text" name="newrep" value="'.$newrep.'" size="25" />
            </div>
            <div class="d-inline-block">
			  '.SubmitButton($admin[1590].mb_strtolower($admin[182], $charset), '', '', $imgdroite).'
            </div>
		  </div>
        </td>
      </tr>
    </table>
    </div>
  </form>
  <hr />
  <div class="table-responsive-md '.(count($dbfiles) > 8 ? 'corpsFileScroll' : 'corpsFilenoScroll').'"> 
  <table class="table w-80 m-auto table-borderless">
    <tr>
      <td style="width:10%;text-align:center;"></td>
      <td style="width:50%"><strong>'.$admin[184].'</strong></td>
      <td style="width:20%;text-align:center;"><strong>'.$admin[185].'</strong></td>
      <td style="width:20%;text-align:center;"><strong>'.$admin[186].'</strong></td>
    </tr>';
?>
<script>
function confirmDelFile(rep,file,type) {
    if (type == 'file') message = '<?php echo $admin[1833]; ?> " '+file+' ".\n';
    if (type == 'dir') message = '<?php echo $admin[1834]; ?> " '+file+' " <?php echo $admin[1835]; ?>\n';
	message = message + " <?php echo $admin[1836]; ?>";
	x = false;
    x = window.confirm(message);
	if (x == true) {
	   window.location = "admin.php?lng=<?php echo $lng; ?>&pg=upload&rep=<?php echo $rep; ?>&actionfichier=2&del="+file;
	} else {
	      return false;
	}
}
</script>
<?php
for ($i = 0; $i < count($dbfiles); $i++) {
	if (strlen($dbfiles[$i][0]) > 34)
	 $mrnomfile = substr($dbfiles[$i][0], 0, 34).' ...';
	else 
		$mrnomfile = $dbfiles[$i][0];

    echo '
    <tr>
      <td class="text-center"><i class="'.$dbfiles[$i][1].'" style="font-size: 1.3rem;"></i></td>
	  <td>
		<div class="hover_img">
		  <a href="#" data-toggle="tooltip" data-placement="top" title="'.$dbfiles[$i][0].'">'.$mrnomfile.'
            <span'.($dbfiles[$i][3] ? '' : ' class="d-none"').'>
              <img src="'.CHEMIN.$rep.'/'.$dbfiles[$i][0].'" alt="" height="100px" />
            </span>
          </a>
		</div>
	  </td>
      <td class="text-center">'.$dbfiles[$i][2].' '.$admin[1725].'</td>
      <td class="text-center">
			  <i class="fas fa-times text-danger align-middle" 
			  onclick=\'confirmDelFile("'.$rep.'","'.$dbfiles[$i][0].'","file");\' 
			  style="cursor: pointer; font-size: 1.3rem;" title="'.$admin[187].'"></i>
	  </td>
    </tr>';
}
echo '
  </table>
  </div>
  </fieldset>
  <form name="uploadit" enctype="multipart/form-data" action="admin.php?lng='.$lng.'&amp;pg=upload" method="post">
    <input type="hidden" name="rep" value="'.$rep.'" />
    <fieldset>';
	if (isset($erreur)) 
	{
		echo '	<div class="alert alert-primary" role="alert">
		<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16" role="img" aria-label="Warning:">
    <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
  </svg>  '.$erreur.'
			</div>';
	}
	echo '
    <p class="text-center"><i class="fas fa-file-upload text-info mr-2" style="font-size: 1.5rem;"></i><strong>'.$admin[188].'</strong></p>
    <p class="text-center px-5">';
	echo '  <div class="input-group mb-3"> 
		  <input class="form-control" type="file" name="ficup" id="inputGroupFile01" />';
	if ($lng != 'fr')
		echo '<label class="input-group-text" for="inputGroupFile01">'.$admin[793].'</label>';
	echo '
		  </div></p>
    </fieldset>
    <div class="quest" style="padding:2px 20px;">
      <div class="float-right">'.SubmitButton($admin[189], '', '', $imgdroite).'</div>
      <div class="clearfix"></div>
    </div>
  </form>
</div>';
echo '
<script>
$(document).ready(function(){
  $(\'[data-toggle="tooltip"]\').tooltip();
});
</script>'; 
btable();
include CHEMIN.'admin/bpage.inc';
?>