blob: 5551d445dff8689c8cb0b9ad4290caeaf73dcfb3 (
plain) (
blame)
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
|
<?php
foreach ($_REQUEST as $key=>$val){
switch ($key){
case 'event_data':
# modify this to allow or disallow different HTML tags in event popups
$allowed = "<p><br><b><i><em><a><img><div><span><ul><ol><li><h1><h2><h3><h4><h5><h6><hr><em><strong><small><table><tr><td><th>";
$val = strip_tags($val,$allowed)
break;
default:
# cpath
$val = strip_tags($val);
}
$_REQUEST[$key] = $val;
}
foreach ($_POST as $key=>$val){
switch ($key){
case 'action':
$actions = array('login','logout','addupdate','delete');
if (!in_array($val,$actions)) $val = '';
break;
case 'date':
case 'time':
if (!is_int($val)) $val = '';
break;
default:
$val = strip_tags($val);
}
$_POST[$key] = $val;
}
foreach ($_GET as $key=>$val){
switch ($key){
case 'getdate':
if (!is_int($val)) $val = '';
break;
default:
$val = strip_tags($val);
}
$_GET[$key] = $val;
}
foreach ($_COOKIE as $key=>$val){
switch ($key){
case 'time':
if (!is_int($val)) $val = '';
break;
default:
$val = strip_tags($val);
}
$_COOKIE[$key] = $val;
}
?>
|