ieedit.html.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * The editor view file of dir module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package editor
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
  14. <div class='main-header'>
  15. <div class='heading'>
  16. <i class='icon-edit'></i>
  17. <?php if($filePath):?>
  18. <strong><?php echo $lang->editor->filePath;?></strong>
  19. <code><?php echo $filePath?></code>
  20. <?php endif?>
  21. </div>
  22. </div>
  23. <form method='post' target='hiddenwin' action='<?php echo inlink('save', "filePath=$safeFilePath&action=$action")?>'>
  24. <div class='main-content'>
  25. <table class='table table-form'>
  26. <?php if(!empty($showContent)):?>
  27. <tr>
  28. <td>
  29. <?php echo "<span class='strong'>" . $lang->editor->sourceFile . '</span>'?><br />
  30. <textarea id='showContent' class="form-control"><?php echo $showContent?></textarea>
  31. </td>
  32. </tr>
  33. <?php endif?>
  34. <tr>
  35. <td><?php echo html::textarea('fileContent', str_replace('&', '&amp;', $fileContent), "class='form-control'")?></td>
  36. </tr>
  37. <tr>
  38. <td>
  39. <?php if($action and $action != 'edit' and $action != 'newPage' and $action != 'override' and $action != 'extendControl'):?>
  40. <div class='form-group'>
  41. <div class='input-group'>
  42. <span class='input-group-addon'><?php echo $lang->editor->fileName;?></span>
  43. <?php echo html::input('fileName', '', "class='form-control'");?>
  44. <span class='input-group-addon'>
  45. <?php
  46. if($action == 'newHook')
  47. {
  48. echo $lang->editor->exampleHook;
  49. }
  50. elseif($action and $action == 'extendOther' and strpos(basename($filePath), '.js') !== false or $action == 'newJS')
  51. {
  52. echo $lang->editor->exampleJs;
  53. }
  54. elseif($action and $action == 'extendOther' and strpos(basename($filePath), '.css') !== false or $action == 'newCSS')
  55. {
  56. echo $lang->editor->exampleCss;
  57. }
  58. else
  59. {
  60. echo $lang->editor->examplePHP;
  61. }
  62. ?>
  63. </span>
  64. </div>
  65. </div>
  66. <?php endif;?>
  67. <?php if($action and $action != 'edit' and $action != 'newPage'):?>
  68. <div class='checkbox-primary'>
  69. <input type='checkbox' name='override' id='override' />
  70. <label for='override'><?php echo $lang->editor->isOverride?></span>
  71. </div>
  72. <?php endif;?>
  73. </td>
  74. </tr>
  75. <tr><td align='center'><?php echo html::submitButton()?></td></tr>
  76. </table>
  77. </div>
  78. </form>
  79. <?php include $app->getModuleRoot() . 'common/view/footer.lite.html.php';?>