]> git.mxchange.org Git - mailer.git/commitdiff
Introduced ext-geoip (unfinished)
authorRoland Häder <roland@mxchange.org>
Sun, 7 Aug 2011 17:40:41 +0000 (17:40 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 7 Aug 2011 17:40:41 +0000 (17:40 +0000)
.gitattributes
DOCS/geoip_LICENSE.txt [new file with mode: 0644]
inc/extensions/ext-geoip.php [new file with mode: 0644]
templates/de/html/ext/ext_geoip.tpl [new file with mode: 0644]

index d9eb29067cf792985da7d633479a9699124fa062..6f67363f55429663b1a917a042e2706758f2ab75 100644 (file)
@@ -61,6 +61,7 @@ DOCS/en/rewrite/.htaccess svneol=native#text/plain
 DOCS/en/rewrite/README.txt svneol=native#text/plain
 DOCS/en/task/README.txt svneol=native#text/plain
 DOCS/en/themes/README.txt svneol=native#text/plain
+DOCS/geoip_LICENSE.txt svneol=native#text/plain
 DOCS/tpl-validator.php svneol=native#text/plain
 /admin.php svneol=native#text/plain
 /agb.php svneol=native#text/plain
@@ -148,6 +149,7 @@ inc/extensions/ext-earning.php svneol=native#text/plain
 inc/extensions/ext-events.php svneol=native#text/plain
 inc/extensions/ext-forced.php svneol=native#text/plain
 inc/extensions/ext-funcoins.php svneol=native#text/plain
+inc/extensions/ext-geoip.php svneol=native#text/plain
 inc/extensions/ext-grade.php svneol=native#text/plain
 inc/extensions/ext-holiday.php svneol=native#text/plain
 inc/extensions/ext-html_mail.php svneol=native#text/plain
@@ -1528,6 +1530,7 @@ templates/de/html/ext/ext_earning.tpl svneol=native#text/plain
 templates/de/html/ext/ext_events.tpl svneol=native#text/plain
 templates/de/html/ext/ext_forced.tpl svneol=native#text/plain
 templates/de/html/ext/ext_funcoins.tpl svneol=native#text/plain
+templates/de/html/ext/ext_geoip.tpl svneol=native#text/plain
 templates/de/html/ext/ext_grade.tpl svneol=native#text/plain
 templates/de/html/ext/ext_holiday.tpl svneol=native#text/plain
 templates/de/html/ext/ext_html_mail.tpl svneol=native#text/plain
diff --git a/DOCS/geoip_LICENSE.txt b/DOCS/geoip_LICENSE.txt
new file mode 100644 (file)
index 0000000..01c2910
--- /dev/null
@@ -0,0 +1,39 @@
+There are two licenses, one for the C library software, and one for
+the database.
+
+SOFTWARE LICENSE (C library)
+
+The GeoIP C Library is licensed under the LGPL.  For details see
+the COPYING file.
+
+OPEN DATA LICENSE (GeoLite Country and GeoLite City databases)
+
+Copyright (c) 2008 MaxMind, Inc.  All Rights Reserved.
+
+All advertising materials and documentation mentioning features or use of
+this database must display the following acknowledgment:
+"This product includes GeoLite data created by MaxMind, available from
+http://maxmind.com/"
+
+Redistribution and use with or without modification, are permitted provided
+that the following conditions are met:
+1. Redistributions must retain the above copyright notice, this list of
+conditions and the following disclaimer in the documentation and/or other
+materials provided with the distribution. 
+2. All advertising materials and documentation mentioning features or use of
+this database must display the following acknowledgement:
+"This product includes GeoLite data created by MaxMind, available from
+http://maxmind.com/"
+3. "MaxMind" may not be used to endorse or promote products derived from this
+database without specific prior written permission.
+
+THIS DATABASE IS PROVIDED BY MAXMIND, INC ``AS IS'' AND ANY 
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL MAXMIND BE LIABLE FOR ANY 
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/inc/extensions/ext-geoip.php b/inc/extensions/ext-geoip.php
new file mode 100644 (file)
index 0000000..320c0c4
--- /dev/null
@@ -0,0 +1,100 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 08/07/2011 *
+ * ===================                          Last change: 08/07/2011 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-geoip.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : GeoIP database from MaxMind.com                  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : GeoIP-Datenbank von MaxMind.com                  *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * 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 2 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, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installation is running
+               // SQL commands to run
+
+               // Register module
+               //addModuleSql('foo','Y','Y','N','N');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='foo' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/templates/de/html/ext/ext_geoip.tpl b/templates/de/html/ext/ext_geoip.tpl
new file mode 100644 (file)
index 0000000..66af200
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="para">
+       Verwendet die <a href="http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/"
+        rel="external" target="_blank">GeoLiteCountry</a> von MaxMind.com, um
+       Anmeldungen von ausschliessbaren L&auml;ndern unterbinden (da leider nicht
+       jeder Sponsor an jedes Land verg&uuml;tet). Bitte lesen Sie dazu auch die
+       Nutzungsbedingungen der dat-Datei unter DOCS/geoip_LICENSE.txt.
+</div>