home *** CD-ROM | disk | FTP | other *** search
- program wywall;
- uses ddplus,crt,ddscott,ibbs5;
- type userdata=record
- username:string[35];
- mesgdate:string[8];
- mesgtime:string[5];
- wholocat:string[35];
- text:array[1..5] of string[80];
- end;
- {$I d:\bp\ddplus\struct.250}
- var u,u2:userdata;f,f2:file of userdata;s:string;i,m:integer;ch,ch1:char;txtstr:array[1..5] of string;filepos:integer;
- isold:boolean;c:char;str,str1:string;
- FromF, ToF: file;isexit:boolean;
- NumRead, NumWritten: Word;
- Buf: array[1..2048] of Char;
- posi:integer;
- procedure filecopy;
- begin
- if exist('temp.dat') then
- begin
- Assign(FromF,'temp.dat'); { Open input file }
- Reset(FromF, 1); { Record size = 1 }
- Assign(ToF,'wywall.dat'); { Open output file }
- Rewrite(ToF, 1); { Record size = 1 }
- repeat
- BlockRead(FromF, Buf, SizeOf(Buf), NumRead);
- BlockWrite(ToF, Buf, NumRead, NumWritten);
- until (NumRead = 0) or (NumWritten <> NumRead);
- erase(fromf);
- Close(FromF);
- Close(ToF);
- end;
- end;
-
- begin
- initdoordriver('wywall.ctl');
- i:=0;
- if paramcount<>0 then if paramstr(1)='-r' then begin
- sclrscr;
- set_color(11,0);
- sgoto_xy(1,24);
- swrite('─·╧╓╘┌╧δ┐┤┤≤╝╥╡─┴⌠╤╘┬≡?(Y/n)');
- sread_char(ch);
- if (upcase(ch)='Y') or (ch=#13) then begin end else halt;
- end;
- begin
- repeat
- showmenu(ch,'wywall.ans');
- case ch of
- 'r','R':begin
- if exist('wywall.dat') then begin assign(f,'wywall.dat');reset(f);end
- else begin halt;end;
- displayfile2('hqwrbg.ans');
- isexit:=false;
- posi:=1;
- while (not eof(f)) and (not isexit) do
- begin
- read(f,u);
- set_color(14,1);
- for i:=1 to 6 do begin sgoto_xy(7,13+i);
- swrite(' ');end;
- sgoto_xy(5,14);
- str:=u.username;
- str1:=namelocase(str);
- swriteln('╘┌ '+u.mesgdate+' '+u.mesgtime+' ╡─╩▒║≥, '+str1+' ╦╡ ');;
- set_color(11,1);
- for i:=1 to 5 do begin sgoto_xy(7,14+i);swriteln(u.text[i]);end;
- set_color(10,1);
- swritexy(56,20,'╚╬╥Γ╝ⁿ╝╠╨° ESC╝ⁿ╖╡╗╪');
- sread_char(c);if c=#27 then isexit:=true;
- { if (c='n') and (posi=1) then reset(f) else
- begin
- inc(posi);
- if (c='n') and (posi<>1) then begin dec(posi,2);reset(f);seek(f,posi);
- end else {begin inc(posi);reset(f);seek(f,posi);end;inc(posi);end;}
- end;
- close(f);
- end;
- 'w','W':begin
- displayfile2('hqwrbg.ans');
- if exist('wywall.dat') then begin assign(f,'wywall.dat');reset(f);{seek(f,filesize(f));}end
- else begin assign(f,'wywall.dat'); rewrite(f);end;
- str:=user_first_name+' '+user_last_name;
- str:=namelocase(str);
- filepos:=0;
- isold:=true;
- while (not eof(f)) and isold do
- begin read(f,u);inc(filepos);if upstr(u.username)=upstr(str) then isold:=false;end;
- if isold then begin
- u.username:=str;
- str:=user_first_name+' '+user_last_name;
- str1:=namelocase(str);
- u.mesgdate:=copy(Gettodaydate,1,8);
- u.mesgtime:=copy(Gettodaytime,1,5);
- sgoto_xy(5,14);
- set_color(14,1);
- swriteln('╘┌ '+u.mesgdate+' '+u.mesgtime+' ╡─╩▒║≥, '+str1+' ╦╡ ');;
- seek(f,filesize(f));
- for i:=1 to 5 do
- begin
- sgoto_xy(8,14+i);
- set_color(14,1);
- swrite('╨╨'+cstr(i)+': ');
- sgoto_xy(12,14+i);
- set_color(13,1);
- sread(str);
- txtstr[i]:=copy(str,1,80);
- end;
- repeat
- set_color(10,1);
- swritexy(12,20,'┤µ┼╠╖±(Y/N)?');
- sread_char(c);
- until c in['y','Y','n','N'];
- if upcase(c)='Y' then
- begin
- for i:=1 to 5 do u.text[i]:=txtstr[i];
- assign(f2,'temp.dat');
- rewrite(f2);
- write(f2,u);
- reset(f);
- for i:=1 to 19 do begin if not eof(f) then begin read(f,u);write(f2,u);end;end;
- close(f);
- close(f2);
- filecopy;
- assign(f3,'d:\fidonet\ra\text\goodbye.ans');
- rewrite(f3);
-
- end;
- end;
- if not isold then
- begin
- seek(f,filepos-1);
- u.mesgdate:=copy(Gettodaydate,1,8);
- u.mesgtime:=copy(Gettodaytime,1,5);
- u.wholocat:=copy('Guangdong Enping',1,35);
- sgoto_xy(5,14);
- str:=user_first_name+' '+user_last_name;
- str1:=namelocase(str);
- set_color(14,1);
- swriteln('╘┌ '+u.mesgdate+' '+u.mesgtime+' ╡─╩▒║≥, '+str1+' ╦╡ ');;
- for i:=1 to 5 do
- begin
- sgoto_xy(8,14+i);
- set_color(14,1);
- swrite('╨╨'+cstr(i)+': ');
- sgoto_xy(12,14+i);
- set_color(13,1);
- sread(str);
- txtstr[i]:=copy(str,1,80);
- end;
- repeat
- set_color(10,1);
- swritexy(12,20,'┤µ┼╠╖±(Y/N)?');
- sread_char(c);
- until c in['y','Y','n','N'];
- if upcase(c)='Y' then
- begin
- for i:=1 to 5 do u.text[i]:=txtstr[i];
- assign(f2,'temp.dat');
- rewrite(f2);
- write(f2,u);
- reset(f);
- for i:=1 to filepos-1 do begin read(f,u);write(f2,u);end;
- read(f,u);
- for i:=1 to 19 do begin if not eof(f) then begin read(f,u);write(f2,u);end;end;
- close(f);
- close(f2);
- filecopy;
- end;
- end;
- end;
- 'h','H':begin
- sclrscr;
- set_color(13,0);
- swritexy(4,3,'╣╪╙┌▒╛╚φ╝■...');
- swritexy(4,4,'-------------');
- set_color(11,0);
- swritexy(4,5,' ▒╛╚φ╝■╫≈╬¬╕¿╓·╝▄╒╛╓«╙├,╙├╗º╫ε╢α┐╔╥╘┴⌠╤╘5╨╨,╟╥╫ε╢α╓╗▒ú┤µ20╠⌡╫ε╨┬┴⌠╤╘');
- swritexy(4,6,'╒Γ╩╟╥≥╬¬╗╣┐╝┬╟╡╜╙├╗º╔╧╧▀╡─═ú┴⌠╩▒╝Σ╬╩╠Γ.╙├╗º┐╔╥╘░╤─·╔╧╒╛╩▒╧δ╡╜╡─┴Θ╕╨╗≡╗¿');
- swritexy(4,7,'╖╜▒π╡╪╝╟╘┌┴⌠╤╘░σ╔╧,╚├╞Σ╦√╙├╗º┐╔╥╘╖╓╧φ─·╡─┴⌠╤╘╔⌡╓┴╞»┴┴╡─╟⌐├√.');
- set_color(13,0);
- swritexy(41,7,'─·╡─┴⌠╤╘');
- set_color(14,0);
- swritexy(53,7,'╞»┴┴╡─╟⌐├√');
- set_color(11,0);
- swritexy(4,8,' ▒╛╚φ╝■╡─╫≈╒▀Xu Xiaoning(╨∞╧■─■),CFIDO╒╛║┼(6:655/808),YO!Net╒╛║┼(7:3');
- swritexy(4,9,'030/1),╗╢╙¡─·╘┌╚╬║╬╥╗╕÷CFido╡─╒╛╠¿╔╧╘┌SUPPORT.CHINA╟°─┌╕° Xu Xiaoning╨┤');
- swritexy(4,10,'╨┼,░╤─·╡─╥Γ╝√║═╜¿╥Θ╖┤└í╕°╬╥, ═¼╩▒╬╥╥▓╗ß░╤╫ε╨┬░µ╡─┴⌠╤╘░σ╛¡CFidoNet╖ó▓╝│÷');
- swritexy(4,11,'╚Ñ╡─,─Γ╝╞╗«╫ε╨┬░µ▒╛╜½╩╡╧╓╢α╒╛╠¿┴⌠╤╘╡─╣ª─▄.');
- set_color(15,0);
- swritexy(4,13,'┴¬╧╡╡τ╗░:0750-7723594');
- swritexy(4,14,'BB╗·:0750-7717888║⌠32000');
- swritexy(4,15,'EMail:jmxxny@pub.jiangmen.gd.cn');
- set_color(10,0);
- swritexy(50,20,'Chance_online ╚φ╝■╣ñ╫≈╩╥');
- sread_char(c);
- end;
- end;
- until upcase(ch)='Q';
- end;
- end.