<%@ Language=VBScript %>
<%
Option Explicit
%>
<!DOCTYPE html>
<html lang="en">
<head>
  <!--#include file="./includes/header.asp"-->
  <!--#include file="./includes/wjf_employees-sql.asp"-->
  <!-- Note: config.asp is included via wjf_employees-sql.asp -->
  <!-- DataTables CSS -->
  <link rel="stylesheet" href="assets/plugins/datatables/dataTables.bootstrap4.min.css">
</head>

<%
    Dim theme, sso, strSQL, rs, cmd

    theme = Request.Cookies("theme")
    IF theme = "" THEN
        theme="bg-theme1"
    END IF

    ' Validate SSO - must be numeric
    sso = Request.Querystring("sso")
    If Not IsNumeric(sso) Or sso = "" Then
        sso = "1"
    End If
    sso = CLng(sso)
%>

<body class="bg-theme <%Response.Write(theme)%>">

<!-- start loader -->
   <div id="pageloader-overlay" class="visible incoming">
    <div class="loader-wrapper-outer">
        <div class="loader-wrapper-inner">
            <div class="loader"></div>
        </div>
    </div>
</div>
   <!-- end loader -->
<!-- Start wrapper-->
 <div id="wrapper">
  <!--#include file="./includes/leftsidebar.asp"-->
<!--Start topbar header-->
  <!--#include file="./includes/topbarheader.asp"-->
<!--End topbar header-->
<div class="clearfix"></div>


  <div class="content-wrapper">
    <div class="container-fluid">

      <div class="row mt-3">
        <div class="col-lg-4">
           <div class="card profile-card-1">
            <div class="card-img-block">

<%
    ' Use parameterized query to prevent SQL injection
    Dim employeeFound
    employeeFound = False

    Set cmd = Server.CreateObject("ADODB.Command")
    cmd.ActiveConnection = objconn
    cmd.CommandText = "SELECT * FROM employees WHERE SSO = ?"
    cmd.CommandType = 1
    cmd.Parameters.Append cmd.CreateParameter("@sso", 3, 1, , sso)
    Set rs = cmd.Execute()

    If Not rs.EOF Then
        employeeFound = True
    End If
    Set cmd = Nothing

    If employeeFound Then
%>
                <img class="img-fluid" src="https://tsgwp00525.rd.ds.ge.com/EmployeeDBAPP/images/<%=Server.HTMLEncode(rs("Picture") & "")%>" alt="Card image cap">
            </div>
            <div class="card-body pt-5">
                <h5 class="card-title"><%=Server.HTMLEncode(rs("First_Name") & "")%>&nbsp;<%=Server.HTMLEncode(rs("Last_Name") & "")%></h5>
            </div>
<%
    Else
%>
                <div style="height:200px; background:#f8f9fa; display:flex; align-items:center; justify-content:center;">
                    <i class="zmdi zmdi-account-circle zmdi-hc-5x text-muted"></i>
                </div>
            </div>
            <div class="card-body pt-5">
                <h5 class="card-title text-muted">Employee Not Found</h5>
                <p class="text-muted mb-0">SSO: <%=Server.HTMLEncode(sso)%></p>
            </div>
<%
    End If
%>
<%
If employeeFound Then
' Easter Egg for SSO 570005354
Dim showEasterEgg
showEasterEgg = False
On Error Resume Next
IF IsNumeric(sso) THEN
    IF CLng(sso) = 570005354 THEN
        showEasterEgg = True
    END IF
END IF
On Error Goto 0

