PluginProbe
User Access Manager / 1.1.1
User Access Manager v1.1.1
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | tpl/adminSetup.php +60 -16 1.0 → 1.1.1 View file →
@@ -13,16 +13,34 @@
13 13 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
14 14 * @version SVN: $Id$
15 15 * @link http://wordpress.org/extend/plugins/user-access-manager/
16 16 */
17 +global $userAccessManager;
17 18
18 19 if (isset($_POST['action'])) {
19 - $post_action = $_POST['action'];
20 + $postAction = $_POST['action'];
20 21 } else {
21 - $post_action = null;
22 + $postAction = null;
22 23 }
23 24
24 -if ($post_action == 'reset_uam') {
25 +if ($postAction == 'update_db') {
26 + if (isset($_POST['uam_update_db'])) {
27 + $update = $_POST['uam_update_db'];
28 + } else {
29 + $update = null;
30 + }
31 +
32 + if ($update == 'true') {
33 + $userAccessManager->update();
34 + ?>
35 + <div class="updated">
36 + <p><strong><?php echo TXT_UAM_DB_UPDATE_SUC; ?></strong></p>
37 + </div>
38 + <?php
39 + }
40 +}
41 +
42 +if ($postAction == 'reset_uam') {
25 43 if (isset($_POST['uam_reset'])) {
26 44 $reset = $_POST['uam_reset'];
27 45 } else {
28 46 $reset = null;
@@ -40,17 +58,17 @@
40 58 }
41 59 }
42 60 ?>
43 61
44 -<div class="wrap">
45 - <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
46 - <input type="hidden" value="reset_uam" name="action" />
47 - <h2><?php echo TXT_SETUP; ?></h2>
48 - <table class="form-table">
49 - <tbody>
50 - <tr valign="top">
51 - <th scope="row"><?php echo TXT_RESET_UAM; ?></th>
52 - <td>
62 +<div class="wrap">
63 + <h2><?php echo TXT_SETUP; ?></h2>
64 + <table class="form-table">
65 + <tbody>
66 + <tr valign="top">
67 + <th scope="row"><?php echo TXT_RESET_UAM; ?></th>
68 + <td>
69 + <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
70 + <input type="hidden" value="reset_uam" name="action" />
53 71 <label for="uam_reset_yes">
54 72 <input type="radio" id="uam_reset_yes" class="uam_reset_yes" name="uam_reset" value="true" />
55 73 <?php echo TXT_YES; ?>
56 74 </label>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -61,10 +79,36 @@
61 79 <input type="submit" class="button" name="uam_reset_submit" value="<?php echo TXT_RESET; ?>" /> <br />
62 80 <p style="color: red; font-size: 12px; font-weight: bold;">
63 81 <?php echo TXT_RESET_UAM_DESC; ?>
64 82 </p>
65 - </td>
83 + </form>
84 + </td>
85 + </tr>
86 + <?php
87 +if ($userAccessManager->isDatabaseUpdateNecessary()) {
88 + ?>
89 + <tr valign="top">
90 + <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
91 + <input type="hidden" value="update_db" name="action" />
92 + <th scope="row"><?php echo TXT_UPDATE_UAM_DB; ?></th>
93 + <td>
94 + <label for="uam_update_db_yes">
95 + <input type="radio" id="uam_update_db_yes" class="uam_reset_yes" name="uam_update_db" value="true" />
96 + <?php echo TXT_YES; ?>
97 + </label>&nbsp;&nbsp;&nbsp;&nbsp;
98 + <label for="uam_update_db_no">
99 + <input type="radio" id="uam_update_db_no" class="uam_reset_no" name="uam_update_db" value="false" checked="checked" />
100 + <?php echo TXT_NO; ?>
101 + </label>&nbsp;&nbsp;&nbsp;&nbsp;
102 + <input type="submit" class="button" name="uam_update_db_submit" value="<?php echo TXT_UPDATE; ?>" /> <br />
103 + <p style="color: red; font-size: 12px; font-weight: bold;">
104 + <?php echo TXT_UPDATE_UAM_DB_DESC; ?>
105 + </p>
106 + </td>
107 + </form>
66 108 </tr>
67 - </tbody>
68 - </table>
69 - </form>
109 + <?php
110 +}
111 + ?>
112 + </tbody>
113 + </table>
70 114 </div>