qualify_contact.inc.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2009 Dokeos SPRL
  6. Copyright (c) Julio Montoya Armas
  7. For a full list of contributors, see "credits.txt".
  8. The full license can be read in "license.txt".
  9. This program is free software; you can redistribute it and/or
  10. modify it under the terms of the GNU General Public License
  11. as published by the Free Software Foundation; either version 2
  12. of the License, or (at your option) any later version.
  13. See the GNU General Public License for more details.
  14. Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
  15. Mail: info@dokeos.com
  16. ==============================================================================
  17. */
  18. $language_file=array('registration','messages','userInfo','admin');
  19. require_once '../inc/global.inc.php';
  20. require_once (api_get_path(LIBRARY_PATH).'usermanager.lib.php');
  21. require_once '../inc/lib/social.lib.php';
  22. $user_friend=$_POST['user_friend'];
  23. $list_of_options=array();
  24. $img_user=array();
  25. $img_info_user=array();
  26. $list_of_options=UserFriend::show_list_type_friends();
  27. $path_user=str_replace('\\','',$_GET['path_user']);
  28. $img_user =explode('"',$path_user);
  29. $number_list=count($list_of_options);
  30. $user_id =urldecode($_GET['id_user']);
  31. $user_id =str_replace("\\","",$user_id);
  32. $user_friend=str_replace('"',"",$user_id);
  33. $user_info=api_get_user_info($user_friend);
  34. $user_friend_relation=UserFriend::get_relation_between_contacts(api_get_user_id(),$user_friend);
  35. ?>
  36. <input type="hidden" name="user_cod_qualify" id="user_cod_qualify" value="<?php echo $user_friend; ?>"/>
  37. <table width="600" border="0" cellspacing="0" cellpadding="0">
  38. <tr>
  39. <td>
  40. <table width="600" border="0" cellspacing="0" cellpadding="0">
  41. <tr>
  42. <td width="600" align="left">
  43. <td width="50%"><br/>
  44. <img src="<?php echo $img_user[1]; ?>" />
  45. <?php
  46. echo '<br /><br />'.$name_user=mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ;
  47. ?>
  48. </td>
  49. <td width="50%"><div align="left">
  50. <?php
  51. for ($k=0;$k<$number_list;$k++) {
  52. echo '<br/>';
  53. if ($list_of_options[$k]['id']==$user_friend_relation) {
  54. $check='checked="checked"';
  55. } else {
  56. $check='';
  57. }
  58. ?>
  59. <input <?php echo $check; ?> style="margin-left:50px" type="radio" class="radio" name="list_type_friend" value="<?php echo $list_of_options[$k]['id']; ?>" />
  60. <?php
  61. echo mb_convert_encoding(get_lang($list_of_options[$k]['title']),'UTF-8',$charset);
  62. echo '<br/>';
  63. ?>
  64. <?php
  65. }
  66. echo '<br/>';
  67. ?>
  68. <input style="margin-left:50px" type="button" value="<?php echo mb_convert_encoding(get_lang('AttachToGroup'),'UTF-8',$charset); ?>" onclick="set_qualify_friend()"/>
  69. </div></td>
  70. </td>
  71. </tr>
  72. </table>
  73. </td>
  74. </tr>
  75. </table>