freezone.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
  18. //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
  19. //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
  20. //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
  21. if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
  22. if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
  23. if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
  24. if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
  25. if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
  26. require '../main.inc.php'; // Load $user and permissions
  27. $langs->loadLangs(array("bills", "cashdesk"));
  28. $place = GETPOST('place','int');
  29. /*
  30. * View
  31. */
  32. top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
  33. ?>
  34. <script>
  35. function Save(){
  36. $.get( "invoice.php", { action: "freezone", place: "<?php echo $place;?>", desc:$('#desc').val(), number:$('#price').val()} );
  37. parent.$.colorbox.close();
  38. }
  39. </script>
  40. </head>
  41. <body>
  42. <br>
  43. <center>
  44. <input type="text" id="desc" name="desc" style="width:40%;font-size: 200%;" placeholder="<?php echo $langs->trans('Description');?>">
  45. <input type="text" id="price" name="price" style="width:15%;font-size: 200%;" placeholder="<?php echo $langs->trans('Price');?>">
  46. <input type="hidden" name="place" value="<?php echo $place;?>">
  47. <input type="button" style="width:15%;font-size: 200%;" value="OK" onclick="Save();">
  48. </center>
  49. </body>
  50. </html>