'; /******************************************************/ // Add user /******************************************************/ if ( isset ($_POST["ADD"]) ) { $cn=new Database(); $pass5=md5($_POST['PASS']); $new_user=new User($cn,0); $new_user->first_name=$http->post('FNAME'); $new_user->last_name=$http->post('LNAME'); $login=$http->post('LOGIN'); $login=str_replace("'","",$login); $login=str_replace('"',"",$login); $login=str_replace(" ","",$login); $login=strtolower($login); $new_user->login=$login; $new_user->pass=$pass5; $new_user->email=$http->post('EMAIL',"string",''); if ( trim($login)=="") { alert(_("Le login ne peut pas être vide")); } else { $new_user->insert(); $new_user->load(); $_REQUEST['use_id']=$new_user->id; require_once NOALYSS_INCLUDE.'/user_detail.inc.php'; return; } } //SET login // View user detail if ( isset($_REQUEST['det'])) { require_once NOALYSS_INCLUDE.'/user_detail.inc.php'; return; } ?>
'; echo HtmlInput::button_action(_("Ajout utilisateur"), "$('create_user').show();","cu"); echo ''; // Show all the existing user on 7 columns $repo=new Dossier(0); /******************************************************/ // Detail of a user /******************************************************/ $compteur=0; $header=new Sort_Table(); $url=basename($_SERVER['PHP_SELF'])."?action=".$_REQUEST['action']; $header->add(_("Login"), $url," order by use_login asc", "order by use_login desc","la", "ld"); $header->add(_("Nom"), $url," order by use_name asc,use_first_name asc", "order by use_name desc,use_first_name desc","na", "nd"); $header->add(_('Dossier'),$url,' order by ag_dossier asc','order by ag_dossier desc', 'da','dd'); $header->add(_("Actif"), $url," order by use_active asc", "order by use_active desc","aa", "ad"); $ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'la'; $sql=$header->get_sql_order($ord); $a_user=$repo->get_user_folder($sql); if ( !empty ($a_user) ) { echo ''; echo _('Cherche').Icon_Action::infobulle(22); echo HtmlInput::filter_table("user", "0,1,2,5","1"); echo ''; echo ''.$header->get_header(0).' | '; echo ''.$header->get_header(1).' | '; echo th(_("Prénom")); echo ''.$header->get_header(3).' | '; echo ""._('Type')." | "; echo ''.$header->get_header(2).' | '; echo '
---|---|---|---|---|
"; echo HtmlInput::anchor($r_user['use_login'],$det_url); echo " | "; echo td($r_user['use_name']); echo td($r_user['use_first_name']); echo td($Active); $type=($r_user['use_admin']==1)?_("Administrateur"):_("Utilisateur"); echo "".$type." | "; if ( $r_user['use_admin'] == 0) echo td($r_user['ag_dossier']); else { echo td(_('Tous')); } echo '