PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/admin/plugins.php

http://typecho.googlecode.com/
PHP | 144 lines | 139 code | 5 blank | 0 comment | 20 complexity | 6d52820cf21eb5ca3603412070d66e26 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. include 'common.php';
  3. include 'header.php';
  4. include 'menu.php';
  5. ?>
  6. <div class="main">
  7. <div class="body body-950">
  8. <?php include 'page-title.php'; ?>
  9. <div class="container typecho-page-main">
  10. <div class="column-24 typecho-list">
  11. <?php Typecho_Widget::widget('Widget_Plugins_List_Activated')->to($activatedPlugins); ?>
  12. <?php if ($activatedPlugins->have()): ?>
  13. <h6 class="typecho-list-table-title"><?php _e('?????'); ?></h6>
  14. <table class="typecho-list-table">
  15. <colgroup>
  16. <col width="10"/>
  17. <col width="200"/>
  18. <col width="360"/>
  19. <col width="90"/>
  20. <col width="105"/>
  21. <col width="125"/>
  22. </colgroup>
  23. <thead>
  24. <tr>
  25. <th class="typecho-radius-topleft"> </th>
  26. <th><?php _e('??'); ?></th>
  27. <th><?php _e('??'); ?></th>
  28. <th><?php _e('??'); ?></th>
  29. <th><?php _e('??'); ?></th>
  30. <th class="typecho-radius-topright"><?php _e('??'); ?></th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <?php while ($activatedPlugins->next()): ?>
  35. <tr<?php $activatedPlugins->alt(' class="even"', ''); ?> id="plugin-<?php $activatedPlugins->name(); ?>">
  36. <td></td>
  37. <td><?php $activatedPlugins->title(); ?>
  38. <?php if (!$activatedPlugins->dependence): ?>
  39. <img src="<?php $options->adminUrl('images/notice.gif'); ?>" title="<?php _e('%s ???????typecho?????', $activatedPlugins->title); ?>" alt="<?php _e('%s ???????typecho?????', $activatedPlugins->title); ?>" class="tiny" />
  40. <?php endif; ?>
  41. </td>
  42. <td><?php $activatedPlugins->description(); ?></td>
  43. <td><?php $activatedPlugins->version(); ?></td>
  44. <td><?php echo empty($activatedPlugins->homepage) ? $activatedPlugins->author : '<a href="' . $activatedPlugins->homepage
  45. . '">' . $activatedPlugins->author . '</a>'; ?></td>
  46. <td>
  47. <?php if ($activatedPlugins->activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?>
  48. <?php if ($activatedPlugins->activated): ?>
  49. <?php if ($activatedPlugins->config): ?>
  50. <a href="<?php $options->adminUrl('options-plugin.php?config=' . $activatedPlugins->name); ?>"><?php _e('??'); ?></a>
  51. |
  52. <?php endif; ?>
  53. <a lang="<?php _e('???????? %s ??', $activatedPlugins->name); ?>" href="<?php $options->index('/action/plugins-edit?deactivate=' . $activatedPlugins->name); ?>"><?php _e('??'); ?></a>
  54. <?php else: ?>
  55. <a href="<?php $options->index('/action/plugins-edit?activate=' . $activatedPlugins->name); ?>"><?php _e('??'); ?></a>
  56. <?php endif; ?>
  57. <?php else: ?>
  58. <span class="important"><?php _e('????'); ?></span>
  59. <?php endif; ?>
  60. </td>
  61. </tr>
  62. <?php endwhile; ?>
  63. <?php if (!empty($activatedPlugins->activatedPlugins)): ?>
  64. <?php foreach ($activatedPlugins->activatedPlugins as $key => $val): ?>
  65. <tr>
  66. <td></td>
  67. <td><?php echo $key; ?></td>
  68. <td colspan="3"><span class="warning"><?php _e('?????????????????, ????????'); ?></span></td>
  69. <td><a lang="<?php _e('???????? %s ??', $key); ?>" href="<?php $options->index('/action/plugins-edit?deactivate=' . $key); ?>"><?php _e('??'); ?></a></td>
  70. </tr>
  71. <?php endforeach; ?>
  72. <?php endif; ?>
  73. </tbody>
  74. </table>
  75. <?php endif; ?>
  76. <?php Typecho_Widget::widget('Widget_Plugins_List_Deactivated')->to($deactivatedPlugins); ?>
  77. <?php if ($deactivatedPlugins->have() || !$activatedPlugins->have()): ?>
  78. <h6 class="typecho-list-table-title"><?php _e('?????'); ?></h6>
  79. <table class="typecho-list-table deactivate">
  80. <colgroup>
  81. <col width="10"/>
  82. <col width="200"/>
  83. <col width="360"/>
  84. <col width="90"/>
  85. <col width="105"/>
  86. <col width="125"/>
  87. </colgroup>
  88. <thead>
  89. <tr>
  90. <th class="typecho-radius-topleft"> </th>
  91. <th><?php _e('??'); ?></th>
  92. <th><?php _e('??'); ?></th>
  93. <th><?php _e('??'); ?></th>
  94. <th><?php _e('??'); ?></th>
  95. <th class="typecho-radius-topright"><?php _e('??'); ?></th>
  96. </tr>
  97. </thead>
  98. <tbody>
  99. <?php if ($deactivatedPlugins->have()): ?>
  100. <?php while ($deactivatedPlugins->next()): ?>
  101. <tr<?php $deactivatedPlugins->alt(' class="even"', ''); ?> id="plugin-<?php $deactivatedPlugins->name(); ?>">
  102. <td></td>
  103. <td><?php $deactivatedPlugins->title(); ?></td>
  104. <td><?php $deactivatedPlugins->description(); ?></td>
  105. <td><?php $deactivatedPlugins->version(); ?></td>
  106. <td><?php echo empty($deactivatedPlugins->homepage) ? $deactivatedPlugins->author : '<a href="' . $deactivatedPlugins->homepage
  107. . '">' . $deactivatedPlugins->author . '</a>'; ?></td>
  108. <td>
  109. <?php if ($deactivatedPlugins->activate || $deactivatedPlugins->deactivate || $deactivatedPlugins->config || $deactivatedPlugins->personalConfig): ?>
  110. <?php if ($deactivatedPlugins->activated): ?>
  111. <?php if ($deactivatedPlugins->config): ?>
  112. <a href="<?php $options->adminUrl('options-plugin.php?config=' . $deactivatedPlugins->name); ?>"><?php _e('??'); ?></a>
  113. |
  114. <?php endif; ?>
  115. <a href="<?php $options->index('/action/plugins-edit?deactivate=' . $deactivatedPlugins->name); ?>"><?php _e('??'); ?></a>
  116. <?php else: ?>
  117. <a href="<?php $options->index('/action/plugins-edit?activate=' . $deactivatedPlugins->name); ?>"><?php _e('??'); ?></a>
  118. <?php endif; ?>
  119. <?php endif; ?>
  120. </td>
  121. </tr>
  122. <?php endwhile; ?>
  123. <?php else: ?>
  124. <tr class="even">
  125. <td colspan="6"><?php _e('??????'); ?></td>
  126. </tr>
  127. <?php endif; ?>
  128. </tbody>
  129. </table>
  130. <?php endif; ?>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <?php
  136. include 'copyright.php';
  137. include 'common-js.php';
  138. include 'footer.php';
  139. ?>