23 if (!defined(
'NOTOKENRENEWAL')) define(
'NOTOKENRENEWAL', 1);
24 if (!defined(
'NOREQUIREMENU')) define(
'NOREQUIREMENU',
'1');
25 if (!defined(
'NOREQUIREHTML')) define(
'NOREQUIREHTML',
'1');
26 if (!defined(
'NOREQUIREAJAX')) define(
'NOREQUIREAJAX',
'1');
27 if (!defined(
'NOREQUIRESOC')) define(
'NOREQUIRESOC',
'1');
28 if (!defined(
'NOCSRFCHECK')) define(
'NOCSRFCHECK',
'1');
30 require
'../../main.inc.php';
32 $objectdesc =
GETPOST(
'objectdesc',
'alpha');
33 $htmlname =
GETPOST(
'htmlname',
'aZ09');
34 $sqlfilter =
GETPOST(
'sqlfilter',
'alpha');
35 $outjson = (
GETPOST(
'outjson',
'int') ?
GETPOST(
'outjson',
'int') : 0);
36 $action =
GETPOST(
'action',
'aZ09');
50 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
51 $form =
new Form($db);
57 if (empty($htmlname))
return;
60 $InfoFieldList = explode(
":", $objectdesc);
61 $classname = $InfoFieldList[0];
62 $classpath = $InfoFieldList[1];
63 if (!empty($classpath))
66 if ($classname && class_exists($classname))
68 $objecttmp =
new $classname($db);
71 if (!is_object($objecttmp))
73 dol_syslog(
'Error bad param objectdesc', LOG_WARNING);
74 print 'Error bad param objectdesc';
78 $searchkey = (($id &&
GETPOST($id,
'alpha')) ?
GETPOST($id,
'alpha') : (($htmlname &&
GETPOST($htmlname,
'alpha')) ?
GETPOST($htmlname,
'alpha') :
''));
83 $arrayresult = $form->selectForFormsList($objecttmp, $htmlname,
'', 0, $searchkey,
'',
'',
'', 0, 1);
87 if ($outjson)
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(!function_exists("llxHeader")) top_httphead($contenttype= 'text/html', $forcenocache=0)
Show HTTP header.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
print
Draft customers invoices.