-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.php
108 lines (99 loc) · 3.29 KB
/
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
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8"/>
<title>PHP GD Filter testing</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('#thumbnails a').click(function() {
$('#preview img').attr({'src': $('img', this).attr('src'), 'class': 'image' + $(this).index()});
return false;
});
$('[type=radio]').click(function() {
var image = $('#preview img').attr('class');
if ($('p').length == 0) $('.read').after('<p>Processing...</p>');
$('#preview img').load(function() {
$('p').remove();
}).attr('src', 'process.php?image=' + image + '&filter=' + $(this).val());
});
});
</script>
<style type="text/css">
body {
font-family: Arial, sans-serif;
font-size: 75%;
width: 950px;
text-align: center;
margin: 0 auto;
}
h1 {
text-align: left;
font-weight: normal;
margin: 0.5em 0;
}
a, img {
border: none;
outline: none;
}
legend {
text-align: left;
}
fieldset {
padding-bottom: 20px;
}
.read {
display: block;
margin-top: 5px;
text-align: left;
}
</style>
</head>
<body>
<h1>PHP GD Filter testing</h1>
<div id="thumbnails">
<a href="#"><img src="images/coffee.jpg" height="84"/></a>
<a href="#"><img src="images/bicycle.jpg" height="84"/></a>
<a href="#"><img src="images/lady.jpg" height="84"/></a>
<a href="#"><img src="images/dusk.jpg" height="84"/></a>
<a href="#"><img src="images/dog.jpg" height="84"/></a>
<a href="#"><img src="images/hero.jpg" height="84"/></a>
<a href="#"><img src="images/guitar.jpg" height="84"/></a>
</div>
<div id="preview">
<img src="images/coffee.jpg" class="image0"/>
</div>
<div id="filters">
<form>
<fieldset>
<legend>Filter</legend>
<input type="radio" name="filter" id="none" value="antique"/>
<label for="none">Antique</label>
<input type="radio" name="filter" id="none" value="blackwhite"/>
<label for="none">Black & White</label>
<input type="radio" name="filter" id="none" value="boost"/>
<label for="none">Boost</label>
<input type="radio" name="filter" id="none" value="sepia"/>
<label for="none">Sepia</label>
<input type="radio" name="filter" id="none" value="blur"/>
<label for="none">Blur</label>
<input type="radio" name="filter" id="none" value="dreamy"/>
<label for="none">Dreamy</label>
<input type="radio" name="filter" id="none" value="velvet"/>
<label for="none">Blue Velvet</label>
<input type="radio" name="filter" id="none" value="chrome"/>
<label for="none">Chrome</label>
<input type="radio" name="filter" id="none" value="lift"/>
<label for="none">Lift</label>
<input type="radio" name="filter" id="none" value="canvas"/>
<label for="none">Canvas</label>
<input type="radio" name="filter" id="none" value="vintage"/>
<label for="none">Vintage</label>
<input type="radio" name="filter" id="none" value="monopin"/>
<label for="none">Monopin</label>
</fieldset>
</form>
</div>
<a href="http://blog.marchibbins.com/2011/03/08/hip-to-be-square/" class="read">Read more</a>
</body>
</html>