index.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. $altcfg = $ubillingConfig->getAlter();
  3. if ($altcfg['POLLS_ENABLED']) {
  4. if (cfr('POLLSREPORT')) {
  5. $pollsReport = new PollsReport();
  6. //getting polls data
  7. if (wf_CheckGet(array('ajaxavaiblevotes'))) {
  8. $pollsReport->ajaxAvaibleVotes();
  9. }
  10. //getting polls votes result
  11. if (wf_CheckGet(array('ajaxapollvotes'))) {
  12. $pollsReport->ajaxPollVotes(vf($_GET['poll_id']));
  13. }
  14. //show polls control panel
  15. show_window(__('Polls results'), $pollsReport->panel());
  16. // show form for create poll
  17. if (wf_CheckGet(array('action'))) {
  18. if ($_GET['action'] == 'show_poll_votes') {
  19. $pollsReport->renderPollVotes();
  20. }
  21. if ($_GET['action'] == 'show_option_votes') {
  22. $pollsReport->renderOptionVotes();
  23. }
  24. } else {
  25. $pollsReport->renderAvaibleVotes();
  26. }
  27. } else {
  28. show_error(__('Permission denied'));
  29. }
  30. } else {
  31. show_error(__('This module is disabled'));
  32. }
  33. ?>