IF showEasterEgg THEN
%>
      <div class="card-body border-top border-light">
                 <div class="text-center mb-3">
                   <h6 class="text-warning"><i class="zmdi zmdi-star"></i> ACHIEVEMENT UNLOCKED <i class="zmdi zmdi-star"></i></h6>
                   <small class="text-muted">Secret Developer Stats</small>
                 </div>
                 <div class="media align-items-center">
                   <div><i class="zmdi zmdi-coffee" style="font-size: 40px; color: #8B4513;"></i></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Caffeine Consumption<span class="float-right">147%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar bg-warning" style="width:100%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                 <div class="media align-items-center">
                   <div><i class="zmdi zmdi-bug" style="font-size: 40px; color: #28a745;"></i></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Bug Fixing Speed<span class="float-right">95%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar bg-success" style="width:95%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                 <div class="media align-items-center">
                   <div><i class="zmdi zmdi-code" style="font-size: 40px; color: #17a2b8;"></i></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Google-Fu<span class="float-right">99%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar bg-info" style="width:99%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                 <div class="media align-items-center">
                   <div><i class="zmdi zmdi-storage" style="font-size: 40px; color: #007bff;"></i></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Database Tinkering<span class="float-right">88%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar bg-primary" style="width:88%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                 <div class="media align-items-center">
                   <div><i class="zmdi zmdi-fire" style="font-size: 40px; color: #dc3545;"></i></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Debugging<span class="float-right">100%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar bg-danger" style="width:100%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                 <div class="media align-items-center">
                   <div><i class="zmdi zmdi-shield-check" style="font-size: 40px; color: #ffc107;"></i></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Production Deployment Courage<span class="float-right">73%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar bg-warning" style="width:73%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                  <div class="text-center mt-3">
                    <span class="badge badge-danger m-1">Legacy Code Archaeologist</span>
                    <span class="badge badge-info m-1">Documentation Writer (Rare!)</span>
                  </div>
              </div>
<%
ELSE
%>
      <div class="card-body border-top border-light">
                 <div class="media align-items-center">
                   <div>
                       <img src="./images/skills/atm.jpg" class="skill-img" alt="Advanced Technical Machinist">
                   </div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Advanced Technical Machinist<span class="float-right">100%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar" style="width:100%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                  <hr>
                  <div class="media align-items-center">
                   <div><img src="assets/images/timeline/bootstrap-4.svg" class="skill-img" alt="skill img"></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>Bootstrap 4 <span class="float-right">50%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar" style="width:50%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                   <hr>
                  <div class="media align-items-center">
                   <div><img src="assets/images/timeline/angular-icon.svg" class="skill-img" alt="skill img"></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>AngularJS <span class="float-right">70%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar" style="width:70%"></div>
                         </div>
                        </div>
                    </div>
                  </div>
                    <hr>
                  <div class="media align-items-center">
                   <div><img src="assets/images/timeline/react.svg" class="skill-img" alt="skill img"></div>
                     <div class="media-body text-left ml-3">
                       <div class="progress-wrapper">
                         <p>React JS <span class="float-right">35%</span></p>
                         <div class="progress" style="height: 5px;">
                          <div class="progress-bar" style="width:35%"></div>
                         </div>
                        </div>
                    </div>
                  </div>

              </div>
<%
END IF
End If ' employeeFound
%>
        </div>

        </div>

        <div class="col-lg-8">
           <div class="card">
            <div class="card-body">
            <ul class="nav nav-tabs nav-tabs-primary top-icon nav-justified">
                <li class="nav-item">
                    <a href="javascript:void();" data-target="#profile" data-toggle="pill" class="nav-link active"><i class="icon-user"></i> <span class="hidden-xs">Profile</span></a>
                </li>
                <li class="nav-item">
                    <a href="javascript:void();" data-target="#usbhistory" data-toggle="pill" class="nav-link"><i class="zmdi zmdi-usb"></i> <span class="hidden-xs">USB History</span></a>
                </li>
                <li class="nav-item">
                    <a href="javascript:void();" data-target="#achievements" data-toggle="pill" class="nav-link"><i class="zmdi zmdi-star"></i> <span class="hidden-xs">Achievements</span></a>
                </li>
            </ul>
            <div class="tab-content p-3">
                <div class="tab-pane active" id="profile">
                    <h5 class="mb-3">Profile</h5>
