<?php
/**
 * @package linea21.modules
 * @subpackage workshop
 * @author Simon Georget <simon@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
session_start();

include_once('../config/define.php');

//////////// Check Droits utilisateur ////////////
if (!$l21auth->hasRight('project')) ReloadIndex('admin');
////////////

include_once('../project/'.SQL.'.inc.php');

$data = $sql_object->DBSelect(SQL_getActorsList());

$response = array();

foreach ($data as $i => $value)
{
  $fullname = '';
  if(!empty($value['actor_name'])) {
  	$fullname = formatText($value['actor_name'], '2HTML');
  	$str_id = $user['actor_id'];
  }
  $response[] = array($str_id, $fullname, null, $fullname);
}

header('Content-type: application/json');
echo json_encode($response);