-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
38 lines (28 loc) · 769 Bytes
/
Copy pathindex.php
File metadata and controls
38 lines (28 loc) · 769 Bytes
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
<?php
require('core/core.php');
define('COOKIE_SALT', 'some salt to protect cookies and do other stuff');
include 'classes/Captcha.php';
include 'classes/CommentsCaptcha.php';
$cap = new GenericCaptcha();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$is_valid_cap = $cap->validateCaptcha();
}
echo <<<VIEW
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>Captcha Test</title>
<link rel="stylesheet" href="styles/style.css" type="text/css">
</head>
<body>
<form action="index.php" method="post">
VIEW;
echo $cap->getHtmlForm();
$validation_result = include 'templates/validation.php';
echo <<<VIEW
<br /><input type="submit" value="Ïðîâåðèòü" />
</form>
Ðåçóëüòàò ïðîâåðêè êîäà: $validation_result
</body>
</html>
VIEW;
?>