- Fix ADO cursor issue where reading rs("description") twice caused
empty values (IsNull check consumed the field value)
- Change all device pages to read description field once using
`description = rs("description") & ""` pattern
- Add deviceDescription variable in displaydevice.asp
- Fix machinetypeid mapping: IDF=17, Camera=18 (was swapped)
- Add model dropdown fix to include currently assigned model
- Add server application tracking feature
- Various other improvements and fixes
Files affected:
- displaydevice.asp, displaylocationdevice.asp
- deviceaccesspoint.asp, deviceserver.asp, deviceswitch.asp
- devicecamera.asp, deviceidf.asp
- savenetworkdevice.asp, networkdevices.asp
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
98 lines
3.7 KiB
Plaintext
98 lines
3.7 KiB
Plaintext
<%
|
|
' Calculate ISO week number
|
|
' ISO week 1 is the week containing the first Thursday of the year (or Jan 4th)
|
|
' Weeks start on Monday
|
|
Dim fwToday, fiscalWeek, fwDayOfWeek, fwThursday, fwYear, fwJan4, fwWeek1Start, fwDaysFromStart
|
|
|
|
fwToday = Date()
|
|
|
|
' Find Thursday of current week (ISO weeks are identified by their Thursday)
|
|
fwDayOfWeek = Weekday(fwToday, vbMonday) ' 1=Monday ... 7=Sunday
|
|
fwThursday = DateAdd("d", 4 - fwDayOfWeek, fwToday)
|
|
|
|
' The year of the Thursday determines the ISO year
|
|
fwYear = Year(fwThursday)
|
|
|
|
' Find January 4th of that year (always in week 1)
|
|
fwJan4 = DateSerial(fwYear, 1, 4)
|
|
|
|
' Find Monday of the week containing Jan 4 (start of week 1)
|
|
fwDayOfWeek = Weekday(fwJan4, vbMonday)
|
|
fwWeek1Start = DateAdd("d", 1 - fwDayOfWeek, fwJan4)
|
|
|
|
' Calculate week number
|
|
fwDaysFromStart = DateDiff("d", fwWeek1Start, fwToday)
|
|
fiscalWeek = Int(fwDaysFromStart / 7) + 1
|
|
%>
|
|
<!--Start sidebar-wrapper-->
|
|
<div id="sidebar-wrapper" data-simplebar="" data-simplebar-auto-hide="true">
|
|
<div class="brand-logo">
|
|
<a href="default.asp">
|
|
<img src="assets/images/logo-icon.png" class="logo-icon" alt="logo icon">
|
|
<h5 class="logo-text">West Jefferson</h5>
|
|
</a>
|
|
</div>
|
|
<div class="fiscal-week-box" style="width:100%; text-align:center; padding:15px 0;">
|
|
<span class="fiscal-label" style="display:block; text-align:center;">Fiscal Week</span>
|
|
<div class="fiscal-number" style="display:block; text-align:center;"><%=fiscalWeek%></div>
|
|
</div>
|
|
<ul class="sidebar-menu do-nicescrol">
|
|
<li class="sidebar-header">MAIN NAVIGATION</li>
|
|
<li>
|
|
<a href="default.asp">
|
|
<i class="zmdi zmdi-view-dashboard text-success"></i><span>Dashboard</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="calendar.asp">
|
|
<i class="zmdi zmdi-calendar text-info"></i><span>Calendar</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="displayapplications.asp">
|
|
<i class="zmdi zmdi-apps text-secondary"></i><span>Applications</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="displayknowledgebase.asp">
|
|
<i class="zmdi zmdi-book text-primary"></i><span>Knowledge Base</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="displayprinters.asp">
|
|
<i class="zmdi zmdi-print text-info"></i><span>Printers</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="./displaymachines.asp">
|
|
<i class="zmdi zmdi-reader text-warning"></i><span>Machines</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="./reports.asp">
|
|
<i class="zmdi zmdi-collection-image text-yellow"></i><span>Reports</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="./displayudc.asp">
|
|
<i class="zmdi zmdi-chart text-info"></i><span>UDC Reports</span>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="sidebar-header">Admin</li>
|
|
<li><a href="./displaysubnets.asp"><i class="zmdi zmdi-network text-danger"></i><span>Network</span></a></li>
|
|
<li><a href="./networkdevices.asp"><i class="zmdi zmdi-device-hub text-info"></i><span>Network Devices</span></a></li>
|
|
<li><a href="./displaypcs.asp"><i class="zmdi zmdi-desktop-windows text-primary"></i><span>PC Admin</span></a></li>
|
|
<li><a href="./displayusb.asp"><i class="zmdi zmdi-usb text-purple"></i><span>USB Devices</span></a></li>
|
|
<li><a href="./displaynotifications.asp"><i class="zmdi zmdi zmdi-notifications-none text-success"></i><span>Notifications</span></a></li>
|
|
<li><a href="./tv-dashboard/" target="_blank"><i class="zmdi zmdi-tv text-warning"></i><span>Lobby Display</span></a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
<!--End sidebar-wrapper-->
|