PageRenderTime 49ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/core/ajax/box.php

https://github.com/asterix14/dolibarr
PHP | 58 lines | 18 code | 11 blank | 29 comment | 10 complexity | 23b983c217440a661e5e3932ca84be9c MD5 | raw file
Possible License(s): LGPL-2.0
  1. <?php
  2. /* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
  3. * Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
  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 2 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. /**
  19. * \file htdocs/core/ajax/box.php
  20. * \brief File to return Ajax response on Box move
  21. */
  22. if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
  23. if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
  24. if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
  25. if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
  26. if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
  27. if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
  28. require('../../main.inc.php');
  29. require_once(DOL_DOCUMENT_ROOT."/boxes.php");
  30. /*
  31. * View
  32. */
  33. // Ajout directives pour resoudre bug IE
  34. //header('Cache-Control: Public, must-revalidate');
  35. //header('Pragma: public');
  36. //top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
  37. top_httphead();
  38. print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
  39. // Registering the location of boxes
  40. if((isset($_GET['boxorder']) && !empty($_GET['boxorder'])) && (isset($_GET['userid']) && !empty($_GET['userid'])))
  41. {
  42. // boxorder value is the target order: "A:idboxA1,idboxA2,A-B:idboxB1,idboxB2,B"
  43. dol_syslog("AjaxBox boxorder=".$_GET['boxorder']." userid=".$_GET['userid'], LOG_DEBUG);
  44. $infobox=new InfoBox($db);
  45. $result=$infobox->saveboxorder("0",$_GET['boxorder'],$_GET['userid']);
  46. }
  47. ?>