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 - 2015 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 (!ifSqlHasZeroNumRows($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 // @TODO Cache this static data
84 $result_pay = sqlQuery('SELECT
90 `{?_MYSQL_PREFIX?}_sponsor_paytypes`
92 `pay_name` ASC', __FILE__, __LINE__);
94 if (!ifSqlHasZeroNumRows($result_pay)) {
96 while ($content = sqlFetchArray($result_pay)) {
97 // Load row template and switch color
98 $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', TRUE, $content);
101 // No pay types setuped so far!
102 $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
105 // No actions activated so far!
106 $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
107 $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', TRUE, displayMessage('{--SPONSOR_NO_ACTIONS_ACTIVATED--}', TRUE));
111 sqlFreeResult($result_act);
112 sqlFreeResult($result_pay);
114 // Transfer rows to an array
116 'actions' => $OUT_ACT,
117 'paytypes' => $OUT_PAY
120 // Load main template
121 loadTemplate('guest_sponsor_infos', FALSE, $content);