SQL erreur

Eléphant du PHP | 172 Messages

08 déc. 2012, 18:46

Bonjour,

Je rencontre un nouveau problème :cry: , d'avance merci à celui qui pourra voir d'où vient l'erreur

fichier Log =

Sat 2012-12-08 16:20:32 [XXXXXXXXXXXXX] ERROR : PHP User Warning : SQL Error - Query :
SELECT mod,nb,txt,img,id from fog_ranks order by nb
Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nb,txt,img,id from fog_ranks order by nb' at line 1 /htdocs/forum/libs/required/classes.inc#306


Sat 2012-12-08 16:20:53 [XXXXXXXXXXXXXXXX] ERROR : PHP User Warning : SQL Error - Query :
INSERT into fog_ranks (nb,txt,img,mod) VALUES(1,'administrateur','5stars.gif','1')
Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod) VALUES(1,'administrateur','5stars.gif','1')' at line 1 /htdocs/forum/libs/required/classes.inc#306

   /**
    * Executer uen requete
	    * @param $query la requete
    * @return le resultat
	    */
	    function query($query)
	    {
	        global $fog_log,$fog_ip;
	        if ($this->connected===false)return false;
	        if (!preg_match('`/^\s*select.*\bunion\s+select\s/si`',$query)) {
	            ++$this->nb_queries;
	            $fog_log->add('VERBOSE','SQL_QUERY',$query);
	            $deb = microtime();
	            $this->result = $this->driver->query($query,$this->id);
	            $this->query_time += FOGMicroDif($deb);
	            if ($this->result !== false)
	                return $this->result;
	            trigger_error('SQL Error - Query : <br /> ' . stripslashes(htmlentities($query)) . '<br /> <strong>Error</strong> : ' .  stripslashes(nl2br(htmlentities($this->error()))),E_USER_WARNING);
	        }else
	            trigger_error('Hacking Attempt - Query : <br /> ' . stripslashes(htmlentities($query)) ,E_USER_ERROR);
	        $this->connected = false;
	        return false;
        }

Avatar du membre
Modérateur PHPfrance
Modérateur PHPfrance | 8758 Messages

09 déc. 2012, 14:41

Salut,

As tu testé tes requêtes avec phpmyadmin ou équivalent ?

Elles semblent correcte c'est peux être un soucis avec ta classe ?

@+
Il en faut peu pour être heureux ......

Eléphant du PHP | 172 Messages

09 déc. 2012, 15:18

Bonjour moogli ,

J'ai vérifier mes tables sql status OK.

comment vérifier la classe ???

Merci de ton aide :D

Eléphant du PHP | 172 Messages

09 déc. 2012, 15:35

