PluginProbe
User Access Manager / 2.0.10
User Access Manager v2.0.10
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
user-access-manager / src / UserAccessManager / View / AdminSetup.php

AdminSetup.php in User Access Manager 2.0.10, at src/UserAccessManager/View/AdminSetup.php

170 lines 7.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * AdminSetup.php
4 *
5 * Shows the setup page at the admin panel.
6 *
7 * PHP versions 5
8 *
9 * @author Alexander Schneider <alexanderschneider85@gmail.com>
10 * @copyright 2008-2017 Alexander Schneider
11 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
12 * @version SVN: $id$
13 * @link http://wordpress.org/extend/plugins/user-access-manager/
14 */
15
16 /**
17 * @var UserAccessManager\Controller\AdminSetupController $controller
18 */
19 if ($controller->hasUpdateMessage()) {
20 ?>
21 <div class="updated">
22 <p><strong><?php echo $controller->getUpdateMessage(); ?></strong></p>
23 </div>
24 <?php
25 }
26 ?>
27 <div class="wrap">
28 <h2><?php echo TXT_UAM_SETUP; ?></h2>
29 <?php
30 if ($controller->isDatabaseUpdateNecessary() === true) {
31 ?>
32 <table class="form-table">
33 <tbody>
34 <tr valign="top">
35 <th scope="row"><?php echo TXT_UAM_UPDATE_UAM_DB; ?></th>
36 <td>
37 <form method="post" action="<?php echo $controller->getRequestUrl(); ?>">
38 <?php $controller->createNonceField('uamSetupUpdate'); ?>
39 <input type="hidden" value="update_database" name="uam_action"/>
40 <?php
41 if ($controller->showNetworkUpdate() === true) {
42 ?>
43 <input type="radio" id="uam_update_db_network" class="uam_update_db_network"
44 name="uam_update_db" value="network"/>
45 <label for="uam_update_db_network"><?php echo TXT_UAM_UPDATE_NETWORK; ?></label>
46 <input type="radio" id="uam_update_db_blog" class="uam_update_db" name="uam_update_db"
47 value="blog" checked="checked"/>
48 <label for="uam_update_db_blog"> <?php echo TXT_UAM_UPDATE_BLOG; ?></label>
49 <?php
50 } else {
51 ?>
52 <input type="hidden" value="blog" name="uam_update_db"/>
53 <?php
54 }
55 ?>
56 &nbsp;<input type="submit" class="button"
57 name="uam_update_db_submit"
58 value="<?php echo TXT_UAM_UPDATE; ?>"/>
59 <p>
60 <input type="checkbox" id="uam_backup_db" checked="checked" name="uam_backup_db" value="1">
61 <label for="uam_backup_db"><?php echo TXT_UAM_UPDATE_BACKUP; ?></label>
62 </p>
63 <p style="color: red; font-size: 12px; font-weight: bold;">
64 <?php echo TXT_UAM_UPDATE_UAM_DB_DESCRIPTION; ?>
65 </p>
66 </form>
67 </td>
68 </tr>
69 </tbody>
70 </table>
71 <?php
72 }
73
74 $backups = $controller->getBackups();
75
76 if (count($backups) > 0) {
77 ?>
78 <table class="form-table">
79 <tbody>
80 <tr valign="top">
81 <th scope="row"><?php echo TXT_UAM_REVERT_DATABASE; ?></th>
82 <td>
83 <form method="post" action="<?php echo $controller->getRequestUrl(); ?>">
84 <?php $controller->createNonceField('uamSetupRevert'); ?>
85 <input type="hidden" value="revert_database" name="uam_action"/>
86 <?php
87 foreach ($backups as $backup) {
88 ?>
89 <input type="radio"
90 id="uam_revert_backup_<?php echo $backup; ?>"
91 name="uam_revert_database"
92 value="<?php echo $backup; ?>">
93 <label for="uam_revert_backup_<?php echo $backup; ?>"><?php echo $backup; ?></label>
94 <?php
95 }
96 ?>
97 &nbsp;<input type="submit" class="button"
98 name="uam_update_db_submit"
99 value="<?php echo TXT_UAM_REVERT_DATABASE_REVERT_NOW; ?>"/>
100 <p style="font-size: 12px;">
101 <?php echo TXT_UAM_REVERT_DATABASE_DESCRIPTION; ?>
102 </p>
103 </form>
104 </td>
105 </tr>
106 </tbody>
107 </table>
108 <table class="form-table">
109 <tbody>
110 <tr valign="top">
111 <th scope="row"><?php echo TXT_UAM_DELETE_DATABASE_BACKUP; ?></th>
112 <td>
113 <form method="post" action="<?php echo $controller->getRequestUrl(); ?>">
114 <?php $controller->createNonceField('uamSetupDeleteBackup'); ?>
115 <input type="hidden" value="delete_database_backup" name="uam_action"/>
116 <?php
117 foreach ($backups as $backup) {
118 ?>
119 <input type="radio"
120 id="uam_delete_backup_<?php echo $backup; ?>"
121 name="uam_delete_backup"
122 value="<?php echo $backup; ?>">
123 <label for="uam_delete_backup_<?php echo $backup; ?>"><?php echo $backup; ?></label>
124 <?php
125 }
126 ?>
127 &nbsp;<input type="submit" class="button"
128 name="uam_update_db_submit"
129 value="<?php echo TXT_UAM_DELETE_DATABASE_BACKUP_DELETE_NOW; ?>"/>
130 <p style="font-size: 12px;">
131 <?php echo TXT_UAM_DELETE_DATABASE_BACKUP_DESCRIPTION; ?>
132 </p>
133 </form>
134 </td>
135 </tr>
136 </tbody>
137 </table>
138 <?php
139 }
140 ?>
141 <h2 style="color:red;"><?php echo TXT_UAM_SETUP_DANGER_ZONE; ?></h2>
142 <table class="form-table">
143 <tbody>
144 <tr valign="top">
145 <th scope="row"><label for="uam_reset_confirm"><?php echo TXT_UAM_RESET_UAM; ?></label></th>
146 <td>
147 <form method="post" action="<?php echo $controller->getRequestUrl(); ?>">
148 <?php $controller->createNonceField('uamSetupReset'); ?>
149 <input type="hidden" value="reset_uam" name="uam_action"/>
150 <input id="uam_reset_confirm" class="uam_reset_confirm" name="uam_reset"/>
151 <input id="uam_reset_submit"
152 disabled="disabled"
153 type="submit"
154 class="button"
155 name="uam_reset_submit"
156 value="<?php echo TXT_UAM_RESET; ?>"
157 />
158 <br/>
159 <p style="font-size: 12px; font-weight: bold;">
160 <?php echo TXT_UAM_RESET_UAM_DESCRIPTION; ?>
161 </p>
162 <p style="color: red; font-size: 12px; font-weight: bold;">
163 <?php echo TXT_UAM_RESET_UAM_DESC_WARNING; ?>
164 </p>
165 </form>
166 </td>
167 </tr>
168 </tbody>
169 </table>
170 </div>