<% If employeeFound Then %>
                    <div class="row">
                        <div class="col-md-3">
                <h6><%=Server.HTMLEncode(rs("First_Name") & "")%>&nbsp;<%=Server.HTMLEncode(rs("Last_Name") & "")%></h6>
                            <h6>SSO</h6>
                            <h6>Shift</h6>
                            <h6>Role</h6>
                            <h6>Team</h6>
                            <h6>PayNo</h6>
                      </div>
                        <div class="col-md-6">
                <h6>&nbsp;<h6>
                            <h6><%=Server.HTMLEncode(rs("SSO") & "")%></h6>
                            <h6><%=Server.HTMLEncode(rs("shift") & "")%></h6>
                            <h6><%=Server.HTMLEncode(rs("Role") & "")%></h6>
                            <h6><%=Server.HTMLEncode(rs("Team") & "")%></h6>
                            <h6><%=Server.HTMLEncode(rs("Payno") & "")%></h6>
                        </div>
                    </div>
                    <!--/row-->
<% Else %>
                    <div class="text-center text-muted py-4">
                        <i class="zmdi zmdi-alert-circle zmdi-hc-3x"></i>
                        <p class="mt-2">No employee record found for SSO: <strong><%=Server.HTMLEncode(sso)%></strong></p>
                        <a href="./search.asp" class="btn btn-outline-primary btn-sm mt-2">
                            <i class="zmdi zmdi-search"></i> Search Again
                        </a>
                    </div>
<% End If %>
                </div>

                <div class="tab-pane" id="usbhistory">
                    <h5 class="mb-3"><i class="zmdi zmdi-usb"></i> USB Checkout History</h5>
<%
' Connect to shopdb for USB history (uses centralized config)
Dim objConnShopdb, shopdbAvailable
shopdbAvailable = False

On Error Resume Next
Set objConnShopdb = Server.CreateObject("ADODB.Connection")
objConnShopdb.ConnectionString = GetConnectionString()
objConnShopdb.Open
If Err.Number = 0 Then
    shopdbAvailable = True
Else
    Err.Clear
End If
On Error Goto 0

If shopdbAvailable And IsNumeric(sso) Then
    ' Get USB checkout statistics
    Dim cmdStats, rsStats
    Dim totalCheckouts, activeCheckouts, avgDuration
    Dim statsSQL
    statsSQL = "SELECT " & _
               "COUNT(*) AS total_checkouts, " & _
               "SUM(CASE WHEN checkin_time IS NULL THEN 1 ELSE 0 END) AS active_checkouts, " & _
               "AVG(TIMESTAMPDIFF(MINUTE, checkout_time, COALESCE(checkin_time, NOW()))) AS avg_duration " & _
               "FROM usbcheckouts WHERE sso = ?"

    Set cmdStats = Server.CreateObject("ADODB.Command")
    cmdStats.ActiveConnection = objConnShopdb
    cmdStats.CommandText = statsSQL
    cmdStats.CommandType = 1
    cmdStats.Parameters.Append cmdStats.CreateParameter("@sso", 200, 1, 20, sso)

    On Error Resume Next
    Set rsStats = cmdStats.Execute

    If Err.Number = 0 And Not rsStats.EOF Then
        If IsNull(rsStats("total_checkouts")) Then
            totalCheckouts = 0
        Else
            totalCheckouts = CLng(rsStats("total_checkouts") & "")
        End If

        If IsNull(rsStats("active_checkouts")) Then
            activeCheckouts = 0
        Else
            activeCheckouts = CLng(rsStats("active_checkouts") & "")
        End If

        If IsNull(rsStats("avg_duration")) Then
            avgDuration = 0
        Else
            avgDuration = CLng(rsStats("avg_duration") & "")
        End If
    Else
        totalCheckouts = 0
        activeCheckouts = 0
        avgDuration = 0
    End If
    On Error Goto 0

    If Not rsStats Is Nothing Then rsStats.Close
    Set rsStats = Nothing
    Set cmdStats = Nothing

    ' Format average duration
    Dim avgDurationText
    If avgDuration < 60 Then
        avgDurationText = avgDuration & " min"
    ElseIf avgDuration < 1440 Then
        avgDurationText = Int(avgDuration / 60) & "h " & (avgDuration Mod 60) & "m"
    Else
        avgDurationText = Int(avgDuration / 1440) & "d " & Int((avgDuration Mod 1440) / 60) & "h"
    End If
