index.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
  4. * Copyright (C) 2016 Regis Houssin <regis.houssin@inodbox.com>
  5. * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. */
  20. if (!defined('NOTOKENRENEWAL')) {
  21. define('NOTOKENRENEWAL', '1');
  22. }
  23. // Load Dolibarr environment
  24. require '../../main.inc.php';
  25. require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
  27. require_once DOL_DOCUMENT_ROOT.'/opensurvey/lib/opensurvey.lib.php';
  28. // Security check
  29. if (!$user->hasRight('opensurvey', 'write')) {
  30. accessforbidden();
  31. }
  32. $langs->load("opensurvey");
  33. /*
  34. * View
  35. */
  36. $arrayofjs = array();
  37. $arrayofcss = array('/opensurvey/css/style.css');
  38. llxHeader('', $langs->trans("Survey"), '', "", 0, 0, $arrayofjs, $arrayofcss);
  39. print load_fiche_titre($langs->trans("CreatePoll"), '', 'poll');
  40. print '<form name="formulaire" action="create_survey.php" method="POST">';
  41. print '<input type="hidden" name="token" value="'.newToken().'">';
  42. print '<div class="center">';
  43. print '<p>'.$langs->trans("OrganizeYourMeetingEasily").'</p>';
  44. print '<div class="corps">';
  45. print '<br>';
  46. print '<div class="index_date">';
  47. print '<div><img class="opacity imgopensurveywizard" src="../img/date.png" onclick="document.formulaire.date.click()"></div>';
  48. print '<button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded">';
  49. print '<img src="../img/calendar-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'" style="padding-right: 4px" class="inline-block valignmiddle">';
  50. print '<div class="inline-block valignmiddle">'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</div></button>';
  51. print '</div>';
  52. print '<div class="index_sondage">';
  53. print '<div><img class="opacity imgopensurveywizard" src="../img/sondage2.png" onclick="document.formulaire.autre.click()"></div>';
  54. print '<button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded">';
  55. print '<img src="../img/chart-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'" style="padding-right: 4px" class="inline-block valignmiddle">';
  56. print '<div class="inline-block valignmiddle">'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</div></button>';
  57. print '</div>';
  58. print '<div class="clearboth"></div>';
  59. print '<br>';
  60. print '</div>';
  61. print '</div></form>';
  62. // End of page
  63. llxFooter();
  64. $db->close();