çà ne viendrait pas de là ?

Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in C:\Program Files (x86)\EasyPHP-12.1\home\codesource.php on line 2
<?php
elseif($fog_q == 4){

		$fog_array_users = array();
		$fog_i = 0;
		$fog_result = $fog_db->query('SELECT pseudo,id from '.FOG_TABLES_PREF.'users where rang<'.$fog_user->row['rang'].(($fog_user->row['rang'] == 6)?(' or id='.$fog_user->row['id']):''));
		while($fog_row = $fog_db->fetch_row($fog_result)){
			$fog_array_users['pseudo'][$fog_row[1]] = $fog_row[0];
			$fog_array_users['id'][$fog_row[1]] = $fog_row[1];
		}
		$fog_smarty->assign('users',$fog_array_users);

		if($fog_action == 1){
			$fog_mod = $_POST['fog_mod']?1:0;
			$fog_nb = $fog_mod?$_POST['fog_uid']:intval(trim($_POST['fog_nb']));
			$fog_txt = htmlentities(trim($_POST['fog_txt']));
			$fog_img = $_POST['fog_img'];
			if(!$fog_mod || in_array($fog_nb,$fog_array_users['id']))
				$fog_db->query('INSERT into '.FOG_TABLES_PREF.'ranks (nb,txt,img,mod) VALUES('.$fog_nb.',\''.$fog_txt.'\',\''.$fog_img.'\',\''.$fog_mod.'\')');
		}elseif($fog_action == 2){
			$fog_rankid = $_GET['fog_rankid'];
			if(isset($_POST['fog_posted'])){
				$fog_rank = $fog_db->fetch_assoc($fog_db->query('SELECT mod,nb,txt,img,id from '.FOG_TABLES_PREF.'ranks where id='.$fog_rankid.' limit 1 '));
				$fog_mod = $_POST['fog_mod']?1:0;
				$fog_nb = $fog_mod?$_POST['fog_uid']:intval(trim($_POST['fog_nb']));
				$fog_txt = htmlentities(trim($_POST['fog_txt']));
				$fog_img = $_POST['fog_img'];
				if((!$fog_rank['mod'] || in_array($fog_rank['nb'],$fog_array_users['id'])) && (!$fog_mod || in_array($fog_nb,$fog_array_users['id'])))
					$fog_db->query('UPDATE '.FOG_TABLES_PREF.'ranks SET nb='.$fog_nb.',txt=\''.$fog_txt.'\',img=\''.$fog_img.'\',mod=\''.$fog_mod.'\' where id='.$fog_rankid);
			}
			$fog_rank = $fog_db->fetch_assoc($fog_db->query('SELECT mod,nb,txt,img,id from '.FOG_TABLES_PREF.'ranks where id='.$fog_rankid.' limit 1 '));
			$fog_smarty->assign('rank',$fog_rank);
		}elseif($_POST['fog_selectedranks']){
			$fog_query = '('.implode(',',(array) $_POST['fog_selectedranks']).')';
			$fog_db->query('DELETE from '.FOG_TABLES_PREF.'ranks where id IN '.$fog_query);
		}
		
		
		$fog_i = 0;
		$fog_array = array();
		$result = $fog_db->query('SELECT mod,nb,txt,img,id from '.FOG_TABLES_PREF.'ranks order by nb');
		while($fog_row = $fog_db->fetch_assoc($result)){
			if(!$fog_row['mod'])
				$fog_array['nb'][$fog_i++] = $fog_row;
			elseif($fog_row['mod'] == 1){
				$fog_array['user'][$fog_i] = $fog_row;
				$fog_array['user'][$fog_i++]['user'] = $fog_ub->Get($fog_row['nb'],'pseudo');
			}
		}
		$fog_smarty->assign('ranks',$fog_array);
		
		$fog_array = array();
		$fog_i=0;
		$fog_dirpath = FOG_DIR.'img/ranks/';
		if ($fog_dir = opendir($fog_dirpath)){
    		while ($fog_file = readdir($fog_dir))
       			if(is_file($fog_dirpath.$fog_file)){
					$fog_file_info = getimagesize($fog_dirpath.$fog_file);
            		if ((strPos($fog_file,'.jpg') && $fog_file_info[2] === 2)||(strPos($fog_file, '.gif') && $fog_file_info[2] === 1)||(strPos($fog_file, '.png') && $fog_file_info[2] === 3))
					  $fog_array[$fog_i++] = $fog_file;
				}
    		closedir($fog_dir);
		}
		$fog_smarty->assign('dispos',$fog_array);
		
		unset($$fog_array,$fog_existent,$fog_row,$fog_i); 
?>

Eléphant du PHP | 130 Messages

09 déc. 2012, 15:53

ligne 2 tu as un elseif, ta page est elle inclut dans une autre ? Car il faut que tu es un if pour pouvoir faire un elseif.

Eléphant du PHP | 172 Messages

09 déc. 2012, 16:22

Bonjour benv8nam ,

voilà la page php ou est la partie du script :

j'ai mis la partie du code RANGS dans mon serveur Easy PHP pour voir le Code interprété par le serveur et envoyée au navigateur, car je cherche dans toutes les directions ?
<?php
/*-----------------------------------------------------------------+
| +----------------- FOG Forum - PHP Board Engine ---------------+ |
| |------------- Copyleft 2004  Gilles "TitD" Daviet  -----------| |
| |------------ Downloaded on http://fog-forum.sf.net -----------| |
| +--------------------------------------------------------------+ |
| |- php/admin/aff.php
| |- Configuration de l'affichage du forum
| +--------------------------------------------------------------
+----------------------------------------------------------------
| This program 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. 
|  
| This program 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 this program; if not, write to the Free Software 
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+--------------------------------------------------------------------------*/

if(!defined('FOG_INCLUDED'))die('Hello world');
if($fog_smarty->AdminRequis(5)){
	$fog_q = isset($_GET['fog_q'])?$_GET['fog_q']:0;
	$fog_action =  isset($_GET['fog_action'])?$_GET['fog_action']:0;

	///////////////////
	/////GENERAL
	///////////////////

	if(!$fog_q){

		if(isset($_POST['fog_posted'])){
			$fog_config['skin'] = $_POST['fog_skin'];
			$fog_config['lang'] = $_POST['fog_lang'];
			$fog_config['fuseau'] = $_POST['fog_fuseau'];
			$fog_config['dateformat'] = htmlentities($_POST['fog_dateformat']);
			$fog_config['heureformat'] = htmlentities($_POST['fog_heureformat']);
			if(!preg_match('`[^0-9]`',$_POST['fog_nbrep']))
				$fog_config['maxs4aff'][0] = $_POST['fog_nbrep'];
			if(!preg_match('`[^0-9]`',$_POST['fog_nbtopics']))
				$fog_config['maxs4aff'][1] = $_POST['fog_nbtopics'];
			if(!preg_match('`[^0-9]`',$_POST['fog_depuis']))
				$fog_config['maxs4aff'][2] = $_POST['fog_depuis'];
			if(!preg_match('`[^0-9]`',$_POST['fog_nbpop']))
				$fog_config['maxs4aff'][3] = $_POST['fog_nbpop'];
			if(!preg_match('`[^0-9]`',$_POST['fog_nbrepmess']))
				$fog_config['maxs4aff'][4] = $_POST['fog_nbrepmess'];
			$fog_config['maxs4aff'][5] = isset($_POST['fog_hideforums'])?1:0;
			$fog_config['fenetres'][0] = isset($_POST['fog_fenetres0'])?1:0;
			$fog_config['fenetres'][1] = isset($_POST['fog_fenetres1'])?1:0;
			$fog_config['fenetres'][2] = isset($_POST['fog_fenetres2'])?1:0;
			$fog_config['fenetres'][3] = isset($_POST['fog_fenetres3'])?1:0;
			
			$fog_maxs4aff = implode('|',$fog_config['maxs4aff']);
			$fog_fenetres = implode('|',$fog_config['fenetres']);
			$fog_db->query('UPDATE '.FOG_TABLES_PREF."config SET skin='".$fog_config['skin']."',lang='".$fog_config['lang']."',fuseau='".$fog_config['fuseau']."',heureformat='".$fog_config['heureformat']."',dateformat='".$fog_config['dateformat']."',maxs4aff='$fog_maxs4aff',fenetres='$fog_fenetres'");
			
			$fog_config['dateformat'] = stripslashes($fog_config['dateformat']);
			$fog_config['heureformat'] = stripslashes($fog_config['heureformat']);
		}
		
		for($fog_i=0,$fog_j=-12;$fog_i<25;$fog_i++,$fog_j++){
			$fog_fuseaux['value'][$fog_i] = $fog_i-12;
			$fog_fuseaux['txt'][$fog_i] = "GMT".(($fog_j<0)?"$fog_j":(($fog_j)?"+$fog_j":""))." (".gmstrftime($fog_config['heureformat'],$fog_time+3600*$fog_j).")";
		}
		$fog_smarty->assign('fuseaux',$fog_fuseaux);
		
		$fog_array = array();
		$fog_i=0;
		$fog_dirpath = FOG_DIR."skins/";
		if ($fog_dir = opendir($fog_dirpath)){
    		while ($fog_file = readdir($fog_dir))
       			if(is_dir($fog_dirpath.$fog_file) && FOGIsSkinValid($fog_file))
					$fog_array[$fog_i++] = $fog_file;
    		closedir($fog_dir);
		}
		$fog_smarty->assign('skins',$fog_array);
		
		$fog_array = array();
		$fog_i=0;
		$fog_dirpath = FOG_DIR."lang/";
		if ($fog_dir = opendir($fog_dirpath)){
    		while ($fog_file = readdir($fog_dir))
       			if(is_dir($fog_dirpath.$fog_file) && FOGIsLangValid($fog_file))
					$fog_array[$fog_i++] = $fog_file;
    		closedir($fog_dir);
		}
		$fog_smarty->assign('langs',$fog_array);
		
		unset($fog_fuseaux,$fog_array,$fog_result,$fog_i);
	}
	///////////////////
	//// TEXTES MAILS
	///////////////////

	elseif($fog_q == 1){
		$fog_config['mailstexts'] = explode('|FOGSPLIT|',htmlentities(stripslashes($fog_config['mailstexts'])));
		
		$fog_action = $_POST['fog_switch'];
		if($fog_action == 1){
			$fog_config['rangs'][0] = htmlentities(trim($_POST['fog_lvl0']));
			$fog_config['rangs'][1] = htmlentities(trim($_POST['fog_lvl1']));
			$fog_config['rangs'][2] = htmlentities(trim($_POST['fog_lvl2']));
			$fog_config['rangs'][3] = htmlentities(trim($_POST['fog_lvl3']));
			$fog_config['rangs'][4] = htmlentities(trim($_POST['fog_lvl4']));
			if($fog_user->row['rang'] > 4){
				$fog_config['rangs'][5] = htmlentities(trim($_POST['fog_lvl5']));
				$fog_config['rangs'][6] = htmlentities(trim($_POST['fog_lvl6']));
			}
			$fog_rangs = implode('|',$fog_config['rangs']);
			$fog_db->query("UPDATE ".FOG_TABLES_PREF."config SET rangs='$fog_rangs'");
			for($fog_i=0;$fog_i<count($fog_config['rangs']);$fog_i++)
				$fog_config['rangs'][$fog_i] = stripslashes($fog_config['rangs'][$fog_i]);
		}elseif($fog_action == 2){
			$fog_config['mailstexts'][0] = trim($_POST['fog_mail0']);
			$fog_config['mailstexts'][1] = trim($_POST['fog_mail1']);
			$fog_mailstexts = implode('|FOGSPLIT|',$fog_config['mailstexts']);
			$fog_config['mailstexts'] = explode('|FOGSPLIT|',htmlentities($fog_mailstexts));
			$fog_db->query("UPDATE ".FOG_TABLES_PREF."config SET mailstexts='$fog_mailstexts'");
			for($fog_i=0;$fog_i<count($fog_config['mailstexts']);$fog_i++)
				$fog_config['mailstexts'][$fog_i] = stripslashes($fog_config['mailstexts'][$fog_i]);
		}
	}
	////////////////
	// SMILIES
	///////////////
	elseif($fog_q == 2){
		if($fog_action == 1){
			$fog_smiley = FOGGetElt($_GET['fog_smiley'],'smileys','issmiley,isicon,code,id');
			if(!empty($fog_smiley) && isset($_POST['fog_posted'])){
				$fog_smiley['issmiley'] = isset($_POST['fog_issmiley'])?1:0;
				$fog_smiley['isicon'] = isset($_POST['fog_isicon'])?1:0;
				$fog_smiley['code'] = htmlentities($_POST['fog_code']);
				
				if($fog_smiley['code'] != "" || !($fog_smiley['isicon'] || $fog_smiley['issmiley']))
					$fog_db->query("UPDATE ".FOG_TABLES_PREF."smileys set issmiley='".$fog_smiley['issmiley']."',isicon='".$fog_smiley['isicon']."',code='".$fog_smiley['code']."' where id='".$fog_smiley['id']."'");
			}
			$fog_smiley['code'] = stripslashes($fog_smiley['code']);
			$fog_smarty->assign('smiley',$fog_smiley);
		}elseif($fog_action == 2 || $fog_action == 3){
			$fog_smiley = FOGGetElt($_GET['fog_smiley'],'smileys','ordre');
			if(!empty($fog_smiley)){
				$fog_qsigne = ($fog_action == 3)?'>':'<';
				$fog_qsens = ($fog_action == 3)?'asc':'desc';
				$fog_smileybis = $fog_db->fetch_row($fog_db->query("SELECT ordre,id from ".FOG_TABLES_PREF."smileys where ordre $fog_qsigne '".$fog_smiley['ordre']."' order by ordre $fog_qsens limit 1"));
				if(!empty($fog_smileybis)){
					$fog_db->query('UPDATE '.FOG_TABLES_PREF."smileys set ordre='".$fog_smileybis[0]."' where id='".$_GET['fog_smiley']."'");
					$fog_db->query('UPDATE '.FOG_TABLES_PREF."smileys set ordre='".$fog_smiley['ordre']."' where id='".$fog_smileybis[1]."'");
				}
				unset($fog_smiley,$fog_smileybis,$fog_qsigne,$fog_qsens);
			}
		}
                
		$fog_icons = FOGChopeSmileys('isicon');
		$fog_tablesmileys = FOGTableKeysToVals(FOGChopeSmileys('issmiley'));                
                
		
		$fog_action = isset($_POST['fog_switch'])?$_POST['fog_switch']:0;
		if($fog_action == 1 && !empty($_POST['fog_dispo'])){
			$fog_row = $fog_db->fetch_assoc($fog_db->query("SELECT ordre from ".FOG_TABLES_PREF."smileys order by ordre desc limit 1"));
			$fog_db->query("INSERT into ".FOG_TABLES_PREF."smileys (id,ordre) VALUES('".$_POST['fog_dispo']."','".($fog_row['ordre']+1)."')");
		}elseif($fog_action == 2){
			$fog_query = "('".(is_array($_POST['fog_selectedsmileys'])?implode("','",$_POST['fog_selectedsmileys']):$_POST['fog_selectedsmileys'])."')";
			$fog_db->query("DELETE from ".FOG_TABLES_PREF."smileys where id IN $fog_query");
		}
		
		$fog_existent = array();
		$fog_array = array();
		$fog_i = 0;
		$fog_db->query("SELECT issmiley,isicon,code,id,ordre from ".FOG_TABLES_PREF."smileys order by ordre");
		while($fog_row = $fog_db->fetch_assoc()){
			$fog_array[$fog_i++] = $fog_row;
			$fog_existent[$fog_row['id']] = 1;
		}
		$fog_smarty->assign('smileys',$fog_array);

		$fog_array = array();
		$fog_i=0;
		$fog_dirpath = FOG_DIR."img/smileys/";
		if ($fog_dir = opendir($fog_dirpath)){
    		while ($fog_file = readdir($fog_dir))
       			if(is_file($fog_dirpath.$fog_file) && !isset($fog_existent[$fog_file])){
					$fog_file_info = getimagesize($fog_dirpath.$fog_file);
            		if ((strPos($fog_file,".jpg") && $fog_file_info[2] == 2)||(strPos($fog_file, ".gif") && $fog_file_info[2] == 1)||(strPos($fog_file, ".png") && $fog_file_info[2] == 3))
					  $fog_array[$fog_i++] = $fog_file;
				}
    		closedir($fog_dir);
		}
		$fog_smarty->assign('dispos',$fog_array);
		
		unset($fog_array,$fog_existent,$fog_row,$fog_i);
	}
	///////////////////////
	//// CENSURE
	///////////////////////
	elseif($fog_q == 3){

		if($fog_action == 1){
			$fog_avant = trim($_POST['fog_avant']);
			$fog_apres = trim($_POST['fog_apres']);
			$fog_regexp = isset($_POST['fog_regexp'])?1:0;
			if($fog_avant != "")
				$fog_db->query("INSERT into ".FOG_TABLES_PREF."censor (avant,apres,reg_exp) VALUES('$fog_avant','$fog_apres','$fog_regexp')") or die(mysql_error());
		}elseif($fog_action == 2){
			$fog_avant = $_GET['fog_avant'];
			if(isset($_POST['fog_posted'])){
				$fog_avans = $fog_avant;
				$fog_avant = trim($_POST['fog_avant']);
				$fog_apres = trim($_POST['fog_apres']);
				$fog_regexp = isset($_POST['fog_regexp'])?1:0;
				if($fog_avant != "")
					$fog_db->query("UPDATE ".FOG_TABLES_PREF."censor SET avant='$fog_avant',apres='$fog_apres',reg_exp='$fog_regexp' where avant='$fog_avans'");
			}
			$fog_word = $fog_db->fetch_assoc($fog_db->query("SELECT avant,apres,reg_exp from ".FOG_TABLES_PREF."censor where avant='$fog_avant' limit 1 "));
			$fog_smarty->assign('word',$fog_word);
		}elseif($_POST['fog_selectedwords']){
			$fog_query = "('".implode("','",(array) $_POST['fog_selectedwords'])."')";
			$fog_db->query("DELETE from ".FOG_TABLES_PREF."censor where avant IN $fog_query");
		}
		
		$fog_array = array();
		$fog_db->query("SELECT avant,apres from ".FOG_TABLES_PREF."censor");
		while($fog_row = $fog_db->fetch_assoc())
			$fog_array[] = $fog_row;
		$fog_smarty->assign('words',$fog_array);
		
		unset($fog_array,$fog_row,$fog_i);
	}
	//////////////////
	///// RANGS
	//////////////////
	elseif($fog_q == 4){

		$fog_array_users = array();
		$fog_i = 0;
		$fog_result = $fog_db->query('SELECT pseudo,id from '.FOG_TABLES_PREF.'users where rang<'.$fog_user->row['rang'].(($fog_user->row['rang'] == 6)?(' or id='.$fog_user->row['id']):''));
		while($fog_row = $fog_db->fetch_row($fog_result)){
			$fog_array_users['pseudo'][$fog_row[1]] = $fog_row[0];
			$fog_array_users['id'][$fog_row[1]] = $fog_row[1];
		}
		$fog_smarty->assign('users',$fog_array_users);

		if($fog_action == 1){
			$fog_mod = $_POST['fog_mod']?1:0;
			$fog_nb = $fog_mod?$_POST['fog_uid']:intval(trim($_POST['fog_nb']));
			$fog_txt = htmlentities(trim($_POST['fog_txt']));
			$fog_img = $_POST['fog_img'];
			if(!$fog_mod || in_array($fog_nb,$fog_array_users['id']))
				$fog_db->query('INSERT into '.FOG_TABLES_PREF.'ranks (nb,txt,img,mod) VALUES('.$fog_nb.',\''.$fog_txt.'\',\''.$fog_img.'\',\''.$fog_mod.'\')');
		}elseif($fog_action == 2){
			$fog_rankid = $_GET['fog_rankid'];
			if(isset($_POST['fog_posted'])){
				$fog_rank = $fog_db->fetch_assoc($fog_db->query('SELECT mod,nb,txt,img,id from '.FOG_TABLES_PREF.'ranks where id='.$fog_rankid.' limit 1 '));
				$fog_mod = $_POST['fog_mod']?1:0;
				$fog_nb = $fog_mod?$_POST['fog_uid']:intval(trim($_POST['fog_nb']));
				$fog_txt = htmlentities(trim($_POST['fog_txt']));
				$fog_img = $_POST['fog_img'];
				if((!$fog_rank['mod'] || in_array($fog_rank['nb'],$fog_array_users['id'])) && (!$fog_mod || in_array($fog_nb,$fog_array_users['id'])))
					$fog_db->query('UPDATE '.FOG_TABLES_PREF.'ranks SET nb='.$fog_nb.',txt=\''.$fog_txt.'\',img=\''.$fog_img.'\',mod=\''.$fog_mod.'\' where id='.$fog_rankid);
			}
			$fog_rank = $fog_db->fetch_assoc($fog_db->query('SELECT mod,nb,txt,img,id from '.FOG_TABLES_PREF.'ranks where id='.$fog_rankid.' limit 1 '));
			$fog_smarty->assign('rank',$fog_rank);
		}elseif($_POST['fog_selectedranks']){
			$fog_query = '('.implode(',',(array) $_POST['fog_selectedranks']).')';
			$fog_db->query('DELETE from '.FOG_TABLES_PREF.'ranks where id IN '.$fog_query);
		}
		
		
		$fog_i = 0;
		$fog_array = array();
		$result = $fog_db->query('SELECT mod,nb,txt,img,id from '.FOG_TABLES_PREF.'ranks order by nb');
		while($fog_row = $fog_db->fetch_assoc($result)){
			if(!$fog_row['mod'])
				$fog_array['nb'][$fog_i++] = $fog_row;
			elseif($fog_row['mod'] == 1){
				$fog_array['user'][$fog_i] = $fog_row;
				$fog_array['user'][$fog_i++]['user'] = $fog_ub->Get($fog_row['nb'],'pseudo');
			}
		}
		$fog_smarty->assign('ranks',$fog_array);
		
		$fog_array = array();
		$fog_i=0;
		$fog_dirpath = FOG_DIR.'img/ranks/';
		if ($fog_dir = opendir($fog_dirpath)){
    		while ($fog_file = readdir($fog_dir))
       			if(is_file($fog_dirpath.$fog_file)){
					$fog_file_info = getimagesize($fog_dirpath.$fog_file);
            		if ((strPos($fog_file,'.jpg') && $fog_file_info[2] === 2)||(strPos($fog_file, '.gif') && $fog_file_info[2] === 1)||(strPos($fog_file, '.png') && $fog_file_info[2] === 3))
					  $fog_array[$fog_i++] = $fog_file;
				}
    		closedir($fog_dir);
		}
		$fog_smarty->assign('dispos',$fog_array);
		
		unset($$fog_array,$fog_existent,$fog_row,$fog_i);
	}
	////////////////////////
	///// SKINS
	////////////////////////
	elseif($fog_q == 5){
		$fog_array = array_keys($fog_custom);

		switch($fog_action){
			case 1:
				$fog_config['_custom'] = array();
				$fog_db->query("UPDATE ".FOG_TABLES_PREF."persos SET val='' where id='0'");
				break;
			case 3:
				$fog_smarty->display = false;
				header('Content-disposition: filename=fog_skin_template.fst');
				header('Content-type: text/fog-forum-skin-template');
				header('Pragma: no-cache');
				header('Expires: 0');
				echo 'Content-type=text/fog-forum-skin-template&';
				echo 'Content-version='.urlencode(FOG_MAJOUR_VERSION).'&';
				foreach($fog_config['_custom'] as $fog_key=>$fog_val)
					echo $fog_key.'='.urlencode($fog_val).'&';
				break;
			case 4:
				$fog_fsp = $_FILES['fog_imported_fsp']['tmp_name'];
				if(!empty($fog_fsp)){
					$fog_fsp_name = FOGUniqueID($_FILES['fog_imported_fsp']['name']);
					$fog_fsp_dest = FOG_DIR.'tmp/'.$fog_fsp_name;
					move_uploaded_file($fog_fsp,$fog_fsp_dest);
					$fog_file = fopen($fog_fsp_dest,'r');
					$fog_fcontent = trim(fgets($fog_file,filesize($fog_fsp_dest)));
					$fog_props = array();
					parse_str($fog_fcontent,$fog_props);
					fclose($fog_file);
					unlink($fog_fsp_dest);
					if($fog_props['Content-type'] == 'text/fog-forum-skin-template'){
						$fog_config['_custom'] = array();
						while(list($fog_key,$fog_val) = each($fog_props)){
							if(!in_array($fog_key,$fog_array)) continue;
							$fog_config['_custom'][$fog_key] = $fog_val;
							$fog_query[] = $fog_key.'='.urlencode($fog_val);
						}
						$fog_query = implode('&', (array)$fog_query);

						//$fog_db->query("UPDATE ".FOG_TABLES_PREF."persos SET val='$fog_query' where id='0'");
					}
				}
				break;
			case 5:
				$fog_fsp = FOGGetElt($_POST['fog_load_stpl'],'perso_templates','val');
				if(!empty($fog_fsp)){
					parse_str($fog_fsp['val'],$fog_props);
					$fog_config['_custom'] = array();
					while(list($fog_key,$fog_val) = each($fog_props)){
						if(!in_array($fog_key,$fog_array)) continue;
						$fog_config['_custom'][$fog_key] = $fog_val;
						$fog_query[] = $fog_key."=".urlencode($fog_val);
					}
					$fog_query = implode('&', (array)$fog_query);

					//$fog_db->query("UPDATE ".FOG_TABLES_PREF."persos SET val='$fog_query' where id='0'");
				}
				break;
			case 6:
				$fog_db->query("DELETE from ".FOG_TABLES_PREF."perso_templates where id='".$_POST['fog_load_stpl']."'");
				break;
		}

		if(isset($_POST['fog_posted'])){
			$fog_query = array();

			foreach($fog_array as $fog_val){
				if(isset($_POST['fog_custom_'.$fog_val]) && !empty($_POST['fog_custom_'.$fog_val])){
					$fog_config['_custom'][$fog_val] = $_POST['fog_custom_'.$fog_val];
					$fog_query[] = $fog_val."=".urlencode($fog_config['_custom'][$fog_val]);
				}elseif(isset($fog_config['_custom'][$fog_val]))
					unset($fog_config['_custom'][$fog_val]);
			}
			$fog_query = implode('&', $fog_query);

			if(isset($_POST['fog_savecurrent']))
				$fog_db->query("UPDATE ".FOG_TABLES_PREF."persos SET val='$fog_query' where id='0'");

			if(isset($_POST['fog_savetpl']))
				if($_POST['fog_tpl_mod'])
					$fog_db->query("UPDATE ".FOG_TABLES_PREF."perso_templates SET val='$fog_query' where id='".$_POST['fog_ow_tpl']."'");
				elseif(($fog_nom = trim(htmlentities($_POST['fog_tpl_name']))) != "")
					$fog_db->query("INSERT into ".FOG_TABLES_PREF."perso_templates (nom,val,skin) VALUES ('$fog_nom','$fog_query','$fog_skin')");

			if(isset($_POST['fog_savetpl']))
				$fog_smarty->assign('savetpl',$_POST['fog_savetpl']);
			if(isset($_POST['fog_savecurrent']))
				$fog_smarty->assign('savecurrent',!$_POST['fog_savecurrent']);
			$fog_smarty->assign('tpl_mod',$_POST['fog_tpl_mod']);
			if(isset($_POST['fog_ow_tpl']))
				$fog_smarty->assign('ow_tpl',$_POST['fog_ow_tpl']);
		}

		
		if(isset($fog_array)){
			$fog_db->query("SELECT nom,id from ".FOG_TABLES_PREF."perso_templates WHERE skin='$fog_skin'");
			$fog_stpls = array();
			while($fog_row = $fog_db->fetch_assoc())
				$fog_stpls[] = $fog_row;
			$fog_smarty->assign('stpls',$fog_stpls);

			$fog_smarty->assign('array',$fog_array);
		}
		$fog_smarty->assign('enabled',!empty($fog_array));

		unset($fog_result,$fog_array,$fog_row,$fog_i);

	}

	$fog_smarty->assign('q',$fog_q);
	$fog_smarty->assign('action',$fog_action);
	unset($fog_q,$fog_action);
}
?>

Eléphant du PHP | 172 Messages

09 déc. 2012, 16:46

et ici la partie compilé sur le serveur si çà peut aider ?
<?php /* Smarty version 2.6.2, created on 2012-11-07 19:05:05
         compiled from admin/aff.tpl */ ?>
<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'admin/aff.tpl', 17, false),array('function', 'cycle', 'admin/aff.tpl', 310, false),array('modifier', 'default', 'admin/aff.tpl', 315, false),array('modifier', 'urlencode', 'admin/aff.tpl', 344, false),)), $this); ?>
<script language="JavaScript">fogPopMenu(1)</script>
<?php if (! $this->_tpl_vars['q']): ?> 
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff" method="post">
  <input type="hidden" name="fog_posted" value="1">
  <table align="center" cellspacing="0">
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="2">
      --[<?php echo $this->_tpl_vars['lang']['general_displaying']; ?>
]--
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['default_skin']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <select name="fog_skin" class="FOGInput">
        <?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['skins'],'output' => $this->_tpl_vars['skins'],'selected' => $this->_tpl_vars['config']['skin']), $this);?>

      </select>
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['default_lang']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <select name="fog_lang" class="FOGInput">
        <?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['langs'],'output' => $this->_tpl_vars['langs'],'selected' => $this->_tpl_vars['config']['lang']), $this);?>

      </select>
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['default_timezone']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <select name="fog_fuseau" class="FOGInput">
      <?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['fuseaux']['value'],'output' => $this->_tpl_vars['fuseaux']['txt'],'selected' => $this->_tpl_vars['config']['fuseau']), $this);?>

    </select>
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['dates_format']; ?>
<bR><em><?php echo $this->_tpl_vars['lang']['help']['strftime']; ?>
</em>
    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_dateformat" value="<?php echo $this->_tpl_vars['config']['dateformat']; ?>
