inc/modules/admin/what-config_menu.php svneol=native#text/plain
inc/modules/admin/what-config_mods.php svneol=native#text/plain
inc/modules/admin/what-config_network_api.php svneol=native#text/plain
+inc/modules/admin/what-config_network_types.php svneol=native#text/plain
inc/modules/admin/what-config_networks.php svneol=native#text/plain
inc/modules/admin/what-config_newsletter.php svneol=native#text/plain
inc/modules/admin/what-config_nickname.php svneol=native#text/plain
./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away!
./inc/filter/cache_filter.php:92: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
./inc/filter/forced_filter.php:73: // @TODO This part is unfinished
-./inc/functions.php:1183: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1271: // @TODO Are these convertions still required?
-./inc/functions.php:1291:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1185: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1273: // @TODO Are these convertions still required?
+./inc/functions.php:1293:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/functions.php:156:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:1901: // @TODO Find a way to cache this
-./inc/functions.php:2002: // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2197: // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:1903: // @TODO Find a way to cache this
+./inc/functions.php:2004: // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2199: // @TODO Rename column data_type to e.g. mail_status
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
./inc/language/de.php:1074: // @TODO Rewrite these two constants
./inc/modules/admin/what-admins_mails.php:58: // @TODO Can this be rewritten to an API function?
./inc/modules/admin/what-bonus.php:46:// @TODO Unused at the moment
./inc/modules/admin/what-config_mods.php:55: // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function
+./inc/modules/admin/what-config_network_types.php:60: // @TODO Do something here
./inc/modules/admin/what-config_points.php:110: // @TODO Rewrite this to a filter
./inc/modules/admin/what-config_rallye_prices.php:195: // @TODO Rewrite these two constants
./inc/modules/admin/what-config_rallye_prices.php:227: // @TODO rename: start->start_time, end->end_time
// Query for all networks
$result = SQL_QUERY('SELECT
- `network_id`,`network_short_name`,`network_title`
+ `network_id`,
+ `network_short_name`,
+ `network_title`
FROM
`{?_MYSQL_PREFIX?}_network_data`
ORDER BY
} // END - while
// Generate the selection box
- $content = generateSelectionBoxFromArray($rows, 'network', 'network_id');
+ $content = generateSelectionBoxFromArray($rows, 'network_id', 'network_id', '', '', 'network');
} else {
// Nothing selected
$content = loadTemplate('admin_settings_unsaved', false, '{--ADMIN_ENTRIES_404--}');
'',
sprintf(
"WHERE `network_id`=%s",
- bigintval(getRequestElement('network'))
+ bigintval(getRequestElement('network_id'))
),
'',
'translateNetworkTypeHandler'
// Do we have selections?
if (ifPostContainsSelections()) {
// Load network data
- $networkData = getNetworkDataById(getRequestElement('network'));
+ $networkData = getNetworkDataById(getRequestElement('network_id'));
// Something has been selected, so start displaying one by one
$OUT = '';
$GLOBALS['network_params_disabled'] = array();
// Load network data
- $networkData = getNetworkDataById(getRequestElement('network'));
+ $networkData = getNetworkDataById(getRequestElement('network_id'));
// Something has been selected, so start displaying one by one
$OUT = '';
// Add a network type handler if not yet found
function doAdminNetworkProcessAddNetworkType () {
// Is the network type handle already used with given network?
- if (isNetworkTypeHandleValid(postRequestElement('network_type_handle'), getRequestElement('network'))) {
+ if (isNetworkTypeHandleValid(postRequestElement('network_type_handle'), getRequestElement('network_id'))) {
// Already added
loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED=' . postRequestElement('network_type_handle') . '%}');
unsetPostRequestElement('ok');
// Add id
- setPostRequestElement('network_id', bigintval(getRequestElement('network')));
+ setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
// Is network_type_banner_url set?
if (postRequestElement('network_type_banner_url') == '') {
// Adds a request parameter to given network and type
function doAdminNetworkProcessAddNetworkParam () {
// Is the request parameter already used with given network?
- if (isNetworkRequestElementValid(postRequestElement('network_request_param_key'), postRequestElement('network_type_id'), getRequestElement('network'))) {
+ if (isNetworkRequestElementValid(postRequestElement('network_request_param_key'), postRequestElement('network_type_id'), getRequestElement('network_id'))) {
// Already added
loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestElement('network_request_param_key') . '%}');
unsetPostRequestElement('ok');
// Add id
- setPostRequestElement('network_id', bigintval(getRequestElement('network')));
+ setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
// Is network_request_param_default set?
if (postRequestElement('network_request_param_default') == '') {
// Adds a API response array entry
function doAdminNetworkProcessAddNetworkApiTranslation () {
// Is the request parameter already used with given network?
- if (isNetworkApiTranslationValid(postRequestElement('network_api_index'), postRequestElement('network_type_id'), getRequestElement('network'))) {
+ if (isNetworkApiTranslationValid(postRequestElement('network_api_index'), postRequestElement('network_type_id'), getRequestElement('network_id'))) {
// Already added
loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_API_TRANSLATION_ALREADY_ADDED=' . postRequestElement('network_api_index') . '%}');
unsetPostRequestElement('ok');
// Add id
- setPostRequestElement('network_id', bigintval(getRequestElement('network')));
+ setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
// Add sorting
setPostRequestElement('sort', (countSumTotalData(
unsetPostRequestElement('ok');
// Add id
- setPostRequestElement('network_id', bigintval(getRequestElement('network')));
+ setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
// Is network_api_referral_button set?
if (postRequestElement('network_api_referral_button') == '') {
} // END - if
// Is there already an entry?
- if (isNetworkApiConfigured(getRequestElement('network'))) {
+ if (isNetworkApiConfigured(getRequestElement('network_id'))) {
// Generate SQL query
$SQL = getUpdateSqlFromArray(postRequestArray(), 'network_api_config', 'network_id', postRequestElement('network_id'), array('network_id'));
} else {
} // END - if
// Do we have a network selected?
-if (isGetRequestElementSet('network')) {
+if (isGetRequestElementSet('network_id')) {
// Check all networks that doesn't have a configuration entry
$result = SQL_QUERY_ESC('SELECT
`network_id`,
`network_id`=%s
LIMIT 1',
array(
- bigintval(getRequestElement('network'))
+ bigintval(getRequestElement('network_id'))
), __FILE__, __LINE__);
// Do we have an entry?
`network_id`=%s
LIMIT 1',
array(
- bigintval(getRequestElement('network'))
+ bigintval(getRequestElement('network_id'))
), __FUNCTION__, __LINE__);
// Do we have an entry?
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 08/13/2011 *
+ * =================== Last change: 08/13/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_network_types.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Handler types configuration *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Werbe-Handler-Konfiguration *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://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')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+// By default we should display list/add new forms
+$GLOBALS['network_display'] = true;
+
+// Handle form here
+doNetworkHandleForm();
+
+// Display forms?
+if ($GLOBALS['network_display'] === false) {
+ // Abort here
+ return;
+} // END - if
+
+// Do we have a network selected?
+if (isGetRequestElementSet('network_id')) {
+ // @TODO Do something here
+} else {
+ // Generate network list for this script
+ outputHtml(generateAdminNetworkList());
+}
+
+// [EOF]
+?>
} // END - if
// Do we have a network selected?
-if (isGetRequestElementSet('network')) {
+if (isGetRequestElementSet('network_id')) {
// Get its data for template
- $networkData = getNetworkDataById(getRequestElement('network'));
+ $networkData = getNetworkDataById(getRequestElement('network_id'));
// Init type
$networkData['network_type_id'] = 0;
t.`network_type_handle` ASC,
p.`network_api_id` ASC",
array(
- bigintval(getRequestElement('network'))
+ bigintval(getRequestElement('network_id'))
), __FILE__, __LINE__);
// Do we have entries?
} // END - if
// Do we have a network selected?
-if (isGetRequestElementSet('network')) {
+if (isGetRequestElementSet('network_id')) {
// Get its data for template
- $networkData = getNetworkDataById(getRequestElement('network'));
+ $networkData = getNetworkDataById(getRequestElement('network_id'));
$networkData['network_type_id'] = 0;
// Init disabled list
ORDER BY
t.`network_type_handle` ASC,
p.`network_param_id` ASC",
- array(getRequestElement('network')), __FILE__, __LINE__);
+ array(getRequestElement('network_id')), __FILE__, __LINE__);
// Do we have entries?
if (!SQL_HASZERONUMS($result)) {
} // END - if
// Do we have a network selected?
-if (isGetRequestElementSet('network')) {
+if (isGetRequestElementSet('network_id')) {
// Get its data for template
- $networkData = getNetworkDataById(getRequestElement('network'));
+ $networkData = getNetworkDataById(getRequestElement('network_id'));
// Init disabled list
$GLOBALS['network_types_disabled'] = array();
`network_id`=%s
ORDER BY
`network_type_handle` ASC",
- array(getRequestElement('network')), __FILE__, __LINE__);
+ array(getRequestElement('network_id')), __FILE__, __LINE__);
// Do we have entries?
if (!SQL_HASZERONUMS($result)) {
}
// Generates a 'selection box' from given array
-function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent = '', $extraName = '') {
+function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent = '', $extraName = '', $templateName = '') {
// Start the output
$OUT = '<select name="' . $name . '" size="1" class="form_select">
<option value="X" disabled="disabled">{--PLEASE_SELECT--}</option>';
foreach ($options as $option) {
// Add the <option> entry from ...
if (empty($optionContent)) {
- // ... template
- $OUT .= loadTemplate('select_' . $name . $extraName . '_option', true, $option);
+ // Is a template name given?
+ if (empty($templateName)) {
+ // ... $name template
+ $OUT .= loadTemplate('select_' . $name . $extraName . '_option', true, $option);
+ } else {
+ // ... $templateName template
+ $OUT .= loadTemplate('select_' . $templateName . $extraName . '_option', true, $option);
+ }
} else {
// ... direct HTML code
$OUT .= '<option value="' . $option[$optionValue] . '">' . $option[$optionContent] . '</option>';
);
// Load template and return it
- return loadTemplate('select_' . $name . $extraName . '_box', true, $content);
+ if (empty($templateName)) {
+ // Use name from $name + $extraName
+ return loadTemplate('select_' . $name . $extraName . '_box', true, $content);
+ } else {
+ // Use name from $templateName + $extraName
+ return loadTemplate('select_' . $templateName . $extraName . '_box', true, $content);
+ }
}
// Prepares the header for HTML output
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_api_translation&do=add_network_api_translation&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_api_translation&do=add_network_api_translation&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td class="table_header bottom" colspan="2" align="center">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=add_network_param&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=add_network_param&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td class="table_header bottom" colspan="2" align="center">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=add_network_type&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=add_network_type&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td class="table_header bottom" colspan="2" align="center">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_network_api&do=network_api_config&network=$content[network_id]%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_network_api&do=network_api_config&network_id=$content[network_id]%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td class="table_header bottom" colspan="2" align="center">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=remove_network_param&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=remove_network_param&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td align="center" class="table_header bottom" height="25" colspan="2">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=remove_network_type&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=remove_network_type&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td align="center" class="table_header bottom" height="25" colspan="2">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=change_network_param&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=change_network_param&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td align="center" class="table_header bottom" height="25" colspan="2">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=change_network_type&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=change_network_type&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td align="center" class="table_header bottom" height="25" colspan="2">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_api_translation&do=handle_api_translation&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_api_translation&do=handle_api_translation&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td colspan="5" align="center" class="table_header bottom">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=handle_request_params&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_params&do=handle_request_params&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td colspan="5" align="center" class="table_header bottom">
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=handle_network_type&network={%get=network%}%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_network_types&do=handle_network_type&network_id={%get=network%}%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td colspan="5" align="center" class="table_header bottom">
<td class="{%template,ColorSwitch%} bottom right" align="center">
$content[network_short_name]:<br />
[<a
- href="{%url=modules.php?module=admin&what=config_network_api&network=$content[network_id]%}" title="{--ADMIN_NETWORK_CONFIG_LINK_TITLE--}">C</a>|<a
- href="{%url=modules.php?module=admin&what=list_network_types&network=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_TYPES_LINK_TITLE--}">T</a>|<a
- href="{%url=modules.php?module=admin&what=list_network_params&network=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_PARAMS_LINK_TITLE--}">P</a>|<a
- href="{%url=modules.php?module=admin&what=list_network_api_translation&network=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_API_TRANSLATION_LINK_TITLE--}">RC</a>|<a
- href="{%url=modules.php?module=admin&what=list_network_error_codes&network=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_ERROR_CODES_LINK_TITLE--}">EC</a>]
+ href="{%url=modules.php?module=admin&what=config_network_api&network_id=$content[network_id]%}" title="{--ADMIN_NETWORK_CONFIG_LINK_TITLE--}">C</a>|<a
+ href="{%url=modules.php?module=admin&what=list_network_types&network_id=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_TYPES_LINK_TITLE--}">T</a>|<a
+ href="{%url=modules.php?module=admin&what=list_network_params&network_id=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_PARAMS_LINK_TITLE--}">P</a>|<a
+ href="{%url=modules.php?module=admin&what=list_network_api_translation&network_id=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_API_TRANSLATION_LINK_TITLE--}">RC</a>|<a
+ href="{%url=modules.php?module=admin&what=list_network_error_codes&network_id=$content[network_id]%}" title="{--ADMIN_LIST_NETWORK_ERROR_CODES_LINK_TITLE--}">EC</a>]
</td>
<td class="{%template,ColorSwitch%} bottom right" align="center">
[<a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>]
</div>
<div class="message">
Das Werbenetzwerk $content[network_title] wurde soeben hinzugefügt.
- Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_types&network=$content[network_id]%}">Werbearten hinzufügen</a>.
+ Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_types&network_id=$content[network_id]%}">Werbearten hinzufügen</a>.
</div>
</div>
{--ADMIN_NETWORK_API_TRANSLATION_ADDED_TITLE--}
</div>
<div class="message">
- Die Array-Element-Übersetzung $content[network_api_index] wurde soeben hinzugefügt.
- Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_error_codes&network=$content[network_id]%}">Fehlercodes hinzufügen</a>.
+ Die Array-Element-Übersetzung $content[network_api_index] wurde
+ soeben hinzugefügt. Sie sollten nun als nächstes die <a
+ href="{%url=modules.php?module=admin&what=list_network_error_codes&network_id=$content[network_id]%}">Fehlercodes
+ hinzufügen</a>.
</div>
</div>
<div class="message">
Der API-Abfrageparameter $content[network_request_param_key]/$content[network_request_param_value]
wurde soeben hinzugefügt. Sie sollten nun als nächstes die
- <a href="{%url=modules.php?module=admin&what=list_network_api_translation&network=$content[network_id]%}">API-Arrayelemente hinzufügen</a>.
+ <a href="{%url=modules.php?module=admin&what=list_network_api_translation&network_id=$content[network_id]%}">API-Arrayelemente hinzufügen</a>.
</div>
</div>
</div>
<div class="message">
Der Werbeart-Handler $content[network_type_handle] wurde soeben hinzugefügt.
- Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_params&network=$content[network_id]%}">Abfrageparameter hinzufügen</a>.
+ Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_params&network_id=$content[network_id]%}">Abfrageparameter hinzufügen</a>.
</div>
</div>
<form accept-charset="UTF-8" action="{?URL?}/modules.php" method="get">
<input type="hidden" name="module" value="{%pipe,getModule%}" />
<input type="hidden" name="what" value="{%pipe,getWhat%}" />
-<input type="hidden" name="network" value="{%network,getNetworkDataById,network_id=%network%%}" />
+<input type="hidden" name="network_id" value="{%network,getNetworkDataById,network_id=%network%%}" />
<div class="table dashed">
<div class="table_header bottom">
<div>