X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_network_types.php;h=7e745eb360b9f257ccf805e8160fabbf9fbf15cf;hb=22f132c8d6314f76c69dff58ec0dac21f5ca3bf2;hp=14b05c6c6d90833a23801d25bbf03c4da7f90d44;hpb=65ed873eefdacdcea3331773b6458a06a5adff82;p=mailer.git diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index 14b05c6c6d..7e745eb360 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,13 +51,25 @@ if (doVerifyExpertSettings() != 'agreed') { return; } // END - if +// 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')) { +if (isGetRequestParameterSet('network')) { // Get its data for template - $networkData = getNetworkDataById(getRequestElement('network')); + $networkData = getNetworkDataById(getRequestParameter('network')); + + // Init disabled list + $GLOBALS['network_types_disabled'] = array(); // Load all advert types for given network $result = SQL_QUERY_ESC("SELECT @@ -67,32 +80,25 @@ WHERE `network_id`=%s ORDER BY `network_type_handle` ASC", - array(getRequestElement('network')), __FILE__, __LINE__); + array(getRequestParameter('network')), __FILE__, __LINE__); // Do we have entries? - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // List all entries - $OUT = ''; $SW = 2; + $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { // Add/translate some data - $row['sw'] = $SW; - if (trim($row['network_type_banner_url']) == '') $row['network_type_banner_url'] = '---'; + $row['network_type_banner_url'] = fixNullEmptyToDashes($row['network_type_banner_url'], 3); + + // Set disabled entry + $GLOBALS['network_types_disabled'][$row['network_type_handle']] = true; // Add row template and switch color $OUT .= loadTemplate('admin_list_network_types_row', true, $row); - $SW = 3 - $SW; } // END - while - // Prepare data for template - $content = array( - 'rows' => $OUT, - 'network_id' => getRequestElement('network_id'), - 'network_title' => $networkData['network_title'], - 'network_reflink' => $networkData['network_reflink'], - ); - // Load main template - loadTemplate('admin_list_network_types', false, $content); + loadTemplate('admin_list_network_types', false, $OUT); } else { // No entries found loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_404', $networkData['network_title']));