<% Dim vView, vUserID, vLocation, vTimeDiff, vMemTest, vLowDrive, vFloppyFound, vSystemStatus, vSkypeVideoSupport 'Dim dbConnection, varRecordset, strSystemStatus vUserID = checkLogin If vUserID = "0" Then Respone.End If vUserID = "-255" Then %> customcreators.net - Comuter Assets Manager - Administration
Logged in as Administrator
<% Response.End End If vView = Request("view") if vView = "" Then vView = "#overview#" %> customcreators.net - Comuter Assets Manager
<% If vView = "#overview#" Then %> <% Set dbConnection = Server.CreateObject("ADODB.Connection") dbConnection.Open "Driver={mySQL ODBC 3.51 Driver};Server=mysql72.customcreators.net;Port=3306;Database=customcreators_net;Uid=custom_net@c5676;Pwd=i2k7876wd63t3lvd;" Set varRecordset = dbConnection.Execute("Select * From tblCCAMData Where fldID = " & vUserID & " Order By fldLocation ASC, fldName ASC;") Do While Not varRecordset.EOF vSystemStatus = True vTimeDiff = DateDiff("h", returnSysTime(varRecordset("fldTime")), Now()) strSystemStatus = "" If vTimeDiff > 24 Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Profile older than 24 hours!") End If ' Check for low physical memory vMemTest = extractBulkFrame(varRecordset("fldData"), "memory_phys_free") vMemTest = Trim(Replace(vMemTest, "MB", "")) If cLng(vMemTest) < 100 Then If strSystemStatus = "" Then vMemForce = True strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Consider upgrading to more RAM for better performance.") End If getDriveState varRecordset("fldData"), vLowDrive, vFloppyFound vSkypeVideoSupport = checkSkypeVideoSupport(extractBulkFrame(varRecordset("fldData"), "os_name")) If Len(vLowDrive) > 0 Or vFloppyFound = False Or vSkypeVideoSupport = False Then If strSystemStatus = "" Then vMemForce = True If vFloppyFound = False Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Floppy disk drive not installed correctly.") If Len(vLowDrive) > 0 Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Partition " & vLowDrive & " is running low on space.") If vSkypeVideoSupport = False Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Skype Video NOT Supported, consider uppgrading to XP!") End If If varRecordset("fldSmart_Stat") <> 0 Then vSystemStatus = False strSystemStatus = "" strSystemStatus = returnSystemInfoBlock(strSystemStatus, "WARNING: SMART Drive reporting failure!") End If If InStr(1, "" & varRecordset("fldEventLog"), "WARNING") > 0 Then vSystemStatus = False strSystemStatus = "" strSystemStatus = returnSystemInfoBlock(strSystemStatus, "" & varRecordset("fldEventLog") & "") End If If vSystemStatus = True Then If strSystemStatus = "" Then strSystemStatus = "System OK." Else strSystemStatus = returnSystemInfoBlock(strSystemStatus, "System OK.") End If Else ' dont add system ok, needs attention! End If If varRecordset("fldLocation") <> vLocation Then Response.Write "" Response.Write "" Response.Write "" vLocation = varRecordset("fldLocation") Else Response.Write "" End If %> <% varRecordset.MoveNext Loop varRecordset.Close Set varRecordset = Nothing dbConnection.Close Set dbConnection = Nothing ElseIf vView = "_delete_" Then Dim vRemoveProfile vRemoveProfile = Request("remove") If Trim(vRemoveProfile) <> "" Then Set dbConnection = Server.CreateObject("ADODB.Connection") dbConnection.Open "Driver={mySQL ODBC 3.51 Driver};Server=mysql72.customcreators.net;Port=3306;Database=customcreators_net;Uid=custom_net@c5676;Pwd=i2k7876wd63t3lvd;" Set varRecordset = dbConnection.Execute("Delete From tblCCAMData Where fldID = '" & vUserID & "' And fldName = '" & vRemoveProfile & "';") End If Response.Redirect("main.asp") Else Set dbConnection = Server.CreateObject("ADODB.Connection") dbConnection.Open "Driver={mySQL ODBC 3.51 Driver};Server=mysql72.customcreators.net;Port=3306;Database=customcreators_net;Uid=custom_net@c5676;Pwd=i2k7876wd63t3lvd;" Set varRecordset = dbConnection.Execute("Select * From tblCCAMData Where fldID = '" & vUserID & "' And fldName Like '" & vView & "';") If Not varRecordset.EOF Then vSystemStatus = True vTimeDiff = DateDiff("h", returnSysTime(varRecordset("fldTime")), Now()) strSystemStatus = "" If vTimeDiff > 24 Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Profile older than 24 hours!") End If ' Check for low physical memory vMemTest = extractBulkFrame(varRecordset("fldData"), "memory_phys_free") vMemTest = Trim(Replace(vMemTest, "MB", "")) If cLng(vMemTest) < 100 Then If strSystemStatus = "" Then vMemForce = True strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Consider upgrading to more RAM for better performance.") End If getDriveState varRecordset("fldData"), vLowDrive, vFloppyFound vSkypeVideoSupport = checkSkypeVideoSupport(extractBulkFrame(varRecordset("fldData"), "os_name")) If Len(vLowDrive) > 0 Or vFloppyFound = False Or vSkypeVideoSupport = False Then If strSystemStatus = "" Then vMemForce = True If vFloppyFound = False Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Floppy disk drive not installed correctly.") If Len(vLowDrive) > 0 Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Partition " & vLowDrive & " is running low on space.") If vSkypeVideoSupport = False Then strSystemStatus = returnSystemInfoBlock(strSystemStatus, "• Skype Video NOT Supported, consider uppgrading to XP!") End If If varRecordset("fldSmart_Stat") <> 0 Then vSystemStatus = False strSystemStatus = "" strSystemStatus = returnSystemInfoBlock(strSystemStatus, "WARNING: SMART Drive reporting failure!") End If If InStr(1, "" & varRecordset("fldEventLog"), "WARNING") > 0 Then vSystemStatus = False strSystemStatus = "" strSystemStatus = returnSystemInfoBlock(strSystemStatus, "" & varRecordset("fldEventLog") & "") End If If vSystemStatus = True Then If strSystemStatus = "" Then strSystemStatus = "System OK." Else strSystemStatus = returnSystemInfoBlock(strSystemStatus, "System OK.") End If Else ' dont add system ok, needs attention! End If %> <% Response.Write extractDrive(varRecordset("fldData")) Response.Write "" Response.Write extractSMARTDevice(varRecordset("fldData")) %>
Logged in as <% Response.Write resolveRealName(vUserID) %>
You have <% Response.Write resolveProfileCount(vUserID) %> profile(s) online, sorting by Location...
" & varRecordset("fldLocation") & "
">Click here to view detailed information on computer <% Response.Write cleanName(varRecordset("fldName")) %>. "><% Response.Write cleanName(varRecordset("fldName")) %> Reported <% Response.Write vTimeDiff %> hour(s) ago. (v<% Response.Write varRecordset("fldVersion") %>) Remove This Profile
CPU:<% Response.Write extractBulkFrame(varRecordset("fldData"), "cpu_type") %> @ <% Response.Write extractBulkFrame(varRecordset("fldData"), "cpu_speed") %>
OS:<% Response.Write extractBulkFrame(varRecordset("fldData"), "os_name") %> SP <% Response.Write extractBulkFrame(varRecordset("fldData"), "os_spver") %>
MEM:Free: <% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_phys_free") %>MB - Total: <% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_phys_total") %>MB - Usage: <% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_usage") %>%
IP:<% Response.Write extractBulkFrame(varRecordset("fldData"), "net_ip") %>
COM:<% Response.Write Replace(varRecordset("fldComment"), "%20", " ") %>
STAT:<% Response.Write strSystemStatus %>
Loaded profile <% Response.Write varRecordset("fldName") %> located at <% Response.Write varRecordset("fldLocation") %>...
">Click here to view detailed information on computer <% Response.Write cleanName(varRecordset("fldName")) %>. "><% Response.Write cleanName(varRecordset("fldName")) %> Reported <% Response.Write vTimeDiff %> hour(s) ago. (v<% Response.Write varRecordset("fldVersion") %>) Remove This Profile
CPU:<% Response.Write extractBulkFrame(varRecordset("fldData"), "cpu_type") %> @ <% Response.Write extractBulkFrame(varRecordset("fldData"), "cpu_speed") %>
OS:<% Response.Write extractBulkFrame(varRecordset("fldData"), "os_name") %> SP <% Response.Write extractBulkFrame(varRecordset("fldData"), "os_spver") %>
MEM:Free: <% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_phys_free") %>MB - Total: <% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_phys_total") %>MB - Usage: <% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_usage") %>%
IP:<% Response.Write extractBulkFrame(varRecordset("fldData"), "net_ip") %>
COM:<% Response.Write Replace(varRecordset("fldComment"), "%20", " ") %>
STAT:<% Response.Write strSystemStatus %>
Additional Information