">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['hours_format']; ?>
<bR><em><?php echo $this->_tpl_vars['lang']['help']['strftime']; ?>
</em>
    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_heureformat" value="<?php echo $this->_tpl_vars['config']['heureformat']; ?>
">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['nb_replies_page']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_nbrep" value="<?php echo $this->_tpl_vars['config']['maxs4aff'][0]; ?>
" size="3">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['nb_topics_page']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_nbtopics" value="<?php echo $this->_tpl_vars['config']['maxs4aff'][1]; ?>
" size="3">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['nb_posts_when_replying']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_nbrepmess" value="<?php echo $this->_tpl_vars['config']['maxs4aff'][4]; ?>
" size="3">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['nb_replies_popular']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_nbpop" value="<?php echo $this->_tpl_vars['config']['maxs4aff'][3]; ?>
" size="3">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['only_topics_for']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <select name="fog_depuis" class="FOGInput">
        <option value="0"><?php echo $this->_tpl_vars['lang']['beginning']; ?>
</option>
        <option value="1" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '1'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_1day']; ?>
</option>
        <option value="3" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '3'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_3days']; ?>
</option>
        <option value="7" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '7'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_1week']; ?>
</option>
        <option value="15" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '15'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_2weeks']; ?>
</option>
        <option value="30" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '30'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_1month']; ?>