%>
                    <!-- USB Stats Row -->
                    <div class="row mb-3">
                        <div class="col-md-4 text-center">
                            <div class="p-2 border rounded">
                                <i class="zmdi zmdi-usb zmdi-hc-2x text-primary"></i>
                                <h4 class="mt-1 mb-0"><%=totalCheckouts%></h4>
                                <small class="text-muted">Total Checkouts</small>
                            </div>
                        </div>
                        <div class="col-md-4 text-center">
                            <div class="p-2 border rounded">
                                <% If activeCheckouts > 0 Then %>
                                    <i class="zmdi zmdi-time zmdi-hc-2x text-warning"></i>
                                <% Else %>
                                    <i class="zmdi zmdi-check-circle zmdi-hc-2x text-success"></i>
                                <% End If %>
                                <h4 class="mt-1 mb-0"><%=activeCheckouts%></h4>
                                <small class="text-muted">Currently Out</small>
                            </div>
                        </div>
                        <div class="col-md-4 text-center">
                            <div class="p-2 border rounded">
                                <i class="zmdi zmdi-timer zmdi-hc-2x text-info"></i>
                                <h4 class="mt-1 mb-0"><%=avgDurationText%></h4>
                                <small class="text-muted">Avg Duration</small>
                            </div>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table id="usbTable" class="table table-sm table-hover table-striped">
                            <thead>
                                <tr>
                                    <th>USB Device</th>
                                    <th>Checkout</th>
                                    <th>Check-in</th>
                                    <th>Duration</th>
                                    <th>Wiped</th>
                                </tr>
                            </thead>
                            <tbody>
