-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.php
More file actions
43 lines (42 loc) · 1.32 KB
/
edit.php
File metadata and controls
43 lines (42 loc) · 1.32 KB
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
<?php
session_start();
require_once('FirePHPCore/FirePHP.class.php');
require_once('FirePHPCore/fb.php');
ob_start();
fb($_GET, "Get-Array: ");
fb($_POST, "POST-Array: ");
// ============================
// Edit the image sent by GET
// ============================
$imagetoedit = $_GET['edit'];
$effect='';
$number = '';
if(isset($_POST['effect'])){
$effect = $_POST['effect'];
if(isset($_POST['number']))
$number = $_POST['number'];
}
echo "Page for editing this image: " . $imagetoedit . "<br>";
echo "<img src='imagetoedit.php?edit=$imagetoedit&effect=$effect&number=$number'>";
?>
<html>
<body>
<form id="greyscale" method="post" action="edit.php<?php echo '?edit='.$imagetoedit?>">
<input type="submit" name="effect" value="grey">
</form>
<form id="brightness" method="post" action="edit.php<?php echo '?edit='.$imagetoedit?>">
<input type="text" name="number" size="3">
<input type="submit" name="effect" value="brighter">
</form>
<?php
// ============================
// Can only undo one edit, so hide "undo" botton if it will have no effect
// ============================
if($effect!='undo')
echo'<form id="default" method="post" action="edit.php?edit='.$imagetoedit.'">
<input type="submit" name="effect" value="undo">
</form>'
?>
<a href="photoapp.php">Back to overview</a>
</body>
</html>