Ignore:
Timestamp:
Jan 31, 2008, 8:38:47 PM (17 years ago)
Author:
george
Message:

Upraveno: Přepsán přístup k databázi přes třídu mysqli v systémové složce.
Odstraněno: Staré verze souborů a staré nepoužité soubory.

Location:
system
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • system

    • Property svn:ignore set to
      nohup.out
  • system/generators/traffic_shaping.php

    r7 r37  
    33$Enabled = 1;
    44$ClassesEnabled = 1;
    5 include('global.php');
    6 include_once('../../html/is/db.php');
    7 DB_Init('localhost', 'root', '', 'is');
    8 DB_Query('SET NAMES latin2');
    9 
     5include_once('../../html/global.php');
    106include_once('../../html/finance/include.php');
    117NactiMesicniParametry(0);
     
    5147  {
    5248    fputs($File, "tc qdisc add dev imq0 root handle 1:0 htb default 2\n");
    53     fputs($FileClassInfo, "1:1 Základní tøída\n");
     49    fputs($FileClassInfo, "1:1 Z�ladn�t�a\n");
    5450    fputs($File, "tc class add dev imq0 parent 1:0 classid 1:1 htb rate ".$TotalMaxSpeedIn."kbit quantum 1500\n");
    5551    fputs($FileClassInfo, "1:2 Internet zdarma\n");
     
    10298  fputs($File, "tc class add dev imq0 parent 1:1 classid 1:".$AllUsersClassId." htb rate ".$UsersMaxSpeedIn."kbit prio 1 quantum 1500\n");
    10399  fputs($File, "tc class add dev imq1 parent 1:1 classid 1:".$AllUsersClassId." htb rate ".$UsersMaxSpeedOut."kbit prio 1 quantum 1500\n");
    104   fputs($FileClassInfo, '1:'.$AllUsersClassId." V¹ichni u¾ivatelé\n");
     100  fputs($FileClassInfo, '1:'.$AllUsersClassId." Vichni uivatel�n");
    105101
    106102  // Torrent sharing
     
    121117  fputs($FileClassInfo, '1:'.$TorrentClassId." Torrent\n");
    122118
    123   DB_Select('users', '*, CONCAT(second_name, " ", first_name) as fullname', '(inet=1)');
    124   while($User = DB_Row())
     119  $DbResult = $Database->select('users', '*, CONCAT(second_name, " ", first_name) as fullname', '(inet=1)');
     120  while($User = $DbResult->fetch_array())
    125121  {
    126122    $UserClassId = $ClassId;
     
    132128    $Quantum = $Tarify[$User['inet_tarif_now']]['speed_factor'] * 1500;
    133129
    134     DB_Save();
    135130    fputs($File, "# === ".$User['fullname']." ===\n");
    136131    fputs($File, "tc class add dev imq0 parent 1:".$AllUsersClassId." classid 1:".$UserClassId." htb rate ".$SpeedIn."bit ceil ".$UserMaxSpeedIn."bit prio 1 quantum ".$Quantum."\n");
     
    144139    //echo('User class id: '.$UserClassId."\n");
    145140 
    146     DB_Select('hosts', 'COUNT(*)', "block=0 AND MAC!='' AND user=".$User['id']);
    147     $Row = DB_Row();
     141    $DbResult2 = $Database->select('hosts', 'COUNT(*)', "block=0 AND MAC!='' AND user=".$User['id']);
     142    $Row = $DbResult2->fetch_array();
    148143    $HostCount = $Row[0];
    149144    $HostSpeedIn = round($SpeedIn / $HostCount);
    150145    $HostSpeedOut = round($SpeedOut / $HostCount);
    151146 
    152     DB_Select('hosts','*',"block=0 AND MAC!='' AND user=".$User['id']);
    153     while($Host = DB_Row())
     147    $DbResult2 = $Database->select('hosts','*',"block=0 AND MAC!='' AND user=".$User['id']);
     148    while($Host = $DbResult2->fetch_array())
    154149    //if($Row['name'] != 'WOW')
    155150    {
     
    267262     
    268263    }
    269     DB_Load();
    270264  }
    271265  //echo($Row['id'].',');
Note: See TracChangeset for help on using the changeset viewer.