<%
    ' Get USB checkout history for this SSO
    Dim cmdHistory, rsHistory
    Dim historySQL
    historySQL = "SELECT uc.*, m.serialnumber, m.alias, " & _
                 "TIMESTAMPDIFF(MINUTE, uc.checkout_time, COALESCE(uc.checkin_time, NOW())) AS duration_minutes " & _
                 "FROM usbcheckouts uc " & _
                 "JOIN machines m ON uc.machineid = m.machineid " & _
                 "WHERE uc.sso = ? " & _
                 "ORDER BY uc.checkout_time DESC"

    Set cmdHistory = Server.CreateObject("ADODB.Command")
    cmdHistory.ActiveConnection = objConnShopdb
    cmdHistory.CommandText = historySQL
    cmdHistory.CommandType = 1
    cmdHistory.Parameters.Append cmdHistory.CreateParameter("@sso", 200, 1, 20, sso)

    On Error Resume Next
    Set rsHistory = cmdHistory.Execute
    On Error Goto 0

    Dim rowCount
    rowCount = 0

    If Not rsHistory Is Nothing Then
        Do While Not rsHistory.EOF
            rowCount = rowCount + 1
            Dim serialNum, usbAlias, checkoutTime, checkinTime, durationMinutes
            Dim durationText, wipedText, statusClass

            serialNum = rsHistory("serialnumber") & ""
            usbAlias = rsHistory("alias") & ""

            If IsNull(rsHistory("duration_minutes")) Then
                durationMinutes = 0
            Else
                durationMinutes = CLng(rsHistory("duration_minutes") & "")
            End If

            ' Format checkout time (MM/DD/YYYY h:mm AM/PM)
            If Not IsNull(rsHistory("checkout_time")) Then
                checkoutTime = Month(rsHistory("checkout_time")) & "/" & Day(rsHistory("checkout_time")) & "/" & Year(rsHistory("checkout_time")) & " " & FormatDateTime(rsHistory("checkout_time"), 3)
            Else
                checkoutTime = "-"
            End If

            ' Format check-in time and determine status
            If Not IsNull(rsHistory("checkin_time")) Then
                checkinTime = Month(rsHistory("checkin_time")) & "/" & Day(rsHistory("checkin_time")) & "/" & Year(rsHistory("checkin_time")) & " " & FormatDateTime(rsHistory("checkin_time"), 3)
                statusClass = ""
            Else
                checkinTime = "<span class='badge badge-warning'>Still Out</span>"
                statusClass = "table-warning"
            End If

            ' Format duration
            If durationMinutes < 60 Then
                durationText = durationMinutes & " min"
            ElseIf durationMinutes < 1440 Then
                durationText = Int(durationMinutes / 60) & "h " & (durationMinutes Mod 60) & "m"
            Else
                durationText = Int(durationMinutes / 1440) & "d " & Int((durationMinutes Mod 1440) / 60) & "h"
            End If

            ' Format wiped status
            If IsNull(rsHistory("was_wiped")) Then
                wipedText = "-"
            ElseIf rsHistory("was_wiped") = 1 Then
                wipedText = "<span class='badge badge-success'>Yes</span>"
            Else
                wipedText = "<span class='badge badge-danger'>No</span>"
            End If

            ' Build device display
            Dim deviceDisplay
            If usbAlias <> "" And usbAlias <> serialNum Then
                deviceDisplay = Server.HTMLEncode(serialNum) & "<br><small class='text-muted'>" & Server.HTMLEncode(usbAlias) & "</small>"
            Else
                deviceDisplay = Server.HTMLEncode(serialNum)
            End If
%>
                                <tr class="<%=statusClass%>">
                                    <td><%=deviceDisplay%></td>
                                    <td><small><%=checkoutTime%></small></td>
                                    <td><small><%=checkinTime%></small></td>
                                    <td><%=durationText%></td>
                                    <td><%=wipedText%></td>
                                </tr>
<%
            rsHistory.MoveNext
        Loop

        rsHistory.Close
        Set rsHistory = Nothing
    End If
    Set cmdHistory = Nothing

    If rowCount = 0 Then
%>
                                <tr>
                                    <td colspan="5" class="text-center text-muted">
                                        <i class="zmdi zmdi-info"></i> No USB checkout history
                                    </td>
                                </tr>
<%
    End If

    ' Close shopdb connection
    objConnShopdb.Close
    Set objConnShopdb = Nothing
Else
    ' ShopDB not available
%>
                    <div class="alert alert-info">
                        <i class="zmdi zmdi-info"></i> USB checkout history not available.
                    </div>
<%
End If
%>
                            </tbody>
                        </table>
                    </div>

                    <div class="mt-2">
                        <a href="./usbhistory.asp?sso=<%=Server.URLEncode(sso)%>" class="btn btn-outline-primary btn-sm">
                            <i class="zmdi zmdi-open-in-new"></i> View Full History
                        </a>
                    </div>
                </div>

                <div class="tab-pane" id="achievements">
                    <h5 class="mb-3"><i class="zmdi zmdi-star" style="color:#0d6efd;"></i> Achievements & Recognition</h5>
<%
' Query achievements from notifications table (Recognition type)
Dim objConnAchieve, achieveAvailable
achieveAvailable = False

On Error Resume Next
Set objConnAchieve = Server.CreateObject("ADODB.Connection")
objConnAchieve.ConnectionString = GetConnectionString()
objConnAchieve.Open
If Err.Number = 0 Then
    achieveAvailable = True
Else
    Err.Clear
End If
On Error Goto 0