</option>
        <option value="61" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '61'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_2months']; ?>
</option>
        <option value="183" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '183'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_6months']; ?>
</option>
        <option value="365" <?php if ($this->_tpl_vars['config']['maxs4aff'][2] == '365'): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['lang']['dates']['_1year']; ?>
</option>
    </select>
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
      <input type="checkbox" value="1" name="fog_hideforums" <?php if ($this->_tpl_vars['config']['maxs4aff'][5]): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['hide_forums']; ?>
<br>
	  <?php echo $this->_tpl_vars['lang']['show_windows']; ?>
 : <br>
	  <input type="checkbox" value="1" name="fog_fenetres0" <?php if ($this->_tpl_vars['config']['fenetres'][0]): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['online']; ?>
<br>
	  <input type="checkbox" value="1" name="fog_fenetres1" <?php if ($this->_tpl_vars['config']['fenetres'][1]): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['small_stats']; ?>
<br>
	  <input type="checkbox" value="1" name="fog_fenetres2" <?php if ($this->_tpl_vars['config']['fenetres'][2]): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['news']; ?>
<br>
	  <input type="checkbox" value="1" name="fog_fenetres3" <?php if ($this->_tpl_vars['config']['fenetres'][3]): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['module_news']; ?>
<br>
    </td>
  </tr>
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="2">
      :: <?php echo $this->_tpl_vars['lang']['confirmation']; ?>
 ::
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
      <input type="reset" class="FOGInput" value=":: <?php echo $this->_tpl_vars['lang']['reset']; ?>
 ::">&nbsp;&nbsp;
    <input type="submit" class="FOGInput" value=":: <?php echo $this->_tpl_vars['lang']['submit']; ?>
 ::">
    </td>
  </tr>  
  </table>
  </form> 
