dolibarr  7.0.0-beta
block-info.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
26 // This script is called with a POST method.
27 // Directory to scan (full path) is inside POST['dir'].
28 
29 if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal
30 //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
31 if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
32 if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
33 //if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
34 
35 
36 require '../../main.inc.php';
37 require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
38 
39 $id = GETPOST('id');
40 
41 $block = new BlockedLog($db);
42 if ($block->fetch($id)>0) {
43  echo json_encode($block->object_data);
44 }
45 else {
46  echo json_encode(false);
47 }
GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage Blocked Log.