If achieveAvailable And IsNumeric(sso) Then
    ' Get achievements for this SSO (all-time)
    Dim cmdAchieve, rsAchieve
    Dim achieveSQL, achieveCount
    achieveCount = 0

    ' Recognition type ID is 5, search for SSO in employeesso field
    achieveSQL = "SELECT n.notification, n.starttime " & _
                 "FROM notifications n " & _
                 "WHERE n.notificationtypeid = 5 " & _
                 "AND n.employeesso LIKE ? " & _
                 "ORDER BY n.starttime DESC"

    Set cmdAchieve = Server.CreateObject("ADODB.Command")
    cmdAchieve.ActiveConnection = objConnAchieve
    cmdAchieve.CommandText = achieveSQL
    cmdAchieve.CommandType = 1
    cmdAchieve.Parameters.Append cmdAchieve.CreateParameter("@sso", 200, 1, 100, "%" & sso & "%")

    On Error Resume Next
    Set rsAchieve = cmdAchieve.Execute

    If Err.Number = 0 Then
%>
                    <div class="list-group">
<%
        Do While Not rsAchieve.EOF
            achieveCount = achieveCount + 1
            Dim achieveDate, achieveText
            achieveDate = ""
            achieveText = rsAchieve("notification") & ""

            If Not IsNull(rsAchieve("starttime")) Then
                achieveDate = FormatDateTime(rsAchieve("starttime"), 2)
            End If
%>
                        <div class="list-group-item">
                            <div class="d-flex w-100 justify-content-between">
                                <h6 class="mb-1"><%=Server.HTMLEncode(achieveText)%></h6>
                                <small class="text-muted"><%=achieveDate%></small>
                            </div>
                        </div>
<%
            rsAchieve.MoveNext
        Loop

        rsAchieve.Close
        Set rsAchieve = Nothing
%>
                    </div>
<%
        If achieveCount = 0 Then
%>
                    <div class="text-center text-muted py-4">
                        <i class="zmdi zmdi-star-outline zmdi-hc-3x"></i>
                        <p class="mt-2">No achievements recorded yet.</p>
                    </div>
<%
        End If
    End If
    Set cmdAchieve = Nothing

    objConnAchieve.Close
    Set objConnAchieve = Nothing
Else
%>
                    <div class="alert alert-info">
                        <i class="zmdi zmdi-info"></i> Achievements not available.
                    </div>
<%
End If
%>
                </div>

            </div>
        </div>
      </div>
      </div>

    </div>

    <!--start overlay-->
          <div class="overlay toggle-menu"></div>
        <!--end overlay-->

    </div>
    <!-- End container-fluid-->
   </div><!--End content-wrapper-->
   <!--Start Back To Top Button-->
    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
    <!--End Back To Top Button-->

    <!--Start footer-->
    <footer class="footer">
      <div class="container">
        <div class="text-center">
        </div>
      </div>
    </footer>
    <!--End footer-->
  </div><!--End wrapper-->


  <!-- Bootstrap core JavaScript-->
  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/popper.min.js"></script>
  <script src="assets/js/bootstrap.min.js"></script>

  <!-- simplebar js -->
  <script src="assets/plugins/simplebar/js/simplebar.js"></script>
  <!-- sidebar-menu js -->
  <script src="assets/js/sidebar-menu.js"></script>

  <!-- DataTables js -->
  <script src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
  <script src="assets/plugins/datatables/dataTables.bootstrap4.min.js"></script>

  <!-- Custom scripts -->
  <script src="assets/js/app-script.js"></script>

<script>
$(document).ready(function() {
    $('#usbTable').DataTable({
        "order": [[1, "desc"]],
        "pageLength": 10,
        "lengthMenu": [[10, 25, 50], [10, 25, 50]],
        "language": {
            "emptyTable": "No USB checkout history"
        }
    });
});
</script>

</body>
</html>
<%
    objconn.close
%>
