Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding IP-Atlas 1.0 to this distribution. I use it to provide maps

for IP addresses (in the logs).
  • Loading branch information...
commit 1864143c38808d792351175c460864e18a3972f7 1 parent 3335f6f
martin authored
340 lib/ipatlas/COPYING
... ... @@ -0,0 +1,340 @@
  1 + GNU GENERAL PUBLIC LICENSE
  2 + Version 2, June 1991
  3 +
  4 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  5 + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  6 + Everyone is permitted to copy and distribute verbatim copies
  7 + of this license document, but changing it is not allowed.
  8 +
  9 + Preamble
  10 +
  11 + The licenses for most software are designed to take away your
  12 +freedom to share and change it. By contrast, the GNU General Public
  13 +License is intended to guarantee your freedom to share and change free
  14 +software--to make sure the software is free for all its users. This
  15 +General Public License applies to most of the Free Software
  16 +Foundation's software and to any other program whose authors commit to
  17 +using it. (Some other Free Software Foundation software is covered by
  18 +the GNU Library General Public License instead.) You can apply it to
  19 +your programs, too.
  20 +
  21 + When we speak of free software, we are referring to freedom, not
  22 +price. Our General Public Licenses are designed to make sure that you
  23 +have the freedom to distribute copies of free software (and charge for
  24 +this service if you wish), that you receive source code or can get it
  25 +if you want it, that you can change the software or use pieces of it
  26 +in new free programs; and that you know you can do these things.
  27 +
  28 + To protect your rights, we need to make restrictions that forbid
  29 +anyone to deny you these rights or to ask you to surrender the rights.
  30 +These restrictions translate to certain responsibilities for you if you
  31 +distribute copies of the software, or if you modify it.
  32 +
  33 + For example, if you distribute copies of such a program, whether
  34 +gratis or for a fee, you must give the recipients all the rights that
  35 +you have. You must make sure that they, too, receive or can get the
  36 +source code. And you must show them these terms so they know their
  37 +rights.
  38 +
  39 + We protect your rights with two steps: (1) copyright the software, and
  40 +(2) offer you this license which gives you legal permission to copy,
  41 +distribute and/or modify the software.
  42 +
  43 + Also, for each author's protection and ours, we want to make certain
  44 +that everyone understands that there is no warranty for this free
  45 +software. If the software is modified by someone else and passed on, we
  46 +want its recipients to know that what they have is not the original, so
  47 +that any problems introduced by others will not reflect on the original
  48 +authors' reputations.
  49 +
  50 + Finally, any free program is threatened constantly by software
  51 +patents. We wish to avoid the danger that redistributors of a free
  52 +program will individually obtain patent licenses, in effect making the
  53 +program proprietary. To prevent this, we have made it clear that any
  54 +patent must be licensed for everyone's free use or not licensed at all.
  55 +
  56 + The precise terms and conditions for copying, distribution and
  57 +modification follow.
  58 +
  59 + GNU GENERAL PUBLIC LICENSE
  60 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  61 +
  62 + 0. This License applies to any program or other work which contains
  63 +a notice placed by the copyright holder saying it may be distributed
  64 +under the terms of this General Public License. The "Program", below,
  65 +refers to any such program or work, and a "work based on the Program"
  66 +means either the Program or any derivative work under copyright law:
  67 +that is to say, a work containing the Program or a portion of it,
  68 +either verbatim or with modifications and/or translated into another
  69 +language. (Hereinafter, translation is included without limitation in
  70 +the term "modification".) Each licensee is addressed as "you".
  71 +
  72 +Activities other than copying, distribution and modification are not
  73 +covered by this License; they are outside its scope. The act of
  74 +running the Program is not restricted, and the output from the Program
  75 +is covered only if its contents constitute a work based on the
  76 +Program (independent of having been made by running the Program).
  77 +Whether that is true depends on what the Program does.
  78 +
  79 + 1. You may copy and distribute verbatim copies of the Program's
  80 +source code as you receive it, in any medium, provided that you
  81 +conspicuously and appropriately publish on each copy an appropriate
  82 +copyright notice and disclaimer of warranty; keep intact all the
  83 +notices that refer to this License and to the absence of any warranty;
  84 +and give any other recipients of the Program a copy of this License
  85 +along with the Program.
  86 +
  87 +You may charge a fee for the physical act of transferring a copy, and
  88 +you may at your option offer warranty protection in exchange for a fee.
  89 +
  90 + 2. You may modify your copy or copies of the Program or any portion
  91 +of it, thus forming a work based on the Program, and copy and
  92 +distribute such modifications or work under the terms of Section 1
  93 +above, provided that you also meet all of these conditions:
  94 +
  95 + a) You must cause the modified files to carry prominent notices
  96 + stating that you changed the files and the date of any change.
  97 +
  98 + b) You must cause any work that you distribute or publish, that in
  99 + whole or in part contains or is derived from the Program or any
  100 + part thereof, to be licensed as a whole at no charge to all third
  101 + parties under the terms of this License.
  102 +
  103 + c) If the modified program normally reads commands interactively
  104 + when run, you must cause it, when started running for such
  105 + interactive use in the most ordinary way, to print or display an
  106 + announcement including an appropriate copyright notice and a
  107 + notice that there is no warranty (or else, saying that you provide
  108 + a warranty) and that users may redistribute the program under
  109 + these conditions, and telling the user how to view a copy of this
  110 + License. (Exception: if the Program itself is interactive but
  111 + does not normally print such an announcement, your work based on
  112 + the Program is not required to print an announcement.)
  113 +
  114 +These requirements apply to the modified work as a whole. If
  115 +identifiable sections of that work are not derived from the Program,
  116 +and can be reasonably considered independent and separate works in
  117 +themselves, then this License, and its terms, do not apply to those
  118 +sections when you distribute them as separate works. But when you
  119 +distribute the same sections as part of a whole which is a work based
  120 +on the Program, the distribution of the whole must be on the terms of
  121 +this License, whose permissions for other licensees extend to the
  122 +entire whole, and thus to each and every part regardless of who wrote it.
  123 +
  124 +Thus, it is not the intent of this section to claim rights or contest
  125 +your rights to work written entirely by you; rather, the intent is to
  126 +exercise the right to control the distribution of derivative or
  127 +collective works based on the Program.
  128 +
  129 +In addition, mere aggregation of another work not based on the Program
  130 +with the Program (or with a work based on the Program) on a volume of
  131 +a storage or distribution medium does not bring the other work under
  132 +the scope of this License.
  133 +
  134 + 3. You may copy and distribute the Program (or a work based on it,
  135 +under Section 2) in object code or executable form under the terms of
  136 +Sections 1 and 2 above provided that you also do one of the following:
  137 +
  138 + a) Accompany it with the complete corresponding machine-readable
  139 + source code, which must be distributed under the terms of Sections
  140 + 1 and 2 above on a medium customarily used for software interchange; or,
  141 +
  142 + b) Accompany it with a written offer, valid for at least three
  143 + years, to give any third party, for a charge no more than your
  144 + cost of physically performing source distribution, a complete
  145 + machine-readable copy of the corresponding source code, to be
  146 + distributed under the terms of Sections 1 and 2 above on a medium
  147 + customarily used for software interchange; or,
  148 +
  149 + c) Accompany it with the information you received as to the offer
  150 + to distribute corresponding source code. (This alternative is
  151 + allowed only for noncommercial distribution and only if you
  152 + received the program in object code or executable form with such
  153 + an offer, in accord with Subsection b above.)
  154 +
  155 +The source code for a work means the preferred form of the work for
  156 +making modifications to it. For an executable work, complete source
  157 +code means all the source code for all modules it contains, plus any
  158 +associated interface definition files, plus the scripts used to
  159 +control compilation and installation of the executable. However, as a
  160 +special exception, the source code distributed need not include
  161 +anything that is normally distributed (in either source or binary
  162 +form) with the major components (compiler, kernel, and so on) of the
  163 +operating system on which the executable runs, unless that component
  164 +itself accompanies the executable.
  165 +
  166 +If distribution of executable or object code is made by offering
  167 +access to copy from a designated place, then offering equivalent
  168 +access to copy the source code from the same place counts as
  169 +distribution of the source code, even though third parties are not
  170 +compelled to copy the source along with the object code.
  171 +
  172 + 4. You may not copy, modify, sublicense, or distribute the Program
  173 +except as expressly provided under this License. Any attempt
  174 +otherwise to copy, modify, sublicense or distribute the Program is
  175 +void, and will automatically terminate your rights under this License.
  176 +However, parties who have received copies, or rights, from you under
  177 +this License will not have their licenses terminated so long as such
  178 +parties remain in full compliance.
  179 +
  180 + 5. You are not required to accept this License, since you have not
  181 +signed it. However, nothing else grants you permission to modify or
  182 +distribute the Program or its derivative works. These actions are
  183 +prohibited by law if you do not accept this License. Therefore, by
  184 +modifying or distributing the Program (or any work based on the
  185 +Program), you indicate your acceptance of this License to do so, and
  186 +all its terms and conditions for copying, distributing or modifying
  187 +the Program or works based on it.
  188 +
  189 + 6. Each time you redistribute the Program (or any work based on the
  190 +Program), the recipient automatically receives a license from the
  191 +original licensor to copy, distribute or modify the Program subject to
  192 +these terms and conditions. You may not impose any further
  193 +restrictions on the recipients' exercise of the rights granted herein.
  194 +You are not responsible for enforcing compliance by third parties to
  195 +this License.
  196 +
  197 + 7. If, as a consequence of a court judgment or allegation of patent
  198 +infringement or for any other reason (not limited to patent issues),
  199 +conditions are imposed on you (whether by court order, agreement or
  200 +otherwise) that contradict the conditions of this License, they do not
  201 +excuse you from the conditions of this License. If you cannot
  202 +distribute so as to satisfy simultaneously your obligations under this
  203 +License and any other pertinent obligations, then as a consequence you
  204 +may not distribute the Program at all. For example, if a patent
  205 +license would not permit royalty-free redistribution of the Program by
  206 +all those who receive copies directly or indirectly through you, then
  207 +the only way you could satisfy both it and this License would be to
  208 +refrain entirely from distribution of the Program.
  209 +
  210 +If any portion of this section is held invalid or unenforceable under
  211 +any particular circumstance, the balance of the section is intended to
  212 +apply and the section as a whole is intended to apply in other
  213 +circumstances.
  214 +
  215 +It is not the purpose of this section to induce you to infringe any
  216 +patents or other property right claims or to contest validity of any
  217 +such claims; this section has the sole purpose of protecting the
  218 +integrity of the free software distribution system, which is
  219 +implemented by public license practices. Many people have made
  220 +generous contributions to the wide range of software distributed
  221 +through that system in reliance on consistent application of that
  222 +system; it is up to the author/donor to decide if he or she is willing
  223 +to distribute software through any other system and a licensee cannot
  224 +impose that choice.
  225 +
  226 +This section is intended to make thoroughly clear what is believed to
  227 +be a consequence of the rest of this License.
  228 +
  229 + 8. If the distribution and/or use of the Program is restricted in
  230 +certain countries either by patents or by copyrighted interfaces, the
  231 +original copyright holder who places the Program under this License
  232 +may add an explicit geographical distribution limitation excluding
  233 +those countries, so that distribution is permitted only in or among
  234 +countries not thus excluded. In such case, this License incorporates
  235 +the limitation as if written in the body of this License.
  236 +
  237 + 9. The Free Software Foundation may publish revised and/or new versions
  238 +of the General Public License from time to time. Such new versions will
  239 +be similar in spirit to the present version, but may differ in detail to
  240 +address new problems or concerns.
  241 +
  242 +Each version is given a distinguishing version number. If the Program
  243 +specifies a version number of this License which applies to it and "any
  244 +later version", you have the option of following the terms and conditions
  245 +either of that version or of any later version published by the Free
  246 +Software Foundation. If the Program does not specify a version number of
  247 +this License, you may choose any version ever published by the Free Software
  248 +Foundation.
  249 +
  250 + 10. If you wish to incorporate parts of the Program into other free
  251 +programs whose distribution conditions are different, write to the author
  252 +to ask for permission. For software which is copyrighted by the Free
  253 +Software Foundation, write to the Free Software Foundation; we sometimes
  254 +make exceptions for this. Our decision will be guided by the two goals
  255 +of preserving the free status of all derivatives of our free software and
  256 +of promoting the sharing and reuse of software generally.
  257 +
  258 + NO WARRANTY
  259 +
  260 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  261 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
  262 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  263 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  264 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  265 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
  266 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
  267 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  268 +REPAIR OR CORRECTION.
  269 +
  270 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  271 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  272 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  273 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  274 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  275 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  276 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  277 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  278 +POSSIBILITY OF SUCH DAMAGES.
  279 +
  280 + END OF TERMS AND CONDITIONS
  281 +
  282 + How to Apply These Terms to Your New Programs
  283 +
  284 + If you develop a new program, and you want it to be of the greatest
  285 +possible use to the public, the best way to achieve this is to make it
  286 +free software which everyone can redistribute and change under these terms.
  287 +
  288 + To do so, attach the following notices to the program. It is safest
  289 +to attach them to the start of each source file to most effectively
  290 +convey the exclusion of warranty; and each file should have at least
  291 +the "copyright" line and a pointer to where the full notice is found.
  292 +
  293 + <one line to give the program's name and a brief idea of what it does.>
  294 + Copyright (C) <year> <name of author>
  295 +
  296 + This program is free software; you can redistribute it and/or modify
  297 + it under the terms of the GNU General Public License as published by
  298 + the Free Software Foundation; either version 2 of the License, or
  299 + (at your option) any later version.
  300 +
  301 + This program is distributed in the hope that it will be useful,
  302 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  303 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  304 + GNU General Public License for more details.
  305 +
  306 + You should have received a copy of the GNU General Public License
  307 + along with this program; if not, write to the Free Software
  308 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  309 +
  310 +
  311 +Also add information on how to contact you by electronic and paper mail.
  312 +
  313 +If the program is interactive, make it output a short notice like this
  314 +when it starts in an interactive mode:
  315 +
  316 + Gnomovision version 69, Copyright (C) year name of author
  317 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  318 + This is free software, and you are welcome to redistribute it
  319 + under certain conditions; type `show c' for details.
  320 +
  321 +The hypothetical commands `show w' and `show c' should show the appropriate
  322 +parts of the General Public License. Of course, the commands you use may
  323 +be called something other than `show w' and `show c'; they could even be
  324 +mouse-clicks or menu items--whatever suits your program.
  325 +
  326 +You should also get your employer (if you work as a programmer) or your
  327 +school, if any, to sign a "copyright disclaimer" for the program, if
  328 +necessary. Here is a sample; alter the names:
  329 +
  330 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  331 + `Gnomovision' (which makes passes at compilers) written by James Hacker.
  332 +
  333 + <signature of Ty Coon>, 1 April 1989
  334 + Ty Coon, President of Vice
  335 +
  336 +This General Public License does not permit incorporating your program into
  337 +proprietary programs. If your program is a subroutine library, you may
  338 +consider it more useful to permit linking proprietary applications with the
  339 +library. If this is what you want to do, use the GNU Library General
  340 +Public License instead of this License.
60 lib/ipatlas/README
... ... @@ -0,0 +1,60 @@
  1 +IP-Atlas version 1.0
  2 +-=----=-
  3 +
  4 +Description
  5 +-----------
  6 +This script uses NetGeo to plot a host on the globe.
  7 +
  8 +Requirements
  9 +------------
  10 +PHP 4 and GD (Optional).
  11 +
  12 +The GD library is available at http://www.boutell.com/gd/ and PHP is at
  13 +http://www.php.net/
  14 +
  15 +Installation
  16 +------------
  17 +Put these files somewhere on your webserver, and point your browser to plot.php
  18 +
  19 +Note: You can symlink "ln -s plot.php index.php" if you need to. If you
  20 +have any problems running it, send an email to ivan@xpenguin.com
  21 +
  22 +Configuration
  23 +-------------
  24 +All options can be edited in plotconf.inc.
  25 +
  26 +If you want to integrate IP-Atlas into your website, open up plot.php and
  27 +ip-atlas_prefs.php and edit the parts where it starts writing the html
  28 +(find for "<html>") and where it ends (</html>). You should replace theses
  29 +with your site template headers/footers.
  30 +
  31 +You can create a new language file for IP-Atlas if you follow the directions
  32 +inside any language file in the languages/ directory.
  33 +
  34 +If you create a new language file, please email it to ivan@xpenguin.com so
  35 +it can be included in the next version.
  36 +
  37 +Bugs
  38 +----
  39 +1. The famous windows bug (also happens in other cirumstances)
  40 +
  41 +If nothing appears when running the script on windows, open up plotconf.inc
  42 +and change the $trygd variable to "0".
  43 +
  44 +Contributions
  45 +-------------
  46 +Thanks to Sten Kalenda (sten@ipjam.com) for adding security features and
  47 +cleaning up the code.
  48 +
  49 +Thanks to Armin Kunaschik (Armin.Kunaschik@varetis.de) for his proxy patch
  50 +that enables this program to run behind a firewall.
  51 +
  52 +Thanks to Daniel Quinlan (daniel@chaosengine.net) for a patch that fixes
  53 +many problems on windows.
  54 +
  55 +Also thanks to many users for reporting bugs.
  56 +
  57 +Copyright
  58 +---------
  59 +IP-Atlas is Copyright (c) 2002 Ivan Kozik, and can be redistributed under
  60 +the GPL.
243 lib/ipatlas/countries.txt
... ... @@ -0,0 +1,243 @@
  1 +AD Andorra
  2 +AE United Arab Emirates
  3 +AF Afghanistan
  4 +AG Antigua and Barbuda
  5 +AI Anguilla
  6 +AL Albania
  7 +AM Armenia
  8 +AN Netherlands Antilles
  9 +AO Angola
  10 +AQ Antarctica
  11 +AR Argentina
  12 +AS American Samoa
  13 +AT Austria
  14 +AU Australia
  15 +AW Aruba
  16 +AZ Azerbaijan
  17 +BA Bosnia and Herzegovina
  18 +BB Barbados
  19 +BD Bangladesh
  20 +BE Belgium
  21 +BF Burkina Faso
  22 +BG Bulgaria
  23 +BH Bahrain
  24 +BI Burundi
  25 +BJ Benin
  26 +BM Bermuda
  27 +BN Brunei Darussalam
  28 +BO Bolivia
  29 +BR Brazil
  30 +BS Bahamas
  31 +BT Bhutan
  32 +BV Bouvet Island
  33 +BW Botswana
  34 +BY Belarus
  35 +BZ Belize
  36 +CA Canada
  37 +CC Cocos (Keeling) Islands
  38 +CF Central African Republic
  39 +CG Congo
  40 +CH Switzerland
  41 +CI Cote D'Ivoire (Ivory Coast)
  42 +CK Cook Islands
  43 +CL Chile
  44 +CM Cameroon
  45 +CN China
  46 +CO Colombia
  47 +CR Costa Rica
  48 +CS Czechoslovakia (former)
  49 +CU Cuba
  50 +CV Cape Verde
  51 +CX Christmas Island
  52 +CY Cyprus
  53 +CZ Czech Republic
  54 +DE Germany
  55 +DJ Djibouti
  56 +DK Denmark
  57 +DM Dominica
  58 +DO Dominican Republic
  59 +DZ Algeria
  60 +EC Ecuador
  61 +EE Estonia
  62 +EG Egypt
  63 +EH Western Sahara
  64 +ER Eritrea
  65 +ES Spain
  66 +ET Ethiopia
  67 +FI Finland
  68 +FJ Fiji
  69 +FK Falkland Islands (Malvinas)
  70 +FM Micronesia
  71 +FO Faroe Islands
  72 +FR France
  73 +FX France, Metropolitan
  74 +GA Gabon
  75 +GB Great Britain (UK)
  76 +GD Grenada
  77 +GE Georgia
  78 +GF French Guiana
  79 +GH Ghana
  80 +GI Gibraltar
  81 +GL Greenland
  82 +GM Gambia
  83 +GN Guinea
  84 +GP Guadeloupe
  85 +GQ Equatorial Guinea
  86 +GR Greece
  87 +GS S. Georgia and S. Sandwich Isls.
  88 +GT Guatemala
  89 +GU Guam
  90 +GW Guinea-Bissau
  91 +GY Guyana
  92 +HK Hong Kong
  93 +HM Heard and McDonald Islands
  94 +HN Honduras
  95 +HR Croatia (Hrvatska)
  96 +HT Haiti
  97 +HU Hungary
  98 +ID Indonesia
  99 +IE Ireland
  100 +IL Israel
  101 +IN India
  102 +IO British Indian Ocean Territory
  103 +IQ Iraq
  104 +IR Iran
  105 +IS Iceland
  106 +IT Italy
  107 +JM Jamaica
  108 +JO Jordan
  109 +JP Japan
  110 +KE Kenya
  111 +KG Kyrgyzstan
  112 +KH Cambodia
  113 +KI Kiribati
  114 +KM Comoros
  115 +KN Saint Kitts and Nevis
  116 +KP Korea (North)
  117 +KR Korea (South)
  118 +KW Kuwait
  119 +KY Cayman Islands
  120 +KZ Kazakhstan
  121 +LA Laos
  122 +LB Lebanon
  123 +LC Saint Lucia
  124 +LI Liechtenstein
  125 +LK Sri Lanka
  126 +LR Liberia
  127 +LS Lesotho
  128 +LT Lithuania
  129 +LU Luxembourg
  130 +LV Latvia
  131 +LY Libya
  132 +MA Morocco
  133 +MC Monaco
  134 +MD Moldova
  135 +MG Madagascar
  136 +MH Marshall Islands
  137 +MK Macedonia
  138 +ML Mali
  139 +MM Myanmar
  140 +MN Mongolia
  141 +MO Macau
  142 +MP Northern Mariana Islands
  143 +MQ Martinique
  144 +MR Mauritania
  145 +MS Montserrat
  146 +MT Malta
  147 +MU Mauritius
  148 +MV Maldives
  149 +MW Malawi
  150 +MX Mexico
  151 +MY Malaysia
  152 +MZ Mozambique
  153 +NA Namibia
  154 +NC New Caledonia
  155 +NE Niger
  156 +NF Norfolk Island
  157 +NG Nigeria
  158 +NI Nicaragua
  159 +NL Netherlands
  160 +NO Norway
  161 +NP Nepal
  162 +NR Nauru
  163 +NT Neutral Zone
  164 +NU Niue
  165 +NZ New Zealand (Aotearoa)
  166 +OM Oman
  167 +PA Panama
  168 +PE Peru
  169 +PF French Polynesia
  170 +PG Papua New Guinea
  171 +PH Philippines
  172 +PK Pakistan
  173 +PL Poland
  174 +PM St. Pierre and Miquelon
  175 +PN Pitcairn
  176 +PR Puerto Rico
  177 +PT Portugal
  178 +PW Palau
  179 +PY Paraguay
  180 +QA Qatar
  181 +RE Reunion
  182 +RO Romania
  183 +RU Russian Federation
  184 +RW Rwanda
  185 +SA Saudi Arabia
  186 +Sb Solomon Islands
  187 +SC Seychelles
  188 +SD Sudan
  189 +SE Sweden
  190 +SG Singapore
  191 +SH St. Helena
  192 +SI Slovenia
  193 +SJ Svalbard and Jan Mayen Islands
  194 +SK Slovak Republic
  195 +SL Sierra Leone
  196 +SM San Marino
  197 +SN Senegal
  198 +SO Somalia
  199 +SR Suriname
  200 +ST Sao Tome and Principe
  201 +SU USSR (former)
  202 +SV El Salvador
  203 +SY Syria
  204 +SZ Swaziland
  205 +TC Turks and Caicos Islands
  206 +TD Chad
  207 +TF French Southern Territories
  208 +TG Togo
  209 +TH Thailand
  210 +TJ Tajikistan
  211 +TK Tokelau
  212 +TM Turkmenistan
  213 +TN Tunisia
  214 +TO Tonga
  215 +TP East Timor
  216 +TR Turkey
  217 +TT Trinidad and Tobago
  218 +TV Tuvalu
  219 +TW Taiwan
  220 +TZ Tanzania
  221 +UA Ukraine
  222 +UG Uganda
  223 +UK United Kingdom
  224 +UM US Minor Outlying Islands
  225 +US United States
  226 +UY Uruguay
  227 +UZ Uzbekistan
  228 +VA Vatican City State (Holy See)
  229 +VC Saint Vincent and the Grenadines
  230 +VE Venezuela
  231 +VG Virgin Islands (British)
  232 +VI Virgin Islands (U.S.)
  233 +VN Viet Nam
  234 +VU Vanuatu
  235 +WF Wallis and Futuna Islands
  236 +WS Samoa
  237 +YE Yemen
  238 +YT Mayotte
  239 +YU Yugoslavia
  240 +ZA South Africa
  241 +ZM Zambia
  242 +ZR Zaire
  243 +ZW Zimbabwe
BIN  lib/ipatlas/earth_620.jpg
4 lib/ipatlas/footer.inc
... ... @@ -0,0 +1,4 @@
BIN  lib/ipatlas/hr.gif
5 lib/ipatlas/ip-atlas.css
... ... @@ -0,0 +1,5 @@
  1 +A:link { font-weight: bold; text-decoration: none; color: #005177; }
  2 +A:visited { text-decoration: none; color: #005177; font-weight: bold; }
  3 +A:hover { text-decoration: underline; }
  4 +BODY { font-family: Verdana, Helvetica, Arial, sans-serif; font-size:12px; }
  5 +TD { font-family: Verdana, Helvetica, Arial, sans-serif; color: #000000; font-size: 12px; }
232 lib/ipatlas/ip-atlas_prefs.php
... ... @@ -0,0 +1,232 @@
  1 +<?
  2 +
  3 +include("plotconf.inc");
  4 +include("plot.inc");
  5 +
  6 +if($warnings == "1") {
  7 +error_reporting(E_ALL);
  8 +} else {
  9 +error_reporting(E_ERROR);
  10 +}
  11 +
  12 +?>
  13 +<?
  14 +
  15 + if(shouldrun($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
  16 + $drawmode = "GD";
  17 + } else {
  18 + $drawmode = "CSS";
  19 + }
  20 +
  21 +if(isset($HTTP_POST_VARS["button"])) {
  22 +// save data from the POST
  23 +setcookie ("atlasprefs", "", time() - 36000000);
  24 +setcookie ("atlasprefs", "$HTTP_POST_VARS[shape]:$HTTP_POST_VARS[color]:$HTTP_POST_VARS[size]:$HTTP_POST_VARS[earthimage]:$HTTP_POST_VARS[cssdot]:$HTTP_POST_VARS[seldrawmode]", time() + 36000000, $cookiepath);
  25 +
  26 +$setshape = $HTTP_POST_VARS["shape"];
  27 +$setcolor = $HTTP_POST_VARS["color"];
  28 +$setsize = $HTTP_POST_VARS["size"];
  29 +$setearthimage = $HTTP_POST_VARS["earthimage"];
  30 +$setcssdot = $HTTP_POST_VARS["cssdot"];
  31 +$setseldrawmode = $HTTP_POST_VARS["seldrawmode"];
  32 +
  33 + if($setseldrawmode == "1") {
  34 + $drawmode = "GD";
  35 + } else {
  36 + $drawmode = "CSS";
  37 + }
  38 +
  39 +} elseif(isset($HTTP_COOKIE_VARS["atlasprefs"]) && validcookie($HTTP_COOKIE_VARS["atlasprefs"])) {
  40 +// get data from the cookie
  41 +@list($setshape, $setcolor, $setsize, $setearthimage, $setcssdot, $setseldrawmode) = split(":", $HTTP_COOKIE_VARS["atlasprefs"]);
  42 +} else {
  43 +$setshape = "Diamond";
  44 +$setsize = "3";
  45 +$setcolor = "red";
  46 +$setearthimage = $earthimages[$defaultimage];
  47 +$setcssdot = "reddot.gif";
  48 +
  49 +if(shouldrun($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
  50 + $setseldrawmode = 1;
  51 +} else {
  52 + $setseldrawmode = 0;
  53 +}
  54 +
  55 +// override old cookie if there is post data
  56 +
  57 + if(isset($HTTP_POST_VARS["seldrawmode"])) {
  58 + $setsetdrawmode = $HTTP_POST_VARS["seldrawmode"];
  59 + }
  60 +
  61 +}
  62 +
  63 +?>
  64 +
  65 +<? # START HTML
  66 + ?>
  67 +
  68 +<html><head><title><? echo t("IP-Atlas Preferences") ?></title>
  69 +
  70 +<!-- your head tags here -->
  71 +<link rel="Stylesheet" href="ip-atlas.css">
  72 +</head><body bgcolor="#ffffff">
  73 +
  74 +</head><body>
  75 +
  76 +<b><? echo t("IP-Atlas preferences"); ?></b> <? echo t("(cookie based)"); ?><br><br>
  77 +
  78 +<?
  79 +if(isset($HTTP_POST_VARS["button"])) {
  80 +print t("Your settings have been saved. You can now try"); ?> <a href="plot.php<? if(isset($HTTP_GET_VARS["lastquery"])) { echo "?address=$HTTP_GET_VARS[lastquery]"; } ?>"><? print t("plotting something.")."</a>"."<br><br>";
  81 +}
  82 +
  83 +
  84 +?>
  85 +
  86 +<form action="<? echo $HTTP_SERVER_VARS['PHP_SELF']; ?><? if(isset($HTTP_GET_VARS["lastquery"])) { echo "?lastquery=$HTTP_GET_VARS[lastquery]"; } ?>" method="POST">
  87 +
  88 +<? if(istheregd()) {
  89 +echo t("Draw mode (defaults guessed for your browser):");
  90 +
  91 +print "<br><select name=\"seldrawmode\">";
  92 +
  93 +if(!isset($setseldrawmode)) {
  94 + if(shouldrun($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
  95 + $setseldrawmode = 1;
  96 + } else {
  97 + $setseldrawmode = 0;
  98 + }
  99 +}
  100 +
  101 +if($setseldrawmode == "1") {
  102 + echo "<option value=\"1\" selected>GD";
  103 + echo "<option value=\"0\">CSS";
  104 +} elseif($setseldrawmode == "0") {
  105 + echo "<option value=\"1\">GD";
  106 + echo "<option value=\"0\" selected>CSS";
  107 +}
  108 +
  109 +print "</select><br><br>";
  110 +
  111 +} else {
  112 +
  113 + print "<input type=\"hidden\" name=\"seldrawmode\" value=\"0\">";
  114 +
  115 +}
  116 +
  117 +?>
  118 +
  119 +<? echo t("Pointer Preferences (the dot that marks lat/lon):"); ?><br>
  120 +<?
  121 +if($drawmode == "GD") {
  122 +print '
  123 +<input type="hidden" name="cssdot" value="reddot.gif">
  124 +
  125 +<table><tr>
  126 +
  127 +<td>'.t("Shape:").'</td><td><select name="shape">
  128 +';
  129 +
  130 +$shapes = array("Diamond", "Diamond Outline", "Square", "Square Outline", "Cross");
  131 +foreach($shapes as $curshape) {
  132 +
  133 +if($setshape == $curshape) {
  134 +print "<option value=\"$curshape\" selected>".t($curshape);
  135 +} else {
  136 +print "<option value=\"$curshape\">".t($curshape);
  137 +}
  138 +
  139 +}
  140 +
  141 +print "</select></td></tr><tr><td>".t("Size:")."</td><td><select name=\"size\">";
  142 +
  143 +$sizes = array("2", "3", "4", "5", "6", "7", "8");
  144 +foreach($sizes as $cursize) {
  145 +
  146 +if($setsize == $cursize) {
  147 +print "<option value=\"$cursize\" selected>$cursize";
  148 +} else {
  149 +print "<option value=\"$cursize\">$cursize";
  150 +}
  151 +
  152 +}
  153 +
  154 +print "</select></td></tr><tr><td>".t("Color:")."</td><td><select name=\"color\">";
  155 +
  156 +$colors = array("red", "white", "yellow", "magenta", "cyan", "green", "violet");
  157 +foreach($colors as $curcolor) {
  158 +
  159 +if($setcolor == $curcolor) {
  160 +print "<option value=\"$curcolor\" selected>".t($curcolor);
  161 +} else {
  162 +print "<option value=\"$curcolor\">".t($curcolor);
  163 +}
  164 +
  165 +}
  166 +
  167 +print "
  168 +</select></td></tr></table>
  169 +";
  170 +
  171 +} elseif($drawmode == "CSS") {
  172 +
  173 +print t("Pointer:")." <select name=\"cssdot\">";
  174 +
  175 +foreach($cssdots as $curdot) {
  176 +
  177 +list($filename, $curdot, , ) = split(":", $curdot);
  178 +
  179 +if($setcssdot == $filename) {
  180 +print "<option value=\"$filename\" selected>$curdot";
  181 +} else {
  182 +print "<option value=\"$filename\">$curdot";
  183 +}
  184 +
  185 +}
  186 +
  187 +print "</select><br>";
  188 +
  189 +print '
  190 +<input type="hidden" name="shape" value="Diamond">
  191 +<input type="hidden" name="color" value="Red">
  192 +<input type="hidden" name="size" value="3">
  193 +';
  194 +
  195 +}
  196 +
  197 +?>
  198 +
  199 +<br>
  200 +
  201 +
  202 +
  203 +<? echo t("Other Preferences:") ?><br>
  204 +<? echo t("Earth Image:") ?>&nbsp;
  205 +<select name="earthimage">
  206 +
  207 +<?
  208 +
  209 +foreach($earthimages as $curentry) {
  210 +
  211 +list($curfile, $curname, , ) = split(":", $curentry);
  212 +
  213 +if($setearthimage == $curfile) {
  214 +print "<option value=\"$curfile\" selected>$curname";
  215 +} else {
  216 +print "<option value=\"$curfile\">$curname";
  217 +}
  218 +
  219 +}
  220 +
  221 +
  222 +?>
  223 +
  224 +</select>
  225 +<br><br>
  226 +<input type="Submit" name="button" value="<? echo t("Save") ?>">
  227 +
  228 +<div align="right">
  229 +[ <a href="plot.php<? if(isset($HTTP_GET_VARS["lastquery"])) { echo "?address=$HTTP_GET_VARS[lastquery]"; } ?>"><? echo t("main") ?></a> ]<br><br>
  230 +</div>
  231 +<? include("footer.inc"); ?>
  232 +</body></html>
182 lib/ipatlas/languages/messages.blank.inc
... ... @@ -0,0 +1,182 @@
  1 +<?
  2 +
  3 +/*
  4 +
  5 +Blank Language File
  6 +
  7 +copy this language file from messages.blank.inc to
  8 +messages.<country code>.inc.
  9 +
  10 +please email new language files to ivan@xpenguin.com
  11 +copy a language file to messages.<cc>.inc and \
  12 +edit what $p is on encountering an english phrase.
  13 +
  14 +please notice the punctuation and capitilization.
  15 +
  16 +change the $language variable in plotconf.inc after
  17 +creating a language file.
  18 +
  19 +*/
  20 +
  21 +function lookup($phrase) {
  22 + switch($phrase) {
  23 +
  24 + # start translating the $p here
  25 +
  26 + case "Plotting" :
  27 + $p = ""; break;
  28 +
  29 + case "preferences" :
  30 + $p = ""; break;
  31 +
  32 + case "locate me" :
  33 + $p = ""; break;
  34 +
  35 + case "IP/Hostname:" :
  36 + $p = ""; break;
  37 +
  38 + case "You at" :
  39 + $p = ""; break;
  40 +
  41 + case "Submit" :
  42 + $p = ""; break;
  43 +
  44 + case "main" :
  45 + $p = ""; break;
  46 +
  47 +# Used in context "(host) is located in"
  48 + case "is" :
  49 + $p = ""; break;
  50 +
  51 +# Used in context "You at (host) are located in"
  52 + case "are" :
  53 + $p = ""; break;
  54 +
  55 + case "located in" :
  56 + $p = ""; break;
  57 +
  58 + case "cannot be located." :
  59 + $p = ""; break;
  60 +
  61 + case "cannot be resolved." :
  62 + $p = ""; break;
  63 +
  64 + case "is a host in the private IP address range." :
  65 + $p = ""; break;
  66 +
  67 + case "does not resolve." :
  68 + $p = ""; break;
  69 +
  70 + case "is not a valid IP address." :
  71 + $p = ""; break;
  72 +
  73 + case "Temporary lookup failure." :
  74 + $p = ""; break;
  75 +
  76 + case "IP-Atlas Preferences" :
  77 + $p = ""; break;
  78 +
  79 +# make the 'p' lowercase if possible in your language
  80 +
  81 + case "IP-Atlas preferences" :
  82 + $p = ""; break;
  83 +
  84 + case "(cookie based)" :
  85 + $p = ""; break;
  86 +
  87 + case "Draw mode (defaults guessed for your browser):" :
  88 + $p = ""; break;
  89 +
  90 + // next two phrases are combined
  91 + case "Your settings have been saved. You can now try" :
  92 + $p = ""; break;
  93 +
  94 + case "plotting something." :
  95 + $p = ""; break;
  96 +
  97 + case "Pointer Preferences (the dot that marks lat/lon):" :
  98 + $p = ""; break;
  99 +
  100 + case "Shape:" :
  101 + $p = ""; break;
  102 +
  103 + case "Size:" :
  104 + $p = ""; break;
  105 +
  106 + case "Color:" :
  107 + $p = ""; break;
  108 +
  109 + case "Pointer:" :
  110 + $p = ""; break;
  111 +
  112 + case "Other Preferences:" :
  113 + $p = ""; break;
  114 +
  115 + case "Earth Image:" :
  116 + $p = ""; break;
  117 +
  118 + case "Color" :
  119 + $p = ""; break;
  120 +
  121 + case "Grayscale" :
  122 + $p = ""; break;
  123 +
  124 + case "Save" :
  125 + $p = ""; break;
  126 +
  127 +# shape names:
  128 + case "Diamond" :
  129 + $p = ""; break;
  130 +
  131 + case "Diamond Outline" :
  132 + $p = ""; break;
  133 +
  134 + case "Square" :
  135 + $p = ""; break;
  136 +
  137 + case "Square Outline" :
  138 + $p = ""; break;
  139 +
  140 + case "Cross" :
  141 + $p = ""; break;
  142 +
  143 +# colors:
  144 +
  145 + case "red" :
  146 + $p = ""; break;
  147 +
  148 + case "white" :
  149 + $p = ""; break;
  150 +
  151 + case "yellow" :
  152 + $p = ""; break;
  153 +
  154 + case "magenta" :
  155 + $p = ""; break;
  156 +
  157 + case "cyan" :
  158 + $p = ""; break;
  159 +
  160 + case "green" :
  161 + $p = ""; break;
  162 +
  163 + case "violet" :
  164 + $p = ""; break;
  165 +
  166 + # stop here
  167 +
  168 + // return in english if the phrase couldn't be found
  169 + default:
  170 + $p = $phrase; break;
  171 +
  172 +
  173 + }
  174 +
  175 + // return english if match was blank
  176 + if($p == "") { $p = $phrase; }
  177 +
  178 + return $p;
  179 +
  180 +}
  181 +
  182 +?>
185 lib/ipatlas/languages/messages.it.inc
... ... @@ -0,0 +1,185 @@
  1 +<?
  2 +
  3 +/*
  4 +
  5 +Italian Language File
  6 +
  7 +I forgot who started translating this file, email me so i can put your
  8 +email here.
  9 +
  10 +please email new language files to ivan@xpenguin.com
  11 +copy a language file to messages.<cc>.inc and \
  12 +edit what $p is on encountering an english phrase.
  13 +
  14 +you can start off with messages.blank.inc
  15 +
  16 +please notice the punctuation and capitilization.
  17 +
  18 +change the $language variable in plotconf.inc after
  19 +creating a language file.
  20 +
  21 +*/
  22 +
  23 +function lookup($phrase) {
  24 + switch($phrase) {
  25 +
  26 + # start translating the $p here
  27 +
  28 + case "Plotting" :
  29 + $p = "Mappa di"; break;
  30 +
  31 + case "preferences" :
  32 + $p = "preferenze"; break;
  33 +
  34 + case "locate me" :
  35 + $p = "localizzami"; break;
  36 +
  37 + case "IP/Hostname:" :
  38 + $p = "IP/Nome host:"; break;
  39 +
  40 + case "You at" :
  41 + $p = "Tu"; break;
  42 +
  43 + case "Submit" :
  44 + $p = ""; break;
  45 +
  46 + case "main" :
  47 + $p = ""; break;
  48 +
  49 +# Used in context "(host) is located in"
  50 + case "is" :
  51 + $p = "�"; break;
  52 +
  53 +# Used in context "You at (host) are located in"
  54 + case "are" :
  55 + $p = "sei"; break;
  56 +
  57 + case "located in" :
  58 + $p = "stato localizzato in"; break;
  59 +
  60 + case "cannot be located." :
  61 + $p = "non pu� essere localizzato."; break;
  62 +
  63 + case "cannot be resolved." :
  64 + $p = "non pu� essere risolto."; break;
  65 +
  66 + case "is a host in the private IP address range." :
  67 + $p = "� un host in un range di IP privati."; break;
  68 +
  69 + case "does not resolve." :
  70 + $p = "irrisolvibile."; break;
  71 +
  72 + case "is not a valid IP address." :
  73 + $p = "non � un indirizzo IP valido."; break;
  74 +
  75 + case "Temporary lookup failure." :
  76 + $p = "Errore temporaneo di lookup."; break;
  77 +
  78 + case "IP-Atlas Preferences" :
  79 + $p = "Preferenze IP-Atlas"; break;
  80 +
  81 +# make the 'p' lowercase if possible in your language
  82 +
  83 + case "IP-Atlas preferences" :
  84 + $p = "Preferenze IP-Atlas"; break;
  85 +
  86 + case "(cookie based)" :
  87 + $p = "(basato su cookie)"; break;
  88 +
  89 + case "Draw mode (defaults guessed for your browser):" :
  90 + $p = ""; break;
  91 +
  92 + // next two phrases are combined
  93 + case "Your settings have been saved. You can now try" :
  94 + $p = "Le tue impostazioni sono state salvate "; break;
  95 +
  96 + case "plotting something." :
  97 + $p = "torna indietro."; break;
  98 +
  99 + case "Pointer Preferences (the dot that marks lat/lon):" :
  100 + $p = "Preferenze puntatore (il simbolo che indica la lat/lon):"; break;
  101 +
  102 + case "Shape:" :
  103 + $p = "Forma:"; break;
  104 +
  105 + case "Size:" :
  106 + $p = "Dimensione:"; break;
  107 +