[DIALOG d_pages]
300,100
src.closealldialogs
PAGE 0
resizepic 20 20 3500 250 420
checkertrans 20 20 250 420
dtext 80 30 2010 <SERV.SERVNAME> Page System
dtext 40 70 0ad Account:
dtext 90 70 1152 <serv.gmpage.<ctag0.page>.account>
dtext 40 90 0ad Position:
dtext 90 90 1152 <serv.gmpage.<ctag0.page>.p>
dtext 40 110 0ad Player:
dtext 90 110 1152 <serv.gmpage.<ctag0.page>.status>
dtext 40 130 0ad Time:
dtext 90 130 1152 <eval <serv.gmpage.<ctag0.page>.time>>
dtext 40 150 0ad Reason:
dhtmlgump 50 170 190 150 1 1 <serv.gmpage.<ctag0.page>.reason>
button 180 90 4005 4006 1 0 1
button 220 360 4005 4006 1 0 2
dtext 190 335 39 Page <eval <ctag0.page>+1>
button 180 111 4005 4006 1 0 3
button 40 350 2311 2312 1 0 4
button 170 360 4016 4015 1 0 5
button 170 400 4005 4006 1 0 6
dtext 200 400 88 Answer
dtext 45 370 88 Delete

[DIALOG d_pages BUTTON]
ON=0
ctag.page=

ON=1
GO <serv.gmpage.<ctag0.page>.p>
ctag.page=

ON=2
IF (strcmpi(<serv.gmpage.<eval 0<ctag.page>+1>.account>,0))
ctag0.page ++
sDIALOG d_pages
ELSE
ctag.page=0
sDIALOG d_pages
ENDIF

ON=3
find <serv.gmpage.<ctag0.page>.status>
ctag.page=

ON=4
try gmpage.<ctag0.page>.handle
try gmpage.<ctag0.page>.d
ctag.page=

ON=5
IF (strcmpi(<serv.gmpage.<eval <ctag0.page>-1>.account>,0))
ctag0.page --
sDIALOG d_pages
return 1
ENDIF
ctag.page=0
sDIALOG d_pages

ON=6
sDIALOG d_pages_resp

[PLEVEL 2]
pages
responder

[FUNCTION responder]
SDIALOG d_pages_resp

[function pages]
IF !(strcmpi(<serv.gmpage.0.account>,0))
sysmessage @033 No pages at the moment.
return 1
endif
sDIALOG d_pages

///////////////////////////////

[DIALOG d_pages_resp]
400,250
src.closealldialogs
PAGE 0
resizepic 0 0 3500 300 300
checkertrans 0 0 300 300
dtext 90 10 2010 <SERV.SERVNAME> Page System
dtext 120 30 2010 Answer:
resizepic 10 50 3500 280 200
dtextentry 30 60 250 150 55 0
button 120 260 2311 2312 1 0 1

[DIALOG d_pages_resp BUTTON]
ON=1
IF !(<ISEMPTY <ARGTXT[0]>>)
TARGETF page_resp <ARGTXT[0]>
SYSMESSAGE @033,3,1 Which player do you want to give this answer to?
ENDIF

//////////////////////////

[FUNCTION page_resp]
IF (<ARGO.ISPLAYER>)
ARGO.TAG0.PAGES_RESP.TOTAL ++
TRY ARGO.TAG.PAGES_RESP<EVAL <ARGO.TAG0.PAGES_RESP.TOTAL>>=<ARGS>
TRYSRC <ARGO> SRC.DIALOGCLOSE d_pages_resp_alerta
ARGO.DIALOG_UP d_pages_resp_alerta
ENDIF

/////////////////////////

[DIALOG d_pages_resp_alerta]
1,550
nomove
noclose
PAGE 0
dtext 85 10 2010 You have <dTAG0.PAGES_RESP.TOTAL> page answers.
button 0 0 2151 2152 1 0 1

[DIALOG d_pages_resp_alerta BUTTON]
ON=1
SDIALOG d_pages_resp_alertadois

[DIALOG d_pages_resp_alertadois]
350,200
//src.closealldialogs
PAGE 0
resizepic 0 0 3500 300 300
checkertrans 0 0 300 300
dhtmlgump 20 20 260 220 1 1 Answer: <DEF.BFONT_DGREEN><TAG.PAGES_RESP1>
button 110 260 2311 2312 1 0 1

[DIALOG d_pages_resp_alertadois BUTTON]
ON=0
SDIALOG d_pages_resp_alerta

ON=1
IF (<TAG0.PAGES_RESP.TOTAL> == 1)
TAG.PAGES_RESP1
TAG.PAGES_RESP.TOTAL
SYSMESSAGE You don't have anymore page answers.
ELSE
FOR 1 <TAG.PAGES_RESP.TOTAL>
TRY TAG.PAGES_RESP<EVAL <LOCAL._FOR>>=<TAG.PAGES_RESP<EVAL <LOCAL._FOR>+1>>
ENDFOR
TAG.PAGES_RESP.TOTAL --
SDIALOG d_pages_resp_alertadois
ENDIF

[EOF]