X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_infos.php;h=0e72d18acef6410710ec96c0c79546d41486d6a2;hb=116bc6891bfacf8f2836aae80441a1d47d0d0c88;hp=7b20ab7fb4246a27287afa7e7ce96d0a7d32e162;hpb=1b54d04f01f8b0a6afb8d40babd41b25cad1eb95;p=mailer.git diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index 7b20ab7fb4..0e72d18ace 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * 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. * + * 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 * @@ -37,25 +38,26 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + return; +} // END - if // Init both results (see footer of this file) $result_act = false; $result_pay = false; // Load all sponsor actions -$result_act = SQL_QUERY("SELECT DISTINCT m.title, c.conv_rate, c.conv_name -FROM `{!_MYSQL_PREFIX!}_sponsor_menu` AS m -LEFT JOIN `{!_MYSQL_PREFIX!}_sponsor_action_convert` AS c ON m.what=c.ext_name -LEFT JOIN `{!_MYSQL_PREFIX!}_sponsor_registry` AS r ON m.what=r.ext_name +$result_act = SQL_QUERY("SELECT m.title, c.conv_rate, c.conv_name +FROM `{?_MYSQL_PREFIX?}_sponsor_menu` AS m +LEFT JOIN `{?_MYSQL_PREFIX?}_sponsor_action_convert` AS c ON m.what=c.ext_name +LEFT JOIN `{?_MYSQL_PREFIX?}_sponsor_registry` AS r ON m.what=r.ext_name WHERE m.`action`='actions' AND r.is_active='Y' ORDER BY m.sort ASC", __FILE__, __LINE__); @@ -73,12 +75,12 @@ if (SQL_NUMROWS($result_act) > 0) { ); // Load row template and switch color - $OUT_ACT .= LOAD_TEMPLATE("guest_sponsor_act_row", true, $content); + $OUT_ACT .= loadTemplate('guest_sponsor_act_row', true, $content); $SW = 3 - $SW; } // END - while // Check for pay types - $result_pay = SQL_QUERY("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__); + $result_pay = SQL_QUERY('SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY pay_name', __FILE__, __LINE__); if (SQL_NUMROWS($result_pay) > 0) { // Load all pay types $OUT_PAY = ''; $SW = 2; @@ -95,17 +97,17 @@ if (SQL_NUMROWS($result_act) > 0) { ); // Load row template and switch color - $OUT_PAY .= LOAD_TEMPLATE("guest_sponsor_pay_row", true, $content); + $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', true, $content); $SW = 3 - $SW; } } else { // No pay types setuped so far! - $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); } } else { // No actions activated so far! - $OUT_ACT = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); - $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); } // Free memory @@ -119,7 +121,7 @@ $content = array( ); // Load main template -LOAD_TEMPLATE("guest_sponsor_infos", false, $content); +loadTemplate('guest_sponsor_infos', false, $content); -// +// [EOF] ?>