Model:<% Response.Write getValidData("" & varRecordset("fldModel")) %>
In Use Since:<% Response.Write getValidData("" & varRecordset("fldInUseSince")) %>
Price:<% Response.Write getValidData("" & varRecordset("fldPrice")) %>
DirectX Version:<% Response.Write getValidData("" & varRecordset("fldDirectX")) %>
System Uptime:<% Response.Write getCurrentUpTime(returnSysTime(varRecordset("fldTime")), getValidData("" & varRecordset("fldUpTime"))) %>
Support Log:<% Response.Write getValidData(getSupportBlock("" & varRecordset("fldSupportLog"))) %>

Computer Memory

Physical Free:<% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_phys_free") %> MB
Physical Total:<% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_phys_total") %> MB
Virtual Free:<% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_virt_free") %> MB
Virtual Total:<% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_virt_total") %> MB
Page File Free:<% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_page_free") %> MB
Page File Total:<% Response.Write extractBulkFrame(varRecordset("fldData"), "memory_page_total") %> MB

System Event Log Scan:

<% Response.Write varRecordset("fldEventLog") %>
<% varRecordset.MoveNext End If varRecordset.Close Set varRecordset = Nothing dbConnection.Close Set dbConnection = Nothing End If %>

Download Client Utility (Version 1.7)
Download automatic update module (put in same directoy) - Version 1.1

