initial import from svn without history
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
.settings
|
||||
.cproject
|
||||
.project
|
||||
|
674
clients/cpp/trunk/LICENCE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
10
clients/cpp/trunk/README
Normal file
|
@ -0,0 +1,10 @@
|
|||
$Id: README 38 2009-04-24 14:01:38Z steffen $
|
||||
|
||||
DEPENDENCIES:
|
||||
|
||||
- libopenssl
|
||||
- libgpsmm
|
||||
- libboost
|
||||
- libcurl
|
||||
|
||||
for more information take a look on our webpage: http://www.geoportal.griesm.de
|
35
clients/cpp/trunk/httpd.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
class THttpd {
|
||||
|
||||
public:
|
||||
THttpd(boost::asio::io_service& io) : acceptor(io, tcp::endpoint(tcp::v4(), 6302)) {
|
||||
tcp::socket socket(io_service);
|
||||
acceptor.accept(socket);
|
||||
|
||||
boost::asio::streambuf buf;
|
||||
boost::asio::read_until(socket, buf, "\r\n");
|
||||
|
||||
istream request(&buf);
|
||||
|
||||
string httpMethod;
|
||||
request >> httpMethod;
|
||||
string requestString;
|
||||
request >> requestString;
|
||||
|
||||
string callback = requestString.substr(requestString.find("callback=")
|
||||
+ 9);
|
||||
callback = callback.substr(0, callback.find("&"));
|
||||
cout << callback << endl;
|
||||
|
||||
std::ostringstream response;
|
||||
response << callback << "({\"lat\": " << gpsData->fix.latitude
|
||||
<< ", \"lon\": " << gpsData->fix.longitude << ", \"alt\": "
|
||||
<< gpsData->fix.altitude << "})";
|
||||
|
||||
boost::system::error_code ignored_error;
|
||||
boost::asio::write(socket, boost::asio::buffer(response.str()),
|
||||
boost::asio::transfer_all(), ignored_error);
|
||||
}
|
||||
|
||||
private:
|
||||
tcp::acceptor acceptor;
|
||||
}
|
0
clients/cpp/trunk/httpd.h
Normal file
125
clients/cpp/trunk/main.cpp
Normal file
|
@ -0,0 +1,125 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal C++ Client
|
||||
*
|
||||
* Main
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/index.php $
|
||||
* @package core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include <openssl/sha.h>
|
||||
#include <libgpsmm.h>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
using namespace boost;
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
// default values
|
||||
std::string gpsdHost = "localhost";
|
||||
std::string gpsdPort = "2947";
|
||||
std::string geoUrl =
|
||||
"http://localhost/workspace/GeoAPI/trunk/driver/input/update.php";
|
||||
std::string username = "steffen";
|
||||
std::string password = "testme";
|
||||
unsigned char pwHash[SHA_DIGEST_LENGTH];
|
||||
int updateIntervall = 60; // in seconds
|
||||
int markerId = 22; // which marker should i update?
|
||||
|
||||
// read cli arguments
|
||||
int i = 0;
|
||||
while (argv[++i] != NULL) {
|
||||
boost::regex re("^(-[a-z]|-{2}[a-z]*)(?:=([a-zA-ZäöüßÄÖÜ0-9:./]+))?$");
|
||||
boost::cmatch matches;
|
||||
|
||||
if (boost::regex_match(argv[i], matches, re)) {
|
||||
std::string par = matches[1].str();
|
||||
|
||||
if (par == "-h" || par == "--help") {
|
||||
std::cout << argv[0] << " Version 1.0" << std::endl
|
||||
<< "usage: GeoApiClient [options]" << std::endl
|
||||
<< " -u, --username\t username for the server"
|
||||
<< std::endl
|
||||
<< " -p, --password\t password for the server"
|
||||
<< std::endl
|
||||
<< " -m, --marker\t\t which marker do you want to update?"
|
||||
<< std::endl
|
||||
<< " -i, --interval\t interval in seconds"
|
||||
<< std::endl << std::endl
|
||||
<< " -g, --gpsd\t\t host[:port]" << std::endl;
|
||||
return 0;
|
||||
} else if (par == "-u" || par == "--username") {
|
||||
username = matches[2].str();
|
||||
} else if (par == "-p" || par == "--password") {
|
||||
password = matches[2].str();
|
||||
} else if (par == "-m" || par == "--marker") {
|
||||
markerId = lexical_cast<int> (matches[2].str());
|
||||
} else if (par == "-i" || par == "--interval") {
|
||||
updateIntervall = lexical_cast<int> (matches[2].str());
|
||||
} else if (par == "-g" || par == "--gpsd") {
|
||||
boost::regex
|
||||
re(
|
||||
"^((?:[0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(?::(\\d{1,5}))?$");
|
||||
boost::cmatch sub_matches;
|
||||
if (boost::regex_match(matches[2].str().c_str(), sub_matches,
|
||||
re)) {
|
||||
gpsdHost = sub_matches[1].str();
|
||||
gpsdPort = sub_matches[2].str();
|
||||
}
|
||||
} else {
|
||||
std::cerr << "unrecognized parameter: " << argv[i] << std::endl;
|
||||
}
|
||||
} else
|
||||
std::cerr << "unrecognized parameter: " << argv[i] << std::endl;
|
||||
}
|
||||
|
||||
// sha1 pw hash
|
||||
SHA1(reinterpret_cast<const unsigned char *> (password.c_str()),
|
||||
password.length(), pwHash);
|
||||
|
||||
// initialize gps
|
||||
gpsmm gpsDevice;
|
||||
struct gps_data_t *gpsData;
|
||||
if (gpsDevice.open(gpsdHost.c_str(), gpsdPort.c_str()) == NULL) {
|
||||
std::cerr << "Connection to gpsd deamon failed!" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
try {
|
||||
boost::asio::io_service io;
|
||||
|
||||
TUpdater upd(io);
|
||||
THttpd httpd(io);
|
||||
|
||||
struct SLatLon getPos(gpsmm device) {
|
||||
gpsData = gpsDevice.query("o");
|
||||
|
||||
}
|
||||
|
||||
io.run();
|
||||
} catch (std::exception& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
28
clients/cpp/trunk/spatial.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal C++ Client
|
||||
*
|
||||
* Spatial class
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/index.php $
|
||||
* @package classes
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 42
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
#ifndef SPATIAL_H_
|
||||
#define SPATIAL_H_
|
||||
|
||||
struct SLatLon {
|
||||
double lat, lon;
|
||||
};
|
||||
|
||||
|
||||
#endif /* SPATIAL_H_ */
|
49
clients/cpp/trunk/updater.cpp
Normal file
|
@ -0,0 +1,49 @@
|
|||
class TUpdater {
|
||||
public:
|
||||
TUpdater(boost::asio::io_service& io) :
|
||||
timer(io, boost::posix_time::seconds(1)), count(0) {
|
||||
|
||||
timer.async_wait(boost::bind(&updater::update, this));
|
||||
CURL * ch = curl_easy_init();
|
||||
curl_easy_setopt(ch, CURLOPT_URL, geoUrl.c_str());
|
||||
curl_easy_setopt(ch, CURLOPT_POSTFIELDS, postStr.c_str());
|
||||
curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writer);
|
||||
curl_easy_setopt(ch, CURLOPT_WRITEDATA, &buffer);
|
||||
curl_easy_setopt(ch, CURLOPT_TIMEOUT, 5);
|
||||
curl_easy_setopt(ch, CURLOPT_ERRORBUFFER, curl_error);
|
||||
}
|
||||
|
||||
~printer() {
|
||||
std::cout << "Final count is " << count << "\n";
|
||||
}
|
||||
|
||||
void update() {
|
||||
int curl_rc = curl_easy_perform(ch);
|
||||
if (curl_rc != 0) {
|
||||
std::cerr << curl_rc << ": " << curl_error << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
curl_easy_cleanup(ch);
|
||||
std::cout << buffer << std::endl;
|
||||
buffer.clear();
|
||||
|
||||
timer.expires_at(timer.expires_at() + boost::posix_time::seconds(1));
|
||||
timer.async_wait(boost::bind(&printer::print, this));
|
||||
}
|
||||
|
||||
private:
|
||||
boost::asio::deadline_timer timer;
|
||||
int count;
|
||||
char curl_error[CURL_ERROR_SIZE];
|
||||
std::string buffer;
|
||||
|
||||
static int writer(char *data, size_t size, size_t nmemb,
|
||||
std::string *stream) {
|
||||
if (stream == NULL)
|
||||
return 0;
|
||||
|
||||
stream->append(data, size * nmemb);
|
||||
return size * nmemb;
|
||||
}
|
||||
};
|
7
clients/cpp/trunk/updater.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
class TUpdater {
|
||||
public:
|
||||
TUpdater();
|
||||
|
||||
private:
|
||||
|
||||
};
|
674
server/trunk/LICENCE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
3
server/trunk/README
Normal file
|
@ -0,0 +1,3 @@
|
|||
$Id: README 38 2009-04-24 14:01:38Z steffen $
|
||||
|
||||
for more information take a look on our webpage: http://www.geoportal.griesm.de
|
BIN
server/trunk/images/icon.ico
Normal file
After Width: | Height: | Size: 894 B |
BIN
server/trunk/images/icons/deficon.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
server/trunk/images/icons/gc-cito.gif
Normal file
After Width: | Height: | Size: 133 B |
BIN
server/trunk/images/icons/gc-earthcache.gif
Normal file
After Width: | Height: | Size: 173 B |
BIN
server/trunk/images/icons/gc-event.gif
Normal file
After Width: | Height: | Size: 117 B |
BIN
server/trunk/images/icons/gc-letterbox.gif
Normal file
After Width: | Height: | Size: 127 B |
BIN
server/trunk/images/icons/gc-megaevent.gif
Normal file
After Width: | Height: | Size: 120 B |
BIN
server/trunk/images/icons/gc-multi.gif
Normal file
After Width: | Height: | Size: 166 B |
BIN
server/trunk/images/icons/gc-mystery.gif
Normal file
After Width: | Height: | Size: 98 B |
BIN
server/trunk/images/icons/gc-traditional.gif
Normal file
After Width: | Height: | Size: 156 B |
BIN
server/trunk/images/icons/gc-virtual.gif
Normal file
After Width: | Height: | Size: 126 B |
BIN
server/trunk/images/icons/gc-webcam.gif
Normal file
After Width: | Height: | Size: 236 B |
BIN
server/trunk/images/icons/image.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
server/trunk/images/icons/user.png
Normal file
After Width: | Height: | Size: 741 B |
BIN
server/trunk/images/logo.gif
Normal file
After Width: | Height: | Size: 8.2 KiB |
36
server/trunk/include/classes/access.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Access management
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/access.php $
|
||||
* @package classes
|
||||
* @subpackage access
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Class for user permissions
|
||||
*/
|
||||
class TAccess {
|
||||
function __construct($user) {
|
||||
|
||||
}
|
||||
|
||||
function hasRight($right, $id = 0) {
|
||||
|
||||
}
|
||||
|
||||
private $user;
|
||||
}
|
||||
?>
|
116
server/trunk/include/classes/category.php
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Category abstraction
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/category.php $
|
||||
* @package classes
|
||||
* @subpackage objects
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
class TCategory extends ADatabaseObject {
|
||||
public $user;
|
||||
|
||||
public function __construct($identifier, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
if (ctype_digit((string) $identifier))
|
||||
parent::__construct($identifier, $c->db->table->categories, $db);
|
||||
elseif (is_string($identifier)) {
|
||||
$sql = 'SELECT *
|
||||
FROM ' . $c->db->table->categories . '
|
||||
WHERE name = \'' . $db->escape($identifier) . "'";
|
||||
|
||||
$result = $db->query($sql, 1);
|
||||
$cat = $result->current();
|
||||
parent::__construct($cat['id'], $c->db->table->categories, $db);
|
||||
}
|
||||
else
|
||||
throw new EBase('unknown type');
|
||||
|
||||
$this->user = new TUser($this->usr_id, $db);
|
||||
}
|
||||
|
||||
public function toXml(DOMDocument $xml) {
|
||||
$category = $xml->createElement('category');
|
||||
$category->setAttribute('id', $this->id);
|
||||
|
||||
$name = $xml->createElement('name', $this->name);
|
||||
$category->appendChild($name);
|
||||
|
||||
$decription = $xml->createElement('description', $this->description);
|
||||
$category->appendChild($decription);
|
||||
|
||||
$schema = $xml->createElement('schema', $this->schema);
|
||||
$category->appendChild($schema);
|
||||
|
||||
$icon = $xml->createElement('icon', $this->icon);
|
||||
$category->appendChild($icon);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
static public function create($name, $decription, DOMDocument $schema, $icon) {
|
||||
global $c;
|
||||
|
||||
$sql = 'INSERT ' . $c->db->table->categories . '
|
||||
SET name = \'' . $db->escape($name) . '\',
|
||||
description = \'' . $db->escape($description) . '\',
|
||||
schema = \'' . $db->escape($schema->saveXML()) . '\',
|
||||
icon = \'' . $db->escape($icon) . '\'';
|
||||
$this->db->execute($sql);
|
||||
|
||||
return new TCategory($this->db->insertId(), $this->db);
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
global $c;
|
||||
|
||||
$sql = 'DELETE FROM ' . $c->db->table->categories . '
|
||||
WHERE id = ' . $this->id;
|
||||
$this->db->execute($sql);
|
||||
}
|
||||
|
||||
static function update($name, $decription, DOMDocument $schema, $icon) {
|
||||
global $c;
|
||||
|
||||
$sql = 'UPDATE ' . $c->db->table->categories . '
|
||||
SET name = \'' . $this->db->escape($name) . '\',
|
||||
description = \'' . $this->db->escape($description) . '\',
|
||||
schema = \'' . $this->db->escape($schema->saveXML()) . '\',
|
||||
icon = \'' . $this->db->escape($icon) . '\'';
|
||||
$this->db->execute($sql);
|
||||
|
||||
//TODO update object
|
||||
}
|
||||
|
||||
static function getFromFilter(TFilter $filter, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
$sql = 'SELECT id
|
||||
FROM ' . $c->db->table->categories . '
|
||||
WHERE ' . $filter->getSql() . '
|
||||
ORDER BY updated DESC';
|
||||
|
||||
$categories = $db->query($sql, $c->api->markers->max_per_request);
|
||||
$categoryObjs = array();
|
||||
foreach ($categories as $category) {
|
||||
$categoryObjs[] = new TMarker($category['id']);
|
||||
}
|
||||
|
||||
return $categoryObjs;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
27
server/trunk/include/classes/config.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Configuration class
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package classes
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 32
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/config.php $
|
||||
*/
|
||||
|
||||
class TConfig extends TNestedArrayObject {
|
||||
|
||||
}
|
||||
|
||||
?>
|
63
server/trunk/include/classes/databaseobject.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Database object abstraction
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package
|
||||
* @subpackage
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy$
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision$
|
||||
* @lastmodifed $Date$
|
||||
* @filesource $HeadURL$
|
||||
*/
|
||||
|
||||
abstract class ADatabaseObject {
|
||||
private $data, $db, $table;
|
||||
|
||||
public function __construct($id, $table, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
$this->db = $db;
|
||||
$this->table = $table;
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . $this->table . '
|
||||
WHERE id = ' . (int) $id;
|
||||
|
||||
$result = $this->db->query($sql, 1);
|
||||
if ($result->count() > 0)
|
||||
$this->data = $result->current();
|
||||
else
|
||||
throw new EBase('invalid id: ' . $id, 1);
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
$sql = 'DELETE FROM ' . $this->table . '
|
||||
WHERE id = ' . $this->id;
|
||||
$this->db->execute($sql);
|
||||
}
|
||||
|
||||
abstract static function getFromFilter(TFilter $filter, TDatabase $db);
|
||||
abstract public function toXml(DOMDocument $xml);
|
||||
|
||||
public function __get($column) {
|
||||
return $this->data[$column];
|
||||
}
|
||||
|
||||
public function __set($column, $value) {
|
||||
$sql = 'UPDATE ' . $this->table . ' SET ' . $column . ' = ' . ((is_numeric($value)) ? $value : "'" . $this->db->escape($value) . "'");
|
||||
$this->db->execute($sql);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
173
server/trunk/include/classes/db.php
Normal file
|
@ -0,0 +1,173 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Database interface
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/db.php $
|
||||
* @package classes
|
||||
* @subpackage database
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 43 $
|
||||
* @lastmodifed $Date: 2009-04-26 17:39:01 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief base exception for database queries
|
||||
*/
|
||||
class EDatabase extends EBase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief abstract resultset definition
|
||||
*/
|
||||
abstract class TDatabaseResultSet implements Iterator {
|
||||
/**
|
||||
* @brief rowcount of the result
|
||||
* @var int
|
||||
*/
|
||||
protected $_num_rows = 0;
|
||||
|
||||
/**
|
||||
* @brief result
|
||||
* @var array
|
||||
*/
|
||||
protected $_rows = array();
|
||||
|
||||
/**
|
||||
* @param resource $resource database resource
|
||||
*/
|
||||
abstract function __construct($resource);
|
||||
|
||||
/**
|
||||
* @brief current element (iterator)
|
||||
* @return array
|
||||
*/
|
||||
public function current() {
|
||||
return current($this->_rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief next element (iterator)
|
||||
* @return array
|
||||
*/
|
||||
public function next() {
|
||||
return next($this->_rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief index of current element (iterator)
|
||||
* @return array
|
||||
*/
|
||||
public function key() {
|
||||
return key($this->_rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief first element (pointer reset, iterator)
|
||||
* @return array
|
||||
*/
|
||||
public function rewind() {
|
||||
return reset($this->_rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief check current element (iterator)
|
||||
* @return bool
|
||||
*/
|
||||
public function valid() {
|
||||
return (bool) is_array($this->current());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief count the results
|
||||
* @return int
|
||||
*/
|
||||
public function count() {
|
||||
return count($this->_rows);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief interface database definition
|
||||
*/
|
||||
interface IDatabase {
|
||||
/**
|
||||
* @brief create database connection
|
||||
* @param string $host IP or domain of the database host
|
||||
* @param string $user user
|
||||
* @param string $passwd password
|
||||
*/
|
||||
public function connect($host, $user, $pw);
|
||||
|
||||
/**
|
||||
* @brief close database connection
|
||||
*/
|
||||
public function close();
|
||||
|
||||
/**
|
||||
* @brief select database
|
||||
* @param string $name name of database
|
||||
*/
|
||||
public function select($db);
|
||||
|
||||
/**
|
||||
* @brief execute query
|
||||
* @param string $sql query
|
||||
* @return mixed
|
||||
*/
|
||||
public function execute($sql);
|
||||
|
||||
/**
|
||||
* @brief query
|
||||
* @param string $sql
|
||||
* @param int $offset
|
||||
* @param int $limit
|
||||
* @return TDatabaseResultSet
|
||||
*/
|
||||
public function query($sql, $limit = -1, $offset = 0);
|
||||
|
||||
/**
|
||||
* @brief escape
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
public function escape($string);
|
||||
|
||||
/**
|
||||
* @return integer the last id
|
||||
*/
|
||||
public function insertId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief abstract database layer definition
|
||||
*/
|
||||
abstract class TDatabase implements IDatabase {
|
||||
/**
|
||||
* @brief current database
|
||||
* @var string
|
||||
*/
|
||||
protected $database = '';
|
||||
|
||||
/**
|
||||
* @brief database handle
|
||||
* @var resource
|
||||
*/
|
||||
protected $resource = false;
|
||||
|
||||
/**
|
||||
* @brief container with exectuted queries
|
||||
* @var array
|
||||
*/
|
||||
protected $statements = array();
|
||||
}
|
||||
|
||||
?>
|
84
server/trunk/include/classes/exception.php
Normal file
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Exception class
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package classes
|
||||
* @subpackage exception
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 38
|
||||
* @version $Revision: 45 $
|
||||
* @lastmodifed $Date: 2009-04-28 20:06:10 +0200 (Di, 28 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/exception.php $
|
||||
*/
|
||||
|
||||
class EBase extends Exception {
|
||||
|
||||
function toXml($xml, $withTrace = false) {
|
||||
$xmlError = $xml->createElement('error');
|
||||
|
||||
$xmlError->appendChild($xml->createElement('message', $this->message));
|
||||
$xmlError->appendChild($xml->createElement('code', $this->code));
|
||||
$xmlError->appendChild($xml->createElement('file', $this->file));
|
||||
$xmlError->appendChild($xml->createElement('line', $this->line));
|
||||
if ($withTrace == true) {
|
||||
$xmlTrace = $xml->createElement('trace');
|
||||
$i = 0;
|
||||
foreach ($this->getTrace() as $step) {
|
||||
$xmlTraceStep = $xml->createElement('step' . $i++);
|
||||
$xmlTraceStep->appendChild($xml->createElement('file', $step['file']));
|
||||
$xmlTraceStep->appendChild($xml->createElement('line', $step['line']));
|
||||
$xmlTraceStep->appendChild($xml->createElement('function', $step['function']));
|
||||
$p = 0;
|
||||
$xmlTraceStepArgs = $xml->createElement('args');
|
||||
foreach ($step['args'] as $arg) {
|
||||
$xmlTraceStepArgs->appendChild($xml->createElement('arg' . $p, is_scalar($arg) ? gettype($arg) . ': ' . $arg : gettype($arg)));
|
||||
}
|
||||
$xmlTraceStep->appendChild($xmlTraceStepArgs);
|
||||
$xmlTrace->appendChild($xmlTraceStep);
|
||||
}
|
||||
$xmlError->appendChild($xmlTrace);
|
||||
}
|
||||
|
||||
return $xmlError;
|
||||
}
|
||||
}
|
||||
|
||||
class EError extends EBase {
|
||||
private $context;
|
||||
|
||||
public function __construct($message, $code, $file, $line, $context = null) {
|
||||
parent::__construct($message, $code);
|
||||
|
||||
$this->file = $file;
|
||||
$this->line = $line;
|
||||
|
||||
$this->context = $context;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
abstract class TErrorHandler {
|
||||
public static function initialize() {
|
||||
set_error_handler(array('TErrorHandler', 'handleError'), E_ALL ^ E_NOTICE);
|
||||
}
|
||||
|
||||
public static function uninitialize() {
|
||||
restore_error_handler();
|
||||
}
|
||||
|
||||
public static function handleError($errno, $errstr, $errfile, $errline, $errcontext) {
|
||||
throw new EError($errstr, $errno, $errfile, $errline, $errcontext);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
258
server/trunk/include/classes/filter.php
Normal file
|
@ -0,0 +1,258 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Filters for Markers, Users and Categories
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package classes
|
||||
* @subpackage filter
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 31
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/filter.php $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Filter class to combine several filter rules
|
||||
* @author steffen
|
||||
*/
|
||||
class TFilter {
|
||||
private $rules = array();
|
||||
|
||||
function __construct() {
|
||||
foreach (func_get_args() as $rule) {
|
||||
if (get_parent_class($rule) == 'ARule')
|
||||
$this->addRule($rule);
|
||||
}
|
||||
}
|
||||
|
||||
public function addRule(ARule $rule) {
|
||||
array_push($this->rules, $rule);
|
||||
}
|
||||
|
||||
public function getSql(){
|
||||
$sql = 'TRUE';
|
||||
foreach ($this->rules as $rule) {
|
||||
$sql .= ' && ' . $rule->getSql();
|
||||
}
|
||||
return $sql;
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
return $this->getSql();
|
||||
}
|
||||
|
||||
static function getFromString($filterStr) {
|
||||
$filter = new TFilter();
|
||||
|
||||
preg_replace_callback("/[+ ](\w+)([<>!]?=|<|>)([^+ <>=]+)/", array($filter, 'parse'), $filterStr);
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
||||
public function parse($array) {
|
||||
//TODO fix this global access
|
||||
global $db;
|
||||
|
||||
$op = ($array[2] == '!=') ? '<>' : $array[2]; // for SQL compability
|
||||
|
||||
switch ($array[1]) {
|
||||
case 'marker':
|
||||
$markers = explode(',', $array[3]);
|
||||
foreach ($markers as $marker) {
|
||||
$this->addRule(new TRuleMarker(new TMarker($marker, $db), $op));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'cat':
|
||||
$cats = explode(',', $array[3]);
|
||||
foreach ($cats as $cat) {
|
||||
$this->addRule(new TRuleCat(new TCategory($cat, $db), $op));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'user':
|
||||
$users = explode(',', $array[3]);
|
||||
foreach ($users as $user) {
|
||||
$this->addRule(new TRuleUser(new TUser($user, $db), $op));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'circle':
|
||||
$data = explode(',', $array[3]);
|
||||
$center = new TLatLon($data[0], $data[1]);
|
||||
$this->addRule(new TRuleCircle($center, $data[2], $op));
|
||||
break;
|
||||
|
||||
case 'bbox':
|
||||
$bbox = explode(',', $array[3]);
|
||||
$this->addRule(new TRuleBbox($bbox, $op));
|
||||
break;
|
||||
|
||||
case 'time':
|
||||
$this->addRule(new TRuleTime($array[3], $op));
|
||||
break;
|
||||
default:
|
||||
throw new EBase('unknown filter: ' . $array[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Rule template
|
||||
* @author steffen
|
||||
* @abstract
|
||||
*
|
||||
*/
|
||||
abstract class ARule {
|
||||
abstract function getSql();
|
||||
public function __toString() {
|
||||
return $this->getSql();
|
||||
}
|
||||
|
||||
private $op;
|
||||
}
|
||||
|
||||
class TRuleMarker extends ARule {
|
||||
private $marker;
|
||||
|
||||
function __construct(TMarker $marker, $op = '=') {
|
||||
$allowed = array('=', '!=');
|
||||
if (in_array($op, $allowed))
|
||||
$this->op = $op;
|
||||
else
|
||||
throw new EBase('invalid operator: ' . $op);
|
||||
|
||||
$this->marker = $marker;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
global $c;
|
||||
return $c->db->table->markers . '.id ' . $this->op . ' ' . $this->marker->id;
|
||||
}
|
||||
}
|
||||
|
||||
class TRuleCat extends ARule {
|
||||
private $cat;
|
||||
|
||||
function __construct(TCategory $cat, $op = '=') {
|
||||
$allowed = array('=', '<>');
|
||||
if (in_array($op, $allowed))
|
||||
$this->op = $op;
|
||||
else
|
||||
throw new EBase('invalid operator: ' . $op);
|
||||
|
||||
$this->cat = $cat;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
global $c;
|
||||
return $c->db->table->categories . '.id ' . $this->op . ' ' . $this->cat->id;
|
||||
}
|
||||
}
|
||||
|
||||
class TRuleUser extends ARule {
|
||||
private $user;
|
||||
|
||||
function __construct(TUser $user, $op = '=') {
|
||||
$allowed = array('=', '!=');
|
||||
if (in_array($op, $allowed))
|
||||
$this->op = $op;
|
||||
else
|
||||
throw new EBase('invalid operator: ' . $op);
|
||||
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
global $c;
|
||||
return $c->db->table->users . '.id ' . $this->op . ' ' . $this->user->id;
|
||||
}
|
||||
}
|
||||
|
||||
class TRuleCircle extends ARule {
|
||||
private $center, $distance;
|
||||
|
||||
function __construct(TLatLon $center, $distance, $op = '<') {
|
||||
if ($op == '=')
|
||||
$this->mode = 'include';
|
||||
elseif ($op == '<>')
|
||||
$this->mode = 'exclude';
|
||||
else
|
||||
throw new EBase('invalid operator: ' . $op);
|
||||
|
||||
|
||||
$this->center = $center;
|
||||
$this->distance = (float) $distance;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
global $c;
|
||||
|
||||
// http://williams.best.vwh.net/avform.htm
|
||||
$radius = '6371.01 * ACOS(SIN(RADIANS(' . $c->db->table->markers . '.lat)) * SIN(RADIANS(' . $this->center->lat . ')) + COS(RADIANS(' . $c->db->table->markers . '.lat)) * COS(RADIANS(' . $this->center->lat . ')) * COS(RADIANS(' . $this->center->lon . ' - ' . $c->db->table->markers . '.lon)))';
|
||||
|
||||
return '(' . $radius . ') ' . (($this->mode == 'include') ? '<=' : '>') . ' ' . $this->distance;
|
||||
}
|
||||
}
|
||||
|
||||
class TRuleBbox extends ARule {
|
||||
private $bbox;
|
||||
|
||||
function __construct($bbox, $op = '=') {
|
||||
if ($op == '=')
|
||||
$this->mode = 'include';
|
||||
elseif ($op = '<>')
|
||||
$this->mode = 'exclude';
|
||||
else
|
||||
throw new EBase('invalid operator: ' . $op);
|
||||
|
||||
$this->bbox = $bbox;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
global $c;
|
||||
return $c->db->table->markers . '.lat ' . (($this->mode == 'include') ? '>=' : '<=') . ' ' . (float) $this->bbox[1] . '
|
||||
&& ' . $c->db->table->markers . '.lat ' . (($this->mode == 'include') ? '<=' : '>=') . ' ' . (float) $this->bbox[3] . '
|
||||
&& ' . $c->db->table->markers . '.lon ' . (($this->mode == 'include') ? '>=' : '<=') . ' ' . (float) $this->bbox[0] . '
|
||||
&& ' . $c->db->table->markers . '.lon ' . (($this->mode == 'include') ? '<=' : '>=') . ' ' . (float) $this->bbox[2];
|
||||
}
|
||||
}
|
||||
|
||||
class TRuleTime extends ARule {
|
||||
private $ts;
|
||||
|
||||
function __construct($ts, $op = '>') {
|
||||
$this->mode = $op;
|
||||
$this->ts = $ts;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
global $c;
|
||||
return $c->db->table->markers . '.last_updated ' . $this->op . ' ' . $db->escape($this->ts);
|
||||
}
|
||||
}
|
||||
|
||||
class TRuleCustom extends ARule {
|
||||
private $sql;
|
||||
|
||||
function __construct($sql) {
|
||||
$this->sql = $sql;
|
||||
}
|
||||
|
||||
public function getSql() {
|
||||
return $this->getSql();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
59
server/trunk/include/classes/kml.php
Normal file
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Google KML generation
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/kml.php $
|
||||
* @package classes
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
class TKml {
|
||||
|
||||
function __construct($xmlns = 'http://www.opengis.net/kml/2.2') {
|
||||
$this->dom = new DOMDocument('1.0', 'UTF-8');
|
||||
$this->dom->formatOutput = true;
|
||||
|
||||
$kml = $this->dom->createElement('kml');
|
||||
$kml->setAttribute('xmlns', $xmlns);
|
||||
$this->dom->appendChild($kml);
|
||||
|
||||
$this->document = $this->dom->createElement('Document');
|
||||
$kml->appendChild($this->document);
|
||||
}
|
||||
|
||||
function addMarker($id, $lat, $lng, $title, $description, $icon = 'deficon.png') {
|
||||
$marker = $this->dom->createElement('Placemark');
|
||||
$marker->setAttribute('id', $id);
|
||||
|
||||
$name = $this->dom->createElement('name' , $title);
|
||||
$marker->appendChild($name);
|
||||
|
||||
$desc = $this->dom->createElement('description' , $description);
|
||||
$marker->appendChild($desc);
|
||||
|
||||
$point = $this->dom->createElement('Point');
|
||||
$coordinates = $this->dom->createElement('coordinates', $lng . ',' . $lat);
|
||||
$point->appendChild($coordinates);
|
||||
$marker->appendChild($point);
|
||||
|
||||
$this->document->appendChild($marker);
|
||||
}
|
||||
|
||||
function getXml() {
|
||||
return $this->dom->saveXML();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
46
server/trunk/include/classes/language.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Language class
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package classes
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 36
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/language.php $
|
||||
*/
|
||||
|
||||
class TLanguage extends TNestedArrayObject {
|
||||
private $lang;
|
||||
|
||||
public function __construct($lang = 'en') {
|
||||
$this->lang = $lang;
|
||||
}
|
||||
|
||||
public function __get($name) {
|
||||
if (!isset($this->$name))
|
||||
$this->load($name);
|
||||
|
||||
return parent::__get($name);
|
||||
}
|
||||
|
||||
private function load($module) {
|
||||
$filename = 'lang/' . $this->lang . '/' . $module . '.php';
|
||||
if (file_exists($filename)) {
|
||||
require $filename;
|
||||
$this->$module = new TNestedArrayObject($lang);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
115
server/trunk/include/classes/marker.php
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Marker abstraction
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/marker.php $
|
||||
* @package classes
|
||||
* @subpackage objects
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
class TMarker extends ADatabaseObject {
|
||||
public $pos, $xml, $user, $category;
|
||||
|
||||
function __construct($id, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
parent::__construct($id, $c->db->table->markers, $db);
|
||||
|
||||
$this->pos = new TLatLon((float) $this->lat, (float) $this->lon, (float) $this->alt);
|
||||
$this->xml = new DOMDocument();
|
||||
$this->xml->loadXML($this->data);
|
||||
$this->user = new TUser((int) $this->usr_id, $db);
|
||||
$this->category = new TCategory($this->cat_id, $db);
|
||||
}
|
||||
|
||||
public function toXml(DOMDocument $xml) {
|
||||
$xmlMarker = $xml->createElement('marker');
|
||||
$xmlMarker->setAttribute('id', $this->id);
|
||||
|
||||
$lat = $xml->createElement('lat', (float) $this->pos->lat);
|
||||
$xmlMarker->appendChild($lat);
|
||||
|
||||
$lon = $xml->createElement('lon', (float) $this->pos->lon);
|
||||
$xmlMarker->appendChild($lon);
|
||||
|
||||
$alt = $xml->createElement('alt', (float) $this->pos->alt);
|
||||
$xmlMarker->appendChild($alt);
|
||||
|
||||
$data = $xml->importNode($this->xml->documentElement, true);
|
||||
$xmlMarker->appendChild($data);
|
||||
|
||||
$user = $xml->createElement('user', $this->user->id);
|
||||
$xmlMarker->appendChild($user);
|
||||
|
||||
$category = $xml->createElement('category', $this->category->id);
|
||||
$xmlMarker->appendChild($category);
|
||||
|
||||
$icon = $xml->createElement('icon', $this->category->icon);
|
||||
$xmlMarker->appendChild($icon);
|
||||
|
||||
return $xmlMarker;
|
||||
}
|
||||
|
||||
static function create(TLatLon $pos, DOMDocument $data, TUser $user, TCategory $cat) {
|
||||
global $c;
|
||||
|
||||
$sql = 'INSERT ' . $this->table . '
|
||||
SET lat = ' . $pos->lat . ',
|
||||
lon = ' . $pos->lon . ',
|
||||
alt = ' . $pos->alt . ',
|
||||
data = \'' . $db->escape($data->saveXML()) . '\',
|
||||
usr_rd = ' . $user->id . ',
|
||||
cat_id = ' . $cat->id;
|
||||
$db->execute($sql);
|
||||
|
||||
return new TMarker($this->db->insertId());
|
||||
}
|
||||
|
||||
public function update(TLatLon $pos, DOMDocument $data, TUser $user, TCategory $cat) {
|
||||
global $c;
|
||||
|
||||
$sql = 'UPDATE ' . $this->table . '
|
||||
SET lat = ' . $pos->lat . ',
|
||||
lon = ' . $pos->lon . ',
|
||||
alt = ' . $pos->alt . ',
|
||||
data = \'' . $db->escape($data->saveXML()) . '\',
|
||||
usr_rd = ' . $user->id . ',
|
||||
cat_id = ' . $cat->id . '
|
||||
WHERE id = ' . $this->id;
|
||||
$this->db->execute($sql);
|
||||
//TODO update object
|
||||
}
|
||||
|
||||
static function getFromFilter(TFilter $filter, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
$sql = 'SELECT ' . $this->table . '.id
|
||||
FROM ' . $c->db->table->markers . '
|
||||
LEFT JOIN ' . $c->db->table->categories . ' ON ' . $c->db->table->markers . '.cat_id = ' . $c->db->table->categories . '.id
|
||||
LEFT JOIN ' . $c->db->table->users . ' ON ' . $c->db->table->markers . '.usr_id = ' . $c->db->table->users . '.id
|
||||
WHERE ' . $filter . '
|
||||
ORDER BY ' . $c->db->table->markers . '.updated DESC';
|
||||
|
||||
$markers = $db->query($sql, $c->api->markers->max_per_request);
|
||||
$markerObjs = array();
|
||||
foreach ($markers as $marker) {
|
||||
$markerObjs[] = new TMarker($marker['id'], $db);
|
||||
}
|
||||
|
||||
return $markerObjs;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
146
server/trunk/include/classes/mysql.php
Normal file
|
@ -0,0 +1,146 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* MySQL implemantation
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/mysql.php $
|
||||
* @package classes
|
||||
* @subpackage database
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief base exception for mysql queries
|
||||
*/
|
||||
class EMySql extends EDatabase
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct(mysql_error(), mysql_errno());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief resultset of a mysql query
|
||||
*/
|
||||
class TMySqlResult extends TDatabaseResultSet
|
||||
{
|
||||
/**
|
||||
* @param resource $resource mysql resultset
|
||||
*/
|
||||
function __construct($resource) {
|
||||
while ($row = mysql_fetch_assoc($resource)) {
|
||||
$this->_rows[] = $row;
|
||||
++$this->_num_rows;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief mysql layer
|
||||
*/
|
||||
class TMySql extends TDatabase {
|
||||
/**
|
||||
* @param string $host IP or domain of the database host
|
||||
* @param string $name database name
|
||||
* @param string $user user
|
||||
* @param string $passwd password
|
||||
*/
|
||||
function __construct($host, $user, $pw, $db) {
|
||||
$this->connect($host, $user, $pw);
|
||||
$this->select($db);
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
$this->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief create database connection
|
||||
* @param string $host IP or domain of the database host
|
||||
* @param string $user user
|
||||
* @param string $passwd password
|
||||
*/
|
||||
public function connect($host, $user, $pw) {
|
||||
$this->close();
|
||||
$__er = error_reporting(E_ERROR);
|
||||
if (!$this->resource = mysql_connect($host, $user, rawurlencode($pw))) {
|
||||
error_reporting($__er);
|
||||
throw new EMySql();
|
||||
}
|
||||
error_reporting($__er);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief close database connection
|
||||
*/
|
||||
public function close() {
|
||||
if (!$this->resource)
|
||||
return;
|
||||
mysql_close($this->resource);
|
||||
$this->resource = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief select database
|
||||
* @param string $name database name
|
||||
*/
|
||||
public function select($name) {
|
||||
if (!mysql_select_db($name, $this->resource))
|
||||
throw new EMySql();
|
||||
$this->database = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief execute query
|
||||
* @param string $sql query
|
||||
* @return mixed
|
||||
*/
|
||||
public function execute($sql) {
|
||||
$this->statements[] = $sql;
|
||||
if (!($result = mysql_unbuffered_query($sql, $this->resource)))
|
||||
throw new EMySql();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief mysql query
|
||||
* @param string $sql query
|
||||
* @param int $offset
|
||||
* @param int $limit
|
||||
* @return TDatabaseResultSet
|
||||
*/
|
||||
public function query($sql, $limit = -1, $offset = 0) {
|
||||
if ($limit != -1)
|
||||
$sql .= sprintf(' LIMIT %d, %d', $offset, $limit);
|
||||
return new TMySqlResult($this->execute($sql));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief mysql escape
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
public function escape($string) {
|
||||
return mysql_real_escape_string($string, $this->resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return integer the last id
|
||||
*/
|
||||
public function insertId() {
|
||||
return mysql_insert_id($db->resource);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
53
server/trunk/include/classes/nested.php
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Class for creating nested array objects
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package classes
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 36
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/nested.php $
|
||||
*/
|
||||
|
||||
class TNestedArrayObject {
|
||||
private $container = array();
|
||||
|
||||
function __construct($values) {
|
||||
if (is_array($values)) {
|
||||
foreach ($values as $name => $value) {
|
||||
if (is_array($value)) {
|
||||
$this->$name = new TConfig($value);
|
||||
}
|
||||
else {
|
||||
$this->$name = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function __set($name, $value) {
|
||||
$this->container[$name] = $value;
|
||||
}
|
||||
public function __isset($name) {
|
||||
return isset($this->container[$name]);
|
||||
}
|
||||
public function __unset($name) {
|
||||
unset($this->container[$name]);
|
||||
}
|
||||
public function __get($name) {
|
||||
return isset($this->container[$name]) ? $this->container[$name] : null;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
48
server/trunk/include/classes/run.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Run class
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package class
|
||||
* @subpackage core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 37
|
||||
* @version $Revision: 43 $
|
||||
* @lastmodifed $Date: 2009-04-26 17:39:01 +0200 (So, 26 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/run.php $
|
||||
*/
|
||||
|
||||
class TRun {
|
||||
public $start;
|
||||
|
||||
public function __construct() {
|
||||
global $c;
|
||||
|
||||
$this->start = microtime(true);
|
||||
|
||||
session_start();
|
||||
setcookie($c->session->name, session_id(), time() + $c->session->cookie_timeout, $c->session->cookie_path); // refresh session cookie
|
||||
|
||||
ob_start(array($this, 'bufferCallback'));
|
||||
}
|
||||
|
||||
private function bufferCallback($buffer) {
|
||||
$buffer = str_replace('{time}', round((microtime(true) - $this->start) * 1000, 3) . ' ms', $buffer);
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
public function __destruct() {
|
||||
ob_end_flush();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
116
server/trunk/include/classes/spatial.php
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Abstraction class for spatial objects
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/spatial.php $
|
||||
* @package classes
|
||||
* @subpackage spatial
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 30
|
||||
* @version $Revision: 43 $
|
||||
* @lastmodifed $Date: 2009-04-26 17:39:01 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
class TLatLon {
|
||||
public $lat, $lon, $alt;
|
||||
|
||||
function __construct($lat, $lon, $alt = 0) {
|
||||
if ($lat > 90 || $lat < -90) throw new EBase('Out of Range!'); else $this->lat = (float) $lat;
|
||||
if ($lon > 90 || $lon < -90) throw new EBase('Out of Range!'); else $this->lon = (float) $lon;
|
||||
$this->alt = (float) $alt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief calculates distance between two coordinates
|
||||
* @param $to
|
||||
* @link http://williams.best.vwh.net/avform.htm
|
||||
* @since 33
|
||||
* @return float distance in kilometers to $pos
|
||||
*/
|
||||
function distance(TLatLon $to) {
|
||||
return 6371.01 * $this->greatCircleDistance($to);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief calculates course between two coordinates
|
||||
* @param $to
|
||||
* @link http://williams.best.vwh.net/avform.htm
|
||||
* @since 33
|
||||
* @return float course in degree oriented towards the true northpole
|
||||
*/
|
||||
function course(TLatLon $to) {
|
||||
$lat1 = deg2rad($this->lat);
|
||||
$lon1 = deg2rad($this->lon);
|
||||
|
||||
$lat2 = deg2rad($to->lat);
|
||||
$lon2 = deg2rad($to->lon);
|
||||
|
||||
$d = $this->greatCircleDistance($to);
|
||||
$course = acos((sin($lat2) - sin($lat1) * cos($d)) / (sin($d) * cos($lat1)));
|
||||
|
||||
if (sin($lon2 - $lon1) < 0) {
|
||||
$course = 2 * pi() - $course;
|
||||
}
|
||||
|
||||
return rad2deg($course);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief calculates human readable course information
|
||||
* @param $to
|
||||
* @since 33
|
||||
* @return string
|
||||
*/
|
||||
function courseLetters($to) {
|
||||
//TODO added windroses for diffrent languages
|
||||
$windrose = array('N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW');
|
||||
|
||||
$angle = $this->course($to);
|
||||
return $windrose[round($angle / 45)];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief calculates the angle between the two coordinates and the earth's centerpoint
|
||||
* @param $to
|
||||
* @since 33
|
||||
* @return float great circle distance in radians
|
||||
*/
|
||||
private function greatCircleDistance(TLatLon $to) {
|
||||
$lat1 = deg2rad($this->lat);
|
||||
$lon1 = deg2rad($this->lon);
|
||||
|
||||
$lat2 = deg2rad($to->lat);
|
||||
$lon2 = deg2rad($to->lon);
|
||||
|
||||
return acos(sin($lat1) * sin($lat2) + cos($lat1) * cos($lat2) * cos($lon2 - $lon1));
|
||||
}
|
||||
}
|
||||
|
||||
class TTrack {
|
||||
public $coords = array();
|
||||
|
||||
function __construct($start, $end) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief calculate length of the line
|
||||
* @return float length in kilometers
|
||||
*/
|
||||
function length() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class TPolygon {
|
||||
public $points; // of TLatLon
|
||||
}
|
||||
|
||||
?>
|
142
server/trunk/include/classes/user.php
Normal file
|
@ -0,0 +1,142 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* User abstraction
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/classes/user.php $
|
||||
* @package classes
|
||||
* @subpackage access
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
class TUser extends ADatabaseObject {
|
||||
function __construct($identifier, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
if (ctype_digit((string) $identifier)) {
|
||||
parent::__construct($identifier, $c->db->table->users, $db);
|
||||
}
|
||||
elseif (is_string($identifier)) {
|
||||
$sql = 'SELECT id
|
||||
FROM ' . $c->db->table->users . '
|
||||
WHERE nick = \'' . $db->escape($identifier) . "'";
|
||||
$result = $db->query($sql, 1);
|
||||
$user = $result->current();
|
||||
parent::__construct($user['id'], $c->db->table->users, $db);
|
||||
}
|
||||
else
|
||||
throw new EBase('unknown type');
|
||||
}
|
||||
|
||||
public function toXml(DOMDocument $xml) {
|
||||
$user = $xml->createElement('user');
|
||||
$user->setAttribute('id', $this->id);
|
||||
|
||||
$nick = $xml->createElement('nick', $this->nick);
|
||||
$user->appendChild($name);
|
||||
|
||||
$preName = $xml->createElement('prename', $this->prename);
|
||||
$user->appendChild($preName);
|
||||
|
||||
$lastName = $xml->createElement('lastname', $this->lastname);
|
||||
$user->appendChild($lastName);
|
||||
|
||||
$eMail = $xml->createElement('email', $this->email);
|
||||
$user->appendChild($eMail);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
static function getFromFilter(TFilter $filter, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
$sql = 'SELECT id
|
||||
FROM ' . $c->db->table->users . '
|
||||
WHERE ' . $filter->getSql() . '
|
||||
ORDER BY joined DESC';
|
||||
|
||||
$users = $db->query($sql);
|
||||
$userObjs = array();
|
||||
foreach ($users as $user) {
|
||||
$userObjs[] = new TUser($user['id']);
|
||||
}
|
||||
|
||||
return $userObjs;
|
||||
}
|
||||
|
||||
static function create($nick, $preName, $lastName, $eMail, TDatabase $db) {
|
||||
global $c;
|
||||
|
||||
$sql = 'INSERT ' . $c->db->table->users . '
|
||||
SET nick = \'' . $db->escape($nick) . '\',
|
||||
prename = \'' . $db->escape($preName) . '\',
|
||||
lastname = \'' . $db->escape($lastName) . '\',
|
||||
email = \'' . $db->escape($eMail);
|
||||
$db->execute($sql);
|
||||
|
||||
return new TUser($db->insertId());
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
global $c;
|
||||
|
||||
$sql = 'DELETE FROM ' . $c->db->table->users . '
|
||||
WHERE id = ' . $this->id;
|
||||
$this->db->execute($sql);
|
||||
}
|
||||
|
||||
public function update($nick, $preName, $lastName, $eMail) {
|
||||
global $c;
|
||||
|
||||
$sql = 'UPDATE ' . $c->db->table->users . '
|
||||
SET nick = \'' . $this->db->escape($nick) . '\',
|
||||
prename = \'' . $this->db->escape($preName) . '\',
|
||||
lastname = \'' . $this->db->escape($lastName) . '\',
|
||||
email = \'' . $this->db->escape($eMail) . '\'
|
||||
WHERE id = ' . $this->id;
|
||||
$this->db->execute($sql);
|
||||
//TODO update object
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief checks if the password is correct
|
||||
* @param $pw
|
||||
* @return bool
|
||||
*/
|
||||
public function checkPassword($pw) {
|
||||
if (hashPassword($pw) == $this->password) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief hashes the password with selected algorithm
|
||||
* @static
|
||||
*/
|
||||
public static function hashPassword($pw) {
|
||||
return sha1($pw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief changes the user password
|
||||
* @param
|
||||
*/
|
||||
public function changePassword($oldPw, $newPw, $db) {
|
||||
global $c;
|
||||
|
||||
if (checkPassword($oldPw)) {
|
||||
$this->password = $this->hashPassword($newPw);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
74
server/trunk/include/config.php
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Configuration
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/config.php $
|
||||
* @package config
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 43 $
|
||||
* @lastmodifed $Date: 2009-04-26 17:39:01 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Database settings
|
||||
*/
|
||||
$config['db'] = array('backend' => 'mysql',
|
||||
'user' => 'geoportal',
|
||||
'pw' => 'testme',
|
||||
'host' => 'localhost',
|
||||
'db' => 'st_geoportal',
|
||||
|
||||
'table' => array('prefix' => '',
|
||||
'markers' => $config['db']['table']['prefix'] . 'markers',
|
||||
'categories' => $config['db']['table']['prefix'] . 'categories',
|
||||
'users' => $config['db']['table']['prefix'] . 'users'));
|
||||
|
||||
/*
|
||||
* XML settings
|
||||
*/
|
||||
$config['xml'] = array('version' => '1.0',
|
||||
'encoding' => 'UTF-8');
|
||||
|
||||
/*
|
||||
* API settings
|
||||
*/
|
||||
$config['api']['markers']['max_per_request'] = 100;
|
||||
|
||||
/*
|
||||
* Slippy map settings
|
||||
*/
|
||||
$config['map']['home']['lat'] = 49.861915;
|
||||
$config['map']['home']['lon'] = 8.5683703;
|
||||
$config['map']['home']['zoom'] = 15;
|
||||
$config['map']['default_icon'] = 'deficon.png';
|
||||
|
||||
/*
|
||||
* Generall settings
|
||||
*/
|
||||
$config['general'] = array('title' => 'GeoPortal',
|
||||
'description' => 'GeoPortal is a webbased portal for geospatial data',
|
||||
'language' => 'de',
|
||||
'template' => 'default');
|
||||
|
||||
/*
|
||||
* Google Maps & Google Earth specific settings
|
||||
*/
|
||||
$config['google']['key'] = 'ABQIAAAA_W-Ke-iVOU-RFtiVGjLiOBTm8kGP-LZM02K8D2klsHL-q2zvhBSDLf49PiG6EX3bulVarh5osBzEww';
|
||||
|
||||
/*
|
||||
* Session settings
|
||||
*/
|
||||
$config['session'] = array('cookie_path' => '/',
|
||||
'session_name' => 'sess_id',
|
||||
'cookie_timeout'=> 60 * 100, // 100 minutes
|
||||
'garbage_timeout'=> 24 * 60 * 60); // 1 day
|
||||
?>
|
24
server/trunk/include/functions/utils.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Helper functions
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package functions
|
||||
* @subpackage utils
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @copyright Copyright (c) 2009, Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/functions/utils.php $
|
||||
*/
|
||||
|
||||
?>
|
86
server/trunk/include/init.php
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Initialize environment
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package core
|
||||
* @subpackage
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/init.php $
|
||||
*/
|
||||
|
||||
$root = dirname(dirname(__FILE__));
|
||||
|
||||
require_once $root . '/include/config.php';
|
||||
|
||||
function __autoload($classname) {
|
||||
global $root;
|
||||
|
||||
$classes = $root . '/include/classes/';
|
||||
$classmap = array( 'TErrorHandler' => 'exception',
|
||||
'TNestedArrayObject' => 'nested',
|
||||
'EDatabase' => 'db',
|
||||
'TLatLon' => 'spatial');
|
||||
|
||||
$file = $classes . strtolower(substr($classname, 1)) . '.php';
|
||||
if (file_exists($file)) {
|
||||
require_once $file;
|
||||
}
|
||||
else {
|
||||
//echo $classname;
|
||||
require_once $classes . $classmap[$classname] . '.php';
|
||||
}
|
||||
}
|
||||
|
||||
error_reporting(E_ALL);
|
||||
TErrorHandler::initialize();
|
||||
|
||||
// load configuration
|
||||
$c = new TConfig($config);
|
||||
|
||||
// configure environment
|
||||
ini_set('session.gc_maxlifetime', $c->session->garbage_timeout);
|
||||
ini_set('session.cookie_lifetime', $c->session->cookie_timeout);
|
||||
ini_set('session.cookie_path', $c->session->cookie_path);
|
||||
ini_set('session.name', $c->session->name);
|
||||
ini_set('session.use_only_cookies', true);
|
||||
|
||||
// initialize context
|
||||
//$r = new TRun();
|
||||
|
||||
// intitialize language
|
||||
$l = new TLanguage($c->general->language);
|
||||
|
||||
// initialize database connection
|
||||
require_once $root . '/include/classes/' . $c->db->backend . '.php';
|
||||
$db = new TMySql($c->db->host, $c->db->user, $c->db->pw, $c->db->db);
|
||||
|
||||
// Against session highjacking
|
||||
if(empty($_SESSION['ip']) || empty($_SESSION['ua'])) {
|
||||
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$_SESSION['ua'] = $_SERVER['HTTP_USER_AGENT'];
|
||||
}
|
||||
|
||||
if(substr($_SESSION['ip'], 0, strrpos($_SESSION['ip'], '.')) != substr($_SERVER['REMOTE_ADDR'], 0, strrpos($_SERVER['REMOTE_ADDR'], '.'))) {
|
||||
trigger_error('Session cookie hijacked: IP subset changed', E_USER_ERROR);
|
||||
exit('Session cookie hijacked: IP subset changed! Killing myself...');
|
||||
}
|
||||
|
||||
if ($_SESSION['ua'] != $_SERVER['HTTP_USER_AGENT'] && !empty($_SESSION['usr_id'])) {
|
||||
trigger_error('Session cookie hijacked: Useragent changed', E_USER_ERROR);
|
||||
exit('Session cookie hijacked: Useragent changed! Killing myself...');
|
||||
}
|
||||
|
||||
?>
|
39
server/trunk/include/javascript/geolocation.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Geolocation
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/javascript/geolocation.js $
|
||||
* @package javascripts
|
||||
* @subpackage geolocation
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
var TGeoLocation = function () {
|
||||
function getPosition() {
|
||||
$.ajax( {
|
||||
dataType :"jsonp",
|
||||
url :"http://localhost:6302/getposition",
|
||||
success :updatePosition
|
||||
});
|
||||
}
|
||||
|
||||
function updatePosition(json) {
|
||||
var lonLat = new OpenLayers.LonLat(json.lon, json.lat).transform(
|
||||
new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject())
|
||||
map.panTo(lonLat);
|
||||
|
||||
updateTimeout = window.setTimeout("getPosition()", 10000);
|
||||
}
|
||||
|
||||
getPosition();
|
||||
}
|
19
server/trunk/include/javascript/jquery.js
vendored
Normal file
39
server/trunk/include/javascript/main.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Main javascript
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/javascript/main.js $
|
||||
* @package javascript
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
|
||||
var map;
|
||||
var loadTimeout;
|
||||
var updateTnterval;
|
||||
var currentPopup;
|
||||
|
||||
/*
|
||||
* Main routine
|
||||
*/
|
||||
var main = function() {
|
||||
var map = new TOLMap();
|
||||
//var position = new TGeoLocation();
|
||||
|
||||
map.setCenter(49.869, 8.62, 13);
|
||||
}
|
||||
|
||||
$(document).ready(main);
|
72
server/trunk/include/javascript/marker.js
Normal file
|
@ -0,0 +1,72 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Javascript Marker handling
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/javascript/marker.js $
|
||||
* @package javascripts
|
||||
* @subpackage markers
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Marker handling
|
||||
*/
|
||||
|
||||
function getMarkers() {
|
||||
$.ajax( {
|
||||
type :"GET",
|
||||
dataType :"xml",
|
||||
async :true,
|
||||
url :"driver/output/getmarkers.php?BBOX="
|
||||
+ map.getExtent().toBBOX(),
|
||||
success :drawMarkers
|
||||
});
|
||||
}
|
||||
|
||||
function markerClick(evt) {
|
||||
if (this.popup == null) {
|
||||
this.popup = this.createPopup(true);
|
||||
map.addPopup(this.popup);
|
||||
this.popup.hide();
|
||||
}
|
||||
|
||||
this.popup.toggle();
|
||||
|
||||
OpenLayers.Event.stop(evt);
|
||||
}
|
||||
|
||||
function drawMarkers(xml) {
|
||||
xmlMarkers = xml.getElementsByTagName("marker");
|
||||
markerLayer = map.getLayersByName("Markers")[0];
|
||||
|
||||
for ( var i = 0; i < xmlMarkers.length; i++) {
|
||||
var id = parseInt(xmlMarkers[i].getAttribute("id"));
|
||||
var lat = parseFloat(xmlMarkers[i].getElementsByTagName("lat")[0].firstChild.nodeValue);
|
||||
var lon = parseFloat(xmlMarkers[i].getElementsByTagName("lon")[0].firstChild.nodeValue);
|
||||
var alt = parseFloat(xmlMarkers[i].getElementsByTagName("alt")[0].firstChild.nodeValue);
|
||||
var data = xmlMarkers[i].getElementsByTagName("data")[0].firstChild.nodeValue;
|
||||
var iconUrl = xmlMarkers[i].getElementsByTagName("icon")[0].firstChild.nodeValue;
|
||||
var icon = new OpenLayers.Icon('images/icons/' + iconUrl,
|
||||
new OpenLayers.Size(16, 16));
|
||||
var lonLat = new OpenLayers.LonLat(lon, lat).transform(
|
||||
new OpenLayers.Projection("EPSG:4326"), map
|
||||
.getProjectionObject());
|
||||
|
||||
var feature = new OpenLayers.Feature(markerLayer, lonLat);
|
||||
feature.data.popupContentHTML = '<pre>' + data + '</pre>';
|
||||
var marker = new OpenLayers.Marker(lonLat, icon);
|
||||
|
||||
marker.events.register("mousedown", feature, markerClick);
|
||||
markerLayer.addMarker(marker);
|
||||
}
|
||||
}
|
71
server/trunk/include/javascript/ol.js
Normal file
|
@ -0,0 +1,71 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* OpenLayers
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/javascript/ol.js $
|
||||
* @package javascripts
|
||||
* @subpackage maps
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
function TOLMap() {
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
var map = new OpenLayers.Map('map', {
|
||||
controls : [ new OpenLayers.Control.Navigation(),
|
||||
new OpenLayers.Control.KeyboardDefaults(),
|
||||
new OpenLayers.Control.PanZoomBar(),
|
||||
new OpenLayers.Control.LayerSwitcher(),
|
||||
new OpenLayers. Control. ArgParser(),
|
||||
new OpenLayers.Control.ScaleLine() ],
|
||||
displayProjection :new OpenLayers.Projection("EPSG:4326"),
|
||||
eventListeners : {
|
||||
'moveend' :moveend,
|
||||
'movestart' :movestart
|
||||
}
|
||||
});
|
||||
|
||||
// create OSM layers
|
||||
var osmMapnikLayer = new OpenLayers.Layer.OSM.Mapnik(
|
||||
"OpenStreetMap (Mapnik)");
|
||||
var osmarenderLayer = new OpenLayers.Layer.OSM.Osmarender(
|
||||
"OpenStreetMap (Tiles@Home)");
|
||||
|
||||
// create marker layer
|
||||
var markerLayer = new OpenLayers.Layer.Markers("Markers");
|
||||
|
||||
map.addLayers( [ osmMapnikLayer, osmarenderLayer, markerLayer, ]);
|
||||
|
||||
/*
|
||||
* Event handlers
|
||||
*/
|
||||
function moveend() {
|
||||
// loadTimeout = window.setTimeout("getMarkers()", 1500);
|
||||
}
|
||||
|
||||
function movestart() {
|
||||
window.clearTimeout(loadTimeout);
|
||||
markerLayer.clearMarkers();
|
||||
}
|
||||
|
||||
/*
|
||||
* Member functions
|
||||
*/
|
||||
this.setCenter = function(lat, lon, zoom) {
|
||||
var lonLat = new OpenLayers.LonLat(lon, lat).transform(
|
||||
new OpenLayers.Projection("EPSG:4326"), map
|
||||
.getProjectionObject())
|
||||
map.setCenter(lonLat, zoom);
|
||||
}
|
||||
}
|
1952
server/trunk/include/javascript/openlayers/OpenLayers.js
Normal file
212
server/trunk/include/javascript/openlayers/OpenStreetmap.js
Normal file
|
@ -0,0 +1,212 @@
|
|||
/**
|
||||
* Namespace: Util.OSM
|
||||
*/
|
||||
OpenLayers.Util.OSM = {};
|
||||
|
||||
/**
|
||||
* Constant: MISSING_TILE_URL
|
||||
* {String} URL of image to display for missing tiles
|
||||
*/
|
||||
OpenLayers.Util.OSM.MISSING_TILE_URL = "http://openstreetmap.org/openlayers/img/404.png";
|
||||
|
||||
/**
|
||||
* Property: originalOnImageLoadError
|
||||
* {Function} Original onImageLoadError function.
|
||||
*/
|
||||
OpenLayers.Util.OSM.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
|
||||
|
||||
/**
|
||||
* Function: onImageLoadError
|
||||
*/
|
||||
OpenLayers.Util.onImageLoadError = function() {
|
||||
if (this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)) {
|
||||
this.src = OpenLayers.Util.OSM.MISSING_TILE_URL;
|
||||
} else if (this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)) {
|
||||
// do nothing - this layer is transparent
|
||||
} else {
|
||||
OpenLayers.Util.OSM.originalOnImageLoadError;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Layer/TMS.js
|
||||
*
|
||||
* Class: OpenLayers.Layer.OSM
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.TMS>
|
||||
*/
|
||||
OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.TMS, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* url - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize : function(name, url, options) {
|
||||
options = OpenLayers.Util.extend( {
|
||||
maxExtent :new OpenLayers.Bounds(-20037508.34, -20037508.34,
|
||||
20037508.34, 20037508.34),
|
||||
maxResolution :156543.0339,
|
||||
units :"m",
|
||||
projection :"EPSG:900913",
|
||||
transitionEffect :"resize"
|
||||
}, options);
|
||||
var newArguments = [ name, url, options ];
|
||||
OpenLayers.Layer.TMS.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: getUrl
|
||||
*
|
||||
* Parameters:
|
||||
* bounds - {<OpenLayers.Bounds>}
|
||||
*
|
||||
* Returns:
|
||||
* {String} A string with the layer's url and parameters and also the
|
||||
* passed-in bounds and appropriate tile size specified as
|
||||
* parameters
|
||||
*/
|
||||
getURL : function(bounds) {
|
||||
var res = this.map.getResolution();
|
||||
var x = Math.round((bounds.left - this.maxExtent.left)
|
||||
/ (res * this.tileSize.w));
|
||||
var y = Math.round((this.maxExtent.top - bounds.top)
|
||||
/ (res * this.tileSize.h));
|
||||
var z = this.map.getZoom();
|
||||
var limit = Math.pow(2, z);
|
||||
|
||||
if (y < 0 || y >= limit) {
|
||||
return OpenLayers.Util.OSM.MISSING_TILE_URL;
|
||||
} else {
|
||||
x = ((x % limit) + limit) % limit;
|
||||
|
||||
var url = this.url;
|
||||
var path = z + "/" + x + "/" + y + ".png";
|
||||
|
||||
if (url instanceof Array) {
|
||||
url = this.selectUrl(path, url);
|
||||
}
|
||||
|
||||
return url + path;
|
||||
}
|
||||
},
|
||||
|
||||
CLASS_NAME :"OpenLayers.Layer.OSM"
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.Mapnik
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.Mapnik
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize : function(name, options) {
|
||||
var url = [ "http://a.tile.openstreetmap.org/",
|
||||
"http://b.tile.openstreetmap.org/",
|
||||
"http://c.tile.openstreetmap.org/" ];
|
||||
options = OpenLayers.Util.extend( {
|
||||
numZoomLevels :19
|
||||
}, options);
|
||||
var newArguments = [ name, url, options ];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME :"OpenLayers.Layer.OSM.Mapnik"
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.Osmarender
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.Osmarender
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize : function(name, options) {
|
||||
var url = [ "http://a.tah.openstreetmap.org/Tiles/tile/",
|
||||
"http://b.tah.openstreetmap.org/Tiles/tile/",
|
||||
"http://c.tah.openstreetmap.org/Tiles/tile/" ];
|
||||
options = OpenLayers.Util.extend( {
|
||||
numZoomLevels :18
|
||||
}, options);
|
||||
var newArguments = [ name, url, options ];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME :"OpenLayers.Layer.OSM.Osmarender"
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.CycleMap
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.CycleMap
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize : function(name, options) {
|
||||
var url = [ "http://a.andy.sandbox.cloudmade.com/tiles/cycle/",
|
||||
"http://b.andy.sandbox.cloudmade.com/tiles/cycle/",
|
||||
"http://c.andy.sandbox.cloudmade.com/tiles/cycle/" ];
|
||||
options = OpenLayers.Util.extend( {
|
||||
numZoomLevels :19
|
||||
}, options);
|
||||
var newArguments = [ name, url, options ];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME :"OpenLayers.Layer.OSM.CycleMap"
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.Maplint
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.Maplint = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.Maplint
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize : function(name, options) {
|
||||
var url = [ "http://d.tah.openstreetmap.org/Tiles/maplint/",
|
||||
"http://e.tah.openstreetmap.org/Tiles/maplint/",
|
||||
"http://f.tah.openstreetmap.org/Tiles/maplint/" ];
|
||||
options = OpenLayers.Util.extend( {
|
||||
numZoomLevels :18,
|
||||
isBaseLayer :false,
|
||||
visibility :false
|
||||
}, options);
|
||||
var newArguments = [ name, url, options ];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME :"OpenLayers.Layer.OSM.Maplint"
|
||||
});
|
25
server/trunk/include/lang/de/general.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* German general language file
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/lang/de/general.php $
|
||||
* @package language
|
||||
* @subpackage german
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
$lang = array('portal' => 'Portal',
|
||||
'test2' => 'goodtest2');
|
||||
|
||||
?>
|
22
server/trunk/include/lang/de/kml.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* German kml language file
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/lang/de/kml.php $
|
||||
* @package language
|
||||
* @subpackage german
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
?>
|
95
server/trunk/include/template/default/css/style.css
Normal file
|
@ -0,0 +1,95 @@
|
|||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* General Stylesheet
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/include/template/default/css/style.css $
|
||||
* @package stylesheets
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
@CHARSET "UTF-8";
|
||||
|
||||
body {
|
||||
border: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
height: 100%;
|
||||
|
||||
font-family: 'Lucida Grande', sans-serif;
|
||||
}
|
||||
|
||||
#map {
|
||||
width: 100%;
|
||||
top: 101px;
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
#top_tb {
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
|
||||
#login {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#login fieldset {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#logo {
|
||||
width: 271px;
|
||||
height: 80px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#bottom_tb {
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
z-index: 1004;
|
||||
}
|
||||
|
||||
#bottom_tb span {
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
padding: 3px 6px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
#credits {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#status {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
#bottom_tb_bg {
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
background-color: #ffffff;
|
||||
opacity: 0.6;
|
||||
z-index: 1003;
|
||||
}
|
68
server/trunk/index.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Start site
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/index.php $
|
||||
* @package core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
require_once 'include/init.php';
|
||||
|
||||
echo '<?xml version="1.0" encoding="utf-8 ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html" />
|
||||
<title>GeoPortal</title>
|
||||
<link rel="stylesheet" type="text/css" href="include/css/style.css" />
|
||||
<script type="text/javascript" src="include/javascript/jquery.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/openlayers/OpenLayers.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/openlayers/OpenStreetmap.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/ol.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/marker.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/geolocation.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top_tb">
|
||||
<img id="logo" src="images/logo.gif" alt="GeoPortal" />
|
||||
<div id="login">
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<table>
|
||||
<tr><td><label for="user">Username</label></td><td><input type="text" name="user" size="15" /></td><td><input type="checkbox" name="cookie" /><label for="cookie">Set Cookie</label></td></tr>
|
||||
<tr><td><label for="password">Password</label></td><td><input type="password" name="password" size="15" /></td><td><input type="button" name="login" value="login" /></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map">
|
||||
<div id="bottom_tb">
|
||||
<span id="credits">
|
||||
Map Data <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> 2008 <a href="http://openstreetmap.org">OpenStreetMap.org</a>,
|
||||
Map API <a href="http://openlayers.org">OpenLayers.org</a>,
|
||||
GeoPortal <a href="http://geoportal.griesm.de">GeoPortal.griesm.de</a>
|
||||
</span>
|
||||
<span id="status">
|
||||
Status (placeholder)
|
||||
</span>
|
||||
</div>
|
||||
<div id="bottom_tb_bg"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
?>
|
43
server/trunk/kmllink.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Dynamic KML File for Google Earth
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/kmllink.php $
|
||||
* @package core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
require_once 'include/init.php';
|
||||
|
||||
header('Content-Type: application/vnd.google-earth.kml+xml');
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://earth.google.com/kml/2.1">
|
||||
<NetworkLink>
|
||||
<open>1</open>
|
||||
<name>' . $c->general->title . '</name>
|
||||
<description>' . $c->general->description . '</description>
|
||||
<open>1</open>
|
||||
<visibility>1</visibility>
|
||||
<refreshVisibility>0</refreshVisibility>
|
||||
<Link>
|
||||
<href>http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . dirname($_SERVER['REQUEST_URI']) . '/driver/output/kml.php</href>
|
||||
<refreshInterval>2</refreshInterval>
|
||||
<viewRefreshMode>onStop</viewRefreshMode>
|
||||
<viewRefreshTime>1</viewRefreshTime>
|
||||
</Link>
|
||||
</NetworkLink>
|
||||
</kml>';
|
||||
|
||||
?>
|
528
server/trunk/misc/FavIcon.svg
Normal file
|
@ -0,0 +1,528 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="500"
|
||||
height="500"
|
||||
viewBox="0 0 62 62"
|
||||
id="svg0"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.46"
|
||||
sodipodi:docname="Ambox_globe.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
sodipodi:docbase="C:\Documents and Settings\KevinDuke\Desktop"
|
||||
inkscape:export-filename="/home/steffen/Desktop/Ambox_globe.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<metadata
|
||||
id="metadata19">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-height="968"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
guidetolerance="10.0"
|
||||
gridtolerance="10.0"
|
||||
objecttolerance="10.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:zoom="1.2016129"
|
||||
inkscape:cx="248.41611"
|
||||
inkscape:cy="197.12756"
|
||||
inkscape:window-x="33"
|
||||
inkscape:window-y="25"
|
||||
inkscape:current-layer="svg0"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
showgrid="false"
|
||||
inkscape:showpageshadow="false"
|
||||
showborder="true"
|
||||
borderlayer="true" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 310 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="620 : 310 : 1"
|
||||
inkscape:persp3d-origin="310 : 206.66667 : 1"
|
||||
id="perspective85" />
|
||||
<linearGradient
|
||||
spreadMethod="pad"
|
||||
xlink:href="#fieldGradient"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient21219"
|
||||
y2="16.248501"
|
||||
x2="9.5471001"
|
||||
y1="41.179295"
|
||||
x1="54.509937">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#3e79ca;stop-opacity:1;"
|
||||
id="stop21221" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#36a8ff;stop-opacity:1;"
|
||||
id="stop21223" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="radialGradient20242">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:0.31182796;"
|
||||
id="stop20244" />
|
||||
<stop
|
||||
offset="0.88"
|
||||
style="stop-color:#000000;stop-opacity:0.60573477;"
|
||||
id="stop20246" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
id="stop20248" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="linearGradient17267">
|
||||
<stop
|
||||
id="stop17269"
|
||||
offset="0"
|
||||
style="stop-color:#49c007;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop17271"
|
||||
offset="1"
|
||||
style="stop-color:#209305;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient17267"
|
||||
id="radialGradient17265"
|
||||
cx="27.293375"
|
||||
cy="22.184755"
|
||||
fx="27.293375"
|
||||
fy="22.184755"
|
||||
r="25.796875"
|
||||
gradientTransform="matrix(0.7383772,-1.1352882,0.7527133,0.4895553,-5.4921904,38.937284)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="55.454102"
|
||||
y1="42.752899"
|
||||
x2="9.5471001"
|
||||
y2="16.248501"
|
||||
id="linearGradient4174"
|
||||
xlink:href="#edgeGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="42.986301"
|
||||
y1="7.0127001"
|
||||
x2="22.0144"
|
||||
y2="51.987099"
|
||||
id="linearGradient4172"
|
||||
xlink:href="#fieldGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
cx="32.5"
|
||||
cy="29.5"
|
||||
r="26.5"
|
||||
fx="32.5"
|
||||
fy="29.5"
|
||||
id="radialGradient4170"
|
||||
xlink:href="#shadowGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
id="shadowGradient">
|
||||
<stop
|
||||
id="stop17"
|
||||
style="stop-color:#c0c0c0;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop19"
|
||||
style="stop-color:#c0c0c0;stop-opacity:1"
|
||||
offset="0.88" />
|
||||
<stop
|
||||
id="stop21"
|
||||
style="stop-color:#c0c0c0;stop-opacity:0"
|
||||
offset="1" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
x1="52.778114"
|
||||
y1="-13.238551"
|
||||
x2="22.0144"
|
||||
y2="51.987099"
|
||||
id="fieldGradient"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop7"
|
||||
style="stop-color:#d8ebff;stop-opacity:1;"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop9"
|
||||
style="stop-color:#4fa9ff;stop-opacity:1;"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="54.509937"
|
||||
y1="41.179295"
|
||||
x2="9.5471001"
|
||||
y2="16.248501"
|
||||
id="edgeGradient"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
xlink:href="#fieldGradient"
|
||||
spreadMethod="pad">
|
||||
<stop
|
||||
id="stop12"
|
||||
style="stop-color:#2b79e0;stop-opacity:1;"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop14"
|
||||
style="stop-color:#008df7;stop-opacity:1;"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<defs
|
||||
id="defs3242">
|
||||
<circle
|
||||
r="51.375"
|
||||
cy="61.875"
|
||||
cx="61.625"
|
||||
id="SVGID_5_"
|
||||
sodipodi:cx="61.625"
|
||||
sodipodi:cy="61.875"
|
||||
sodipodi:rx="51.375"
|
||||
sodipodi:ry="51.375" />
|
||||
</defs>
|
||||
<clipPath
|
||||
id="SVGID_6_">
|
||||
<use
|
||||
id="use3246"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_5_"
|
||||
style="overflow:visible"
|
||||
x="0"
|
||||
y="0"
|
||||
width="62"
|
||||
height="62" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)"
|
||||
y2="-652.24951"
|
||||
x2="61.6255"
|
||||
y1="-551.25"
|
||||
x1="61.6255"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="SVGID_7_">
|
||||
<stop
|
||||
id="stop3249"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop3251"
|
||||
style="stop-color:#E1F1FF"
|
||||
offset="0.1478" />
|
||||
<stop
|
||||
id="stop3253"
|
||||
style="stop-color:#D4EBFF"
|
||||
offset="0.2363" />
|
||||
<stop
|
||||
id="stop3255"
|
||||
style="stop-color:#E3F2FF"
|
||||
offset="0.3505" />
|
||||
<stop
|
||||
id="stop3257"
|
||||
style="stop-color:#F3F9FF"
|
||||
offset="0.5264" />
|
||||
<stop
|
||||
id="stop3259"
|
||||
style="stop-color:#FCFEFF"
|
||||
offset="0.7262" />
|
||||
<stop
|
||||
id="stop3261"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<defs
|
||||
id="defs3271">
|
||||
<circle
|
||||
r="51.375"
|
||||
cy="61.875"
|
||||
cx="61.625"
|
||||
id="SVGID_8_"
|
||||
sodipodi:cx="61.625"
|
||||
sodipodi:cy="61.875"
|
||||
sodipodi:rx="51.375"
|
||||
sodipodi:ry="51.375" />
|
||||
</defs>
|
||||
<clipPath
|
||||
id="SVGID_9_">
|
||||
<use
|
||||
id="use3275"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_8_"
|
||||
style="overflow:visible"
|
||||
x="0"
|
||||
y="0"
|
||||
width="62"
|
||||
height="62" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
gradientTransform="translate(0,-665)"
|
||||
y2="728.875"
|
||||
x2="107.833"
|
||||
y1="728.875"
|
||||
x1="10.25"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="SVGID_10_">
|
||||
<stop
|
||||
id="stop3278"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop3280"
|
||||
style="stop-color:#EDF7FF"
|
||||
offset="0.1435" />
|
||||
<stop
|
||||
id="stop3282"
|
||||
style="stop-color:#E0F2FF"
|
||||
offset="0.2802" />
|
||||
<stop
|
||||
id="stop3284"
|
||||
style="stop-color:#E3F3FF"
|
||||
offset="0.3063" />
|
||||
<stop
|
||||
id="stop3286"
|
||||
style="stop-color:#F3FAFF"
|
||||
offset="0.4942" />
|
||||
<stop
|
||||
id="stop3288"
|
||||
style="stop-color:#FCFEFF"
|
||||
offset="0.7076" />
|
||||
<stop
|
||||
id="stop3290"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="SVGID_3_"
|
||||
cx="61.833"
|
||||
cy="-600.16602"
|
||||
r="53.000999"
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0.95050001"
|
||||
style="stop-color:#3c6bf3;stop-opacity:1;"
|
||||
id="stop3227" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#3c8af2;stop-opacity:1;"
|
||||
id="stop3229" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#edgeGradient"
|
||||
id="linearGradient17291"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="55.454102"
|
||||
y1="42.752899"
|
||||
x2="9.5471001"
|
||||
y2="16.248501" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#SVGID_7_"
|
||||
id="linearGradient2440"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)"
|
||||
x1="61.6255"
|
||||
y1="-551.25"
|
||||
x2="61.6255"
|
||||
y2="-652.24951" />
|
||||
<linearGradient
|
||||
id="SVGID_13_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="62.4063"
|
||||
y1="-595"
|
||||
x2="62.4063"
|
||||
y2="-603.18707"
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#8BA4D6"
|
||||
id="stop3535" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#1B3EA6"
|
||||
id="stop3537" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="SVGID_11_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="-160.0361"
|
||||
y1="-726.61621"
|
||||
x2="-160.0361"
|
||||
y2="-729.13458"
|
||||
gradientTransform="matrix(0.4699332,4.7413678e-2,8.0740375e-2,-0.2759618,171.41242,-150.97698)">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#524AC9"
|
||||
id="stop3506" />
|
||||
<stop
|
||||
offset="0.0957"
|
||||
style="stop-color:#5855BC"
|
||||
id="stop3508" />
|
||||
<stop
|
||||
offset="0.2352"
|
||||
style="stop-color:#5D60AF"
|
||||
id="stop3510" />
|
||||
<stop
|
||||
offset="0.3681"
|
||||
style="stop-color:#5F64AB"
|
||||
id="stop3512" />
|
||||
<stop
|
||||
offset="0.7253"
|
||||
style="stop-color:#190C7F"
|
||||
id="stop3514" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="SVGID_12_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="-915.77289"
|
||||
y1="-785.93951"
|
||||
x2="-915.77289"
|
||||
y2="-789.15601"
|
||||
gradientTransform="matrix(0.1444826,-0.2594453,-0.2594453,-0.1444826,-26.436133,-312.62999)">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#524AC9"
|
||||
id="stop3519" />
|
||||
<stop
|
||||
offset="0.0957"
|
||||
style="stop-color:#5855BC"
|
||||
id="stop3521" />
|
||||
<stop
|
||||
offset="0.2352"
|
||||
style="stop-color:#5D60AF"
|
||||
id="stop3523" />
|
||||
<stop
|
||||
offset="0.3681"
|
||||
style="stop-color:#5F64AB"
|
||||
id="stop3525" />
|
||||
<stop
|
||||
offset="0.7253"
|
||||
style="stop-color:#190C7F"
|
||||
id="stop3527" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#radialGradient20242"
|
||||
id="radialGradient2273"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.8921213,-5.1635061e-3,4.7540367e-3,0.8298476,3.1699424,4.9060417)"
|
||||
cx="31.385874"
|
||||
cy="32.356133"
|
||||
fx="31.385874"
|
||||
fy="32.356133"
|
||||
r="26.5" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#fieldGradient"
|
||||
id="radialGradient2275"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.3743653,1.1613327,-0.9703876,0.3035298,39.412539,-3.7994531)"
|
||||
cx="16.352713"
|
||||
cy="26.318125"
|
||||
fx="16.352713"
|
||||
fy="26.318125"
|
||||
r="26.799999" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#edgeGradient"
|
||||
id="linearGradient2277"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="29.358065"
|
||||
y1="54.289597"
|
||||
x2="30.028635"
|
||||
y2="54.303539" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient17267"
|
||||
id="radialGradient2279"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.382526,-1.3439084,1.0992837,0.3207092,-11.729592,45.423975)"
|
||||
cx="24.112741"
|
||||
cy="21.770895"
|
||||
fx="24.112741"
|
||||
fy="21.770895"
|
||||
r="25.796875" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient21219"
|
||||
id="linearGradient2281"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="55.454102"
|
||||
y1="42.752899"
|
||||
x2="9.5471001"
|
||||
y2="16.248501" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient17267"
|
||||
id="radialGradient2237"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.4426165,-1.531649,1.2719689,0.3655114,-14.34745,51.474197)"
|
||||
cx="24.112741"
|
||||
cy="21.770895"
|
||||
fx="24.112741"
|
||||
fy="21.770895"
|
||||
r="25.796875" />
|
||||
</defs>
|
||||
<circle
|
||||
sodipodi:ry="25.799999"
|
||||
sodipodi:rx="25.799999"
|
||||
sodipodi:cy="31"
|
||||
sodipodi:cx="31"
|
||||
id="circle4165"
|
||||
style="fill:url(#radialGradient2275);fill-opacity:1;stroke:url(#linearGradient2277);stroke-width:2"
|
||||
r="25.799999"
|
||||
cy="31"
|
||||
cx="31"
|
||||
transform="matrix(1.1567643,0,0,1.1566683,-4.8566183,-4.8536618)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:0.29807691;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:5.17704582;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3228"
|
||||
sodipodi:cx="30.894024"
|
||||
sodipodi:cy="29.327902"
|
||||
sodipodi:rx="25.115286"
|
||||
sodipodi:ry="26.448841"
|
||||
d="M 56.00931,29.327902 A 25.115286,26.448841 0 1 1 5.778738,29.327902 A 25.115286,26.448841 0 1 1 56.00931,29.327902 z"
|
||||
transform="matrix(1.1378801,0,0,1.0818587,-4.3564169,-0.7478651)" />
|
||||
<path
|
||||
style="fill:url(#radialGradient2237);fill-opacity:1;stroke:#1a7a0b;stroke-width:0.52731603;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 11.157986,8.7022732 C 7.4113967,12.031963 4.6264046,16.230028 2.9519365,20.837274 C 3.8629084,19.648153 4.9767296,18.627767 6.0169272,17.988163 C 9.6155526,19.424239 14.113825,15.165973 15.156139,12.06075 C 17.317921,10.424723 13.47655,9.4109999 11.157986,8.7022732 z M 35.953725,7.8176615 C 32.984274,9.0899057 29.617403,12.03367 30.834709,13.396769 C 32.994173,11.938777 35.439433,12.469688 33.716776,15.346136 C 31.330521,19.087064 29.281915,13.949879 26.843778,15.463178 C 28.028733,16.494647 23.650469,18.028736 22.349965,18.099365 C 19.702492,17.670914 24.602917,20.028938 22.740438,20.842484 C 17.319544,21.732553 25.41251,24.698169 25.540679,20.309633 C 30.575249,17.533852 30.743053,26.334073 35.980604,25.112758 C 34.543735,23.006154 36.285214,20.521772 38.987696,20.203828 C 43.88719,21.560677 35.740845,23.945995 39.331447,24.579657 C 38.947463,26.573122 34.316186,27.138422 32.617015,28.915987 C 27.14429,28.767992 25.060067,20.808995 19.22488,24.474923 C 15.238548,25.329866 12.999481,30.867221 14.084199,34.586648 C 15.88668,39.785782 19.878512,40.208362 24.529336,40.410201 C 28.814306,42.630493 27.733909,50.554433 29.372803,55.087951 C 31.809023,57.351269 38.879363,62.751359 38.78091,55.928477 C 38.001473,51.245376 43.993305,42.210904 46.248655,38.131613 C 49.783922,32.287987 42.691117,38.745908 41.078648,35.983951 C 40.033768,29.860999 46.183099,35.289849 48.918841,33.445907 C 51.518491,35.044491 55.652341,32.169659 56.163599,36.670009 C 57.159599,42.209538 59.383218,34.790736 60.666953,34.147726 C 61.192753,29.228098 60.532346,24.117887 58.443501,19.250459 C 55.785712,13.057277 51.249009,8.226906 45.811145,5.1220747 C 44.6236,4.9628126 43.439448,5.0688823 42.939884,6.0393985 C 43.604044,9.3110428 40.298707,9.1765382 38.611539,7.2279201 C 37.888825,7.1625313 36.943541,7.393581 35.953725,7.8176615 z M 1.3554507,27.658274 C 0.82035515,32.334462 1.378561,37.192592 3.1988546,41.853282 C 2.8615685,38.150496 3.6462827,34.002995 6.3364408,31.657038 C 7.0776342,30.901626 5.9734455,28.336464 1.3982162,27.757925 C 1.3797162,27.726048 1.372825,27.690546 1.3554507,27.658274 z"
|
||||
id="circle14328" />
|
||||
<circle
|
||||
sodipodi:ry="25.799999"
|
||||
sodipodi:rx="25.799999"
|
||||
sodipodi:cy="31"
|
||||
sodipodi:cx="31"
|
||||
id="circle13325"
|
||||
style="fill:none;stroke:url(#linearGradient2281);stroke-width:2"
|
||||
r="25.799999"
|
||||
cy="31"
|
||||
cx="31"
|
||||
transform="matrix(1.1567643,0,0,1.1566683,-4.8566183,-4.8536618)" />
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
437
server/trunk/misc/Logo.svg
Normal file
After Width: | Height: | Size: 28 KiB |
90
server/trunk/misc/setup.sql
Normal file
|
@ -0,0 +1,90 @@
|
|||
-- phpMyAdmin SQL Dump
|
||||
-- version 2.11.8.1deb1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Erstellungszeit: 12. März 2009 um 21:05
|
||||
-- Server Version: 5.0.67
|
||||
-- PHP-Version: 5.2.6-2ubuntu4.1
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `categories`
|
||||
--
|
||||
|
||||
CREATE TABLE `categories` (
|
||||
`id` int(16) NOT NULL auto_increment,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`description` varchar(255) NOT NULL,
|
||||
`icon` varchar(255) NOT NULL,
|
||||
`schema` longtext NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `markers`
|
||||
--
|
||||
|
||||
CREATE TABLE `markers` (
|
||||
`id` int(16) NOT NULL auto_increment,
|
||||
`lat` double NOT NULL,
|
||||
`lng` double NOT NULL,
|
||||
`alt` double NOT NULL,
|
||||
`cat_id` int(16) NOT NULL,
|
||||
`data` longtext NOT NULL,
|
||||
`usr_id` int(16) NOT NULL,
|
||||
`last_updated` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`added` timestamp NOT NULL default '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `tracks`
|
||||
--
|
||||
|
||||
CREATE TABLE `tracks` (
|
||||
`id` int(16) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`description` varchar(255) NOT NULL,
|
||||
`markers` text NOT NULL,
|
||||
`user_id` int(16) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `users`
|
||||
--
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`id` int(16) NOT NULL auto_increment,
|
||||
`prename` varchar(255) NOT NULL,
|
||||
`lastname` varchar(255) NOT NULL,
|
||||
`nick` varchar(255) NOT NULL,
|
||||
`home_lat` double NOT NULL,
|
||||
`home_lng` double NOT NULL,
|
||||
`last_updated` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`last_login` timestamp NOT NULL default '0000-00-00 00:00:00',
|
||||
`login_count` int(16) NOT NULL,
|
||||
`joined` timestamp NOT NULL default '0000-00-00 00:00:00',
|
||||
`last_ip` varchar(15) NOT NULL,
|
||||
`birthday` timestamp NOT NULL default '0000-00-00 00:00:00',
|
||||
`cell` int(16) NOT NULL,
|
||||
`web` varchar(255) NOT NULL,
|
||||
`icq` int(9) NOT NULL,
|
||||
`mail` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `nick` (`nick`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
33
server/trunk/modules/core/authentification.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Authentification module
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/modules/core/authentification.php $
|
||||
* @package modules
|
||||
* @subpackage core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
require_once '../../include/init.php';
|
||||
|
||||
switch ($_GET['action']) {
|
||||
case 'login':
|
||||
|
||||
break;
|
||||
|
||||
case 'logout':
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
65
server/trunk/modules/core/categories.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Categories module
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/modules/core/categories.php $
|
||||
* @package modules
|
||||
* @subpackage core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
header("Content-type: application/xml");
|
||||
|
||||
require_once '../../include/init.php';
|
||||
|
||||
switch ($_GET['command']) {
|
||||
case 'edit':
|
||||
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$db->execute('DELETE FROM ' . $c->db->table->categories . ' WHERE id = ' . (int) $_GET['id']);
|
||||
break;
|
||||
|
||||
case 'get':
|
||||
$sql = 'SELECT c.id,
|
||||
c.name,
|
||||
c.description,
|
||||
c.schema,
|
||||
c.icon
|
||||
FROM ' . $c->db->table->categories . ' AS c';
|
||||
$categories = $db->query($sql);
|
||||
|
||||
$xml = new DOMDocument($c->xml->version, $c->xml->encoding);
|
||||
$xmlCategories = $xml->createElement('categories');
|
||||
$xml->appendChild($xmlCategories);
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$xmlCategory = new TCategory($category['id'], $category['name'], $category['description'], $category['schema'], $category['icon']);
|
||||
$xmlCategories->appendChild($xmlCategory->getXML($xml));
|
||||
}
|
||||
|
||||
echo $xml->saveXML();
|
||||
break;
|
||||
|
||||
default:
|
||||
//TODO implement error handling
|
||||
echo 'error unhandled command!';
|
||||
break;
|
||||
}
|
||||
?>
|
74
server/trunk/modules/core/markers.php
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Markers module
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/modules/core/markers.php $
|
||||
* @package modules
|
||||
* @subpackage core
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
header("Content-type: application/xml");
|
||||
|
||||
require_once '../../include/init.php';
|
||||
|
||||
// create answer node
|
||||
$xml = new DOMDocument($c->xml->version, $c->xml->encoding);
|
||||
$xml->formatOutput = true;
|
||||
$xmlResult = $xml->createElement('result');
|
||||
$xml->appendChild($xmlResult);
|
||||
|
||||
try {
|
||||
|
||||
if ($_GET['action'] == 'add') {
|
||||
$xmlData = new DOMDocument();
|
||||
$xmlData->loadXML($_POST['data']);
|
||||
$marker = TMarker::create(new TLatLon($_GET['lat'], $_GET['lon']), $_GET['alt'], $xmlData, new TUser($_GET['user']), new TCategory($_GET['cat']), $db);
|
||||
}
|
||||
else {
|
||||
$filter = TFilter::getFromString(rawurldecode($_GET['filter']));
|
||||
$markers = TMarker::getFromFilter($filter, $db);
|
||||
|
||||
if ($_GET['action'] == 'get') {
|
||||
$xmlMarkers = $xml->createElement('markers');
|
||||
$xmlMarkers->setAttribute('count', count($markers));
|
||||
$xmlResult->appendChild($xmlMarkers);
|
||||
}
|
||||
|
||||
foreach ($markers as $marker) {
|
||||
switch ($_GET['action']) {
|
||||
case 'edit':
|
||||
$xmlData = new DOMDocument();
|
||||
$xmlData->loadXML($_POST['data']);
|
||||
|
||||
$marker->update(new TLatLon((float) $_GET['lat'], (float) $_GET['lon'], (float) $_GET['alt']), $xmlData, new TUser($_GET['user']), new TCategory($_GET['cat'], $db));
|
||||
break;
|
||||
|
||||
case 'get':
|
||||
$xmlMarkers->appendChild($marker->toXml($xml));
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$marker->delete($db);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (EBase $e) {
|
||||
$xmlResult->appendChild($e->toXml($xml, true));
|
||||
}
|
||||
|
||||
echo $xml->saveXML();
|
||||
?>
|
97
server/trunk/modules/import/geocaches.php
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* gc.com database import
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/modules/import/geocaches.php $
|
||||
* @package modules
|
||||
* @subpackage import
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
require_once '../../include/init.php';
|
||||
|
||||
ini_set("MEMORY_LIMIT", "128M");
|
||||
|
||||
$state = (isset($_GET['state'])) ? $_GET['state'] : 'Germany';
|
||||
$url = (isset($_GET['url'])) ? $_GET['url'] : 'http://geocaching.bplaced.net/gc';
|
||||
|
||||
file_put_contents(sys_get_temp_dir() . '/' . $state . '.db.zip', file_get_contents($url . '/' . $state . '.db.zip'));
|
||||
|
||||
$zipFile = new ZipArchive;
|
||||
$zipFile->open(sys_get_temp_dir() . '/' . $state . '.db.zip');
|
||||
$gcDb = $zipFile->getStream($state . '.db');
|
||||
if ($gcDb) {
|
||||
$db->execute('DELETE FROM ' . $c->db->table->markers . ' WHERE cat_id <= 11');
|
||||
|
||||
$caches = 0;
|
||||
|
||||
$originalSql = 'INSERT INTO ' . $c->db->table->markers . ' (lat, lng, cat_id, data, usr_id, added) VALUES ';
|
||||
$sql = $originalSql;
|
||||
|
||||
while (($row = fgetcsv($gcDb, 1000, ' ', '"')) !== false) {
|
||||
$caches++;
|
||||
|
||||
switch ($row[7]) {
|
||||
case 'Unknown Cache':
|
||||
$cat_id = 1;
|
||||
break;
|
||||
case 'Multi-cache':
|
||||
$cat_id = 2;
|
||||
break;
|
||||
case 'Traditional Cache':
|
||||
$cat_id = 3;
|
||||
break;
|
||||
case 'Event Cache':
|
||||
$cat_id = 4;
|
||||
break;
|
||||
case 'Webcam Cache':
|
||||
$cat_id = 6;
|
||||
break;
|
||||
case 'Letterbox Hybrid':
|
||||
$cat_id = 7;
|
||||
break;
|
||||
case 'Virtual Cache':
|
||||
$cat_id = 9;
|
||||
break;
|
||||
case 'Cache In Trash Out Event':
|
||||
$cat_id = 10;
|
||||
break;
|
||||
case 'Earthcache':
|
||||
$cat_id = 11;
|
||||
break;
|
||||
case 'Wherigo Cache':
|
||||
$cat_id = 1;
|
||||
break;
|
||||
default:
|
||||
echo 'FOUND NEW CACHE TYPE: ' . $row[7];
|
||||
$cat_id = 1;
|
||||
}
|
||||
|
||||
$sql .= '(' . (float) $row[5] . ', ' . (float) $row['6'] . ', ' . (int) $cat_id . ', \'<data><id>' . $row[9] . '</id><name>' . $row[1] . '</name><size>' . $row[8] . '</size><guid>' . $row[10] . '</guid></data>\', 1, \'' . (int) $row[2] . '-' . (int) $row[3] . '-' . (int) $row[4] . '\'), ';
|
||||
|
||||
if ($caches % 1000 == 0) {
|
||||
$sql = substr($sql, 0, -2);
|
||||
$db->execute($sql);
|
||||
$sql = $originalSql;
|
||||
echo '.';
|
||||
flush();
|
||||
}
|
||||
}
|
||||
echo '<br />' . $caches . ' Caches hinzugefuegt!';
|
||||
}
|
||||
else {
|
||||
die('Fehler!');
|
||||
}
|
||||
|
||||
?>
|
54
server/trunk/modules/import/random.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* random import
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/modules/import/random.php $
|
||||
* @package modules
|
||||
* @subpackage import
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
*/
|
||||
|
||||
require_once '../../include/init.php';
|
||||
|
||||
$count = (isset($_GET['count'])) ? (int) $_GET['count'] : 50000;
|
||||
|
||||
$max = mt_getrandmax();
|
||||
|
||||
/*
|
||||
* @brief returns a random number between -1 and 1
|
||||
*/
|
||||
function random() {
|
||||
global $max;
|
||||
return -1 + 2*(mt_rand() / $max);
|
||||
}
|
||||
|
||||
$originalSql = 'INSERT INTO ' . $c->db->table->markers . ' (lat, lng, data, cat_id, added) VALUES ';
|
||||
$sql = $originalSql;
|
||||
|
||||
$markers = 0;
|
||||
|
||||
while ($markers < $count) {
|
||||
$markers++;
|
||||
$sql .= '(' . sprintf('%f', random() * 90) . ', ' . sprintf('%f', random() * 180) . ', \'<data><name>Test Marker</name></data>\', 24, NOW()), ';
|
||||
if ($markers % 1000 == 0 || $markers == $count) {
|
||||
$sql = substr($sql, 0, -2);
|
||||
$db->execute($sql);
|
||||
$sql = $originalSql;
|
||||
echo '.';
|
||||
flush();
|
||||
}
|
||||
}
|
||||
echo 'Added ' . $markers . ' markers by random!';
|
||||
|
||||
?>
|
46
server/trunk/modules/kml.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Google KML generator
|
||||
*
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/modules/kml.php $
|
||||
* @package modules
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 1
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
*/
|
||||
|
||||
require_once '../../include/init.php';
|
||||
|
||||
header('Content-Type: application/vnd.google-earth.kml+xml');
|
||||
|
||||
$bbox = explode(',', $_GET['BBOX']);
|
||||
$sql = 'SELECT id,
|
||||
lat,
|
||||
lng,
|
||||
prefs,
|
||||
type
|
||||
FROM ' . $c->db->table->markers . '
|
||||
WHERE lat <= ' . (float) $bbox[3] . '
|
||||
AND lat >= ' . (float) $bbox[1] . '
|
||||
AND lng >= ' . (float) $bbox[0] . '
|
||||
AND lng <= ' . (float) $bbox[2];
|
||||
$result = $db->query($sql , $c->api->markers->max_per_request);
|
||||
|
||||
$kml = new TKml;
|
||||
|
||||
foreach ($result as $row) {
|
||||
$kml->addMarker($row['id'], $row['lat'], $row['lng'], $row['type'], $row['data']);
|
||||
}
|
||||
|
||||
echo $kml->getXml();
|
||||
|
||||
?>
|
36
server/trunk/tools/release.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
|
||||
|
||||
##
|
||||
# GeoPortal Server
|
||||
#
|
||||
# release script
|
||||
#
|
||||
# @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/tools/release.sh $
|
||||
# @package tools
|
||||
# @author Steffen Vogel (info@steffenvogel.de)
|
||||
# @modifedby $LastChangedBy: steffen $
|
||||
# @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
# @license http://www.gnu.org/licenses/gpl.html
|
||||
# @link http://www.geoportal.griesm.de
|
||||
# @since 1
|
||||
# @version $Revision: 42 $
|
||||
# @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
##
|
||||
|
||||
# variables
|
||||
VERSION=0.1
|
||||
|
||||
# extract from svn
|
||||
cd /tmp
|
||||
mkdir geoportal-server-$VERSION
|
||||
svn export --force http://svn.griesm.de/geo/server/trunk/ geoportal-server-$VERSION
|
||||
|
||||
# minimize javascripts
|
||||
|
||||
# replace placeholders
|
||||
|
||||
# create docs
|
||||
|
||||
# create archive
|
||||
tar -c --no-same-owner --no-same-permissions -z -f geoportal-server-$VERSION.tar.gz geoportal-server-$VERSION
|
34
server/trunk/tools/tests/filter.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Test script for spatial calculations
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package tests
|
||||
* @subpackage filter
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 33
|
||||
* @version $Revision: 42 $
|
||||
* @lastmodifed $Date: 2009-04-25 10:23:48 +0200 (Sa, 25 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/tools/tests/spatial.php $
|
||||
*/
|
||||
|
||||
require_once '../../include/init.php';
|
||||
|
||||
if (isset($_GET['filter'])) {
|
||||
$filter = TFilter::getFromString(rawurldecode($_GET['filter']));
|
||||
}
|
||||
else {
|
||||
$filter = new TFilter(new TRuleMarker(new TMarker(375923, $db)));
|
||||
}
|
||||
echo $filter;
|
||||
|
||||
?>
|
44
server/trunk/tools/tests/spatial.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* GeoPortal Server
|
||||
*
|
||||
* Test script for spatial calculations
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* @package tests
|
||||
* @subpackage spatial
|
||||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @modifedby $LastChangedBy: steffen $
|
||||
* @copyright Copyright (c) 2009 Steffen Vogel (info@steffenvogel.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.geoportal.griesm.de
|
||||
* @since 33
|
||||
* @version $Revision: 44 $
|
||||
* @lastmodifed $Date: 2009-04-26 21:07:58 +0200 (So, 26 Apr 2009) $
|
||||
* @filesource $HeadURL: http://svn.griesm.de/geo/server/trunk/tools/tests/spatial.php $
|
||||
*/
|
||||
|
||||
include '../../include/init.php';
|
||||
|
||||
echo '<html><head><title>Spatial Test</title></head><body>';
|
||||
|
||||
echo '<p>Your home coordinates are: ' . $c->map->home->lat . ', ' . $c->map->home->lon . '</p>';
|
||||
|
||||
echo '<form action="spatial.php" method="post">
|
||||
<p>Calculate course and distance to this point: <input type="text" name="lat" value="' . $_POST['lat'] . '" /><input type="text" name="lon" value="' . $_POST['lon'] . '" /> <input type="submit" value="caclulate"/></p>';
|
||||
|
||||
if ($_POST) {
|
||||
$home = new TLatLon($c->map->home->lat, $c->map->home->lon);
|
||||
$destination = new TLatLon((float) $_POST['lat'], (float) $_POST['lon']);
|
||||
|
||||
echo '<h5>Results</h5>
|
||||
<p>Course: ' . $home->course($destination) . '° (' . $home->courseLetters($destination) . ')</p>
|
||||
<p>Distance: ' . $home->distance($destination) . 'km </p>';
|
||||
}
|
||||
|
||||
echo '</body></html>';
|
||||
|
||||
?>
|
528
site/images/FavIcon.svg
Normal file
|
@ -0,0 +1,528 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="500"
|
||||
height="500"
|
||||
viewBox="0 0 62 62"
|
||||
id="svg0"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.46"
|
||||
sodipodi:docname="Ambox_globe.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
sodipodi:docbase="C:\Documents and Settings\KevinDuke\Desktop"
|
||||
inkscape:export-filename="/home/steffen/Desktop/Ambox_globe.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<metadata
|
||||
id="metadata19">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-height="968"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
guidetolerance="10.0"
|
||||
gridtolerance="10.0"
|
||||
objecttolerance="10.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:zoom="1.2016129"
|
||||
inkscape:cx="248.41611"
|
||||
inkscape:cy="197.12756"
|
||||
inkscape:window-x="33"
|
||||
inkscape:window-y="25"
|
||||
inkscape:current-layer="svg0"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
showgrid="false"
|
||||
inkscape:showpageshadow="false"
|
||||
showborder="true"
|
||||
borderlayer="true" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 310 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="620 : 310 : 1"
|
||||
inkscape:persp3d-origin="310 : 206.66667 : 1"
|
||||
id="perspective85" />
|
||||
<linearGradient
|
||||
spreadMethod="pad"
|
||||
xlink:href="#fieldGradient"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient21219"
|
||||
y2="16.248501"
|
||||
x2="9.5471001"
|
||||
y1="41.179295"
|
||||
x1="54.509937">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#3e79ca;stop-opacity:1;"
|
||||
id="stop21221" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#36a8ff;stop-opacity:1;"
|
||||
id="stop21223" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="radialGradient20242">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:0.31182796;"
|
||||
id="stop20244" />
|
||||
<stop
|
||||
offset="0.88"
|
||||
style="stop-color:#000000;stop-opacity:0.60573477;"
|
||||
id="stop20246" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
id="stop20248" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="linearGradient17267">
|
||||
<stop
|
||||
id="stop17269"
|
||||
offset="0"
|
||||
style="stop-color:#49c007;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop17271"
|
||||
offset="1"
|
||||
style="stop-color:#209305;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient17267"
|
||||
id="radialGradient17265"
|
||||
cx="27.293375"
|
||||
cy="22.184755"
|
||||
fx="27.293375"
|
||||
fy="22.184755"
|
||||
r="25.796875"
|
||||
gradientTransform="matrix(0.7383772,-1.1352882,0.7527133,0.4895553,-5.4921904,38.937284)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="55.454102"
|
||||
y1="42.752899"
|
||||
x2="9.5471001"
|
||||
y2="16.248501"
|
||||
id="linearGradient4174"
|
||||
xlink:href="#edgeGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="42.986301"
|
||||
y1="7.0127001"
|
||||
x2="22.0144"
|
||||
y2="51.987099"
|
||||
id="linearGradient4172"
|
||||
xlink:href="#fieldGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
cx="32.5"
|
||||
cy="29.5"
|
||||
r="26.5"
|
||||
fx="32.5"
|
||||
fy="29.5"
|
||||
id="radialGradient4170"
|
||||
xlink:href="#shadowGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
id="shadowGradient">
|
||||
<stop
|
||||
id="stop17"
|
||||
style="stop-color:#c0c0c0;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop19"
|
||||
style="stop-color:#c0c0c0;stop-opacity:1"
|
||||
offset="0.88" />
|
||||
<stop
|
||||
id="stop21"
|
||||
style="stop-color:#c0c0c0;stop-opacity:0"
|
||||
offset="1" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
x1="52.778114"
|
||||
y1="-13.238551"
|
||||
x2="22.0144"
|
||||
y2="51.987099"
|
||||
id="fieldGradient"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop7"
|
||||
style="stop-color:#d8ebff;stop-opacity:1;"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop9"
|
||||
style="stop-color:#4fa9ff;stop-opacity:1;"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="54.509937"
|
||||
y1="41.179295"
|
||||
x2="9.5471001"
|
||||
y2="16.248501"
|
||||
id="edgeGradient"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
xlink:href="#fieldGradient"
|
||||
spreadMethod="pad">
|
||||
<stop
|
||||
id="stop12"
|
||||
style="stop-color:#2b79e0;stop-opacity:1;"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop14"
|
||||
style="stop-color:#008df7;stop-opacity:1;"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<defs
|
||||
id="defs3242">
|
||||
<circle
|
||||
r="51.375"
|
||||
cy="61.875"
|
||||
cx="61.625"
|
||||
id="SVGID_5_"
|
||||
sodipodi:cx="61.625"
|
||||
sodipodi:cy="61.875"
|
||||
sodipodi:rx="51.375"
|
||||
sodipodi:ry="51.375" />
|
||||
</defs>
|
||||
<clipPath
|
||||
id="SVGID_6_">
|
||||
<use
|
||||
id="use3246"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_5_"
|
||||
style="overflow:visible"
|
||||
x="0"
|
||||
y="0"
|
||||
width="62"
|
||||
height="62" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)"
|
||||
y2="-652.24951"
|
||||
x2="61.6255"
|
||||
y1="-551.25"
|
||||
x1="61.6255"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="SVGID_7_">
|
||||
<stop
|
||||
id="stop3249"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop3251"
|
||||
style="stop-color:#E1F1FF"
|
||||
offset="0.1478" />
|
||||
<stop
|
||||
id="stop3253"
|
||||
style="stop-color:#D4EBFF"
|
||||
offset="0.2363" />
|
||||
<stop
|
||||
id="stop3255"
|
||||
style="stop-color:#E3F2FF"
|
||||
offset="0.3505" />
|
||||
<stop
|
||||
id="stop3257"
|
||||
style="stop-color:#F3F9FF"
|
||||
offset="0.5264" />
|
||||
<stop
|
||||
id="stop3259"
|
||||
style="stop-color:#FCFEFF"
|
||||
offset="0.7262" />
|
||||
<stop
|
||||
id="stop3261"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<defs
|
||||
id="defs3271">
|
||||
<circle
|
||||
r="51.375"
|
||||
cy="61.875"
|
||||
cx="61.625"
|
||||
id="SVGID_8_"
|
||||
sodipodi:cx="61.625"
|
||||
sodipodi:cy="61.875"
|
||||
sodipodi:rx="51.375"
|
||||
sodipodi:ry="51.375" />
|
||||
</defs>
|
||||
<clipPath
|
||||
id="SVGID_9_">
|
||||
<use
|
||||
id="use3275"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_8_"
|
||||
style="overflow:visible"
|
||||
x="0"
|
||||
y="0"
|
||||
width="62"
|
||||
height="62" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
gradientTransform="translate(0,-665)"
|
||||
y2="728.875"
|
||||
x2="107.833"
|
||||
y1="728.875"
|
||||
x1="10.25"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="SVGID_10_">
|
||||
<stop
|
||||
id="stop3278"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop3280"
|
||||
style="stop-color:#EDF7FF"
|
||||
offset="0.1435" />
|
||||
<stop
|
||||
id="stop3282"
|
||||
style="stop-color:#E0F2FF"
|
||||
offset="0.2802" />
|
||||
<stop
|
||||
id="stop3284"
|
||||
style="stop-color:#E3F3FF"
|
||||
offset="0.3063" />
|
||||
<stop
|
||||
id="stop3286"
|
||||
style="stop-color:#F3FAFF"
|
||||
offset="0.4942" />
|
||||
<stop
|
||||
id="stop3288"
|
||||
style="stop-color:#FCFEFF"
|
||||
offset="0.7076" />
|
||||
<stop
|
||||
id="stop3290"
|
||||
style="stop-color:#FFFFFF"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="SVGID_3_"
|
||||
cx="61.833"
|
||||
cy="-600.16602"
|
||||
r="53.000999"
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0.95050001"
|
||||
style="stop-color:#3c6bf3;stop-opacity:1;"
|
||||
id="stop3227" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#3c8af2;stop-opacity:1;"
|
||||
id="stop3229" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#edgeGradient"
|
||||
id="linearGradient17291"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="55.454102"
|
||||
y1="42.752899"
|
||||
x2="9.5471001"
|
||||
y2="16.248501" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#SVGID_7_"
|
||||
id="linearGradient2440"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)"
|
||||
x1="61.6255"
|
||||
y1="-551.25"
|
||||
x2="61.6255"
|
||||
y2="-652.24951" />
|
||||
<linearGradient
|
||||
id="SVGID_13_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="62.4063"
|
||||
y1="-595"
|
||||
x2="62.4063"
|
||||
y2="-603.18707"
|
||||
gradientTransform="matrix(1,0,0,-1,0,-538)">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#8BA4D6"
|
||||
id="stop3535" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#1B3EA6"
|
||||
id="stop3537" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="SVGID_11_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="-160.0361"
|
||||
y1="-726.61621"
|
||||
x2="-160.0361"
|
||||
y2="-729.13458"
|
||||
gradientTransform="matrix(0.4699332,4.7413678e-2,8.0740375e-2,-0.2759618,171.41242,-150.97698)">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#524AC9"
|
||||
id="stop3506" />
|
||||
<stop
|
||||
offset="0.0957"
|
||||
style="stop-color:#5855BC"
|
||||
id="stop3508" />
|
||||
<stop
|
||||
offset="0.2352"
|
||||
style="stop-color:#5D60AF"
|
||||
id="stop3510" />
|
||||
<stop
|
||||
offset="0.3681"
|
||||
style="stop-color:#5F64AB"
|
||||
id="stop3512" />
|
||||
<stop
|
||||
offset="0.7253"
|
||||
style="stop-color:#190C7F"
|
||||
id="stop3514" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="SVGID_12_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="-915.77289"
|
||||
y1="-785.93951"
|
||||
x2="-915.77289"
|
||||
y2="-789.15601"
|
||||
gradientTransform="matrix(0.1444826,-0.2594453,-0.2594453,-0.1444826,-26.436133,-312.62999)">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#524AC9"
|
||||
id="stop3519" />
|
||||
<stop
|
||||
offset="0.0957"
|
||||
style="stop-color:#5855BC"
|
||||
id="stop3521" />
|
||||
<stop
|
||||
offset="0.2352"
|
||||
style="stop-color:#5D60AF"
|
||||
id="stop3523" />
|
||||
<stop
|
||||
offset="0.3681"
|
||||
style="stop-color:#5F64AB"
|
||||
id="stop3525" />
|
||||
<stop
|
||||
offset="0.7253"
|
||||
style="stop-color:#190C7F"
|
||||
id="stop3527" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#radialGradient20242"
|
||||
id="radialGradient2273"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.8921213,-5.1635061e-3,4.7540367e-3,0.8298476,3.1699424,4.9060417)"
|
||||
cx="31.385874"
|
||||
cy="32.356133"
|
||||
fx="31.385874"
|
||||
fy="32.356133"
|
||||
r="26.5" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#fieldGradient"
|
||||
id="radialGradient2275"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.3743653,1.1613327,-0.9703876,0.3035298,39.412539,-3.7994531)"
|
||||
cx="16.352713"
|
||||
cy="26.318125"
|
||||
fx="16.352713"
|
||||
fy="26.318125"
|
||||
r="26.799999" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#edgeGradient"
|
||||
id="linearGradient2277"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="29.358065"
|
||||
y1="54.289597"
|
||||
x2="30.028635"
|
||||
y2="54.303539" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient17267"
|
||||
id="radialGradient2279"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.382526,-1.3439084,1.0992837,0.3207092,-11.729592,45.423975)"
|
||||
cx="24.112741"
|
||||
cy="21.770895"
|
||||
fx="24.112741"
|
||||
fy="21.770895"
|
||||
r="25.796875" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient21219"
|
||||
id="linearGradient2281"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="55.454102"
|
||||
y1="42.752899"
|
||||
x2="9.5471001"
|
||||
y2="16.248501" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient17267"
|
||||
id="radialGradient2237"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.4426165,-1.531649,1.2719689,0.3655114,-14.34745,51.474197)"
|
||||
cx="24.112741"
|
||||
cy="21.770895"
|
||||
fx="24.112741"
|
||||
fy="21.770895"
|
||||
r="25.796875" />
|
||||
</defs>
|
||||
<circle
|
||||
sodipodi:ry="25.799999"
|
||||
sodipodi:rx="25.799999"
|
||||
sodipodi:cy="31"
|
||||
sodipodi:cx="31"
|
||||
id="circle4165"
|
||||
style="fill:url(#radialGradient2275);fill-opacity:1;stroke:url(#linearGradient2277);stroke-width:2"
|
||||
r="25.799999"
|
||||
cy="31"
|
||||
cx="31"
|
||||
transform="matrix(1.1567643,0,0,1.1566683,-4.8566183,-4.8536618)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:0.29807691;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:5.17704582;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3228"
|
||||
sodipodi:cx="30.894024"
|
||||
sodipodi:cy="29.327902"
|
||||
sodipodi:rx="25.115286"
|
||||
sodipodi:ry="26.448841"
|
||||
d="M 56.00931,29.327902 A 25.115286,26.448841 0 1 1 5.778738,29.327902 A 25.115286,26.448841 0 1 1 56.00931,29.327902 z"
|
||||
transform="matrix(1.1378801,0,0,1.0818587,-4.3564169,-0.7478651)" />
|
||||
<path
|
||||
style="fill:url(#radialGradient2237);fill-opacity:1;stroke:#1a7a0b;stroke-width:0.52731603;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 11.157986,8.7022732 C 7.4113967,12.031963 4.6264046,16.230028 2.9519365,20.837274 C 3.8629084,19.648153 4.9767296,18.627767 6.0169272,17.988163 C 9.6155526,19.424239 14.113825,15.165973 15.156139,12.06075 C 17.317921,10.424723 13.47655,9.4109999 11.157986,8.7022732 z M 35.953725,7.8176615 C 32.984274,9.0899057 29.617403,12.03367 30.834709,13.396769 C 32.994173,11.938777 35.439433,12.469688 33.716776,15.346136 C 31.330521,19.087064 29.281915,13.949879 26.843778,15.463178 C 28.028733,16.494647 23.650469,18.028736 22.349965,18.099365 C 19.702492,17.670914 24.602917,20.028938 22.740438,20.842484 C 17.319544,21.732553 25.41251,24.698169 25.540679,20.309633 C 30.575249,17.533852 30.743053,26.334073 35.980604,25.112758 C 34.543735,23.006154 36.285214,20.521772 38.987696,20.203828 C 43.88719,21.560677 35.740845,23.945995 39.331447,24.579657 C 38.947463,26.573122 34.316186,27.138422 32.617015,28.915987 C 27.14429,28.767992 25.060067,20.808995 19.22488,24.474923 C 15.238548,25.329866 12.999481,30.867221 14.084199,34.586648 C 15.88668,39.785782 19.878512,40.208362 24.529336,40.410201 C 28.814306,42.630493 27.733909,50.554433 29.372803,55.087951 C 31.809023,57.351269 38.879363,62.751359 38.78091,55.928477 C 38.001473,51.245376 43.993305,42.210904 46.248655,38.131613 C 49.783922,32.287987 42.691117,38.745908 41.078648,35.983951 C 40.033768,29.860999 46.183099,35.289849 48.918841,33.445907 C 51.518491,35.044491 55.652341,32.169659 56.163599,36.670009 C 57.159599,42.209538 59.383218,34.790736 60.666953,34.147726 C 61.192753,29.228098 60.532346,24.117887 58.443501,19.250459 C 55.785712,13.057277 51.249009,8.226906 45.811145,5.1220747 C 44.6236,4.9628126 43.439448,5.0688823 42.939884,6.0393985 C 43.604044,9.3110428 40.298707,9.1765382 38.611539,7.2279201 C 37.888825,7.1625313 36.943541,7.393581 35.953725,7.8176615 z M 1.3554507,27.658274 C 0.82035515,32.334462 1.378561,37.192592 3.1988546,41.853282 C 2.8615685,38.150496 3.6462827,34.002995 6.3364408,31.657038 C 7.0776342,30.901626 5.9734455,28.336464 1.3982162,27.757925 C 1.3797162,27.726048 1.372825,27.690546 1.3554507,27.658274 z"
|
||||
id="circle14328" />
|
||||
<circle
|
||||
sodipodi:ry="25.799999"
|
||||
sodipodi:rx="25.799999"
|
||||
sodipodi:cy="31"
|
||||
sodipodi:cx="31"
|
||||
id="circle13325"
|
||||
style="fill:none;stroke:url(#linearGradient2281);stroke-width:2"
|
||||
r="25.799999"
|
||||
cy="31"
|
||||
cx="31"
|
||||
transform="matrix(1.1567643,0,0,1.1566683,-4.8566183,-4.8536618)" />
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
2449
site/images/GeoPortal.svg
Normal file
After Width: | Height: | Size: 124 KiB |
437
site/images/Logo.svg
Normal file
After Width: | Height: | Size: 28 KiB |
19
site/provsite/index.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Geoportal</title>
|
||||
<link rel="shortcut icon" href="http://trac.griesm.de/geo/chrome/site/icon.ico" type="image/x-icon" />
|
||||
<link rel="icon" href="http://trac.griesm.de/geo/chrome/site/icon.ico" type="image/x-icon" />
|
||||
</head>
|
||||
<body style="background-color: #E6E6E6; font-family: sans-serif;" >
|
||||
<div style="-moz-border-radius: 10px; position: absolute; top: 50%; left: 50%; background-color: #ffffff; text-align: center; margin-top: -170px; height: 340px; margin-left: -350px; width: 700px; border: 1px solid #8F8F8F;" >
|
||||
<h1 style="font-size: 1.8em">Die Seite befindet sich noch im Aufbau</h1>
|
||||
<img style="margin: 20px;" src="http://trac.griesm.de/geo/chrome/site/logo.gif" alt="GeoPortal Logo" />
|
||||
<p>Geplant ist ein <a href="http://www.geoportal.griesm.de">GeoPortal</a> für die Stadt Griesheim und Umgebung.</p>
|
||||
<p>Das Portalsystem wird als OpenSource-Projekt entwickelt. Wir suchen noch Entwickler.</p>
|
||||
<p>Mehr Informationen zu dem aktuellen Entwicklungsstatus gibt es unter<br /><a href="http://www.trac.griesm.de/geo">www.trac.griesm.de/geo</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
14
site/scripts/statsvn.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Script to update statsvn statistics
|
||||
#
|
||||
|
||||
HTDOCS=/home/steffen/htdocs/geoportal/
|
||||
REPO=/var/svn/repos/geo
|
||||
|
||||
cd $HTDOCS
|
||||
svn update ./svn
|
||||
svn log -v --xml file://$REPO > geo.log
|
||||
|
||||
statsvn -output-dir stats/ -trac http://www.trac.griesm.de/geo -title GeoPortal -exclude "**/*.svg" -exclude "**/openlayers/*" geo.log svn/
|