Location: PHPKode > scripts > 2BGal > 2bgal/admin/configuration.inc.php
<?php
// Copyright 2003 Benjamin Py [www.ben3w.com] 

// This file is part of 2BGAL
// 2BGAL is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 2BGAL is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with 2BGAL ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

//securite #1 : pas d'appel direct du fichier
if (!defined('STAYONINCLUDE')) {exit;}
stayoninclude();

//recuperation des variables
if (isset($_GET["sauver"])) {$sauver=$_GET["sauver"];} else {$sauver="";}
if (isset($_POST["newlang"])) {$newlang=$_POST["newlang"];} else {$newlang="fr";}
if (isset($_POST["newtitre_galerie"])) {$newtitre_galerie=$_POST["newtitre_galerie"];} else {$newtitre_galerie="Galerie";}
if (isset($_POST["newtemplatefolder"])) {$newtemplatefolder=$_POST["newtemplatefolder"];} else {$newtemplatefolder="defaultxhtml";}
if (isset($_POST["newformatdate"])) {$newformatdate=$_POST["newformatdate"];} else {$newformatdate="d/m/Y";}
if (isset($_POST["newdisplay_nb_lignes"])) {$newdisplay_nb_lignes=$_POST["newdisplay_nb_lignes"];} else {$newdisplay_nb_lignes=3;}
if (isset($_POST["newdisplay_nb_col"])) {$newdisplay_nb_col=$_POST["newdisplay_nb_col"];} else {$newdisplay_nb_col=3;}
if (isset($_POST["newdisplay_tricritere"])) {$newdisplay_tricritere=$_POST["newdisplay_tricritere"];} else {$newdisplay_tricritere="date_verif";}
if (isset($_POST["newdisplay_triordre"])) {$newdisplay_triordre=$_POST["newdisplay_triordre"];} else {$newdisplay_triordre="DESC";}
if (isset($_POST["newtaille_mini"])) {$newtaille_mini=$_POST["newtaille_mini"];} else {$newtaille_mini=150;}
if (isset($_POST["newmini_format"])) {$newmini_format=$_POST["newmini_format"];} else {$newmini_format="original";}
if (isset($_POST["newmini_gdversion"])) {$newmini_gdversion=$_POST["newmini_gdversion"];} else {$newmini_gdversion=2;}
if (isset($_POST["newmini_gd20quality"])) {$newmini_gd20quality=$_POST["newmini_gd20quality"];} else {$newmini_gd20quality="imagecopyresized";}
if (isset($_POST["newrss_items"])) {$newrss_items=$_POST["newrss_items"];} else {$newrss_items=10;}
if (isset($_POST["newdisplayindex_nb_col"])) {$newdisplayindex_nb_col=$_POST["newdisplayindex_nb_col"];} else {$newdisplayindex_nb_col=1;}
if (isset($_POST["newdisplay_nb_favorite"])) {$newdisplay_nb_favorite=$_POST["newdisplay_nb_favorite"];} else {$newdisplay_nb_favorite=0;}
if (isset($_POST["newdisplay_lastupdate"])) {$newdisplay_lastupdate=$_POST["newdisplay_lastupdate"];} else {$newdisplay_lastupdate=0;}
if (isset($_POST["newadmlinkdisplay"])) {$newadmlinkdisplay=$_POST["newadmlinkdisplay"];} else {$newadmlinkdisplay=0;}
if (isset($_POST["newdispinfos1descr"])) {$newdispinfos1descr=$_POST["newdispinfos1descr"];} else {$newdispinfos1descr=0;}
if (isset($_POST["newdispinfos1images"])) {$newdispinfos1images=$_POST["newdispinfos1images"];} else {$newdispinfos1images=0;}
if (isset($_POST["newdispinfos1hits"])) {$newdispinfos1hits=$_POST["newdispinfos1hits"];} else {$newdispinfos1hits=0;}
if (isset($_POST["newdispinfos1update"])) {$newdispinfos1update=$_POST["newdispinfos1update"];} else {$newdispinfos1update=0;}
if (isset($_POST["newdispinfos2label"])) {$newdispinfos2label=$_POST["newdispinfos2label"];} else {$newdispinfos2label=0;}
if (isset($_POST["newdispinfos2date"])) {$newdispinfos2date=$_POST["newdispinfos2date"];} else {$newdispinfos2date=0;}
if (isset($_POST["newdispinfos2hits"])) {$newdispinfos2hits=$_POST["newdispinfos2hits"];} else {$newdispinfos2hits=0;}
if (isset($_POST["newdispinfos3label"])) {$newdispinfos3label=$_POST["newdispinfos3label"];} else {$newdispinfos3label=0;}
if (isset($_POST["newdispinfos3name"])) {$newdispinfos3name=$_POST["newdispinfos3name"];} else {$newdispinfos3name=0;}
if (isset($_POST["newdispinfos3date"])) {$newdispinfos3date=$_POST["newdispinfos3date"];} else {$newdispinfos3date=0;}
if (isset($_POST["newdispinfos3size"])) {$newdispinfos3size=$_POST["newdispinfos3size"];} else {$newdispinfos3size=0;}
if (isset($_POST["newdispinfos3hits"])) {$newdispinfos3hits=$_POST["newdispinfos3hits"];} else {$newdispinfos3hits=0;}
if (isset($_POST["newdispinfos3exif"])) {$newdispinfos3exif=$_POST["newdispinfos3exif"];} else {$newdispinfos3exif=0;}

