X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_network_types.php;h=01800dc75f0468fdf1c42a404f61993d2b7f17ea;hp=a8c418d13f180bb0c5e6b153a542a1e60c14c689;hb=8ce32e702f3caa76b8d446902948e83e1e6854c8;hpb=56f65abf076605702654332aceb55d5c275d336f diff --git a/inc/modules/admin/what-config_network_types.php b/inc/modules/admin/what-config_network_types.php index a8c418d13f..01800dc75f 100644 --- a/inc/modules/admin/what-config_network_types.php +++ b/inc/modules/admin/what-config_network_types.php @@ -67,6 +67,7 @@ if (isGetRequestElementSet('network_id')) { `network_id`, `network_type_id`, `network_type_handle`, + `network_type_reload_time_unit`, NULL AS `network_data_id`, NULL AS `network_max_reload_time`, NULL AS `network_min_waiting_time`, @@ -93,7 +94,7 @@ LIMIT 1', $result_config = SQL_QUERY_ESC('SELECT `network_data_id`, `network_max_reload_time`, - `network_min_waiting_time` + `network_min_waiting_time`, `network_min_remain_clicks`, `network_min_payment`, `network_allow_erotic` @@ -108,20 +109,26 @@ LIMIT 1', bigintval($content['network_type_id']) ), __FUNCTION__, __LINE__); + // Use template for adding + $templateName = 'admin_add_config_network_type_form'; + // Do we also have configuration? if (SQL_NUMROWS($result_config) == 1) { // Load as well and merge it $content = merge_array($content, SQL_FETCHARRAY($result_config)); + + // Use template for editing + $templateName = 'admin_edit_config_network_type_form'; } // END - if // Free result SQL_FREERESULT($result_config); // "Translate" some values - $content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms'); + $content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms'); // Load template - loadTemplate('admin_add_config_network_type_form', false, $content); + loadTemplate($templateName, false, $content); // Abort here return; @@ -138,7 +145,8 @@ LIMIT 1', $result = SQL_QUERY_ESC('SELECT `network_id`, `network_type_id`, - `network_type_handle` + `network_type_handle`, + `network_type_reload_time_unit` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE @@ -178,10 +186,10 @@ LIMIT 1', // Do we have an entry? if (SQL_NUMROWS($result_config) == 1) { // Load this data as well - $contentConfig = SQL_FETCHARRAY($result_config); + $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, $contentConfig); + $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);