26 if (!defined(
'NOTOKENRENEWAL')) {
27 define(
'NOTOKENRENEWAL', 1);
29 if (!defined(
'NOREQUIREMENU')) {
30 define(
'NOREQUIREMENU',
'1');
32 if (!defined(
'NOREQUIREHTML')) {
33 define(
'NOREQUIREHTML',
'1');
35 if (!defined(
'NOREQUIREAJAX')) {
36 define(
'NOREQUIREAJAX',
'1');
38 if (!defined(
'NOREQUIRESOC')) {
39 define(
'NOREQUIRESOC',
'1');
41 if (!defined(
'NOREQUIREHTML')) {
42 define(
'NOREQUIREHTML',
'1');
46 require
'../../main.inc.php';
48 $htmlname =
GETPOST(
'htmlname',
'aZ09');
49 $socid =
GETPOST(
'socid',
'int');
50 $mode =
GETPOST(
'mode',
'aZ09');
51 $discard_closed =
GETPOST(
'discardclosed',
'int');
61 dol_syslog(
"Call ajax projet/ajax/projects.php");
63 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
67 if (empty($htmlname) && !
GETPOST(
'mode',
'aZ09')) {
72 if (empty($mode) || $mode !=
'gettasks') {
77 $arrayresult = $formproject->select_projects_list($socid,
'', $htmlname, 0, 0, 1, $discard_closed, 0, 0, 1, $searchkey);
81 if ($mode ==
'gettasks') {
83 $formproject->selectTasks((!empty($socid) ? $socid : -1), 0,
'taskid', 24, 1,
'1', 1, 0, 0,
'maxwidth500',
GETPOST(
'projectid',
'int'),
'');
90 print json_encode($arrayresult);
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
if(!defined('NOREQUIREMENU')) 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.