Renamed 45 ASP files to follow lowercase concatenated naming convention: - Direct handlers: save_machine_direct.asp -> savemachinedirect.asp - USB files: checkin_usb.asp -> checkinusb.asp - API files: api_usb.asp -> apiusb.asp - Map files: network_map.asp -> networkmap.asp - Printer files: printer_lookup.asp -> printerlookup.asp Also: - Updated 84+ internal references across all ASP and JS files - Deleted 6 test/duplicate files (editmacine.asp, test_*.asp) - Updated production migration guide with filename changes - Added rename scripts for Linux (bash) and Windows (PowerShell)
406 lines
19 KiB
Plaintext
406 lines
19 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<!--#include file="./includes/header.asp"-->
|
|
<!--#include file="./includes/sql.asp"-->
|
|
</head>
|
|
|
|
<%
|
|
theme = Request.Cookies("theme")
|
|
IF theme = "" THEN
|
|
theme="bg-theme1"
|
|
END IF
|
|
%>
|
|
<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-8 offset-lg-2">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:20px;">
|
|
<h5 class="card-title" style="margin:0;">
|
|
<i class="zmdi zmdi-plus-circle"></i> Add Knowledge Base Article
|
|
</h5>
|
|
<a href="./displayknowledgebase.asp" class="btn btn-sm btn-secondary">
|
|
<i class="zmdi zmdi-arrow-left"></i> Back to Knowledge Base
|
|
</a>
|
|
</div>
|
|
|
|
<form method="post" action="./addlinkdirect.asp">
|
|
<div class="form-group">
|
|
<label for="shortdescription">Description <span class="text-danger">*</span></label>
|
|
<input type="text" class="form-control" id="shortdescription" name="shortdescription"
|
|
required maxlength="500" placeholder="Brief description of the article">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="linkurl">URL <span class="text-danger">*</span></label>
|
|
<input type="url" class="form-control" id="linkurl" name="linkurl"
|
|
required maxlength="2000" placeholder="https://...">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="keywords">Keywords</label>
|
|
<input type="text" class="form-control" id="keywords" name="keywords"
|
|
maxlength="500" placeholder="Space-separated keywords">
|
|
<small class="form-text text-muted">Keywords help with search - separate with spaces</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="appid">Topic <span class="text-danger">*</span></label>
|
|
<div class="input-group">
|
|
<select class="form-control" id="appid" name="appid" required>
|
|
<option value="">-- Select Topic --</option>
|
|
<%
|
|
Dim strSQL, rsApps
|
|
strSQL = "SELECT appid, appname FROM applications WHERE isactive = 1 ORDER BY appname ASC"
|
|
Set rsApps = objconn.Execute(strSQL)
|
|
While Not rsApps.EOF
|
|
Response.Write("<option value='" & rsApps("appid") & "'>" & Server.HTMLEncode(rsApps("appname")) & "</option>")
|
|
rsApps.MoveNext
|
|
Wend
|
|
rsApps.Close
|
|
Set rsApps = Nothing
|
|
%>
|
|
<option value="new">+ Add New Topic</option>
|
|
</select>
|
|
<div class="input-group-append">
|
|
<button type="button" class="btn btn-info" id="addTopicBtn">
|
|
<i class="zmdi zmdi-plus"></i> New
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<small class="form-text text-muted">Select the application/topic this article relates to</small>
|
|
</div>
|
|
|
|
<!-- Hidden section for adding new topic -->
|
|
<div id="newTopicSection" style="display:none; padding:15px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.1); border-radius:5px; margin-bottom:15px;">
|
|
<h6 class="mb-3"><i class="zmdi zmdi-plus-circle"></i> New Topic</h6>
|
|
|
|
<div class="form-group">
|
|
<label for="newappname">Topic Name</label>
|
|
<input type="text" class="form-control" id="newappname" name="newappname"
|
|
maxlength="50" placeholder="e.g., Network Tools, Email System">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="newappdescription">Description</label>
|
|
<input type="text" class="form-control" id="newappdescription" name="newappdescription"
|
|
maxlength="255" placeholder="Short description of the topic">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="newsupportteamid">Support Team <span class="text-danger">*</span></label>
|
|
<div class="input-group">
|
|
<select class="form-control" id="newsupportteamid" name="newsupportteamid">
|
|
<option value="">-- Select Support Team --</option>
|
|
<%
|
|
Dim strSupportSQL, rsSupportTeams
|
|
strSupportSQL = "SELECT supporteamid, teamname FROM supportteams WHERE isactive=1 ORDER BY teamname ASC"
|
|
Set rsSupportTeams = objConn.Execute(strSupportSQL)
|
|
While Not rsSupportTeams.EOF
|
|
Response.Write("<option value='" & rsSupportTeams("supporteamid") & "'>")
|
|
Response.Write(Server.HTMLEncode(rsSupportTeams("teamname")))
|
|
Response.Write("</option>" & vbCrLf)
|
|
rsSupportTeams.MoveNext
|
|
Wend
|
|
rsSupportTeams.Close
|
|
Set rsSupportTeams = Nothing
|
|
%>
|
|
<option value="new">+ Add New Support Team</option>
|
|
</select>
|
|
<div class="input-group-append">
|
|
<button type="button" class="btn btn-info btn-sm" id="addSupportTeamBtnKB">
|
|
<i class="zmdi zmdi-plus"></i> New
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Nested section for adding new support team -->
|
|
<div id="newSupportTeamSectionKB" style="display:none; padding:10px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.15); border-radius:3px; margin-bottom:10px;">
|
|
<h6 class="mb-2" style="font-size:0.9rem;"><i class="zmdi zmdi-users"></i> New Support Team</h6>
|
|
<div class="form-group mb-2">
|
|
<label for="newsupportteamname" style="font-size:0.85rem;">Team Name</label>
|
|
<input type="text" class="form-control form-control-sm" id="newsupportteamname" name="newsupportteamname"
|
|
maxlength="50" placeholder="e.g., IT Support, Engineering">
|
|
</div>
|
|
<div class="form-group mb-2">
|
|
<label for="newsupportteamurl" style="font-size:0.85rem;">Team URL</label>
|
|
<input type="text" class="form-control form-control-sm" id="newsupportteamurl" name="newsupportteamurl"
|
|
maxlength="512" placeholder="Service Now URL or team page">
|
|
</div>
|
|
<div class="form-group mb-2">
|
|
<label for="newappownerid" style="font-size:0.85rem;">App Owner <span class="text-danger">*</span></label>
|
|
<div class="input-group input-group-sm">
|
|
<select class="form-control form-control-sm" id="newappownerid" name="newappownerid">
|
|
<option value="">-- Select App Owner --</option>
|
|
<%
|
|
Dim strAppOwnerSQL, rsAppOwners
|
|
strAppOwnerSQL = "SELECT appownerid, appowner FROM appowners WHERE isactive=1 ORDER BY appowner ASC"
|
|
Set rsAppOwners = objConn.Execute(strAppOwnerSQL)
|
|
While Not rsAppOwners.EOF
|
|
Response.Write("<option value='" & rsAppOwners("appownerid") & "'>")
|
|
Response.Write(Server.HTMLEncode(rsAppOwners("appowner")))
|
|
Response.Write("</option>" & vbCrLf)
|
|
rsAppOwners.MoveNext
|
|
Wend
|
|
rsAppOwners.Close
|
|
Set rsAppOwners = Nothing
|
|
%>
|
|
<option value="new">+ Add New App Owner</option>
|
|
</select>
|
|
<div class="input-group-append">
|
|
<button type="button" class="btn btn-info btn-sm" id="addAppOwnerBtnKB" style="font-size:0.75rem;">
|
|
<i class="zmdi zmdi-plus"></i> New
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Doubly nested section for adding new app owner -->
|
|
<div id="newAppOwnerSectionKB" style="display:none; padding:8px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.2); border-radius:2px; margin-bottom:8px;">
|
|
<h6 class="mb-1" style="font-size:0.8rem;"><i class="zmdi zmdi-account"></i> New App Owner</h6>
|
|
<div class="form-group mb-1">
|
|
<label for="newappownername" style="font-size:0.75rem;">Name</label>
|
|
<input type="text" class="form-control form-control-sm" id="newappownername" name="newappownername"
|
|
maxlength="50" placeholder="e.g., John Smith" style="font-size:0.85rem;">
|
|
</div>
|
|
<div class="form-group mb-1">
|
|
<label for="newappownersso" style="font-size:0.75rem;">SSO</label>
|
|
<input type="text" class="form-control form-control-sm" id="newappownersso" name="newappownersso"
|
|
maxlength="50" placeholder="e.g., jsmith" style="font-size:0.85rem;">
|
|
</div>
|
|
<button type="button" class="btn btn-sm btn-secondary" id="cancelNewAppOwnerKB" style="font-size:0.75rem;">
|
|
<i class="zmdi zmdi-close"></i> Cancel
|
|
</button>
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-sm btn-secondary btn-sm" id="cancelNewSupportTeamKB">
|
|
<i class="zmdi zmdi-close"></i> Cancel
|
|
</button>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="newapplicationnotes">Application Notes</label>
|
|
<textarea class="form-control" id="newapplicationnotes" name="newapplicationnotes"
|
|
rows="3" maxlength="512"
|
|
placeholder="Detailed notes about the application..."></textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="newinstallpath">Installation Path/URL</label>
|
|
<input type="text" class="form-control" id="newinstallpath" name="newinstallpath"
|
|
maxlength="255"
|
|
placeholder="\\server\share\installer.exe or http://...">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="newdocumentationpath">Documentation Path/URL</label>
|
|
<input type="text" class="form-control" id="newdocumentationpath" name="newdocumentationpath"
|
|
maxlength="512"
|
|
placeholder="\\server\docs or http://docs.example.com">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="custom-control custom-checkbox">
|
|
<input type="checkbox" class="custom-control-input"
|
|
id="newisactive" name="newisactive" value="1" checked>
|
|
<label class="custom-control-label" for="newisactive">
|
|
<strong>Active</strong>
|
|
<small class="d-block text-muted">Topic is currently in use</small>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-sm btn-secondary" id="cancelNewTopic">
|
|
<i class="zmdi zmdi-close"></i> Cancel
|
|
</button>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="form-group text-right">
|
|
<button type="submit" class="btn btn-primary btn-lg">
|
|
<i class="zmdi zmdi-check"></i> Add Article
|
|
</button>
|
|
<a href="./displayknowledgebase.asp" class="btn btn-secondary btn-lg">
|
|
<i class="zmdi zmdi-close"></i> Cancel
|
|
</a>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- End Row -->
|
|
|
|
<!-- 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>
|
|
|
|
<!-- Custom scripts -->
|
|
<script src="assets/js/app-script.js"></script>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
// Show/hide new topic section
|
|
$('#addTopicBtn, #appid').on('change click', function() {
|
|
if ($('#appid').val() === 'new' || $(this).attr('id') === 'addTopicBtn') {
|
|
$('#appid').val('new');
|
|
$('#newTopicSection').slideDown();
|
|
$('#newappname').prop('required', true);
|
|
$('#newsupportteamid').prop('required', true);
|
|
}
|
|
});
|
|
|
|
$('#cancelNewTopic').on('click', function() {
|
|
$('#newTopicSection').slideUp();
|
|
$('#appid').val('');
|
|
$('#newappname').val('').prop('required', false);
|
|
$('#newappdescription').val('');
|
|
$('#newsupportteamid').val('').prop('required', false);
|
|
$('#newapplicationnotes').val('');
|
|
$('#newinstallpath').val('');
|
|
$('#newdocumentationpath').val('');
|
|
$('#newisactive').prop('checked', true);
|
|
// Also hide and clear support team section
|
|
$('#newSupportTeamSectionKB').hide();
|
|
$('#newsupportteamname').val('');
|
|
$('#newsupportteamurl').val('');
|
|
});
|
|
|
|
// Show/hide new support team section (nested within topic)
|
|
$('#addSupportTeamBtnKB, #newsupportteamid').on('change click', function() {
|
|
if ($('#newsupportteamid').val() === 'new' || $(this).attr('id') === 'addSupportTeamBtnKB') {
|
|
$('#newsupportteamid').val('new');
|
|
$('#newSupportTeamSectionKB').slideDown();
|
|
$('#newsupportteamname').prop('required', true);
|
|
$('#newappownerid').prop('required', true);
|
|
}
|
|
});
|
|
|
|
$('#cancelNewSupportTeamKB').on('click', function() {
|
|
$('#newSupportTeamSectionKB').slideUp();
|
|
$('#newsupportteamid').val('');
|
|
$('#newsupportteamname').val('').prop('required', false);
|
|
$('#newsupportteamurl').val('');
|
|
$('#newappownerid').val('').prop('required', false);
|
|
// Also hide and clear app owner section
|
|
$('#newAppOwnerSectionKB').hide();
|
|
$('#newappownername').val('');
|
|
$('#newappownersso').val('');
|
|
});
|
|
|
|
// Show/hide new app owner section (doubly nested within support team)
|
|
$('#addAppOwnerBtnKB, #newappownerid').on('change click', function() {
|
|
if ($('#newappownerid').val() === 'new' || $(this).attr('id') === 'addAppOwnerBtnKB') {
|
|
$('#newappownerid').val('new');
|
|
$('#newAppOwnerSectionKB').slideDown();
|
|
$('#newappownername').prop('required', true);
|
|
$('#newappownersso').prop('required', true);
|
|
}
|
|
});
|
|
|
|
$('#cancelNewAppOwnerKB').on('click', function() {
|
|
$('#newAppOwnerSectionKB').slideUp();
|
|
$('#newappownerid').val('');
|
|
$('#newappownername').val('').prop('required', false);
|
|
$('#newappownersso').val('').prop('required', false);
|
|
});
|
|
|
|
// Form validation
|
|
$('form').on('submit', function(e) {
|
|
// If adding new topic, make sure name is filled
|
|
if ($('#appid').val() === 'new') {
|
|
if ($('#newappname').val().trim() === '') {
|
|
e.preventDefault();
|
|
alert('Please enter a topic name or select an existing one');
|
|
$('#newappname').focus();
|
|
return false;
|
|
}
|
|
|
|
// Check support team selection
|
|
if ($('#newsupportteamid').val() === 'new') {
|
|
if ($('#newsupportteamname').val().trim() === '') {
|
|
e.preventDefault();
|
|
alert('Please enter a support team name or select an existing one');
|
|
$('#newsupportteamname').focus();
|
|
return false;
|
|
}
|
|
|
|
// Check if adding new app owner within new support team
|
|
if ($('#newappownerid').val() === 'new') {
|
|
if ($('#newappownername').val().trim() === '') {
|
|
e.preventDefault();
|
|
alert('Please enter an app owner name or select an existing one');
|
|
$('#newappownername').focus();
|
|
return false;
|
|
}
|
|
if ($('#newappownersso').val().trim() === '') {
|
|
e.preventDefault();
|
|
alert('Please enter an SSO for the new app owner');
|
|
$('#newappownersso').focus();
|
|
return false;
|
|
}
|
|
} else if ($('#newappownerid').val() === '') {
|
|
e.preventDefault();
|
|
alert('Please select an app owner for the new support team');
|
|
$('#newappownerid').focus();
|
|
return false;
|
|
}
|
|
} else if ($('#newsupportteamid').val() === '') {
|
|
e.preventDefault();
|
|
alert('Please select a support team for the new topic');
|
|
$('#newsupportteamid').focus();
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
<%
|
|
objConn.Close
|
|
%>
|