2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 06/10/2005 *
4 * =================== Last change: 05/18/2008 *
6 * -------------------------------------------------------------------- *
7 * File : what-sponsor_infos.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Informations and prices for the sponsor *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Informationen/Preise fuer den Sponsoren *
12 * -------------------------------------------------------------------- *
13 * Copyright (c) 2003 - 2009 by Roland Haeder *
14 * Copyright (c) 2009 - 2013 by Mailer Developer Team *
15 * For more information visit: http://mxchange.org *
17 * This program is free software; you can redistribute it and/or modify *
18 * it under the terms of the GNU General Public License as published by *
19 * the Free Software Foundation; either version 2 of the License, or *
20 * (at your option) any later version. *
22 * This program is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
25 * GNU General Public License for more details. *
27 * You should have received a copy of the GNU General Public License *
28 * along with this program; if not, write to the Free Software *
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
31 ************************************************************************/
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
38 // Add description as navigation point
39 addYouAreHereLink('guest', __FILE__);
41 if ((!isExtensionActive('sponsor'))) {
42 displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=sponsor%}');
46 // Init both results (see footer of this file)
50 // ... and output variables
54 // Load all sponsor actions
55 $result_act = sqlQuery("SELECT
56 `m`.`title` AS `conv_title`,
60 `{?_MYSQL_PREFIX?}_sponsor_menu` AS `m`
62 `{?_MYSQL_PREFIX?}_sponsor_action_convert` AS `c`
64 `m`.`what`=`c`.`ext_name`
66 `{?_MYSQL_PREFIX?}_sponsor_registry` AS `r`
68 `m`.`what`=`r`.`ext_name`
70 `m`.`action`='actions' AND
73 `m`.`sort` ASC", __FILE__, __LINE__);
75 if (!ifSqlHasZeroNums($result_act)) {
77 while ($content = sqlFetchArray($result_act)) {
78 // Load row template and switch color
79 $OUT_ACT .= loadTemplate('guest_sponsor_act_row', TRUE, $content);
82 // Check for pay types
83 $result_pay = sqlQuery('SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC', __FILE__, __LINE__);
84 if (!ifSqlHasZeroNums($result_pay)) {
86 while ($content = sqlFetchArray($result_pay)) {
87 // Load row template and switch color
88 $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', TRUE, $content);
91 // No pay types setuped so far!
92 $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
95 // No actions activated so far!
96 $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
97 $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
101 sqlFreeResult($result_act);
102 sqlFreeResult($result_pay);
104 // Transfer rows to an array
106 'actions' => $OUT_ACT,
107 'paytypes' => $OUT_PAY
110 // Load main template
111 loadTemplate('guest_sponsor_infos', FALSE, $content);