exporttemplate.html.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * The export template view file of file module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2022 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Gang Liu <liugang@cnezsoft.com>
  8. * @package file
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
  14. <script>
  15. function setDownloading()
  16. {
  17. if(/opera/.test(navigator.userAgent.toLowerCase())) return true; // Opera don't support, omit it.
  18. $.cookie('downloading', 0);
  19. time = setInterval("closeWindow()", 300);
  20. return true;
  21. }
  22. function closeWindow()
  23. {
  24. if($.cookie('downloading') == 1)
  25. {
  26. parent.$.zui.closeModal();
  27. $.cookie('downloading', null);
  28. clearInterval(time);
  29. }
  30. }
  31. <?php if(!class_exists('ZipArchive')):?>
  32. $().ready(function()
  33. {
  34. $('#fileType').change(function()
  35. {
  36. if($(this).val() == 'xlsx')
  37. {
  38. $(this).val('xls');
  39. $('#phpZipNotice').html(lang.installZipExtension).show().fadeOut(10000);
  40. }
  41. });
  42. });
  43. <?php endif;?>
  44. </script>
  45. <style>
  46. #submit {height: auto;}
  47. </style>
  48. <form method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 30px 5% 30px' action='<?php echo $app->getURI();?>'>
  49. <table class='w-p100'>
  50. <tr>
  51. <td>
  52. <div class='input-group'>
  53. <span class='input-group-addon'><?php echo $lang->setFileNum;?></span>
  54. <?php echo html::input('num', '10', 'class=form-control');?>
  55. <span class='input-group-addon '><?php echo $lang->setFileType;?></span>
  56. <?php echo html::select('fileType', array('xls' => 'xls', 'xlsx' => 'xlsx'), 'xlsx', "class='form-control'");?>
  57. </div>
  58. </td>
  59. <td><?php echo html::submitButton($lang->export);?></td>
  60. </tr>
  61. <tr>
  62. <td>
  63. <?php if(!class_exists('ZipArchive')):?> <div class='text-danger' id="phpZipNotice"></div> <?php endif;?>
  64. </td>
  65. </tr>
  66. </table>
  67. </form>
  68. <?php include $app->getModuleRoot() . 'common/view/footer.lite.html.php';?>