File: ui.php

package info (click to toggle)
pgsnap 0.4.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 772 kB
  • ctags: 375
  • sloc: php: 4,674; makefile: 34; sh: 2
file content (37 lines) | stat: -rw-r--r-- 745 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php

function tr($namespace = '') {
  global $odd;

  $odd = !$odd;

  if (strlen($namespace) > 0) {
    if (!strcmp($namespace, 'information_schema')
      || !strcmp($namespace, 'pg_catalog')
      || !strcmp(substr($namespace, 0, 8), 'pg_toast')) {
      $class = 'sys';
    } else {
      $class = 'usr';
    }
  }
  else $class = '';
  if ($odd) {
    if (strlen($class) > 0) {
      $class .= '_';
    }
    $class .= 'odd';
  }

  $tr = '<tr class="'.$class.'">';

  return $tr;
}

function add_sys_and_user_checkboxes() {
  global $buffer;

  $buffer .= '<label><input id ="showusrobjects" type="checkbox" checked>Show User Objects</label>
<label><input id ="showsysobjects" type="checkbox" checked>Show System Objects</label>';
}

?>