<?php else:  if ($this->_tpl_vars['q'] == 1): ?> 
  <table align="center" cellspacing="0"> 
    <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=1" method="post">
    <input type="hidden" name="fog_switch" value="1">
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="2">
      --[<?php echo $this->_tpl_vars['lang']['ranks_texts']; ?>
]--
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][0]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl0" value="<?php echo $this->_tpl_vars['config']['rangs'][0]; ?>
" size="30")>
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][1]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl1" value="<?php echo $this->_tpl_vars['config']['rangs'][1]; ?>
" size="30">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][2]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl2" value="<?php echo $this->_tpl_vars['config']['rangs'][2]; ?>
" size="30">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][3]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl3" value="<?php echo $this->_tpl_vars['config']['rangs'][3]; ?>
" size="30">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][4]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl4" value="<?php echo $this->_tpl_vars['config']['rangs'][4]; ?>
" size="30">
    </td>
  </tr>
  <?php if ($this->_tpl_vars['user']->row['rang'] > 5): ?>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][5]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl5" value="<?php echo $this->_tpl_vars['config']['rangs'][5]; ?>
" size="30">
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['ranks'][6]; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <input class="FOGInput" name="fog_lvl6" value="<?php echo $this->_tpl_vars['config']['rangs'][6]; ?>
" size="30">
    </td>
  </tr>
  <?php endif; ?>
    <tr>
    <td class="FOGContent2" style="text-align:center" colspan="2">
      :: <?php echo $this->_tpl_vars['lang']['confirmation']; ?>
 ::
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
      <input type="reset" class="FOGInput" value=":: <?php echo $this->_tpl_vars['lang']['reset']; ?>
 ::">&nbsp;&nbsp;
    <input type="submit" class="FOGInput" value=":: <?php echo $this->_tpl_vars['lang']['submit']; ?>
 ::">
    </td>
  </tr>
  </form>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=1" method="post">
    <input type="hidden" name="fog_switch" value="2">
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="2">
      --[<?php echo $this->_tpl_vars['lang']['mails_texts']; ?>
]--
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['mails_header']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <textarea class="FOGTextarea" name="fog_mail0" cols="60" rows="4"><?php echo $this->_tpl_vars['config']['mailstexts'][0]; ?>
</textarea>
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right">
      <?php echo $this->_tpl_vars['lang']['mails_footer']; ?>

    </td>
    <td class="FOGContent" style="text-align:center">
      <textarea class="FOGTextarea" name="fog_mail1" cols="60" rows="4"><?php echo $this->_tpl_vars['config']['mailstexts'][1]; ?>
</textarea>
    </td>
  </tr>
    <tr>
    <td class="FOGContent2" style="text-align:center" colspan="2">
      :: <?php echo $this->_tpl_vars['lang']['confirmation']; ?>
 ::
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
      <input type="reset" class="FOGInput" value=":: <?php echo $this->_tpl_vars['lang']['reset']; ?>
 ::">&nbsp;&nbsp;
    <input type="submit" class="FOGInput" value=":: <?php echo $this->_tpl_vars['lang']['submit']; ?>
 ::">
    </td>
  </tr>
  </form>    
  </table> 
