-
Notifications
You must be signed in to change notification settings - Fork 1
/
filter.php
62 lines (61 loc) · 1.55 KB
/
filter.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
<?php
$filtered = true;
$woeid = null;
$what = 'kittens';
$where = null;
$start = 0;
$amount = 20;
$id = null;
$ids = '';
if(isset($_GET['start'])){
$start = intval($_GET['start']);
}
if(isset($_GET['id'])){
if(preg_match('/\d+/',$_GET['id'])){
$id = $_GET['id'];
}
}
if(isset($_GET['what'])){
$what = filter_var($_GET['what'], FILTER_SANITIZE_STRING);
}
if(isset($_GET['ids'])){
$tmp = $_GET['ids'];
if(preg_match('/[0-9]+,?/',$tmp)){
$ids = $tmp;
}
}
$cururl = 'index.php?what='.$what.'&start='.$start.'&amount='.$amount;
$licenses = array(
'0' => array(
'name'=>'All rights reserved',
'url'=>'http://flickr.com'),
'1' => array(
'name'=>'Attribution-NonCommercial-ShareAlike License',
'url'=>'http://creativecommons.org/licenses/by-nc-sa/2.0/'
),
'2' => array(
'name'=>'Attribution-NonCommercial License',
'url'=>'http://creativecommons.org/licenses/by-nc/2.0/'
),
'3' => array(
'name'=>'Attribution-NonCommercial-NoDerivs License',
'url'=>'http://creativecommons.org/licenses/by-nc-nd/2.0/'
),
'4' => array(
'name'=>'Attribution License',
'url'=>'http://creativecommons.org/licenses/by/2.0/'
),
'5' => array(
'name'=>'Attribution-ShareAlike License',
'url'=>'http://creativecommons.org/licenses/by-sa/2.0/'
),
'6' => array(
'name'=>'Attribution-NoDerivs License',
'url'=>'http://creativecommons.org/licenses/by-nd/2.0/'
),
'7' => array(
'name'=>'No known copyright restrictions',
'url'=>'http://flickr.com/commons/usage/'
),
);
?>