-
Notifications
You must be signed in to change notification settings - Fork 0
/
Param.pas
409 lines (396 loc) · 14.9 KB
/
Param.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
unit Param;
interface
uses inifiles, Windows, Classes, SysUtils;
procedure LoadDiskStructure(FileName: shortstring);
procedure WriteDiskStructure(FileName: shortstring);
procedure SetToNo(a,b: integer);
procedure ClearTempFiles;
procedure ChangeOS(Partition: integer);
function CheckIP(IP: string): boolean;
type Software = record
OS: shortstring;
OSType: shortstring;
Dev: shortstring;
DevType: shortstring;
Antivirus: shortstring;
AntivirusServer: shortstring;
AntivirusBases: shortstring;
Antispam: shortstring;
Firewall: shortstring;
Defragmenter: shortstring;
DiskOperator: shortstring;
Browser: shortstring;
FileManager: shortstring;
FileManagerRun: shortstring;
Benchmark: shortstring;
CopyCD: shortstring;
AudioGrabber: shortstring;
VideoEncoder: shortstring;
VideoSoft: shortstring;
GamesList:TStringList;
HackPrograms:TStringList;
end;
type Part = record
Labe1: shortstring;
FileSystem: shortstring;
Size: integer;
Free: integer;
Active: boolean;
Soft: software;
end;
var
rating:real=0;
money:real;
UserName:shortstring;
month:integer;
year:integer;
nastr:real;
day:integer;
hour:integer=0;
testk:integer=0;
nwsk:integer=0;
n:integer;
HardSpace:integer=0;
HardSpeed:integer=0;
Vozrast:integer;
l:integer=0;
Randomizer:integer=0;
RandomizerCount:integer;
DangerC:integer=0;
DangerCCount:integer=0;
dir:shortstring;
Antivcount:integer=0;
vklad,vkladp:integer;
fldown:boolean;
statusvalue:integer=0;
CD:integer=0;
ass:integer=0;
pas:integer=0;
cpp:integer=0;
bas:integer=0;
znania:integer=0;
Config:tinifile;
skin: Tinifile;
sFile: shortstring;
unixxak:integer=0;
winxak:integer=0;
cdr:integer=0;
progs:integer=0;
vlasti:integer=100;
dng:integer=0;
dm : TDEVMODE;
X: cardinal;
Y: cardinal;
Z: word;
hardprm:shortstring='';
chipset:shortstring='';
updatecount:integer=0;
updateprm:shortstring='';
scanning:integer=0;
printing:integer=0;
safety:integer=0;
inetspeed:integer=0;
nadeg:integer=0;
cpuspeed:integer=0;
cpuclock:integer=0;
cdspeed:integer=0;
videoclock:integer=0;
EndYear:integer;
videospeed:integer=0;
temperature:integer=0;
coolerspeed:integer=0;
cdrspeed:integer=0;
htt:integer=0;
lastwork:boolean=false;
zarpl:integer=0;
cpufsb:integer=0;
cpumnozh:integer=0;
cpupercent:integer=0;
cpuvolt:real=0;
ocpufsb:integer=0;
ocpumnozh:integer=0;
ocpuvolt:real=0;
videocore:integer=0;
videomem:integer=0;
videopercent:integer=0;
videochip:shortstring='';
Videomemory:integer=0;
ovideomem:integer=0;
ovideocore:integer=0;
dvd:boolean=false;
VideoChipset:shortstring='';
hardskidka:integer=0;
videoskidka:integer=0;
procskidka:integer=0;
shans:integer=0;
os:shortstring;
ozycapacity:integer=0;
dvdrspeed:integer=0;
dvdrwspeed:integer=0;
cdrwspeed:integer=0;
ramspeed:integer=0;
videoshina:shortstring='';
devtype:shortstring='';
spamk:integer=0;
AntivirusBases:shortstring='';
arest:integer=0;
GameSpeed:integer;
LastGame:shortstring='';
toshn:integer=0;
badcd:integer=0;
defragspeed:integer=0;
Credit:integer=0;
CreditPercent:integer=0;
CreditEnd:integer=0;
Peni:real=0;
DefragTime:integer;
Photo:shortstring='';
TransPercent:integer;
AntivirusServer:shortstring='';
FlatComfort:integer=0;
CarPrestige:integer=0;
FlatPay:integer=0;
MinTop:smallint=0;
Flat:shortstring='';
Car:shortstring='';
Comment:string='';
Hosting:integer=0;
VideoTemp:integer=0;
xDone:boolean=false;
StoMBfree:boolean=false;
InetTraffic:integer=0;
MonitorDiag:integer=0;
RamType:shortstring='';
a, b: integer;
Parts: array of array of Part;
GamesList:TStringList;
HackPrograms:TStringList;
ActivePartition: integer=0;
Buyers:TStringList;
IsStudy:boolean=false;
StudyProgress: integer=0;
SenderTag:integer=0;
MultiChrome:shortstring='';
SecondVideoCard:shortstring='';
DebugVersion:boolean=false;
ShowHelp:boolean=false;
Login:shortstring='';
Password:shortstring='';
RememberPassword:boolean=false; // Îñòàâëåíî äëÿ áóäóùèõ âîçìîæíîñòåé
Telefon: shortstring='';
YourIP: shortstring='';
ServerIP: shortstring='';
implementation
uses Main;
procedure LoadDiskStructure(FileName: shortstring);
var
DiskFile, SoftFile: Tinifile;
i,j: integer;
begin
Parts:=nil;
DiskFile:=Tinifile.Create(FileName);
setLength(Parts,DiskFile.ReadInteger('Common','Primary',1));
for i:=0 to Length(Parts)-1 do begin
setLength(Parts[i],DiskFile.ReadInteger('Primary '+IntToStr(i+1),'Logical',0)+1);
Parts[i][0].Labe1:=DiskFile.ReadString('Primary '+IntToStr(i+1),'Label','');
Parts[i][0].FileSystem:=DiskFile.ReadString('Primary '+IntToStr(i+1),'FileSystem','');
Parts[i][0].Size:=DiskFile.ReadInteger('Primary '+IntToStr(i+1),'Size',0);
Parts[i][0].Free:=DiskFile.ReadInteger('Primary '+IntToStr(i+1),'Free',0);
Parts[i][0].Active:=DiskFile.ReadBool('Primary '+IntToStr(i+1),'Active',False);
If Parts[i][0].Active then
ActivePartition:=i;
Parts[i][0].Soft.OS:=DiskFile.ReadString('Primary '+IntToStr(i+1),'OS','');
Parts[i][0].Soft.OSType:=DiskFile.ReadString('Primary '+IntToStr(i+1),'OSType','');
//=====Çàãðóçêà ñïèñêà èãð è õàêåðñêèõ ïðîãðàìì=====
Parts[i][0].Soft.GamesList:=TStringList.Create;
Parts[i][0].Soft.HackPrograms:=TStringList.Create;
If FileExists(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.gl') then
Parts[i][0].Soft.GamesList.LoadFromFile(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.gl')
else
Parts[i][0].Soft.GamesList.Clear;
If FileExists(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.hl') then
Parts[i][0].Soft.HackPrograms.LoadFromFile(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.hl')
else
Parts[i][0].Soft.HackPrograms.Clear;
//=====Çàãðóçêà âñåãî îñòàëüíîãî ñîôòà=====
SoftFile:=Tinifile.Create(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.swl');
Parts[i,0].Soft.Antivirus:=SoftFile.ReadString('Software','Antivirus','Íåò');
Parts[i,0].Soft.Dev:=SoftFile.ReadString('Software','IDE','Íåò');
Parts[i,0].Soft.DevType:=SoftFile.ReadString('Software','IDEType','');
Parts[i,0].Soft.FileManager:=SoftFile.ReadString('Software','FileManager','Íåò');
Parts[i,0].Soft.FileManagerRun:=SoftFile.ReadString('Software','FileManagerRun','Íåò');
Parts[i,0].Soft.Firewall:=SoftFile.ReadString('Software','Firewall','Íåò');
Parts[i,0].Soft.Defragmenter:=SoftFile.ReadString('Software','Defragmenter','Íåò');
Parts[i,0].Soft.DiskOperator:=SoftFile.ReadString('Software','DiskOperator','Íåò');
Parts[i,0].Soft.CopyCD:=SoftFile.ReadString('Software','CDCopying','Íåò');
Parts[i,0].Soft.VideoEncoder:=SoftFile.ReadString('Software','VideoEncoder','Íåò');
Parts[i,0].Soft.AudioGrabber:=SoftFile.ReadString('Software','AudioGrabber','Íåò');
Parts[i,0].Soft.VideoSoft:=SoftFile.ReadString('Software','VideoOverclockSoft','Íåò');
Parts[i,0].Soft.Antispam:=SoftFile.ReadString('Software','Antispam','Íåò');
Parts[i,0].Soft.Browser:=SoftFile.ReadString('Software','Browser','Íåò');
Parts[i,0].Soft.Benchmark:=SoftFile.ReadString('Software','Benchmark','Íåò');
for j:=1 to DiskFile.ReadInteger('Primary '+IntToStr(i+1),'Logical',0) do begin
Parts[i][j].Labe1:=DiskFile.ReadString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Label','');
Parts[i][j].FileSystem:=DiskFile.ReadString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'FileSystem','');
Parts[i][j].Size:=DiskFile.ReadInteger('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Size',0);
Parts[i][j].Free:=DiskFile.ReadInteger('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Free',0);
Parts[i][j].Active:=DiskFile.ReadBool('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Active',False);
Parts[i][j].Soft.OS:=DiskFile.ReadString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'OS','');
Parts[i][j].Soft.OSType:=DiskFile.ReadString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'OSType','');
end;
end;
MainForm.Label30.Caption:=Parts[ActivePartition,0].Soft.OS;
os:=Parts[ActivePartition][0].Soft.OSType;
GamesList:=Parts[ActivePartition][0].Soft.GamesList;
HackPrograms:=Parts[ActivePartition][0].Soft.HackPrograms;
MainForm.Label31.Caption:=Parts[ActivePartition,0].Soft.Antivirus;
MainForm.Label32.Caption:=Parts[ActivePartition,0].Soft.Dev;
DevType:=Parts[ActivePartition,0].Soft.DevType;
MainForm.Label48.Caption:=Parts[ActivePartition,0].Soft.FileManager;
MainForm.Label51.Caption:=Parts[ActivePartition,0].Soft.Firewall;
MainForm.Label53.Caption:=Parts[ActivePartition,0].Soft.Defragmenter;
MainForm.Label54.Caption:=Parts[ActivePartition,0].Soft.DiskOperator;
MainForm.Label56.Caption:=Parts[ActivePartition,0].Soft.CopyCD;
MainForm.Label57.Caption:=Parts[ActivePartition,0].Soft.VideoEncoder;
MainForm.Label58.Caption:=Parts[ActivePartition,0].Soft.AudioGrabber;
MainForm.Label109.Caption:=Parts[ActivePartition,0].Soft.VideoSoft;
MainForm.Label123.Caption:=Parts[ActivePartition,0].Soft.Antispam;
MainForm.Label131.Caption:=Parts[ActivePartition,0].Soft.Browser;
MainForm.Label133.Caption:=Parts[ActivePartition,0].Soft.Benchmark;
end;
procedure WriteDiskStructure(FileName: shortstring);
var
DiskFile, SoftFile: Tinifile;
i,j: integer;
begin
DiskFile:=Tinifile.Create(FileName);
for i:=0 to Length(Parts)-1 do begin
DiskFile.WriteInteger('Common','Primary',Length(Parts));
DiskFile.WriteInteger('Primary '+IntToStr(i+1),'Logical',Length(Parts[i])-1);
DiskFile.WriteString('Primary '+IntToStr(i+1),'Label',Parts[i][0].Labe1);
DiskFile.WriteString('Primary '+IntToStr(i+1),'FileSystem',Parts[i][0].FileSystem);
DiskFile.WriteInteger('Primary '+IntToStr(i+1),'Size',Parts[i][0].Size);
DiskFile.WriteInteger('Primary '+IntToStr(i+1),'Free',Parts[i][0].Free);
DiskFile.WriteBool('Primary '+IntToStr(i+1),'Active',Parts[i][0].Active);
DiskFile.WriteString('Primary '+IntToStr(i+1),'OS',Parts[i][0].Soft.OS);
DiskFile.WriteString('Primary '+IntToStr(i+1),'OSType',Parts[i][0].Soft.OSType);
//=====Çàãðóçêà ñïèñêà èãð è õàêåðñêèõ ïðîãðàìì=====
If Parts[i][0].Soft.GamesList<>nil then
Parts[i][0].Soft.GamesList.SaveToFile(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.gl');
If Parts[i][0].Soft.HackPrograms<>nil then
Parts[i][0].Soft.HackPrograms.SaveToFile(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.hl');
//=====Çàãðóçêà âñåãî îñòàëüíîãî ñîôòà=====
SoftFile:=Tinifile.Create(ExtractFileDir(FileName)+'\Primary '+IntToStr(i+1)+'.swl');
SoftFile.WriteString('Software','Antivirus',Parts[i,0].Soft.Antivirus);
SoftFile.WriteString('Software','IDE',Parts[i,0].Soft.Dev);
SoftFile.WriteString('Software','IDEType',Parts[i,0].Soft.DevType);
SoftFile.WriteString('Software','FileManager',Parts[i,0].Soft.FileManager);
SoftFile.WriteString('Software','FileManagerRun',Parts[i,0].Soft.FileManagerRun);
SoftFile.WriteString('Software','Firewall',Parts[i,0].Soft.Firewall);
SoftFile.WriteString('Software','Defragmenter',Parts[i,0].Soft.Defragmenter);
SoftFile.WriteString('Software','DiskOperator',Parts[i,0].Soft.DiskOperator);
SoftFile.WriteString('Software','CDCopying',Parts[i,0].Soft.CopyCD);
SoftFile.WriteString('Software','VideoEncoder',Parts[i,0].Soft.VideoEncoder);
SoftFile.WriteString('Software','AudioGrabber',Parts[i,0].Soft.AudioGrabber);
SoftFile.WriteString('Software','VideoOverclockSoft',Parts[i,0].Soft.VideoSoft);
SoftFile.WriteString('Software','Antispam',Parts[i,0].Soft.Antispam);
SoftFile.WriteString('Software','Browser',Parts[i,0].Soft.Browser);
SoftFile.WriteString('Software','Benchmark',Parts[i,0].Soft.Benchmark);
for j:=1 to Length(Parts[i])-1 do begin
DiskFile.WriteString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Label',Parts[i][j].Labe1);
DiskFile.WriteString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'FileSystem',Parts[i][j].FileSystem);
DiskFile.WriteInteger('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Size',Parts[i][j].Size);
DiskFile.WriteInteger('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Free',Parts[i][j].Free);
DiskFile.WriteBool('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'Active',Parts[i][j].Active);
DiskFile.WriteString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'OS',Parts[i][j].Soft.OS);
DiskFile.WriteString('Primary '+IntToStr(i+1)+' - Logical '+IntToStr(j),'OSType',Parts[i][j].Soft.OSType);
end;
end;
end;
procedure SetToNo(a,b: integer);
begin
Parts[a,b].Soft.Antivirus:='Íåò';
Parts[a,b].Soft.Dev:='Íåò';
Parts[a,b].Soft.FileManager:='Íåò';
Parts[a,b].Soft.FileManagerRun:='Íåò';
Parts[a,b].Soft.Firewall:='Íåò';
Parts[a,b].Soft.Defragmenter:='Íåò';
Parts[a,b].Soft.DiskOperator:='Íåò';
Parts[a,b].Soft.CopyCD:='Íåò';
Parts[a,b].Soft.VideoEncoder:='Íåò';
Parts[a,b].Soft.AudioGrabber:='Íåò';
Parts[a,b].Soft.VideoSoft:='Íåò';
Parts[a,b].Soft.Antispam:='Íåò';
Parts[a,b].Soft.Browser:='Íåò';
Parts[a,b].Soft.Benchmark:='Íåò';
end;
procedure ClearTempFiles;
var
SearchResult: integer;
TempFile: TSearchRec;
FileToDelete: file;
begin
SearchResult:=FindFirst(dir+'\Temp\*.*', faAnyFile, TempFile);
while SearchResult=0 do begin
If (TempFile.Name<>'.') and (TempFile.Name<>'..') then begin
try
assignfile(FileToDelete,dir+'\Temp\'+TempFile.Name);
Erase(FileToDelete);
except
on EInOutError do ;
end;
end;
SearchResult:=FindNext(TempFile);
end;
FindClose(TempFile);
end;
procedure ChangeOS(Partition: integer);
begin
os:=Parts[Partition,0].Soft.OSType;
devtype:=Parts[Partition,0].Soft.DevType;
with MainForm do begin
Label30.Caption:=Parts[Partition,0].Soft.OS;
Label31.Caption:=Parts[Partition,0].Soft.Antivirus;
Label32.Caption:=Parts[Partition,0].Soft.Dev;
Label48.Caption:=Parts[Partition,0].Soft.FileManager;
Label51.Caption:=Parts[Partition,0].Soft.Firewall;
Label53.Caption:=Parts[Partition,0].Soft.Defragmenter;
Label54.Caption:=Parts[Partition,0].Soft.DiskOperator;
Label56.Caption:=Parts[Partition,0].Soft.CopyCD;
Label57.Caption:=Parts[Partition,0].Soft.VideoEncoder;
Label58.Caption:=Parts[Partition,0].Soft.AudioGrabber;
Label109.Caption:=Parts[Partition,0].Soft.VideoSoft;
Label123.Caption:=Parts[Partition,0].Soft.Antispam;
Label131.Caption:=Parts[Partition,0].Soft.Browser;
Label133.Caption:=Parts[Partition,0].Soft.Benchmark;
end;
HackPrograms:=Parts[Partition,0].Soft.HackPrograms;
GamesList:=Parts[Partition,0].Soft.GamesList;
end;
function CheckIP(IP: string): boolean;
var
i, pc: integer;
s: string;
begin
pc:=0; s:=IP+'.';
if IP[1] in ['1'..'9'] then begin
for i:=1 to Length(IP)-1 do
if (IP[i]='.') and (IP[i-1] in ['0'..'9']) and (IP[i+1] in ['0'..'9']) then inc(pc);
if pc=3 then begin
while pos('.',s)<>0 do
if (copy(s,1,pos('.',s)-1)='255') or (copy(s,1,pos('.',s)-1)='0') then
break
else
s:=copy(s,pos('.',s)+1,255);
if s<>'' then
Result:=false
else
Result:=true;
end
else
Result:=false;
end
else
Result:=false;
end;
end.