author | Dan Fuhry <dan@enanocms.org> |
Mon, 24 Nov 2014 15:11:44 -0500 | |
changeset 8 | be4a5f24bb29 |
parent 7 | 3db638306413 |
permissions | -rw-r--r-- |
3 | 1 |
<?php |
2 |
||
3 |
$plugins->attachHook('session_started', "yms_add_admincp();"); |
|
4 |
||
5 |
function yms_add_admincp() |
|
6 |
{ |
|
7 |
global $paths; |
|
8 |
||
9 |
$paths->addAdminNode('adm_cat_appearance', 'yms_acp_title', 'YMS', scriptPath . '/plugins/yms/icons/admincp.png'); |
|
10 |
} |
|
11 |
||
12 |
function page_Admin_YMS() |
|
13 |
{ |
|
14 |
// Security check |
|
15 |
global $session; |
|
16 |
if ( $session->auth_level < USER_LEVEL_ADMIN ) |
|
17 |
return false; |
|
18 |
||
19 |
global $lang; |
|
20 |
||
21 |
if ( isset($_POST['submit']) ) |
|
22 |
{ |
|
23 |
setConfig('yms_require_reauth', isset($_POST['require_reauth']) ? '1' : '0'); |
|
8
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
24 |
setConfig('yms_force_client_id', !empty($_POST['force_client_id']) && ctype_digit($_POST['force_client_id']) ? $_POST['force_client_id'] : ''); |
4
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
25 |
setConfig('yms_claim_enable', isset($_POST['claim_enable']) ? '1' : '0'); |
3 | 26 |
setConfig('yms_claim_auth_enable', isset($_POST['claimauth_enable']) ? '1' : '0'); |
27 |
setConfig('yms_claim_auth_field', $_POST['claimauth_field']); |
|
28 |
setConfig('yms_claim_auth_url', $_POST['claimauth_url']); |
|
29 |
setConfig('yms_claim_auth_key', $_POST['claimauth_key']); |
|
30 |
||
31 |
echo '<div class="info-box">' . $lang->get('yms_acp_msg_saved') . '</div>'; |
|
32 |
} |
|
33 |
||
34 |
acp_start_form(); |
|
35 |
?> |
|
36 |
<h3><?php echo $lang->get('yms_acp_heading_main'); ?></h3> |
|
37 |
||
38 |
<div class="tblholder"> |
|
39 |
<table border="0" cellspacing="1" cellpadding="4"> |
|
40 |
||
41 |
<tr> |
|
42 |
<th colspan="2"><?php echo $lang->get('yms_acp_th_main'); ?></th> |
|
43 |
</tr> |
|
44 |
||
45 |
<tr> |
|
46 |
<td class="row2" style="width: 50%;"> |
|
47 |
<?php echo $lang->get('yms_acp_field_require_reauth_title'); ?><br /> |
|
48 |
<small><?php echo $lang->get('yms_acp_field_require_reauth_hint'); ?></small> |
|
49 |
</td> |
|
50 |
<td class="row1" style="width: 50%;"> |
|
51 |
<label> |
|
52 |
<input type="checkbox" name="require_reauth" <?php if ( getConfig('yms_require_reauth', 1) == 1 ) echo 'checked="checked" '; ?>/> |
|
53 |
<?php echo $lang->get('yms_acp_field_require_reauth'); ?> |
|
54 |
</label> |
|
55 |
</td> |
|
56 |
</tr> |
|
57 |
||
58 |
<tr> |
|
59 |
<td class="row2" style="width: 50%;"> |
|
8
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
60 |
<?php echo $lang->get('yms_acp_field_force_client_id_title'); ?><br /> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
61 |
<small><?php echo $lang->get('yms_acp_field_force_client_id_hint'); ?></small> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
62 |
</td> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
63 |
<td class="row1" style="width: 50%;"> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
64 |
<input type="text" size="5" name="force_client_id" <?php if ( ($force_cid = getConfig('yms_force_client_id', 0)) > 0 ) echo 'value="' . $force_cid . '"'; ?>/> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
65 |
</td> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
66 |
</tr> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
67 |
|
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
68 |
<tr> |
be4a5f24bb29
Add support for freezing the YMS client ID
Dan Fuhry <dan@enanocms.org>
parents:
7
diff
changeset
|
69 |
<td class="row2" style="width: 50%;"> |
4
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
70 |
<?php echo $lang->get('yms_acp_field_claim_enable_title'); ?><br /> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
71 |
<small><?php echo $lang->get('yms_acp_field_claim_enable_hint'); ?></small> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
72 |
</td> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
73 |
<td class="row1" style="width: 50%;"> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
74 |
<label> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
75 |
<input type="checkbox" name="claim_enable" <?php if ( getConfig('yms_claim_enable', 0) == 1 ) echo 'checked="checked" '; ?>/> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
76 |
<?php echo $lang->get('yms_acp_field_claim_enable'); ?> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
77 |
</label> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
78 |
</td> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
79 |
</tr> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
80 |
|
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
81 |
<tr> |
9fdc988ce46e
Added counter and ANY_CLIENT settings to ShowAESKey; Significant improvements to claim system: Added master switch for the whole system; Added ability for administrators to "su" to client ID 0 to manage pooled keys; Added ability for admins to release key when it is added
Dan
parents:
3
diff
changeset
|
82 |
<td class="row2" style="width: 50%;"> |
3 | 83 |
<?php echo $lang->get('yms_acp_field_claimauth_enable_title'); ?><br /> |
84 |
<small><?php echo $lang->get('yms_acp_field_claimauth_enable_hint'); ?></small> |
|
85 |
</td> |
|
86 |
<td class="row1" style="width: 50%;"> |
|
87 |
<label> |
|
88 |
<input type="checkbox" name="claimauth_enable" <?php if ( getConfig('yms_claim_auth_enable', 1) == 1 ) echo 'checked="checked" '; ?>/> |
|
89 |
<?php echo $lang->get('yms_acp_field_claimauth_enable'); ?> |
|
90 |
</label> |
|
91 |
</td> |
|
92 |
</tr> |
|
93 |
||
94 |
<tr> |
|
95 |
<td class="row2" style="width: 50%;"> |
|
7 | 96 |
<?php echo $lang->get('yms_acp_field_claimauth_title'); ?><br /> |
97 |
<small><?php echo $lang->get('yms_acp_field_claimauth_title_hint'); ?></small> |
|
3 | 98 |
</td> |
99 |
<td class="row1" style="width: 50%;"> |
|
100 |
<input type="text" name="claimauth_field" value="<?php echo htmlspecialchars(getConfig('yms_claim_auth_field', '')); ?>" size="40" /> |
|
101 |
</td> |
|
102 |
</tr> |
|
103 |
||
104 |
<tr> |
|
105 |
<td class="row2" style="width: 50%;"> |
|
106 |
<?php echo $lang->get('yms_acp_field_claimauth_url_title'); ?><br /> |
|
107 |
<small><?php echo $lang->get('yms_acp_field_claimauth_url_hint'); ?></small> |
|
108 |
</td> |
|
109 |
<td class="row1" style="width: 50%;"> |
|
110 |
<input type="text" name="claimauth_url" value="<?php echo htmlspecialchars(getConfig('yms_claim_auth_url', '')); ?>" size="40" /> |
|
111 |
</td> |
|
112 |
</tr> |
|
113 |
||
114 |
<tr> |
|
115 |
<td class="row2" style="width: 50%;"> |
|
116 |
<?php echo $lang->get('yms_acp_field_claimauth_key_title'); ?><br /> |
|
117 |
<small><?php echo $lang->get('yms_acp_field_claimauth_key_hint'); ?></small> |
|
118 |
</td> |
|
119 |
<td class="row1" style="width: 50%;"> |
|
120 |
<input type="text" name="claimauth_key" value="<?php echo htmlspecialchars(getConfig('yms_claim_auth_key', '')); ?>" size="40" /> |
|
121 |
</td> |
|
122 |
</tr> |
|
123 |
||
124 |
<tr> |
|
125 |
<th colspan="2" class="subhead"> |
|
126 |
<input name="submit" type="submit" value="<?php echo $lang->get('etc_save_changes'); ?>" /> |
|
127 |
</th> |
|
128 |
</tr> |
|
129 |
||
130 |
</table> |
|
131 |
</div> |
|
132 |
||
133 |
</form> |
|
134 |
<?php |
|
135 |
} |
|
136 |