Her er (næsten) hele siden, som sådan fungerer fint. Men jeg får ikke markeret buttons med class="info" for den enkelte user. Kun hvad jeg har foretaget af valg, og det er valget af den user, man vælger i selectboksen, som skal vises:
<!-- #include virtual="/includes/lb_data.asp" -->
<!-- #include virtual="/includes/lb_functions.asp" -->
<!-- #include virtual="/includes/lb_protect.asp" -->
<html lang="da" dir="ltr" class="no-js controlpanel loggedin">
<%
Dim pageID, bugURL, SessionUser
pageID = 100
bugURL = "
https://www.frokosttavlen.clientside.dk/dk/" Dim RS1200, RSusers
Set RS1200 = Conn.Execute("SELECT * FROM users WHERE status = 200 ORDER BY category, username ASC")
Set RSusers = Conn.Execute("SELECT * FROM users ORDER BY category, username ASC")
If UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" Then
Dim vUser, ActiveChoise, SQL
vUser = Request.Form("chooseuser")
ActiveChoise = Request.Form("ActiveChoise")
SQL = Conn.Execute("UPDATE users SET status =" & ActiveChoise & " WHERE username = '" & vUser & "'")
Response.Redirect("/dk/")
End If
%>
<head>
<!-- #include virtual="/includes/header.asp" -->
<title></title>
</head>
<body>
<div class="grid-container contain">
<div class="grid-header">
<!-- #include virtual="/includes/banner.asp" -->
</div>
<div class="container mb-4">
<div class="row">
<div class="col-md-3 d-print-none">
<div id="controlpanel-menu" class="mt-3">
<!-- #include virtual="/includes/lb_menu.asp" -->
</div>
</div>
<div class="col-md-6">
<div id="controlpanel-content" class="mt-3">
<h1>Frokosttavlen</h1>
<p class="lead">Vælg din pause ved at trykke på knapperne til højre.</p>
<div class="row mb-4">
<div class="col-lg-12 d-none d-md-block">
<div class="container">
<div class="row">
<div class="table-responsive-lg">
<table class="table table-striped table-hover table-bordered-columns" id="ownevents">
<thead>
<tr class="border-0">
<span class="lead"><strong>RETAIL</strong></span>
</tr>
<tr class="border-0">
<th class="text-center"><span id="1200" class="lead"></span><br>12:00 - 12:30</th>
<th class="text-center"><span id="1230" class="lead"></span><br>12:30 - 13:00</th>
<th class="text-center"><span id="1300" class="lead"></span><br>13:00 - 13:30</th>
</tr>
</thead>
<tbody class="list align-items-center">
<%
If RS1200.EOF AND RS1230.EOF AND RS1300.EOF Then
%>
<tr>
<td class="reference text-nowrap">
-
</td>
<td class="reference text-nowrap">
-
</td>
<td class="reference text-nowrap">
-
</td>
</tr>
<%
End If
If Not RS1200.EOF OR RS1200.EOF OR RS1230.EOF OR RS1300.EOF Then
Do Until RS1200.EOF AND RS1230.EOF AND RS1300.EOF
%>
<tr>
<%
If RS1200.EOF Then
%>
<td class="reference text-nowrap">
-
</td>
<%
ElseIf Not RS1200.EOF Then
%>
<td name="1200" class="reference text-nowrap">
<svg height="14" width="14"><circle cx="7" cy="7" r="7" stroke="black" stroke-width="1" fill="<% If RS1200("category") = 1 Then %>green<% ElseIf RS1200("category") = 2 Then %>yellow<% Else %>red<% End If %>"></svg> <span class="mt-2"><%=RS1200("username")%></span>
</td>
<%
End If
If RS1230.EOF Then
%>
<td class="reference text-nowrap">
-
</td>
<%
Else
%>
<td class="reference text-nowrap">
<svg height="14" width="14"><circle cx="7" cy="7" r="7" stroke="black" stroke-width="1" fill="<% If RS1230("category") = 1 Then %>green<% ElseIf RS1230("category") = 2 Then %>yellow<% Else %>red<% End If %>"></svg> <%=RS1230("username")%>
</td>
<%
End If
If RS1300.EOF Then
%>
<td class="reference text-nowrap">
-
</td>
<%
Else
%>
<td class="reference text-nowrap">
<svg height="14" width="14"><circle cx="7" cy="7" r="7" stroke="black" stroke-width="1" fill="<% If RS1300("category") = 1 Then %>green<% ElseIf RS1300("category") = 2 Then %>yellow<% Else %>red<% End If %>"></svg> <%=RS1300("username")%>
</td>
<%
End If
%>
</tr>
<%
If Not RS1200.EOF Then
RS1200.MoveNext
End If
If Not RS1230.EOF Then
RS1230.MoveNext
End If
If Not RS1300.EOF Then
RS1300.MoveNext
End If
Loop
End If
%>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3 card bg-light mt-4">
<div class="card-body col-md-12">
<form name="choosepause" action="/dk/" method="post">
<div class="col-md-12 mb-3">
<select name="chooseuser" id="chooseuser" class="form-select">
<%'<select name="chooseuser" id="chooseuser" onchange="location.href=this.options[this.selectedIndex].value;" class="form-select">%>
<%
If Not RSusers.EOF Then
Do Until RSusers.EOF
%>
<option value="<%=RSusers("username")%>"<% If RSusers("username") = SQLEncode(Session("username")) Then %> selected<% End If %>><%=RSusers("username")%></option>
<%
RSusers.MoveNext
Loop
End If
%>
</select>
</div><%=ActiveChoise%>
<div class="d-flex justify-content-between align-items-center flex-column flex-lg-row mb-3">
<div class="col-md-12">
<button type="submit" name="ActiveChoise" value="100" class="btn btn-primary btn-block btn-lg" onclick="this.form.submit();">JEG HAR FRI</button>
</div>
</div>
<div class="d-flex justify-content-between align-items-center flex-column flex-lg-row">
<div class="form-group row">
<div class="col-md-4 mb-1">
<button type="submit" name="ActiveChoise" value="200" class="btn btn-<% If RS1200currentuser("status") = 200 Then %>info<% Else %>primary<% End If %> btn-block btn-lg" onclick="this.form.submit();">12:00</button>
</div>
<div class="col-md-4">
<button type="submit" name="ActiveChoise" value="300" class="btn btn-<% If RS1230currentuser("status") = 300 Then %>info<% Else %>primary<% End If %> btn-block btn-lg" onclick="this.form.submit();">12:30</button>
</div>
<div class="col-md-4">
<button type="submit" name="ActiveChoise" value="400" class="btn btn-<% If RS1300currentuser("status") = 400 Then %>info<% Else %>primary<% End If %> btn-block btn-lg" onclick="this.form.submit();">13:00</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="push"></div>
</div>
<!-- #include virtual="/includes/footer.asp" -->
</body>
</html>