This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/LGPL/pillow/examples/phones.pl
vsc e5f4633c39 This commit was generated by cvs2svn to compensate for changes in r4,
which included commits to RCS files with non-trunk default branches.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@5 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2001-04-09 19:54:03 +00:00

32 lines
797 B
Prolog

:- use_package(pillow).
main :-
get_form_input(Input),
get_form_value(Input,person_name,Name),
response(Name,Response),
output_html([
cgi_reply,
start,
title('Telephone database'),
heading(2,'Telephone database'),
--,
Response,
start_form,
'Click here, enter name of clip member, and press Return:',
\\,
input(text,[name=person_name,size=20]),
end_form,
end]).
response(Name, Response) :-
form_empty_value(Name) ->
Response = []
; phone(Name, Phone) ->
Response = ['Telephone number of ',b(Name),': ',Phone,$]
; Response = ['No telephone number available for ',b(Name),'.',$].
phone(daniel, '336-7448').
phone(manuel, '336-7435').
phone(sacha, '543-5316').