'.__('Module management').' » '. __('Component group management').''; if ($create) { $name = (string) get_parameter ('name'); $parent = (int) get_parameter ('parent'); $result = process_sql_insert ('tnetwork_component_group', array ('name' => $name, 'parent' => $parent)); print_result_message ($result, __('Successfully created'), __('Could not be created')); } if ($update) { $id = (int) get_parameter ('id_sg'); $name = (string) get_parameter ('name'); $parent = (int) get_parameter ('parent'); $result = process_sql_update ('tnetwork_component_group', array ('name' => $name, 'parent' => $parent), array ('id_sg' => $id)); print_result_message ($result, __('Successfully updated'), __('Not updated. Error updating data')); } if ($delete) { // if delete $id = (int) get_parameter ('id_sg'); $result = process_sql_delete ('tnetwork_component_group', array ('id_sg' => $id)); print_result_message ($result, __('Successfully deleted'), __('Not deleted. Error deleting data')); } $table->width = '90%'; $table->head = array (); $table->head[0] = __('Name'); $table->head[1] = __('Parent'); $table->head[2] = __('Delete'); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->align = array (); $table->align[2] = 'center'; $table->data = array (); $groups = get_db_all_rows_filter ('tnetwork_component_group', array ('order' => 'parent')); if ($groups === false) $groups = array (); foreach ($groups as $group) { $data = array (); $data[0] = ''.$group["name"].''; $data[1] = get_network_component_group_name ($group["parent"]); $data[2] = ' '; array_push ($table->data, $data); } print_table ($table); echo '
'; ?>