@link http://blog.idleman.fr @licence CC by nc sa @version 1.0.0 @description affichage du profil et des infos */ function dash_profil_plugin_menu(&$widgets){ $widgets[] = array( 'uid' => 'dash_profil', 'icon' => 'fa fa-globe', 'label' => 'Connecté', 'background' => '#1BA1E2', 'color' => '#fffffff', 'onLoad' => 'action.php?action=dash_profil_plugin_load', 'onMove' => 'action.php?action=dash_profil_plugin_move', //'onSave' => 'action.php?action=dash_profil_plugin_save', 'onEdit' => 'action.php?action=dash_profi_plugin_edit', 'onDelete' => 'action.php?action=dash_profil_plugin_delete' ); } function profil_plugin_actions(){ global $myUser,$_,$conf; switch($_['action']){ case 'dash_profi_plugin_edit': echo 'L\'edition de ce bloc est disponible depuis la page d\'edition du profil'; break; case 'dash_profil_plugin_load': header('content-type:application/json'); $response['title'] = 'Connecté'; $url_link = Functions::getBaseUrl('action.php').'/action.php'; $response['content'] = '
'.$myUser->getGravatarImg().' Installer YANA Windows
'; echo json_encode($response); break; case 'profile_set_profile': $myUser->setFirstName($_['firstname']); $myUser->setName($_['name']); $myUser->setLogin($_['login']); $myUser->setMail($_['mail']); $fields = array('mail'=>$myUser->getMail(),'login'=>$myUser->getLogin(),'firstname'=>$myUser->getFirstName(),'name'=>$myUser->getName()); if(trim($_['password']) !=''){ $fields['password'] = User::cryptPassword($_['password']); } $userManager = new User(); $userManager->change($fields,array('id'=>$myUser->getId())); $_SESSION['currentUser'] = serialize($myUser); header('location: setting.php?section=profil'); break; } } function profil_plugin_menu(){ global $_; echo '
  • Profil
  • '; } function profil_plugin_page(){ global $myUser,$_,$conf; if((isset($_['section']) && $_['section']=='profil') ){ if($myUser!=false){ ?>

    Mon profil

    Page de profil de getFullName(); ?>








    Vous devez être connecté