Subversion Repositories personal-webbase

Rev

Blame | 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.                
  8.                 echo '<h1>'.htmlentities($module_information->caption).'</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 `".$WBConfig->getMySQLPrefix()."users` ORDER BY `id`");
  15.                 $eintrag = false;
  16.                 while ($row = db_fetch($res))
  17.                 {
  18.                         if (($configuration['main_guest_login']['enable_gast'] == '1') && ($row['username'] == $configuration['main_guest_login']['gast_username']) && ($row['password'] == md5($configuration['main_guest_login']['gast_password'])))
  19.                                 $status = ' (Gast)';
  20.                         else
  21.                                 $status = '';
  22.                         if ($row['banned'])
  23.                                 $sperr = 'Entsperren';
  24.                         else
  25.                                 $sperr = 'Sperren';
  26.  
  27.                         $count_ds = 0;
  28.                         $count_o = 0;
  29.  
  30.                         foreach ($tables_modules as $m1 => $m2)
  31.                         {
  32.                                 if (isset($tables_database[$m1]['user_cnid']))
  33.                                 {
  34.                                         $res2 = db_query("SELECT COUNT(`id`) AS `cid` FROM `$m1` WHERE `user_cnid` = '".$row['id']."'");
  35.                                         $row2 = db_fetch($res2);
  36.                                         if ($m2 == 'folders')
  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='.$modul.'&amp;seite=operate&amp;aktion=lock&amp;id='.$row['id'].'" class="menu">'.$sperr.'</a>', '', '<a href="'.$_SERVER['PHP_SELF'].'?modul='.$modul.'&amp;seite=edit&amp;id='.$row['id'].'" class="menu">Bearbeiten</a>', '', '<a href="javascript:abfrage(\''.$_SERVER['PHP_SELF'].'?modul='.$modul.'&amp;seite=operate&amp;aktion=del&amp;id='.$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. ?>