Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
Windows
/
System32
/
srm
/
xslt
/
View File Name :
Sort.htc
<public:attach event="oncontentready" onevent="init();" /> <script> // // Copyright (c) 2004 Microsoft Corporation // // global variables var tHeadRows=null; var tBodyRows=null; var linesPerItem = 1; // Header state var reverse = false; var lastClickedObjectID = -1; var backgroundColorActive = "honeydew"; // Initialization routine - initializes the original text in the table header function init() { // get TBODY - take the first TBODY for the table to sort tBody = element.tBodies(0); if (!tBody) return; //Get THEAD var tHead = element.tHead; if (!tHead) return; // Set global state linesPerItem = tHead.linesPerItem; tHeadRows = tHead.children; tBodyRows = tBody.rows; var objectID = 0; var rowOffset = 0; for (var i=0; i<tHeadRows.length; i++) { var tHeadRow = tHeadRows[i]; if (tHeadRow.tagName != "TR") continue; // Ignore header rows with no item correspondent if (tHeadRow.noData == "yes") continue; var colOffset = 0; colCount = tHeadRow.children.length; for (var j=0; j<colCount; j++) { var clickCell = tHeadRow.children[j]; if (clickCell.sort != "yes") continue; clickCell.runtimeStyle.cursor = "hand"; clickCell.originalText = clickCell.innerText; clickCell.objectID = objectID; clickCell.rowOffset = rowOffset; clickCell.columnOffset = colOffset; clickCell.attachEvent("onclick", doClick); clickCell.attachEvent("onmouseenter", doMouseEnter); clickCell.attachEvent("onmouseleave", doMouseLeave); objectID++; colOffset++; } rowOffset++; } } // // doClick handler // function doClick(e) { var clickObject = e.srcElement; // Get the TD element while (clickObject.tagName != "TD") { clickObject = clickObject.parentElement; } // clear the sort images in the head var clickCell; for (var i=0; i<tHeadRows.length; i++) { var tHeadRow = tHeadRows[i]; if (tHeadRow.tagName != "TR") continue; colCount = tHeadRow.children.length; for (var j=0; j<colCount; j++) { clickCell = tHeadRow.children[j]; if (clickCell.sort != "yes") continue; // Clear the original text clickCell.innerText = clickCell.originalText; } } // We clicked on the same column if (lastClickedObjectID == clickObject.objectID) { if(reverse == false) { clickObject.innerText = clickObject.originalText + " ▼ "; reverse = true; } else { clickObject.innerText = clickObject.originalText + " ▲ "; reverse = false; } } else { reverse = false; clickObject.innerText = clickObject.originalText + " ▲ "; lastClickedObjectID = clickObject.objectID; } // Perform the sorting insertionSort(clickObject, reverse); } // // OnMouseEnter handler // function doMouseEnter(e) { // Get the TD element var currentObject = e.srcElement; if (currentObject == null) return; while (currentObject.tagName != "TD") { currentObject = currentObject.parentElement; if (currentObject == null) return; } currentObject.previousBackgroundColor = currentObject.bgColor; currentObject.bgColor = backgroundColorActive; } // // OnMouseLeave handler // function doMouseLeave(e) { // Get the TD element var currentObject = e.srcElement; if (currentObject == null) return; while (currentObject.tagName != "TD") { currentObject = currentObject.parentElement; if (currentObject == null) return; } // Reset the color to the original value currentObject.bgColor = currentObject.previousBackgroundColor; } // // Sorting routine // function insertionSort(clickObject, fReverse) { var dataRowsCount = tBodyRows.length/linesPerItem; // Bubble sort for (var iRowInsert = 1; iRowInsert < dataRowsCount; iRowInsert++) { var rowIndex = iRowInsert * linesPerItem + clickObject.rowOffset; var columnIndex = clickObject.columnOffset; var textRowInsert = tBodyRows[rowIndex].children[columnIndex].innerText; for ( iRowWalk = 0; iRowWalk <= iRowInsert ; iRowWalk++ ) { var rowIndexCurrent = iRowWalk * linesPerItem + clickObject.rowOffset; var textRowCurrent = tBodyRows[rowIndexCurrent].children[columnIndex].innerText; // We save our values so we can manipulate the numbers for // comparison current = textRowCurrent; insert = textRowInsert; // We remove the "MB" tag. To do this, we look for the space and remove it and whatever comes after that. // This routine assumes that the value was generated with the global:ConvertToMb() conversion function. // Note: the parseFloat() function will skip heading spaces and trailing characters. current = parseFloat(current); insert = parseFloat(insert); // If the value is not a number, we sort normally, else we evaluate // the value to get a numeric representation if ( isNaN(current) || isNaN(insert)) { current = textRowCurrent.toLowerCase(); insert = textRowInsert.toLowerCase(); } // Perform the comparison if (((!fReverse && insert < current) || ( fReverse && insert > current) ) && (iRowInsert != iRowWalk) ) { // Switch items for( var line = 0; line < linesPerItem; line++ ) { var eRowInsert = tBodyRows[iRowInsert * linesPerItem + line]; var eRowWalk = tBodyRows[iRowWalk * linesPerItem + line]; tBody.insertBefore(eRowInsert, eRowWalk); } // We are done iRowWalk = iRowInsert; } } } } </script>