Index: /extensions/adult_content/admin/admin.php
===================================================================
--- /extensions/adult_content/admin/admin.php	(revision 21046)
+++ /extensions/adult_content/admin/admin.php	(revision 21047)
@@ -7,5 +7,5 @@
 global $prefixeTable;
 load_language('plugin.lang', $ad_c->plugin_path);
-$conf_ad_c = explode("," , $conf['ad_c_plugin']);
+$conf_ad_c = unserialize($conf['ad_c_plugin']);
 
 
@@ -14,11 +14,11 @@
 if (isset($_POST['option_ad_c']))
 {
-	$newconf_plugin = (isset($_POST['menublock_for_guest'])) ? 'true' : 'false';
-	$newconf_plugin .= (isset($_POST['block_on_index'])) ? ',true' : ',false';
-	$newconf_plugin .= (isset($_POST['manage_what'])) ? ','.$_POST['manage_what'] : ',both';
-	//$newconf_plugin = implode ("," , $newconf_plugin);
+  $newconf_plugin=array();
+	$newconf_plugin['menublock_for_guest'] = (isset($_POST['menublock_for_guest'])) ? true : false;
+	$newconf_plugin['block_on_index'] = (isset($_POST['block_on_index'])) ? true : false;
+	$newconf_plugin['manage_what'] = (isset($_POST['manage_what'])) ? $_POST['manage_what'] : 'both';
 	$query = '
 		UPDATE '.CONFIG_TABLE.'
-		SET value="'.$newconf_plugin.'"
+		SET value="'.pwg_db_real_escape_string(serialize($newconf_plugin)).'"
 		WHERE param="ad_c_plugin"
 		LIMIT 1';
@@ -26,16 +26,16 @@
 				
 	array_push($page['infos'], l10n('ad_c_msg_admin_1'));
+  load_conf_from_db();
+  $conf_ad_c = unserialize($conf['ad_c_plugin']);
 }
 
-load_conf_from_db();
-$conf_ad_c = explode("," , $conf['ad_c_plugin']);
 
 $check='checked="checked"';
