forked from Kent55/ProfanityFilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
41 lines (34 loc) · 775 Bytes
/
index.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
<?php
/**
* Profanity Filter Version 1.0.0
* Copyright (C) 2015 Matt Kent
*/
define('IN_PROFANITY', TRUE);
define('DEBUG_MODE', FALSE);
if (DEBUG_MODE) error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
require_once 'class_core.php';
?>
<!doctype html>
<html>
<head>
<title>Profanity Filter Version <?php echo SCRIPT_V; ?></title>
</head>
<body>
<h2>Profanity Filter Version <?php echo SCRIPT_V; ?></h2>
<br />
<form action="" method="get">
<input value="<?php echo @$_GET['string']; ?>" type="text" name="string" />
<br /><br />
<input type="submit" name="do" value="Filter" />
</form>
<br />
<?php
if (isset($_GET['do']) AND trim($_GET['string']) != '')
{
$string = urlencode(trim($_GET['string']));
echo new Profanity($string);
echo '<hr />';
}
?>
</body>
</html>