+ if (check_value('show_inactive')) {
+ if (isset($_POST['LInact'][$id]) && (get_post('_Inactive'.$id.'_update') ||
+ get_post('Update')) && (check_value('Inactive'.$id) != $value)) {
+ update_record_status($id, !$value, $table, $key);
+ }
+ echo '<td align="center">'. checkbox(null, $name, $value, true, '', "align='center'")
+ . hidden("LInact[$id]", $value, false) . '</td>';
+ }
+}
+//
+// Displays controls for optional display of inactive records
+//
+function inactive_control_row($th) {
+ echo "<tr><td colspan=".(count($th)).">"
+ ."<div style='float:left;'>"
+ . checkbox(null, 'show_inactive', null, true). _("Show also Inactive")
+ ."</div><div style='float:right;'>"
+ . submit('Update', _('Update'), false, '', null)
+ ."</div></td></tr>";
+}
+//
+// Inserts additional column header when display of inactive records is on.
+//
+function inactive_control_column(&$th) {
+ global $Ajax;
+
+ if (check_value('show_inactive'))
+ array_insert($th, count($th)-2 , _("Inactive"));
+ if (get_post('_show_inactive_update')) {
+ $Ajax->activate('_page_body');
+ }
+}