-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInternet.pas
More file actions
315 lines (291 loc) · 8.92 KB
/
Internet.pas
File metadata and controls
315 lines (291 loc) · 8.92 KB
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
unit Internet;
interface
uses
Windows, Forms, SysUtils,
jpeg, param, inetwork, StdCtrls, Controls, Classes, ExtCtrls;
type
TInet = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Button4: TButton;
Image1: TImage;
Label4: TLabel;
Button5: TButton;
GroupBox3: TGroupBox;
Button3: TButton;
Edit3: TEdit;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
GroupBox4: TGroupBox;
Button10: TButton;
Button11: TButton;
Label2: TLabel;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
Label1: TLabel;
Label3: TLabel;
Label5: TLabel;
Label6: TLabel;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Inet: TInet;
inetwrk:tinetwrk;
implementation
uses Main, xk, Prate, EntWork, Browsing, UForm;
{$R *.dfm}
procedure TInet.Button3Click(Sender: TObject);
begin
Close;
end;
procedure TInet.Button1Click(Sender: TObject);
var
i,k,Cost,Result :integer;
s:shortstring;
Continue,Can :boolean;
Sites: TSearchRec;
begin
If InetTraffic>=1 then begin
k:=0;
Can:=true;
s:=copy(ComboBox1.Items.Strings[ComboBox1.ItemIndex],1,255);
If Edit1.Text='my' then
Application.MessageBox('Ýòî ìîé ñàéò, à íå âàø!','Ïîìîùü!',MB_ICONWARNING)
else
begin
Result:=FindFirst(dir+'\Sites\*', faDirectory, Sites);
while Result=0 do begin
if (Sites.Name<>'System') and (Sites.Name<>'.') and (Sites.Name<>'..') then
If Sites.Name=edit1.text+ComboBox1.Items.Strings[ComboBox1.ItemIndex] then begin
Application.MessageBox('Äàííîå èìÿ ñàéòà óæå èñïîëüçóåòñÿ!','Ïîìîùü!',MB_ICONSTOP);
Can:=false;
Break;
end;
Result:=FindNext(Sites);
end;
FindClose(Sites);
If can then begin
For i:=1 to length(s) do
If s[i]='.' then inc(k);
If K=1 then begin
Cost:=random(200)+100;
If Application.MessageBox(PChar('Ðàçìåùåíèå ñàéòà íà äàííîì õîñòèíãå áóäåò ñòîèòü '+IntToStr(Cost)+' ä.å. â ìåñÿö. Âû ñîãëàñíû?'),'Ïëàòíûé õîñòèíã',MB_ICONQUESTION+MB_YESNO)=IDYES then begin
Continue:=true;
Hosting:=Cost;
end
else
Continue:=false;
end
else
Continue:=true;
If Continue then begin
Edit1.Enabled:=false;
ComboBox1.Enabled:=false;
Button2.Enabled:=true;
Button1.Enabled:=false;
Rating:=Rating+1;
MainForm.Label33.Caption:='http://www.'+edit1.text+ComboBox1.Items.Strings[ComboBox1.ItemIndex];
end;
end;
end;
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.Button2Click(Sender: TObject);
begin
Edit1.Enabled:=true;
Button1.Enabled:=true;
Button2.Enabled:=false;
ComboBox1.Enabled:=true;
Rating:=rating-1;
Hosting:=0;
MainForm.Label33.Caption:='Íåò';
MainForm.Label33.Hint:='';
MainForm.Label33.ShowHint:=false;
end;
procedure TInet.Button4Click(Sender: TObject);
begin
If InetTraffic>0 then begin
If day<>lastday then
Inetwrk.ShowModal
else
Application.MessageBox('Âàì æå ñêàçàëè, ÷òî íà ñåãîäíÿ âñå âîïðîñû èñ÷åðïàíû...','Ïîìîùü!',MB_ICONSTOP);
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.FormActivate(Sender: TObject);
var
i:integer;
s:shortstring;
begin
ComboBox1.Items.LoadFromFile(dir+'\Inf\Domain.inf');
ComboBox1.ItemIndex:=0;
ComboBox2.Items.LoadFromFile(dir+'\Inf\E-mail.inf');
ComboBox2.ItemIndex:=0;
If MainForm.Label33.Caption<>'Íåò' then begin
Edit1.Enabled:=false;
s:=copy(MainForm.Label33.Caption,pos('.',MainForm.Label33.Caption)+1,255);
Edit1.Text:=copy(s,1,pos('.',s)-1);
for i:=1 to ComboBox1.Items.Count-1 do
If copy(s,pos('.',s),255)=ComboBox1.Items.Strings[i] then begin
ComboBox1.ItemIndex:=i;
Break;
end;
Button2.Enabled:=true;
Button1.Enabled:=false;
ComboBox1.Enabled:=false;
end
else
begin
Edit1.Enabled:=true;
Edit1.Text:='my';
Button1.Enabled:=true;
Button2.Enabled:=false;
end;
If MainForm.Label41.Caption<>'Íåò' then begin
Edit3.Enabled:=false;
for i:=1 to ComboBox2.Items.Count-1 do
If copy(MainForm.Label41.Caption,pos('@',MainForm.Label41.Caption)+1,255)=ComboBox2.Items.Strings[i] then begin
ComboBox2.ItemIndex:=i;
Break;
end;
edit3.Text:=copy(MainForm.Label41.Caption,1,pos('@',MainForm.Label41.Caption)-1);
Button7.Enabled:=true;
Button6.Enabled:=false;
ComboBox2.Enabled:=false;
end
else
begin
Edit3.Enabled:=true;
Edit3.Text:='my';
Button7.Enabled:=false;
Button6.Enabled:=true;
end;
end;
procedure TInet.Button6Click(Sender: TObject);
begin
If InetTraffic>=1 then begin
If Edit3.Text='my' then
Application.MessageBox('Ýòî ìîé ïî÷òîâûé ÿùèê, à íå âàø!','Ïîìîùü!',MB_ICONWARNING)
else
begin
Edit3.Enabled:=false;
Button7.Enabled:=true;
Button6.Enabled:=false;
ComboBox2.Enabled:=false;
Rating:=Rating+1;
MainForm.Label41.Caption:=Edit3.Text+'@'+ComboBox2.Items.Strings[ComboBox2.ItemIndex];
end;
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.Button7Click(Sender: TObject);
begin
Edit3.Enabled:=true;
Button6.Enabled:=true;
Button7.Enabled:=false;
ComboBox2.Enabled:=true;
Rating:=rating-1;
MainForm.Label41.Caption:='Íåò';
end;
procedure TInet.Button5Click(Sender: TObject);
begin
If InetTraffic>0 then begin
If (MainForm.Label34.Caption='Ïðîäâèíóòûé') or (MainForm.Label34.Caption='Õàêåðîê') then
xak.showmodal
else
Application.MessageBox('Ó âàñ äîëæåí áûòü ñòàòóñ íå íèæå Ïðîäâèíóòîãî, ÷òîáû ïîïàñòü â ýòó çîíó!','Ïîìîùü!',MB_ICONSTOP);
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.Button8Click(Sender: TObject);
begin
If InetTraffic>0 then begin
If (MainForm.Label34.Caption='Þçåð') or (MainForm.Label34.Caption='Ïðîäâèíóòûé') or (MainForm.Label34.Caption='Õàêåðîê') then begin
If cdrspeed=0 then
Application.MessageBox('Íåò CD-RW ïðèâîäà!','Ïîìîùü!',MB_ICONSTOP)
else
pirate.showmodal;
end
else
Application.MessageBox('Ó âàñ äîëæåí áûòü ñòàòóñ íå íèæå Þçåðà, ÷òîáû ïîïàñòü â ýòó çîíó!','Ïîìîùü!',MB_ICONSTOP);
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.Button9Click(Sender: TObject);
begin
If InetTraffic>0 then
Ext.Showmodal
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.Button10Click(Sender: TObject);
begin
If InetTraffic>0 then begin
If mainform.Label131.Caption<>'Íåò' then
Browse.ShowModal
else
Application.MessageBox('×òîáû ïóòåøåñòâîâàòü â èíòåðíåòå íåîáõîäèìî óñòàíîâèòü áðàóçåð!','Ïîìîùü!',mb_iconstop);
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.Button11Click(Sender: TObject);
begin
If InetTraffic>0 then begin
If (ANSILOWERCASE(os)='win') or (ANSILOWERCASE(os)='lin') or (ANSILOWERCASE(os)='bsd') then
UpdateForm.ShowModal
else
Application.MessageBox('Ïîääåðæèâàþòñÿ òîëüêî îïåðàöèîííûå ñèñòåìû ñåìåéñòâà Windows, Linux è BSD!','Îøèáêà!',MB_ICONSTOP);
end
else
Application.MessageBox('Âåñü ïðåîïëà÷åííûé òðàôèê çà èíòåðíåò çàêîí÷èëñÿ!','Ïîìîùü!',MB_ICONSTOP);
end;
procedure TInet.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If (key=VK_ESCAPE) then
Button3.OnClick(self);
end;
procedure TInet.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if (key in ['0'..'9','A'..'Z','a'..'z','-','_','.']) or (key = #8) then
else
key:=#0;
end;
procedure TInet.Edit3KeyPress(Sender: TObject; var Key: Char);
begin
if (key in ['0'..'9','A'..'Z','a'..'z','-','_','.']) or (key = #8) then
else
key:=#0;
end;
end.