26if (!defined(
'NOTOKENRENEWAL')) {
27 define(
'NOTOKENRENEWAL',
'1');
29if (!defined(
'NOREQUIREMENU')) {
30 define(
'NOREQUIREMENU',
'1');
32if (!defined(
'NOREQUIREHTML')) {
33 define(
'NOREQUIREHTML',
'1');
35if (!defined(
'NOREQUIREAJAX')) {
36 define(
'NOREQUIREAJAX',
'1');
38if (!defined(
'NOREQUIRESOC')) {
39 define(
'NOREQUIRESOC',
'1');
43require
'../../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
55if ($userid != $user->id) {
66print
'<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER[
"PHP_SELF"]).
'?'.
dol_escape_htmltag($_SERVER[
"QUERY_STRING"]).
' -->'.
"\n";
69if ($boxid > 0 && $zone !=
'' && $userid > 0) {
70 $tmp = explode(
'-', $boxorder);
71 $nbboxonleft = substr_count($tmp[0],
',');
72 $nbboxonright = substr_count($tmp[1],
',');
73 print $nbboxonleft.
'-'.$nbboxonright;
74 if ($nbboxonleft > $nbboxonright) {
75 $boxorder = preg_replace(
'/B:/',
'B:'.$boxid.
',', $boxorder);
77 $boxorder = preg_replace(
'/^A:/',
'A:'.$boxid.
',', $boxorder);
82if ($boxorder && $zone !=
'' && $userid > 0) {
84 dol_syslog(
"AjaxBox boxorder=".$boxorder.
" zone=".$zone.
" userid=".$userid, LOG_DEBUG);
88 $langs->load(
"boxes");
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.