24 if (!defined(
'NOTOKENRENEWAL')) {
25 define(
'NOTOKENRENEWAL',
'1');
27 if (!defined(
'NOREQUIREMENU')) {
28 define(
'NOREQUIREMENU',
'1');
30 if (!defined(
'NOREQUIREHTML')) {
31 define(
'NOREQUIREHTML',
'1');
33 if (!defined(
'NOREQUIREAJAX')) {
34 define(
'NOREQUIREAJAX',
'1');
36 if (!defined(
'NOREQUIRESOC')) {
37 define(
'NOREQUIRESOC',
'1');
40 require
'../../main.inc.php';
41 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
43 $boxid =
GETPOST(
'boxid',
'int');
44 $boxorder =
GETPOST(
'boxorder');
46 $userid =
GETPOST(
'userid',
'int');
60 print
'<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER[
"PHP_SELF"]).
'?'.
dol_escape_htmltag($_SERVER[
"QUERY_STRING"]).
' -->'.
"\n";
63 if ($boxid > 0 && $zone !=
'' && $userid > 0) {
64 $tmp = explode(
'-', $boxorder);
65 $nbboxonleft = substr_count($tmp[0],
',');
66 $nbboxonright = substr_count($tmp[1],
',');
67 print $nbboxonleft.
'-'.$nbboxonright;
68 if ($nbboxonleft > $nbboxonright) {
69 $boxorder = preg_replace(
'/B:/',
'B:'.$boxid.
',', $boxorder);
71 $boxorder = preg_replace(
'/^A:/',
'A:'.$boxid.
',', $boxorder);
76 if ($boxorder && $zone !=
'' && $userid > 0) {
78 dol_syslog(
"AjaxBox boxorder=".$boxorder.
" zone=".$zone.
" userid=".$userid, LOG_DEBUG);
82 $langs->load(
"boxes");
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype= 'text/html', $forcenocache=0)
Show HTTP header.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.