23if (!defined(
'NOTOKENRENEWAL')) {
24 define(
'NOTOKENRENEWAL', 1);
26if (!defined(
'NOREQUIREMENU')) {
27 define(
'NOREQUIREMENU',
'1');
29if (!defined(
'NOREQUIREHTML')) {
30 define(
'NOREQUIREHTML',
'1');
32if (!defined(
'NOREQUIREAJAX')) {
33 define(
'NOREQUIREAJAX',
'1');
35if (!defined(
'NOREQUIRESOC')) {
36 define(
'NOREQUIRESOC',
'1');
40require
'../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
43$objectdesc =
GETPOST(
'objectdesc',
'alpha');
44$htmlname =
GETPOST(
'htmlname',
'aZ09');
45$outjson = (
GETPOST(
'outjson',
'int') ?
GETPOST(
'outjson',
'int') : 0);
47$filter =
GETPOST(
'filter',
'alphanohtml');
49if (empty($htmlname)) {
53$InfoFieldList = explode(
":", $objectdesc);
54$classname = $InfoFieldList[0];
55$classpath = $InfoFieldList[1];
56if (!empty($classpath)) {
58 if ($classname && class_exists($classname)) {
59 $objecttmp =
new $classname($db);
62if (!is_object($objecttmp)) {
79$searchkey = (($id &&
GETPOST($id,
'alpha')) ?
GETPOST($id,
'alpha') : (($htmlname &&
GETPOST($htmlname,
'alpha')) ?
GETPOST($htmlname,
'alpha') :
''));
82if (!empty($objecttmp->module)) {
83 restrictedArea($user, $objecttmp->module, $id, $objecttmp->table_element, $objecttmp->element);
100top_httphead($outjson ?
'application/json' :
'text/html');
102$arrayresult = $form->selectForFormsList($objecttmp, $htmlname,
'', 0, $searchkey,
'',
'',
'', 0, 1, 0,
'', $filter);
107 print json_encode($arrayresult);
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
httponly_accessforbidden($message=1, $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.