* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
// Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_must_register` SET `field_required`='%s' WHERE `id`=%s AND `field_required` != '%s' LIMIT 1",
array($value, bigintval($id), $value),__FILE__, __LINE__);
// Get affected rows
// Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_must_register` SET `field_required`='%s' WHERE `id`=%s AND `field_required` != '%s' LIMIT 1",
array($value, bigintval($id), $value),__FILE__, __LINE__);
// Get affected rows
-$result = SQL_QUERY("SELECT `id`, `field_name`, `field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC", __FILE__, __LINE__);
-$OUT = ''; $SW = 2;
+$result = SQL_QUERY("SELECT `id`,`field_name`,`field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC", __FILE__, __LINE__);
+$OUT = '';
- $content['sw'] = $SW;
- $content['selection'] = addSelectionBox('yn', $content['field_required'], "sel[".$content['id']."]");
+ $content['selection'] = addSelectionBox('yn', $content['field_required'], 'sel[' . $content['id'] . ']');
- $OUT .= "<tr>
- <td align=\"center\" class=\"switch_sw".$content['sw']." bottom right\">".$content['id']."</td>
- <td class=\"switch_sw".$content['sw']." bottom right\">".$content['field_name']."</td>
- <td align=\"center\" class=\"switch_sw".$content['sw']." bottom right\">
- ".$content['selection']."
- </td>
-</tr>\n";
-
- // Switch color
- $SW = 3 - $SW;
+ $OUT .= loadTemplate('admin_config_register_row', true, $content);