10 WIDTH 80:TS$="S":CLS:KEY OFF
15 CLE$="GUGUS*":DATF$=MID$(DATE$,4,3)+LEFT$(DATE$,2)+RIGHT$(DATE$,5)
20 'CLOSE:LOCATE 8,1:PRINT "MODE (E)ssai ou (N)ormal :";
25 'R$=INKEY$:IF R$<>"E" AND R$<>"N" THEN 25
27 IF R$="E" THEN TS$="Y"
30 CLS:A=0:A$="":M$="":P$="":C$="":OPEN "com1:1200,E,7,1,RS,DS,CD" AS #1
31 KEY(10) ON
32 CLI$=CHR$(27)+CHR$(72):'Clignotement
33 IV$=CHR$(27)+CHR$(93):'Inverse vid‚o
34 DL$=CHR$(27)+CHR$(78):'Double largeur
35 DH$=CHR$(27)+CHR$(77):'Double hauteur
36 DB$=CHR$(27)+CHR$(79):'Double taille
37 RT$=CHR$(15):'Retour au vid‚otexte pr‚c‚dent
38 SLD$=CHR$(27)+CHR$(90):'D‚but soulignement
39 SLF$=CHR$(27)+CHR$(89):'Fin soulignement
40 ON ERROR GOTO 52000
41 'LES ACCENTS *******
42 EC$=CHR$(25)+CHR$(67)+CHR$(101):'E Accent circonflexe
43 ET$=CHR$(25)+CHR$(72)+CHR$(101):'E Trema
44 IC$=CHR$(25)+CHR$(67)+CHR$(105):'I Accent circonflexe
45 IT$=CHR$(25)+CHR$(72)+CHR$(105):'I Trema
46 EA$=CHR$(25)+CHR$(66)+CHR$(101):'E Accent aigu
47 EG$=CHR$(25)+CHR$(65)+CHR$(101):'E Accent grave
48 AA$=CHR$(25)+CHR$(65)+CHR$(97) :'A Accent
49 OC$=CHR$(25)+CHR$(67)+CHR$(111):'O Accent circonflexe
50 COLOR 2,0:LOCATE 8,8:PRINT"SERVEUR EN FONCTIONNEMENT"
51 GOSUB 33000:GOSUB 33020:CLOSE#3:'Ouverture et lecture du fichier comptage
52 NUMERO=E:IF MINI=1 THEN RETURN
55 PRINT"NOMBRE D'APPELS=";AP:PRINT"valeur du port 1022=";INP(1022)
56 PRINT"Nombre de Messages:";E
60 COMPTEUR=0:TEMPO=0:M1$="":PTR1=1:PTR2=1
64 IF R$="E"  THEN 360
66 ON KEY(10) GOSUB 1750:A=INP(1022) :IF A=160 THEN COLOR 3,0:LOCATE 12,20:PRINT DATF$;" ";TIME$:GOTO 66
67 FOR I=1 TO 1000:NEXT:AP=AP+1
100 DEBUT=VAL(LEFT$(TIME$,2))+VAL(MID$(TIME$,4,2))/60+VAL(RIGHT$(TIME$,2))/3600
110 PRINT #1,CHR$(27);"9";"o":PRINT #1,CHR$(27);"9";"h"
111 IF EOF(1) THEN 111
112 A$=INPUT$(1,#1)
113 FOR I=1 TO 800:PRINT I:NEXT
115 FOR I=1 TO 2000:PRINT I:IF EOF(1) THEN NEXT:GOTO 7000:ELSE M$=INPUT$(1,#1)
116 'IF ASC(A$)=19 AND M$="P" THEN 118 ELSE 7000
118 CLS:X=2:Y=2:GOSUB 11000:PRINT #1,CHR$(12);CHR$(31);CHR$(64);CHR$(65);" CONNEXION ETABLIE  ";"Evoluciel R.B.30":FOR I=1 TO 200:PRINT I:NEXT I
120 CLS:PRINT #1,CHR$(12):GOSUB 3000:X=7:Y=14:GOSUB 30420:PRINT #1,CLI$;AP;RT$;" appels depuis 1989"
121 FOR I=1 TO 800:NEXT
122 X=23:Y=23:A$=CHR$(15)+"APPUYER SUR SUITE":GOSUB 450
123 FOR I=1 TO 1500:PRINT I:IF EOF(1) THEN NEXT:GOTO 7000:ELSE P$=INPUT$(1,#1)
124 'P$=INPUT$(1,#1)
125 IF P$="H" THEN 127
126 GOTO 123
127 PRINT#1,CHR$(12):GOSUB 32060:FI$="PUB"+FN A$(A):GOSUB 27005:A=0
128 X=23:Y=23:A$=CHR$(15)+CHR$(27)+CHR$(64)+"APPUYER SUR SUITE":GOSUB 450
129 FOR I=1 TO 1500:PRINT I:IF EOF(1) THEN NEXT:GOTO 7000:ELSE C$=INPUT$(1,#1)
130 'FOR I=1 TO 30000:NEXT
135 IF C$="H" THEN 137
136 'FOR I=1 TO 30000:NEXT
137 FI$="INFO":GOSUB 27005:GOSUB 27095
140 CLOSE#3:CLOSE#2:PRINT#1,CHR$(12):GOSUB 2030:GOSUB 450
145 LPRINT"Appel Nø=";AP;" du ";DATF$;" … ";TIME$
150 X=3:Y=18:A$=CHR$(15)+CHR$(27)+CHR$(93)+CHR$(27)+CHR$(78)+"MENU":GOSUB 450:X=8:Y=12
152 X=6:Y=12:A$=CHR$(15)+"1: Laisser un message":GOSUB 450
154 X=8:A$=CHR$(15)+"2: Consulter les messages":GOSUB 450
155 X=10:A$=CHR$(15)+"3: Dialogue en direct":GOSUB 450
157 X=12:Y=12:A$=CHR$(15)+"4: JEUX (Lire-Ecrire;Compter)":GOSUB 450
160 X=14:Y=12:A$=CHR$(15)+"5: Nous avons lu..LISEZ!.":GOSUB 450
161 X=16:Y=12:A$=CHR$(15)+"6: Test STATISTIQUE du KI2":GOSUB 450
168 X=19:Y=12:A$=CHR$(15)+"7: Quitter et le PRIX de la                connexion":GOSUB 450
169 X=24:Y=8:A$=CHR$(15)+"Appel du "+MID$(DATE$,4,2)+"/"+MID$(DATE$,1,2)+" ->   " +TIME$:GOSUB 450:A$=""
170 FOR I=1 TO 2000:PRINT I:IF EOF(1) THEN NEXT I:GOTO 7000:ELSE A$=INPUT$(1,#1)
180 'A$=INPUT$(1,#1)
190 IF ASC(A$)=19 THEN 1430
195 IF ASC(A$)=49 THEN 2100
196 IF ASC(A$)=55 THEN 750
200 IF ASC(A$)<48 OR ASC(A$)>57 THEN 170
205 IF ASC(A$)=53 THEN 850
206 IF ASC(A$)=57 THEN 4030
210 IF ASC(A$)=50 THEN 850
215 IF ASC(A$)=51 THEN 20000
216 IF ASC(A$)=52 THEN 7010
217 IF ASC(A$)=48 THEN 25000
218 IF ASC(A$)=54 THEN 9400
219 GOTO 170
220 CLS:PRINT #1,CHR$(12):GOSUB 2030:GOSUB 450:M1$="":M2$=""
250 X=10:Y=3:A$="7":GOSUB 450:FOR X=11 TO 19:A$="5":GOSUB 450:NEXT X
270 X=10:Y=4:A$="#"+CHR$(18)+CHR$(91):GOSUB 450
280 X=20:Y=3:A$="u":GOSUB 450:X=10:Y=32:A$="k":GOSUB 450
300 FOR X=11 TO 19:A$="j":GOSUB 450:NEXT X
310 X=20:Y=32:A$="z":GOSUB 450:Y=4:A$="p"+CHR$(18)+CHR$(91):GOSUB 450:X=5
330 PRINT #1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(27);"O";"Votre message :  ";
335 X=23:Y=22:GOSUB 9360:PRINT#1,IV$;"ENVOI":PRINT#1,RT$;"(8lignes maxi)"
350 GOTO 690
360 GOSUB 30430:GOSUB 30460
365 'IF EOF(1) THEN 360
370 'A$=INPUT$(1,#1)
380 IF ASC(A$)=19 THEN 510
390 IF ASC(A$)<32 OR ASC(A$)>126 THEN 360
400 M1$=M1$+A$:GOSUB 470:IF LEN(M1$)=>255 THEN 770
420 Y=Y+1:IF Y=29 THEN 490
430 GOTO 360
440 END
450 PRINT #1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(14);A$:RETURN
470 PRINT#1,CHR$(31);CHR$(X+74);CHR$(Y+67);A$:RETURN
490 X=X+1:Y=1:IF X=10 THEN X=9:Y=28
500 GOTO 360
510 GOSUB 30430:GOSUB 30460
520 'A$=INPUT$(1,#1)
530 IF A$=TS$ THEN 730
535 IF (COMPTEUR=0 AND A$="S") OR (COMPTEUR<2 AND A$="Y") THEN 360
540 IF A$="A" THEN 770
550 IF A$="E" THEN M1$="":PTR1=1:PTR2=1:GOTO 690
560 IF A$="G" THEN 590
570 IF A$="C" THEN PTR1=X:PTR2=Y:GOTO 220
575 IF A$="F" THEN 140
580 GOTO 360
590 Y=Y-1:IF Y=0 THEN 640
600 LONG=LEN(M1$)-1:LONG=LONG+LONG*(LONG<0):M2$=LEFT$(M1$,LONG):M1$=M2$
610 PRINT #1,CHR$(31);CHR$(X+74);CHR$(Y+67);"-":GOTO 360
640 X=X-1:Y=28:IF X=0 THEN X=1:Y=1
650 LONG=LEN(M1$)-1:LONG=LONG+LONG*(LONG<0):M2$=LEFT$(M1$,LONG):M1$=M2$
660 PRINT #1,CHR$(31);CHR$(X+74);CHR$(Y+67);"-":GOTO 360
690 M2$=M1$+STRING$(255-LEN(M1$),"-"):FOR X=1 TO 9:XY=(X-1)*28+1
700 PRINT #1,CHR$(31);CHR$(X+74);CHR$(68);MID$(M2$,XY,28);:NEXT X
720 X=PTR1:Y=PTR2:GOTO 360
730 COMPTEUR=COMPTEUR+1:IF (COMPTEUR<>2 AND COMPTEUR<>3 AND TS$="Y") THEN 360
740 IF (COMPTEUR=>1 AND TS$="S") OR (COMPTEUR=2 AND TS$="Y") THEN 120
750 PRINT#1,CHR$(20)CHR$(12):GOSUB 5000:GOSUB 450
751 W=2:GOSUB 30520
752 E=NUMERO:GOSUB 33000:GOSUB 33040:GOSUB 30410:X=23:Y=5:GOSUB 30420:PRINT#1,RT$;"Logiciel EVOLUTIF Roger Boudy":GOSUB 4000:GOSUB 45000:PRINT#1,CHR$(27);"9";"g":CLOSE:GOTO 30
770 IF LEN(M1$)=0 THEN 750
780 NUMERO=NUMERO+1 :CLOSE#2
785 IF COD>0 AND LEN(BAL$)>1 THEN 2246
790 CLOSE#2:OPEN"R",#2,"a:FICHIER.MSG",255
800 FIELD #2,255 AS MSG$
810 LSET MSG$=M1$
815 LOCATE 15,1:PRINT M1$;
820 PUT #2,NUMERO
821 ON ERROR GOTO 824
822 LPRINT"****";DATF$;"*********";TIME$;"*****";"Message No ";E:LPRINT
823 LPRINT M1$
824 IF ERR=24 OR ERR=25 OR ERR=57 OR ERR=68 THEN PRINT"IMPRIMANTE NON PRETE !":X=15:Y=10:GOSUB 30420:PRINT#1,"PATIENCE ! imprimante non allum";EA$;"e":RESUME 140:CLOSE#2:GOTO 140:'Traitement de l'oubli d'imprimante
830 IF LEN(M1$)=>255 THEN PRINT #1,"Ecivez la suite":W=5:GOSUB 30520:GOTO 220
831 CLOSE#2:GOSUB 30410:PRINT #1,"Message enregistr";EA$;" et imprim";EA$:W=5:GOSUB 30520:GOTO 140
850 CLS:CLE$="GUGUS*":MDP$="":PRINT #1,CHR$(12):GOSUB 2030:GOSUB 450:COL$(1)="":AD$(1)="":OPT$="":FIC1$="":FIC2$=""
860  X=2:Y=1:A$=CHR$(15)+CHR$(10)+"CODES:MOT1--MOT2--JOURNAL--SIRE--VOYAGE... : ":GOSUB 450
865 X=5:Y=1:A$=CHR$(15)+CHR$(27)+CHR$(72)+"nouveau!..ECOLTEL--CIDBP-S"+EA$+"ville"+IV$+"-LIVRE":GOSUB 450
870  X=8:Y=1:A$=CHR$(15)+CHR$(13)+"Entrez votre code confidentiel ou le mot de passe : ":GOSUB 450:MDP$=""
875 GOSUB 30470:X=12:Y=20
885 A$=""
890 GOSUB 30430:GOSUB 30460
892 'IF EOF(1) THEN 890
900 'A$=INPUT$(1,#1)
905 IF ASC(A$)=19 THEN 32030
910 'IF A$<"0" OR (A$>"9" AND A$<"A") OR A$>"Z" OR A$<>"*" THEN 890
920 MDP$=MDP$+A$:Y=Y+1:A$=CHR$(15)+".":GOSUB 450
930 IF RIGHT$(MDP$,1)<>"*" THEN 890
931 LPRINT MDP$
935 IF RIGHT$(MDP$,1)="*" AND MDP$="NOMBRE*" THEN NUMERO=0:E=0:GOSUB 33000:GOSUB 33040:GOTO 140:'Remise … 0 des comptages
936 IF RIGHT$(MDP$,1)="*" AND MDP$="PROPRE*" THEN KILL"A:FICHIER.MSG":GOTO 140
937 'Pour d‚truire le fichier message et remettre les fichiers comptage … 0 et si besoin d'autres fichiers
940 IF RIGHT$(MDP$,1)="*" AND MDP$=CLE$ THEN 1040
945 IF RIGHT$(MDP$,1)="*" AND (MDP$="MOT1*" OR MDP$="MOT2*" OR MDP$="JOURNAL*" OR MDP$="SIRE*" OR MDP$="VISIDEN*" OR MDP$="VISICP*" OR MDP$="ZILBD*") THEN 6000
946 IF RIGHT$(MDP$,1)="*" AND (MDP$="CIDBP*" OR MDP$="VOYAGE*" OR MDP$="ECOLTEL*" OR MDP$="SIRE*" OR MDP$="VISIDEN*" OR MDP$="VISICP*" OR MDP$="ZILBD*" OR MDP$="PRIVE*") THEN 6000
947 IF RIGHT$(MDP$,1)="*" AND (MDP$="LIVRE*" OR MDP$="LIVRE1*" OR MDP$="LIVRE2*" OR MDP$="LIVRE3*" OR MDP$="LIVRE4*" OR MDP$="LIVRE5*" OR MDP$="LIVRE6*" OR MDP$="LIVRE7*" OR MDP$="LIVRE8*" OR MDP$="LIVRE9*" OR MDP$="LECTURE*") THEN 6000
948 COD=VAL(LEFT$(MDP$,LEN(MDP$)-1))
949 IF RIGHT$(MDP$,1)="*" AND COD>10000 THEN GOSUB 4430:PRINT#1,"PATIENCE JE VERIFIE VOTRE CODE....":W=5:GOSUB 30520:GOTO 8100
950 IF RIGHT$(MDP$,1)="*" AND COD>0 AND COD<10000 THEN GOSUB 4430:PRINT#1,"PATIENCE JE VERIFIE VOTRE CODE....":W=5:GOSUB 30520:GOTO 9800
960 CLS:PRINT #1,CHR$(12):GOSUB 2030:GOSUB 450
970 X=8:Y=1:GOSUB 30420:PRINT#1,RT$;"Mot de passe erron";EA$
975 FOR I=1 TO 10000:NEXT I
980 X=10:Y=1:GOSUB 30420:PRINT#1,RT$;"Pas de suite ";AA$;" cet appel.":FOR I=1 TO 10000:NEXT I:GOTO 140
985 GOTO 850
1000 CLS:PRINT #1,CHR$(12):GOSUB 2030:GOSUB 450
1020 X=8:Y=6:A$=CHR$(15)+"Pas de messages":GOSUB 450:GOTO 750
1040 IF NUMERO=0 THEN 1000
1050 CLOSE#2:OPEN "a:fichier.msg" AS #2 LEN=255
1060 FIELD #2,255 AS M1$
1070 CLS:PRINT #1,CHR$(12):GOSUB 2030:GOSUB 450
1090 NUM$=CHR$(48+INT(NUMERO/10))+CHR$(48+INT(NUMERO-10*(INT(NUMERO/10))))
1100 X=6:Y=1:A$=CHR$(15)+"Il y a "+NUM$+" messages(RETOUR/SUITE)           pour finir(SOMMAIRE)":GOSUB 450
1110 X=10:Y=3:A$="7":GOSUB 450:FOR X=11 TO 19:A$="5":GOSUB 450:NEXT X
1130 X=10:Y=4:A$="#"+CHR$(18)+CHR$(91):GOSUB 450
1140 X=20:Y=3:A$="u":GOSUB 450:GOSUB 450:X=10:Y=32:A$="k":GOSUB 450
1170 FOR X=11 TO 19:A$="j":GOSUB 450:NEXT X
1180 X=20:Y=32:A$="z":GOSUB 450 :Y=4:A$="p"+CHR$(18)+CHR$(91):GOSUB 450
1200 GOSUB 30430:GOSUB 30460
1210 'A$=INPUT$(1,#1)
1220 IF ASC(A$)<>19 THEN 1200
1230 GOSUB 30430:GOSUB 30460
1240 'A$=INPUT$(1,#1)
1250 IF A$=TS$ THEN 752
1260 IF A$="H" THEN NUM=NUM+1:GOTO 1290
1270 IF A$="B" THEN NUM=NUM-1:GOTO 1320
1275 IF A$="F" THEN CLOSE#2:GOTO 140
1280 GOTO 1200
1290 IF NUM>NUMERO THEN NUM=NUMERO
1300 GOSUB 1350:GOTO 1200
1320 IF NUM<1 THEN NUM=1
1330 GOSUB 1350:GOTO 1200
1350 GET #2,NUM
1370 NUM$=CHR$(48+INT(NUM/10))+CHR$(48+INT(NUM-10*(INT(NUM/10))))
1380 X=22:Y=1:A$=CHR$(15)+ "MESSAGE NUMERO : "+NUM$:GOSUB 450
1390 FOR X=1 TO 9:XY=(X-1)*28+1
1400 PRINT #1,CHR$(31);CHR$(X+74);CHR$(68);MID$(M1$,XY,28);:NEXT X:RETURN
1430 GOSUB 30430:GOSUB 30460
1440 'A$=INPUT$(1,#1)
1450 IF A$=TS$ THEN 752
1460 GOTO 170
1750 CLOSE:CLS:LOCATE 4,36:PRINT "M E N U";
1760 LOCATE 8,28:PRINT"1 :Consulter les messages"
1770 LOCATE 10,28:PRINT"2 :Changer le mot de passe"
1780 LOCATE 12,28:PRINT "3:Reinitialiser l'index des messages"
1785 LOCATE 14,28:PRINT "4: Remise en attente d'appel"
1790 A$=INKEY$:IF A$="" OR A$<"1" OR A$>"4" THEN 1790
1805 IF A$="4" THEN CLOSE:GOTO 30
1810 IF A$="3" THEN 1970
1820 IF A$="2" THEN 1880
1821 INPUT"NUMERO choisi= ";NUMERO
1822 IF NUMERO<>0 THEN 1830
1824 CLS:LOCATE 6,1:PRINT" PAS DE MESSAGE "
1825 LOCATE 10,1:PRINT "Appuyer sur une touche..." :
1826 A$=INKEY$:IF A$="" THEN 1826
1828 GOTO 1750
1830 CLS:LOCATE 6,1:PRINT "Nombre de messages:"; NUMERO:LOCATE 8,1
1840 INPUT "Numero desire puis enter (0 pour revenir au menu): ";INDEX
1842 IF INDEX<=NUMERO THEN LOCATE 10,1:PRINT "           ":GOTO 1845
1844 LOCATE 10,1:PRINT "Erreur de saisie":GOTO 1840
1845 IF INDEX=0 THEN 1750
1850 OPEN"a:FICHIER.MSG" AS #2 LEN=255
1855 FIELD #2,255 AS M1$
1857 GET #2,INDEX
1860 FOR X=10 TO 18:XY=(X-10)*28+1
1870 LOCATE X,6:PRINT MID$(M1$,XY,28);:NEXT X:CLOSE:GOTO 1840
1880 CLS:LOCATE 6,1:PRINT "MOT DE PASSE ACTUEL :";CLE$:MDP$="":YA=33
1890 LOCATE 12,1:PRINT "4 signes alphanumeriques : chiffres de 0 a 9";
1895 PRINT "ET MAJUSCULES DE A A Z"
1900 LOCATE 10,1:PRINT "Entrez le nouveau mot de passe:...."
1910 A$=INKEY$:IF A$="" OR A$<"0" OR (A$>"9" AND A$<"A") OR A$>"Z" THEN 1910
1945 YA=YA+1:LOCATE 10,YA:PRINT A$
1950 MDP$=MDP$+A$:IF LEN(MDP$)<4 THEN 1910
1960 CLE$=MDP$:GOTO 1750
1970 CLS:LOCATE 6,1:PRINT "EN ETES-VOUS SUR ?(o/n)"
1990 A$=INKEY$:IF A$="n" OR A$="N" THEN 1750
2010 IF A$="o" OR A$="O" THEN NUMERO=0:GOTO 1750
2020 GOTO 1990
2030 X=1:Y=1
2040 A$=CHR$(15)+IV$+"Serveur exp"+CHR$(25)+CHR$(66)+CHR$(101)+"rimental du C.I.D.B.P."
2050 RETURN
2060 'test boŒte … lettres **********************************************
2100 BAL$="":GOSUB 30410:X=6:Y=5:GOSUB 30420:PRINT #1,DB$;IV$;"Nom de la BOITE:"
2110 X=14:Y=5:GOSUB 30420:PRINT #1,RT$;"Si vous n'avez pas de bo";IC$;"te ,tapez  sur la barre d'espacement":GOSUB 30470:GOSUB 30480
2120 GOSUB 30430:GOSUB 30460
2130 X=10:BAL$=BAL$+A$:Y=Y+1:GOSUB 30420:PRINT #1,A$;
2135 IF A$="#" THEN 2100
2140 IF BAL$=" " THEN 220
2150 IF LEN(BAL$)>0 AND RIGHT$(BAL$,1)="*" THEN GOSUB 9330:GOTO 2170
2160 GOTO 2120
2170 I=0
2180 I=I+1
2190 GET #3,I
2200 CODBAL$=LEFT$(BAL$,LEN(BAL$)-1)
2210 CODBAL$=CODBAL$+SPACE$(26-LEN(CODBAL$))
2220 IF ECOL$=CODBAL$ THEN GOSUB 30410:PRINT #1,"Cette bo";IC$;"te existe !";CHR$(10):PRINT #1,IV$;"Ecole de ";ECOL$:COD=CVS(RIC$):W=5:GOSUB 30520:CLOSE#3:GOTO 220
2230 IF I=LOF(3)/162 THEN 2240 ELSE 2180
2240 PRINT #1,"Cette bo";IC$;"te n'existe pas...recommencez ";EA$;"ventuellement !":CLOSE#3:W=5:GOSUB 30520:GOTO 140
2245 'enregistrement du message d'une boŒte ****************************
2246 DEF FN N$(COD)=MID$(STR$(COD),2)
2250 BOI$="b:"+FN N$(COD)
2260 IF COD>0 THEN CLOSE#4:OPEN "R",#4,BOI$,255
2270 FIELD #4,240 AS MSG$,6 AS NU$,9 AS REST$
2275 GET #4,1:NU=CVI(NU$):IF NU=0 OR NU>10 THEN NU=0
2276 NU=NU+1
2278 LSET NU$=MKI$(NU):PUT #4,1
2279 MES$=RT$+IV$+"Message du "+DATF$+" No"+STR$(NU)+AA$+TIME$+RT$+M1$
2280 LSET MSG$=MES$
2290 LOCATE 15,1:PRINT M1$;
2300 PUT #4,NU
2310 CLOSE#4:GOSUB 30410:PRINT #1,"Message enregistr";EA$:W=5:GOSUB 30520:NU=0:GOTO 140
2320 'lecture des messages d'une boŒte *************************************
2350 DEF FN N$(COD)=MID$(STR$(COD),2)
2352 FI$="b:"+FN N$(COD):BOI$="b:"+FN N$(COD)
2355 GOSUB 2810:GOSUB 2830:GOSUB 30410:X=6:Y=11:GOSUB 30420:PRINT #1,"Vous avez ";NU;"Message(s)":W=5:GOSUB 30520:IF NU=0 THEN 8176
2360 GOSUB 27005:W=5:GOSUB 30520
2365 GOSUB 30410:X=6:Y=11:GOSUB 30420:PRINT #1,"Voulez-vous effacer vos messages?(O/N)"
2370 GOSUB 30430:GOSUB 30460
2380 IF A$="O" THEN CLOSE #5:KILL FI$ :NU=0:GOSUB 2810:GOSUB 2840
2390 GOTO 140
2800 'Compteur message BAL *******************************
2810 CLOSE #5:OPEN "R",#5,BOI$,255
2820 FIELD #5,240 AS MSG$,6 AS NU$:RETURN
2830 GET #5,1:NU=CVI(NU$):RETURN
2840 LSET NU$=MKI$(NU):PUT #5,1:CLOSE #5:RETURN
2999 END
3000 OPEN"EXP1" FOR INPUT AS 2
3010 WHILE NOT EOF(2):S$=INPUT$(1,#2):PRINT#1,S$;:WEND:CLOSE#2
3020 RETURN
4000 OPEN"CIDBP2" FOR INPUT AS 3
4010 WHILE NOT EOF(3):S$=INPUT$(1,#3):PRINT#1,S$;:WEND:CLOSE#3
4020 RETURN
4030 'Fabrication de pages minitel … distance*****************************
4040 CLS:A$="":DIA$="":DIALO$="":MESSA$="":ED=1
4050 MOT$="":GOSUB 4430
4060  X=8:Y=1:A$=CHR$(15)+"Entrez votre code confidentiel : ":GOSUB 4440:PRINT#1,A$
4070 GOSUB 4500
4080 X=12:Y=8:A$=""
4090 GOSUB 4450:GOSUB 4480
4100 IF A$="#" THEN MOT$="":A$="":GOTO 4050
4110 IF ASC(A$)=19 THEN  GOSUB 4470
4120 MOT$=MOT$+A$:Y=Y+1:GOSUB 4440:PRINT#1, "." ;
4130 IF MOT$="RB1942" OR MOT$="VEYSSIERE" OR MOT$="MARJARY" OR MOT$="PROF" THEN 4150
4135 IF MOT$="ZOZO" THEN SHELL"cd\hometel":SHELL"homedep":SHELL
4136 IF MOT$="TELEFI" OR MOT$="TELCHAR" THEN 5100
4140 GOTO 4090
4150 GOSUB 4430
4160 IF MOT$="RB1942" THEN X=3:Y=1:DIA$=RT$+IV$+DL$+"VISITES D'ECOLES:                       "+RT$:GOSUB 4440:X=8:Y=12:PRINT#1,DIA$
4170 IF MOT$="VEYSSIERE" THEN X=3:Y=1:DIA$=RT$+IV$+DL$+"    Lecture      :                      "+RT$:GOSUB 4440:X=8:Y=12:PRINT#1,DIA$
4180 IF MOT$="MARJARY" THEN X=3:Y=1:DIA$=RT$+IV$+DL$+" VISITES C.P.    :                      "+RT$:GOSUB 4440:X=8:Y=12:PRINT#1,DIA$
4185 IF MOT$="PROF" THEN X=3:Y=1:DIA$=RT$+IV$+DL$+"Info.DERNIERES  :                       "+RT$:GOSUB 4440:X=8:Y=12:PRINT#1,DIA$
4186 POINTI$=STRING$(200,"-")
4187 X=8:Y=0:GOSUB 30420:PRINT#1,CHR$(10);POINTI$;
4190 GOSUB 30510:GOSUB 30490:GOSUB 30465
4200 X=6:Y=0
4210 GOSUB 4450:GOSUB 30460
4215 IF A$="#" THEN DIALO$="":A$="":GOTO 4150
4230 IF ASC(A$)=19 THEN  GOSUB 32015
4240 DIALO$=DIALO$+A$:Y=Y+1:GOSUB 4440:PRINT#1,CHR$(15);A$;:IF Y>40 THEN Y=0:X=X+1
4245 IF LEN(DIALO$)+LEN(DIA$)=245 AND ED=1 THEN 4270
4250 IF RIGHT$(DIALO$,1)<> "*" THEN 4210
4270 IF ED=1 THEN MESSA$=DIA$+CHR$(10)+DIALO$
4280 IF ED>1 THEN MESSA$=DIALO$
4290 IF MOT$="RB1942" AND ED=1 THEN DISPAG$="VISIDEN":KILL"VISIDEN"
4300 IF MOT$="VEYSSIERE" AND ED=1 THEN DISPAG$="LECTURE":KILL"LECTURE"
4310 IF MOT$="MARJARY" AND ED=1 THEN DISPAG$="VISICP" :KILL"VISICP"
4315 IF MOT$="PROF" AND ED=1 THEN DISPAG$="SECRET" :KILL"SECRET"
4320 CLOSE#4:OPEN"R",#4,DISPAG$,247
4330 FIELD #4,247 AS MESA$
4340 LSET MESA$=MESSA$
4350 PRINT MESSA$;:FOR K=1 TO 200:NEXT K
4360 PUT #4,ED
4370 CLOSE#4
4380 GOSUB 4430:PRINT#1,"VOULEZ-VOUS AJOUTER DU TEXTE (O/N)":W=5:A$="":GOSUB 30520
4390 GOSUB 4450:GOSUB 4480
4400 IF A$="O" THEN ED=ED+1:DIALO$="":GOTO 4150
4410 PRINT"BRAVO":GOTO 140
4420 'Routines MINITEL++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4430 PRINT #1,CHR$(12):RETURN:'nettoyage ‚cran
4440 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN:'‚quivalent locate gwbasic
4450 PRINT#1,CHR$(31);:RETURN:'Mise du curseur … 0
4460 FOR I=1 TO 100:PRINT I:X=20:Y=12:GOSUB 4440:PRINT#1,"Patientez..":NEXT:RETURN:'temporisation affichage
4470 IF ASC(A$)=19 THEN PRINT#1,"Touche interdite!..":RETURN:'erreur de frappe
4480 FOR I=1 TO 1000:PRINT I:IF EOF(1) THEN NEXT:GOTO 140:ELSE A$=INPUT$(1,#1):RETURN:'temporisation dans la saisie des donn‚es et commande de d‚connexion
4490 X=20:Y=14:GOSUB 4440:PRINT#1,"Pour achever Appuyer sur * ":RETURN
4500 X=21:Y=14:GOSUB 4440:PRINT#1,"Pour Corriger Appuyer sur # ":RETURN
4510 X=22:Y=19:GOSUB 4440:PRINT#1,"Pour continuer SUITE":RETURN
4520 X=21:Y=2:GOSUB 4440:PRINT#1,"Pour revenir au Menu SOMMAIRE":RETURN
4530 X=23:Y=15:GOSUB 4440:PRINT#1,"Pour corriger CORRECTION":RETURN
4540 END
5000 OPEN"image.vtx" FOR INPUT AS 3
5010 WHILE NOT EOF(3):S$=INPUT$(1,#3):PRINT#1,S$;:WEND:CLOSE#3
5020 RETURN
5100 NOM$="":GOSUB 30410:X=6:Y=10:GOSUB 30420:PRINT #1,DB$;IV$;"Transmission de      Fichiers"
5110 X=10:Y=10:GOSUB 30420:PRINT #1,RT$;IV$;"Donnez le nom de votre Fichier  (7 lettres )"
5120 GOSUB 30430:GOSUB 30460
5130 NOM$=NOM$+A$:X=12:Y=Y+1:GOSUB 30420:PRINT #1,A$;
5140 IF LEN(NOM$)=7 THEN 5170
5150 IF LEN(NOM$)>7 THEN 5120
5160 GOTO 5120
5170 GOSUB 30410:X=6:Y=15:GOSUB 30420:PRINT #1,"Lancez votre logiciel de  Transfert sur votre ordinateur":GOSUB 30465
5175 W=5:GOSUB 30520
5180 IF MOT$="TELEFI" THEN TRANS$="A:"+NOM$:GOTO 5200
5190 IF MOT$="TELCHAR" THEN FI$="A:"+NOM$:GOTO 5300
5200 CLOSE #3:OPEN "O",#3,TRANS$
5210 COM(1) ON
5220 ON COM(1) GOSUB 5240
5225 IF LOC(1)<1 THEN CLOSE#3:GOTO 140
5230 GOTO 5210
5240 W=20:TE!=TIMER:WHILE TIMER<TE!+W :IF EOF(1) THEN WEND:GOTO 140:ELSE A$=INPUT$(1,#1):'temporisation dans la saisie des donn‚es et commande de d‚connexion ou retour au menu
5246 ENR$=ENR$+A$
5250 PRINT"Transfert en cours...."
5260 PRINT #1,"Transfert en cours....."
5265 IF ASC(A$)=19 THEN CLOSE #3:GOSUB 30410:PRINT #1,"Fichier transmis et enregistr";EA$:W=5:GOSUB 30520:GOTO 140
5270 IF LEN(ENR$)<=255 THEN PRINT #3,A$;:IF LEN(ENR$)=255 THEN ENR$=""
5271 RETURN
5275 RETURN:GOTO 140
5300 GOSUB 27005:W=5:GOSUB 30520
5310 GOTO 140
6000 S=0:MDP$=LEFT$(MDP$,LEN(MDP$)-1):OPEN MDP$ FOR INPUT AS 4
6001 PRINT#1,CHR$(12)
6002 WHILE NOT EOF(4):A$=INPUT$(1,#4)
6003 IF A$="ˆ" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(101);:GOTO 6040
6004 IF A$="‰" THEN PRINT#1,CHR$(25)+CHR$(72)+CHR$(101);:GOTO 6040
6005 IF A$="Œ" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(105);:GOTO 6040
6006 IF A$="‹" THEN PRINT#1,CHR$(25)+CHR$(72)+CHR$(105);:GOTO 6040
6007 IF A$="‚" THEN PRINT#1,CHR$(25)+CHR$(66)+CHR$(101);:GOTO 6040
6008 IF A$="Š" THEN PRINT#1,CHR$(25)+CHR$(65)+CHR$(101);:GOTO 6040
6009 IF A$="…" THEN PRINT#1,CHR$(25)+CHR$(65)+CHR$(97);:GOTO 6040
6010 IF A$="“" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(111);:GOTO 6040
6015 'IF A$="\" THEN W=15:GOSUB 30520:GOSUB 30410:GOTO 6002
6016 IF A$="—" THEN PRINT#1,CHR$(25)+CHR$(65)+CHR$(117);:GOTO 6040
6017 IF A$="–" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(117);:GOTO 6040
6018 IF A$="ƒ" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(97);:GOTO 6040
6019 IF A$="‡" THEN PRINT#1,CHR$(25)+CHR$(75)+CHR$(99);:GOTO 6040
6030 PRINT#1,A$;
6040 WEND:CLOSE#4:GOSUB 30440
6050 FOR I=1 TO 1000  :PRINT I:NEXT I:IF RIGHT$(MDP$,1)="N" AND MDP$="VISIDEN" THEN GOSUB 9000:GOTO 140
6076 GOTO 140
7000 E=NUMERO:GOSUB 33000:GOSUB 33040:PRINT#1,CHR$(27);"9";"g":CLOSE:GOTO 30
7010 GOSUB 30410:X=6:Y=15:GOSUB 30420:PRINT#1,DB$;IV$;" JEUX "
7020 X=12:Y=12:GOSUB 30420:PRINT#1,RT$;IV$;"**1**";RT$;" Jeu Maternelle..Ecrire et Lire sur Ecran et Voir des Images.."
7030 X=16:Y=12:GOSUB 30420:PRINT#1,IV$;"**2**";RT$;" Machine ";AA$;" Calculer..les 4 Op";EA$;"rations...tous Ages"
7040 GOSUB 30430:GOSUB 30460
7050 IF ASC(A$)=49 THEN 10000
7055 IF A$="F" THEN 140
7060 IF ASC(A$)=50 THEN 7080
7070 GOTO 7040
7080 CLS:GOSUB 30410:COLOR 2,0:TOTAL=0:X=8:Y=3:GOSUB 30420:PRINT#1,DB$;"MACHINE A CALCULER"
7090 X=12:Y=2:GOSUB 30420:PRINT#1, "Quel type d'op";EA$;"ration voulez-vous faire (D)ivision-(M)ultiplication-Autres( )"
7100 X=20:Y=15:GOSUB 30420:PRINT#1,IV$;"Appuyez D,M ou espacement"
7110 GOSUB 30430:GOSUB 30460
7120 IF A$=" " THEN 7160
7130 IF A$="D" OR A$="d" THEN 7440
7135 IF A$="F" THEN 140
7140 IF A$="M" OR A$="m" THEN 7590
7150 GOTO 7110
7160 '*********Addition soustraction***********************
7170 GOSUB 30410:X=4:Y=4:GOSUB 30420:PRINT#1,DH$;SLD$;" Addition-Soustraction":A$="":MOT$="":C=0
7180 X=20:Y=15:GOSUB 30420:PRINT#1,IV$;"ENVOI ";RT$;"pour chaque nombre":GOSUB 30500
7190 X=22:Y=15:GOSUB 30420:PRINT#1,IV$;"RETOUR ";RT$;"pour le r";EA$;"sultat":GOSUB 30510
7200 X=4:Y=28:GOSUB 30430:GOSUB 30460
7210 IF A$="A" THEN 7260
7215 IF A$="F" THEN 7010
7220 IF A$="G" THEN 7170
7230 IF A$="B" THEN 7290
7240 MOT$=MOT$+A$:X=4:Y=Y+1:GOSUB 30420:PRINT#1,MOT$;CHR$(24)
7250 GOTO 7190
7260 GOSUB 7750:NOMB=VAL(MOT$):X=5+2*C:Y=18:GOSUB 30420:PRINT#1,DH$;NOMB;"+";
7270 TOTAL=TOTAL+NOMB:MOT$=""
7280 GOTO 7190
7290 '***********Affichage du r‚sultat***********************
7300 X=18:Y=15:GOSUB 30420:PRINT#1,IV$;"TON RESULTAT="
7310 A$="":MOT$=""
7320 GOSUB 30430:GOSUB 30460:Y=28
7330 IF A$="A" THEN 7360
7340 MOT$=MOT$+A$:X=4:Y=Y+1:GOSUB 30420:PRINT#1,MOT$
7350 GOTO 7320
7360 TONR=VAL(MOT$):X=18:Y=30:GOSUB 30420:PRINT#1,DH$;TONR:MOT$=""
7370 LOCATE 18,25:IF TONR=TOTAL THEN PRINT"TU ES UN GENIE!!!...."
7380 X=19:Y=6:IF TONR=TOTAL THEN GOSUB 30420:PRINT#1,CLI$;"TU ES UN GENIE!!!...."
7390 LOCATE 18,25:IF TONR<>TOTAL THEN PRINT"TU DOIS AMELIORER TES RESULTATS"
7400 X=19:Y=6:IF TONR<>TOTAL THEN GOSUB 30420:PRINT#1,CLI$;"TU DOIS AMELIORER TES RESULTATS..!!"
7410 LOCATE 20,10:PRINT"R‚sultat=";:PRINT USING"########.#####";TOTAL
7420 X=1:Y=5:GOSUB 30420:PRINT#1,DL$;"Solution=";:PRINT#1,RT$;CLI$;USING"########.#####";TOTAL
7430 PRINT"FIN DE TRAVAIL" :W=5:GOSUB 30520:GOTO 7080
7440 '*****************Division**************************
7450 A$="":MOT$="":C=0
7460 GOSUB 30410:X=4:Y=4:GOSUB 30420:PRINT#1,DH$;SLD$;" Division"
7470 X=20:Y=15:GOSUB 30420:PRINT#1,IV$;"ENVOI ";RT$;"pour chaque nombre":GOSUB 30500
7480 X=22:Y=15:GOSUB 30420:PRINT#1,IV$;"RETOUR ";RT$;"pour le r";EA$;"sultat":GOSUB 30510
7490 X=4:Y=28:GOSUB 30430:GOSUB 30460
7500 IF A$="A" THEN 7550
7510 IF A$="G" THEN 7450
7515 IF A$="F" THEN 7010
7520 IF A$="B" THEN 7290
7530 MOT$=MOT$+A$:X=4:Y=Y+1:GOSUB 30420:PRINT#1,MOT$;CHR$(24)
7540 GOTO 7490
7550 GOSUB 7750:NOMB=VAL(MOT$):X=5+2*C:Y=18:GOSUB 30420:PRINT#1,DH$;NOMB;"/";
7560 GOSUB 7760:GOSUB 7770
7565 IF C=2 AND NOMB=0 THEN PRINT #1,"division par ZERO impossible":GOTO 7450
7570 IF C=2 THEN TOTAL=NOMB(1)/NOMB(2):GOTO 7290
7575 IF C>2 THEN 7450
7580 GOTO 7490
7590 '*****************Multiplication********************
7600 A$="":MOT$="":C=0
7610 GOSUB 30410:X=4:Y=4:GOSUB 30420:PRINT#1,DH$;SLD$;" Multiplication"
7620 X=20:Y=15:GOSUB 30420:PRINT#1,IV$;"ENVOI ";RT$;"pour chaque nombre":GOSUB 30500
7630 X=22:Y=15:GOSUB 30420:PRINT#1,IV$;"RETOUR ";RT$;"pour le r";EA$;"sultat":GOSUB 30510
7640 X=4:Y=28:GOSUB 30430:GOSUB 30460
7650 IF A$="A" THEN 7700
7655 IF A$="F" THEN 7010
7660 IF A$="G" THEN 7590
7670 IF A$="B" THEN 7290
7680 MOT$=MOT$+A$:X=4:Y=Y+1:GOSUB 30420:PRINT#1,MOT$;CHR$(24)
7690 GOTO 7640
7700 GOSUB 7750:NOMB=VAL(MOT$):X=5+2*C:Y=18:GOSUB 30420:PRINT#1,DH$;NOMB;"*";
7710 GOSUB 7760:GOSUB 7770
7720 IF C=2 THEN TOTAL=NOMB(1)*NOMB(2):GOTO 7290
7725 IF C>2 THEN 7600
7730 GOTO 7640
7740 '**********sous programme****************
7750 C=C+1:X=5+2*C:Y=6:GOSUB 30420:PRINT#1,DH$;"NOMBRE ";C;"=":RETURN
7760 IF C=1 THEN NOMB(1)=NOMB:MOT$="":RETURN
7770 IF C=2 THEN NOMB(2)=NOMB:MOT$="":RETURN
7780 RETURN
8000 OPEN"C:\COMMUNIk\IMAGE4.VTX" FOR INPUT AS 4
8005 PRINT#1,CHR$(12)
8010 WHILE NOT EOF(4):S$=INPUT$(1,#4):PRINT#1,S$;
8011 WEND:CLOSE#4
8020 RETURN
8100 'Identification d'aprŠs code d'accŠs*****************************
8110 GOSUB 9330
8120 I=0
8130 I=I+1
8140 GET#3,I
8150 IF COD=CVS(RIC$) THEN GOSUB 30410:PRINT#1,"CODE CORRECT ";CHR$(10):PRINT#1,IV$;" ECOLE DE ";ECOL$:PRINT ECOL$:COL$(1)=ECOL$:NUME=I:W=5:GOSUB 30520:CLOSE#3:GOTO 8176
8170 IF I=LOF(3)/162 THEN 8175 ELSE 8130
8175 PRINT#1,"CODE INCORRECT ...Recommen‡ez!...." :CLOSE#3:GOTO 140
8176 GOSUB 30410:X=6:Y=11:GOSUB 30420:PRINT#1,DB$;IV$;" INFO.PROF. ":LPRINT CHR$(14);"Ecole de ";COL$(1);CHR$(18)
8177 X=10:Y=5:GOSUB 30420:PRINT#1,RT$;IV$;"**1**";RT$;" Informations professionnelles."
8178 X=12:Y=5:GOSUB 30420:PRINT#1,IV$;"**2**";RT$;" Autorisation d'absence"
8179 X=14:Y=5:GOSUB 30420:PRINT#1,IV$;"**3**";RT$;" Sorties ou informations                 scolaires"
8180 X=16:Y=5:GOSUB 30420:PRINT#1,IV$;"**4**";RT$;" Lire ma bo";IC$;"te":GOSUB 30500
8181 X=18:Y=5:GOSUB 30420:PRINT#1,IV$;"**5**";RT$;" R";EA$;"servation mat";EA$"riel":GOSUB 30500
8182 GOSUB 30430:GOSUB 30460
8183 IF ASC(A$)=49 THEN 8200
8184 IF A$="F" THEN 140
8185 IF ASC(A$)=53 THEN 8250
8186 IF ASC(A$)=48 THEN 8191
8187 IF ASC(A$)=52 THEN LPRINT TAB(15);"Lire ma BoŒte":LPRINT TAB(15);"*-*-*-*-*-*-*-*-*-*-*-*-*":LPRINT:GOTO 2350
8188 IF ASC(A$)=50 THEN LPRINT TAB(15);"AUTORISATION D'ABSENCE":LPRINT TAB(15);"*-*-*-*-*-*-*-*-*-*-*-*-*":LPRINT:GOTO 220
8189 IF ASC(A$)=51 THEN LPRINT TAB(15);"Sortie scolaire":LPRINT TAB(15);"*-*-*-*-*-*-*-*-*-*-*-*-*":LPRINT:GOTO 220
8190 GOTO 8182
8191 NV=8:DON=1:FIC$="vila"
8192 RESULTAT=1:SUP$="evar94":MINI=1
8193 CLS:CHAIN "tabcol5",111,ALL
8194 MINI=1:GOSUB 31:GOSUB 30500:RESULTAT=0:MINI=0:NUME=0:FIC$="":GOTO 8182
8200 FI$="SECRET":GOSUB 27005:GOSUB 30520:GOSUB 9010:GOTO 8176
8250 '************* R‚servation automatique du mat‚riel ********************
8260 GOSUB 30410:X=6:Y=1:GOSUB 30420:PRINT#1,DB$;IV$;" Planing mat";EA$;"riel";"          mobile       ";RT$
8270 X=12:Y=5:GOSUB 30420:PRINT#1,RT$;IV$;"**1**";RT$;" Lire le planing."
8280 X=14:Y=5:GOSUB 30420:PRINT#1,IV$;"**2**";RT$;" R";EA$;"server un mat";EA$;"riel":GOSUB 30500
8285 PLA=0:TRI=0:DEB=0:FIN=0:FIC1$="":FIC2$="":OPT$=""
8290 GOSUB 30430:GOSUB 30460
8300 IF ASC(A$)=49 THEN PLA=1:GOTO 8400
8305 IF A$="F" AND LEN(AD$(1))>0 THEN 9880
8310 IF A$="F" THEN 8176
8320 IF ASC(A$)=50 THEN PLA=2:GOTO 8410
8340 GOTO 8290
8400 GOSUB 30410:X=2:Y=3:GOSUB 30420:PRINT#1," Lecture Planing mat";EA$;"riel";" mobile";RT$:FIC1$="VALPEDA":FIC2$="VALPEDA.FI"
8402 X=5:Y=3:GOSUB 30420:PRINT#1," 1e Trimestre-----> 1"
8403 X=7:Y=3:GOSUB 30420:PRINT#1," 2e Trimestre-----> 2"
8404 X=9:Y=3:GOSUB 30420:PRINT#1," 3e Trimestre-----> 3"
8405 GOSUB 30430:GOSUB 30460
8406 IF VAL(A$)=1 THEN DEB=1:FIN=7:TRI=1
8407 IF VAL(A$)=2 THEN DEB=8:FIN=14:TRI=2
8408 IF VAL(A$)=3 THEN DEB=15:FIN=18:TRI=3
8409 IF VAL(A$)<1 OR VAL(A$)>3 THEN 8405
8410 '**************Lecture des caract‚ristiques du fichier***********
8415 FIC1$="VALPEDA":FIC2$="VALPEDA.FI":C=C+1
8420 CLOSE#2:OPEN "I",#2,FIC1$
8430 INPUT #2,NRU,XI
8440 'IF C=1 THEN DIM R$(NRU),LR(NRU),V$(NRU)
8450 FOR I=1 TO NRU
8500 IF EOF(2)=-1 THEN I=NRU:GOTO 8530
8510 INPUT #2,R$(I):INPUT #2,LR(I)
8520 IF EOF(2)=-1 THEN 8530
8530 NEXT I
8540 CLOSE#2
8600 CLOSE#3:OPEN"R",#3 ,FIC2$,XI:D=0
8610 FOR R=1 TO NRU
8620 FIELD #3,D AS D$,LR(R) AS V$(R):D=D+LR(R)
8630 NEXT R
8640 FIELD#3,XI AS TOTAL$
8641 IF OPT$="BIBLI" THEN RETURN
8642 IF OPT$="CID" THEN RETURN
8643 IF PLA=2 THEN 8700
8645 FOR I=DEB TO FIN
8650 GET#3,I
8660 FOR R=1 TO NRU
8670 X=X+2:GOSUB 30420:PRINT #1,"*";I;"*";R$(R);":";V$(R):W=2:GOSUB 30520
8675 IF R=1 THEN X=X+1:GOSUB 30420:PRINT #1,"*************************"
8680 NEXT R:GOSUB 30410:X=2
8690 NEXT I :CLOSE#3:GOTO 8250
8700 GOSUB 30410:X=2:Y=3:GOSUB 30420:PRINT#1," RESERVATION mat";EA$;"riel";" mobile";RT$
8740 X=X+2:GOSUB 30420:PRINT #1,"PERIODE CHOISIE:"
8741 X=5:Y=3:GOSUB 30420:PRINT#1," 1e Trimestre-----> 1"
8742 X=7:Y=3:GOSUB 30420:PRINT#1," 2e Trimestre-----> 2"
8743 X=9:Y=3:GOSUB 30420:PRINT#1," 3e Trimestre-----> 3"
8744 GOSUB 30430:GOSUB 30460
8745 IF VAL(A$)=1 THEN DEB=1:FIN=7
8746 IF VAL(A$)=2 THEN DEB=8:FIN=14
8747 IF VAL(A$)=3 THEN DEB=15:FIN=18
8748 IF VAL(A$)<1 OR VAL(A$)>3 THEN 8744
8750 FOR I=DEB TO FIN
8760 GET#3,I
8770 X=X+1:GOSUB 30420:PRINT #1,"*";I;"*";R$(1);":";V$(1);:W=2:GOSUB 30520
8800 NEXT I
8810 X=X+3:Y=10:GOSUB 30420:PRINT #1,"Votre CHOIX:(un num";EA$;"ro)":A$="":CHO$="" :GOSUB 30490
8820 GOSUB 30430:GOSUB 30460
8821 IF A$="H" THEN 8830
8822 CHO$=CHO$+A$:Y=12:GOSUB 30420:PRINT #1,CHO$
8829 GOTO 8820
8830 KD=VAL(CHO$):IF KD>LOF(3)/XI THEN 8820
8840 GOSUB 30410:X=3:Y=1
8850 FOR R=2 TO NRU
8860 X=X+1:GOSUB 30420:PRINT #1,"*";R;"*";R$(R);":":W=2:GOSUB 30520
8870 NEXT R
8880 X=X+3:Y=10:GOSUB 30420:PRINT #1,"Votre CHOIX:(un num";EA$;"ro)"
8890 GOSUB 30430:GOSUB 30460
8900 MAT=VAL(A$):IF MAT>NRU THEN 8890
8905 GET#3,KD
8910 IF LEN(COL$(1))>0 AND V$(MAT)=STRING$(35,32) THEN GOSUB 30410:LSET V$(MAT)=COL$(1):PRINT #1,"CHOIX ENREGISTRE":PRINT #1,"Vous avez choisi:";R$(MAT):W=3:GOSUB 30520:PUT#3,KD:CLOSE#3:GOSUB 8935:GOTO 8176
8915 IF LEN(AD$(1))>0 AND V$(MAT)=STRING$(35,32) THEN GOSUB 30410:LSET V$(MAT)=AD$(1):PRINT #1,"CHOIX ENREGISTRE":PRINT #1,"Vous avez choisi:";R$(MAT):W=3:GOSUB 30520:PUT#3,KD:CLOSE#3:GOSUB 8935:GOTO 9880
8920 IF V$(MAT)<>STRING$(35,32) THEN GOSUB 30410:PRINT #1,"CE MATERIEL EST DEJA RESERVE !":W=3:GOSUB 30520:CLOSE#3:GOTO 8250
8925 GOTO 8890
8930 CLOSE#3:GOTO 140
8935 LPRINT R$(MAT);" date No= ";KD:RETURN
9000 'CLS:A$="":M$="":P$="":C$="":OPEN "com1:1200,E,7,1,RS,DS,CD" AS #1
9010 PRINT#1,CHR$(12)
9020 PRINT#1,"**Visites Rapides d'ECOLES**"
9030 GOSUB 9330
9040 RANDOMIZE TIMER
9050 FOR I=1 TO 6
9060 A=INT(100*RND):IF A>74 OR A=0 THEN GOTO 9060
9070 LI(I)=A
9080 NEXT I
9090 FOR C=1 TO 5
9100 J=C+1
9110 FOR D=J TO 6
9120 IF LI(C)>LI(D) THEN GOTO 9160
9130 GOTO 9170
9140 IF LI(C)<LI(D) THEN GOTO 9160
9150 GOTO 9170
9160 P=LI(C):LI(C)=LI(D):LI(D)=P
9170 NEXT D
9180 NEXT C
9190 FOR K=1 TO 6
9200 IF LI(K-1)=LI(K) THEN K=6:NEXT K:GOTO 9040
9210 FOR I=1 TO 6
9220 GET#3,LI(I)
9240 PRINT I;ECOL$;DIREC$
9245 'IF CVS(N$)=0 THEN I=6:GOTO 9040
9250 ECO$(I)=ECOL$:DIRE$(I)=DIREC$
9260 NEXT I
9270 X=5:Y=1
9280 FOR I=1 TO 6
9290 X=X+2:Y=1:GOSUB 9360:PRINT#1,I;ECO$(I);"directeur  :"DIRE$(I):GOSUB 9360:NEXT I
9294 X=23:Y=20:GOSUB 9360:PRINT#1,IV$;"Patientez......"
9295 FOR I=1 TO 1000:PRINT I:NEXT I:CLOSE#3
9300 RETURN
9310 END
9330 CLOSE#3:OPEN"R",#3,"\INSPECTE\ECOL",162
9340 FIELD#3,26 AS ECOL$,4 AS N$,4 AS T$,10 AS SEC$,4 AS DIST$,20 AS C$,8 AS PH$,4 AS ORD$,30 AS DIREC$,4 AS EFP$,10 AS TRE$,30 AS AMB$,4 AS RIC$,4 AS NTR$
9350 RETURN
9360 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN
9370 PRINT #1,CHR$(12):RETURN
9380 END
9400 'CLS:A=0:A$="":M$="":P$="":C$="":OPEN "com1:1200,E,7,1,RS,DS,CD" AS #1
9405 LOCATE 8,1:COLOR 0,4:PRINT "** COMPARAISON DE 2 POURCENTAGES TEST DU KI2**":COLOR 2,0
9410 GOSUB 9725:X=3:Y=5:GOSUB 9730:PRINT#1,CHR$(27);CHR$(78);"** COMPARAISON DE      2 POURCENTAGES    TEST DU KI2**"
9415 X=8:Y=2:GOSUB 9730:PRINT#1,"Vous devez avoir en main vos:              2 poucentages et l'effectif de       chacune des populations ";:PRINT#1,CHR$(25);CHR$(65);CHR$(97);" COMPARER":GOSUB 9735
9420 A$=" ":S=0:T=0:N=0:TL=0:MOT$=" "
9425 GOSUB 9725
9430 X=4:Y=4:GOSUB 9730:PRINT#1,"POURCENTAGE POPULATION A*="
9435 GOSUB 9750
9440 GOSUB 9745
9450 IF A$="H" THEN 9470
9455 IF A$="G" THEN GOTO 9420
9456 IF A$="F" THEN 140
9460 MOT$=MOT$+A$:X=4:Y=30:GOSUB 9730:PRINT#1,MOT$
9465 GOTO 9440
9470 S=VAL(MOT$):MOT$=" "
9471 IF S=0 THEN 9400
9475 X=6:Y=4:GOSUB 9730:PRINT#1,"Effectif total population A*="
9480 GOSUB 9745
9485 IF A$="H" THEN 9505
9490 IF A$="G" THEN MOT$=" ":GOTO 9475
9491 IF A$="F" THEN 140
9495 MOT$=MOT$+A$:X=6:Y=34:GOSUB 9730:PRINT#1,MOT$
9500 GOTO 9480
9505 T=VAL(MOT$):MOT$=" "
9506 IF T=0 THEN 9400
9510 U=INT((S*T/100))
9515 W=(T-U)
9516 IF U=0 OR W=0 THEN 9400
9520 X=8:Y=4:GOSUB 9730:PRINT#1,"POURCENTAGE POPULATION B*="
9525 GOSUB 9745
9530 IF A$="H" THEN 9550
9535 IF A$="G" THEN MOT$=" ":GOTO 9520
9536 IF A$="F" THEN 140
9540 MOT$=MOT$+A$:X=8:Y=30:GOSUB 9730:PRINT#1,MOT$
9545 GOTO 9525
9550 N=VAL(MOT$):MOT$=" "
9551 IF N=0 THEN 9400
9555 X=10:Y=4:GOSUB 9730:PRINT#1,"Effectif total population B*="
9560 GOSUB 9745
9565 IF A$="H" THEN 9585
9570 IF A$="G" THEN MOT$=" ":GOTO 9555
9571 IF A$="F" THEN 140
9575 MOT$=MOT$+A$:X=10:Y=34:GOSUB 9730:PRINT#1,MOT$
9580 GOTO 9560
9585 TL=VAL(MOT$):MOT$=" "
9586 IF TL=0 THEN 9400
9590 V=INT((TL*N/100))
9595 XG=(TL-V)
9596 IF V=0 OR XG=0 THEN 9400
9600 Z=(((V-U)^2) /U)+(((XG-W)^2)/W)
9605 X=14:Y=8:GOSUB 9730:PRINT#1,"VALEUR DU KI2=";:PRINT#1,USING"###.##";Z
9610 X=16:Y=8:GOSUB 9730:PRINT#1,"DIFFERENCE DE %=";ABS(N-S)
9611 RESTORE 9715
9615 FOR I=1 TO 3
9620 READ VA(I)
9625 NEXT I
9630 FOR I=3 TO 1 STEP-1
9635 IF VA(I)<Z THEN PRINT"DIFFERENCE DE POURCENTAGE SIGNIFICATIVE"
9640 IF VA(I)<Z THEN X=18:Y=10:GOSUB 9730:PRINT #1,"DIFFERENCE DE POURCENTAGE SIGNIFICATIVE"
9645 IF VA(I)<Z THEN PLAY"MB CD EFG"
9650 IF VA(I)<Z AND I=3 THEN PRINT"PROBABILITE=";"99%"
9655 IF VA(I)<Z AND I=3 THEN X=19:Y=10:GOSUB 9730:PRINT "PROBABILITE=";"99%"
9660 IF VA(I)<Z AND I=3 THEN GOSUB 9735:GOTO 140
9665 IF VA(I)<Z AND I=2 THEN X=19:Y=10:GOSUB 9730:PRINT #1,"PROBABILITE=";"95%"
9670 IF VA(I)<Z AND I=2 THEN PRINT "PROBABILITE=";"95%"
9675 IF VA(I)<Z AND I=2 THEN GOSUB 9735:GOTO 140
9680 IF VA(I)<Z AND I=1 THEN PRINT "PROBABILITE=";"90%"
9685 IF VA(I)<Z AND I=1 THEN X=19:Y=10:GOSUB 9730:PRINT #1,"PROBABILITE=";"90%"
9690 IF VA(I)<Z AND I=1 THEN GOSUB 9735:GOTO 140
9695 IF VA(I)>Z AND I=1 THEN PRINT"**PAS DE DIFFERENCE SIGNIFICATIVE STATISTIQUEMENT**"
9700 IF VA(I)>Z AND I=1 THEN X=18:Y=8:GOSUB 9730:PRINT #1,"**PAS DE DIFFERENCE SIGNIFICATIVE STATISTIQUEMENT**":GOSUB 9735:GOTO 140
9705 NEXT I
9715 DATA 2.71,3.84,6.64
9720 GOSUB 9735:GOTO 140
9725 PRINT #1,CHR$(12):RETURN:'nettoyage ‚cran
9730 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN:'‚quivalent locate gwbasic
9735 FOR I=1 TO 100:PRINT I:X=20:Y=12:GOSUB 9730:PRINT#1,"Patientez..":NEXT:RETURN:'temporisation affichage
9740 IF ASC(A$)=19 THEN PRINT#1,"Touche interdite!..":RETURN:'erreur de frappe
9745 FOR I=1 TO 1000:PRINT I:IF EOF(1) THEN NEXT:GOTO 7000:ELSE A$=INPUT$(1,#1):RETURN:'temporisation dans la saisie des donn‚es et commande de d‚connexion
9750 X=22:Y=19:GOSUB 9730:PRINT#1,"Pour continuer SUITE"
9752 X=21:Y=2:GOSUB 9730:PRINT#1,"Pour revenir au Menu SOMMAIRE"
9755 X=23:Y=15:GOSUB 9730:PRINT#1,"Pour corriger CORRECTION":RETURN
9800 'Identification d'aprŠs code d'accŠs*****************************
9810 FIC1$="C:\INSPECTE\ADCID":FIC2$="C:\INSPECTE\ADCID.FI":OPT$="CID":GOSUB 8420
9820 I=0
9830 I=I+1
9840 GET#3,I
9850 IF COD=VAL(V$(10)) THEN GOSUB 30410:PRINT#1,"CODE CORRECT ";CHR$(10):PRINT#1,IV$;"BONJOUR et Bienvenue ";V$(1):PRINT V$(1):AD$(1)=V$(1):W=10:GOSUB 30520:CLOSE#3:GOTO 9880
9860 IF I=LOF(3)/XI THEN 9870 ELSE 9830
9870 PRINT#1,"CODE INCORRECT ...Recommen‡ez!...." :CLOSE#3:GOTO 140
9880 GOSUB 30410:X=6:Y=11:GOSUB 30420:PRINT#1,DB$;IV$;" ASSO.C.I.D.B.P":LPRINT CHR$(14);"ADHERENT: ";AD$(1);CHR$(18)
9884 X=12:Y=5:GOSUB 30420:PRINT#1,RT$;IV$;"**1**";RT$;" Informations association"
9885 X=15:Y=5:GOSUB 30420:PRINT#1,IV$;"**2**";RT$;" RESERVATION MATERIEL"
9886 X=18:Y=5:GOSUB 30420:PRINT#1,IV$;"**3**";RT$;" BIBLIO-LOGI-VIDEO-THEQUE":GOSUB 30500
9887 GOSUB 30430:GOSUB 30460
9888 IF ASC(A$)=49 THEN 9897
9890 IF A$="F" THEN 140
9894 IF ASC(A$)=51 THEN LPRINT TAB(15);"BibliothŠque":LPRINT TAB(20);"*-*-*-*-*-*-*-*-*-*-*-*-*":LPRINT:GOTO 11200
9895 IF ASC(A$)=50 THEN LPRINT TAB(15);"R‚servation de mat‚riel":LPRINT TAB(20);"*-*-*-*-*-*-*-*-*-*-*-*-*":LPRINT:GOTO 8250
9896 GOTO 9887
9897 FI$="REMAT":GOSUB 27005:GOSUB 30520:GOTO 9880
10000 CLOSE#4:OPEN"C:\COMMUNIK\IMAGE7.VTX" FOR INPUT AS 4
10005 PRINT#1,CHR$(12):MOT$="":S=0
10007 WHILE NOT EOF(4):S$=INPUT$(1,#4):PRINT#1,S$;:'S=S+1:'IF S=1180 THEN S=0:'FOR I=1 TO 30000:'NEXT I
10008 WEND:CLOSE#4
10010 PRINT #1,CHR$(12)
10020 X=10:Y=10:PRINT #1,CHR$(27);CHR$(78);"ECRIS TON NOM:(achever par *)":GOSUB 11000:A$="":MOT$=""
10030 GOSUB 30430:GOSUB 30460
10050 IF ASC(A$)=19 THEN GOSUB 30450:GOTO 10010
10060 IF ASC(A$)<>19 THEN 10100
10080 GOTO 10030
10100 MOT$=MOT$+A$:GOSUB 11000:PRINT#1,CHR$(27);CHR$(15);MOT$:GOSUB 11000
10110 IF RIGHT$(MOT$,1)<> "*" THEN 10030
10120 IF RIGHT$(MOT$,1)= "*" THEN PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(27);"O";LEFT$(MOT$,LEN(MOT$)-1):GOTO 10130
10128 IF RIGHT$(MOT$,1)<> "*" THEN 10010
10129 GOTO 10030
10130 X=20:Y=4:GOSUB 11000:PRINT #1,CHR$(27);CHR$(78);"CONFIRMER (O/N)"
10140 GOSUB 30430:GOSUB 30460
10160 IF ASC(A$)=19 THEN GOSUB 30450:GOTO 10010
10170 IF ASC(A$)<>19 THEN 10200
10200 IF A$="O" THEN 10210 ELSE MOT$="":A$="":GOTO 10010
10205 GOTO 10140
10210 GOSUB 11010:X=1:Y=10:PRINT #1,CHR$(27);CHR$(78);CHR$(27);CHR$(78);"Tape une touche..)":GOSUB 11000:PRINT#1,CHR$(78)
10211 U=RND:IF EOF(1) THEN 10211
10215 GOSUB 11010:NOMS$(0)=LEFT$(MOT$,LEN(MOT$)-1)
10218 PRINT #1,CHR$(12)
10219 X=23:Y=2:GOSUB 11000:PRINT#1,"Pour gagner appuie vite sur";IV$;"ENVOI";RT$;"         en voyant ton nom!..":GOSUB 10400:GOSUB 9735
10220 RESTORE 10230:FOR I=1 TO 5 :READ NOMS$(I):NEXT
10230 DATA JEAN,PAUL, jacques,HELENE,pierre
10300 HJ=INT(RND*3):IF HJ=0 THEN P=0:GOTO 10303
10302 P=INT(RND*5)+1
10303 IF P=G THEN 10300
10305 G=P:GOSUB 11010:X=10:Y=10
10310 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(27);"O";NOMS$(P):FOR K=1 TO 20000:NEXT:GOSUB 10400
10320 GOTO 10300
10400 WHILE NOT EOF(1):A$=INPUT$(1,#1):WEND
10405 IF A$="Y" THEN 7000
10410 IF A$="" THEN RETURN
10430 IF ASC(A$)=65 AND P=0 THEN PRINT#1,CHR$(27);CHR$(72);"GAGNE! AU SUIVANT":RESTORE:FOR I=1 TO 30000:NEXT:GOTO 140
10440 IF ASC(A$)=65 THEN PRINT#1,CHR$(27);CHR$(72);"perdu! on continue":FOR K=1 TO 20000:NEXT
10450 A$="":RETURN
10999 GOTO 140
11000 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN
11010 PRINT #1,CHR$(12):RETURN
11200 '$$$$$$$  Biblioth‚que-LogithŠque-Vid‚oth‚que $$$$$$$$$$$$$$$$$$$$$$$$
11205 GOSUB 30410:X=3:Y=9:GOSUB 30420:PRINT #1,IV$;"BIBLIO-LOGI-VIDEO-THEQUE";RT$
11210 OPT$="BIBLI"
11220 X=10:Y=12:GOSUB 30420:PRINT #1,"-->1 TITRES "
11230 X=14:Y=12:GOSUB 30420:PRINT #1,"-->2 RESERVATION"
11232 X=16:Y=15:GOSUB 30420:PRINT #1,"Tapez votre choix"
11235 GOSUB 30500
11240 FIC1$="BP":FIC2$="BP.FI":GOSUB 8420
11250 GOSUB 30430:GOSUB 30460
11260 IF ASC(A$)=49 THEN 11300
11270 IF A$="F" THEN 9880
11280 IF ASC(A$)=50 THEN LPRINT TAB(15);"R‚servation de titres":LPRINT TAB(20);"*-*-*-*-*-*-*-*-*-*-*-*-*":LPRINT:GOTO 11460
11290 GOTO 11250
11300 '********Recherche par rubrique********************************
11305 X=2:Y=9:A$="":RC=0:GOSUB 30410:GOSUB 30420:PRINT #1,IV$;"Recherche dans les rubriques";RT$
11310 Y=4:X=3:FOR R=1 TO NRU:X=X+1:GOSUB 30420:PRINT #1,USING"### :";R;:PRINT #1,R$(R):NEXT :PRINT
11330 X=15:Y=16:GOSUB 30420:PRINT #1," Tapez votre No"
11340 GOSUB 30430:GOSUB 30460 :RC=VAL(A$)
11360 IF VAL(A$)<1 OR VAL(A$)>NRU THEN 11340 ELSE 11370
11365 GOTO 11340
11370 CLE$="":GOSUB 30410:PRINT #1,"Mot CLE:"
11372 GOSUB 30470:GOSUB 30480
11375 GOSUB 30430:GOSUB 30460
11376 X=10:CLE$=CLE$+A$:Y=Y+1:GOSUB 30420:PRINT #1,A$;
11377 IF A$="#" THEN 11370
11378 IF LEN(CLE$)>0 AND RIGHT$(CLE$,1)="*" THEN 11380
11379 GOTO 11375
11380 CLE$=LEFT$(CLE$,LEN(CLE$)-1)
11382 GOSUB 30410:X=1:Y=1
11385 FOR N=1 TO LOF(3)/XI
11390 GET #3,N
11400 RE$=V$(RC)
11405 IF X=17 THEN GOSUB 30410:X=1
11420 IF INSTR(RE$,CLE$)<>0 THEN X=X+3:Y=1:GOSUB 30420:PRINT #1,LEFT$(V$(3),38):X=X+1:Y=1:GOSUB 30420:PRINT #1,V$(4);IV$;"CODE:";V$(1);RT$:W=3:GOSUB 30520
11440 NEXT N
11445 X=24:Y=22:GOSUB 30420:PRINT #1,"Plus de titres !..":W=2:GOSUB 30520
11450 CLOSE#2:CLOSE#3:GOTO 11200
11460 '************** R‚servation de titres ********************
11470 GOSUB 30410:X=3:Y=9:GOSUB 30420:PRINT #1,IV$;"RESERVATION DE TITRES";RT$
11480 X=10:Y=5:GOSUB 30420:PRINT #1," Tapez le No de code du titre choisi donn";EA$;" dans l'option TITRES":CBI$=""
11490 GOSUB 30470:GOSUB 30480
11500 GOSUB 30430:GOSUB 30460
11510 X=14:CBI$=CBI$+A$:Y=Y+1:GOSUB 30420:PRINT #1,A$;
11520 IF A$="#" THEN 11470
11530 IF LEN(CBI$)>0 AND RIGHT$(CBI$,1)="*" THEN 11550
11540 GOTO 11500
11550 FIC1$="BP":FIC2$="BP.FI":GOSUB 8420
11556 CBI$=LEFT$(CBI$,LEN(CBI$)-1):RE$="":DTE$="":U=0
11557 LPRINT CBI$;" pour ";AD$(1):X=1:Y=1
11560 FOR N=1 TO LOF(3)/XI
11570 GET #3,N
11580 RE$=V$(1):DTE$=V$(6)
11590 IF INSTR(RE$,CBI$)<>0  AND V$(6)=STRING$(10,32) THEN  GOSUB 11800:LSET V$(5)=AD$(1):LSET V$(6)=DATF$:PUT#3,N :N=LOF(3)/X:GOTO 11600
11595 IF INSTR(RE$,CBI$)<>0 AND V$(6)<>STRING$(10,32) THEN GOSUB 11700
11600 NEXT N
11605 IF U=1 THEN 11620
11610 X=20:Y=7:GOSUB 30420:PRINT #1,"Erreur de titre !..Recommencez ..":W=2:GOSUB 30520
11620 CLOSE#2:CLOSE#3:GOTO 11200
11700 GOSUB 30410:X=1:Y=1:GOSUB 30420:PRINT #1,"INDISPONIBLE":X=X+1:Y=1:GOSUB 30420:PRINT #1,"Vous avez choisi:":X=X+1:Y=1:GOSUB 30420:PRINT #1,LEFT$(V$(3),39):X=X+1:Y=1:GOSUB 30420:PRINT #1,V$(4):U=U+1:W=3:GOSUB 30520:RETURN
11800 GOSUB 30410:X=1:Y=1:GOSUB 30420:PRINT #1,"CHOIX ENREGISTRE":X=X+1:Y=1:GOSUB 30420:PRINT #1,"Vous avez choisi:":X=X+1:Y=1:GOSUB 30420:PRINT #1,LEFT$(V$(3),39):X=X+1:Y=1:GOSUB 30420:PRINT #1," de ";V$(4):W=3:GOSUB 30520:U=U+1:RETURN
11900 GOTO 140
20000 'DIALOGUE EN DIRECT   *****************
20005 LOCATE 15,15:COLOR 18,0:PRINT"ATTENTION DIALOGUE EN DIRECT----> Appuyez sur une touche"
20010 GOSUB 30410:X=4:Y=1:GOSUB 30420:PRINT#1,DH$;"ATTENDEZ JE VAIS VOIR S'IL Y A QUELQU'UN...";RT$
20015 'PLAY"MB CD EFG"
20020 PLAY"O3 L4 C L2 EE L8 E L4 EE D C F L1 L4"
20030 FOR I=1 TO 100:BEEP
20040 IF INKEY$<>"" THEN 20050 ELSE NEXT
20042 GOSUB 30410
20045 PRINT#1,CLI$;"DESOLE IL N'Y A PERSONNE !.........                    AUREVOIR*******>";RT$:W=3:GOSUB 30520:COLOR 2,0:CLS:GOTO 140
20050 GOSUB 30410:X=5:Y=5:GOSUB 21000:PRINT#1,"BONJOUR ! C'EST LE ";DATF$;"               NOUS ALLONS DIALOGUER  EN DIRECT     *******> A VOUS.":GOSUB 30470:GOSUB 30500
20055 Y=5:X=9
20060 GOSUB 30430:GOSUB 30460
20065 IF X=20 THEN GOSUB 30410:GOTO 20050
20070 IF ASC(A$)=19 THEN GOSUB 32030
20075 IF A$="#" THEN COLOR 2,0:CLS:GOTO 140
20080 DIA$=DIA$+A$:GOSUB 21000:PRINT#1,DIA$;
20090 IF RIGHT$(DIA$,1)<> "*" THEN 20060
20100 IF RIGHT$(DIA$,1)="*" THEN COLOR 2,0:PRINT DIA$:DIA$=""
20110 INPUT "DIALOGUE:";ODIA$:DI=LEN(ODIA$):A$="":FOR I=1 TO DI:A$=MID$(ODIA$,I,1):GOSUB 40000:ODIALO$=ODIALO$+A$:A$="":NEXT I
20120 X=X+2:GOSUB 21000:PRINT#1,ODIALO$;"*******>";"A VOUS....":FOR I=1 TO 10:PRINT#1,CHR$(7):NEXT:GOSUB 21000:X=X+2:Y=1:ODIALO$=""
20121 IF X=>20 THEN W=3:GOSUB 30520:X=1:GOSUB 30410:GOTO 20050
20122 GOTO 20060
20900 END
21000 PRINT #1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN
21010 PRINT #1,CHR$(12):RETURN
21900 END
25000 K=0:A$="":'inscriptions journees pedagogiques 1990
25010 PRINT #1,CHR$(12):MOT$=""
25015 X=5:Y=5:GOSUB 26360:PRINT #1,CHR$(27);CHR$(78);CHR$(27);CHR$(72);"***JOURNEES***      PEDAGOGIQUES 1991       ***":GOSUB 26360
25020 X=10:Y=1:GOSUB 26360:PRINT #1,CHR$(27);CHR$(77);"ECRIVEZ VOTRE NOM :(en majuscule)":GOSUB 30470
25030 GOSUB 30430:GOSUB 30460
25050 IF ASC(A$)=19 THEN 32030
25060 IF ASC(A$)<>19 THEN 25080
25070 GOTO 25030
25080 MOT$=MOT$+A$:X=15:Y=1:GOSUB 26360:PRINT#1,CHR$(27);CHR$(15);MOT$:GOSUB 26360
25090 IF RIGHT$(MOT$,1)<> "*" THEN 25030
25100 IF RIGHT$(MOT$,1)= "*" THEN PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(27);"O";LEFT$(MOT$,LEN(MOT$)-1)
25130 X=20:Y=10:GOSUB 26360:PRINT #1,CHR$(27);CHR$(78);"CONFIRMER (O/N)"
25140 GOSUB 30430:GOSUB 30460
25160 IF ASC(A$)=19 THEN 32030
25170 IF ASC(A$)<>19 THEN 25190
25180 GOTO 25140
25190 IF A$="O" THEN 25200 ELSE MOT$="":A$="":GOTO 25010
25200 GOSUB 26370:X=20:Y=20:GOSUB 26360:PRINT #1,CHR$(27);CHR$(76);CHR$(27);CHR$(93);"tapez sur une touche."
25210 GOSUB 30430:GOSUB 30460
25215 GOSUB 26390
25220 NOM$=LEFT$(MOT$,LEN(MOT$)-1)
25225 X$=NOM$
25226 GOSUB 50390
25230 MOT$="":A$=" ":X=10:Y=4:GOSUB 26360:PRINT #1,CHR$(27);CHR$(77);"ECRIVEZ votre ANNEE de NAISSANCE:     (4 chiffres par ex.1950)":GOSUB 26360
25240 GOSUB 30430:GOSUB 30460
25250 IF ASC(A$)=19 THEN 32030
25260 IF ASC(A$)<>19 THEN 25270
25270 IF A$< "0" OR A$>"9" THEN 25230
25280 MOT$=MOT$+A$:X=15:Y=15:GOSUB 26360:PRINT#1,CHR$(27);CHR$(15);MOT$:GOSUB 26360
25290 IF LEN(MOT$)<> 4 THEN 25240
25300 IF LEN(MOT$)= 4 THEN PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(27);"O";MOT$
25330 X=20:Y=4:GOSUB 26360:PRINT #1,CHR$(27);CHR$(78);"CONFIRMER (O/N)"
25340 GOSUB 30430:GOSUB 30460
25360 IF ASC(A$)=19 THEN 32030
25370 IF ASC(A$)<>19 THEN 25390
25380 GOTO 25340
25390 IF A$="O" THEN 25400 ELSE MOT$="":A$="":GOTO 25226
25400 GOSUB 26370:X=20:Y=20:GOSUB 26360:PRINT #1,CHR$(27);CHR$(76);CHR$(27);CHR$(93);"tapez sur une touche."
25410 GOSUB 30430:GOSUB 30460
25415 GOSUB 26390
25420 ANE$=MOT$
25421 CLOSE#2:OPEN"CONFER" FOR INPUT AS 2
25422 WHILE NOT EOF(2):S$=INPUT$(1,#2):PRINT#1,S$;:WEND:CLOSE#2
25430 MOT$="":A$="":X=12:Y=4:GOSUB 26360:PRINT#1,DH$;"Ecrivez votre choix de JOURNEE PEDAGOGIQUE 1991:(01-02-03-..-10-11..etc....)":GOSUB 26360
25440 GOSUB 30430:GOSUB 30460
25450 IF ASC(A$)=19 THEN 32030
25460 IF ASC(A$)<>19 THEN 25480
25480 MOT$=MOT$+A$
25485 IF LEN(MOT$) < 2 THEN 25440
25490 X=17:Y=15:GOSUB 26360:PRINT#1,CHR$(27);CHR$(15);MOT$:GOSUB 26360
25495 IF VAL(MOT$)>17 OR VAL(MOT$)<0 THEN 25430
25500 IF LEN(MOT$)= 1 OR LEN(MOT$)=2 THEN PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);CHR$(27);"O";MOT$
25530 X=22:Y=4:GOSUB 26360:PRINT #1,CHR$(27);CHR$(78);"CONFIRMER (O/N)"
25540 GOSUB 30430:GOSUB 30460
25560 IF ASC(A$)=19 THEN 32030
25570 IF ASC(A$)<>19 THEN 25590
25580 GOTO 25540
25590 IF A$="O" THEN 25600 ELSE MOT$="":A$="":GOTO 25430
25600 GOSUB 26370:X=20:Y=20:GOSUB 26360:PRINT #1,CHR$(27);CHR$(76);CHR$(27);CHR$(93);"tapez sur une touche."
25610 GOSUB 30430:GOSUB 30460
25615 GOSUB 26390
25620 JPE$=MOT$
26230 OPEN"R",#3,"C:\INSPECTE\PX3",121:H=0:K=0:RES$="":KC=0
26240 FIELD#3,30 AS M$,4 AS A$,26 AS E$,10 AS S$,14 AS U$,4 AS V$,4 AS O$,4 AS D$,4 AS H$,4 AS G$,8 AS L$,5 AS T$,4 AS P$
26250 NE=LOF(3)/121
26260 FOR I=1 TO NE
26270 GET#3,I
26280 P=INSTR(M$,X$)
26305 PRINT#1,"patientez"
26310 X=3:Y=2:GOSUB 26380:IF P<>0 AND VAL(ANE$)=CVS(A$) THEN PRINT#1,CHR$(27),CHR$(15);"vous ";EC$;"tes ";M$;" vous travaillez ";AA$;" l'";EA$;"cole de ";E$;"secteur de ";S$:KC=KC+1:W=8:GOSUB 30520:PRINT M$:K=I
26312 IF VAL(ANE$)=732 THEN RES$=M$+STR$(CVS(A$))+S$+U$+STR$(CVS(V$))+STR$(CVS(O$))+STR$(CVS(D$))+STR$(CVS(H$))+STR$(CVS(G$))+L$+T$+STR$(CVS(P$))
26315 IF VAL(ANE$)=732 THEN CRI=INSTR(RES$,X$)
26316 IF CRI<>0 AND VAL(ANE$)=732 THEN PRINT #1,RES$:W=8:GOSUB 30520
26322 X=10:Y=2:GOSUB 26380:IF KC=2 THEN PRINT#1,CHR$(27);RT$;"VOUS AVEZ UN HOMONYME RECOMMENCEZ L'OPERATION EN AJOUTANT VOTRE PRENOM A VOTRE NOM     ";IV$;"Retour automatique":W=10:GOSUB 30520:I=NE:CLOSE#3:GOTO 25000
26325 NEXT I
26330 IF VAL(ANE$)=732 THEN CLOSE#3:FOR I=1 TO 200:PRINT#1,CHR$(7):NEXT :W=10:GOSUB 30520:GOTO 140
26331 IF K=0 THEN CLOSE#3:GOTO 26339
26332 GET#3,K
26333 X=VAL(JPE$):LSET P$=MKS$(X)
26334 PUT#3,K
26335 CLOSE #3
26339 X=13:Y=1:GOSUB 50380:IF K=0 THEN PRINT#1,CHR$(27),CHR$(15);"vous avez certainement commis une erreur et donc il faut recommencer l'op";EA$;"ration":FOR I=1 TO 500:PRINT I:NEXT:GOTO 140
26340 X=13:Y=2:GOSUB 50380:PRINT#1,CHR$(27),CHR$(15);"vous avez choisi le groupe No=";VAL(JPE$);"des   journ";EA$;"es p";EA$;"dagogiques 1991":FOR I=1 TO 500:PRINT I:NEXT:GOTO 140
26350 END
26360 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN
26370 PRINT #1,CHR$(12):RETURN
26380 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN
26390 PRINT #1,CHR$(12):RETURN
27000 END
27005 ON ERROR GOTO 27008
27006 CLS:PRINT #1,CHR$(12)
27007 CLOSE 2:OPEN FI$ FOR INPUT AS 2
27008 IF ERR=53 THEN PRINT #1,"Fichier inexistant":RESUME 140
27009 WHILE NOT EOF(2) :A$=INPUT$(1,#2)
27010 IF A$="‚" THEN PRINT#1,CHR$(25)+CHR$(66)+CHR$(101);:GOTO 27090
27015 IF A$="ˆ" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(101);:GOTO 27090
27016 IF A$="‰" THEN PRINT#1,CHR$(25)+CHR$(72)+CHR$(101);:GOTO 27090
27020 IF A$="Š" THEN PRINT#1,CHR$(25)+CHR$(65)+CHR$(101);:GOTO 27090
27025 IF A$="—" THEN PRINT#1,CHR$(25)+CHR$(65)+CHR$(117);:GOTO 27090
27026 IF A$="–" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(117);:GOTO 27090
27027 IF A$="ƒ" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(97);:GOTO 27090
27030 IF A$="Œ" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(105);:GOTO 27090
27035 IF A$="‹" THEN PRINT#1,CHR$(25)+CHR$(72)+CHR$(105);:GOTO 27090
27036 IF A$="‡" THEN PRINT#1,CHR$(25)+CHR$(75)+CHR$(99);:GOTO 27090
27040 IF A$="“" THEN PRINT#1,CHR$(25)+CHR$(67)+CHR$(111);:GOTO 27090
27070 IF A$="…" THEN PRINT#1,CHR$(25)+CHR$(65)+CHR$(97);:GOTO 27090
27074 IF A$="\" AND RIGHT$(FI$,1)="T" THEN W=15:GOSUB 30520:GOSUB 30410:GOTO 27009
27080 PRINT#1,A$;
27090 WEND:CLOSE#2:RETURN
27095 FOR I=1 TO 150:PRINT#1,CHR$(7):NEXT:RETURN
30400 'Routines MINITEL++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30410 PRINT #1,CHR$(12):RETURN:'nettoyage ‚cran
30420 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN:'‚quivalent locate gwbasic
30430 RETURN:'Mise du curseur … 0
30440 X=23:Y=12:GOSUB 30420:PRINT#1,IV$;"Patientez..":RETURN:'temporisation affichage
30450 X=24:Y=5:GOSUB 30420:PRINT#1,CLI$;"*Touche interdite!.*":W=3:GOSUB 30520:GOSUB 27095:RETURN:'erreur de frappe
30460 W=20:TE!=TIMER:WHILE TIMER<TE!+W :IF EOF(1) THEN WEND:GOTO 140:ELSE A$=INPUT$(1,#1):RETURN:'temporisation dans la saisie des donn‚es et commande de d‚connexion ou retour au menu
30465 X=24:Y=14:GOSUB 30420:PRINT#1,"Pour achever";IV$;" ENVOI ":RETURN
30470 X=20:Y=14:GOSUB 30420:PRINT#1,RT$;"Pour achever";IV$;" Appuyer sur * ":RETURN
30480 X=21:Y=14:GOSUB 30420:PRINT#1,"Pour Corriger Appuyer sur # ":RETURN
30490 X=22:Y=19:GOSUB 30420:PRINT#1,"Pour continuer";IV$;" SUITE":RETURN
30500 X=21:Y=2:GOSUB 30420:PRINT#1,"Pour revenir au Menu";IV$;" SOMMAIRE":RETURN
30510 X=23:Y=15:GOSUB 30420:PRINT#1,"Pour corriger";IV$;" CORRECTION":RETURN
30520 TE!=TIMER :'Temporisation
30530 WHILE TIMER<TE!+W:WEND:'Temporisation
30540 W=0:PRINT"TEMPORISATION REALISEE":RETURN:'Temporisation
30550 IF ASC(A$)=19 THEN A$=INPUT$(1,#1):RETURN:'TEST pour les touches:ENVOI(A),SUITE(H)-RETOUR(B)-CORRECTION(G)-GUIDE(D)-SOMMAIRE(F)-ANNULATION(E)-REPETITION(C)-CONNEXION-FIN(I)
30560 '*******************Page de d‚connexion******************************
30565 GOSUB 30410:X=5:Y=5:GOSUB 30420:PRINT#1,DB$;"AU REVOIR..."
30568 X=10:Y=8:GOSUB 30420:PRINT#1,SLD$;" Votre MESSAGE a ";EA$;"t";EA$;" enregistr";EA$;".. "
30570 X=17:Y=8:GOSUB 30420:PRINT#1,CLI$;DL$;" ";AA$;" bient";OC$;"t";" !!!..."
30572 X=23:Y=10:GOSUB 30420:PRINT#1,IV$;"Logiciel ";EA$;"volutif Roger Boudy"
30575 GOSUB 33000:'Ouverture et
30576 GOSUB 33040:'Ecriture et fermeture du fichier comptage et enregistrement du nb. d'appels
30580 PRINT#1,CHR$(27);"9";"g":CLOSE:GOTO 120 :'d‚connexion
31500 '***************Routine test touche CORRECTION***********************
32000 GOSUB 30460
32005 V=Y:Z=X
32010 IF A$="G" THEN DIALO$=LEFT$(DIALO$,LEN(DIALO$)-1):PRINT#1,CHR$(13);CHR$(24):Y=0:X=Z:GOSUB 30420:PRINT#1,DIALO$:A$="":Y=V-2:X=Z:RETURN
32011 '******TEST touches ENVOI et SUITE et SOMMAIRE
32015 GOSUB 30460
32016 IF A$="A" THEN 4270
32017 IF A$="H" THEN X=X+1:Y=0:A$=""
32018 IF A$="G" THEN GOSUB 32005
32019 IF A$="F" THEN 140
32020 RETURN
32025 'Test pour les touches:ENVOI(A),SUITE(H)-RETOUR(B)-CORRECTION(G)-GUIDE(D)-SOMMAIRE(F)-ANNULATION(E)-REPETITION(C)-CONNEXION-FIN(I)
32030 GOSUB 30460
32031 IF A$="A" OR A$="H" OR A$="B" OR A$="G" OR A$="C" OR A$="D" OR A$="I" OR A$="E" OR A$="S" OR A$="Y" THEN GOSUB 30450:GOTO 140
32032 IF A$="F" THEN 140
32033 RETURN
32050 '****g‚n‚ration d'un nombre al‚atoire*******************
32060 RANDOMIZE TIMER
32070 DEF FN A$(A)=MID$(STR$(A),2)
32080 A=INT(10*RND):IF A>5 OR A=0 THEN 32060
32090 RETURN
33000 '*******FICHIER DE COMPTAGE*****************************************
33010 CLOSE#3:OPEN"R",#3,"NOMB.MSG",6:FIELD #3,6 AS NOMB$:RETURN
33020 GET#3,1:AP=CVI(NOMB$)
33030 GET#3,2:E=CVI(NOMB$):RETURN
33040 LSET NOMB$=MKI$(AP):PUT#3,1
33050 LSET NOMB$=MKI$(E):PUT#3,2:CLOSE#3:RETURN
40000 IF A$="‚" THEN A$=EA$
40010 IF A$="ˆ" THEN A$=EC$
40020 IF A$="‰" THEN A$=ET$
40030 IF A$="Š" THEN A$=EG$
40040 IF A$="Œ" THEN A$=IC$
40050 IF A$="‹" THEN A$=IT$
40060 IF A$="“" THEN A$=OC$
40070 IF A$="…" THEN A$=AA$
40080 RETURN
45000 '******tarif connexion*********************
45010 FIN=VAL(LEFT$(TIME$,2))+VAL(MID$(TIME$,4,2))/60+VAL(RIGHT$(TIME$,2))/3600
45020 DURE=FIN-DEBUT
45030 TAXE1=DURE/(24/3600)
45040 IF TAXE1-INT(TAXE1)=>.4 THEN TAXE1=INT(TAXE1)+1:GOTO 45060
45050 TAXE1=INT(TAXE1)
45060 TAXE2=DURE/(17/3600)
45065 TAXE3=DURE/(6/60):TAXE3=INT(TAXE3):IF TAXE3=0 THEN TAXE3=1
45066 TAXE4=DURE/(9/60):TAXE4=INT(TAXE4):IF TAXE4=0 THEN TAXE4=1
45070 IF TAXE2-INT(TAXE2)=>.28 THEN TAXE2=INT(TAXE2)+1:GOTO 45085
45080 TAXE2=INT(TAXE2)
45085 TARIF1=TAXE1*.73:TARIF2=TAXE2*.73:TARIF3=TAXE3*.73
45090 IF (VAL(LEFT$(TIME$,2))=>12 AND VAL(MID$(TIME$,4,2))=>30) AND (VAL(LEFT$(TIME$,2))=<13 AND VAL(MID$(TIME$,4,2))=<30) OR VAL(LEFT$(TIME$,2))=>18 THEN TARIF1=.7*TARIF1:TARIF2=.7*TARIF2:TARIF4=TAXE4*.73
45100 X=5:Y=1:GOSUB 30420:PRINT#1,CLI$;"Tarif dist.<100km=";:PRINT#1,USING"###.##";TARIF1;:PRINT#1,"F. ";"Nb.Taxes=";TAXE1
45110 X=6:Y=1:GOSUB 30420:PRINT#1,CLI$;"Tarif dist.>100km=";:PRINT#1,USING"###.##";TARIF2;:PRINT#1,"F. ";"Nb.Taxes=";TAXE2
45115 X=7:Y=1:GOSUB 30420:PRINT#1,CLI$;"  circonscription=";:PRINT#1,USING"###.##";TARIF3;:PRINT#1,"F. ";"Nb.Taxes=";TAXE3;"  tarif r";EA$;"duit=";TARIF4;"F."
45120 RETURN
50380 PRINT#1,CHR$(31);CHR$(X+64);CHR$(Y+64);:RETURN
50390 PRINT #1,CHR$(12):RETURN
52000 RESUME
