Subversion Repositories personal-webbase

Rev

Rev 14 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14 Rev 15
1
<?php
1
<?php
2
 
2
 
3
if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
3
if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
4
 
4
 
5
  echo $header;
5
  echo $header;
6
 
6
 
7
    if ($modulueberschrift == '') $modulueberschrift = $modul;
7
    if ($modulueberschrift == '') $modulueberschrift = $modul;
8
    echo '<h1>'.my_htmlentities($modulueberschrift).'</h1>';
8
    echo '<h1>'.my_htmlentities($modulueberschrift).'</h1>';
9
    echo 'Hier sind alle Benutzer aufgelistet.<br><br>';
9
    echo 'Hier sind alle Benutzer aufgelistet.<br><br>';
10
 
10
 
11
    gfx_begintable();
11
    wb_draw_table_begin();
12
    gfx_tablecontent('', '<b>Benutzername</b>', '', '<b>E-Mail-Adresse</b>', '100', '<b>Datens&auml;tze</b>', '100', '<b>Ordner</b>', '100', '<b>Aktionen</b>', '100', '', '100', '');
12
    wb_draw_table_content('', '<b>Benutzername</b>', '', '<b>E-Mail-Adresse</b>', '100', '<b>Datens&auml;tze</b>', '100', '<b>Ordner</b>', '100', '<b>Aktionen</b>', '100', '', '100', '');
13
 
13
 
14
    $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."users` ORDER BY `id`");
14
    $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."users` ORDER BY `id`");
15
    $eintrag = false;
15
    $eintrag = false;
16
    while ($row = db_fetch($res))
16
    while ($row = db_fetch($res))
17
    {
17
    {
18
      if (($konfiguration['main_gastzugang']['enable_gast'] == '1') && ($row['username'] == $konfiguration['main_gastzugang']['gast_username']) && ($row['passwort'] == md5($konfiguration['main_gastzugang']['gast_passwort']))) // TODO: use sha3 hash, salted and peppered
18
      if (($konfiguration['main_gastzugang']['enable_gast'] == '1') && ($row['username'] == $konfiguration['main_gastzugang']['gast_username']) && ($row['passwort'] == md5($konfiguration['main_gastzugang']['gast_passwort']))) // TODO: use sha3 hash, salted and peppered
19
        $status = ' (Gast)';
19
        $status = ' (Gast)';
20
      else
20
      else
21
        $status = '';
21
        $status = '';
22
      if ($row['gesperrt'])
22
      if ($row['gesperrt'])
23
        $sperr = 'Entsperren';
23
        $sperr = 'Entsperren';
24
      else
24
      else
25
        $sperr = 'Sperren';
25
        $sperr = 'Sperren';
26
 
26
 
27
      $count_ds = 0;
27
      $count_ds = 0;
28
          $count_o = 0;
28
          $count_o = 0;
29
 
29
 
30
          foreach ($tabellen as $m1 => $m2)
30
          foreach ($tabellen as $m1 => $m2)
31
          {
31
          {
32
        if (isset($datenbanktabellen[$mysql_zugangsdaten['praefix'].$m2]['user']))
32
        if (isset($datenbanktabellen[$mysql_zugangsdaten['praefix'].$m2]['user']))
33
        {
33
        {
34
              $res2 = db_query("SELECT COUNT(`id`) AS `cid` FROM `".$mysql_zugangsdaten['praefix']."$m2` WHERE `user` = '".$row['id']."'");
34
              $res2 = db_query("SELECT COUNT(`id`) AS `cid` FROM `".$mysql_zugangsdaten['praefix']."$m2` WHERE `user` = '".$row['id']."'");
35
              $row2 = db_fetch($res2);
35
              $row2 = db_fetch($res2);
36
              if ($m2 == 'ordner')
36
              if ($m2 == 'ordner')
37
                $count_o += $row2['cid'];
37
                $count_o += $row2['cid'];
38
              else
38
              else
39
                    $count_ds += $row2['cid'];
39
                    $count_ds += $row2['cid'];
40
                }
40
                }
41
          }
41
          }
42
 
42
 
43
          unset($m1);
43
          unset($m1);
44
          unset($m2);
44
          unset($m2);
45
 
45
 
46
          if ($row['email'] != '')
46
          if ($row['email'] != '')
47
            $maila = '<a href="mailto:'.$row['email'].'" class="menu">'.$row['email'].'</a>';
47
            $maila = '<a href="mailto:'.$row['email'].'" class="menu">'.$row['email'].'</a>';
48
          else
48
          else
49
            $maila = 'Unbekannt';
49
            $maila = 'Unbekannt';
50
 
50
 
51
      gfx_tablecontent('', $row['username'].$status, '', $maila, '', $count_ds , '', $count_o, '', '<a href="'.$_SERVER['PHP_SELF'].'?modul='.urlencode($modul).'&amp;seite=kraftsetzung&amp;aktion=lock&amp;id='.urlencode($row['id']).'" class="menu">'.$sperr.'</a>', '', '<a href="'.$_SERVER['PHP_SELF'].'?modul='.urlencode($modul).'&amp;seite=edit&amp;id='.urlencode($row['id']).'" class="menu">Bearbeiten</a>', '', '<a href="javascript:abfrage(\''.$_SERVER['PHP_SELF'].'?modul='.urlencode($modul).'&amp;seite=kraftsetzung&amp;aktion=del&amp;id='.urlencode($row['id']).'\');" class="menu">L&ouml;schen</a>');
51
      wb_draw_table_content('', $row['username'].$status, '', $maila, '', $count_ds , '', $count_o, '', '<a href="'.$_SERVER['PHP_SELF'].'?modul='.urlencode($modul).'&amp;seite=kraftsetzung&amp;aktion=lock&amp;id='.urlencode($row['id']).'" class="menu">'.$sperr.'</a>', '', '<a href="'.$_SERVER['PHP_SELF'].'?modul='.urlencode($modul).'&amp;seite=edit&amp;id='.urlencode($row['id']).'" class="menu">Bearbeiten</a>', '', '<a href="javascript:abfrage(\''.$_SERVER['PHP_SELF'].'?modul='.urlencode($modul).'&amp;seite=kraftsetzung&amp;aktion=del&amp;id='.urlencode($row['id']).'\');" class="menu">L&ouml;schen</a>');
52
 
52
 
53
      $eintrag = true;
53
      $eintrag = true;
54
    }
54
    }
55
 
55
 
56
    if (!$eintrag)
56
    if (!$eintrag)
57
      gfx_tablecontent('', 'Keine Benutzer vorhanden!', '', '', '', '', '', '', '', '', '', '', '', '');
57
      wb_draw_table_content('', 'Keine Benutzer vorhanden!', '', '', '', '', '', '', '', '', '', '', '', '');
58
    gfx_endtable();
58
    wb_draw_table_end();
59
 
59
 
60
    echo $footer;
60
    echo $footer;
61
 
61
 
62
?>
62
?>
63
 
63