-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoConfess.php
398 lines (339 loc) · 15.2 KB
/
doConfess.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<?php
include('config.php');
$un=$_GET["user"];
$conn = new mysqli($servername, $musername, $mpassword, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql="SELECT name,email,username FROM user WHERE username='$un' limit 1";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$name =$row["name"];
$mail =$row["email"];
$username=$row["username"];
}
} else {
header("Location: 404.html");
}
$conn->close();
try {
$conn1 = new PDO("mysql:host=$servername;dbname=$dbname", $musername, $mpassword);
// set the PDO error mode to exception
$conn1->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql2="update counter set times=times+1 where page='".$username."'";
$conn1->exec($sql2);
}
catch(PDOException $e)
{
echo $sql2 . "<br>" . $e->getMessage();
}
function get_client_ip() {
//Just get the headers if we can or else use the SERVER global
if ( function_exists( 'apache_request_headers' ) ) {
$headers = apache_request_headers();
} else {
$headers = $_SERVER;
}
//Get the forwarded IP if it exists
if ( array_key_exists( 'X-Forwarded-For', $headers ) && filter_var( $headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {
$the_ip = $headers['X-Forwarded-For'];
} elseif ( array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers ) && filter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )
) {
$the_ip = $headers['HTTP_X_FORWARDED_FOR'];
} else {
$the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );
}
return $the_ip;
}
$ip= get_client_ip();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $name; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Confess Out Anonymously, Confession, confess, Anonymous,
prafful, lachhwani, prafful lachhwani, shadow softwares" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Custom Theme files -->
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link href="css/slider.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/owl.carousel.css" type="text/css" media="all">
<link href="css/easy-responsive-tabs.css" rel='stylesheet' type='text/css'/>
<link href='css/simplelightbox.min.css' rel='stylesheet' type='text/css'>
<!-- //Custom Theme files -->
<!-- font-awesome icons -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<!-- web-fonts -->
<link href="//fonts.googleapis.com/css?family=Montserrat:200,300,300i,400,400i,500,500i,600,600i,700,700i,800" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:100i,300,300i,400,400i,700" rel="stylesheet">
<!-- //web-fonts -->
</head>
<body>
<div id="contact" class="contact">
<div class="container"> <div id="output">
<div class="agileits-title">
<div class="agileits-title-left">
<h6>-Write a message for</h6>
<h3><i class="fa fa-user" aria-hidden="true"></i> <?php echo $name; ?></h3>
</div>
<div class="agileits-title-right">
<p class="para">http://confess.shadowsoft.esy.es/<?php echo $username; ?></p>
</div>
<div class="clearfix"> </div>
</div>
<div class="contact-w3ls-row">
<form action="send.php" method="post" id="msgs">
<div class="col-md-12 col-sm-12 contact-right agileits-w3layouts">
<input type="hidden" name="un" id="un" value="<?php echo $username;?>">
<input type="hidden" name="ip" id="ip" value="<?php echo $ip;?>">
<input type="hidden" name="email" id="email" value="<?php echo $mail;?>">
<textarea name="msg" id="msg" placeholder="Start Writting confession for <?php echo $name; ?>" required=""></textarea>
<input type="submit" value="Send Confession to <?php echo $name; ?>">
</div>
<div class="clearfix"> </div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal1 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<!-- Modal content--> <form action="auth.php" method="post">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><i class="fa fa-user" aria-hidden="true"></i> Sign UP</h3><br>
<div class="form-row">
<div class="form-group col-md-6">
<input type="text" class="form-control" id="FName" name="FName" placeholder="First Name" required>
</div>
<div class="form-group col-md-6">
<input type="text" class="form-control" id="LName" name="LName" placeholder="Last Name" required>
</div>
</div>
<div class="form-group col-md-12">
<input type="text" class="form-control" id="UName" name="UName" placeholder="Choose Username" required>
</div>
<div class="form-group col-md-12">
<input type="Email" class="form-control" id="email" name="email" placeholder="Your Email" required>
</div>
<div class="form-group col-md-12">
<input type="password" class="form-control" id="pwd" name="email" placeholder="Create Password" required>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Continue</button>
</div>
</div> </form>
<!-- //Modal content-->
</div>
</div>
<div class="modal fade" id="login" tabindex="-1" role="dialog">
<div class="modal-dialog">
<!-- Modal content--> <form action="auth.php" method="post">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><i class="fa fa-user" aria-hidden="true"></i> Log IN</h3><br>
<div class="form-row">
<div class="form-group col-md-6">
<input type="text" class="form-control" id="un" name="un" placeholder="Username/Email" required>
</div>
<div class="form-group col-md-6">
<input type="password" class="form-control" id="pwd" name="pwd" placeholder="Password" required>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Log IN</button>
</div>
</div></form>
<!-- //Modal content-->
</div>
</div>
<!-- //Modal1 -->
<!-- about -->
<div class="about" id="about">
<div class="container">
<div class="agileits-title">
<div class="agileits-title-left">
<h6>- Welcome to</h6>
<h3>Confess Now</h3>
</div>
<div class="agileits-title-right">
<p class="para">Confess to somebody without letting them know about your Identity</p>
</div>
<div class="clearfix"> </div>
</div>
<div class="wthree-about">
<div class="col-md-5 wthree-ab-left">
<img src="images/ab.png" class="responsive" alt=" " />
</div>
<div class="col-md-7 wthree-ab-right">
<h4>How to confess?</h4>
<p>Want to share your thought to someone but can't then you can use confess now we will not show your identity to the recipient as well as you can get the reply from them also. Signup from below button and get started</p>
<a href="#" class="read2 hvr-bounce-to-right" data-toggle="modal" data-target="#myModal">Sign UP</a>
<a href="#" class="read2 hvr-bounce-to-right" data-toggle="modal" data-target="#login">Log IN</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- //feedback -->
<!-- contact -->
<!-- //contact -->
<div class="footer-w3layouts">
<div class="footer-top-agile">
<h6><a href="index.html"><span>Confess</span><i>Now</i></a></h6>
</div>
<div class="subscribe-grid">
<h5>Subscribe for our latest updates</h5>
<p>We will never send you <span>spam</span> mails</p>
<form action="#" method="post">
<input type="email" placeholder="Subscribe" name="Subscribe" required="">
<button class="btn1"><i class="fa fa-envelope-o" aria-hidden="true"></i></button>
</form>
</div>
<div class="footer-bottom-wthree">
<div class="copyright-wthree">
<p>© 2018 Confess Now . All Rights Reserved | Design by <a href="http://shadowsoft.esy.es/"> Shadow Softwares </a></p>
<!-- <div class="wthree-icon footer">
<a href="#" class="social-button twitter"><i class="fa fa-twitter"></i></a>
<a href="#" class="social-button facebook"><i class="fa fa-facebook"></i></a>
<a href="#" class="social-button google"><i class="fa fa-google-plus"></i></a>
</div> -->
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- //Footer -->
<!-- js -->
<script src="js/jquery-2.2.3.min.js"></script>
<!-- //js -->
<!-- start-smooth-scrolling -->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!-- //end-smooth-scrolling -->
<!-- script for responsive tabs -->
<script src="js/easy-responsive-tabs.js"></script>
<script>
$(document).ready(function () {
$('#horizontalTab').easyResponsiveTabs({
type: 'default', //Types: default, vertical, accordion
width: 'auto', //auto or any width like 600px
fit: true, // 100% fit in a container
closed: 'accordion', // Start closed if in accordion view
activate: function(event) { // Callback function if tab is switched
var $tab = $(this);
var $info = $('#tabInfo');
var $name = $('span', $info);
$name.text($tab.text());
$info.show();
}
});
$('#verticalTab').easyResponsiveTabs({
type: 'vertical',
width: 'auto',
fit: true
});
});
</script>
<!-- stats -->
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.countup.js"></script>
<script>
$('.counter').countUp();
</script>
<!-- //stats -->
<script type="text/javascript" src="js/simple-lightbox.min.js"></script>
<script>
$(function(){
var gallery = $('.agileinfo-gallery-row a').simpleLightbox({navText: ['‹','›']});
});
</script>
<!-- script for responsive tabs -->
<!-- search jQuery -->
<script src="js/search.js"></script>
<!-- //search jQuery -->
<script src="js/snap.svg-min.js"></script>
<script src="js/main.js"></script> <!-- Resource jQuery -->
<!-- smooth-scrolling-of-move-up -->
<!-- carousel -->
<script src="js/owl.carousel.js"></script>
<script>
$(document).ready(function() {
$("#owl-demo").owlCarousel({
items :3,
itemsDesktop : [768,2],
itemsDesktopSmall : [414,1],
lazyLoad : true,
autoPlay : true,
navigation :true,
navigationText : false,
pagination : true,
});
});
</script>
<!-- //carousel -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<script>
// $("#msgs").submit(function(event)
// {
// /* stop form from submitting normally */
// event.preventDefault();
//
// /* get some values from elements on the page: */
// var $form = $( this ),
// un_value = $form.find( 'input[name="un"]' ).val(),
// Message_val = $form.find( 'input[name="Message"]' ).val(),
// url = $form.attr('action');
//
// /* Send the data using post */
// var posting = $.post( url, {
// un : un_value,
// Message : Message_val
// });
//
// posting.done(function( data )
// {
// /* Put the results in a div */
// $( "#output" ).html(data);
//
// });
// });
</script>
<!-- //smooth-scrolling-of-move-up -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/bootstrap.js"></script>
</body>
</html>