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

Source for file _ajax_user_autocomplete.php

Documentation is available at _ajax_user_autocomplete.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage workshop
  5.  * @author Simon Georget <simon@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. include_once('../lib/functions_auth.php');
  12. //////////// Check Droits utilisateur ////////////
  13. if (!hasRight('workshop')) ReloadIndex('admin');
  14. ////////////
  15.  
  16. include_once('../config/define.php');
  17. include_once('../workshop/'.SQL.'.inc.php');
  18. include_once("../class/system/class.".SQL.".php");
  19.  
  20. $sql_entity=SQL;
  21. $sql_object new $sql_entity;
  22. $sql_object -> DBInitialise();
  23. $sql_object -> DBConnexion();
  24.  
  25. if($_GET['type']=='O'$data=$sql_object->DBSelect(SQL_getOrganizersList());
  26. if($_GET['type']=='U'$data=$sql_object->DBSelect(SQL_getAllUsersList());
  27.  
  28. $response array();
  29.  
  30. foreach ($data as $i => $user)
  31. {
  32.   $str_id $user['user_login'];
  33.   $html_str $user['user_login'' ('.$user['profile_email'].')';
  34.   $response[array($str_id$str_idnull$html_str);
  35. }
  36.  
  37. header('Content-type: application/json');
  38. echo json_encode($response);

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