「校務行政系統」修訂間的差異

出自旭陵維基
跳至導覽 跳至搜尋
 
(未顯示同一使用者於中間所作的 5 次修訂)
行 13: 行 13:
  
 
[https://cysh-cy.k12ea.gov.tw/SCH_UI/ 坐火箭前往車站搭蝸牛]
 
[https://cysh-cy.k12ea.gov.tw/SCH_UI/ 坐火箭前往車站搭蝸牛]
 +
 +
= 更新 =
 +
系統於2024/7/21更新,加上可更改密碼的功能。
  
  
行 55: 行 58:
 
event listener: ASLoadProgress.js
 
event listener: ASLoadProgress.js
 
<syntaxhighlight lang="javascript" line start="237">
 
<syntaxhighlight lang="javascript" line start="237">
 +
235|window.onmousemove = resetTimer;
 +
236|window.onkeypress = resetTimer;
 
237|window.addEventListener("compositionupdate", resetTimer);
 
237|window.addEventListener("compositionupdate", resetTimer);
 
</syntaxhighlight>
 
</syntaxhighlight>
行 85: 行 90:
 
=== 登出方法 ===
 
=== 登出方法 ===
 
轉網址至Login.aspx即可登出
 
轉網址至Login.aspx即可登出
 +
 +
=== 完整相關程式碼 ===
 +
<syntaxhighlight lang="javascript" line start="230">
 +
230|function inactivityTime() {
 +
231|    var ast;
 +
232|    var aspostback = new Date();
 +
233|    //window.onload = resetTimer;
 +
234|    // DOM Events
 +
235|    window.onmousemove = resetTimer;
 +
236|    window.onkeypress = resetTimer;
 +
237| window.addEventListener("compositionupdate", resetTimer);
 +
238|    //window.onmousedown = resetTimer; // catches touchscreen presses
 +
239|    //window.onclick = resetTimer;    // catches touchpad clicks
 +
240|    //window.onscroll = resetTimer;    // catches scrolling with arrow keys
 +
241|    resetTimer;
 +
242|
 +
243|    function logout() {
 +
244|        //alert("閒置時間過久,請重新登入");
 +
245|        //window.location = "Login.aspx";
 +
246|        var pagename = "Login.aspx";
 +
247|        var arrPath = location.pathname.split('/');
 +
248|        if (arrPath.length > 0) {
 +
249|            if (arrPath[arrPath.length - 1].toLowerCase().indexOf('.aspx') > -1) {
 +
250|                pagename = arrPath[arrPath.length - 1].toLowerCase();
 +
251|            }
 +
252|        }
 +
253| if (pagename.toUpperCase() != "LOGIN.ASPX") {
 +
254|            var asrelogintag;
 +
255|            var asreloginoutframe = window.top.document.getElementsByTagName('iframe');
 +
256|            while(asreloginoutframe.length > 0){
 +
257|                var ifinalframe = 0;
 +
258|                for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){
 +
259|            var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('asrelogin');
 +
260|            if(poptmp){
 +
261|                asrelogintag = poptmp;
 +
262|                break;
 +
263|            }
 +
264|            if(asreloginoutframe[ipopc].id == 'iframecontent'){
 +
265|                ifinalframe = ipopc;
 +
266|            }
 +
267|                }
 +
268|                asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe');
 +
269|                asreloginoutframe = asframetmp;
 +
270|            }
 +
271|            var basrelogin = false;
 +
272|            if(window.top.document.getElementById('ReLogin_div')){
 +
273|                basrelogin = true;
 +
274|            }else{
 +
275|                asreloginoutframe = window.top.document.getElementsByTagName('iframe');
 +
276|                while(asreloginoutframe.length > 0){
 +
277|                    var ifinalframe = 0;
 +
278|                    for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){
 +
279|                var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('ReLogin_div');
 +
280|                if(poptmp){
 +
281|                    basrelogin = true;
 +
282|                    break;
 +
283|                }
 +
284|                if(asreloginoutframe[ipopc].id == 'iframecontent'){
 +
285|                    ifinalframe = ipopc;
 +
286|                }
 +
287|                    }
 +
288|                    asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe');
 +
289|                    asreloginoutframe = asframetmp;
 +
290|                }
 +
291|            }
 +
292|
 +
293|            if (asrelogintag) {
 +
294|                if(!basrelogin){
 +
295|                    var asreloginchk;
 +
296|                    var website = location.href;
 +
297|                    website = website.substring(0, website.lastIndexOf('/') + 1);
 +
298|                    try {
 +
299|                     var asreloginclient = getXmlHttpRequestObject();
 +
300|                     asreloginclient.onreadystatechange = function () {
 +
301|                     if (asreloginclient.readyState == 4 && asreloginclient.status == 200) {
 +
302|                     asreloginchk = asreloginclient.getResponseHeader("asui");
 +
303|                     }
 +
304|                     }
 +
305|                     asreloginclient.open("GET", encodeURI(website + "AsCheck.ashx"), false);
 +
306|                     asreloginclient.send();
 +
307|                    }
 +
308|                    catch (e) {
 +
309|                    }
 +
310|
 +
311|                    if(!asreloginchk){
 +
312|                     //ReloginWindow();
 +
313|                    }
 +
314|                }
 +
315|            }
 +
316|            else {
 +
317| alert("閒置時間過久,請重新登入");
 +
318|                window.top.location = "../Login.aspx";
 +
319|            }
 +
320|        }
 +
321|    }
 +
322|
 +
323|    function resetTimer() {
 +
324| console.log("resetTimer");
 +
325|        window.top.clearTimeout(ast);
 +
326|        var sessionTimeoutWarning = 20; //min
 +
327|        var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000;
 +
328|        ast = window.top.setTimeout(logout, sTimeout);
 +
329|        var current = new Date();     
 +
330|        if (((current.getTime() - aspostback.getTime())/60000)>15)
 +
331|        {           
 +
332|            try {
 +
333|                var astimerclient = getXmlHttpRequestObject();
 +
334|                astimerclient.open("GET", encodeURI("AsCheck.ashx"), false);
 +
335|                astimerclient.send();
 +
336|            }
 +
337|            catch (e) {
 +
338|            }
 +
339|            aspostback = new Date();
 +
340|     console.log("AsCheck");
 +
341|        }
 +
342|        // 1000 milisec = 1 sec       
 +
343|    }
 +
344|};
 +
 +
