Changeset 279 for branches/web/UFinance.pas
- Timestamp:
- Mar 5, 2010, 8:52:50 PM (15 years ago)
- Location:
- branches/web
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/web
- Property svn:ignore
-
old new 3 3 *.o 4 4 backup 5 6 5 index.cgi 7 8 6 index.compiled 9 10 7 UConfig.pas 8 bin
-
- Property svn:ignore
-
branches/web/UFinance.pas
r135 r279 25 25 Notice: string; 26 26 Inet: Boolean; 27 procedure LoadFromDbRecord(DbRow: TAssoc Array);27 procedure LoadFromDbRecord(DbRow: TAssociativeArray); 28 28 function FullName: string; 29 29 end; … … 39 39 PriceUnits: Double; 40 40 SpeedFactor: Double; 41 procedure LoadFromDbRecord(DbRow: TAssoc Array);41 procedure LoadFromDbRecord(DbRow: TAssociativeArray); 42 42 function Agregation: Double; 43 43 end; … … 68 68 implementation 69 69 70 uses71 pwmain;72 73 70 { TMember } 74 71 75 procedure TMember.LoadFromDbRecord(DbRow: TAssoc Array);72 procedure TMember.LoadFromDbRecord(DbRow: TAssociativeArray); 76 73 begin 77 74 Id := StrToInt(DbRow.Values['id']); … … 85 82 InetTariffNow := StrToInt(DbRow.Values['inet_tarif_now']); 86 83 InetTariffNext := StrToInt(DbRow.Values['inet_tarif_next']); 87 MembershipDate := MysqlDateToDateTime(DbRow.Values['membership_date']);84 //MembershipDate := MysqlDateToDateTime(DbRow.Values['membership_date']); 88 85 Hardware := StrToBool(DbRow.Values['hw']); 89 86 Overheads := StrToBool(DbRow.Values['overheads']); … … 99 96 { TTariff } 100 97 101 procedure TTariff.LoadFromDbRecord(DbRow: TAssoc Array);98 procedure TTariff.LoadFromDbRecord(DbRow: TAssociativeArray); 102 99 begin 103 100 Name := DbRow.Values['name']; … … 144 141 BaseTariffPrice := StrToInt(DbRows[0].Values['BaseTariffPrice']); 145 142 DbRows.Free; 146 WebWriteLn('1');143 // WebWriteLn('1'); 147 144 148 145 DbRows := Database.Query('SELECT COUNT(*) FROM users WHERE inet=1 AND role=2'); … … 154 151 InternetSegmentId := 21; 155 152 DbRows.Free; 156 WebWriteLn('2');153 // WebWriteLn('2'); 157 154 158 155 DbRows := Database.Query('SELECT SUM(consumption) FROM network_segments'); … … 165 162 TotalPaid := StrToInt(DbRows[0].Values['real']); 166 163 167 WebWriteLn('3');164 // WebWriteLn('3'); 168 165 LoadTariffs(0); 169 166 end; … … 199 196 TariffList.Add(NewTariff); 200 197 end; 201 WebWriteLn('4');198 // WebWriteLn('4'); 202 199 203 200 if Period = 0 then Column := 'now' else Column := 'next'; … … 209 206 with TTariff(TariffList[I]) do 210 207 begin 211 WebWriteLn('5');208 // WebWriteLn('5'); 212 209 DbRows := Database.Select('users', 'COUNT(*)', 'inet_tarif_' + Column + '=' + IntToStr(I) + ' AND inet=1 AND role=2'); 213 210 UserCount := StrToInt(DbRows[0].ValuesAtIndex[0]); … … 237 234 SpeedPerUnit := ResidualSpeed * 1024 / TotalTarifSpeedUnits; 238 235 239 WebWriteLn('7');236 //WebWriteLn('7'); 240 237 // Recalculate price 241 238 for I := 0 to TariffList.Count - 1 do
Note:
See TracChangeset
for help on using the changeset viewer.