File: D:/HostingSpaces/RImmers/duitsedog.tk/wwwroot/onderhoud/fotos_volgorde.asp
<%
option explicit
%>
<!-- #INCLUDE VIRTUAL="/includes/inc_default.asp" -->
<!-- #INCLUDE VIRTUAL="/includes/inc_auth.asp" -->
<%
dim intId, strNaam, strSortOrder, strSort, strMsg, Rs, strClass, strDatum, intFotoTypeId
If Request.ServerVariables("CONTENT_LENGTH") <> 0 Then
intFotoTypeId = FormToInt(Request.Form("selTypes"))
If Request.Form("cmdWijzig") <> "" Then
If IsNull(intFotoTypeId) Then
' alle fotos
Set Rs = GetRS("SELECT * FROM DD_FOTOS WHERE TYPE_ID <> 6 AND TYPE_ID <> 1 ")
Else
Set Rs = GetRS("SELECT * FROM DD_FOTOS WHERE TYPE_ID=" & IntToSql(intFotoTypeId))
End If
While Not Rs.EOF
Call UpdateFotoRandomVolgorde(Rs("id"))
Rs.MoveNext
Wend
End If
Else
If Request.QueryString("Mode") = "del" Then
intId = FormToInt(Request.Querystring("Id"))
'strDatum = NestDatum(intId)
'Call VerwijderNest(intId)
'strMsg = "Nest """ & strDatum & """ verwijderd."
End If
intFotoTypeId = FormToInt(Request.QueryString("type_id"))
End If
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/onderhoud.css">
<base target="main">
</head>
<body>
<%
If Request.QueryString("sort")<>"" Then strSort = Request.QueryString("sort") Else strSort = "DD_FOTOS.volgorde" End If
If Request.QueryString("order")<>"" Then strSortOrder = Request.QueryString("order") Else strSortOrder = "ASC" End If
If Request.QueryString("msg")<>"" Then strMsg = Request.QueryString("msg") End If
%>
<h2>Volgorde Foto's</h2>
<%
If strMsg<>"" Then Response.Write("<p>" & StrToHTML(strMsg) & "</p>") End If
%>
<form method="POST" id="form1" name="form1" action="fotos_volgorde.asp">
<p>
<b>Type</b>
<select name="selTypes" onchange="javascript:form1.submit();">
<option value="">- Alles - </option>
<%
Set Rs = GetRs("select * from DD_FOTO_TYPES ORDER BY Oms")
While Not Rs.EOF
%>
<option <%If intFotoTypeId = Rs("id") Then Response.Write("selected")%> value="<%=Rs("id")%>"><%=Rs("oms")%></option>
<%
Rs.MoveNext
Wend
Rs.Close
%>
</select>
<input type="submit" style="width:100" name="cmdWijzig" value="Wijzig" class="clsBtn">
</p>
<table class="clsDefault" cellSpacing="1">
<tr>
<th width="15"> </th>
<th width="15"> </th>
<th width="150"><%WriteTableHead "Type", "DD_FOTOS.type_id", strSort, strSortOrder, "fotos_volgorde.asp?type_id=" & intFotoTypeId, ""%></th>
<th width="150"><%WriteTableHead "Omschrijving", "DD_FOTOS.oms", strSort, strSortOrder, "fotos_volgorde.asp?type_id=" & intFotoTypeId, ""%></th>
<th width="100"><%WriteTableHead "Datum", "DD_FOTOS.datum", strSort, strSortOrder, "fotos_volgorde.asp?type_id=" & intFotoTypeId, ""%></th>
<th width="60"><%WriteTableHead "Hits", "DD_FOTOS.hits", strSort, strSortOrder, "fotos_volgorde.asp?type_id=" & intFotoTypeId, ""%></th>
<th width="60"><%WriteTableHead "Actief", "DD_FOTOS.ind_actief", strSort, strSortOrder, "fotos_volgorde.asp?type_id=" & intFotoTypeId, ""%></th>
<th width="80"><%WriteTableHead "Volgorde", "DD_FOTOS.volgorde", strSort, strSortOrder, "fotos_volgorde.asp?type_id=" & intFotoTypeId, ""%></th>
</tr>
<%
If IsNull(intFotoTypeId) Then
Set Rs = GetRS("SELECT DD_FOTOS.*, DD_FOTO_TYPES.oms as type_oms FROM DD_FOTOS, DD_FOTO_TYPES WHERE DD_FOTOS.type_id=DD_FOTO_TYPES.id AND DD_FOTOS.TYPE_ID <> 6 AND DD_FOTOS.TYPE_ID <> 1 ORDER BY " & strSort & " " & strSortOrder)
Else
Set Rs = GetRS("SELECT DD_FOTOS.*, DD_FOTO_TYPES.oms as type_oms FROM DD_FOTOS, DD_FOTO_TYPES WHERE DD_FOTOS.type_id=DD_FOTO_TYPES.id AND DD_FOTOS.TYPE_ID = " & IntToSql(intFotoTypeId) & " ORDER BY " & strSort & " " & strSortOrder)
'Set Rs = GetRS("SELECT * FROM DD_FOTOS WHERE TYPE_ID=" & IntToSql(intFotoTypeId) & " ORDER BY " & strSort & " " & strSortOrder)
End If
While Not Rs.EOF
strClass = "clsItemActive"
%>
<tr>
<td class="<%=strClass%>"><a href="wijzig_foto.asp?id=<%=Rs("id")%>"><img SRC="../images/icons/edit.gif" border="0" HEIGHT="12"></a></td>
<td class="<%=strClass%>"><a href="fotos.asp?id=<%=Rs("id")%>&mode=del"><img SRC="../images/icons/delete.gif" onClick="return doConfirm('<%=StrToJScript(Rs("oms"))%>');" border="0" HEIGHT="12"></a></td>
<td class="<%=strClass%>"><%=StrToHTML(Rs("type_oms"))%></td>
<td class="<%=strClass%>"><%=StrToHTML(Rs("oms"))%></td>
<td class="<%=strClass%>"><%=FormatDateParam(Rs("datum"),"dd-mm-yyyy")%></td>
<td class="<%=strClass%>"><%=IntToHTML(Rs("hits"))%></td>
<td align="center" class="<%=strClass%>"><%If SqlToBool(Rs("ind_actief")) Then Response.Write("<IMG SRC=""../images/icons/checked_icon.gif"">") Else Response.Write("<IMG SRC=""../images/icons/not_checked_icon.gif"">") End If%></td>
<td class="<%=strClass%>"><%=intToHTML(Rs("volgorde"))%></td>
</tr>
<%
Rs.MoveNext
Wend
Rs.Close
Set Rs = Nothing
%>
<tr>
<td class="clsBottom" colSpan="8"> </td>
</tr>
</table>
</form>
</body>
</html>