author | Dan Fuhry <dan@enanocms.org> |
Fri, 20 Aug 2010 01:43:08 -0400 | |
changeset 7 | 3db638306413 |
parent 4 | 9fdc988ce46e |
child 8 | be4a5f24bb29 |
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'); |
|
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
|
24 |
setConfig('yms_claim_enable', isset($_POST['claim_enable']) ? '1' : '0'); |
3 | 25 |
setConfig('yms_claim_auth_enable', isset($_POST['claimauth_enable']) ? '1' : '0'); |
26 |
setConfig('yms_claim_auth_field', $_POST['claimauth_field']); |
|
27 |
setConfig('yms_claim_auth_url', $_POST['claimauth_url']); |
|
28 |
setConfig('yms_claim_auth_key', $_POST['claimauth_key']); |
|
29 |
||
30 |
echo '<div class="info-box">' . $lang->get('yms_acp_msg_saved') . '</div>'; |
|
31 |
} |
|
32 |
||
33 |
acp_start_form(); |
|
34 |
?> |
|
35 |
<h3><?php echo $lang->get('yms_acp_heading_main'); ?></h3> |
|
36 |
||
37 |
<div class="tblholder"> |
|
38 |
<table border="0" cellspacing="1" cellpadding="4"> |
|
39 |
||
40 |
<tr> |
|
41 |
<th colspan="2"><?php echo $lang->get('yms_acp_th_main'); ?></th> |
|
42 |
</tr> |
|
43 |
||
44 |
<tr> |
|
45 |
<td class="row2" style="width: 50%;"> |
|
46 |
<?php echo $lang->get('yms_acp_field_require_reauth_title'); ?><br /> |
|
47 |
<small><?php echo $lang->get('yms_acp_field_require_reauth_hint'); ?></small> |
|
48 |
</td> |
|
49 |
<td class="row1" style="width: 50%;"> |
|
50 |
<label> |
|
51 |
<input type="checkbox" name="require_reauth" <?php if ( getConfig('yms_require_reauth', 1) == 1 ) echo 'checked="checked" '; ?>/> |
|
52 |
<?php echo $lang->get('yms_acp_field_require_reauth'); ?> |
|
53 |
</label> |
|
54 |
</td> |
|
55 |
</tr> |
|
56 |
||
57 |
<tr> |
|
58 |
<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
|
59 |
<?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
|
60 |
<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
|
61 |
</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
|
62 |
<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
|
63 |
<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
|
64 |
<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
|
65 |
<?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
|
66 |
</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
|
67 |
</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
|
68 |
</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
|
69 |
|
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 |
<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
|
71 |
<td class="row2" style="width: 50%;"> |
3 | 72 |
<?php echo $lang->get('yms_acp_field_claimauth_enable_title'); ?><br /> |
73 |
<small><?php echo $lang->get('yms_acp_field_claimauth_enable_hint'); ?></small> |
|
74 |
</td> |
|
75 |
<td class="row1" style="width: 50%;"> |
|
76 |
<label> |
|
77 |
<input type="checkbox" name="claimauth_enable" <?php if ( getConfig('yms_claim_auth_enable', 1) == 1 ) echo 'checked="checked" '; ?>/> |
|
78 |
<?php echo $lang->get('yms_acp_field_claimauth_enable'); ?> |
|
79 |
</label> |
|
80 |
</td> |
|
81 |
</tr> |
|
82 |
||
83 |
<tr> |
|
84 |
<td class="row2" style="width: 50%;"> |
|
7 | 85 |
<?php echo $lang->get('yms_acp_field_claimauth_title'); ?><br /> |
86 |
<small><?php echo $lang->get('yms_acp_field_claimauth_title_hint'); ?></small> |
|
3 | 87 |
</td> |
88 |
<td class="row1" style="width: 50%;"> |
|
89 |
<input type="text" name="claimauth_field" value="<?php echo htmlspecialchars(getConfig('yms_claim_auth_field', '')); ?>" size="40" /> |
|
90 |
</td> |
|
91 |
</tr> |
|
92 |
||
93 |
<tr> |
|
94 |
<td class="row2" style="width: 50%;"> |
|
95 |
<?php echo $lang->get('yms_acp_field_claimauth_url_title'); ?><br /> |
|
96 |
<small><?php echo $lang->get('yms_acp_field_claimauth_url_hint'); ?></small> |
|
97 |
</td> |
|
98 |
<td class="row1" style="width: 50%;"> |
|
99 |
<input type="text" name="claimauth_url" value="<?php echo htmlspecialchars(getConfig('yms_claim_auth_url', '')); ?>" size="40" /> |
|
100 |
</td> |
|
101 |
</tr> |
|
102 |
||
103 |
<tr> |
|
104 |
<td class="row2" style="width: 50%;"> |
|
105 |
<?php echo $lang->get('yms_acp_field_claimauth_key_title'); ?><br /> |
|
106 |
<small><?php echo $lang->get('yms_acp_field_claimauth_key_hint'); ?></small> |
|
107 |
</td> |
|
108 |
<td class="row1" style="width: 50%;"> |
|
109 |
<input type="text" name="claimauth_key" value="<?php echo htmlspecialchars(getConfig('yms_claim_auth_key', '')); ?>" size="40" /> |
|
110 |
</td> |
|
111 |
</tr> |
|
112 |
||
113 |
<tr> |
|
114 |
<th colspan="2" class="subhead"> |
|
115 |
<input name="submit" type="submit" value="<?php echo $lang->get('etc_save_changes'); ?>" /> |
|
116 |
</th> |
|
117 |
</tr> |
|
118 |
||
119 |
</table> |
|
120 |
</div> |
|
121 |
||
122 |
</form> |
|
123 |
<?php |
|
124 |
} |
|
125 |