Subversion Repositories personal-webbase

Rev

Rev 14 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
  4.  
  5.   echo $header;
  6.  
  7.     if ($modulueberschrift == '') $modulueberschrift = $modul;
  8.     echo '<h1>'.my_htmlentities($modulueberschrift).'</h1>';
  9.     echo 'Hier sind alle Benutzer aufgelistet.<br><br>';
  10.  
  11.     wb_draw_table_begin();
  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.  
  14.     $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."users` ORDER BY `id`");
  15.     $eintrag = false;
  16.     while ($row = db_fetch($res))
  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
  19.         $status = ' (Gast)';
  20.       else
  21.         $status = '';
  22.       if ($row['gesperrt'])
  23.         $sperr = 'Entsperren';
  24.       else
  25.         $sperr = 'Sperren';
  26.  
  27.       $count_ds = 0;
  28.           $count_o = 0;
  29.  
  30.           foreach ($tabellen as $m1 => $m2)
  31.           {
  32.         if (isset($datenbanktabellen[$mysql_zugangsdaten['praefix'].$m2]['user']))
  33.         {
  34.               $res2 = db_query("SELECT COUNT(`id`) AS `cid` FROM `".$mysql_zugangsdaten['praefix']."$m2` WHERE `user` = '".$row['id']."'");
  35.               $row2 = db_fetch($res2);
  36.               if ($m2 == 'ordner')
  37.                 $count_o += $row2['cid'];
  38.               else
  39.                     $count_ds += $row2['cid'];
  40.                 }
  41.           }
  42.  
  43.           unset($m1);
  44.           unset($m2);
  45.  
  46.           if ($row['email'] != '')
  47.             $maila = '<a href="mailto:'.$row['email'].'" class="menu">'.$row['email'].'</a>';
  48.           else
  49.             $maila = 'Unbekannt';
  50.  
  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.  
  53.       $eintrag = true;
  54.     }
  55.  
  56.     if (!$eintrag)
  57.       wb_draw_table_content('', 'Keine Benutzer vorhanden!', '', '', '', '', '', '', '', '', '', '', '', '');
  58.     wb_draw_table_end();
  59.  
  60.     echo $footer;
  61.  
  62. ?>
  63.