* @version $id SVN * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!function_exists('AuthenthificationProcess')) { include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// //////////// Check Droits utilisateur //////////// if (!IsSuperAdmin()) ReloadIndex('admin'); //////////// ?>
DBSelect($q); $default_wg = array(); if(isset($_POST['enregistrer'])) { $data_table_user=unserialize(urldecode($_POST['data_table_user'])); $data_table_right=unserialize(urldecode($_POST['data_table_right'])); $data_table_workgroups=unserialize(urldecode($_POST['data_table_workgroups'])); $user_object= new user; $data_table_user[5] = $u_password = $user_object -> GetNewPassword(); $u_login = $data_table_user[0]; $u_mail = $data_table_user[1]; /** include envoi de mail */ $todo_mail='add_user'; include_once(themePath('../user/mail_actions.php')); include_once('../mail/template.php'); /** end mail */ $result=$user_object->AddUser($data_table_user, $data_table_right, $sql_object); $link_confirm="confirm.php?rub=".$rub."&todo=".$todo; if(is_numeric($result)) { $r = $user_object -> AddWorkshops($result, $data_table_workgroups, 'U' , $sql_object); header("Location: ".$link_confirm); } else system_error(); } if(isset($_POST['valider'])) { $table_user[0] = $_POST['pseudo']; $table_user[1] = $_POST['email']; $table_user[2] = 'N'; $table_user[3] = $_POST['first_name']; $table_user[4] = $_POST['last_name']; $user_object= new user; $integrity=$user_object->CheckDataIntegrity($table_user, $sql_object); if($_POST['user_type']=='simple_user') { $table_right=$user_object->InitUserRight('SIMPLE_USER'); $mask_type_S="checked=\"checked\""; } if($_POST['user_type']=='admin_user') { $table_right=$user_object->InitUserRight('ADMIN_USER'); $mask_type_A="checked=\"checked\""; } if($_POST['user_type']=='privilege_user') { $table_right['dashboard']=$_POST['dashboard']; $table_right['workshop']=$_POST['workshop']; $table_right['publication']=$_POST['publication']; $table_right['news']=$_POST['news']; $table_right['yellowpages']='U'; $table_right['project']='U'; $table_right['theme']='U'; $table_right['scale']='U'; $table_right['level']='U'; $table_right['category_user']='U'; $layer_rights= "style=\"display:block;\""; $mask_type_P="checked=\"checked\""; } if(isset($_POST['workgroups'])) { $table_workgroups=$_POST['workgroups']; $default_wg=$table_workgroups; } else $table_workgroups=array(); $form_pseudo=$_POST['pseudo']; $form_email=$_POST['email']; $form_first_name=$_POST['first_name']; $form_last_name=$_POST['last_name']; $table_user=urlencode(serialize($table_user)); $table_right=urlencode(serialize($table_right)); $table_workgroups=urlencode(serialize($table_workgroups)); if($_POST['dashboard']=='O') { $mask_dashboard_1=''; $mask_dashboard_2="checked=\"checked\""; } if($_POST['publication']=='O') { $mask_publication_1=''; $mask_publication_2="checked=\"checked\""; } if($_POST['news']=='O') { $mask_news_1=''; $mask_news_2="checked=\"checked\""; } if($_POST['workshop']=='O') { $mask_workshop_1=''; $mask_workshop_2="checked=\"checked\""; } } // preparation affichage detaillé $rights_display=''; if(defined('MOD_SDI')) { $rights_display.= "
⇨ "._t('menu','dashboard')." :
\n"; $rights_display.= "
\n"; $rights_display.= "\n"; $rights_display.= "\n"; $rights_display.= "
\n"; } else $rights_display.="\n"; if(defined('MOD_PUBLICATION')) { $rights_display.= "
⇨ "._t('menu','publication')." :
\n"; $rights_display.= "
\n"; $rights_display.= "\n"; $rights_display.= "\n"; $rights_display.= "
\n"; } else $rights_display.="\n"; if(defined('MOD_NEWS')) { $rights_display.= "
⇨ "._t('menu','news')." :
\n"; $rights_display.= "
\n"; $rights_display.= "\n"; $rights_display.= "\n"; $rights_display.= "
\n"; } else $rights_display.="\n"; if(defined('MOD_WORKSHOP')) { $rights_display.= "
⇨ "._t('menu','workshop')." :
\n"; $rights_display.= "
\n"; $rights_display.= "\n"; $rights_display.= "\n"; $rights_display.= "
\n"; } else $rights_display.="\n"; include_once(THEME_ADMIN_PATH."quickicons.php"); if(!isset($_POST['valider'])) $mask_type_S='checked="checked"'; ?>

: *
/> /> />
>

:
\n"; echo "\n"; echo "\n"; } ?>
DBSelect($q); foreach($workgroups as $wg) { $wg_display .= '- '.$wg['workshop_denomination'].'
'.END_LINE; } } else $wg_display .= _t('divers', 'none'); $reca_droits =''; if($_POST['user_type']=='simple_user') { $display_type=_t('user','type_simple'); } if($_POST['user_type']=='admin_user') { $display_type=_t('user','type_admin'); } if($_POST['user_type']=='privilege_user') { $display_type=_t('user','type_privilege'); $reca_droits.='

'. _t('user','set_rights').'

'.END_LINE; $reca_droits.='
'.END_LINE; if(defined('MOD_SDI')) { $reca_droits.="
. "._t('menu','sdi')." :
"; $reca_droits.="
".GetDisplayUserRight($_POST['dashboard'], 'dashboard')."
"; } if(defined('MOD_PUBLICATION')) { $reca_droits.="
. "._t('menu','publication')." :
"; $reca_droits.="
".GetDisplayUserRight($_POST['publication'])."
"; } if(defined('MOD_WORKSHOP')) { $reca_droits.="
. "._t('menu','workshop')." :
"; $reca_droits.="
".GetDisplayUserRight($_POST['workshop'], 'workshop')."
"; } if(defined('MOD_NEWS')) { $reca_droits.="
. "._t('menu','news')." :
"; $reca_droits.="
".GetDisplayUserRight($_POST['news'])."
"; } $reca_droits.='
'.END_LINE; } ?>

:

:

:

:

:

: