* @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[3] = $user_object -> GetNewPassword(); /** 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'; $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']; $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.= "