//securite #2 : type des variables
if (!ereg("^(ok)$",$sauver,$secereg)) {$sauver="";}
$newtitre_galerie=htmlspecialchars(stripslashes($newtitre_galerie));
$newformatdate=htmlspecialchars(stripslashes($newformatdate));

//inclusion langue
$lang_filename = "lang/".$lang."/configuration.inc.php";
require($lang_filename);

//action demandee
echo "<p class=\"actiontitlebar\">".$txt_titreaction."</p>\n";
	
//------------------------------------------------------------
//sauver la configuration

$file_connect = "../connect.inc.php";
$file_config = "../config.inc.php"; 

if ($sauver == "ok")
{
	$output="<?php\n";
	$output.="\$scriptversion=\"".$scriptversion."\"; //version en dur\n";
	$output.="\$lang=\"".$newlang."\"; //langue [fr,en]\n";
	$output.="\$titre_galerie=\"".$newtitre_galerie."\"; //titre de la galerie\n";
	$output.="\$templatefolder=\"".$newtemplatefolder."\"; //style\n";
 	$output.="\$formatdate=\"".$newformatdate."\"; //format des dates a afficher\n";
	$output.="\$display_nb_lignes=".$newdisplay_nb_lignes."; //nombre d'images affichées par ligne\n";
	$output.="\$display_nb_col=".$newdisplay_nb_col."; //nombre d'images affichées par colone\n";
	$output.="\$display_tricritere=\"".$newdisplay_tricritere."\"; //critere de tri des photos dans les albums [url,date_verif,label]\n";
	$output.="\$display_triordre=\"".$newdisplay_triordre."\"; //ordre d'affichage des photos dans les albums [ASC,DESC]\n";
	$output.="\$taille_mini=".$newtaille_mini."; //taille maxi d'une image miniature (en pixels)\n";
	$output.="\$mini_format=\"".$newmini_format."\"; //format de la vignette [crop (carré centré),original (original)]\n";
	$output.="\$mini_gdversion=".$newmini_gdversion."; //version de GD [1 (GD<2.0),2 (GD>=2.0]\n";
	$output.="\$mini_gd20quality=\"".$newmini_gd20quality."\"; //qualité des minis (pour GD>=2.0 uniquement) [imagecopyresampled (HAUTE),imagecopyresized (BASSE)]\n";
	$output.="\$rss_items=".$newrss_items."; //nombre de photos à présenter dans le flux RSS\n";
	$output.="\$displayindex_nb_col=".$newdisplayindex_nb_col."; //nombre de colonnes dans l'index\n";
	$output.="\$display_nb_favorite=".$newdisplay_nb_favorite."; //nombre d'images populaires à afficher (0 pour dèsactiver)\n";
	$output.="\$display_lastupdate=".$newdisplay_lastupdate."; //derniers ajouts (0 pour dèsactiver)\n";
	$output.="\$admlinkdisplay=".$newadmlinkdisplay."; //affichage des liens vers stats et admin\n";
	$output.="\$dispinfos1descr=".$newdispinfos1descr.";\n";
	$output.="\$dispinfos1images=".$newdispinfos1images.";\n";
	$output.="\$dispinfos1hits=".$newdispinfos1hits.";\n";
	$output.="\$dispinfos1update=".$newdispinfos1update.";\n";
	$output.="\$dispinfos2label=".$newdispinfos2label.";\n";
	$output.="\$dispinfos2date=".$newdispinfos2date.";\n";
	$output.="\$dispinfos2hits=".$newdispinfos2hits.";\n";
	$output.="\$dispinfos3label=".$newdispinfos3label.";\n";
	$output.="\$dispinfos3name=".$newdispinfos3name.";\n";
	$output.="\$dispinfos3date=".$newdispinfos3date.";\n";
	$output.="\$dispinfos3size=".$newdispinfos3size.";\n";
	$output.="\$dispinfos3hits=".$newdispinfos3hits.";\n";
	$output.="\$dispinfos3exif=".$newdispinfos3exif.";\n";
	$output.="?>";

	if ($fc = @fopen($file_config,'w'))
	{
		fwrite($fc,$output);
		fclose($fc);
		echo "<img src=\"actionok.png\" alt=\"\" />$txt_okfopen<br /><br />";
		echo "<a href=\"index.php\">$txt_continuer</a><br /><br />";
	}
	else
	{
		echo "<img src=\"actionwarning.png\" alt=\"\" />$txt_errfopen<br /><br />";
		echo "<textarea rows=\"29\" cols=\"80\" class='saisie'>$output</textarea>\n";
		echo "<br /><br /><a href=\"index.php\">$txt_continuer</a><br /><br />";
	}
}
else
{
	echo "<form method=\"post\" action=\"index.php?admaction=configuration&amp;sauver=ok\">\n";	  
	echo "<table class=\"config\">\n";
	
	//galerie
	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partgalerie</th></tr>\n";

	echo "<tr><th>".$txt_titregal."</th><td><input type=\"text\" name=\"newtitre_galerie\" size=\"30\" value=\"$titre_galerie\" class=\"saisie\" /></td></tr>\n";

	echo "<tr><th>".$txt_langue."</th><td><select name=\"newlang\" class=\"saisie\">";
	$rep="../lang";
	$handle=opendir($rep);
	while ($folder = readdir($handle))
	{
		$currfolder=$rep."/".$folder;
		if (($folder!=".") AND ($folder!="..") AND (is_dir("$currfolder")))
		{
			echo "<option value=\"$folder\"";
			if ($folder==$lang) echo " selected=\"selected\"";
			echo ">$folder</option>\n";
		}
	}
	echo "</select></td><td></td></tr>\n";	

	echo "<tr><th>".$txt_indexnbcolonnes."</th><td><select name=\"newdisplayindex_nb_col\" class=\"saisie\"><option value=\"1\"";
	if ($displayindex_nb_col==1) echo " selected=\"selected\"";
	echo ">1</option><option value=\"2\"";
	if ($displayindex_nb_col==2) echo " selected=\"selected\"";
	echo ">2</option><option value=\"3\"";
	if ($displayindex_nb_col==3) echo " selected=\"selected\"";
	echo ">3</option></select></td><td></td></tr>\n";

	echo "<tr><th>".$txt_nbpopulaires."</th><td><select name=\"newdisplay_nb_favorite\" class=\"saisie\"><option value=\"0\"";
	if ($display_nb_favorite==0) echo " selected=\"selected\"";
	echo ">Dèsactivé</option><option value=\"1\"";
	if ($display_nb_favorite==1) echo " selected=\"selected\"";
	echo ">1</option><option value=\"2\"";
	if ($display_nb_favorite==2) echo " selected=\"selected\"";
	echo ">2</option><option value=\"3\"";
	if ($display_nb_favorite==3) echo " selected=\"selected\"";
	echo ">3</option><option value=\"4\"";
	if ($display_nb_favorite==4) echo " selected=\"selected\"";
	echo ">4</option><option value=\"5\"";
	if ($display_nb_favorite==5) echo " selected=\"selected\"";
	echo ">5</option><option value=\"10\"";
	if ($display_nb_favorite==10) echo " selected=\"selected\"";
	echo ">10</option></select></td><td></td></tr>\n";

	echo "<tr><th>".$txt_nblastupdate."</th><td><select name=\"newdisplay_lastupdate\" class=\"saisie\"><option value=\"0\"";
	if ($display_lastupdate==0) echo " selected=\"selected\"";
	echo ">Dèsactivé</option><option value=\"1\"";
	if ($display_lastupdate==1) echo " selected=\"selected\"";
	echo ">1</option><option value=\"2\"";
	if ($display_lastupdate==2) echo " selected=\"selected\"";
	echo ">2</option><option value=\"3\"";
	if ($display_lastupdate==3) echo " selected=\"selected\"";
	echo ">3</option><option value=\"4\"";
	if ($display_lastupdate==4) echo " selected=\"selected\"";
	echo ">4</option><option value=\"5\"";
	if ($display_lastupdate==5) echo " selected=\"selected\"";
	echo ">5</option><option value=\"10\"";
	if ($display_lastupdate==10) echo " selected=\"selected\"";
	echo ">10</option></select></td><td></td></tr>\n";	
	
	echo "<tr><th>".$txt_nbrssitems."</th><td><select name=\"newrss_items\" class=\"saisie\"><option value=\"0\"";
	if ($rss_items==0) echo " selected=\"selected\"";
	echo ">0</option><option value=\"5\"";
	if ($rss_items==5) echo " selected=\"selected\"";
	echo ">5</option><option value=\"10\"";
	if ($rss_items==10) echo " selected=\"selected\"";
	echo ">10</option><option value=\"20\"";
	if ($rss_items==20) echo " selected=\"selected\"";
	echo ">20</option><option value=\"50\"";
	if ($rss_items==50) echo " selected=\"selected\"";
	echo ">50</option></select></td><td></td></tr>\n";	
	
	echo "<tr><th>".$txt_formatdate."</th><td><input type=\"text\" name=\"newformatdate\" size=\"20\" value=\"".$formatdate."\" class=\"saisie\" />cf <a href=\"http://www.php.net/manual/fr/function.date.php\">date()</a></td></tr>\n";
	
	
	echo "<tr><th>".$txt_liens."</th><td>";
	echo "<input type=\"checkbox\" name=\"newadmlinkdisplay\" value=\"1\""; if ($admlinkdisplay) echo " checked=\"checked\""; echo " /></td></tr>\n";	
	
	//thème
	echo "<tr><th colspan=\"2\" class=\"titre\">".$txt_style."</th></tr>\n";
	echo "<tr><th>".$txt_styleprev."<br /><img src=\"noskinpreview.jpg\" name=\"SkinPreview\" width=\"150\" height=\"150\" alt=\"\" /></th><td><select name=\"newtemplatefolder\" class=\"saisie\" onChange=\"changeSkinPreview(this.value)\">";
	$rep="../style";
	$handle=opendir($rep);
	while ($folder = readdir($handle))
	{
		$currfolder=$rep."/".$folder;
		if (($folder!=".") AND ($folder!="..") AND (is_dir("$currfolder")))
		{
			echo "<option value=\"$folder\"";
			if ($folder==$templatefolder) echo " selected=\"selected\"";
			echo ">$folder</option>\n";
		}
	}
	echo "</select></td><td></td></tr>\n";
	echo "<script type=\"text/javascript\">\n";
	if (!(file_exists('../style/".$templatefolder."/skinpreview.jpg'))) 
	{
		echo "document.images[\"SkinPreview\"].src=\"../style/".$templatefolder."/skinpreview.jpg\";\n";
	}
	echo "function changeSkinPreview(skin){\n";
  echo "document.images[\"SkinPreview\"].src=\"../style/\"+skin+\"/skinpreview.jpg\";}\n";
	echo "</script>\n";    
	
	//affichage d'un album
	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partaffalbum</th></tr>\n";
	
	echo "<tr><th>".$txt_nblignes."</th><td><select name=\"newdisplay_nb_lignes\" class=\"saisie\"><option value=\"1\"";
	if ($display_nb_lignes==1) echo " selected=\"selected\"";
	echo ">1</option><option value=\"2\"";
	if ($display_nb_lignes==2) echo " selected=\"selected\"";
	echo ">2</option><option value=\"3\"";
	if ($display_nb_lignes==3) echo " selected=\"selected\"";
	echo ">3</option><option value=\"4\"";
	if ($display_nb_lignes==4) echo " selected=\"selected\"";
	echo ">4</option><option value=\"5\"";
	if ($display_nb_lignes==5) echo " selected=\"selected\"";
	echo ">5</option><option value=\"6\"";
	if ($display_nb_lignes==6) echo " selected=\"selected\"";
	echo ">6</option><option value=\"8\"";
	if ($display_nb_lignes==8) echo " selected=\"selected\"";
	echo ">8</option><option value=\"10\"";
	if ($display_nb_lignes==10) echo " selected=\"selected\"";
	echo ">10</option></select></td></tr>\n";
	
	echo "<tr><th>".$txt_nbcolonnes."</th><td><select name=\"newdisplay_nb_col\" class=\"saisie\"><option value=\"1\"";
	if ($display_nb_col==1) echo " selected=\"selected\"";
	echo ">1</option><option value=\"2\"";
	if ($display_nb_col==2) echo " selected=\"selected\"";
	echo ">2</option><option value=\"3\"";
	if ($display_nb_col==3) echo " selected=\"selected\"";
	echo ">3</option><option value=\"4\"";
	if ($display_nb_col==4) echo " selected=\"selected\"";
	echo ">4</option><option value=\"5\"";
	if ($display_nb_col==5) echo " selected=\"selected\"";
	echo ">5</option><option value=\"6\"";
	if ($display_nb_col==6) echo " selected=\"selected\"";
	echo ">6</option><option value=\"8\"";
	if ($display_nb_col==8) echo " selected=\"selected\"";
	echo ">8</option><option value=\"10\"";
	if ($display_nb_col==10) echo " selected=\"selected\"";
	echo ">10</option></select></td></tr>\n";
	
	echo "<tr><th>".$txt_tricritere."</th><td><select name=\"newdisplay_tricritere\" class=\"saisie\"><option value=\"label\"";
	if ($display_tricritere=="label") echo " selected=\"selected\"";
	echo ">label</option><option value=\"url\"";
	if ($display_tricritere=="url") echo " selected=\"selected\"";
	echo ">url</option><option value=\"date_verif\"";
	if ($display_tricritere=="date_verif") echo " selected=\"selected\"";
	echo ">date</option></select></td></tr>\n";
	
	echo "<tr><th>".$txt_triordre."</th><td><select name=\"newdisplay_triordre\" class=\"saisie\"><option value=\"ASC\"";
	if ($display_triordre=="ASC") echo " selected=\"selected\"";
	echo ">Ascendant</option><option value=\"DESC\"";
	if ($display_triordre=="DESC") echo " selected=\"selected\"";
	echo ">Descendant</option></select></td></tr>\n";

	echo "<tr><th>".$txt_taillemini."</th><td><select name=\"newtaille_mini\" class=\"saisie\"><option value=\"50\"";
	if ($taille_mini==50) echo " selected=\"selected\"";
	echo ">50 px</option><option value=\"100\"";
	if ($taille_mini==100) echo " selected=\"selected\"";
	echo ">100 px</option><option value=\"150\"";
	if ($taille_mini==150) echo " selected=\"selected\"";
	echo ">150 px</option><option value=\"200\"";
	if ($taille_mini==200) echo " selected=\"selected\"";
	echo ">200 px</option><option value=\"300\"";
	if ($taille_mini==300) echo " selected=\"selected\"";
	echo ">300 px</option></select></td></tr>\n";	

	echo "<tr><th>".$txt_miniformat."</th><td><select name=\"newmini_format\" class=\"saisie\"><option value=\"crop\"";
	if ($mini_format=="crop") echo " selected=\"selected\"";
	echo ">".$txt_miniformatcrop."</option><option value=\"original\"";
	if ($mini_format=="original") echo " selected=\"selected\"";
	echo ">".$txt_miniformatoriginal."</option></select></td></tr>\n";	

	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partinfos1</th></tr>\n";
	echo "<tr><th>".$txt_infos1descr."</th><td><input type=\"checkbox\" name=\"newdispinfos1descr\" value=\"1\""; if ($dispinfos1descr) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos1images."</th><td><input type=\"checkbox\" name=\"newdispinfos1images\" value=\"1\""; if ($dispinfos1images) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos1hits."</th><td><input type=\"checkbox\" name=\"newdispinfos1hits\" value=\"1\""; if ($dispinfos1hits) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos1update."</th><td><input type=\"checkbox\" name=\"newdispinfos1update\" value=\"1\""; if ($dispinfos1update) echo " checked=\"checked\""; echo " /></td></tr>\n";		
	
	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partinfos2</th></tr>\n";
	echo "<tr><th>".$txt_infos2label."</th><td><input type=\"checkbox\" name=\"newdispinfos2label\" value=\"1\""; if ($dispinfos2label) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos2date."</th><td><input type=\"checkbox\" name=\"newdispinfos2date\" value=\"1\""; if ($dispinfos2date) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos2hits."</th><td><input type=\"checkbox\" name=\"newdispinfos2hits\" value=\"1\""; if ($dispinfos2hits) echo " checked=\"checked\""; echo " /></td></tr>\n";

	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partinfos3</th></tr>\n";
	echo "<tr><th>".$txt_infos3label."</th><td><input type=\"checkbox\" name=\"newdispinfos3label\" value=\"1\""; if ($dispinfos3label) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos3name."</th><td><input type=\"checkbox\" name=\"newdispinfos3name\" value=\"1\""; if ($dispinfos3name) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos3date."</th><td><input type=\"checkbox\" name=\"newdispinfos3date\" value=\"1\""; if ($dispinfos3date) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos3size."</th><td><input type=\"checkbox\" name=\"newdispinfos3size\" value=\"1\""; if ($dispinfos3size) echo " checked=\"checked\""; echo " /></td></tr>\n";		
	echo "<tr><th>".$txt_infos3hits."</th><td><input type=\"checkbox\" name=\"newdispinfos3hits\" value=\"1\""; if ($dispinfos3hits) echo " checked=\"checked\""; echo " /></td></tr>\n";
	echo "<tr><th>".$txt_infos3exif."</th><td class=\"textefont10\"><input type=\"checkbox\" name=\"newdispinfos3exif\" value=\"1\""; if ($dispinfos3exif) echo " checked=\"checked\""; echo " />";
	if (!extension_loaded('exif')) echo "&nbsp;".$txt_exifmissing;
	echo "</td></tr>\n";		

	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partsysteme</th></tr>\n";
	
	echo "<tr><th>".$txt_versiongd."</th><td><select name=\"newmini_gdversion\" class=\"saisie\"><option value=\"1\"";
	if ($mini_gdversion=="1") echo " selected=\"selected\"";
	echo ">GD &lt; 2.0</option><option value=\"2\"";
	if ($mini_gdversion=="2") echo " selected=\"selected\"";
	echo ">GD &gt;= 2.0</option></select>&nbsp;cf. <a href=\"phpinfo.php\">phpinfo</a></td></tr>\n";	

	echo "<tr><th>".$txt_qualitemini."</th><td><select name=\"newmini_gd20quality\" class=\"saisie\"><option value=\"imagecopyresampled\"";
	if ($mini_gd20quality=="imagecopyresampled") echo " selected=\"selected\"";
	echo ">haute/high (imagecopyresampled)</option><option value=\"imagecopyresized\"";
	if ($mini_gd20quality=="imagecopyresized") echo " selected=\"selected\"";
	echo ">basse/low (imagecopyresized)</option></select></td></tr>\n";
	
	echo "<tr><th colspan=\"2\" class=\"soumission\">";
	echo "<input type=\"hidden\" name=\"newscriptversion\" value=\"".$scriptversion."\" />";
	echo "<input type=\"submit\" name=\"envoyer\" value=\"".$txt_valider."\" />&nbsp;&nbsp;<a href=\"index.php\">".$txt_annuler."</a></th></tr>\n";
	echo "</table>\n";
	echo "</form>\n";

	//mdp
	echo "<form method=\"post\" action=\"index.php?admaction=changepwd\">\n";
	echo "<table class=\"config\">\n";	
	echo "<tr><th colspan=\"2\" class=\"titre\">$txt_partbbgauth</th></tr>\n";
	echo "<tr><th colspan=\"2\">".$txt_bbgauthinfo."</th></tr>\n";
	echo "<tr><th>".$txt_olduser."</th><td><input type=\"text\" name=\"olduser\" size=\"30\" value=\"\" class=\"saisie\" /></td></tr>\n";
	echo "<tr><th>".$txt_oldpwd."</th><td><input type=\"password\" name=\"oldpwd\" size=\"30\" value=\"\" class=\"saisie\" /></td></tr>\n";
	echo "<tr><th>".$txt_newuser."</th><td><input type=\"text\" name=\"newuser\" size=\"30\" value=\"\" class=\"saisie\" /></td></tr>\n";
	echo "<tr><th>".$txt_newpwd."</th><td><input type=\"password\" name=\"newpwd\" size=\"30\" value=\"\" class=\"saisie\" /></td></tr>\n";
	echo "<tr><th>".$txt_newuserbis."</th><td><input type=\"text\" name=\"newuserbis\" size=\"30\" value=\"\" class=\"saisie\" /></td></tr>\n";
	echo "<tr><th>".$txt_newpwdbis."</th><td><input type=\"password\" name=\"newpwdbis\" size=\"30\" value=\"\" class=\"saisie\" /></td></tr>\n";
	echo "<tr><th colspan=\"2\" class=\"soumission\"><input type=\"submit\" name=\"envoyer\" value=\"".$txt_valider."\" />&nbsp;&nbsp;<a href=\"index.php\">".$txt_annuler."</a></th></tr>\n";
	echo "</table>\n";
	echo "</form>";
}
?>
Return current item: 2BGal