/
Agreement.template.php
88 lines (77 loc) · 2.08 KB
/
Agreement.template.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines https://www.simplemachines.org
* @copyright 2020 Simple Machines and individual contributors
* @license https://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.1 RC3
*/
// The main sub template - show the agreement and/or privacy policy
function template_main()
{
global $context, $scripturl, $txt;
if (!empty($context['accept_doc']))
echo '
<form action="', $scripturl, '?action=acceptagreement;doc=', $context['accept_doc'], '" method="post">';
if (!empty($context['agreement']))
{
echo '
<h4 class="sub_bar">
', $txt['agreement' . (!empty($context['can_accept_agreement']) ? '_updated' : '')], '
</h4>';
if (!empty($context['can_accept_agreement']))
{
echo '
<div class="information noup">
', $txt['agreement_updated_desc'], '
</div>';
}
elseif (!empty($context['agreement_accepted_date']))
{
echo '
<div class="information noup">
', sprintf($txt['agreement_accepted'], timeformat($context['agreement_accepted_date'], false)), '
</div>';
}
echo '
<div class="windowbg noup">
', $context['agreement'], '
</div>';
}
if (!empty($context['privacy_policy']))
{
echo '
<h4 class="sub_bar">
', $txt['privacy_policy' . (!empty($context['can_accept_privacy_policy']) ? '_updated' : '')], '
</h4>';
if (!empty($context['can_accept_privacy_policy']))
{
echo '
<div class="information noup">
', $txt['privacy_policy_updated_desc'], '
</div>';
}
elseif (!empty($context['privacy_policy_accepted_date']))
{
echo '
<div class="information noup">
', sprintf($txt['privacy_policy_accepted'], timeformat($context['privacy_policy_accepted_date'], false)), '
</div>';
}
echo '
<div class="windowbg noup">
', $context['privacy_policy'], '
</div>';
}
if (!empty($context['accept_doc']))
echo '
<div id="confirm_buttons">
<input type="submit" value="', $txt['agree'], '" class="button">
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
</div>
</form>';
}
?>