Ignore:
Timestamp:
Mar 5, 2010, 8:52:50 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Aktualizována třída TSqlDatabase.
  • Upraveno: Binární sestavené soubory se nyní vytváří v podsložce bin.
Location:
branches/web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/web

    • Property svn:ignore
      •  

        old new  
        33*.o
        44backup
        5 
        65index.cgi
        7 
        86index.compiled
        9 
        107UConfig.pas
         8bin
  • branches/web/UFinance.pas

    r135 r279  
    2525        Notice: string;
    2626        Inet: Boolean;
    27         procedure LoadFromDbRecord(DbRow: TAssocArray);
     27        procedure LoadFromDbRecord(DbRow: TAssociativeArray);
    2828        function FullName: string;
    2929  end;
     
    3939        PriceUnits: Double;
    4040        SpeedFactor: Double;
    41         procedure LoadFromDbRecord(DbRow: TAssocArray);
     41        procedure LoadFromDbRecord(DbRow: TAssociativeArray);
    4242        function Agregation: Double;
    4343  end;
     
    6868implementation
    6969
    70 uses 
    71   pwmain;
    72  
    7370{ TMember }
    7471
    75 procedure TMember.LoadFromDbRecord(DbRow: TAssocArray);
     72procedure TMember.LoadFromDbRecord(DbRow: TAssociativeArray);
    7673begin
    7774  Id := StrToInt(DbRow.Values['id']);
     
    8582  InetTariffNow := StrToInt(DbRow.Values['inet_tarif_now']);
    8683  InetTariffNext := StrToInt(DbRow.Values['inet_tarif_next']);
    87   MembershipDate := MysqlDateToDateTime(DbRow.Values['membership_date']);
     84  //MembershipDate := MysqlDateToDateTime(DbRow.Values['membership_date']);
    8885  Hardware := StrToBool(DbRow.Values['hw']);
    8986  Overheads := StrToBool(DbRow.Values['overheads']);
     
    9996{ TTariff }
    10097
    101 procedure TTariff.LoadFromDbRecord(DbRow: TAssocArray);
     98procedure TTariff.LoadFromDbRecord(DbRow: TAssociativeArray);
    10299begin
    103100  Name := DbRow.Values['name'];
     
    144141  BaseTariffPrice := StrToInt(DbRows[0].Values['BaseTariffPrice']);
    145142  DbRows.Free;
    146   WebWriteLn('1');
     143//  WebWriteLn('1');
    147144
    148145  DbRows := Database.Query('SELECT COUNT(*) FROM users WHERE inet=1 AND role=2');
     
    154151  InternetSegmentId := 21;
    155152  DbRows.Free;
    156   WebWriteLn('2');
     153//  WebWriteLn('2');
    157154 
    158155  DbRows := Database.Query('SELECT SUM(consumption) FROM network_segments');
     
    165162  TotalPaid := StrToInt(DbRows[0].Values['real']);
    166163 
    167   WebWriteLn('3');
     164//  WebWriteLn('3');
    168165  LoadTariffs(0);
    169166end;
     
    199196        TariffList.Add(NewTariff);
    200197  end;
    201   WebWriteLn('4');
     198//  WebWriteLn('4');
    202199 
    203200  if Period = 0 then Column := 'now' else Column := 'next';
     
    209206  with TTariff(TariffList[I]) do
    210207  begin
    211   WebWriteLn('5');
     208//  WebWriteLn('5');
    212209    DbRows := Database.Select('users', 'COUNT(*)', 'inet_tarif_' + Column + '=' + IntToStr(I) + ' AND inet=1 AND role=2');
    213210    UserCount := StrToInt(DbRows[0].ValuesAtIndex[0]);   
     
    237234  SpeedPerUnit := ResidualSpeed * 1024 / TotalTarifSpeedUnits;
    238235 
    239   WebWriteLn('7');
     236  //WebWriteLn('7');
    240237  // Recalculate price
    241238  for I := 0 to TariffList.Count - 1 do
Note: See TracChangeset for help on using the changeset viewer.