My favorites
|
Sign in
floto
photo blogging system
Project Home
Downloads
Wiki
Issues
Source
Checkout
|
Browse
|
Changes
|
r42
Source path:
svn
/
trunk
/
www
/
photos
/
cron
/
form.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
<?php
/*
* Copyright 2008 Jeffrey Palm
*/
include '../config.php';
include '../../common.php';
include '../../class.CronJob.php';
include 'fileupload/fileupload.class.php';
$upload = new fileupload();
$upload->set_max_filesize(5 * 1000000);
$upload->set_overwrite_mode(2);
$dir = 'uploads/';
$filename = $upload->upload("file", $dir);
$description = $_REQUEST['description'];
$location = $_REQUEST['location'];
$lat = $_REQUEST['lat'];
$lng = $_REQUEST['lng'];
if ($filename) {
$file = $dir.$filename;
$sec = datetime();
$c = new CronJob();
$c->processImageFile($file,$sec,$description,$location,$lat,$lng);
$resolved = true;
}
if ($resolved) {
$code = 'ok';
echo '<?xml version="1.0" encoding="utf-8" ?>';
echo '<rsp stat="' . $code . '">';
echo '<description>' . $description . '</description>';
echo '<location>' . $location . '</location>';
echo '<file>' . $newFile . '</file>';
echo '</rsp>';
} else {
?>
<html>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" enctype="multipart/form-data" method="post">
<p>
<table border=0 cellpadding= cellspacing=0>
<tr><td>File: </td><td><input name="file" id="file" type="file"></td><tr>
<tr><td>Description: </td><td><input type="text" size="50" name="description"></td></tr>
<tr><td>Location: </td><td><input type="text" size="50" name="location"></td></tr>
<tr><td>Latitude: </td><td><input type="text" size="50" name="lat"></td></tr>
<tr><td>Longitude: </td><td><input type="text" size="50" name="lng"></td></tr>
<tr><td><input class=tbox type=submit value="Upload file"></td></tr>
</table>
<?php
if ($error) {
echo '<p style="color:red">';
echo $error;
echo '</p>';
} else if ($resolved) {
echo '<p style="color:green">';
echo $file . ' uploaded';
echo '</p>';
}
?>
</p>
</form>
</body>
</html>
<?php
}
?>
Show details
Hide details
Change log
r39
by jeffpalm on Dec 29, 2008
Diff
added desktop version
Go to:
/trunk/Makefile
/trunk/README
/trunk/build.xml
/trunk/class.CronJob.php
/trunk/common.php
/trunk/config.template
/trunk/content.php
/trunk/done.php
/trunk/flotoisight
/trunk/flotoisight/.classpath
/trunk/flotoisight/.project
/trunk/flotoisight/src
/trunk/flotoisight/src/main
/trunk/flotoisight/src/main/java
...nk/flotoisight/src/main/java/com
...sight/src/main/java/com/jeffpalm
...src/main/java/com/jeffpalm/floto
...n/java/com/jeffpalm/floto/isight
...loto/isight/AbstractCapture.java
...m/floto/isight/AbstractMain.java
...ffpalm/floto/isight/Capture.java
...floto/isight/ConfigInstance.java
...jeffpalm/floto/isight/Depot.java
...ffpalm/floto/isight/GuiUtil.java
.../jeffpalm/floto/isight/Main.java
...to/isight/ScreenShotCapture.java
...m/floto/isight/SplashWindow.java
...m/floto/isight/URLRequester.java
.../floto/isight/WebcamCapture.java
...va/com/jeffpalm/floto/isight/app
...alm/floto/isight/app/Config.java
...oto/isight/app/ErrorHandler.java
...ffpalm/floto/isight/app/Log.java
...to/isight/app/MessageShower.java
...oto/isight/app/OptionsPanel.java
...a/com/jeffpalm/floto/isight/util
.../isight/util/AbstractSplash.java
...ight/util/ClientHttpRequest.java
...palm/floto/isight/util/Util.java
...main/java/com/jeffpalm/floto/osx
...oto/osx/AppleScriptExecutor.java
.../floto/osx/MacScreenCapture.java
.../floto/osx/QuicktimeCapture.java
/trunk/flotoisight/src/test
/trunk/flotoisight/src/test/java
/trunk/include.php
/trunk/index.php
/trunk/make_properties.pl
/trunk/style.css
/trunk/user.template
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 1997 bytes, 82 lines
View raw file
Hosted by