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

Source for file det.php

Documentation is available at det.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. $user_objectnew user;
  22. if(isset($_POST['id']))    $id=$_POST['id'];
  23. if(isset($_GET['id']))    $id=$_GET['id'];
  24.  
  25. $req_detSQL_getAllUserInfo($id);
  26. $result=$sql_object->DBSelect($req_det);
  27. if(count($result)>1exit();
  28.  
  29. // groupes de travail
  30. $r=$user_object->GetUserWorkshops($id$sql_object);
  31. $default_wgarray();
  32. foreach($r as $value{
  33.   array_push($default_wg$value['jwu_workshop_id']);
  34. }
  35. $wg_display '';
  36. if(!empty($default_wg)) {
  37.   $q=SQL_Get_WorkshopsDenomination($default_wg);
  38.   $workgroups=$sql_object->DBSelect($q);
  39.   foreach($workgroups as $wg{
  40.     $wg_display .= '- '.$wg['workshop_denomination'].'<br />'.END_LINE;
  41.   }
  42. else $wg_display .= _t('divers''none');
  43.  
  44. $link_det=$rub_link."&amp;todo=det&amp;id=";
  45. $link_det_theme="index.php?rub=theme&amp;todo=det&amp;id=";
  46. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  47. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  48.  
  49.  
  50. // formattage des donnĂ©es
  51. $current_title=formatText($result[0]['user_login']'2HTML');
  52. $user_login=formatText($result[0]['user_login']'2HTML');
  53. $user_email=$result[0]['profile_email'];
  54. $user_email=formatText('<a href="mailto:'.$user_email.'">'.$user_email.'</a>''2HTML');
  55. $user_groupe=formatText($result[0]['catus_name']'2HTML');
  56. // droits utilisateur
  57. $rights_dashboard=$result[0]['rights_dashboard'];
  58. $rights_publication=$result[0]['rights_publication'];
  59. $rights_news=$result[0]['rights_news'];
  60. $rights_workshop=$result[0]['rights_workshop'];
  61.  
  62. $user_public_email=$result[0]['profile_email_display'];
  63. if($user_public_email=='Y'$user_public_email=_t('divers','yes');
  64. else $user_public_email=_t('divers','no');
  65. $user_profile_firstname=formatText(empty_nc($result[0]['profile_firstname'])'2HTML');
  66. $user_profile_lastname=formatText(empty_nc($result[0]['profile_lastname'])'2HTML');
  67. $user_profile_city=formatText(empty_nc($result[0]['profile_city'])'2HTML');
  68. $user_profile_birthdate=formatText(empty_nc($result[0]['profile_birthdate'])'2HTML');
  69. $user_profile_leisures=formatText(empty_nc($result[0]['profile_leisures'])'2HTML');
  70. $user_profile_job=formatText(empty_nc($result[0]['profile_job'])'2HTML');
  71. $user_profile_quotation=formatText(empty_nc($result[0]['profile_quotation'])'2HTML');
  72. $user_profile_signature=formatText(empty_nc($result[0]['profile_signature'])'2HTML');
  73.  
  74. if(!empty($result[0]['profile_avatar'])) {
  75.   $complete_uri='../'.$result[0]['profile_avatar'];
  76.   $user_profile_avatar='<img src="'.$complete_uri.'" alt="'._t('user','avatar').' '.$user_login.'" />';
  77. else $user_profile_avatar=_t('divers','none');
  78.  
  79. $profile_last_modify_display=$result[0]['profile_last_modify_display'];
  80. $profile_date_crea_display=$result[0]['profile_date_crea_display'];
  81.  
  82. $user_validity=display_statut(_t('statut','draft'));
  83.  
  84. $link_det=$rub_link."&amp;todo=det&amp;id=";
  85. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  86. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  87.  
  88. //prepa affichage de droits
  89. $reca_droits='';
  90. $reca_droits.='<h3 class="part">'._t('user','rights').'</h3>';
  91. $reca_droits.="<dl class=\"dl3\">\n";
  92. $reca_droits.="<dt>"._t('user','groupe')."</dt>\n";
  93. $reca_droits.="<dd>".$user_groupe."</dd>\n";
  94. if(defined('MOD_SDI'))  {
  95.   $reca_droits.="<dt> . "._t('menu','dashboard')."</dt>\n";
  96.   $reca_droits.="<dd>".GetDisplayUserRight($rights_dashboard'dashboard')."<br /></dd>\n";
  97. }
  98. if(defined('MOD_PUBLICATION'))  {
  99.   $reca_droits.="<dt>  . "._t('menu','publication')."</dt>\n";
  100.   $reca_droits.="<dd>".GetDisplayUserRight($rights_publication)."<br /></dd>\n";
  101. }
  102. if(defined('MOD_WORKSHOP'))  {
  103.   $reca_droits.="<dt>  . "._t('menu','workshop')."</dt>\n";
  104.   $reca_droits.="<dd>".GetDisplayUserRight($rights_workshop'workshop')."<br /></dd>\n";
  105. }
  106. if(defined('MOD_NEWS'))  {
  107.   $reca_droits.="<dt>  . "._t('menu','news')."</dt>\n";
  108.   $reca_droits.="<dd>".GetDisplayUserRight($rights_news)."<br /></dd>\n";
  109. }
  110. $reca_droits.="</dl>\n";
  111. ?>
  112. <div id="chemin">
  113. <ul>
  114.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  115.     </li>
  116.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  117.         class="chemin_rub"><?php echo _t('menu','user');?></a></li>
  118.     <li><span><?php echo formatnavTitle(_t('user','det')" : " .$current_title)?></span>
  119.     </li>
  120. </ul>
  121. </div>
  122. <!--end barre haute -->
  123. <?php
  124. include_once(THEME_ADMIN_PATH."quickicons.php");
  125. ?>
  126. <div class="contentcontainer"><?php
  127. include_once($dir."/menurub.php");
  128. ?>
  129. <div id="content"><?php
  130. echo "<h2>".formatTitleh2($current_title)."</h2>\n";
  131. echo "\t<a href=\"".$link_sup.$id."\" title=\""._t('user','sup')."\" class=\"ico_sup2\"></a>\n";
  132. echo "\t<a href=\"".$link_mod.$id."\" title=\""._t('user','mod')."\" class=\"ico_mod2\"></a>\n";
  133. echo $reca_droits;
  134. echo '<h3 class="part">'._t('user','profile').'</h3>';
  135. echo "<dl class=\"dl3\">\n";
  136. echo "<dt>"_t('user','first_name')"</dt>\n";
  137. echo "<dd>".$user_profile_firstname."</dd>\n";
  138. echo "<dt>"_t('user','last_name')"</dt>\n";
  139. echo "<dd>".$user_profile_lastname."</dd>\n";
  140. echo "<dt>"_t('user','email')"</dt>\n";
  141. echo "<dd>".$user_email."</dd>\n";
  142. echo "<dt>"._t('user','email_display')."</dt>\n";
  143. echo "<dd>"$user_public_email."</dd>\n";
  144. echo "<dt>".ucfirst(_t('user','workgroups'))."</dt>\n";
  145. echo "<dd>"stripslashes($wg_display)."</dd>\n";
  146. echo "<dt>"._t('user','birthdate')."</dt>\n";
  147. echo "<dd>"$user_profile_birthdate."</dd>\n";
  148. echo "<dt>"._t('user','city')."</dt>\n";
  149. echo "<dd>"$user_profile_city."</dd>\n";
  150. echo "<dt>"._t('user','leisures')."</dt>\n";
  151. echo "<dd>"$user_profile_leisures."</dd>\n";
  152. echo "<dt>"._t('user','job')."</dt>\n";
  153. echo "<dd>"$user_profile_job."</dd>\n";
  154. echo "<dt>"._t('user','avatar')."</dt>\n";
  155. echo "<dd>"$user_profile_avatar."</dd>\n";
  156. echo "<dt>"._t('user','quotation')."</dt>\n";
  157. echo "<dd>"$user_profile_quotation."</dd>\n";
  158. echo "<dt>"._t('user','signature')."</dt>\n";
  159. echo "<dd>"$user_profile_signature."</dd>\n";
  160. echo "<dt>"._t('divers','last_modify')."</dt>\n";
  161. echo "<dd>"$profile_last_modify_display."</dd>\n";
  162. echo "<dt>"._t('divers','date_crea')."</dt>\n";
  163. echo "<dd>"$profile_date_crea_display."</dd>\n";
  164. echo "<dt>"._t('divers','statut'."</dt>\n";
  165. echo "<dd>"$user_validity"</dd>\n";
  166. echo "</dl>\n";
  167. ?></div>
  168. <?php include_once($dir."/help.php")?></div>

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