| @@ -15,39 +15,37 @@ | |||||
| var filetype = $Obj('filetype').value; | var filetype = $Obj('filetype').value; | ||||
| var info = $Obj('info').value; | var info = $Obj('info').value; | ||||
| $Obj('loaddiv').style.display = 'block'; | $Obj('loaddiv').style.display = 'block'; | ||||
| fetch('sys_safetest.php?action=test&filetype=' + filetype + "&info=" + info).then(resp=>{ | fetch('sys_safetest.php?action=test&filetype=' + filetype + "&info=" + info).then(resp=>{ | ||||
| if (resp.ok) { | |||||
| return resp.text() | |||||
| } | |||||
| throw new Error('系统错误,无法获取数据'); | |||||
| }).then((d)=>{ | |||||
| $DE('messagetd').innerHTML = d; | |||||
| $Obj('loaddiv').style.display = 'none'; | |||||
| }).catch((error) => { | |||||
| console.log(error); | |||||
| }); | |||||
| if (resp.ok) { | |||||
| return resp.text() | |||||
| } | |||||
| throw new Error('系统错误,无法获取数据'); | |||||
| }).then((d)=>{ | |||||
| $DE('messagetd').innerHTML = d; | |||||
| $Obj('loaddiv').style.display = 'none'; | |||||
| }).catch((error) => { | |||||
| console.log(error); | |||||
| }); | |||||
| } | } | ||||
| function LoadCtClear() { | function LoadCtClear() { | ||||
| $Obj('loaddiv').style.display = 'block'; | $Obj('loaddiv').style.display = 'block'; | ||||
| fetch('sys_safetest.php?action=clear').then(resp=>{ | fetch('sys_safetest.php?action=clear').then(resp=>{ | ||||
| if (resp.ok) { | |||||
| return resp.text() | |||||
| } | |||||
| throw new Error('系统错误,无法获取数据'); | |||||
| }).then((d)=>{ | |||||
| $DE('messagetd').innerHTML = d; | |||||
| $Obj('loaddiv').style.display = 'none'; | |||||
| }).catch((error) => { | |||||
| $DE('messagetd').innerHTML = errMsg; | |||||
| }); | |||||
| if (resp.ok) { | |||||
| return resp.text() | |||||
| } | |||||
| throw new Error('系统错误,无法获取数据'); | |||||
| }).then((d)=>{ | |||||
| $DE('messagetd').innerHTML = d; | |||||
| $Obj('loaddiv').style.display = 'none'; | |||||
| }).catch((error) => { | |||||
| $DE('messagetd').innerHTML = errMsg; | |||||
| }); | |||||
| } | } | ||||
| </script> | </script> | ||||
| </head> | </head> | ||||
| <body> | <body> | ||||
| <div id='loaddiv' style='display:none'> | |||||
| <p align='center' style='padding-top:200px'><img src='../static/web/img/loadinglit.gif'>请稍后,正在操作中</p> | |||||
| <div id="loaddiv" style="display:none"> | |||||
| <p align="center" style="padding-top:200px"><img src="../static/web/img/loadinglit.gif">请稍后,正在操作中</p> | |||||
| </div> | </div> | ||||
| <?php echo $alter; ?> | <?php echo $alter; ?> | ||||
| <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3"> | <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3"> | ||||
| @@ -13,50 +13,40 @@ | |||||
| font-size: 12px; | font-size: 12px; | ||||
| font-family: Sans-Serif; | font-family: Sans-Serif; | ||||
| } | } | ||||
| h2 { | h2 { | ||||
| margin: 0.5em 0 0.1em; | margin: 0.5em 0 0.1em; | ||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .top { | .top { | ||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .textInput { | .textInput { | ||||
| display: block; | display: block; | ||||
| width: 50%; | width: 50%; | ||||
| float: left; | float: left; | ||||
| } | } | ||||
| textarea { | textarea { | ||||
| width: 100%; | width: 100%; | ||||
| height: 300px; | height: 300px; | ||||
| } | } | ||||
| label:hover { | label:hover { | ||||
| text-decoration: underline; | text-decoration: underline; | ||||
| cursor: pointer; | cursor: pointer; | ||||
| } | } | ||||
| .spacer { | .spacer { | ||||
| margin-left: 10px; | margin-left: 10px; | ||||
| } | } | ||||
| .viewType { | .viewType { | ||||
| font-size: 16px; | font-size: 16px; | ||||
| clear: both; | clear: both; | ||||
| text-align: center; | text-align: center; | ||||
| padding: 1em; | padding: 1em; | ||||
| } | } | ||||
| #diffoutput { | #diffoutput { | ||||
| width: 100%; | width: 100%; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="text/javascript"> | <script type="text/javascript"> | ||||
| function diffUsingJS(viewType) { | function diffUsingJS(viewType) { | ||||
| "use strict"; | "use strict"; | ||||
| var base = difflib.stringAsLines($("#baseText").val()), | var base = difflib.stringAsLines($("#baseText").val()), | ||||
| @@ -64,10 +54,8 @@ | |||||
| sm = new difflib.SequenceMatcher(base, newtxt), | sm = new difflib.SequenceMatcher(base, newtxt), | ||||
| opcodes = sm.get_opcodes(), | opcodes = sm.get_opcodes(), | ||||
| diffoutputdiv = $("#diffoutput"); | diffoutputdiv = $("#diffoutput"); | ||||
| diffoutputdiv.html("") | |||||
| diffoutputdiv.html(diffview.buildView({ | |||||
| diffoutputdiv.html("") | |||||
| diffoutputdiv.html(diffview.buildView({ | |||||
| baseTextLines: base, | baseTextLines: base, | ||||
| newTextLines: newtxt, | newTextLines: newtxt, | ||||
| opcodes: opcodes, | opcodes: opcodes, | ||||
| @@ -76,7 +64,6 @@ | |||||
| viewType: 0 | viewType: 0 | ||||
| })); | })); | ||||
| } | } | ||||
| </script> | </script> | ||||
| </head> | </head> | ||||
| <body> | <body> | ||||
| @@ -14,12 +14,12 @@ | |||||
| <td height="26" background="../static/web/img/tbg.gif"> | <td height="26" background="../static/web/img/tbg.gif"> | ||||
| <div style="float:left">自动更新程序::待下载文件列表</div> | <div style="float:left">自动更新程序::待下载文件列表</div> | ||||
| <div style="float:right;padding-right:10px"> | <div style="float:right;padding-right:10px"> | ||||
| <a href='index_body.php' class='np coolbg'>返回系统主页</a> | |||||
| <a href="index_body.php" class="np coolbg">返回系统主页</a> | |||||
| </div> | </div> | ||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td height='350' valign='top' style="padding:6px;"> | |||||
| <td height="360" valign="top" style="padding:6px"> | |||||
| <?php | <?php | ||||
| echo $allFileList; | echo $allFileList; | ||||
| ?> | ?> | ||||