list_gefahr.php 2.02 KB
Newer Older
Gerd Schachtschneider's avatar
initial  
Gerd Schachtschneider committed
1
2
3
4
5
6
7
8
9
10
<?php

class tables_list_gefahr { 

  function block__before_fineprint() {
    $app    = Dataface_Application::getInstance();
    $fs_ver = $app->_conf['_own']['version'];
    $mailto = $app->_conf['_own']['mailto'];
    $mname  = $app->_conf['_own']['mailname'];
    $sql    = "SELECT MAX(version) FROM dataface__version";
11
    list($db_ver) = xf_db_fetch_row(xf_db_query($sql, df_db()));
Gerd Schachtschneider's avatar
initial  
Gerd Schachtschneider committed
12
13
14
15
16
17
18
19
20
21
    $db_ver = str_pad($db_ver, 4, 0, STR_PAD_LEFT);
    $fs_rep = str_replace('.','',$fs_ver);
    if ( $fs_rep == $db_ver )
      echo 'Version <span style="color: green">FS: '.$fs_ver.'</span> = <span style="color: green">DB: '.$db_ver.'</span> &copy;<a href="mailto:'.$mailto.'">'.$mname.'</a>';
  }

  function block__before_body() {
    $app    = Dataface_Application::getInstance();
    $fs_ver = $app->_conf['_own']['version'];
    $sql    = "SELECT MAX(version) FROM dataface__version";
22
    list($db_ver) = xf_db_fetch_row(xf_db_query($sql, df_db()));
Gerd Schachtschneider's avatar
initial  
Gerd Schachtschneider committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    $db_ver = str_pad($db_ver, 4, 0, STR_PAD_LEFT);
    $fs_rep = str_replace('.','',$fs_ver);
    if ( $fs_rep != $db_ver ) {
      if ( $fs_rep > $db_ver ) {
        echo 'Version <span style="color: green">FS: '.$fs_ver.'</span> &ne; <span style="color: red">DB: '.$db_ver.'</span>';
      } else {
        echo 'Version <span style="color: red">FS: '.$fs_ver.'</span> &ne; <span style="color: green">DB: '.$db_ver.'</span>';
      }
    }
  }

  // setze indiv. Farbe in listenansicht fuer tabelle
  function css__tableRowClass( &$record ) {
    $query = Dataface_Application::getInstance()->getQuery();
    $table = $query['-table'].' ';
    // return $table.'normal'; //mit color
    if ($record->val('anweisung') == '1') return $table.'lineY';
    return $table;
  }

  // Anzeige in liste aendern
  function lgk__renderCell(&$record) {
    return $record->val('lgk');
  }

Gerd Schachtschneider's avatar
Gerd Schachtschneider committed
48
49
  function valuelist__cmr() {
    return array(0=>'nein', 1=>'ja');
Gerd Schachtschneider's avatar
initial  
Gerd Schachtschneider committed
50
51
52
  }

  function valuelist__anweisung() {
Gerd Schachtschneider's avatar
Gerd Schachtschneider committed
53
    return array(0=>'nein', 1=>'ja');
Gerd Schachtschneider's avatar
initial  
Gerd Schachtschneider committed
54
55
  }

56
57
58
59
  function valuelist__substition() {
    return array(0=>'nein', 1=>'ja');
  }

Gerd Schachtschneider's avatar
initial  
Gerd Schachtschneider committed
60
61
62
}

?>