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