inc/libs/rewrite_functions.php -text
inc/libs/security_functions.php -text
inc/libs/sponsor_functions.php -text
+inc/libs/surfbar_functions.php -text
inc/libs/task_functions.php -text
inc/libs/transfer_functions.php -text
inc/libs/user_functions.php -text
inc/modules/admin/action-setup.php -text
inc/modules/admin/action-sponsor.php -text
inc/modules/admin/action-stats.php -text
+inc/modules/admin/action-surfbar.php -text
inc/modules/admin/action-task.php -text
inc/modules/admin/action-theme.php -text
inc/modules/admin/action-transfer.php -text
inc/modules/admin/what-config_secure.php -text
inc/modules/admin/what-config_sponsor.php -text
inc/modules/admin/what-config_stats.php -text
+inc/modules/admin/what-config_surfbar.php -text
inc/modules/admin/what-config_title.php -text
inc/modules/admin/what-config_top10.php -text
inc/modules/admin/what-config_transfer.php -text
inc/modules/admin/what-list_sponsor.php -text
inc/modules/admin/what-list_sponsor_pay.php -text
inc/modules/admin/what-list_sponsor_pays.php -text
+inc/modules/admin/what-list_surfbar_urls.php -text
inc/modules/admin/what-list_task.php -text
inc/modules/admin/what-list_transfer.php -text
inc/modules/admin/what-list_unconfirmed.php -text
// Escape a string for the database
function SQL_ESCAPE($str) {
global $link;
+
if (!is_resource($link)) {
// Fall-back to addslashes() when there is no link
return addslashes($str);
- }
+ } // END - if
if (function_exists('mysql_real_escape_string')) {
// The new and improved version
// Return the result
return SQL_QUERY_ESC($SQL, array(bigintval($id)), __FILE__, __LINE__);
}
+// ALTER TABLE wrapper function
+function SQL_ALTER_TABLE($sql, $F, $L) {
+ // Shall we add?
+ if (eregi("ADD", $sql) > 0) {
+ // Extract table name
+ $tableArray = explode(" ", $sql);
+ $tableName = str_replace("`", "", $tableArray[2]);
+
+ // And column name as well
+ $columnName = str_replace("`", "", $tableArray[4]);
+
+ // Get column information
+ $result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
+ array($tableName, $columnName), __FILE__, __LINE__);
+
+ // Do we have no entry?
+ if (SQL_NUMROWS($result) == 0) {
+ // Do the query
+ return SQL_QUERY($sql, $F, $L, false);
+ } // END - if
+ } else {
+ // Send it to the SQL_QUERY() function
+ return SQL_QUERY($sql, $F, $L, false);
+ }
+}
//
?>
// Is there still an SQL query?
if (!empty($sql)) {
- // Run SQL command
- $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ // Do we have an "ALTER TABLE" command?
+ if (substr(strtolower($sql), 0, 11) == "alter table") {
+ // Analyse the alteration command
+ SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+ } else {
+ // Run regular SQL command
+ $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ }
} // END - if
} // END - foreach
// Is there still an SQL query?
if (!empty($sql)) {
- // Run SQL command
- $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ // Do we have an "ALTER TABLE" command?
+ if (substr(strtolower($sql), 0, 11) == "alter table") {
+ // Analyse the alteration command
+ SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+ } else {
+ // Run regular SQL command
+ $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ }
} // END - if
} // END - foreach
$sql = trim($sql);
if (!empty($sql))
{
- // Run SQL command...
- $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ // Do we have an "ALTER TABLE" command?
+ if (substr(strtolower($sql), 0, 11) == "alter table") {
+ // Analyse the alteration command
+ SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+ } else {
+ // Run regular SQL command
+ $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+ }
}
}
} elseif (GET_EXT_VERSION("sql_patches") == "") {
}
}
//
-function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed="", $switch=false, $WIDTH="480")
-{
+function EXTENSION_VERBOSE_TABLE($SQLs, $title = ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed = "", $switch = false, $WIDTH = "480") {
global $_CONFIG;
$S = false; $SW = 2; $i = 1;
$OUT = "";
- if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y"))
- {
+ if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y")) {
$OUT = "<DIV align=\"center\">
<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"".$WIDTH."\" align=\"center\"".$dashed.">
<TR>
<STRONG>".$title.":</STRONG>
</TD>
</TR>\n";
- foreach ($SQLs as $idx=>$sql)
- {
+ foreach ($SQLs as $idx => $sql) {
$sql = trim($sql);
- if (!empty($sql))
- {
+ if (!empty($sql)) {
$S = true;
$OUT .= "<TR>
<TD class=\"switch_sw".(3 - $SW)." bottom2\" style=\"padding-left: 2px\" width=\"30\">".$i.".</TD>
}
}
- if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y"))
- {
+ if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y")) {
// No addional SQL commands to run
$OUT .= "<TR>
<TD colspan=\"2\" align=\"center\" class=\"switch_sw2 bottom2\" height=\"24\">
$OUT .= "</TABLE>
</DIV>\n";
}
+
+ // Return output
return $OUT;
}
//
switch ($EXT_LOAD_MODE)
{
case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
+ // SQL commands to run (surfbar URLs)
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_urls` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(`id`),
UNIQUE KEY `userid_url` (`userid`, `url`)
) TYPE=MyISAM COMMENT='Surfbar URLs'";
+
+ // Reload locks
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_locks` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
INDEX(`userid`),
INDEX(`url_id`)
) TYPE=MyISAM COMMENT='Surfbar reload locks'";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES('extras','surfbar','Surfbar starten','Y','Y',5)";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES('surfbar','','Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES('surfbar','surfbar_list_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',1)";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES('surfbar','surfbar_unlock_urls','Surfbar URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',2)";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',3)";
+
+ // Reload locks
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_reflevels`";
+ $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_reflevels` (
+`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`level` SMALLINT(6) NOT NULL DEFAULT '0',
+`percent` FLOAT(10,5) NOT NULL DEFAULT '0.00000',
+PRIMARY KEY(`id`)
+) TYPE=MyISAM COMMENT='Surfbar referal levels'";
+
+ // Config entries
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pay_mode` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_reward` FLOAT(20,5) NOT NULL DEFAULT '0.25000'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_time` SMALLINT(6) NOT NULL DEFAULT '60'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_lock` SMALLINT(6) NOT NULL DEFAULT '".(60*60)."'";
+
+ // Member menus
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',5)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','Surfbar buchen','Y','Y',2)";
+
+ // Admin menus
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','','Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_reflvl','Referal-Ebenen einstellen','Stellen Sie hier die prozentuale Vergütung für Refs ein. Es wird nur die Basisvergütung zur Rechengrundlage der Referalvergütung verwendet.',3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `what` = 'surfbar' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='surfbar' LIMIT 4";
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_reflevels`";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='surfbar' LIMIT 5";
break;
case "activate": // Do stuff when admin activates this extension
}
// Shall we display the copyright notice?
- if ((empty($frame)) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (isBooleanConstantAndTrue('WRITE_FOOTER'))) {
+ if ((empty($frame)) && (!isset($_GET['frame'])) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (isBooleanConstantAndTrue('WRITE_FOOTER'))) {
LOAD_TEMPLATE("copyright");
}
// Shall we display the parsing time and number of queries?
- if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == "Y")) {
+ if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == "Y") && (!isset($_GET['frame']))) {
// Then display it here
DISPLAY_PARSING_TIME_FOOTER();
}
define('ADMIN_REG_FAILED_ID_404', "Registrierung fehlgeschlagen: Erweiterung-ID nicht auffindbar!");
define('ADMIN_REG_FAILED_404', "Registrierung fehlgeschlagen: Erweiterung nicht auffindbar!");
define('ADMIN_REG_FAILED_ASSIGED', "Registrierung fehlgeschlagen: Sie sind nicht zugewiesen oder Task ist veraltet!");
+define('ADMIN_REG_FAILED_ALREADY', "Registrierung fehlgeschlagen: Erweiterun bereits installiert.");
define('ADMIN_NO_EXTENSION_REGISTERED', "Derzeit haben Sie keine Erweiterung in Ihrem {!MT_WORD!} registriert.");
define('ADMIN_EXTENSION_REGISTERED', "Erweiterung wurde in Ihrem {!MT_WORD!} registriert.");
define('ADMIN_EXT_ALREADY_REGISTERED', "Erweiterung bereits registriert!");
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/31/2008 *
+ * =============== Last change: 08/31/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : surfbar_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for surfbar *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Funktionen fuer die Surfbar *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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 (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Admin has added an URL with given user id
+function SURFBAR_ADMIN_ADD_URL ($url, $uid, $reward) {
+ // Is this really an admin?
+ if (!IS_ADMIN()) {
+ // Then leave here
+ return false;
+ } // END - if
+
+ // Check if that URL does not exist
+ if (SURFBAR_LOOKUP_URL($url, $uid)) {
+ // Already found!
+ return false;
+ } // END - if
+
+ // Register the new URL
+ return SURFBAR_REGISTER_URL($url, $uid, $reward, "CONFIRMED");
+}
+//
+?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
ADD_DESCR("admin", basename(__FILE__));
// Load the include file
-$INC = sprintf(PATH."inc/modules/admin/what-%s.php", $GLOBALS['what']);
-if (file_exists($INC))
-{
+$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
+if (file_exists($INC)) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC))
-{
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
//
ADD_DESCR("admin", basename(__FILE__));
// Load the include file
-$INC = PATH."inc/modules/admin/what-".$GLOBALS['what'].".php";
-if (file_exists($INC))
-{
+$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC))
-{
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Load the include file
$INC = sprintf(."%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC))
-{
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC))
-{
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC))
-{
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC))
-{
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
-}
- else
-{
+} else {
ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
}
+
//
?>
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC)) {
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
} else {
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
-if (file_exists($INC)) {
+if ((file_exists($INC)) && (is_readable($INC))) {
// Ok, we finally load the admin action module
include($INC);
} else {
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/31/2008 *
+ * =============== Last change: 08/31/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : action-surfbar.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Main menu for surfbar extension *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Hauptmneue fuer surfbar-Erweiterun *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003, 2004, 2005, 2006, 2007 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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+// Load the include file
+$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
+if (file_exists($INC)) {
+ // Ok, we finally load the admin action module
+ include($INC);
+} else {
+ ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
+}
+
+//
+?>
ADMIN_SAVE_SETTINGS($_POST);
} else {
// Prepare constants for the template
- switch ($_CONFIG['order_max'])
+ switch ($_CONFIG['order_max_full'])
{
case "ORDER":
define('__ORDER_DEFAULT', ' checked');
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/31/2008 *
+ * ================ Last change: 08/31/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_surfbar.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Configuration for surfbar *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Konfiguration fuer Surfbar *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003, 2004, 2005, 2006, 2007 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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+die("<pre>".print_r($_CONFIG, true)."</pre>");
+
+//
+?>
if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
if ($cacheInstance->cache_file("mod_reg" , true)) $cacheInstance->cache_destroy();
}
+ } elseif (GET_EXT_VERSION($ext_name) != "") {
+ // Motify the admin that we have a problem here...
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_ALREADY);
} else {
// Motify the admin that we have a problem here...
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REG_FAILED_404);
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/31/2008 *
+ * ================ Last change: 08/31/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-list_surfbar_urls.php *
+ * -------------------------------------------------------------------- *
+ * Short description : List all URLs in surfbar and sync from mail pool *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Alle URLs in Surfbar auflisten und syncen *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003, 2004, 2005, 2006, 2007 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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+// First list all booked URLs (no bonus!)
+
+//
+?>
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
$result_main = SQL_QUERY("SELECT id, sender, subject, payment_id, timestamp, url, target_send, cat_id FROM "._MYSQL_PREFIX."_pool WHERE data_type='ADMIN' ORDER BY timestamp", __FILE__, __LINE__);
OPEN_TABLE("100%", "admin_content admin_content_align", "");
-if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock'])))
-{
+if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) {
// Count checked checkboxes
$SEL = 0;
- if (isset($_POST['sel']))
- {
+ if (isset($_POST['sel'])) {
// Are there checked boxes?
- if (count($_POST['sel']) > 0)
- {
+ if (count($_POST['sel']) > 0) {
// Count now... We use an own function for now
$SEL = SELECTION_COUNT($_POST['sel']);
}
}
- if (isset($_POST['accept']))
- {
- if ($SEL > 0)
- {
+
+ if (isset($_POST['accept'])) {
+ if ($SEL > 0) {
// Accept mail orders
- foreach ($_POST['sel'] as $id=>$value)
- {
+ foreach ($_POST['sel'] as $id => $value) {
// Secure ID number
$id = bigintval($id);
// Unlock selected email
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW' WHERE id=%d AND data_type='ADMIN' LIMIT 1",
- array($id), __FILE__, __LINE__);
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1)
- {
+ //$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW' WHERE id=%d AND data_type='ADMIN' LIMIT 1",
+ // array($id), __FILE__, __LINE__);
+ if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) {
// Order placed in queue...
- $result = SQL_QUERY_ESC("SELECT url, subject, sender FROM "._MYSQL_PREFIX."_pool WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT po.url, po.subject, po.sender, pay.payment
+FROM "._MYSQL_PREFIX."_pool AS po
+INNER JOIN "._MYSQL_PREFIX."_payments AS pay
+ON po.payment_id=pay.id
+WHERE po.id=%d
+LIMIT 1",
array($id), __FILE__, __LINE__);
$DATA = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Check for bonus extension version >= 0.4.4 for the order bonus
- if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == "Y"))
- {
+ if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == "Y")) {
// Add points directly
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_order=bonus_order+".$_CONFIG['bonus_order']." WHERE userid=%d LIMIT 1",
array(bigintval($DATA[2])), __FILE__, __LINE__);
BONUS_POINTS_HANDLER($_CONFIG['bonus_order']);
}
+ // Check for surfbar extension
+ if (EXT_IS_ACTIVE("surfbar")) {
+ // Add the url
+ SURFBAR_ADMIN_ADD_URL($DATA[0], $DATA[2], $DATA[3]);
+ } // END - if
+
// Load email template
$msg_user = LOAD_EMAIL_TEMPLATE("order-accept", "", $DATA[2]);
// Set message
$MSG = ADMIN_MAILS_ACTIVATED;
- }
- else
- {
+ } else {
// Nothing checked!
$MSG = ADMIN_MAILS_NOTHING_CHECKED;
}
// Mails unlocked for mail delivery
LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
- }
- elseif (isset($_POST['reject']))
- {
- if ($SEL > 0)
- {
+ } elseif (isset($_POST['reject'])) {
+ if ($SEL > 0) {
// Reject mail orders
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
- {
+ foreach ($_POST['sel'] as $id=>$value) {
// Secure ID number
$id = bigintval($id);
// Load main template
LOAD_TEMPLATE("admin_unlock_emails_redir");
- }
- else
- {
+ } else {
// Nothing selected
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MAILS_NOTHING_CHECKED);
}
- }
- elseif ((isset($_POST['lock'])) || ($SEL > 0))
- {
- if ($SEL > 0)
- {
+ } elseif ((isset($_POST['lock'])) || ($SEL > 0)) {
+ if ($SEL > 0) {
// Lock URLs
- foreach ($_POST['sel'] as $id=>$url)
- {
+ foreach ($_POST['sel'] as $id=>$url) {
+ // Lookup in blacklist
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_url_blist WHERE url='%s' LIMIT 1",
array($url), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0)
- {
+ if (SQL_NUMROWS($result) == 0) {
// Did not find a record so we can add it... :)
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_url_blist (url, timestamp) VALUES ('%s', UNIX_TIMESTAMP())",
array($url), __FILE__, __LINE__);
- }
- else
- {
+ } else {
// Free memory
SQL_FREERESULT($result);
}
// Set message
$MSG = ADMIN_URLS_BLOCKED;
- }
- else
- {
+ } else {
// Nothing selected
$MSG = ADMIN_MAILS_NOTHING_CHECKED;
}
LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
- }
- elseif ((empty($_POST['lock'])) && (empty($_POST['accept'])) && (empty($_POST['reject'])))
- {
+ } elseif ((empty($_POST['lock'])) && (empty($_POST['accept'])) && (empty($_POST['reject']))) {
// Mail orders are in pool so we can display them
$SW = 2; $OUT = "";
while (list($id, $sender, $subj, $pay, $time, $url, $tsend, $cat) = SQL_FETCHROW($result_main))
// Load main template
LOAD_TEMPLATE("admin_unlock_emails");
- }
- else
- {
+ } else {
// Wrong call!
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_WRONG_CALL);
}
-}
- else
-{
+} else {
// No mail orders fond
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MAILS_IN_POOL);
}
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
$MODE = "guest";
-if (!empty($_GET['order']))
-{
+if (!empty($_GET['order'])) {
// Order number placed, is he also logged in?
- if(IS_LOGGED_IN())
- {
+ if(IS_LOGGED_IN()) {
// Ok, test passed... :)
$result = SQL_QUERY_ESC("SELECT subject, url FROM "._MYSQL_PREFIX."_pool WHERE id=%d AND sender=%d AND data_type='TEMP' LIMIT 1",
array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
// Finally is the entry valid?
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Load subject and URL (but forwhat do we need the subject line here???
list($sub, $url) = SQL_FETCHROW($result);
// Update his login data
UPDATE_LOGIN_DATA();
$MODE = "member";
- }
- else
- {
+ } else {
// Matching line not found!
LOAD_URL("modules.php?module=index&what=login");
}
// Free memory
SQL_FREERESULT($result);
- }
- else
- {
+ } else {
// He is no longer logged in
LOAD_URL("modules.php?module=index&what=login");
}
}
-if ((!empty($_POST['url'])) || (!empty($_GET['url'])) || (!empty($_GET['frame'])))
-{
+if ((!empty($_POST['url'])) || (!empty($_GET['url'])) || (!empty($_GET['frame']))) {
$url = URL;
if (!empty($_POST['url'])) $url = $_POST['url'];
if (!empty($_GET['url'])) $url = base64_decode(urldecode(COMPILE_CODE($_GET['url'])));
LOAD_TEMPLATE("member_order_send", false, $_GET['order']);
break;
}
-}
- else
-{
+} else {
// Go away...
LOAD_URL("modules.php?module=login");
}
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+// Already loaded?
+if (defined('__THEME_SELECTION_CONTENT')) return false;
+
// Load all active designs (or all if admin)
$whereStatement = ""; $OUT = "";
if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'";
$result_themes = SQL_QUERY("SELECT theme_path FROM "._MYSQL_PREFIX."_themes".$whereStatement, __FILE__, __LINE__);
$num_themes = SQL_NUMROWS($result_themes);
-if ($num_themes > 1)
-{
+if ($num_themes > 1) {
// If more than 1 is installed output selection box
$act = "";
if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
$OUT = THEME_SELECTION_BOX("index", $act, $GLOBALS['what'], $result_themes);
-}
- elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0)))
-{
+} elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) {
// If there's only one just print it's name
global $THEME_NAME;
define('__THEME_NAME', $THEME_NAME);
$OUT = LOAD_TEMPLATE("theme_one", true);
-}
- elseif (IS_ADMIN())
-{
+} elseif (IS_ADMIN()) {
// If there is no theme installed and there's an admin notify him!
$OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<FONT class=\"admin_note\">".ADMIN_NO_THEME_INSTALLED_WARNING."</FONT>");
}
OUTPUT_HTML(" </TD>
<TD valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
-$INC_ACTION = sprintf(."%sinc/modules/member/action-%s.php", PATH, $act);
+$INC_ACTION = sprintf("%sinc/modules/member/action-%s.php", PATH, $act);
if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what'])))
{
// Requested module is available so we load it
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif (!IS_LOGGED_IN())
-{
+} elseif (!IS_LOGGED_IN()) {
LOAD_URL("modules.php?module=index");
}
+// Already defined?
+if (defined('__THEME_SELECTION_CONTENT')) return false;
+
// Load all active designs (or all if admin)
$whereStatement = ""; $OUT = "";
if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'";
$result_themes = SQL_QUERY("SELECT theme_path FROM "._MYSQL_PREFIX."_themes".$whereStatement, __FILE__, __LINE__);
$num_themes = SQL_NUMROWS($result_themes);
-if ($num_themes > 1)
-{
+if ($num_themes > 1) {
// If more than 1 is installed output selection box
$act = ""; $wht = "";
if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
if (!empty($GLOBALS['what'])) $wht = SQL_ESCAPE($GLOBALS['what']);
$OUT = THEME_SELECTION_BOX("login", $act, $wht, $result_themes);
-}
- elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0)))
-{
+} elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) {
// If there's only one just print it's name
global $THEME_NAME;
define('__THEME_NAME', $THEME_NAME);
$OUT = LOAD_TEMPLATE("theme_one", true);
-}
- elseif (IS_ADMIN())
-{
+} elseif (IS_ADMIN()) {
// If there is no theme installed and there's an admin notify him!
$OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<FONT class=\"admin_note\">".ADMIN_NO_THEME_INSTALLED_WARNING."</FONT>");
}
if ($HOLIDAY == $DMY) $HOLIDAY='N';
$ALLOWED = $MAXI - $ORDERS;
-if ($_CONFIG['order_max'] == "MAX") $ALLOWED = $MAXI;
+if ($_CONFIG['order_max_full'] == "MAX") $ALLOWED = $MAXI;
// Check HTML extension
$HTML_EXT = EXT_IS_ACTIVE("html_mail");
// Not enougth receivers selected
$URL = URL."/modules.php?module=login&what=order&msg=".CODE_MORE_RECEIVERS1;
}
- elseif (($ALLOWED == 0) && ($_CONFIG['order_max'] == "ORDER"))
+ elseif (($ALLOWED == 0) && ($_CONFIG['order_max_full'] == "ORDER"))
{
// No more mail orders allowed
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_ORDER_ALLOWED_EXHAUSTED);
$TOTAL = TRANSLATE_COMMA($TOTAL);
// Check how many mail orders he has placed today and how many he's allowed to send
- switch ($_CONFIG['order_max'])
+ switch ($_CONFIG['order_max_full'])
{
case "MAX": // He is allowed to send as much as possible
define('ORDER_MAX_VALUE', ORDER_ALLOED_MAX);
// Some security stuff...
$URL = "";
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
return;
-}
- elseif (!IS_LOGGED_IN())
-{
+} elseif (!IS_LOGGED_IN()) {
// Sorry, no guest access!
$URL = URL."/modules.php?module=index";
-}
- elseif (empty($_GET['order']))
-{
+} elseif (empty($_GET['order'])) {
// You cannot call this module directly!
$URL = URL."/modules.php?module=login&what=order";
}
// When URL is empty nothing bad happend here
-if (empty($URL))
-{
+if (empty($URL)) {
// Is the auto-send mechanism active or inactive?
- if ($_CONFIG['autosend_active'] == "Y")
- {
+ if ($_CONFIG['autosend_active'] == "Y") {
// Auto-send is active
define('ADMIN_AUTOSEND', COMPILE_CODE(ADMIN_AUTOSEND_ACTIVE));
define('MEMBER_AUTOSEND', COMPILE_CODE(MEMBER_AUTOSEND_ACTIVE));
$type = "NEW";
- }
- else
- {
+ } else {
// Auto-send is inactive
define('ADMIN_AUTOSEND', COMPILE_CODE(ADMIN_AUTOSEND_INACTIVE));
define('MEMBER_AUTOSEND', COMPILE_CODE(MEMBER_AUTOSEND_INACTIVE));
array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
// Finally is the entry valid?
- if (SQL_AFFECTEDROWS($link) == 1)
- {
+ if (SQL_AFFECTEDROWS($link) == 1) {
// Update his login data
UPDATE_LOGIN_DATA();
// Update used points
$ADD = "";
- if ($_CONFIG['order_max'] == "ORDER") $ADD = ", mail_orders=mail_orders+1";
+ if ($_CONFIG['order_max_full'] == "ORDER") $ADD = ", mail_orders=mail_orders+1";
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s".$ADD." WHERE userid=%d LIMIT 1",
array($USED, $GLOBALS['userid']), __FILE__, __LINE__);
// Update mediadata as well
- if (GET_EXT_VERSION("mediadata") >= "0.0.4")
- {
+ if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
// Update database
MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $USED);
}
SEND_EMAIL($email, MEMBER_NEW_QUEUE, $msg_mem);
// Notify admins about this
- if (GET_EXT_VERSION("admins") >= "0.4.1")
- {
+ if (GET_EXT_VERSION("admins") >= "0.4.1") {
SEND_ADMIN_EMAILS_PRO(ADMIN_NEW_QUEUE, "order-admin", "", $GLOBALS['userid']);
- }
- else
- {
+ } else {
$msg_admin = LOAD_EMAIL_TEMPLATE("order-admin", "", $GLOBALS['userid']);
SEND_ADMIN_EMAILS(ADMIN_NEW_QUEUE, $msg_admin);
}
// Output back bottom
LOAD_TEMPLATE("member_order-back", false);
- }
- else
- {
+ } else {
// Matching line not found or already "placed" in send queue
$URL = URL."/modules.php?module=login";
LOAD_URL($URL);
}
-}
- else
-{
+} else {
// Redirect...
LOAD_URL($URL);
}
}
if ($VALID)
{
- if (($time == "0") && ($payment >0)) $time = "1";
+ if (($time == "0") && ($payment > 0)) $time = "1";
if (($time > 0) && ($payment > 0))
{
if (!empty($code))
jedoch nur von der Basisvergütung berechnet.<br />
<br />
Es können auch URLs direkt und nur in die Surfbar gebucht werden. Hier
-gilt jedoch ein einstellbarer Festpreis und die Fix-Vergütung.<br />
+gilt jedoch ein einstellbarer Festpreis.<br />
+<br />
+Die Wartezeit ist ebenfalls entweder statisch einstellbar, wenn Sie statische
+Vergütung eingestellt haben oder dynamisch. Dabei richtet sich ebenfalls
+die Basiswartezeit nach der Verweildauer aus der gebuchten Mails. Bei direkt
+in der Surbar gebuchten URLs gilt eine eingestellte Festzeit und Festpreis.<br />
<br />
Das Mitglied kann nicht seine eigenen Seiten besuchen!