Note: Put a shortcut of the main client utility in the startup folder in the startmenu.

<% Function resolveRealName(vUserID) Dim dbConnection, varRecordset Set dbConnection = Server.CreateObject("ADODB.Connection") dbConnection.Open "Driver={mySQL ODBC 3.51 Driver};Server=mysql72.customcreators.net;Port=3306;Database=customcreators_net;Uid=custom_net@c5676;Pwd=i2k7876wd63t3lvd;" Set varRecordset = dbConnection.Execute("Select * From tblCCAMUsers Where fldID = '" & vUserID & "';") If Not varRecordset.EOF Then resolveRealName = varRecordset("fldRealName") Else resolveRealName = "Unknown User" End If varRecordset.Close Set varRecordset = Nothing dbConnection.Close Set dbConnection = Nothing End Function Function getCurrentUpTime(vReported, vUpTime) Dim vTimeFromReport vTimeFromReport = DateDiff("h", vReported, Now()) If vTimeFromReport > 24 or vUpTime = "0" Then getCurrentUpTime = "Not reported lately." Else vTimeFromReport = DateDiff("n", vReported, Now()) vTimeFromReport = vTimeFromReport + vUpTime Dim vTD, vTH, vTM, vTS 'vTS = vTimeFromReport Mod 60 'vTimeFromReport = vTimeFromReport - vTimeFromReport Mod 60 'vTimeFromReport = vTimeFromReport / 60 vTM = vTimeFromReport Mod 60 vTimeFromReport = vTimeFromReport - vTimeFromReport Mod 60 vTimeFromReport = vTimeFromReport / 60 vTH = vTimeFromReport Mod 60 vTimeFromReport = vTimeFromReport - vTimeFromReport Mod 60 vTimeFromReport = vTimeFromReport / 24 vTD = vTimeFromReport getCurrentUpTime = vTD & "d " & vTH & "h " & vTM & "m " End If End Function Function resolveProfileCount(vUserID) Dim dbConnection, varRecordset Set dbConnection = Server.CreateObject("ADODB.Connection") dbConnection.Open "Driver={mySQL ODBC 3.51 Driver};Server=mysql72.customcreators.net;Port=3306;Database=customcreators_net;Uid=custom_net@c5676;Pwd=i2k7876wd63t3lvd;" Set varRecordset = dbConnection.Execute("Select Count(fldID) From tblCCAMData Where fldID = '" & vUserID & "';") If Not varRecordset.EOF Then resolveProfileCount = varRecordset.Fields(0) Else resolveProfileCount = 0 End If varRecordset.Close Set varRecordset = Nothing dbConnection.Close Set dbConnection = Nothing End Function Function extractBulkFrame(vBulk, vFrame) Dim vStart, vEnd If InStr(1, vBulk, "<" & vFrame & ">") > 0 Then vStart = InStr(1, vBulk,"<" & vFrame & ">") + Len(vFrame) + 2 vEnd = InStr(vStart, vBulk, "") extractBulkFrame = Mid(vBulk, vStart, vEnd - vStart) End If End Function Function cleanName(vName) cleanName = Ucase(Mid(vName, 1, 1)) & Lcase(Mid(vName, 2, Len(vName))) End Function Function getValidData(strData) If Trim(strData) = "" Then getValidData = "N/A" Else getValidData = strData End If End Function Function getSupportBlock(strData) Dim vBlock, vDate, vLine vBlock = strData Do While InStr(1, vBlock, "") > 0 vBlock = Mid(vBlock, 7, Len(vBlock)) vDate = Mid(vBlock, 1, InStr(1, vBlock, "") - 1) vBlock = Mid(vBlock, InStr(1, vBlock, "") + 9, Len(vBlock)) vLine = Mid(vBlock, 1, InStr(1, vBlock, "") - 1) If InStr(1, vBlock, "") > 0 Then vBlock = Mid(vBlock, Instr(1, vBlock, ""), Len(vBlock)) getSupportBlock = getSupportBlock & "" & vDate & " " & vLine & "
" Loop End Function Function checkSkypeVideoSupport(strData) checkSkypeVideoSupport = False If InStr(1, strData, "XP") > 0 Then checkSkypeVideoSupport = True If InStr(1, strData, "Server 2003") > 0 Then checkSkypeVideoSupport = True If InStr(1, strData, "Vista") > 0 Then checkSkypeVideoSupport = True End Function Function getDriveState(vBulk, vLowDisk, vFloppyFound) Dim vStart, vEnd, vBuffer, vBlock vBuffer = vBulk vFloppyFound = False vLowDisk = "" Do While InStr(1, vBuffer, "") > 0 vStart = InStr(1, vBuffer, "") + 14 vEnd = InStr(vStart,vBuffer, "") vBlock = Mid(vBuffer, vStart, vEnd - vStart) ' Check for floppy drive If LCase(extractBulkFrame(vBlock, "drive_letter")) = "a:" Then vFloppyFound = True If LCase(extractBulkFrame(vBlock, "drive_type")) = "hard drive" Then If IsNumeric(extractBulkFrame(vBlock, "drive_used")) = True Then If cInt(extractBulkFrame(vBlock, "drive_used")) >= 80 Then If vLowDrive = "" Then vLowDrive = extractBulkFrame(vBlock, "drive_letter") Else vLowDrive = vLowDrive & ", " & extractBulkFrame(vBlock, "drive_letter") End If End If End If End If vBuffer = Mid(vBuffer, vEnd, Len(vBuffer)) Loop vFloppy = vFloppyFound End Function Function extractDrive(vBulk) Dim vStart, vEnd, vBuffer, vBlock, vBGColor, vCount vBuffer = vBulk Response.Write " Disk Drives

