国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.4KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>模块管理</title>
  7. <link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/web/css/admin.css">
  10. <script src="/static/web/js/jquery.min.js"></script>
  11. <script src="/static/web/js/bootstrap.min.js"></script>
  12. <script src="/static/web/js/webajax.js"></script>
  13. <script>
  14. function getmodule(action, hash) {
  15. fetch('module_main.php?action=download&hash=' + hash).then(resp => resp.text()).then((d) => {
  16. $DE('status_' + hash).innerHTML = d;
  17. });
  18. $DE('manager_' + hash).style.display = 'block';
  19. }
  20. </script>
  21. </head>
  22. <body>
  23. <div class="container-fluid">
  24. <ol class="breadcrumb">
  25. <li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
  26. <li class="breadcrumb-item active">模块管理</li>
  27. </ol>
  28. <div class="card shadow-sm mb-3">
  29. <div class="card-body">
  30. <a class="btn btn-success btn-sm" href="module_main.php">全部</a>
  31. <a class="btn btn-success btn-sm" href="module_main.php?moduletype=soft">模块</a>
  32. <a class="btn btn-success btn-sm" href="module_main.php?moduletype=templets">模板</a>
  33. <a class="btn btn-success btn-sm" href="module_main.php?moduletype=plus">小插件</a>
  34. <a class="btn btn-success btn-sm" href="module_main.php?moduletype=patch">补丁</a>
  35. <a class="btn btn-success btn-sm" href="module_upload.php">上传</a>
  36. </div>
  37. </div>
  38. <div class="card shadow-sm">
  39. <div class="card-header">模块管理</div>
  40. <div class="card-body">
  41. <form name="form1" action="plus_add.php" method="post">
  42. <input type="hidden" name="dopost" value="save">
  43. <div class="table-responsive">
  44. <table class="table table-borderless">
  45. <thead>
  46. <tr>
  47. <td scope="col">模块名称</td>
  48. <td scope="col">发布时间</td>
  49. <td scope="col">编码</td>
  50. <td scope="col">类型</td>
  51. <td scope="col">模块状态</td>
  52. <td scope="col">操作</td>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <?php if (count($modules) > 0) foreach($modules as $k => $v) {?>
  57. <tr>
  58. <td><?php echo $v['name'];?></td>
  59. <td><?php echo $v['time'];?></td>
  60. <td>
  61. <?php
  62. if ($cfg_soft_lang != $v['lang']) echo $v['lang'];
  63. else echo $v['lang'];
  64. ?>
  65. </td>
  66. <td><?php echo $types[$v['moduletype']];?></td>
  67. <td>
  68. <?php
  69. $file = DEDEDATA."/module/{$v['hash']}.xml";
  70. if (file_exists($file)) {
  71. if (file_exists(DEDEDATA."/module/{$v['hash']}-readme.php")){
  72. echo "<span class='btn btn-success btn-sm'>已安装</span><a href='module_main.php?action=uninstall&hash={$v['hash']}' class='btn btn-outline-danger btn-sm'>卸载</a>";
  73. } else {
  74. echo "<span class='btn btn-warning btn-sm'>未安装</span><a href='module_main.php?action=setup&hash={$v['hash']}' class='btn btn-outline-success btn-sm'>安装</a>";
  75. }
  76. } else {
  77. echo "<div id=\"status_{$v['hash']}\"><a href=\"javascript:getmodule('download','{$v['hash']}')\" class=\"btn btn-outline-warning btn-sm\">下载</a></div>";
  78. }
  79. ?>
  80. </td>
  81. <td>
  82. <div id="manager_<?php echo $v['hash'];?>" <?php if (!file_exists(DEDEDATA."/module/{$v['hash']}.xml")) echo "style='display:none'"?>>
  83. <a class="btn btn-light btn-sm" href="module_main.php?action=view_developoer&hash=<?php echo $v['hash'];?>"><i class="fa fa-user-circle" title="贡献者"></i></a>
  84. <a class="btn btn-light btn-sm" href="module_main.php?action=view&hash=<?php echo $v['hash'];?>"><i class="fa fa-eye" title="查看"></i></a>
  85. <a class="btn btn-light btn-sm" href="module_main.php?action=edit&hash=<?php echo $v['hash'];?>"><i class="fa fa-pencil-square" title="修改"></i></a>
  86. <a class="btn btn-danger btn-sm" href="module_main.php?action=del&hash=<?php echo $v['hash'];?>"><i class="fa fa-trash" title="删除"></i></a>
  87. </div>
  88. </td>
  89. </tr>
  90. <?php }?>
  91. </tbody>
  92. </table>
  93. </div>
  94. </form>
  95. </div>
  96. </div>
  97. </div>
  98. </body>
  99. </html>