<?php else:  if ($this->_tpl_vars['q'] == 2): ?> 
  <table align="center" cellspacing="0">
    <?php if (! empty ( $this->_tpl_vars['smiley'] )): ?>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=2&fog_action=1&fog_smiley=<?php echo $this->_tpl_vars['smiley']['id']; ?>
" method="post">
  <input type="hidden" name="fog_posted" value="1">
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="6">
      --[<?php echo $this->_tpl_vars['lang']['image_edition']; ?>
]--
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;">&nbsp;</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['smiley']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['icon']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['smiley_code']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline" colspan="2">&nbsp;</td>
  </tr>  
  <tr>
    <td class="FOGContent" style="text-align:center;"><img src="<?php echo $this->_tpl_vars['fog_dir']; ?>
img/smileys/<?php echo $this->_tpl_vars['smiley']['id']; ?>
" alt="<?php echo $this->_tpl_vars['smiley']['id']; ?>
"></td>
    <td class="FOGContent" style="text-align:center;"><input type="checkbox" name="fog_issmiley" value="1" <?php if ($this->_tpl_vars['smiley']['issmiley']): ?>checked<?php endif; ?>></td>
    <td class="FOGContent" style="text-align:center;"><input type="checkbox" name="fog_isicon" value="1" <?php if ($this->_tpl_vars['smiley']['isicon']): ?>checked<?php endif; ?>></td>
    <td class="FOGContent" style="text-align:center;"><input size="5" class="FOGInput" name="fog_code" value="<?php echo $this->_tpl_vars['smiley']['code']; ?>
"></td>
    <td class="FOGContent" style="text-align:center;" colspan="2"><input type="submit" class="FOGInput" value="OK"></td>
  </tr>
  </form>
  <?php endif; ?>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=2" method="post">
  <input type="hidden" name="fog_switch" value="1">
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="6">
      --[<?php echo $this->_tpl_vars['lang']['add_image_from']; ?>
 <?php echo $this->_tpl_vars['fog_dir']; ?>
img/smileys]--
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:right" colspan="4">
      <?php echo $this->_tpl_vars['lang']['availables']; ?>
 : <select class="FOGInput" name="fog_dispo">
      <?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['dispos'],'output' => $this->_tpl_vars['dispos']), $this);?>

    </select>
    </td>
    <td class="FOGContent" style="text-align:center" colspan="2">
      <input class="FOGInput" type="submit" value="OK">
    </td>
  </tr>
  </form>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=2" method="post">
  <input type="hidden" name="fog_switch" value="2">
    <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="6">
      --[<?php echo $this->_tpl_vars['lang']['installed_smilies']; ?>
]--
    </td>
  </tr>
    <tr>
    <td class="FOGContent" style="text-align:right" colspan="6">
      <input type="submit" value="<?php echo $this->_tpl_vars['lang']['do_delete']; ?>
" class="FOGInput">
    </td>
  </tr>  
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;">&nbsp;</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['smiley']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['icon']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['smiley_code']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['actions']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;">&nbsp;</td>
  </tr>
  <?php if (count($_from = (array)$this->_tpl_vars['smileys'])):
    foreach ($_from as $this->_tpl_vars['smiley']):
?>
  <?php echo smarty_function_cycle(array('values' => "FOGContent,FOGContent3",'assign' => 'class'), $this);?>

  <tr>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><img src="<?php echo $this->_tpl_vars['fog_dir']; ?>
img/smileys/<?php echo $this->_tpl_vars['smiley']['id']; ?>
" alt="<?php echo $this->_tpl_vars['smiley']['id']; ?>
"></td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php if ($this->_tpl_vars['smiley']['issmiley']):  echo $this->_tpl_vars['lang']['yes'];  else:  echo $this->_tpl_vars['lang']['no'];  endif; ?></td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php if ($this->_tpl_vars['smiley']['isicon']):  echo $this->_tpl_vars['lang']['yes'];  else:  echo $this->_tpl_vars['lang']['no'];  endif; ?></td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php echo ((is_array($_tmp=@$this->_tpl_vars['smiley']['code'])) ? $this->_run_mod_handler('default', true, $_tmp, "&nbsp") : smarty_modifier_default($_tmp, "&nbsp")); ?>
</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;">
    <a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=2&fog_action=1&fog_smiley=<?php echo $this->_tpl_vars['smiley']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['skin_dir']; ?>
status/editer.gif" border="0" alt="<?php echo $this->_tpl_vars['lang']['help']['edit']; ?>
"></a>
    <a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=2&fog_action=2&fog_smiley=<?php echo $this->_tpl_vars['smiley']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['skin_dir']; ?>
status/fleche_haut.gif" border="0" alt="<?php echo $this->_tpl_vars['lang']['help']['up']; ?>
"></a>
    <a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=2&fog_action=3&fog_smiley=<?php echo $this->_tpl_vars['smiley']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['skin_dir']; ?>
status/fleche_bas.gif" border="0" alt=" <?php echo $this->_tpl_vars['lang']['help']['down']; ?>
"></a>
    </td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><input type="checkbox" name="fog_selectedsmileys[]" value="<?php echo $this->_tpl_vars['smiley']['id']; ?>
"></tD>
  </tr>
  <?php endforeach; unset($_from); endif; ?>
  <tr>
    <td class="FOGContent" style="text-align:right" colspan="6">
      <input type="submit" value="<?php echo $this->_tpl_vars['lang']['do_delete']; ?>
