From 3d7696972f5025be9612f87c0fe4203e0859641e Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 23 Jun 2021 13:09:15 -0400 Subject: Single Player pages now rendered in html. Need to actually connect token assignment form. --- captain/web.f90 | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/captain/web.f90 b/captain/web.f90 index ea3127e..c18848e 100644 --- a/captain/web.f90 +++ b/captain/web.f90 @@ -564,10 +564,17 @@ contains type(request), intent(in)::req character(len=:), pointer::res - character(len=PLAYER_NAME_LENGTH)::player_name - integer::n, pid + character(len=PLAYER_NAME_LENGTH)::player_name, instruction_name + character(len=:), pointer::one_link + integer::i, n, pid + integer, dimension(8)::values + integer, dimension(:), pointer::instruction_ids + + character(len=64)::dateconvert call req%last_component(player_name) + i = index(player_name, '.html') + player_name = player_name(1:i-1) pid = get_player_id(trim(player_name)) n = get_instructions_count(player=pid) @@ -576,12 +583,38 @@ contains res = "

"//trim(player_name)//"

" ! Last checkin + call get_last_checkin_time(pid, values) + write(dateconvert, '(I4,A1,I0.2,A1,I0.2,3X,I2,A1,I0.2,A1,I0.2)') & + values(1), '-', values(2), '-', values(3), & + values(5), ':', values(6), ':', values(7) + res = trim(res)//new_line(' ')//'

Last Checkin: '//trim(dateconvert)//& + '

' ! List of instructions + res = trim(res)//new_line(' ')//"

Instructions for "//trim(player_name)//"

" + instruction_ids => get_instruction_ids(player=pid) + if(associated(instruction_ids)) then + res = trim(res)//new_line(' ')//"" + deallocate(instruction_ids) + else + res = trim(res)//"

None Yet

" + end if ! Token assignment - + res = trim(res)//new_line(' ')//"

Security

"//new_line(' ')// & + '
'//new_line(' ')// & + ''// & + ''//new_line(' ')// & + ''//new_line(' ')// & + '
' end function generate_one_player_html @@ -857,6 +890,7 @@ contains character(len=:), pointer::contents character(128)::job_page_title + integer::i if(trim(req%location) == "/" .or. & trim(req%location) == "/index.html" .or. & @@ -907,6 +941,13 @@ contains call page%assign('contents', contents) else if(req%location(1:9) == '/players/') then + + call req%last_component(job_page_title) + i = index(job_page_title, '.', back=.true.) + + call page%assign('title', job_page_title(1:i-1)) + contents => generate_one_player_html(req) + call page%assign('contents', contents) else if(trim(req%location) == "/about.html") then -- cgit v1.2.3