</syntaxhighlight>
  
 
== 隱藏物件 ==
 
== 隱藏物件 ==
行 103: 行 228:
 
<code>#divprivacy_outer_id</code>
 
<code>#divprivacy_outer_id</code>
  
== 好笑的 ==
+
== iframe位置 ==
 +
所有第三層頁面
 +
 
 +
== 好想吐血 ==
 
# 這個系統引進jquery,但還是有很多時候是原始方法硬幹
 
# 這個系統引進jquery,但還是有很多時候是原始方法硬幹
 
# Javascript都亂放,一下放html裡一下放js檔案
 
# Javascript都亂放,一下放html裡一下放js檔案
行 109: 行 237:
 
# 頭像是用fixed的方式定位
 
# 頭像是用fixed的方式定位
 
# 該flex的地方不flex,不該flex的地方flex
 
# 該flex的地方不flex,不該flex的地方flex
 +
# 一下用css指定style一下用element.style
  
 
[[Category:嘉中系統]]
 
[[Category:嘉中系統]]
 
[[Category:給工程師]]
 
[[Category:給工程師]]

於 2024年7月21日 (日) 13:44 的最新修訂

校務行政系統

開發者 亞昕資訊股份有限公司
首次開放 2020年
原始碼 不開源(似乎)
目前版本 未知
程式語言 C++、C# (ASP.NET)
作業環境 Chrome
授權條款 All Rights Reserved


史上最慢的系統

坐火箭前往車站搭蝸牛

更新[編輯]

系統於2024/7/21更新,加上可更改密碼的功能。


工程師版本(外掛版) [編輯]

幫你修正讓這個系統更好用一點,選自己喜歡的用,不是廣告!!!

KnowScratcher - Better CYSH System[編輯]

KnowScratcher - Better CYSH System

技術紀載[編輯]

沒有破解做不到[編輯]

  1. 使用外部圖片
  2. 連接外部網站
  3. 使用外部檔案

JQuery版本[編輯]

3.6.1

CSP[編輯]

default-src 'self';
connect-src 'self';
font-src 'self' data:;
frame-src 'self' blob: data:;
img-src 'self' blob: data:;
media-src 'self';
object-src 'self' blob: data:;
script-src 'self' blob: data: 'unsafe-inline' 'unsafe-eval' https://accounts.google.com/;
style-src 'self' 'unsafe-inline';
frame-ancestors 'self' ;

平均載入時間[編輯]

3.5秒

閒置自動登出[編輯]

20分鐘

可使用resetTimer();來防止(如果你能access的話)

或是呼叫"compositionupdate"的事件也可以觸發

相關程式碼寫於ASLoadProgress.js

event listener: ASLoadProgress.js

235|window.onmousemove = resetTimer;
236|window.onkeypress = resetTimer;
237|window.addEventListener("compositionupdate", resetTimer);

resetTimer: ASLoadProgress.js

323|function resetTimer() {
324| 	console.log("resetTimer");
325|        window.top.clearTimeout(ast);
326|        var sessionTimeoutWarning = 20; //min
327|        var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000;
328|        ast = window.top.setTimeout(logout, sTimeout);
329|        var current = new Date();       
330|        if (((current.getTime() - aspostback.getTime())/60000)>15)
331|        {            
332|            try {
333|                var astimerclient = getXmlHttpRequestObject();
334|                astimerclient.open("GET", encodeURI("AsCheck.ashx"), false);
335|                astimerclient.send();
336|            }
337|            catch (e) {
338|            }
339|            aspostback = new Date();
340| 	    console.log("AsCheck");
341|        }
342|        // 1000 milisec = 1 sec         
343|    }

登出方法[編輯]

轉網址至Login.aspx即可登出

完整相關程式碼[編輯]