" class="FOGInput" onclick="javascript:return confirm('<?php echo $this->_tpl_vars['lang']['are_you_sure']; ?>
');">
    </td>
  </tr>  
  </form>
   </table>
<?php else:  if ($this->_tpl_vars['q'] == 3): ?> 
<table align="center" cellspacing="0">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="4">
      --[<?php echo $this->_tpl_vars['lang']['censor']; ?>
]--
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center" colspan="4">
      <em><?php echo $this->_tpl_vars['lang']['help']['censor']; ?>
</em>
    </td>
  </tr>
  <?php if ($this->_tpl_vars['word']): ?>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=3&fog_action=2&fog_avant=<?php echo ((is_array($_tmp=$this->_tpl_vars['word']['avant'])) ? $this->_run_mod_handler('urlencode', true, $_tmp) : urlencode($_tmp)); ?>
" method="post">
  <input type="hidden" name="fog_posted" value="1">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="4">
      ::<?php echo $this->_tpl_vars['lang']['censor_edit']; ?>
::
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['before']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['after']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;" colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;"><input name="fog_avant" class="FOGInput" value="<?php echo $this->_tpl_vars['word']['avant']; ?>
"><br><input type="checkbox" name="fog_regexp" <?php if ($this->_tpl_vars['word']['reg_exp']): ?>checked<?php endif; ?>><?php echo $this->_tpl_vars['lang']['regexp']; ?>
</td>
    <td class="FOGContent" style="text-align:center;"><textarea name="fog_apres" class="FOGTextarea" cols="40" rows="3"><?php echo $this->_tpl_vars['word']['apres']; ?>
</textarea></td>
    <td class="FOGContent" style="text-align:center;" colspan="2"><input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['OK']; ?>
"></tD>
  </tr>
  </form>
  <?php endif; ?>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=3&fog_action=1" method="post">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="4">
      ::<?php echo $this->_tpl_vars['lang']['censor_add']; ?>
::
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['before']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['after']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;" colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;"><input name="fog_avant" class="FOGInput"><br><input type="checkbox" name="fog_regexp"><?php echo $this->_tpl_vars['lang']['regexp']; ?>
</td>
    <td class="FOGContent" style="text-align:center;"><textarea name="fog_apres" class="FOGTextarea" cols="40" rows="3"></textarea></td>
    <td class="FOGContent" style="text-align:center;" colspan="2"><input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['OK']; ?>
"></tD>
  </tr>
  </form>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=3" method="post">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="4">
      ::<?php echo $this->_tpl_vars['lang']['censor_view']; ?>
::
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['before']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['after']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['actions']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;">&nbsp;</td>
  </tr>
  <?php if (count($_from = (array)$this->_tpl_vars['words'])):
    foreach ($_from as $this->_tpl_vars['word']):
?>
  <?php echo smarty_function_cycle(array('values' => "FOGContent,FOGContent3",'assign' => 'class'), $this);?>

  <tr>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php echo $this->_tpl_vars['word']['avant']; ?>
</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php echo ((is_array($_tmp=@$this->_tpl_vars['word']['apres'])) ? $this->_run_mod_handler('default', true, $_tmp, "&nbsp;") : smarty_modifier_default($_tmp, "&nbsp;")); ?>
</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;">
      <a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=3&fog_action=2&fog_avant=<?php echo ((is_array($_tmp=$this->_tpl_vars['word']['avant'])) ? $this->_run_mod_handler('urlencode', true, $_tmp) : urlencode($_tmp)); ?>
"><img src="<?php echo $this->_tpl_vars['skin_dir']; ?>
status/editer.gif" border="0" alt="<?php echo $this->_tpl_vars['lang']['help']['edit']; ?>
"></a>
    </td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><input type="checkbox" name="fog_selectedwords[]" value="<?php echo $this->_tpl_vars['word']['avant']; ?>
"></tD>
  </tr>
  <?php endforeach; unset($_from); endif; ?>
  <tr>
    <td class="FOGContent" style="text-align:right" colspan="4">
      <input type="submit" value="<?php echo $this->_tpl_vars['lang']['do_delete']; ?>
" class="FOGInput">
    </td>
  </tr>  
  </form>
</table>
<?php else:  if ($this->_tpl_vars['q'] == 4): ?> 
<table align="center" cellspacing="0">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="5">
      --[<?php echo $this->_tpl_vars['lang']['custom_ranks']; ?>
]--
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center" colspan="5">
      <em><?php echo $this->_tpl_vars['lang']['help']['custom_ranks']; ?>
</em>
    </td>
  </tr>
  <?php if ($this->_tpl_vars['rank']): ?>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=4&fog_action=2&fog_rankid=<?php echo $this->_tpl_vars['rank']['id']; ?>
" method="post">
  <input type="hidden" name="fog_posted" value="1">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="5">
      ::<?php echo $this->_tpl_vars['lang']['edit']; ?>
::
    </td>
  </tr>
  <tr>
  	<td class="FOGContent" colspan="2" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['txt']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['img']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;" colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td class="FOGContent" colspan="2" style="text-align:center;"><input name="fog_txt" class="FOGInput" size="40" value="<?php echo $this->_tpl_vars['rank']['txt']; ?>
"></td>
    <td class="FOGContent" style="text-align:center;">
	  <select name="fog_img" class="FOGInput">
	    <option value=""><?php echo $this->_tpl_vars['lang']['none']; ?>
</option>
		<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['dispos'],'output' => $this->_tpl_vars['dispos'],'selected' => $this->_tpl_vars['rank']['img']), $this);?>

	  </select>
	</td>
    <td class="FOGContent" style="text-align:center;" colspan="2" rowspan="2"><input class="FOGInput" type="reset" value="<?php echo $this->_tpl_vars['lang']['reset']; ?>
"><br><br><input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['submit']; ?>
"></tD>
  </tr>
  <tr>
	<td class="FOGContent" style="text-align:center;" colspan="2">
	  &nbsp;&nbsp;<input type="radio" <?php if ($this->_tpl_vars['rank']['mod'] == 1): ?>checked<?php endif; ?> name="fog_mod" value="1"><?php echo $this->_tpl_vars['lang']['user']; ?>
 : 	  
      <select name="fog_uid" class="FOGInput">
        <?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['users']['id'],'output' => $this->_tpl_vars['users']['pseudo'],'selected' => $this->_tpl_vars['rank']['nb']), $this);?>

      </select>
	</td>
    <td class="FOGContent" style="text-align:center;">
	  <input type="radio" <?php if (! $this->_tpl_vars['rank']['mod']): ?>checked<?php endif; ?> name="fog_mod" value="0"><?php echo $this->_tpl_vars['lang']['nb']; ?>
 : <input name="fog_nb" class="FOGInput" size="5" value="<?php if (! $this->_tpl_vars['rank']['mod']):  echo $this->_tpl_vars['rank']['nb'];  else: ?>0<?php endif; ?>">
	</td>
  </tr>
  </form>
  <?php endif; ?>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=4&fog_action=1" method="post">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="5">
      ::<?php echo $this->_tpl_vars['lang']['add']; ?>
::
    </td>
  </tr>
  <tr>
  	<td class="FOGContent" colspan="2" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['txt']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['img']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;" colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td class="FOGContent" colspan="2" style="text-align:center;"><input name="fog_txt" class="FOGInput" size="40"></td>
    <td class="FOGContent" style="text-align:center;">
	  <select name="fog_img" class="FOGInput">
	    <option value=""><?php echo $this->_tpl_vars['lang']['none']; ?>
</option>
		<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['dispos'],'output' => $this->_tpl_vars['dispos']), $this);?>

	  </select>
	</td>
    <td class="FOGContent" style="text-align:center;" colspan="2" rowspan="2"><input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['submit']; ?>
"></tD>
  </tr>
  <tr>
	<td class="FOGContent" style="text-align:center;" colspan="2">
	  &nbsp;&nbsp;<input type="radio" name="fog_mod" value="1"><?php echo $this->_tpl_vars['lang']['user']; ?>
 : 	  
      <select name="fog_uid" class="FOGInput">
        <?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['users']['id'],'output' => $this->_tpl_vars['users']['pseudo'],'selected' => $this->_tpl_vars['user']->cookie->params['selected_user']), $this);?>

      </select>
	</td>
    <td class="FOGContent" style="text-align:center;">
	  <input type="radio" checked name="fog_mod" value="0"><?php echo $this->_tpl_vars['lang']['nb']; ?>
 : <input name="fog_nb" class="FOGInput" size="5" value="0">
	</td>
  </tr>
  </form>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=4" method="post">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="5">
      ::<?php echo $this->_tpl_vars['lang']['existing_ranks']; ?>
 (<?php echo $this->_tpl_vars['lang']['nb']; ?>
)::
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['nb']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['txt']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['img']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['actions']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;">&nbsp;</td>
  </tr>
  <?php if (count($_from = (array)$this->_tpl_vars['ranks']['nb'])):
    foreach ($_from as $this->_tpl_vars['rank']):
?>
  <?php echo smarty_function_cycle(array('values' => "FOGContent,FOGContent3",'assign' => 'class'), $this);?>

  <tr>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php echo $this->_tpl_vars['rank']['nb']; ?>
</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php echo ((is_array($_tmp=@$this->_tpl_vars['rank']['txt'])) ? $this->_run_mod_handler('default', true, $_tmp, "&nbsp;") : smarty_modifier_default($_tmp, "&nbsp;")); ?>
</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;">
      <?php if ($this->_tpl_vars['rank']['img'] != ""): ?>
        <img src="<?php echo $this->_tpl_vars['fog_dir']; ?>
img/ranks/<?php echo $this->_tpl_vars['rank']['img']; ?>
">
      <?php else: ?>&nbsp;<?php endif; ?>
	</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;">
      <a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=4&fog_action=2&fog_rankid=<?php echo $this->_tpl_vars['rank']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['skin_dir']; ?>
status/editer.gif" border="0" alt="<?php echo $this->_tpl_vars['lang']['help']['edit']; ?>
"></a>
    </td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><input type="checkbox" name="fog_selectedranks[]" value="<?php echo $this->_tpl_vars['rank']['id']; ?>
