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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
<?php /* $Id: mails.php,v 1.1.1.1 2002/10/28 19:13:51 pbaecher Exp $ */ /* ThWboard - PHP/MySQL Bulletin Board System ============================================== (c) 2000, 2001 by Paul Baecher <paul@thewall.de> Felix Gonschorek <funner@thewall.de>
download the latest version: http://www.thwboard.de
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
==============================================
*/
include "common.inc.php"; tb_header(); if ($action=="ListMails") { print('<b>E-Mail Manager / Select E-Mail Msg</b><br><br> send_passwort.mail [ <A HREF="mails.php?session='.$session.'&action=Show_pwmail">edit</a> ]<BR> newreply.mail [ <A HREF="mails.php?session='.$session.'&action=Show_newreply">edit</a> ]<BR> register.mail [ <A HREF="mails.php?session='.$session.'&action=Show_register">edit</a> ]<BR> ');
} elseif ($action=="Show_pwmail") { $mail_send_password = fopen("../templates/mail/send_password.mail", 'r'); $mail_send_password_size = filesize("../templates/mail/send_password.mail"); $mail_send_password_content = fread($mail_send_password,$mail_send_password_size); $mail_send_password_content = str_replace('$user[username]','{username}',$mail_send_password_content); $mail_send_password_content = str_replace('$config[board_name]','{boardname}',$mail_send_password_content); $mail_send_password_content = str_replace('$user[userpassword]','{userpw}',$mail_send_password_content); $mail_send_password_content = str_replace('$config[board_baseurl]/login.php','{link_to_login}',$mail_send_password_content); print('<b>E-Mail Manager / Edit send_passwort.mail</b><br><br>'); print('<I>Content "send_password.mail"</I><BR> <form action="mails.php" method=post> <input type=hidden name=action value="save_pwmail"> <input type=hidden name=session value="'.$session.'"> <textarea name="new_send_password" cols=50 rows=25 style="width:450px">'.$mail_send_password_content.'</textarea><P> <B>available inserts:</B><BR> {boardname} - Name of Board<BR> {link_to_login} - Direct Link to the login.php<BR> {username} - Username<BR> {userpw} - The new passwort<P> <input type=submit value="Save Settings"> '); } elseif ($action=="save_pwmail") {
$mail_send_password = fopen("../templates/mail/send_password.mail", 'w'); $new_send_password = str_replace('{username}','$user[username]',$new_send_password); $new_send_password = str_replace('{boardname}','$config[board_name]',$new_send_password); $new_send_password = str_replace('{userpw}','$user[userpassword]',$new_send_password); $new_send_password = str_replace('{link_to_login}','$config[board_baseurl]/login.php',$new_send_password); $new_send_password = str_replace("\'","'",$new_send_password); $new_send_password = str_replace('\"','"',$new_send_password); fwrite($mail_send_password, $new_send_password); print('Settings saved...'); } elseif ($action=="Show_newreply") {
$mail_newreply = fopen("../templates/mail/newreply.mail", 'r'); $mail_newreply_size = filesize("../templates/mail/newreply.mail"); $mail_newreply_content = fread($mail_newreply,$mail_newreply_size); $mail_newreply_content = str_replace('$email[threadtopic]','{thread_topic}',$mail_newreply_content); $mail_newreply_content = str_replace('$config[board_baseurl]/showtopic.php?thread[threadid]=$thread[threadid]','{link_to_thread}',$mail_newreply_content); $mail_newreply_content = str_replace('$config[board_baseurl]/misc.php?action=unsubscribe&thread[threadid]=$thread[threadid]','{link_to_unsubscribe}',$mail_newreply_content); $mail_newreply_content = str_replace('$config[board_name]','{boardname}',$mail_newreply_content); print('<b>E-Mail Manager / Edit newreply.mail</b><br><br>'); print('<I>Content "newreply.mail"</I><BR> <form action="mails.php" method=post> <input type=hidden name=action value="save_newreply"> <input type=hidden name=session value="'.$session.'"> <textarea name="new_newreply" cols=50 rows=25 style="width:450px">'.$mail_newreply_content.'</textarea><P> <B>available inserts:</B><BR> {boardname} - Name of Board<BR> {thread_topic} - Topic of the Thread<BR> {link_to_unsubscribe} - Link to unsubscribe the E-Mail-Notify<BR> {link_to_thread} - Direct link to the Post<P> <input type=submit value="Save Settings">'); } elseif ($action=="save_newreply") {
$mail_newreply = fopen("../templates/mail/newreply.mail", 'w'); $new_newreply = str_replace('{thread_topic}','$email[threadtopic]',$new_newreply); $new_newreply = str_replace('{link_to_thread}','$config[board_baseurl]/showtopic.php?thread[threadid]=$thread[threadid]',$new_newreply); $new_newreply = str_replace('{link_to_unsubscribe}','$config[board_baseurl]/misc.php?action=unsubscribe&thread[threadid]=$thread[threadid]',$new_newreply); $new_newreply = str_replace('{boardname}','$config[board_name]',$new_newreply); $new_newreply = str_replace("\'","'",$new_newreply); $new_newreply = str_replace('\"','"',$new_newreply); fwrite($mail_newreply, $new_newreply); print('Settings saved...');
} elseif ($action=="Show_register") {
$mail_register = fopen("../templates/mail/register.mail", 'r'); $mail_register_size = filesize("../templates/mail/register.mail"); $mail_register_content = fread($mail_register,$mail_register_size); $mail_register_content = str_replace('$register[username]','{username}',$mail_register_content); $mail_register_content = str_replace('$register[userpassword]','{userpw}',$mail_register_content); $mail_register_content = str_replace('$config[board_baseurl]/login.php','{link_to_login}',$mail_register_content); $mail_register_content = str_replace('$config[board_baseurl]/','{link_to_board}',$mail_register_content); $mail_register_content = str_replace('$config[board_name]','{boardname}',$mail_register_content); print('<b>E-Mail Manager / Edit newreply.mail</b><br><br>'); print('<I>Content "newreply.mail"</I><BR> <form action="mails.php" method=post> <input type=hidden name=action value="save_register"> <input type=hidden name=session value="'.$session.'"> <textarea name="new_register" cols=50 rows=25 style="width:450px">'.$mail_register_content.'</textarea><P> <B>available inserts:</B><BR> {username} - The New Username<BR> {userpw} - The new user password<BR> {link_to_login} - Direct Link to login<BR> {link_to_board} - Direct Link to the Board<BR> {boardname} - Name of the Board<BR> <input type=submit value="Save Settings">');
} elseif ($action=="save_register") {
$mail_register = fopen("../templates/mail/register.mail", 'w'); $new_register = str_replace('{username}','$register[username]',$new_register); $new_register = str_replace('{userpw}','$register[userpassword]',$new_register); $new_register = str_replace('{link_to_login}','$config[board_baseurl]/login.php',$new_register); $new_register = str_replace('{link_to_board}','$config[board_baseurl]/',$new_register); $new_register = str_replace('{boardname}','$config[board_name]',$new_register); $new_register = str_replace("\'","'",$new_register); $new_register = str_replace('\"','"',$new_register); fwrite($mail_register, $new_register); print('Settings saved...');
} elseif ($action=="Show_register") {
} else {
$mail_register = fopen("../templates/mail/register.mail", 'r'); $mail_register_size = filesize("../templates/mail/register.mail"); $mail_register_content = fread($mail_register,$mail_register_size);
print('<b>E-Mail Manager</b><br><br>'); print(' <I>Content "register.mail"</I><BR> <textarea name="new_register" cols=50 rows=15 style="width:450px">'.$mail_register_content.'</textarea><P> available inserts:
'); }
tb_footer(); ?>
|