Ignore:
Timestamp:
Mar 6, 2011, 1:59:34 PM (13 years ago)
Author:
flop25
Message:

activation phase without include and global var
a guest can't be logged as 16 or 18 if the admin don't want (no acces to charte.php)
a guest can't access to charte_user.php and a user can't access to charte.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/adult_content/charte_user.php

    r9530 r9557  
    33include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
    44$adult_content = get_plugin_data('adult_content');
    5 
     5if ( is_a_guest() )
     6{
     7        redirect(make_index_url());
     8}
    69if (!isset( $_POST['groupe'] ))
    710{
     
    1720       ));
    1821
    19    if (isset($_GET['etat']) and $_GET['etat'] == 'not_defined')
     22   if (isset($_GET['etat']) and $_GET['etat'] == 'not_defined' and !is_a_guest() )
    2023   {
    2124       $template->assign(
     
    2730         );
    2831   }
    29    elseif (isset($_GET['etat']) and $_GET['etat'] == 'defined')
     32   elseif (isset($_GET['etat']) and $_GET['etat'] == 'defined' and !is_a_guest() )
    3033   {
    3134         $query = '
     
    3942;';
    4043     $data_group_n = mysql_fetch_array(pwg_query($query));
    41         if ($data_group_n['name'] == '+18')
    42         {
    43         $statut = $lang['ac_statut'].$lang['ac_user_text_18'];
    44         }
    45         if ($data_group_n['name'] == '16-17')
    46         {
    47         $statut = $lang['ac_statut'].$lang['ac_user_text_16'];
    48         }
    49         if ($data_group_n['name'] == 'nothing')
    50         {
    51         $statut = $lang['ac_user_no'];
    52         }
     44                if ($data_group_n['name'] == '+18')
     45                {
     46                        $statut = $lang['ac_statut'].$lang['ac_user_text_18'];
     47                }
     48                if ($data_group_n['name'] == '16-17')
     49                {
     50                        $statut = $lang['ac_statut'].$lang['ac_user_text_16'];
     51                }
     52                if ($data_group_n['name'] == 'nothing')
     53                {
     54                        $statut = $lang['ac_user_no'];
     55                }
    5356         
    5457     $main = '<p>'.$statut.'</p>'
     
    6467   else
    6568   {
    66    die('Hacking attempt!');
     69                redirect(make_index_url());
    6770   }
    6871
Note: See TracChangeset for help on using the changeset viewer.