230|function inactivityTime() {
231|    var ast;
232|    var aspostback = new Date();
233|    //window.onload = resetTimer;
234|    // DOM Events
235|    window.onmousemove = resetTimer;
236|    window.onkeypress = resetTimer;
237|	window.addEventListener("compositionupdate", resetTimer);
238|    //window.onmousedown = resetTimer; // catches touchscreen presses
239|    //window.onclick = resetTimer;     // catches touchpad clicks
240|    //window.onscroll = resetTimer;    // catches scrolling with arrow keys
241|    resetTimer;
242|
243|    function logout() {
244|        //alert("閒置時間過久,請重新登入");
245|        //window.location = "Login.aspx";
246|        var pagename = "Login.aspx";
247|        var arrPath = location.pathname.split('/');
248|        if (arrPath.length > 0) {
249|            if (arrPath[arrPath.length - 1].toLowerCase().indexOf('.aspx') > -1) {
250|                pagename = arrPath[arrPath.length - 1].toLowerCase();
251|            }
252|        }
253|		if (pagename.toUpperCase() != "LOGIN.ASPX") {
254|            var asrelogintag;
255|            var asreloginoutframe = window.top.document.getElementsByTagName('iframe');
256|            while(asreloginoutframe.length > 0){
257|                var ifinalframe = 0;
258|                for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){
259|            	var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('asrelogin');
260|            	if(poptmp){
261|            	    asrelogintag = poptmp;
262|            	    break;
263|            	}
264|            	if(asreloginoutframe[ipopc].id == 'iframecontent'){
265|            	     ifinalframe = ipopc;
266|            	}
267|                }
268|                asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe');
269|                asreloginoutframe = asframetmp;
270|            }
271|            var basrelogin = false;
272|            if(window.top.document.getElementById('ReLogin_div')){
273|                basrelogin = true;
274|            }else{
275|                asreloginoutframe = window.top.document.getElementsByTagName('iframe');
276|                while(asreloginoutframe.length > 0){
277|                    var ifinalframe = 0;
278|                    for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){
279|            	    var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('ReLogin_div');
280|                	if(poptmp){
281|                	    basrelogin = true;
282|                	    break;
283|                	}
284|                	if(asreloginoutframe[ipopc].id == 'iframecontent'){
285|                	     ifinalframe = ipopc;
286|                	}
287|                    }
288|                    asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe');
289|                    asreloginoutframe = asframetmp;
290|                }
291|            }
292|
293|            if (asrelogintag) {
294|                if(!basrelogin){
295|                    var asreloginchk;
296|                    var website = location.href;
297|                    website = website.substring(0, website.lastIndexOf('/') + 1);
298|                    try {
299|	                    var asreloginclient = getXmlHttpRequestObject();
300|	                    asreloginclient.onreadystatechange = function () {
301|	                    	if (asreloginclient.readyState == 4 && asreloginclient.status == 200) {
302|	                    		asreloginchk = asreloginclient.getResponseHeader("asui");
303|	                    	}
304|	                    }
305|	                    asreloginclient.open("GET", encodeURI(website + "AsCheck.ashx"), false);
306|	                    asreloginclient.send();
307|                    }
308|                    catch (e) {
309|                    }
310|
311|                    if(!asreloginchk){
312|	                    //ReloginWindow();
313|                    }
314|                }
315|            }
316|            else {
317|				alert("閒置時間過久,請重新登入");
318|                window.top.location = "../Login.aspx";
319|            }
320|        }
321|    }
322|
323|    function resetTimer() {
324|	console.log("resetTimer");
325|        window.top.clearTimeout(ast);
326|        var sessionTimeoutWarning = 20; //min
327|        var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000;
328|        ast = window.top.setTimeout(logout, sTimeout);
329|        var current = new Date();       
330|        if (((current.getTime() - aspostback.getTime())/60000)>15)
331|        {            
332|            try {
333|                var astimerclient = getXmlHttpRequestObject();
334|                astimerclient.open("GET", encodeURI("AsCheck.ashx"), false);
335|                astimerclient.send();
336|            }
337|            catch (e) {
338|            }
339|            aspostback = new Date();
340|	    console.log("AsCheck");
341|        }
342|        // 1000 milisec = 1 sec         
343|    }
344|};

隱藏物件[編輯]

格視為html selector

slogan[編輯]

#form1 > table > tbody > tr > td > div:nth-child(2)

修改密碼 [編輯]

#divsecrecy_outer_id

帳號資訊[編輯]

#divinfo_outer_id

操作手冊[編輯]

#divpaper_outer_id

更多工具 [編輯]

#divastools_outer_id

成年 [編輯]

#divadult_outer_id

綁定裝置[編輯]

#divprivacy_outer_id

iframe位置[編輯]

所有第三層頁面

好想吐血 [編輯]

  1. 這個系統引進jquery,但還是有很多時候是原始方法硬幹
  2. Javascript都亂放,一下放html裡一下放js檔案
  3. 等server回應真的TMD久
  4. 頭像是用fixed的方式定位
  5. 該flex的地方不flex,不該flex的地方flex
  6. 一下用css指定style一下用element.style