"></tD>
  </tr>
  <?php endforeach; unset($_from); endif; ?>
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="5">
      ::<?php echo $this->_tpl_vars['lang']['existing_ranks']; ?>
 (<?php echo $this->_tpl_vars['lang']['user']; ?>
)::
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['user']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['txt']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['img']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;text-decoration:underline"><?php echo $this->_tpl_vars['lang']['actions']; ?>
</td>
    <td class="FOGContent" style="text-align:center;font-weight:bold;">&nbsp;</td>
  </tr>
  <?php if (count($_from = (array)$this->_tpl_vars['ranks']['user'])):
    foreach ($_from as $this->_tpl_vars['rank']):
?>
  <?php echo smarty_function_cycle(array('values' => "FOGContent,FOGContent3",'assign' => 'class'), $this);?>

  <tr>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=profil&fog_uid=<?php echo $this->_tpl_vars['rank']['user']['id']; ?>
"><?php echo $this->_tpl_vars['rank']['user']['pseudo']; ?>
</a></td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><?php echo ((is_array($_tmp=@$this->_tpl_vars['rank']['txt'])) ? $this->_run_mod_handler('default', true, $_tmp, "&nbsp;") : smarty_modifier_default($_tmp, "&nbsp;")); ?>
</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;">
      <?php if ($this->_tpl_vars['rank']['img'] != ""): ?>
        <img src="<?php echo $this->_tpl_vars['fog_dir']; ?>
img/ranks/<?php echo $this->_tpl_vars['rank']['img']; ?>
">
      <?php else: ?>&nbsp;<?php endif; ?>
	</td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;">
      <a class="FOG" href="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=4&fog_action=2&fog_rankid=<?php echo $this->_tpl_vars['rank']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['skin_dir']; ?>
status/editer.gif" border="0" alt="<?php echo $this->_tpl_vars['lang']['help']['edit']; ?>
"></a>
    </td>
    <td class="<?php echo $this->_tpl_vars['class']; ?>
" style="text-align:center;"><input type="checkbox" name="fog_selectedranks[]" value="<?php echo $this->_tpl_vars['rank']['id']; ?>
"></tD>
  </tr>
  <?php endforeach; unset($_from); endif; ?>
  <tr>
    <td class="FOGContent" style="text-align:right" colspan="5">
      <input type="submit" value="<?php echo $this->_tpl_vars['lang']['do_delete']; ?>
" class="FOGInput">
    </td>
  </tr>  
  </form>
</table>
<?php else: ?> 

<table align="center" cellspacing="0">
  <tr>
    <td class="FOGContent2" style="text-align:center;font-weight:bold" colspan="2">
      --[<?php echo $this->_tpl_vars['lang']['skin_personalization']; ?>
]--
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
      <em><?php echo $this->_tpl_vars['lang']['help']['skin_personalization']; ?>
</em>
    </td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
	    <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=5&fog_action=4"  enctype="multipart/form-data" method="post">
		  <a class="FOG" href="<?php echo $this->_tpl_vars['fog_popup_url']; ?>
fog_r=admin&fog_p=aff&fog_q=5&fog_action=1"><?php echo $this->_tpl_vars['lang']['reset_skin_personalization']; ?>
</a><br>
		  <a class="FOG" target="_blank" href="<?php echo $this->_tpl_vars['fog_popup_url']; ?>
fog_r=admin&fog_p=aff&fog_q=5&fog_action=3"><?php echo $this->_tpl_vars['lang']['export_skin_personalization']; ?>
</a><br>
		  <?php echo $this->_tpl_vars['lang']['import_skin_personalization']; ?>
 :<br>
		  <input class="FOGInput" type="file" accept="text/fog-forum-skin-template" name="fog_imported_fsp">
		  <input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['submit']; ?>
">
		</form>
		<form  action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=5&fog_action=5" method="post">
		  <?php echo $this->_tpl_vars['lang']['load_stpl']; ?>
 : <select name="fog_load_stpl" class="FOGInput">
		    <?php if (count($_from = (array)$this->_tpl_vars['stpls'])):
    foreach ($_from as $this->_tpl_vars['stpl']):
?><option value="<?php echo $this->_tpl_vars['stpl']['id']; ?>
"><?php echo $this->_tpl_vars['stpl']['nom']; ?>
</option><?php endforeach; unset($_from); endif; ?>
		  </select>
		  <input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['submit']; ?>
">
		</form>
		<form  action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=5&fog_action=6" method="post">
		  <?php echo $this->_tpl_vars['lang']['delete_stpl']; ?>
 : <select name="fog_load_stpl" class="FOGInput">
		    <?php if (count($_from = (array)$this->_tpl_vars['stpls'])):
    foreach ($_from as $this->_tpl_vars['stpl']):
?><option value="<?php echo $this->_tpl_vars['stpl']['id']; ?>
"><?php echo $this->_tpl_vars['stpl']['nom']; ?>
</option><?php endforeach; unset($_from); endif; ?>
		  </select>
		  <input class="FOGInput" type="submit" value="<?php echo $this->_tpl_vars['lang']['submit']; ?>
" onclick="javascript:return confirm('<?php echo $this->_tpl_vars['lang']['are_you_sure']; ?>
')">
		</form>
    </td>
  </tr>
  <form action="<?php echo $this->_tpl_vars['fog_url']; ?>
fog_r=admin&fog_p=aff&fog_q=5" method="post">
  <input type="hidden" name="fog_posted" value="1">
  <?php if (count($_from = (array)$this->_tpl_vars['array'])):
    foreach ($_from as $this->_tpl_vars['var']):
?>
  <tr>
    <td class="FOGContent" style="text-align:right">
	  <?php echo $this->_tpl_vars['lang']['skin_custom_vars'][$this->_tpl_vars['var']]; ?>

	</td>
    <td class="FOGContent" style="text-align:center">
	  <input class="FOGInput" name="fog_custom_<?php echo $this->_tpl_vars['var']; ?>
" value="<?php echo $this->_tpl_vars['config']['_custom'][$this->_tpl_vars['var']]; ?>
" size="32">
	</td>
  </tr>
  <?php endforeach; unset($_from); endif; ?>
  <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
	  <input type="checkbox" value="1" name="fog_savecurrent" <?php if (! $this->_tpl_vars['savecurrent']): ?>checked<?php endif; ?>><?php echo $this->_tpl_vars['lang']['save_current_in_config']; ?>
<br>
	  <fieldset class="FOGContent3 FOGCadre">
		<legend><input type="checkbox" value="1" name="fog_savetpl" <?php if ($this->_tpl_vars['savetpl']): ?>checked<?php endif; ?>><?php echo $this->_tpl_vars['lang']['save_current_in_tpl']; ?>
<br></legend>
		<input type="radio" name="fog_tpl_mod" value="0" <?php if (! $this->_tpl_vars['tpl_mod']): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['create_tpl']; ?>
 : <input class="FOGInput" name="fog_tpl_name"><br>
		<input type="radio" name="fog_tpl_mod" value="1" <?php if ($this->_tpl_vars['tpl_mod']): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['lang']['overwrite_tpl']; ?>
 : <select name="fog_ow_tpl" class="FOGInput">
		    <?php if (count($_from = (array)$this->_tpl_vars['stpls'])):
    foreach ($_from as $this->_tpl_vars['stpl']):
?><option value="<?php echo $this->_tpl_vars['stpl']['id']; ?>
" <?php if ($this->_tpl_vars['stpl']['id'] == $this->_tpl_vars['ow_tpl']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['stpl']['nom']; ?>
</option><?php endforeach; unset($_from); endif; ?>
		  </select>
	  </fieldset>
	</td>
  </tr>
  <tr>
    <td class="FOGContent" style="text-align:center" colspan="2">
	  <input type="reset" class="FOGInput" value="<?php echo $this->_tpl_vars['lang']['reset']; ?>
">&nbsp;&nbsp;
	  <input type="submit" class="FOGInput" value="<?php echo $this->_tpl_vars['lang']['submit']; ?>
">
	</td>
  </tr>
  </form>
</table>
<?php endif;  endif;  endif;  endif;  endif; ?>