aboutsummaryrefslogtreecommitdiff
path: root/captain/web.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-12 14:21:05 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-12 14:21:05 -0400
commitc5a514ac0d29a58a79a708771fe4b2a16d400031 (patch)
tree20840ea805ed2c9998575e239c7cb7644fae8531 /captain/web.f90
parent9ac19f108c1b69025572bf32e310b332ef098c98 (diff)
downloadlevitating-c5a514ac0d29a58a79a708771fe4b2a16d400031.tar.gz
levitating-c5a514ac0d29a58a79a708771fe4b2a16d400031.zip
Added some CSS styling. Fixed checks for zero-length pointers since it seems to freak out Fortran.
Diffstat (limited to 'captain/web.f90')
-rw-r--r--captain/web.f909
1 files changed, 4 insertions, 5 deletions
diff --git a/captain/web.f90 b/captain/web.f90
index dab017a..66718b5 100644
--- a/captain/web.f90
+++ b/captain/web.f90
@@ -546,6 +546,7 @@ contains
use server_response, only:request, response
use http, only: HTTP_CODE_SUCCESS, HTTP_CODE_NOTFOUND
use request_utils, only: get_job_page_title, handle_instruction_command
+ use captain_db, only: scan_instructions_for_db
implicit none
type(request), intent(in)::req
@@ -596,9 +597,9 @@ contains
else if(trim(req%location) == "/instructions.html") then
- if(associated(req%query_string) .and. len_trim(req%query_string) > 0) then
+ if(associated(req%query_string) ) then
if(trim(req%query_string) == "scan") then
-
+ call scan_instructions_for_db()
end if
end if
@@ -608,7 +609,7 @@ contains
else if(trim(first) == "instructions") then
- if(associated(req%query_string) .and. len_trim(req%query_string) > 0) then
+ if(associated(req%query_string)) then
call handle_instruction_command(req)
end if
@@ -676,12 +677,10 @@ contains
call req%path_component(1, category)
if(trim(category) == "players") then
call req%path_component(2, second)
- call write_log("Handling command for players: "//trim(second), LOG_INFO)
! Add a player
if(trim(second) == "add.html") then
-
call add_player_db(posted%get_value("name"))
call page%assign('destination', 'players.html')