-if ($conf_ad_c[0]=='true') { $menublock=$check; } else { $menublock=NULL; } 
-if ($conf_ad_c[1]=='true') { $index=$check; } else { $index=NULL; }
+if ($conf_ad_c['menublock_for_guest']=='true') { $menublock=$check; } else { $menublock=NULL; } 
+if ($conf_ad_c['block_on_index']=='true') { $index=$check; } else { $index=NULL; }
 $disabled='disabled="disabled"';
 	$template->assign(
 		array(
-		  'AD_C_manage_what' => $conf_ad_c[2],
+		  'AD_C_manage_what' => $conf_ad_c['manage_what'],
 		  'AD_C_menublock_for_guest' => $menublock,
 		  'AD_C_block_on_index' => $index,
Index: /extensions/adult_content/charte.php
===================================================================
--- /extensions/adult_content/charte.php	(revision 21046)
+++ /extensions/adult_content/charte.php	(revision 21047)
@@ -2,6 +2,6 @@
 define('PHPWG_ROOT_PATH','../../');
 include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-$conf_ad_c = explode("," , $conf['ad_c_plugin']);
-if ( !is_a_guest() or $conf_ad_c[0]!='true')
+$conf_ad_c = unserialize($conf['ad_c_plugin']);
+if ( !is_a_guest() or $conf_ad_c['menublock_for_guest']!='true')
 {
 	redirect(make_index_url());
@@ -23,5 +23,5 @@
   array(
     'PLUGIN_NAME' => $adult_content->plugin_name,
-    'AD_C_manage_what' => $conf_ad_c[2],
+    'AD_C_manage_what' => $conf_ad_c['manage_what'],
     ));
 $template->set_filename('controller', $adult_content->plugin_path.'include/charte.tpl');
Index: /extensions/adult_content/charte_user.php
===================================================================
--- /extensions/adult_content/charte_user.php	(revision 21046)
+++ /extensions/adult_content/charte_user.php	(revision 21047)
@@ -2,5 +2,5 @@
 define('PHPWG_ROOT_PATH','../../');
 include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-$conf_ad_c = explode("," , $conf['ad_c_plugin']);
+$conf_ad_c = unserialize($conf['ad_c_plugin']);
 $adult_content = get_plugin_data('adult_content');
 if ( is_a_guest() or $user['username'] == '16' or $user['username'] == '18')
@@ -18,5 +18,5 @@
   WHERE name IN (\''. $_POST['groupe'].'\')
 ;';
-      $data_group = mysql_fetch_array(pwg_query($query));
+      $data_group = pwg_db_fetch_array(pwg_query($query));
 	  
       if (!$adult_content->is_in_ad_c_group())
@@ -86,5 +86,5 @@
     $template->assign(
     array(
-      'AD_C_manage_what' => $conf_ad_c[2],
+      'AD_C_manage_what' => $conf_ad_c['manage_what'],
     )
     );
Index: /extensions/adult_content/class.inc.php
===================================================================
--- /extensions/adult_content/class.inc.php	(revision 21046)
+++ /extensions/adult_content/class.inc.php	(revision 21047)
@@ -19,5 +19,5 @@
     $query = 'SELECT group_id FROM ' . USER_GROUP_TABLE . ' WHERE user_id = ' . $user['id'] . ';';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_assoc($result))
+    while ($row = pwg_db_fetch_assoc($result))
     {
       array_push($this->idgroups_user, $row['group_id']);
@@ -30,5 +30,5 @@
     $query = 'SELECT id FROM ' . GROUPS_TABLE . ' WHERE name IN (\'+18\', \'16-17\', \'nothing\') ORDER BY id';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_assoc($result))
+    while ($row = pwg_db_fetch_assoc($result))
     {
       array_push($this->idgroups_ad_c, $row['id']);
@@ -131,20 +131,20 @@
   WHERE name IN (\'+18\')
 ;';
-     $data_18 = mysql_fetch_array(pwg_query($query));
+     $data_18 = pwg_db_fetch_array(pwg_query($query));
 	 $query = '
 SELECT id FROM '.GROUPS_TABLE.'
   WHERE name IN (\'16-17\')
 ;';
-     $data_16 = mysql_fetch_array(pwg_query($query));
+     $data_16 = pwg_db_fetch_array(pwg_query($query));
 	 $query = '
 SELECT id FROM '.GROUPS_TABLE.'
   WHERE name IN (\'nothing\')
 ;';
-     $data_no = mysql_fetch_array(pwg_query($query));
+     $data_no = pwg_db_fetch_array(pwg_query($query));
 	 $n_query = '
 SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.'
   WHERE group_id IN (\''.$data_18['id'].'\',\''.$data_16['id'].'\',\''.$data_no['id'].'\') AND user_id IN (\''.$user['id'].'\')
 ;';
-      $data_user = mysql_fetch_array(pwg_query($n_query));
+      $data_user = pwg_db_fetch_array(pwg_query($n_query));
 	  $is_grouped = $data_user['result'];   
 	  
@@ -164,5 +164,5 @@
     global $user, $conf, $page, $template;
     $menu = & $menu_ref_arr[0];
-		$conf_plugin = explode("," , $conf['ad_c_plugin']);
+		$conf_plugin = unserialize($conf['ad_c_plugin']);
 		$template->assign(
 			array(
@@ -172,5 +172,5 @@
 
     //include($this->var_template());
-    if (is_a_guest() and $conf_plugin[0]=='true')
+    if (is_a_guest() and $conf_plugin['menublock_for_guest']=='true')
 	{
 	
@@ -217,5 +217,5 @@
 ///////////////////////[FIN fermer/ouvert]////////////////////
     }//fin if guest
-    elseif (is_a_guest() and $conf_plugin[0]!='true')
+    elseif (is_a_guest() and $conf_plugin['menublock_for_guest']!='true')
     {  
 		  $menu->hide_block('mbAdultContent');
@@ -317,5 +317,17 @@
       redirect(PHPWG_ROOT_PATH.'plugins/adult_content/charte_user.php');
 		}
-  } 
+  }
+  function ac_stuffs_module($modules)
+  {
+    load_language('plugin.lang', $this->plugin_path);
+    array_push($modules, array(
+      'path' => PHPWG_PLUGINS_PATH . AC_NAME . '/stuffs_module/',
+      'name' => l10n('ac_text'),
+      'description' => l10n('ac_stuffs_description'),
+      )
+    );
+    return $modules;
+  }
+
 }//fin class
 ?>
Index: /extensions/adult_content/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/adult_content/language/fr_FR/plugin.lang.php	(revision 21046)
+++ /extensions/adult_content/language/fr_FR/plugin.lang.php	(revision 21047)
@@ -83,3 +83,5 @@
 ';
 $lang['ad_c_linktolang']="Lien vers le fichier langue d'Adult Content (Nécessite localFiles Editor)";
+
+$lang['ac_stuffs_description']="Charte pour le visiteur et choix de son âge"
 ?>
Index: /extensions/adult_content/main.inc.php
===================================================================
--- /extensions/adult_content/main.inc.php	(revision 21046)
+++ /extensions/adult_content/main.inc.php	(revision 21047)
@@ -35,4 +35,6 @@
 add_event_handler('loc_begin_index', array(&$adult_content, 'set_block_on_index'));
 */
+add_event_handler('get_stuffs_modules', array(&$adult_content, 'ac_stuffs_module'));
+
 
 add_event_handler('loc_end_picture', 'comment_manage');
Index: /extensions/adult_content/maintain.inc.php
===================================================================
--- /extensions/adult_content/maintain.inc.php	(revision 21046)
+++ /extensions/adult_content/maintain.inc.php	(revision 21047)
@@ -3,8 +3,8 @@
 function plugin_install()
 {
-    global $conf;
+  global $conf;
 
 ////////////créer groupe////////////
-    $query = '
+  $query = '
 INSERT INTO '.GROUPS_TABLE.'
   (name)
@@ -12,6 +12,6 @@
   (\'+18\')
 ;';
-    pwg_query($query);
-    $query = '
+  pwg_query($query);
+  $query = '
 INSERT INTO '.GROUPS_TABLE.'
   (name)
@@ -19,6 +19,6 @@
   (\'16-17\')
 ;';
-    pwg_query($query);
-    $query = '
+  pwg_query($query);
+  $query = '
 INSERT INTO '.GROUPS_TABLE.'
   (name)
@@ -26,5 +26,5 @@
   (\'nothing\')
 ;';
-    pwg_query($query);
+  pwg_query($query);
 ////////////créer user////////////
 	include_once(PHPWG_ROOT_PATH.'include/functions_user.inc.php');
@@ -34,17 +34,23 @@
 ////////////placer dans group 16////////////
     $result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'16-17\') ;');
-    $data_group = mysql_fetch_array($result);
+    $data_group = pwg_db_fetch_array($result);
 	  pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('16').'\', \''.$data_group['id'].'\' )' );
 
 ////////////placer dans group 18////////////
   $result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'+18\') ;');
-  $data_group = mysql_fetch_array($result);
+  $data_group = pwg_db_fetch_array($result);
 	  pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('18').'\', \''.$data_group['id'].'\' )' );
 
+////////////placer dans group nothing////////////
+  $result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'nothing\') ;');
+  $data_group = pwg_db_fetch_array($result);
+	  pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.$conf['guest_id'].'\', \''.$data_group['id'].'\' )' );
+
 /////////////Config plugin
+    $config_start=array('menublock_for_guest'=>true,'block_on_index'=>false,'manage_what'=>'both');
     $q = '
 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
 	VALUES
-	("ad_c_plugin" , "true,false,both" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
+	("ad_c_plugin" , "'.pwg_db_real_escape_string(serialize($config_start)).'" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
     pwg_query($q);
 
@@ -55,10 +61,11 @@
 function plugin_activate()
 {
-	///user exist ?///
+  global $conf;
+///user exist ?///
 	$query = '
 	SELECT COUNT(*) AS result FROM '.USERS_TABLE.'
 	WHERE username IN (\'18\')
 	;';
-	$data_user = mysql_fetch_array(pwg_query($query));
+	$data_user = pwg_db_fetch_array(pwg_query($query));
 	$exist = $data_user['result'];
 	if ( $exist == 0 )
@@ -71,5 +78,5 @@
 	WHERE username IN (\'16\')
 	;';
-	$data_user = mysql_fetch_array(pwg_query($query));
+	$data_user = pwg_db_fetch_array(pwg_query($query));
 	$exist = $data_user['result'];
 	if ( $exist == 0 )
@@ -77,96 +84,19 @@
 		register_user('16', 'adult_content', '');
 	}
-	///group exist ?///
-	$query = '
-	SELECT COUNT(*) AS result FROM '.GROUPS_TABLE.'
-	WHERE name IN (\'+18\')
-	;';
-	$data_user = mysql_fetch_array(pwg_query($query));
-	$exist = $data_user['result'];
-	if ( $exist == 0 )
-	{
-		$query = 'INSERT INTO '.GROUPS_TABLE.'
-							(name)
-							VALUES
-							(\'+18\')
-							;';
-		pwg_query($query);
-	////////////placer dans group 18////////////
-		$result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'+18\') ;');
-		$data_group = mysql_fetch_array($result);
-		pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('18').'\', \''.$data_group['id'].'\' )' );
-	}
-	
-	$query = '
-	SELECT COUNT(*) AS result FROM '.GROUPS_TABLE.'
-	WHERE name IN (\'16-17\')
-	;';
-	$data_user = mysql_fetch_array(pwg_query($query));
-	$exist = $data_user['result'];
-	if ( $exist == 0 )
-	{
-		$query = '
-		INSERT INTO '.GROUPS_TABLE.'
-		(name)
-		VALUES
-		(\'16-17\')
-		;';
-		pwg_query($query);
+///groups///
+  $query = 'INSERT IGNORE INTO '.GROUPS_TABLE.' (name) VALUES (\'+18\'),(\'16-17\'),(\'nothing\') ;';
+	pwg_query($query);
+////////////placer dans group 18////////////
+  $result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'+18\') ;');
+  $data_group = pwg_db_fetch_array($result);
+  pwg_query('INSERT IGNORE INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('18').'\', \''.$data_group['id'].'\' )' );
 ////////////placer dans group 16////////////
-		$result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'16-17\') ;');
-		$data_group = mysql_fetch_array($result);
-		pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('16').'\', \''.$data_group['id'].'\' )' );
-	
-	}
-		//grp nothing
-	$query = '
-	SELECT COUNT(*) AS result FROM '.GROUPS_TABLE.'
-	WHERE name IN (\'nothing\')
-	;';
-	$data_user = mysql_fetch_array(pwg_query($query));
-	$exist = $data_user['result'];
-	if ( $exist == 0 )
-	{
-		$query = '
-		INSERT INTO '.GROUPS_TABLE.'
-		(name)
-		VALUES
-		(\'nothing\')
-		;';
-		pwg_query($query);
-	}
-	
-	///assoc user/group exist ?///
-	
-	$n_query = '
-	SELECT id FROM '.GROUPS_TABLE.'
-	WHERE name IN (\'16-17\')
-	;';
-	$data_group = mysql_fetch_array(pwg_query($n_query));
-	$query = '
-	SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.'
-	WHERE group_id IN (\''.$data_group['id'].'\') AND user_id IN (\''.get_userid('16').'\')
-	;';
-	$data_user_group = mysql_fetch_array(pwg_query($query));
-	$exist = $data_user_group['result'];
-	if ( $exist == 0 )
-	{
-		pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('16').'\', \''.$data_group['id'].'\' )' );
-	}
-	$n_query = '
-	SELECT id FROM '.GROUPS_TABLE.'
-	WHERE name IN (\'+18\')
-	;';
-	$data_group = mysql_fetch_array(pwg_query($n_query));
-	$query = '
-	SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.'
-	WHERE group_id IN (\''.$data_group['id'].'\') AND user_id IN (\''.get_userid('18').'\')
-	;';
-	$data_user_group = mysql_fetch_array(pwg_query($query));
-	$exist = $data_user_group['result'];
-	if ( $exist == 0 )
-	{
-		pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('18').'\', \''.$data_group['id'].'\' )' );
-	}
+  $result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'16-17\') ;');
+  $data_group = pwg_db_fetch_array($result);
+  pwg_query('INSERT IGNORE INTO '.USER_GROUP_TABLE.' VALUES(\''.get_userid('16').'\', \''.$data_group['id'].'\' )' );
+////////////placer dans group nothing////////////
+  $result = pwg_query('SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'nothing\') ;');
+  $data_group = pwg_db_fetch_array($result);
+  pwg_query('INSERT IGNORE INTO '.USER_GROUP_TABLE.' VALUES(\''.$conf['guest_id'].'\', \''.$data_group['id'].'\' )' );
 	
 	////////////mis en generic////////////
@@ -190,32 +120,33 @@
 	WHERE param IN (\'ad_c_plugin\')
 	;';
-	$data_table = mysql_fetch_array(pwg_query($query));
+	$data_table = pwg_db_fetch_array(pwg_query($query));
 	$exist = $data_table['result'];
 	if ( $exist == 0 )
 	{
-	$q = '
-	INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-	VALUES
-    ("ad_c_plugin" , "true,false,both" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
-	pwg_query($q);
+	  $config_start=array('menublock_for_guest'=>true,'block_on_index'=>false,'manage_what'=>'both');
+    $q = '
+    INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
+    VALUES
+      ("ad_c_plugin" , "'.pwg_db_real_escape_string(serialize($config_start)).'" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
+    pwg_query($q);
 	} 
 	else {
 		$query = '
-	SELECT value FROM '.CONFIG_TABLE.'
-	WHERE param IN (\'ad_c_plugin\')
-	;';
-	$data_conf = mysql_fetch_array(pwg_query($query));
-	$conf=explode(',', $data_conf['value']);
-	$nbr=count($conf);
-	
-	 if ($nbr!=3)
-	 {
-		pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param IN (\'ad_c_plugin\')');
-		$q = '
-		INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-		VALUES
-    ("ad_c_plugin" , "true,false,both" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
-		pwg_query($q);
-		 }
+    SELECT value FROM '.CONFIG_TABLE.'
+    WHERE param IN (\'ad_c_plugin\')
+    ;';
+    $data_conf = pwg_db_fetch_array(pwg_query($query));
+    $cf=@unserialize($data_conf);
+    $nbr=count($cf);
+	
+	  if ($nbr!=3)
+	  {
+      $config_start=array('menublock_for_guest'=>true,'block_on_index'=>false,'manage_what'=>'both');
+      $q = '
+      UPDATE ' . CONFIG_TABLE . ' SET
+      param="ad_c_plugin", value="'.pwg_db_real_escape_string(serialize($config_start)).'", comment="Plugin adult_content : menublock_for_guest, block_on_index, manage_what"
+      WHERE param IN (\'ad_c_plugin\');';
+      pwg_query($q);
+    }
 	}
 	
@@ -237,5 +168,5 @@
   WHERE name IN (\'16-17\')
 ;';
-    $data_group = mysql_fetch_array(pwg_query($query));
+    $data_group = pwg_db_fetch_array(pwg_query($query));
 	  pwg_query('DELETE FROM '.USER_GROUP_TABLE.' WHERE group_id IN (\''.$data_group['id'].'\')' );
 	  
@@ -245,5 +176,5 @@
   WHERE name IN (\'+18\')
 ;';
-    $data_group = mysql_fetch_array(pwg_query($query));
+    $data_group = pwg_db_fetch_array(pwg_query($query));
 	  pwg_query('DELETE FROM '.USER_GROUP_TABLE.' WHERE group_id IN (\''.$data_group['id'].'\')' );
 
@@ -253,5 +184,5 @@
   WHERE name IN (\'nothing\')
 ;';
-    $data_group = mysql_fetch_array(pwg_query($query));
+    $data_group = pwg_db_fetch_array(pwg_query($query));
 	  pwg_query('DELETE FROM '.USER_GROUP_TABLE.' WHERE group_id IN (\''.$data_group['id'].'\')' );
   
Index: /extensions/adult_content/stuffs_module/config.inc.php
===================================================================
--- /extensions/adult_content/stuffs_module/config.inc.php	(revision 21047)
+++ /extensions/adult_content/stuffs_module/config.inc.php	(revision 21047)
@@ -0,0 +1,10 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+$display_options = & $template->get_template_vars('display_options');
+$display_options['on_picture'] = false;
+
+$template->assign('MODULE_OPTIONS', '<p>'.l10n('ac_stuffs_info_param').'</p>');
+
+?>
Index: /extensions/adult_content/stuffs_module/disclaimer.tpl
===================================================================
--- /extensions/adult_content/stuffs_module/disclaimer.tpl	(revision 21047)
+++ /extensions/adult_content/stuffs_module/disclaimer.tpl	(revision 21047)
@@ -0,0 +1,122 @@
+{html_style}{literal}
+#ac_stuff_block_charte {
+  margin:5px 15px;
+  text-align:justify;
+}
+#ac_stuff_block legend {
+  font-variant:small-caps;
+}
+#ac_stuff_block .properties li {
+  display:inline-block;
+  float:left;
+  clear:none;
+  margin: 0.5em;
+  padding: 0;
+  text-align: center;
+}
+
+#ac_stuff_block .properties SPAN.property {
+  width:auto;
+  float:none;
+}
+{/literal}
+{/html_style}
+<div id="ac_stuff_block">
+{if !isset($EXPLIC) }
+  <div id="ac_stuff_block_charte">{'ac_text_charte'|@translate}</div>
+  {if $block.AD_C_manage_what=="18" || $block.AD_C_manage_what=="both"}
+  <fieldset>
+  <form method="post" action="{$ROOT_URL}identification.php" >
+      <input type="hidden" name="username" size="15" value="18"/>
+      <input type="hidden" name="password" size="15" value="adult_content"/>
+      <input class="submit" type="submit" name="login" value="{'ac_button_activ_18'|@translate}"/>
+      {'ac_text_activ_18'|@translate}
+  
+  </form>
+  </fieldset>
+  {/if}
+  {if $block.AD_C_manage_what=="16" || $block.AD_C_manage_what=="both"}
+  <fieldset>
+  <form method="post" action="{$ROOT_URL}identification.php" id="quickconnect">
+      <input type="hidden" name="username" size="15" value="16"/>
+      <input type="hidden" name="password" size="15" value="adult_content"/>
+      <input class="submit" type="submit" name="login" value="{'ac_button_activ_16'|@translate}"/>
+           {'ac_text_activ_16'|@translate}         
+  </form>
+  </fieldset>
+  {/if}
+  <form action="{$block.F_LOGIN_ACTION}" method="post" name="login_form" class="properties">
+    <fieldset>
+      <legend>{'ac_identif'|@translate}</legend>
+  
+      <ul>
+        <li>
+          <span class="property">
+            <label for="username">{'Username'|@translate}</label>
+          </span><br>
+          <input tabindex="1" class="login" type="text" name="username" id="username" size="25" maxlength="40" />
+        </li>
+  
+        <li>
+          <span class="property">
+            <label for="password">{'Password'|@translate}</label>
+          </span><br>
+          <input tabindex="2" class="login" type="password" name="password" id="password" size="25" maxlength="25" />
+        </li>
+  
+        {if $block.authorize_remembering }
+        <li>
+          <span class="property">
+            <label for="remember_me">{'Auto login'|@translate}</label>
+          </span><br>
+          <input tabindex="3" type="checkbox" name="remember_me" id="remember_me" value="1">
+        </li>
+        {/if}
+        <li>
+          <input class="submit" tabindex="4" type="submit" name="login" value="{'Submit'|@translate}">
+          {if isset($block.U_REGISTER) }
+        </li>
+        <li>
+          <a href="{$block.U_REGISTER}" title="{'Register'|@translate}" class="pwg-state-default pwg-button">
+            <span class="pwg-icon pwg-icon-register">&nbsp;</span><span>{'Register'|@translate}</span>
+          </a>
+          {/if}
+        </li>
+        <li>
+          <a href="{$block.U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" class="pwg-state-default pwg-button">
+            <span class="pwg-icon pwg-icon-lost-password">&nbsp;</span><span>{'Forgot your password?'|@translate}</span>
+          </a>
+        </li>
+      </ul>
+    </fieldset>
+  
+  </form>
+{else}
+  <p>{$EXPLIC}</p>
+  <p>{$MAIN}</p>
+  {if $AD_C_manage_what=="18" || $AD_C_manage_what=="both"}
+  <fieldset>
+    <form method="post" action="{$pwg_root}charte_user.php" >
+      <input type="hidden" name="groupe" value="+18"/>
+      <input class="submit" type="submit" name="login" value="{'ac_button_activ_18'|@translate}"/>
+      {'ac_text_activ_18'|@translate}
+    </form>
+  </fieldset>
+  {/if}
+  {if $AD_C_manage_what=="16" || $AD_C_manage_what=="both"}
+  <fieldset>
+    <form method="post" action="{$pwg_root}charte_user.php">
+      <input type="hidden" name="groupe" value="16-17"/>
+      <input class="submit" type="submit" name="login" value="{'ac_button_activ_16'|@translate}"/>
+      {'ac_text_activ_16'|@translate}
+    </form>
+  </fieldset>
+  {/if}
+  <fieldset>
+    <form method="post" action="{$pwg_root}charte_user.php">
+      <input type="hidden" name="groupe" value="nothing"/>
+      <input class="submit" type="submit" name="Annuler" value="{'ac_retour_b'|@translate}"/>
+    </form>
+  </fieldset>
+{/if}
+</div>
Index: /extensions/adult_content/stuffs_module/index.php
===================================================================
--- /extensions/adult_content/stuffs_module/index.php	(revision 21047)
+++ /extensions/adult_content/stuffs_module/index.php	(revision 21047)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/adult_content/stuffs_module/main.inc.php
===================================================================
--- /extensions/adult_content/stuffs_module/main.inc.php	(revision 21047)
+++ /extensions/adult_content/stuffs_module/main.inc.php	(revision 21047)
@@ -0,0 +1,136 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $page, $conf;
+
+// RSS Feed only available in category or index gallery
+if (isset($page['section']) and $page['section'] == 'categories')
+{
+  include_once( AC_PATH.'/class.inc.php');
+  $conf_ad_c = unserialize($conf['ad_c_plugin']);
+
+  $adult_content = new Adultcontent(AC_NAME, AC_PATH);
+  set_plugin_data($adult_content->plugin_name, $adult_content);
+
+  if ( is_a_guest() and $conf_ad_c['menublock_for_guest']=='true')
+  {
+    load_language('plugin.lang', $adult_content->plugin_path);
+    load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
+    $block['PLUGIN_NAME'] = $adult_content->plugin_name;
+    $block['AD_C_manage_what'] =  $conf_ad_c['manage_what'];
+    $block['TEMPLATE'] = realpath(AC_PATH.'/stuffs_module/disclaimer.tpl');
+    // from logon bloc
+    $block = array_merge($block, 
+      array(
+        'U_LOST_PASSWORD' => get_root_url().'password.php',
+        'F_LOGIN_ACTION' => get_root_url().'identification.php',
+        'authorize_remembering' => $conf['authorize_remembering'],
+        ));
+    
+    if ($conf['allow_user_registration'])
+    {
+      $block['U_REGISTER'] = get_root_url().'register.php';
+    }
+    
+    // Retirer le bloc identification rapide du menubar
+    add_event_handler('blockmanager_apply', 'stuffs_hide_identification');
+    function stuffs_hide_identification($menu_ref_arr)
+    {
+      $menu = & $menu_ref_arr[0];
+      $menu->hide_block('mbIdentification');
+    }
+  }
+  /*elseif ( isset($_POST['groupe']) and ( $_POST['groupe'] == '+18' or $_POST['groupe'] == '16-17' or $_POST['groupe'] == 'nothing') )
+  {
+  ////////////anciennement lié à quoi/////	
+        $adult_content->fill_idgroups_user();
+        $adult_content->fill_idgroups_ad_c();
+     ////////////placer dans group////////////
+        $query = '
+  SELECT id FROM '.GROUPS_TABLE.'
+    WHERE name IN (\''. $_POST['groupe'].'\')
+  ;';
+        $data_group = pwg_db_fetch_array(pwg_query($query));
+      
+        if (!$adult_content->is_in_ad_c_group())
+      {
+        pwg_query('INSERT INTO '.USER_GROUP_TABLE.' VALUES(\''.$user['id'].'\', \''.$data_group['id'].'\' )' );
+      }
+        else
+      {
+        pwg_query('UPDATE '.USER_GROUP_TABLE.' SET group_id=\''.$data_group['id'].'\' WHERE user_id IN (\''.$user['id'].'\') AND group_id IN (\''.$adult_content->is_in_ad_c_group().'\')' );
+      }
+      $query = '
+  DELETE FROM '.USER_CACHE_TABLE.'
+    WHERE user_id = '.$user['id'];
+        pwg_query($query);
+        log_user( $user['id'], false);
+        redirect(make_index_url());
+  }
+  elseif (!isset( $_POST['groupe'] ))
+  {
+    $title = 'Adult content';
+    $page['body_id'] = 'adult_content_page';
+    include(PHPWG_ROOT_PATH.'include/page_header.php');
+    load_language('plugin.lang', $adult_content->plugin_path);
+    load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
+    $template->assign(
+     array(
+       'PLUGIN_NAME' => $adult_content->plugin_name
+    ));
+  ////////////lié à quoi/////	
+    $adult_content->fill_idgroups_user();
+    $adult_content->fill_idgroups_ad_c();	
+  
+    if (!$adult_content->is_in_ad_c_group())
+    {
+       $template->assign(
+         array(
+           'EXPLIC' => $lang['ac_not_def'],
+           'MAIN'  => $lang['ac_text_charte'],
+            )
+         );
+    }
+    elseif ($adult_content->is_in_ad_c_group() )
+    {
+      $link=$adult_content->is_in_ad_c_group();
+      if ($link == $adult_content->idgroups_ad_c[0])
+      {
+         $statut = $lang['ac_statut'].$lang['ac_user_text_18'];
+      }
+      if ($link ==  $adult_content->idgroups_ad_c[1])
+      {
+         $statut = $lang['ac_statut'].$lang['ac_user_text_16'];
+      }
+      if ($link ==  $adult_content->idgroups_ad_c[2])
+      {
+         $statut = $lang['ac_user_no'];
+      }
+     
+      $main = '<p>'.$statut.'</p>'
+            .'<p><a href="javascript:void(0)" OnClick="history.back()" >'.$lang['ac_retour_c'].'</a></p>';
+      $template->assign(
+      array(
+        'EXPLIC' => $lang['ac_def'],
+        'MAIN'  => $main,
+      )
+      );
+     }
+      $template->assign(
+      array(
+        'AD_C_manage_what' => $conf_ad_c['manage_what'],
+      )
+      );
+  
+     $template->set_filename('charte', $adult_content->plugin_path.'include/charte_user.tpl');
+  
+     $template->parse('charte');
+     include(PHPWG_ROOT_PATH.'include/page_tail.php');
+  
+  }*///fin if !isset( $_POST['groupe'] )
+
+  
+}
+
+?>
