- list($code, $descr) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- // Prepare data, load row template and switch colors
- $content = array(
- 'id' => $id,
- 'code' => $code,
- 'descr' => $descr,
- 'sw' => $SW,
- );
- if ($post == "modify")
- {
- // Generate default selection in edit-mode
- $content['status'] = ADD_OPTION_LINES("/ARRAY/", array('Y', 'N'), array(YES, NO ), $status);
- }
- else
- {
- // Only display status when in delete-mode
- $content['status'] = TRANSLATE_YESNO($status);
- }
- $OUT .= LOAD_TEMPLATE($row, true, $content);
- $SW = 3 - $SW;
- }
- }
- define('__COUNTRY_ROWS' , $OUT);
- define('__COUNTRY_MODE' , $post);
- define('__COUNTRY_CLASS' , $class);
- define('__COUNTRY_SUBMIT', $submit);
- define('__COUNTRY_TITLE' , $title);
- define('__COUNTRY_RESET' , $reset);
+ $content = SQL_FETCHARRAY($result);
+
+ // Add $isActive
+ $content['is_active'] = $isActive;
+
+ // Insert row template and switch color
+ $OUT .= loadTemplate($row, true, $content);
+ } // END - if
+
+ // Free result
+ SQL_FREERESULT($result);
+ } // END - foreach
+
+ // Prepare content for template
+ $content = array(
+ 'rows' => $OUT,
+ 'do' => $do,
+ 'class' => $class,
+ 'title' => $title,
+ 'submit' => $submit,
+ 'reset' => $reset,
+ );