]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_network_data.php
Continued a bit:
[mailer.git] / inc / modules / admin / what-list_network_data.php
index 8a003b546df604d601d618aff923b5f036d57765..fd230286da32e712d4cb58f5012db6fd66f81816 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -62,7 +62,7 @@ if ($GLOBALS['network_display'] === FALSE) {
 } // END - if
 
 // Query for networks
-$result = SQL_QUERY('SELECT
+$result = sqlQuery('SELECT
        `network_id`,
        `network_short_name`,
        `network_title`,
@@ -72,19 +72,26 @@ $result = SQL_QUERY('SELECT
        `network_request_type`,
        `network_charset`,
        `network_require_id_card`,
-       `network_query_amount`
+       `network_query_amount`,
+       `network_active`
 FROM
        `{?_MYSQL_PREFIX?}_network_data`
 ORDER BY
        `network_short_name` ASC', __FILE__, __LINE__);
 
 // Are there entries?
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNumRows($result)) {
        // List all
        $OUT = '';
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Load row template
-               $OUT .= loadTemplate('admin_list_network_data_row', TRUE, $content);
+       while ($content = sqlFetchArray($result)) {
+               // Is the network still active?
+               if ($content['network_active'] == 'Y') {
+                       // Load row template
+                       $OUT .= loadTemplate('admin_list_network_data_row', TRUE, $content);
+               } else {
+                       // No more active
+                       $OUT .= loadTemplate('admin_list_network_data_inactive_row', TRUE, $content);
+               }
        } // END - while
 
        // Load main template
@@ -95,7 +102,7 @@ if (!SQL_HASZERONUMS($result)) {
 }
 
 // Free result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // Add form for adding new entry
 loadTemplate('admin_add_network');