Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/web/www/routino/search.cgi
Parent Directory
|
Revision Log
Revision 1004 -
(show annotations)
(download)
Tue Jun 5 15:56:48 2012 UTC (12 years, 9 months ago) by amb
File size: 1455 byte(s)
Tue Jun 5 15:56:48 2012 UTC (12 years, 9 months ago) by amb
File size: 1455 byte(s)
Made some of the perl variables scope-local and checked other perl functions.
1 | #!/usr/bin/perl |
2 | # |
3 | # Routino search results retrieval CGI |
4 | # |
5 | # Part of the Routino routing software. |
6 | # |
7 | # This file Copyright 2012 Andrew M. Bishop |
8 | # |
9 | # This program is free software: you can redistribute it and/or modify |
10 | # it under the terms of the GNU Affero General Public License as published by |
11 | # the Free Software Foundation, either version 3 of the License, or |
12 | # (at your option) any later version. |
13 | # |
14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU Affero General Public License for more details. |
18 | # |
19 | # You should have received a copy of the GNU Affero General Public License |
20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
21 | # |
22 | |
23 | # Use the generic search script |
24 | require "search.pl"; |
25 | |
26 | # Use the perl CGI module |
27 | use CGI ':cgi'; |
28 | |
29 | |
30 | # Create the query and get the parameters |
31 | |
32 | $query=new CGI; |
33 | |
34 | @rawparams=$query->param; |
35 | |
36 | # Convert the CGI parameters |
37 | |
38 | foreach my $key (@rawparams) |
39 | { |
40 | my $value=$query->param($key); |
41 | |
42 | $cgiparams{$key}=$value; |
43 | } |
44 | |
45 | # Parse the parameters |
46 | |
47 | $marker=$cgiparams{"marker"}; |
48 | $search=$cgiparams{"search"}; |
49 | |
50 | # Run the search |
51 | |
52 | ($search_time,$search_lat,$search_lon,$search_message)=RunSearch($search); |
53 | |
54 | # Return the output |
55 | |
56 | print header('text/plain'); |
57 | |
58 | print "$marker\n"; |
59 | print "$search_time\n"; |
60 | print "$search_lat $search_lon\n"; |
61 | print "$search_message\n"; |
Properties
Name | Value |
---|---|
svn:executable | * |