23 if (!defined(
'NOTOKENRENEWAL')) {
24 define(
'NOTOKENRENEWAL', 1);
26 if (!defined(
'NOREQUIREMENU')) {
27 define(
'NOREQUIREMENU',
'1');
29 if (!defined(
'NOREQUIREHTML')) {
30 define(
'NOREQUIREHTML',
'1');
32 if (!defined(
'NOREQUIREAJAX')) {
33 define(
'NOREQUIREAJAX',
'1');
35 if (!defined(
'NOREQUIRESOC')) {
36 define(
'NOREQUIRESOC',
'1');
38 if (!defined(
'NOCSRFCHECK')) {
39 define(
'NOCSRFCHECK',
'1');
42 require
'../../main.inc.php';
44 $objectdesc =
GETPOST(
'objectdesc',
'alpha');
45 $htmlname =
GETPOST(
'htmlname',
'aZ09');
46 $outjson = (
GETPOST(
'outjson',
'int') ?
GETPOST(
'outjson',
'int') : 0);
57 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
64 if (empty($htmlname)) {
69 $InfoFieldList = explode(
":", $objectdesc);
70 $classname = $InfoFieldList[0];
71 $classpath = $InfoFieldList[1];
72 if (!empty($classpath)) {
74 if ($classname && class_exists($classname)) {
75 $objecttmp =
new $classname($db);
78 if (!is_object($objecttmp)) {
79 dol_syslog(
'Error bad param objectdesc', LOG_WARNING);
80 print
'Error bad param objectdesc';
84 $searchkey = (($id &&
GETPOST($id,
'alpha')) ?
GETPOST($id,
'alpha') : (($htmlname &&
GETPOST($htmlname,
'alpha')) ?
GETPOST($htmlname,
'alpha') :
''));
89 $arrayresult =
$form->selectForFormsList($objecttmp, $htmlname,
'', 0, $searchkey,
'',
'',
'', 0, 1);
94 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($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
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, $mode=0)
Check permissions of a user to show a page and an object.