Completed
Push — patch_1-1-7 ( d70ee2...4638d6 )
by Emanuele
14:49 queued 12s
created

template_notify_unsubscribe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @name      ElkArte Forum
5
 * @copyright ElkArte Forum contributors
6
 * @license   BSD http://opensource.org/licenses/BSD-3-Clause
7
 *
8
 * This file contains code covered by:
9
 * copyright:	2011 Simple Machines (http://www.simplemachines.org)
10
 * license:  	BSD, See included LICENSE.TXT for terms and conditions.
11
 *
12
 * @version 1.1
13
 *
14
 */
15
16
/**
17
 * Interface to allow notification enable/disable.
18
 */
19
function template_notification_settings()
20
{
21
	global $context, $txt, $scripturl;
22
23
	echo '
24
		<h2 class="category_header hdicon cat_img_mail">
25
			', $txt['notify'], '
26
		</h2>
27
		<div class="well centertext">
28
			<p>', $context['notification_set'] ? $txt['notify_deactivate'] : $txt['notify_request'], '</p>
29
			<p>
30
				<strong><a href="', $scripturl, '?action=notify;sa=', $context['notification_set'] ? 'off' : 'on', ';topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $context['topic_href'], '">', $txt['no'], '</a></strong>
31
			</p>
32
		</div>';
33
}
34
35
/**
36
 * Interface for board notifications toggle.
37
 */
38
function template_notify_board()
39
{
40
	global $context, $txt, $scripturl;
41
42
	echo '
43
		<h2 class="category_header hdicon cat_img_mail">
44
			', $txt['notify'], '
45
		</h2>
46
		<div class="well centertext">
47
			<p>', $context['notification_set'] ? $txt['notifyboard_turnoff'] : $txt['notifyboard_turnon'], '</p>
48
			<p>
49
				<strong><a href="', $scripturl, '?action=notifyboard;sa=', $context['notification_set'] ? 'off' : 'on', ';board=', $context['current_board'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $context['board_href'], '">', $txt['no'], '</a></strong>
50
			</p>
51
		</div>';
52
}
53
54
/**
55
 * Something to show confirmation when they have unsubscribed from mention/topic/board/etc
56
 */
57
function template_notify_unsubscribe()
58
{
59
	global $context, $txt;
60
61
	echo '
62
		<h2 class="category_header hdicon cat_img_mail">
63
			', $txt['unnotify'], '
64
		</h2>
65
		<div class="well centertext">
66
			<p>', $context['unsubscribe_message'], '</p>
67
		</div>';
68
}