linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file mod.php

Documentation is available at mod.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage user
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Inclusion de pages ////////////
  12. if (!class_exists('auth')) {
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. //////////// Check Droits utilisateur ////////////
  19. if (!$l21auth->isSuperAdmin()) ReloadIndex('admin');
  20. ////////////
  21.  
  22. include_once('../lib/input_helpers.php');
  23.  
  24. $user_objectnew user;
  25.  
  26. // USER
  27. if (isset($_GET['id']))    $id=$_GET['id'];
  28. if (isset($_POST['id'])) $id=$_POST['id'];
  29.  
  30. $mask_dashboard_1='';
  31. $mask_dashboard_2='';
  32. $mask_publication_1='';
  33. $mask_publication_2='';
  34. $mask_news_1='';
  35. $mask_news_2='';
  36. $mask_workshop_1='';
  37. $mask_workshop_2='';
  38. $mask_display_mail_1='';
  39. $mask_display_mail_2='';
  40.  
  41.  
  42. if(isset($_POST['switch_type'])) {
  43.   $switch_type=$_POST['switch_type'];
  44.  
  45.   $user_objectnew user;
  46.   if($switch_type=='2SIMPLE_USER'$table_right=$user_object->InitUserRight('SIMPLE_USER');
  47.   if($switch_type=='2ADMIN_USER'$table_right=$user_object->InitUserRight('ADMIN_USER');
  48.  
  49.   $result=$user_object->ModifyRight($id$table_right$sql_object);
  50.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."_t&id=".$id;
  51.   if($resultheader("Location: ".$link_confirm);
  52.   else  system_error();
  53. }
  54.  
  55. // préparation des listes Workgroups
  56. $workgroups=$sql_object->DBSelect($q);
  57. $r=$user_object->GetUserWorkshops($id$sql_object);
  58. $default_wgarray();
  59. if($r 0{
  60.     foreach($r as $value{
  61.       if($value['jwu_user_right']=='U')
  62.       array_push($default_wg$value['jwu_workshop_id']);
  63.     }
  64. }
  65.  
  66. $requete=SQL_getAllUserInfo($id);
  67. $data=$sql_object->DBSelect($requete'OBJECT');
  68. if(count($data)>1exit();
  69. $current_title =$data[0]->user_login;
  70. $user_login =$data[0]->user_login;
  71. $user_category $data[0]->user_category;
  72. if($user_category==1{
  73.   $switch_type='2SIMPLE_USER';
  74.   $switch_link=_t('user','2SIMPLE_USER');
  75. else {
  76.   $switch_type='2ADMIN_USER';
  77.   $switch_link=_t('user','2ADMIN_USER');
  78. }
  79.  
  80. $switch_form=    "<form id=\"switchform\" name=\"switchform\" action=\"".$_SERVER['SCRIPT_NAME']."\" method=\"post\" >\n";
  81. $switch_form.=    "<div>\n";
  82. $switch_form.=    "<input type=\"hidden\" name=\"switch_type\" id=\"switch_type\" value=\"".$switch_type."\" />\n";
  83. $switch_form.=    "<input name=\"id\" type=\"hidden\" value=\"".$id."\" id=\"idswitch\" />\n";
  84. $switch_form.=    "<input name=\"rub\" type=\"hidden\" value=\"".$rub."\" id=\"rubswitch\" />\n";
  85. $switch_form.=    "<input name=\"todo\" type=\"hidden\" value=\"".$todo."\" id=\"todoswitch\" />\n";
  86. $switch_form.=    "</div>\n";
  87. $switch_form.=    "</form>\n";
  88.  
  89. // droits utilisateur
  90. $rights_id=$data[0]->rights_id;
  91. $form_rights_dashboard=$data[0]->rights_dashboard;
  92. $form_rights_publication=$data[0]->rights_publication;
  93. $form_rights_news=$data[0]->rights_news;
  94. $form_rights_workshop=$data[0]->rights_workshop;
  95.  
  96.  
  97. // profil utilisateur
  98. $profile_id=$data[0]->profile_id;
  99. $form_profile_firstname=formatText($data[0]->profile_firstname'2FIELD');
  100. $form_profile_lastname=formatText($data[0]->profile_lastname'2FIELD');
  101. $form_profile_email $current_email $data[0]->profile_email;
  102. $form_profile_email_display=$data[0]->profile_email_display;
  103. $form_profile_city=formatText($data[0]->profile_city'2FIELD');
  104. $form_profile_birthdateisNullDate($data[0]->profile_birthdate'--' formatDate($data[0]->profile_birthdatetrue);
  105. list($form_date_y$form_date_m$form_date_d)=explode('-'$form_profile_birthdate);
  106. $form_profile_leisures=formatText($data[0]->profile_leisures'2FIELD');
  107. $form_profile_job=formatText($data[0]->profile_job'2FIELD');
  108. $form_profile_avatar=$data[0]->profile_avatar;
  109. $form_profile_quotation=formatText($data[0]->profile_quotation'2FIELD');
  110. $form_profile_signature=formatText($data[0]->profile_signature'2FIELD');
  111. $form_profile_last_modify_display=$data[0]->profile_last_modify_display;
  112.  
  113. if(isset($_POST['valider'])) {
  114.   $table_user[0]=$user_login;
  115.   $integrity=1;
  116.  
  117.   $form_profile_email $table_profile[0$table_user[1=$_POST['email'];
  118.   $form_profile_email_display $table_profile[1$_POST['email_display'];
  119.   $form_profile_city $table_profile[2=  $_POST['city'];
  120.   $form_date_d $_POST['date_d'];
  121.   $form_date_m $_POST['date_m'];
  122.   $form_date_y $_POST['date_y'];
  123.   $form_birthdate=$form_date_d '-' $form_date_m '-' $form_date_y;
  124.  
  125.   if(!empty($form_date_d&& !empty($form_date_m&& !empty($form_date_y)) {
  126.     $date_integrity=checkdate_validity($form_birthdate);
  127.   else {
  128.     $date_integrity=true;
  129.   }
  130.   if(is_string($date_integrity)) $integrity $date_integrity;
  131.   else {
  132.     $table_profile[3]$form_date_y.'-'.$form_date_m.'-'.$form_date_d;
  133.     $form_profile_birthdate=$table_profile[3];
  134.     $form_profile_birthdate=formatDate($form_profile_birthdate);
  135.   }
  136.   $table_profile[4$_POST['leisures'];
  137.   $table_profile[5$_POST['job'];
  138.   $table_profile[6$_POST['quotation'];
  139.   $table_profile[7$_POST['signature'];
  140.   $table_profile[8$_POST['first_name'];
  141.   $table_profile[9$_POST['last_name'];
  142.   $table_right['dashboard']=$_POST['dashboard'];
  143.   $table_right['publication']=$_POST['publication'];
  144.   $table_right['news']=$_POST['news'];
  145.   $table_right['workshop']=$_POST['workshop'];
  146.  
  147.   if(is_string($integrity)) $format_text='2FIELD'else $format_text='2HTML';
  148.   $form_profile_firstname formatText($_POST['first_name']$format_text);
  149.   $form_profile_lastname formatText($_POST['last_name']$format_text);
  150.   $form_profile_leisures formatText($_POST['leisures']$format_text);
  151.   $form_profile_job formatText($_POST['job']$format_text);
  152.   $form_profile_quotation formatText($_POST['quotation']$format_text);
  153.   $form_profile_signature formatText($_POST['signature']$format_text);
  154.   $form_rights_dashboard $_POST['dashboard'];
  155.   $form_rights_publication $_POST['publication'];
  156.   $form_rights_news $_POST['news'];
  157.   $form_rights_workshop $_POST['workshop'];
  158.  
  159.   $table_right=urlencode(serialize($table_right));
  160.   $current_email=$_POST['current_email'];
  161.  
  162.   $data_user_integrity=$user_object->CheckDataIntegrity($table_user);
  163.  
  164.   if(is_string($data_user_integrity)) $integrity=$data_user_integrity;
  165.  
  166.   if(!is_string($integrity)) {
  167.     if(isset($_FILES['avatar']&& $_FILES['avatar']['name']!=''{
  168.       include_once('../class/system/class.upload.php');
  169.       $upload_objectnew upload;
  170.       $upload=$_FILES['avatar'];
  171.       $size_integrity=$upload_object->CheckMaxFile($upload['size']$user_object->UPLOAD_MAX_MO);
  172.       if(is_string($size_integrity)) $integrity=$size_integrity;
  173.       $format_integrity=$upload_object->CheckExtImage($upload['name']);
  174.       if(is_string($format_integrity)) $integrity=$format_integrity;
  175.       if(!is_string($integrity)) {
  176.         $final_name=$id.".".$upload_object->GetExtension($upload ['name']);
  177.         $temp_name="temp_".$final_name;
  178.         $destination="../".$user_object->URI_INPUT;
  179.         $table_profile[10]=$user_object->URI_INPUT.$final_name;
  180.  
  181.         $form_profile_avatar=$user_object->URI_INPUT.$temp_name;
  182.         $result_upload=$upload_object->UploadFile($upload$temp_name$destination);
  183.       }
  184.     else  {
  185.       $table_profile[10]=$form_profile_avatar;
  186.       $archive_it=0;
  187.     }
  188.   }
  189.   $table_profile=urlencode(serialize($table_profile));
  190.  
  191.   if(isset($_POST['workgroups'])) {
  192.     $table_workgroups=$_POST['workgroups'];
  193.     $default_wg=$table_workgroups;
  194.   }
  195.   else $table_workgroups=array();
  196.   $table_workgroups=urlencode(serialize($table_workgroups));
  197. }
  198.  
  199. if(isset($_POST['enregistrer'])) {
  200.   $current_email=$_POST['current_email'];
  201.   include_once('../class/system/class.upload.php');
  202.   $table_right=unserialize(urldecode($_POST['table_right']));
  203.   $table_profile=unserialize(urldecode($_POST['table_profile']));
  204.   $table_workgroups=unserialize(urldecode($_POST['table_workgroups']));
  205.   $new_email=$table_profile[0];
  206.  
  207.   $result1=$user_object->ModifyRight($id$table_right$sql_object);
  208.   $result2=$user_object->ModifyProfile($id$table_profile$sql_object);
  209.   $result3=$user_object->ModifyWorkshops($id$table_workgroups'U' $sql_object);
  210.  
  211.   if($new_email!=$current_email{
  212.     $new_pass=$user_object->GetNewPassword();
  213.     $user_object->UpdateUserPassword($id$new_pass$sql_object);
  214.  
  215.     /** include envoi de mail */
  216.     $todo_mail='change_mail';
  217.     include_once(override('../user/mail_actions.php'));
  218.     include_once('../mail/template.php');
  219.   }
  220.   $upload_objectnew upload;
  221.   $visual_uri="../".$table_profile[10];
  222.   $result_rename=$upload_object->Archivefile($visual_uri);
  223.  
  224.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo;
  225.   if($result1 && $result2 && $result3header("Location: ".$link_confirm);
  226.   else  system_error();
  227. }
  228.  
  229. // préparation des données
  230. if($form_rights_dashboard=='U'$mask_dashboard_1="checked=\"checked\"";
  231. if($form_rights_dashboard=='O'$mask_dashboard_2="checked=\"checked\"";
  232. if($form_rights_publication=='U'$mask_publication_1="checked=\"checked\"";
  233. if($form_rights_publication=='O'$mask_publication_2="checked=\"checked\"";
  234. if($form_rights_news=='U'$mask_news_1="checked=\"checked\"";
  235. if($form_rights_news=='O'$mask_news_2="checked=\"checked\"";
  236. if($form_rights_workshop=='U'$mask_workshop_1="checked=\"checked\"";
  237. if($form_rights_workshop=='O'$mask_workshop_2="checked=\"checked\"";
  238. if($form_profile_email_display=='Y'$mask_display_mail_1="checked=\"checked\"";
  239. if($form_profile_email_display=='N'$mask_display_mail_2="checked=\"checked\"";
  240.  
  241. if(!empty($form_profile_avatar)) {
  242.   $complete_uri='../'.$form_profile_avatar;
  243.   $user_profile_avatar ='<div id="avatarcontainer"><img src="'.$complete_uri.'" alt="'._t('user','avatar').' '.$user_login.'" />';
  244.   if(!isset($integrity)) {
  245.       $user_profile_avatar.='<p><a class="delete_avatar" href="index.php?rub=user&amp;todo=delavatar&amp;id='.$profile_id.'" title="'._t('user','delete_avatar').'"><span>'._t('user','delete_avatar').'</span></a></p>';
  246.   }
  247.   $user_profile_avatar.='</div>';
  248.   // ajax code
  249.   $js '$("a.delete_avatar").click(function() {
  250.  
  251.           var url = "../user/delavatar.php?id='.$id.'&mode=ajax";
  252.           $.ajax({
  253.               type: "GET",
  254.               url: url,
  255.               dataType: "json",
  256.               success: function(data){
  257.                   if(data.status==1) {
  258.                       humane.success(data.msg);
  259.                       $("#avatarcontainer").fadeOut("slow");
  260.                   } else {
  261.                       humane.error(data.msg);
  262.                   }
  263.               }
  264.           });
  265.           return false;
  266.       });  
  267.   ';
  268.   
  269.  
  270.  
  271. else $user_profile_avatar=_t('divers','none');
  272.  
  273.  
  274. // preparation affichage detaillé
  275. $rights_display='';
  276. if(defined('MOD_SDI'&& $user_category!=1{
  277.   $rights_display.= "<div><div class=\"rights\">⇨ "._t('menu','dashboard')." : </div>\n";
  278.   $rights_display.= "<div class=\"rightpanel\">\n";
  279.   $rights_display.= "<input type=\"radio\" id=\"dashboard_1\" class=\"radio\" name=\"dashboard\" value=\"U\" ".$mask_dashboard_1." /><label for=\"dashboard_1\">"_t('user','norights')."</label>\n";
  280.   $rights_display.= "<input type=\"radio\" id=\"dashboard_2\" class=\"radio\" name=\"dashboard\" value=\"O\" ".$mask_dashboard_2."/><label for=\"dashboard_2\">"_t('user','managerrights')."</label>\n";
  281.   $rights_display.= "</div></div>\n";
  282. else $rights_display.="<input type=\"hidden\" id=\"dashboard\" name=\"dashboard\" value=\"".$form_rights_dashboard."\" />\n";
  283. if(defined('MOD_PUBLICATION'&& $user_category!=1{
  284.   $rights_display.= "<div><div class=\"rights\">⇨ "._t('menu','publication')." : </div>\n";
  285.   $rights_display.= "<div class=\"rightpanel\">\n";
  286.   $rights_display.= "<input type=\"radio\" id=\"publication_1\" class=\"radio\" name=\"publication\" value=\"U\" ".$mask_publication_1." /><label for=\"publication_1\">"_t('user','norights')."</label>\n";
  287.   $rights_display.= "<input type=\"radio\" id=\"publication_2\" class=\"radio\" name=\"publication\" value=\"O\" ".$mask_publication_2." /><label for=\"publication_2\">"_t('user','redactorrights')."</label>\n";
  288.   $rights_display.= "</div></div>\n";
  289. else $rights_display.="<input type=\"hidden\" id=\"publication\" name=\"publication\" value=\"".$form_rights_publication."\" />\n";
  290. if(defined('MOD_NEWS'&& $user_category!=1{
  291.   $rights_display.= "<div><div class=\"rights\">⇨ "._t('menu','news')." : </div>\n";
  292.   $rights_display.= "<div class=\"rightpanel\">\n";
  293.   $rights_display.= "<input type=\"radio\" id=\"news_1\" class=\"radio\" name=\"news\" value=\"U\" ".$mask_news_1." /><label for=\"news_1\">"_t('user','norights')."</label>\n";
  294.   $rights_display.= "<input type=\"radio\" id=\"news_2\" class=\"radio\" name=\"news\" value=\"O\" ".$mask_news_2."/><label for=\"news_2\">"_t('user','redactorrights')."</label>\n";
  295.   $rights_display.= "</div></div>\n";
  296. else $rights_display.="<input type=\"hidden\" id=\"news\" name=\"news\" value=\"".$form_rights_news."\" />\n";
  297. if(defined('MOD_WORKSHOP'&& $user_category!=1{
  298.   $rights_display.= "<div><div class=\"rights\">⇨ "._t('menu','workshop')." : </div>\n";
  299.   $rights_display.= "<div class=\"rightpanel\">\n";
  300.   $rights_display.= "<input type=\"radio\" id=\"workshop_1\" class=\"radio\" name=\"workshop\" value=\"U\" ".$mask_workshop_1." /><label for=\"workshop_1\">"_t('user','norights')."</label>\n";
  301.   $rights_display.= "<input type=\"radio\" id=\"workshop_2\" class=\"radio\" name=\"workshop\" value=\"O\" ".$mask_workshop_2." /><label for=\"workshop_2\">"_t('user','animatorrights')."</label>\n";
  302.   $rights_display.= "</div></div>\n";
  303. else $rights_display.="<input type=\"hidden\" id=\"wokshop\" name=\"workshop\" value=\"".$form_rights_workshop."\" />\n";
  304. if($user_category==1{
  305.   $rights_display.="<p class=\"info\">\n";
  306.   $rights_display.=_t('user','admin_type_info');
  307.   $rights_display.="\n</p>\n";
  308. }
  309. ?>
  310. <div id="chemin">
  311. <ul>
  312.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a></li>
  313.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>" class="chemin_rub"><?php echo _t('menu','user')?></a></li>
  314.     <li><span><?php echo formatNavTitle(_t('user','mod').' : '.$current_title)?></span></li>
  315. </ul>
  316. </div>
  317. <!--end barre haute -->
  318. <?php
  319. include_once(THEME_ADMIN_PATH."quickicons.php");
  320. ?>
  321.  
  322. <?php
  323. if(!isset($integrity|| is_string($integrity)) {
  324. ?>
  325. <div class="contentcontainer"><?php
  326. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  327. ?>
  328. <div id="content">
  329. <?php
  330. if(isset($integrity&& is_string($integrity)) display_errors($integrity);
  331. ?>
  332. <h2><?php echo formatTitleh2($current_title)?></h2>
  333. <div class="mod_link"><a href="<?php echo $rub_link."&amp;todo=mod_p&amp;id=".$id?>"><?php echo _t('user','new_password')?></a>
  334. <?php echo "<a href=\"#\" onclick=\"document.getElementById('switchform').submit()\">".$switch_link."</a>"?>
  335. <br />
  336.  
  337. </div>
  338. <form id="moduser" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post" enctype="multipart/form-data">
  339.  
  340. <h3 class="part"><?php echo mb_ucfirst(_t('user','update_rights'))?></h3>
  341. <?php echo $rights_display?>
  342.  
  343. <h3 class="part"><?php echo mb_ucfirst(_t('user','profile'))?></h3>
  344.  
  345. <p>
  346. <label for="email"><?php echo mb_ucfirst(_t('user','email'))?> : *</label>
  347. <input name="email" type="text" class="textfield" id="email" maxlength="200" value="<?php echo $form_profile_email?>" />
  348. </p>
  349. <div class="label"><?php echo mb_ucfirst(_t('user','email_display'))?> : </div>
  350. <div class="rightpanel">
  351.     <input type="radio" id="email_display_Y" name="email_display" value="Y" <?php echo $mask_display_mail_1?> />
  352.     <label for="email_display_Y"><?php echo _t('divers','yes')?></label>
  353.     <input type="radio" id="email_display_N" name="email_display" value="N" <?php echo $mask_display_mail_2?> />
  354.     <label for="email_display_N"><?php echo _t('divers','no')?></label>
  355. </div>
  356. <p>
  357. <label for="first_name"><?php echo mb_ucfirst(_t('user','first_name'))?> :</label>
  358. <input name="first_name" type="text" class="textfield" id="first_name" maxlength="200" value="<?php echo $form_profile_firstname?>" />
  359. </p>
  360. <p>
  361. <label for="last_name"><?php echo mb_ucfirst(_t('user','last_name'))?> :</label>
  362. <input name="last_name" type="text" class="textfield" id="last_name" maxlength="200" value="<?php echo $form_profile_lastname?>" />
  363. </p>
  364. <div class="label"><?php echo mb_ucfirst(_t('user','workgroups'))?> :</div>
  365. <div class="rightpanel" id="groups"><?php echo workgroupsCheckbox($workgroups'workgroups[]'$default_wg)?>
  366. </div>
  367.  
  368. <dl class="dl_mod">
  369.     <dt><?php echo _t('user','avatar')?></dt>
  370.     <dd><?php echo $user_profile_avatar?></dd>
  371. </dl>
  372.  
  373. <p>
  374. <label for="avatar"><?php echo mb_ucfirst(_t('user','avatar'))?> : </label>
  375. <input name="avatar" type="file" id="avatar" size="47" class="file" />
  376. </p>
  377. <p>
  378. <label for="birthdate_d"><?php echo mb_ucfirst(_t('user','birthdate'))?> :</label>
  379. <?php echo input_date($form_date_y$form_date_m$form_date_d)?>
  380. </p>
  381. <p>
  382. <label for="city"><?php echo mb_ucfirst(_t('user','city'))?> :</label>
  383. <input name="city" type="text" class="textfield" id="city" maxlength="100" value="<?php echo $form_profile_city?>" />
  384. </p>
  385. <p>
  386. <label for="leisures"><?php echo mb_ucfirst(_t('user','leisures'))?> :</label>
  387. <input name="leisures" type="text" class="textfield" id="leisures" maxlength="150" value="<?php echo $form_profile_leisures?>" />
  388. </p>
  389. <p>
  390. <label for="job"><?php echo mb_ucfirst(_t('user','job'))?> :</label>
  391. <input name="job" type="text" class="textfield" id="job" maxlength="150" value="<?php echo $form_profile_job?>" />
  392. </p>
  393. <p>
  394. <label for="quotation"><?php echo mb_ucfirst(_t('user','quotation'))?> :</label>
  395. <input name="quotation" type="text" class="textfield" id="quotation" maxlength="150" value="<?php echo $form_profile_quotation?>" />
  396. </p>
  397. <p>
  398. <label for="signature"><?php echo mb_ucfirst(_t('user','signature'))?> :</label>
  399. <input name="signature" type="text" class="textfield" id="signature" maxlength="200" value="<?php echo $form_profile_signature?>" />
  400. </p>
  401. <div>
  402.   <input name="current_email" type="hidden" value="<?php echo $current_email?>" id="current_email" />
  403.   <input name="id" type="hidden" value="<?php echo $id?>" id="id" />
  404.   <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  405.   <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  406.   <?php echo cancel_button('javascript:history.go(-1);')?>
  407.   <input name="valider" type="submit"    value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  408. </div>
  409. </form>
  410.     <?php echo $switch_form?></div>
  411.     <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  412.     
  413.     <?php
  414.     // Récapitulatif
  415. else    {
  416.  
  417.   $wg_display '';
  418.   if(isset($_POST['workgroups'])) {
  419.     $q=SQL_Get_WorkshopsDenomination($_POST['workgroups']);
  420.     $workgroups=$sql_object->DBSelect($q);
  421.     foreach($workgroups as $wg{
  422.       $wg_display .= '- '.$wg['workshop_denomination'].'<br />'.END_LINE;
  423.     }
  424.   else $wg_display .= _t('divers''none');
  425.  
  426.   //prepa affichage de droits
  427.   $reca_droits='';
  428.   $reca_droits.='<h3 class="part">'._t('user','rights').'</h3>';
  429.   $reca_droits.="<dl class=\"dl3\">\n";
  430.   if(defined('MOD_SDI'))  {
  431.     $reca_droits.="<dt> . "._t('menu','sdi')."</dt>\n";
  432.     $reca_droits.="<dd>".GetDisplayUserRight($form_rights_dashboard'dashboard')."<br /></dd>\n";
  433.   }
  434.   if(defined('MOD_PUBLICATION'))  {
  435.     $reca_droits.="<dt>  . "._t('menu','publication')."</dt>\n";
  436.     $reca_droits.="<dd>".GetDisplayUserRight($form_rights_publication)."<br /></dd>\n";
  437.   }
  438.   if(defined('MOD_WORKSHOP'))  {
  439.     $reca_droits.="<dt>  . "._t('menu','workshop')."</dt>\n";
  440.     $reca_droits.="<dd>".GetDisplayUserRight($form_rights_workshop'workshop')."<br /></dd>\n";
  441.   }
  442.   if(defined('MOD_NEWS'))  {
  443.     $reca_droits.="<dt>  . "._t('menu','news')."</dt>\n";
  444.     $reca_droits.="<dd>".GetDisplayUserRight($form_rights_news)."<br /></dd>\n";
  445.   }
  446.   $reca_droits.="</dl>\n";
  447.  
  448.  
  449.   if($form_profile_email_display=='Y'$form_profile_email_string=_t('divers','yes');
  450.   if($form_profile_email_display=='N'$form_profile_email_string=_t('divers','no');
  451.   $form_profile_email='<a href="mailto:'.$form_profile_email.'">'.$form_profile_email.'</a>';
  452.   $form_profile_firstname=empty_nc($form_profile_firstname);
  453.   $form_profile_lastname=empty_nc($form_profile_lastname);
  454.   $form_profile_city=empty_nc($form_profile_city);
  455.   $form_profile_birthdate ($form_profile_birthdate=='--''' $form_profile_birthdate;
  456.   $form_profile_birthdate=empty_nc($form_profile_birthdate);
  457.   $form_profile_leisures=empty_nc($form_profile_leisures);
  458.   $form_profile_job=empty_nc($form_profile_job);
  459.   $user_profile_avatar=empty_none($user_profile_avatar);
  460.   $form_profile_signature=empty_nc($form_profile_signature);
  461.   $form_profile_quotation=empty_nc($form_profile_quotation);
  462.   ?>
  463. <div class="contentcontainer"><?php
  464. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  465. ?>
  466. <div id="content"><?php
  467. echo "<h2>".formatTitleh2(_t('recap','title'))."</h2>";
  468. echo $reca_droits;
  469. echo '<h3 class="part">'._t('user','profile').'</h3>';
  470. echo "<dl class=\"dl3\">\n";
  471. echo "<dt>"mb_ucfirst(_t('user','email'))" :</dt>\n";
  472. echo "<dd>".$form_profile_email."</dd>\n";
  473. echo "<dt>".mb_ucfirst(_t('user','email_display'))." :</dt>\n";
  474. echo "<dd>"$form_profile_email_string."</dd>\n";
  475. echo "<dt>"mb_ucfirst(_t('user','first_name'))" :</dt>\n";
  476. echo "<dd>".$form_profile_firstname."</dd>\n";
  477. echo "<dt>"mb_ucfirst(_t('user','last_name'))" :</dt>\n";
  478. echo "<dd>".$form_profile_lastname."</dd>\n";
  479. echo "<dt>".ucfirst(_t('user','workgroups'))." :</dt>\n";
  480. echo "<dd>"stripslashes($wg_display)."</dd>\n";
  481. echo "<dt>"mb_ucfirst(_t('user','birthdate'))." :</dt>\n";
  482. echo "<dd>"stripslashes($form_profile_birthdate)."</dd>\n";
  483. echo "<dt>"mb_ucfirst(_t('user','city'))." :</dt>\n";
  484. echo "<dd>"stripslashes($form_profile_city)."</dd>\n";
  485. echo "<dt>"mb_ucfirst(_t('user','leisures'))." :</dt>\n";
  486. echo "<dd>"stripslashes($form_profile_leisures)."</dd>\n";
  487. echo "<dt>"mb_ucfirst(_t('user','job'))." :</dt>\n";
  488. echo "<dd>"stripslashes($form_profile_job)."</dd>\n";
  489. echo "<dt>"mb_ucfirst(_t('user','avatar'))." :</dt>\n";
  490. echo "<dd>"stripslashes($user_profile_avatar)."</dd>\n";
  491. echo "<dt>"mb_ucfirst(_t('user','quotation'))." :</dt>\n";
  492. echo "<dd>"stripslashes($form_profile_quotation)."</dd>\n";
  493. echo "<dt>"mb_ucfirst(_t('user','signature'))." :</dt>\n";
  494. echo "<dd>"stripslashes($form_profile_signature)."</dd>\n";
  495. echo "</dl>\n";
  496. ?>
  497. <form id="moduser" action="<?php echo $_SERVER['SCRIPT_NAME']?>"    method="post">
  498.    <div>
  499.     <input name="id" type="hidden" value="<?php echo $id?>" id="id" />
  500.     <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  501.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  502.     <input name="current_email" type="hidden" value="<?php echo $current_email?>" id="current_email" />
  503.     <input name="table_right" type="hidden" value="<?php echo $table_right?>" id="table_right" />
  504.     <input name="table_profile" type="hidden" value="<?php echo $table_profile?>" id="table_profile" />
  505.     <input name="table_workgroups" type="hidden" value="<?php echo $table_workgroups?>" id="table_workgroups" />
  506.     <?php echo cancel_button('?rub=user&amp;todo=list')?>
  507.     <input name="retour" type="button" value="<?php echo _t('btn','preview'?>" class="button" id="retour" onclick="history.go(-1);" />
  508.     <input name="enregistrer" type="submit" value="<?php echo _t('btn','save'?>" class="button" id="valider" />
  509.   </div>
  510. </form>
  511. </div>
  512. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  513. <?php
  514. }
  515. ?>

Documentation generated on Mon, 08 Apr 2013 18:15:43 +0200 by phpDocumentor 1.4.1