Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/Users/User/AppData/Local/Temp/HouseCall32/interface/html/ |
<div id="stepView2_1" class="view current"> <p class="main_desc marginb_10"><span id="threat_count_summary"></span> <span id="scan_fix_desc">Click <strong>Fix Now </strong>to deal with the threats found. Note that changing the default actions might put your security at risk or harm your files.</span></p> <div class="float_box"> <div class="datatable_border"> <div class="record_table"> <div id="tbl_report_loading" class="datatable_loading"></div> <div class="record_table_header"> <table class="datatable scanresult"> <thead> <tr> <th class="col_result-file" id="th1">File</th> <th class="col_result-threat" id="th2">Threat</th> <th class="col_result-type" id="th3">Type</th> <th class="col_result-risk" id="th4">Risk</th> <th class="col_result-action" id="th5">Action</th> </tr> </thead> </table> </div> <div class="record_table_body" style="height: 158px;"> <div> <table class="datatable scanresult" id="tbl_report"> <tbody></tbody> </table> </div> </div> </div> </div> </div> <div class="btm_btn_area btm_btn_area_steps"> <!--<a class="btn_clean" id="btn_clean" href="javascript:void(0);"><span id="FixNow">Fix Now</span></a>--> <a class="btn_common" id="btn_clean" href="javascript:void(0);"><div id="FixNow">Fix Now</div></a> </div> </div> <script type="text/javascript"> //AD display setting if(!SHOW_AD){ $(".record_table_body").css("height", 178); } var hasConfirmChangeActionToClean = false; var hasConfirmChangeActionToPass = false; function ConfirmChangeActionToClean(x) { if( document.getElementById(x).value == "Clean" ) { if( hasConfirmChangeActionToClean == false ) { hasConfirmChangeActionToClean == true; jQuery('#dialog p').html(WARN_MSG_CHANGE_ACTION_CLEAN); jQuery('#dialog').dialog('option', { "buttons": (function(){ var dialog_buttons = {}; dialog_buttons[BTN_OK] = function () { jQuery(this).dialog("close"); }; dialog_buttons[BTN_CANCEL] = function () { jQuery(this).dialog("close"); var ctrl = document.getElementById(x); if( ctrl.options.selectedIndex == 1 ) { ctrl.options[0].selected = true; } else { ctrl.options[1].selected = true; } }; return dialog_buttons; })(), "close": function(event, ui) { }, "open": function(event, ui) { } }); jQuery('#dialog').dialog("open"); //if( !window.external.confirmDialog(WARN_MSG_CHANGE_ACTION_CLEAN) ) //{ // var ctrl = document.getElementById(x); // if( ctrl.options.selectedIndex == 1 ) // { // ctrl.options[0].selected = true; // } // else // { // ctrl.options[1].selected = true; // } //} } } } function ConfirmChangeActionToPass(x) { if( document.getElementById(x).value == "Pass" ) { if( hasConfirmChangeActionToPass == false ) { hasConfirmChangeActionToPass = true; jQuery('#dialog p').html(WARN_MSG_CHANGE_ACTION_PASS); jQuery('#dialog').dialog('option', { "buttons": (function(){ var dialog_buttons = {}; dialog_buttons[BTN_OK] = function () { jQuery(this).dialog("close"); }; dialog_buttons[BTN_CANCEL] = function () { jQuery(this).dialog("close"); var ctrl = document.getElementById(x); if( ctrl.options.selectedIndex == 1 ) { ctrl.options[0].selected = true; } else { ctrl.options[1].selected = true; } }; return dialog_buttons; })(), "close": function(event, ui) { }, "open": function(event, ui) { } }); jQuery('#dialog').dialog("open"); //if( !window.external.confirmDialog(WARN_MSG_CHANGE_ACTION_PASS) ) //{ // var ctrl = document.getElementById(x); // if( ctrl.options.selectedIndex == 1 ) // { // ctrl.options[0].selected = true; // } // else // { // ctrl.options[1].selected = true; // } //} } } } function tblCreateRowForResult(dataRow) { var cssRisk = "risk_level risk_level_3"; if( dataRow.r == "Low" ) cssRisk = "risk_level risk_level_1"; else if( dataRow.r == "Medium" ) cssRisk = "risk_level risk_level_2"; var colActionJS = "ConfirmChangeActionToPass(this.id);"; var colActionPassSelected = ""; var colActionCleanSelected = ""; if( dataRow.a == "Pass" || dataRow.tt == "Generic" ) { colActionPassSelected = "selected"; colActionJS = "ConfirmChangeActionToClean(this.id);" } else { colActionCleanSelected = "selected"; } var colAction = ""; if( dataRow.result == "" ) { colAction = String.format("<select id=\"select_{0}\" name=\"action\" onChange=\"{1}\">", dataRow.id, colActionJS); colAction += String.format("<option value=\"Pass\" {0}>{1}</option>", colActionPassSelected, UI_STR_ACTION_IGNORE); colAction += String.format("<option value=\"Clean\" {0}>{1}</option>", colActionCleanSelected, UI_STR_ACTION_FIX); colAction += "</select>"; } else { var colAction = UI_STR_IGNORED; if( dataRow.a == "Clean" ) { if( dataRow.reboot ) { colAction = UI_STR_FIXED_AT_RESTART; } else if( dataRow.result == "Success" ) { colAction = UI_STR_FIXED; } else { colAction = UI_STR_UNABLE_TO_FIX; } } } var fileName = strGetSubStringInByte(dataRow.f, 45); if( textWidth(fileName) >= 260 ) { fileName = strGetSubStringInByte(dataRow.f, 32); } var row = "<tr><td class=\"col_result-file\">" + String.format("<span title=\"{0}\">{1}</span>", dataRow.f, fileName) + "</td><td class=\"col_result-threat\">" + String.format("<a target=\"_blank\" href=\"{0}\">{1}</a>", String.format(UI_STR_VE_LINK, dataRow.tn), dataRow.tn) + "</td><td class=\"col_result-type\">" + tblGetL10nForThreatType(dataRow.tt) + "</td><td class=\"col_result-risk\">" + String.format("<span class=\"{0}\"></span>", cssRisk) + "</td><td class=\"col_result-action\">" + colAction + "</td></tr>"; return row; } function cbGetScanResult(scanHistory) { if(scanHistory == "") return; var jsonHistory = JSON.parse(scanHistory); for(var i = 0 ; i < jsonHistory.records.length ; i ++) { $('#tbl_report > tbody:last').append(tblCreateRowForResult(jsonHistory.records[i])); } } function cbGetScanResultStart() { //alert('show in cbGetScanResultStart'); $('#tbl_report_loading').show(); } function cbGetScanResultEnd() { //alert('hide in cbGetScanResultFinish'); $('#tbl_report_loading').hide(); $("span#threat_count_summary").html(String.format(UI_STR_FMT_CLEAN_SUM_THREAT_FOUND, $('#tbl_report tr').length)); } function GetScanResult() { $('#tbl_report > tbody').html(""); window.external.getScanResult("cbGetScanResult"); } $("#FixNow").live("click",function() { var reg = new RegExp("select_([0-9]+)"); var actionList = {actions:[]}; $("td > select").each(function(){ var m = reg.exec($(this).attr("Id")); if( m ) { actionList.actions.push({ id: m[1], act: $(this).val() }); } }); window.external.fixNow(JSON.stringify(actionList)); }); $("th#th_file").html(UI_STR_SCAN_RESULT_THEAD_FILE); $("th#th_threat").html(UI_STR_SCAN_RESULT_THEAD_THREAT); $("th#th_type").html(UI_STR_SCAN_RESULT_THEAD_TYPE); $("th#th_risk").html(UI_STR_SCAN_RESULT_THEAD_RISK); $("th#th_action").html(UI_STR_SCAN_RESULT_THEAD_ACTION); $("span#threat_count_summary").html(String.format(UI_STR_FMT_CLEAN_SUM_THREAT_FOUND, ' ')); $("span#scan_fix_desc").html(SCAN_FIX_DESC); $("div#FixNow").html(BTN_FIX_NOW); gotoNextStep(2); GetScanResult(); </script>