-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
61 lines (53 loc) · 1.69 KB
/
test.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
<?php
include_once "database/dbUtil.php";
include_once "database/imageUtil.php";
if(isset($_POST["bla"])){
addImage($_FILES["foto"]);
}
?>
<html>
<head>
<title>foto test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/maskedinput.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
setUpCalendarFields();
$('#fotosTitle').click(function(){ $('#fotos').toggle();});
});
function setUpCalendarFields(){
$('.calendar').datepicker({
showOn: "button",
buttonImage: "static/images/calendar.gif",
buttonImageOnly: true,
dateFormat: 'dd-mm-yy'
}).mask('99-99-9999');
$('.ui-datepicker-trigger').css('cursor','pointer').attr({alt:'', title:''});
}
</script>
</head>
<body>
<h3 id="fotosTitle">fotos</h3>
<div id="fotos" style="display:none;">
<form enctype="multipart/form-data" action="test.php" method="post">
<input type="file" name="foto" id="foto" />
<input type="hidden" name="bla" id="bla" value="d"/>
<br/>
<input type="submit"/>
</form>
<?php
$ids = doSelectForMultipleResults("SELECT id FROM new_afbeelding");
foreach ($ids as $id){
echo "<p>";
echo '<img src="'. getImage($id['id']) . '"/>';
echo "</p>";
}
?>
</div>
<hr/>
<h3>Kalender</h3>
<input type="text" class="calendar"/>
</body>
</html>