5 CLS:GOSUB 620:DIM TW$(999):DIM W$(999):TW$(0)="file://":MW%=0:TN%=0
10 A$=TW$(MW%)+"*":N%=0:X%=0
15 NAME$=READDIR$(A$):IF NAME$="" THEN GOSUB 80
20 GOSUB 35
25 NAME$=READDIR$(""):IF NAME$="" THEN GOSUB 80
30 GOSUB 35:GOTO 25
35 W$(X%)=NAME$
40 N%=N%+1:X%=X%+1
45 RETURN
50 IF TW$(MW%)="file://" THEN GOTO 115
55 DL%=N%-1:L%=CHOICEFORM("MB Manager","Âûáîð","Íàçàä","Ôàéëû",BW$,0)
60 IF L%=-1 THEN MW%=MW%-1:GOTO 10
65 FOR I%=0 TO DL%
70 IF L%=I% THEN FW$=TW$(MW%)+BW$(I%):ML$=TW$(MW%):DT$=BW$(I%):MW%=MW%+1:TW$(MW%)=FW$:GOSUB 145:GOTO 10
75 NEXT I%
80 IF N%=0 THEN ALERT "Îøèáêà","Ïàïêà ïóñòà!","",3,0:SLEEP 2000:MW%=MW%-1:GOTO 10
85 DIM BW$(N%):DN%=N%-1
90 FOR I%=0 TO DN%
95 BW$(I%)=W$(I%)
100 NEXT I%
105 GOTO 50
110 RETURN
115 BL%=N%-1:FN%=CHOICEFORM("MB Manager","Âûáîð","Ôóíêöèè","Äèñêè",BW$,0)
120 IF FN%=-1 THEN GOSUB 715
125 FOR I%=0 TO BL%
130 IF FN%=I% THEN FT$=TW$(0)+"/"+BW$(I%):MW%=MW%+1:TW$(MW%)=FT$:GOTO 10
135 NEXT I%
140 END
145 DW$=RIGHT$(TW$(MW%),1)
150 IF DW$<>"/" THEN GOSUB 160
155 RETURN
160 LX%=SELECT("Îïöèè","Îòêðûòü","Êîïèðîâàòü","Âñòàâèòü","Ïåðåéìåíîâàòü","Óäàëèòü","Íàçàä")
165 IF LX%=0 THEN GOSUB 325:GOTO 160
170 IF LX%=1 THEN GOSUB 250:GOTO 160
175 IF LX%=2 THEN GOSUB 200:GOTO 160
180 IF LX%=3 THEN GOSUB 720:GOTO 155
185 IF LX%=4 THEN GOSUB 295:GOTO 160
190 IF LX%=5 THEN MW%=MW%-1:GOTO 155
195 RETURN
200 IF TN%=0 THEN ALERT "Âñòàâèòü","Âû íå âûáðàëè ôàéë äë"+CHR$(1103)+" êîïèðîâàíè"+CHR$(1103),"",0,0:SLEEP 2000:GOTO 245
205 HX$=ML$+MS$
210 OPEN #1,HX$,"output"
215 FOR I%=1 TO LEN(GW$)
220 DL$=MID$(GW$,I%,1)
225 PUT #1,ASC(DL$)
230 NEXT I%
235 CLOSE #1
240 ALERT "Êîïèðîâàòü","Êîïèðîâàíèå óñïåøíî çàâåðøåíî","",0,0:SLEEP 2000:TN%=1
245 RETURN
250 HB$=TW$(MW%):GW$="":MS$=DT$
255 OPEN #1,HB$,"input"
260 GET #1,TX%
265 GW$=GW$+CHR$(TX%)
270 TRAP 280
275 GOTO 260
280 CLOSE #1
285 ALERT "Êîïèðîâàòü","Ôàéë äîáàâëåí â áóôåð îáìåíà","",0,0:SLEEP 2000
290 TN%=1:RETURN
295 DF$=TW$(MW%)
300 DG%=MESSAGEFORM("Óäàëèòü","Äà","Íåò","","Âû òî÷íî õîòèòå óäàëèòü ôàéë?")
305 IF DG%=-1 THEN GOTO 320
310 DELETE DF$
315 ALERT "Óäàëåíèå","Ôàéë óñïåøíî óäàëåí","",0,0:SLEEP 2000
320 RETURN
325 R1$=RIGHT$(TW$(MW%),4):R2$=RIGHT$(TW$(MW%),5)
330 IF R1$=".bas" THEN CALL TW$(MW%)
335 IF R1$=".m4a" OR R1$=".kar" OR R1$=".wma" OR R1$=".aac" THEN GOSUB 360
340 IF R1$=".txt" OR R1$=".wml" OR R1$=".ini" OR R2$=".html" OR R2$="xhtml" OR R1$=".xml" THEN GOSUB 650
345 IF R1$=".mp3" OR R1$=".wav" OR R2$=".wave" OR R1$=".mid" OR R1$=".amr" THEN GOSUB 360
350 IF R1$=".gif" OR R2$=".jpeg" OR R1$=".bmp" OR R1$=".png" OR R1$=".JPG" OR R1$=".jpg" OR R1$=".bmx" OR R2$=".wbmp" THEN GOSUB 370
355 RETURN
360 GOSUB 485
365 RETURN
370 GELLOAD "kartinka",TW$(MW%)
375 IF GELWIDTH("kartinka")>SCREENWIDTH(0) OR GELHEIGHT("kartinka")>SCREENHEIGHT(0) THEN GOSUB 405:GOTO 395
380 DRAWGEL "kartinka",0,0
385 IF FIRE(0)<>0 THEN CLS:GOTO 395
390 GOTO 385
395 RETURN
400 CLS
405 HXT%=SCREENWIDTH(0):HYT%=SCREENHEIGHT(0)
410 HXM%=GELWIDTH("kartinka"):HYM%=GELHEIGHT("kartinka"):HXD%=HXT%-HXM%:HYD%=HYT%-HYM%
415 SPRITEGEL "kartinka","kartinka":BWX%=0:BWY%=0
420 SPRITEMOVE "kartinka",BWX%,BWY%
425 IF BWX%>=0 THEN BWX%=0
430 IF BWY%>=0 THEN BWY%=0
435 IF BWX%<=HXD% THEN BWX%=HXD%
440 IF BWY%<=HYD% THEN BWY%=HYD%
445 IF UP(0)<>0 THEN BWY%=BWY%+1
450 IF RIGHT(0)<>0 THEN BWX%=BWX%-1
455 IF DOWN(0)<>0 THEN BWY%=BWY%-1
460 IF LEFT(0)<>0 THEN BWX%=BWX%+1
465 IF FIRE(0)<>0 THEN SPRITEMOVE "kartinka",500,500:GOTO 480
470 SLEEP 10
475 GOTO 420
480 RETURN
485 CLS:MEDIAPLAY TW$(MW%):GOSUB 605:DIM PLAYY%(PLAYXM%):PLAYXM%=PLAYXM%-1
490 BA%=SCREENWIDTH(0)/2-STRINGWIDTH("Íàçàä-5")/2
495 CLS:FILLRECT 0,0,PLAYXD%,PLAYYD%
500 SETCOLOR 255,255,255:DRAWRECT 0,0,PLAYBGN%,PLAYYM%
505 DRAWSTRING "Íàçàä-5",BA%,SCREENHEIGHT(0)-35
510 SETCOLOR 0,255,0:PLAYX%=2
515 NAM%=SCREENWIDTH(0)/2-STRINGWIDTH(DT$)/2
520 SETCOLOR 255,255,255
525 DRAWSTRING DT$,NAM%,SCREENHEIGHT(0)-40
530 RR%=127+MOD(RND(0),127):GG%=RR%:BB%=GG%
535 GG%=127+MOD(RND(0),127)
540 BB%=127+MOD(RND(0),127)
545 SETCOLOR RR%,GG%,BB%
550 FOR I%=0 TO PLAYXM%
555 PLAYY%(I%)=MOD(ABS(RND(1)),PLAYYM%)+1
560 NEXT I%
565 FOR I%=0 TO PLAYXM%
570 DRAWLINE PLAYX%,PLAYYM%,PLAYX%,PLAYY%(I%)
575 PLAYX%=PLAYX%+2
580 NEXT I%
585 IF FIRE(0)<>0 THEN CLS:MEDIASTOP:GOTO 600
590 SLEEP 100
595 GOTO 495
600 RETURN
605 PLAYXM%=SCREENWIDTH(0):PLAYYM%=SCREENHEIGHT(0):PLAYGX%=PLAYXM%/2:PLAYGX%=PLAYGX%-28
610 PLAYBGN%=PLAYXM%-1:PLAYDWY%=PLAYYM%-18:PLAYXD%=PLAYXM%:PLAYYD%=PLAYYM%:PLAYYM%=PLAYYM%-1:PLAYYL%=PLAYYM%+5:PLAYXM%=PLAYXM%/2
615 RETURN
620 HNX%=SCREENWIDTH(0):HNY%=SCREENHEIGHT(0):HNX%=HNX%/2:HNY%=HNY%/2
625 HNX1%=HNX%-64:HNY1%=HNY%-17
630 HNX3%=HNX%-64:HNY3%=HNY%-64
631 HNX2%=HNX%-120:HNY2%=HNY%-160
635 TEX$="":SLEEP 2000
640 CLS:GOSUB 770
645 RETURN
650 O%=0:FILE$=TW$(MW%)
655 TEX$="":OPEN #1,FILE$,"input"
660 TRAP 685
665 GET #1,BAIT%
670 IF BAIT%<0 THEN BAIT%=BAIT%+1104
675 TEX$=TEX$+CHR$(BAIT%)
680 GOTO 665
685 CLOSE #1
690 TEX%=MESSAGEFORM("MB Manager","Íàçàä","Íàçàä","Ôàéë "+FILE$,TEX$)
695 IF TEX%=-1 AND O%=1 THEN GOTO 805
700 IF TEX%=-1 AND O%=0 THEN RETURN
705 IF O%=1 THEN GOTO 805
710 IF O%=0 THEN RETURN
715 GOTO 805
720 F$=TW$(MW%):R$=F$:REN%=EDITFORM("Ïåðåéìåíîâàòü","ÎÊ","Îòìåíà","Óäàëèòå èì"+CHR$(1103)+" ôàéëà è ââåäèòå íóæíîå",R$,400,0)
725 IF REN%=-1 THEN RETURN
730 OPEN #1,F$,"input"
735 OPEN #2,R$,"output"
740 TRAP 760
745 GET #1,B%
750 PUT #2,B%
755 GOTO 745
760 CLOSE #1:CLOSE #2
765 DELETE F$:RETURN
770 GELLOAD "alex","logotip.gif"
775 GELLOAD "bps","bps.png"
780 GELLOAD "logo","logo.png"
785 DRAWGEL "alex",HNX1%,HNY1%:SLEEP 2000
790 DRAWGEL "bps",HNX2%,HNY2%:SLEEP 2000
795 DRAWGEL "logo",HNX3%,HNY3%:SLEEP 2000:RETURN
805 O%=1:OP%=SELECT("MB Manager","Íàçàä","Ïîìîùü","Î ïðîãðàììå","Âûõîä")
810 IF OP%=0 THEN GOTO 50
815 IF OP%=1 THEN FILE$="/info.txt":GOTO 655
820 IF OP%=2 THEN FILE$="/about.txt":GOTO 655
825 IF OP%=3 THEN GOTO 830
830 EXIT%=SELECT("Âû óâåðåíû?","Íåò","Äà")
835 IF EXIT%=0 THEN GOTO 800
