addYouAreHereLink('admin', __FILE__);
// By default we should display list/add new forms
-$GLOBALS['network_display'] = true;
+$GLOBALS['network_display'] = TRUE;
// Handle form here
doNetworkHandleForm();
// Display forms?
-if ($GLOBALS['network_display'] === false) {
+if ($GLOBALS['network_display'] === FALSE) {
// Abort here
return;
} // END - if
NULL AS `network_data_id`,
NULL AS `network_max_reload_time`,
NULL AS `network_min_waiting_time`,
+ NULL AS `network_max_waiting_time`,
+ NULL AS `network_min_remain_budget`,
NULL AS `network_min_remain_clicks`,
NULL AS `network_min_payment`,
- NULL AS `network_allow_erotic`
+ NULL AS `network_allow_erotic`,
+ NULL AS `network_media_size`,
+ NULL AS `network_media_output`
FROM
`{?_MYSQL_PREFIX?}_network_types` AS t
INNER JOIN
$content = SQL_FETCHARRAY($result);
// Is the network active?
- if ($content['network_active'] == 'N') {
+ if (($content['network_active'] == 'N') && (!isAdminsExpertWarningEnabled()) && (!isDebugModeEnabled())) {
// Not active
displayMessage('{--ADMIN_NETWORK_NOT_ACTIVE--}');
return;
`network_data_id`,
`network_max_reload_time`,
`network_min_waiting_time`,
+ `network_max_waiting_time`,
+ `network_min_remain_budget`,
`network_min_remain_clicks`,
`network_min_payment`,
- `network_allow_erotic`
+ `network_allow_erotic`,
+ `network_media_size`,
+ `network_media_output`
FROM
- `{?_MYSQL_PREFIX?}_network_types_config`
+ `{?_MYSQL_PREFIX?}_network_handler_config`
WHERE
`network_id`=%s AND
`network_type_id`=%s
$content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms');
// Load template
- loadTemplate($templateName, false, $content);
+ loadTemplate($templateName, FALSE, $content);
// Abort here
return;
`network_data_id`,
`network_max_reload_time`,
`network_min_waiting_time`,
+ `network_max_waiting_time`,
+ `network_min_remain_budget`,
`network_min_remain_clicks`,
`network_min_payment`,
- `network_allow_erotic`
+ `network_allow_erotic`,
+ `network_media_size`,
+ `network_media_output`
FROM
- `{?_MYSQL_PREFIX?}_network_types_config`
+ `{?_MYSQL_PREFIX?}_network_handler_config`
WHERE
`network_id`=%s AND
`network_type_id`=%s
$content = merge_array($content, SQL_FETCHARRAY($result_config));
// Add it with extra template
- $content['network_type_config_content'] = loadTemplate('admin_show_config_network_type', true, $content);
+ $content['network_type_config_content'] = loadTemplate('admin_show_config_network_type', TRUE, $content);
} else {
// No configuration found, so display form
- $content['network_type_config_content'] = loadTemplate('admin_add_config_network_type', true, $content);
+ $content['network_type_config_content'] = loadTemplate('admin_add_config_network_type', TRUE, $content);
}
// Free result
SQL_FREERESULT($result_config);
// Load row template
- $OUT .= loadTemplate('admin_config_network_types_row', true, $content);
+ $OUT .= loadTemplate('admin_config_network_types_row', TRUE, $content);
} // END - while
// Prepare array for main template
);
// Load main template
- loadTemplate('admin_config_network_types', false, $content);
+ loadTemplate('admin_config_network_types', FALSE, $content);
} else {
// No entries found
displayMessage('{%message,ADMIN_CONFIG_NETWORK_HANDLER_TYPES_404=' . bigintval(getRequestElement('network_id')) . '%}');
SQL_FREERESULT($result);
} else {
// Generate network list for this script
- outputHtml(generateAdminNetworkList());
+ $OUT = generateAdminNetworkList(FALSE, TRUE, FALSE);
+
+ // Is it not empty?
+ if (!empty($OUT)) {
+ // Output it
+ outputHtml($OUT);
+ } else {
+ // Nothing configured yet
+ displayMessage('{--ADMIN_NETWORK_QUERY_API_404--}');
+ }
}
// [EOF]