service { const html Login =

Welcome to MyBookmakrs Area

Enter your user name:

Enter your password: ; const html incorrect =

I'm sorry <[username]>, permission denied!

; const html Update =

BookMark Service


BookMarks so far:
<[msg0l]><[msg0]>
<[msg1l]><[msg1]>
<[msg2l]><[msg2]>

Add bookmark:


Quit now ; const html ByeBye =

Thanks for visiting, <[username]>.

There have been <[conns]> connections so far.

You added <[msgs]> bookmarks this time. ; string msg0,msg1,msg2, msg3; int connections; session Addr() { string username,password,msg,quit; int written; bool correct; connections = connections+1; correct = false; written = 0; while (!correct) { show Login receive [username = username, password = password]; if ((username == "qxu2" && password == "hello") || (username == "group1" && password == "group1") || (username == "guest" && password == "guest")) correct = true; if (!correct) show plug incorrect [username = username]; } quit = "no"; while (quit!="yes") { show plug Update[msg0 = msg0, msg0l = "", msg1 = msg1, msg1l = "", msg2 = msg2, msg2l = ""] receive[msg = msg, quit = quit]; if (msg!="") { written = written+1; msg0 = msg1; msg1 = msg2; msg2 = msg; } } exit plug ByeBye[username = username, conns = connections, msgs = written]; } }