inc/extensions/ext-theme.php -text
inc/extensions/ext-top10.php -text
inc/extensions/ext-transfer.php -text
+inc/extensions/ext-usage.php -text
inc/extensions/ext-user.php -text
inc/extensions/ext-wernis.php -text
inc/extensions/ext-yoomedia.php -text
inc/language/theme_de.php -text
inc/language/top10_de.php -text
inc/language/transfer_de.php -text
+inc/language/usage_de.php -text
inc/language/user_de.php -text
inc/language/wernis_de.php -text
inc/language/yoomedia_de.php -text
// Cookie-Path ( for lame servers... ;-) )
define('COOKIE_PATH', $COOKIES);
-// Base directory for access logfiles
-define('LOGS_BASE', "logs");
-
-// Base directory for usage statistics
-define('USAGE_BASE', "usage");
-
// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "711");
+define('CURR_SVN_REVISION', "712");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogbücher','Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'";
break;
case "remove": // Do stuff when removing extension
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 02/07/2009 *
+ * ================ Last change: 02/07/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : ext-usage.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Helper extension for usage directory *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Helfer-Erweiterung fuer das "usage" Verzeichnis *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.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')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'";
+ break;
+
+case "remove": // Do stuff when removing extension
+ // SQL commands to run
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='usage' LIMIT 1";
+ break;
+
+case "activate": // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
+
+case "update": // Update an extension
+ switch ($EXT_VER)
+ {
+ case "0.0.1": // SQL queries for v0.0.1
+ $SQLs[] = "";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "";
+ break;
+ }
+ break;
+
+case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+default: // Do stuff when extension is loaded
+ break;
+}
+
+//
+?>
require($INC);
}
+// Language definitions
+
//
?>
<?php
/************************************************************************
- * MXChange v0.2.1 Start: 11/26/2008 *
- * =============== Last change: 11/26/2008 *
+ * MXChange v0.2.1 Start: 02/07/2009 *
+ * =============== Last change: 02/07/2009 *
* *
* -------------------------------------------------------------------- *
* File : _de.php *
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 02/07/2009 *
+ * =============== Last change: 02/07/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : usage_de.php *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Deutsche Sprachunterstuetzung *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.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')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Language definitions
+define('ADMIN_USAGE_DIRECTORY_404', "Das Verzeichnis <u>%s</u> scheint auf Ihrem Server zu fehlen. Funktion nicht verfügbar.");
+
+//
+?>
}
} else {
// List access logfiles
- $dir = PATH.LOGS_BASE."/";
+ $dir = PATH.getConfig('logs_base')."/";
if (is_dir($dir)) {
// logs directory does exist
OUTPUT_HTML("<ol>");
- $handle = opendir($dir) or mxchange_die("Cannot open directory ".LOGS_BASE."!");
+ $handle = opendir($dir) or mxchange_die("Cannot open directory ".getConfig('logs_base')."!");
while ($file = readdir($handle)) {
// We currenly only like files with "access" as prefix, should be more flexible!
if (substr($file, 0, 6) == "access") {
OUTPUT_HTML("</ol>");
} else {
// logs directory does not exist
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_LOGS_DIR_404_1.LOGS_BASE.ADMIN_LOGS_DIR_404_2);
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_LOGS_DIR_404_1.getConfig('logs_base').ADMIN_LOGS_DIR_404_2);
}
}
ADD_DESCR("admin", __FILE__);
// Base directory (should be moved to database)
-$usage = "usage/";
+$usage = getConfig('usage_base')."/";
if (!empty($_GET['image'])) {
if ($_GET['type'] == "usage") {
- $file = sprintf("%s%susage.png", PATH, $usage);
+ $file = sprintf("%s%s/usage.png", PATH, getConfig('usage_base'));
} else {
if (strpos($_GET['image'], "\\") > 0) $_GET['image'] = substr($_GET['image'], 0, strpos($_GET['image'], "\\"));
- $file = sprintf("%s%s%s_usage_%s.png", PATH, $usage, SQL_ESCAPE($_GET['type']), SQL_ESCAPE($_GET['image']));
+ $file = sprintf("%s%s/%s_usage_%s.png",
+ PATH,
+ getConfig('usage_base'),
+ SQL_ESCAPE($_GET['type']),
+ SQL_ESCAPE($_GET['image'])
+ );
}
if (FILE_READABLE($file)) {
}
exit();
} elseif (empty($_GET['usage'])) {
- $file = sprintf("%s%sindex.html", PATH, $usage);
+ $file = sprintf("%s%s/index.html", PATH, getConfig('usage_base'));
} else {
- $file = sprintf("%s%susage_%s.html",
+ $file = sprintf("%s%s/usage_%s.html",
PATH,
- $usage,
+ getConfig('usage_base'),
SQL_ESCAPE($_GET['usage'])
);
}
-if (!empty($file)) {
- if (FILE_READABLE($file)) {
- // @TODO This code is double, see functions.php, LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE
- $tmpl_file = READ_FILE($file);
- $tmpl_file = addslashes($tmpl_file);
- $tmpl_file = "\$content=\"".$tmpl_file."\";";
- eval($tmpl_file);
- // Double code until here
+if ((!empty($file)) && (FILE_READABLE($file) {
+ // @TODO This code is double, see LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE in functions.php
+ $tmpl_file = READ_FILE($file);
+ $tmpl_file = addslashes($tmpl_file);
+ $tmpl_file = "\$content=\"".$tmpl_file."\";";
+ eval($tmpl_file);
+ // Until here...
+
+ // Replace URLs
+ $content = str_replace("usage.png", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=usage&image=usage", $content);
+ $content = str_replace("daily_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=daily&image=", $content);
+ $content = str_replace("hourly_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=hourly&image=", $content);
+ $content = str_replace("ctry_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=ctry&image=", $content);
+ $content = str_replace("usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", "", $content));
+
+ // Disabled due to too much trouble
+ //$content = str_replace("HREF=\"http://", "href=\"".URL."/modules.php?module=loader&url=http://", $content);
+ $test = strtolower($content);
- // Replace URLs
- $content = str_replace("usage.png", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=usage&image=usage", $content);
- $content = str_replace("daily_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=daily&image=", $content);
- $content = str_replace("hourly_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=hourly&image=", $content);
- $content = str_replace("ctry_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=ctry&image=", $content);
- $content = str_replace("usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", "", $content));
- // Disabled due to too much trouble
- //$content = str_replace("HREF=\"http://", "href=\"".URL."/modules.php?module=loader&url=http://", $content);
- $test = strtolower($content);
- $body_start = strpos($test, "<body");
- $body_end = strpos($test, "</body>");
- if (($body_start > 0) && ($body_end > 0))
- {
- $content = substr(substr($content, 0, $body_end), $body_start);
- $content = substr($content, strpos($content, ">") + 1);
- OUTPUT_HTML("<div align=\"left\">
+ // Do we need to strip out above and including <body> plus trailing </html> tag?
+ if ((strpos($test, "<body") > 0) && (strpos($test, "</body>") > 0)) {
+ // Okay, then do so.
+ $content = substr(substr($content, 0, $body_end), $body_start);
+ $content = substr($content, strpos($content, ">") + 1);
+ } // END - if
+
+ // Output code
+ OUTPUT_HTML("<div align=\"left\">
".$content."
</div>");
- }
- }
+} else {
+ // Nothing to load, then we have no directory "usage"
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_USAGE_DIRECTORY_404, getConfig('usage_base')));
}
//
INSERT INTO `mxchange_payments` VALUES (4,40,40.000,'Klick-Mail 40 Sek.',39.000);\r
INSERT INTO `mxchange_payments` VALUES (5,50,50.000,'Klick-Mail 50 Sek.',49.000);\r
\r
-INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9);\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_archiv','E-Mail Archiv','Sehen Sie sich hier bereits gesendete Mails an.','6');\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','del_email','E-Mail löschen','Löschen Sie hierrüber E-Mails (sowohl Bonus- als auch Normal-Mails) aus Ihrem Mailtausch-System. <STRONG>Nur bei Normal-Mails:</STRONG> {!POINTS!} aus den unbestätigten Mails werden dem Werber wieder vergütet.','7');\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8');\r
INSERT INTO `mxchange_payments` VALUES (4,40,40.000,'Klick-Mail 40 Sek.',39.000);\r
INSERT INTO `mxchange_payments` VALUES (5,50,50.000,'Klick-Mail 50 Sek.',49.000);\r
\r
-INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9);\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_archiv','E-Mail Archiv','Sehen Sie sich hier bereits gesendete Mails an.','6');\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','del_email','E-Mail löschen','Löschen Sie hierrüber E-Mails (sowohl Bonus- als auch Normal-Mails) aus Ihrem Mailtausch-System. <STRONG>Nur bei Normal-Mails:</STRONG> {!POINTS!} aus den unbestätigten Mails werden dem Werber wieder vergütet.','7');\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8');\r