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

Documentation generated on Thu, 03 May 2012 15:06:35 +0200 by phpDocumentor 1.4.1