forked from tbagriyanik/eOgr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mail.php
255 lines (238 loc) · 9.23 KB
/
mail.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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?php
/*
eOgr - elearning project
Developer Site: http://yunus.sourceforge.net
Demo Site: http://yunus.sourceforge.net/eogr
Source Track: http://eogr.googlecode.com
Support: http://www.ohloh.net/p/eogr
This project is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or any later version. See the GNU
Lesser General Public License for more details.
*/
header("Expires: Sun, 1 Jan 2000 12:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
ob_start (); // Buffer output
session_start ();
$_SESSION ['ready'] = TRUE;
require("conf.php");
$time = getmicrotime();
checkLoginLang(true,true,"mail.php");
// check_source();
$seciliTema=temaBilgisi();
if($protect -> check_request(getenv('REMOTE_ADDR'))) { // check the user
@header("Location: error.php?error=4");
echo('<br/><img src="img/warning.png" border="0" style="vertical-align: middle;"/> Üzgünüz, isteğinize şu anda cevap veremiyoruz.'.
'<br/>Lüften bir süre sonra <a href='.$_SERVER['PHP_SELF'].'>tekrar</a> deneyiniz!'); // die there flooding
$hata = true;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<link rel="alternate" type="application/rss+xml" title="eOgr RSS" href="rss.php" />
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>eOgr -<?php echo $metin[69]?></title>
<link href="theme/stilGenel.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="lib/fade.js"></script>
<script src="lib/jquery-1.9.1.min.js" type="text/javascript"></script>
<link rel="shortcut icon" href="img/favicon.ico"/>
<link rel="stylesheet" href="theme/<?php echo $seciliTema?>/style.css" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" href="theme/<?php echo $seciliTema?>/style.ie6.css" type="text/css" media="screen" /><![endif]-->
</head>
<body>
<div class="PageBackgroundGradient"></div>
<div class="Main">
<div class="Sheet">
<div class="Sheet-tl"></div>
<div class="Sheet-tr">
<div> </div>
</div>
<div class="Sheet-bl">
<div> </div>
</div>
<div class="Sheet-br">
<div> </div>
</div>
<div class="Sheet-tc">
<div> </div>
</div>
<div class="Sheet-bc">
<div> </div>
</div>
<div class="Sheet-cl">
<div> </div>
</div>
<div class="Sheet-cr">
<div> </div>
</div>
<div class="Sheet-cc"></div>
<div class="Sheet-body">
<div class="Header">
<div class="Header-png"></div>
<div class="Header-jpeg"></div>
<div class="logo">
<h1 id="name-text" class="logo-name"><?php echo ayarGetir("okulGenelAdi")?></h1>
<div id="slogan-text" class="logo-text"> <?php echo $metin[286]?> </div>
</div>
</div>
<div class="contentLayout">
<div class="content">
<div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr">
<div> </div>
</div>
<div class="Post-bl">
<div> </div>
</div>
<div class="Post-br">
<div> </div>
</div>
<div class="Post-tc">
<div> </div>
</div>
<div class="Post-bc">
<div> </div>
</div>
<div class="Post-cl">
<div> </div>
</div>
<div class="Post-cr">
<div> </div>
</div>
<div class="Post-cc"></div>
<div class="Post-body">
<div class="Post-inner">
<h2 class="PostHeaderIcon-wrapper"> <span class="PostHeader"><img src="img/logo1.png" border="0" style="vertical-align: middle;" alt="main" title="<?php echo $metin[286]?>"/> - <?php echo $metin[69]?> </span> </h2>
<div class="PostContent">
<?php
echo ("<div id='lgout'><a href='#' onclick='window.close();'>".$metin[34]."</a></div><br/>");
$address1 = temizle(isset($_REQUEST["to"])?$_REQUEST["to"]:"");
$address1 = getMailAddress($address1);
if(!email_valid($address1) && !empty($address1)){
echo "<font id='hata'>Özür dileriz, kullanýcýnýn eposta adresi bilgisinde sorun var!</font>";
$hata = true;
}
if(isset($_POST["konu"])){
if ($_POST["ccode"] != $_SESSION["ccode"]) {
echo ("<font id='hata'> Kod boþ veya hatalý girildi!</font>");
$hata = true;
$_SESSION["ccode"] = "";
}else{
$_SESSION["ccode"] = "";
$subject=temizle($_POST["konu"]);
$address=temizle($_POST["address"]);
$address = getMailAddress($address);
$bodisi=temizle($_POST["icerik"]);
$gonderenMail = getMailAddress(getUserID2($_SESSION["usern"]));
if($gonderenMail=="")
$gonderenMail=ayarGetir("ayar4char");
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-9' . "\r\n";
$headers .= "From:".$gonderenMail. "\r\nReply-To:".$gonderenMail. "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(email_valid($address)){
if (@mail("$address", "eOgr - $subject", "$bodisi",$headers)){
echo("<font id='tamam'>Epostanýz Gönderildi!</font>");
$hata = true;
}
else {
echo("<font id='hata'>Özür dileriz, þu anda mesajýnýz gönderilemiyor!</font>");
$hata = true;
}
}
else
echo "<font id='hata'>Özür dileriz, kullanýcýnýn eposta adresi bilgisinde sorun var!</font>";
$hata = true;
}
}
$address = isset($_GET["to"])?$_GET["to"]:"";
if(empty($address) && isset($_POST["address"])) $address = $_POST["address"];
$hata=false;
if(empty($address) || !is_numeric($address)) {
echo("<font id='hata'>Eposta bilgisi boþ olamaz!</font>");
$hata = true;
$_SESSION["ccode"] = "";
}
if($hata==false)
{
$ccode = newPassw();
$_SESSION["ccode"]=$ccode;
?>
<script type="text/javascript" src="lib/jquery.validate.min.js"></script>
<div id="contact-wrapper">
<form id="form1" method="post" action="mail.php">
<fieldset>
<label for="konu"> <?php echo $metin[124]?> :</label>
<div>
<input name="konu" type="text" id="konu" size="50" maxlength="50" class="required" />
</div>
<label for="icerik"> <?php echo $metin[125]?> :</label>
<div>
<textarea name="icerik" id="icerik" cols="50" rows="8" class="required"></textarea>
</div>
<input type="hidden" name="address" value='<?php echo $address?>'/>
<input type="hidden" name="ccode" value="<?php echo $ccode ?>" />
<input type="submit" name="button" id="button" value="<?php echo $metin[100]?>" />
</fieldset>
</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#form1").validate({
rules: {
konu: {
required: true,
minlength: 5,
maxlength: 30
},
icerik: {
required: true,
minlength: 5,
maxlength: 150
}
},
messages: {
konu: {
required: "<?php echo $metin[665]?>"
},
icerik: {
required: "<?php echo $metin[665]?>",
minlength: "<?php echo $metin[609]?>"
}
}
});
});
</script>
<?php
}
?>
</div>
<div class="cleared"></div>
</div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
</div>
<script type="text/javascript" language="javascript">
if (document.getElementById("hata")!=null) fadeUp(document.getElementById("hata"),255,0,0,150,0,0);
if (document.getElementById("uyari")!=null) fadeUp(document.getElementById("uyari"),0,0,255,0,0,150);
if (document.getElementById("tamam")!=null) fadeUp(document.getElementById("tamam"),0,255,0,0,150,0);
if (document.getElementById("konu")!=null) document.getElementById("konu").focus();
</script>
</body>
</html>