" Response.Write "" vCount = 1 Do While InStr(1, vBuffer, "") > 0 vCount = vCount + 1 If vCount Mod 2 = 1 Then vBGColor = "#ffffff" Else vBGColor = "#dddddd" End If vStart = InStr(1, vBuffer, "") + 14 vEnd = InStr(vStart,vBuffer, "") vBlock = mid(vBuffer, vStart, vEnd - vStart) Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" vBuffer = Mid(vBuffer, vEnd, Len(vBuffer)) Loop Response.Write "
DriveType
Free
Total
% Used
" & extractBulkFrame(vBlock, "drive_letter") & "" & extractBulkFrame(vBlock, "drive_type") & "" & extractBulkFrame(vBlock, "drive_free") & "" & extractBulkFrame(vBlock, "drive_total") & "" & extractBulkFrame(vBlock, "drive_used") & " %
" End Function Function extractSMARTDevice(vBulk) Dim vStart, vEnd, vBuffer, vBlock, vBGColor, vCount vBuffer = vBulk Response.Write " S.M.A.R.T Enabled Device(s)

" Response.Write "" vCount = 1 If InStr(1, vBuffer, "") = 0 Then Response.Write "" End If Do While InStr(1, vBuffer, "") > 0 vCount = vCount + 1 If vCount Mod 2 = 1 Then vBGColor = "#ffffff" Else vBGColor = "#dddddd" End If vStart = InStr(1, vBuffer, "") + 13 vEnd = InStr(vStart,vBuffer, "") vBlock = mid(vBuffer, vStart, vEnd - vStart) Response.Write "" If Right(vBlock, 2) = "_0" Then Response.Write "" Else Response.Write "" End If vBuffer = Mid(vBuffer, vEnd, Len(vBuffer)) Loop Response.Write "
DeviceStatus
No S.M.A.R.T enabled devices detected.
" & Mid(vBlock, 1, Len(vBlock) - 2) & "OK
FAILING
" End Function Function returnSysTime(vTimeCalc) returnSysTime = Mid(vTimeCalc, 1, 4) & "-" & Mid(vTimeCalc, 5, 2) & "-" & Mid(vTimeCalc, 7, 2) & " " & Mid(vTimeCalc, 9, 2) & ":" & Mid(vTimeCalc, 11, 2) & ":" & Mid(vTimeCalc, 13, 2) End Function Function returnSystemInfoBlock(strSysInfo, strAddString) If strSysInfo = "" Then returnSystemInfoBlock = strAddString Else returnSystemInfoBlock = strSysInfo & "
" & strAddString End If End Function %>