-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddnote.php
More file actions
168 lines (161 loc) · 7.14 KB
/
addnote.php
File metadata and controls
168 lines (161 loc) · 7.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
require_once 'doAUTH.php';
$AUTHf = new AUTH_FUNCTION();
$onpass = $AUTHf->checklogin();
if($onpass != "true"){
exit('<a href="/"><img src="/back.png"alt="back"></a>
<a href="/passport.php">请登录</a><br>
<a href="javascript:void(0);" onclick="">[缓存笔记文本+注册SW(未登录时禁用)]</a><br>
<a href="javascript:void(0);" onclick="bb()">[注销SW]</a><br>
<a href="javascript:void(0);" onclick="cc()">[重新加载main.js]</a><br>
<a href="javascript:void(0);" onclick="dd()">[重置笔记系统]</a><br>
<script>
function bb(){localStorage.ON_SW = "false";
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();alert("successfully, 请刷新页面");
} })}
function cc(){
var xhr2 = new XMLHttpRequest();
xhr2.open(\'GET\', "/main.js?t=" + Number(new Date()) , true);
xhr2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
xhr2.onload = function (e) {
if (this.status === 200 || this.status === 304) {
localStorage.ON_MAINJS = xhr2.responseText;window.location.reload();
//eval(localStorage.ON_MAINJS);
alert("加载js successfully");
}
};
xhr2.onprogress = function (e) {
console.log("js加载进度", (e.loaded/e.total*100).toFixed(2) + \'%\')
};
xhr2.send();
}
function dd(){
localStorage.ON_SW = "false";
localStorage.clear();
const clearCookies = document.cookie.split(\';\')
.forEach(cookie => document.cookie =
cookie.replace(/^ +/, \'\')
.replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));
if(\'caches\' in window) {
//caches.delete("v1.0.0");
caches.delete("ON");
}navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();
} })
alert("成功重置!");
window.location.href="https://on.ordylan.com/";
}
</script>
');}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/1.css">
<title>[Add-Note] OD_Note_System</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<script src="/TweenMax.min.js"></script>-->
<!--新js-->
<script src="/updatejs.js"></script><script>if(!localStorage.ON_MAINJS){localStorage.ON_MAINJS_NowUpdate="true";var xhr2=new XMLHttpRequest();xhr2.open('GET',"/main.js?"+Number(new Date()),true);xhr2.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");xhr2.onload=function(e){if(this.status===200||this.status===304){localStorage.ON_MAINJS=xhr2.responseText;window.location.reload()}};xhr2.send()}else{eval(localStorage.ON_MAINJS)}</script>
</head>
<body>
<div id="mmm">
<header><a href="/"><img src="/back.png" id="b" alt="back"></a><h1 id="oes">OD_Note_System</h1></header>
<div id="main" style="display: block;">
<hr>--Note--<a href="note_cut.html">[Cut Note]</a><a href="img_text.php">[Img add text]</a>
<form action="upload.php" enctype="multipart/form-data" method="post" id="a1">
<h2>Note Title: <input type="text" name="title"><br>
Note Introduction: <input type="text" name="about">引用笔记:"@_NOTE[笔记id];"<br>
Add Photos: <input type="file" name="File[]" multiple="multiple"><br>
Note Tag: <input type="number" name="tag">(Tag Id)<br>
Password: <input type="password" name="pass" id="pass" autocomplete="off"><br></h2>
<input type="submit">
</form><hr>
--Replenish--
<form action="upfile.php" enctype="multipart/form-data" method="post" id="a2">
<h2>
Replenish Photos: <input type="file" name="File[]" multiple="multiple"><br>
Password: <input type="password" name="pass" id="pass2" autocomplete="off"><br></h2>
<input type="submit">
</form><hr><br>
--Upload Paper--
<form action="uploadpaper.php" enctype="multipart/form-data" method="post" id="a2">
<h2>Paper Title: <input type="text" name="title"><br>
Paper Id: <input type="number" name="nmodeid"><br>
Paper File: <input type="file" name="File[]" multiple="multiple"><br>
Password: <input type="password" name="pass" id="pass3" autocomplete="off"><br></h2>
<input type="submit">
</form><hr>
--Develop--<br>
<a href="javascript:void(0);" onclick="aa('allnotetext')">[缓存笔记文本+注册SW(看笔记用,上传请不要点)]</a><br>
<a href="javascript:void(0);" onclick="bb()">[注销SW]</a><br>
<a href="javascript:void(0);" onclick="cc()">[重新加载main.js]</a><br>
<a href="javascript:void(0);" onclick="dd()">[重置笔记系统]</a><br>
笔记合集示例: https://on.ordylan.com/noteview/collections/62,61,60,59,58,
<script>
document.getElementById("a1").action=document.getElementById("a1").action+"?"+Number(new Date());
document.getElementById("a2").action=document.getElementById("a2").action+"?"+Number(new Date());
function aa(a){
localStorage.ON_SW = "true";
if('serviceWorker' in navigator){
navigator.serviceWorker.register('/sw.php?do=' + a)
.then(resitration => {
console.log("register" , resitration);
alert("successfully, 请刷新页面");
}).catch(err => console.error(err));
}
}
function bb(){localStorage.ON_SW = "false";
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();alert("successfully, 请刷新页面");
} })}
function cc(){
var xhr2 = new XMLHttpRequest();
xhr2.open('GET', "/main.js" , true);
xhr2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
xhr2.onload = function (e) {
if (this.status === 200 || this.status === 304) {
localStorage.ON_MAINJS = xhr2.responseText;window.location.reload();
// eval(localStorage.ON_MAINJS);
alert("加载js successfully");
}
};
xhr2.onprogress = function (e) {
console.log("js加载进度", (e.loaded/e.total*100).toFixed(2) + '%')
};
xhr2.send();
}
function dd(){
localStorage.ON_SW = "false";
localStorage.clear();
const clearCookies = document.cookie.split(';')
.forEach(cookie => document.cookie =
cookie.replace(/^ +/, '')
.replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));
if('caches' in window) {
//caches.delete("v1.0.0");
caches.delete("ON");
}navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister();
} })
alert("成功重置!");
window.location.href="https://on.ordylan.com/";
}
if(localStorage.ON_PWD){document.getElementById("pass").value = localStorage.ON_PWD;}
if(localStorage.ON_PWD2){document.getElementById("pass2").value = localStorage.ON_PWD2;}
if(localStorage.ON_PWD3){document.getElementById("pass3").value = localStorage.ON_PWD3;}
setInterval(function(){baocun();},300)
function baocun(){
localStorage.ON_PWD = document.getElementById("pass").value;
localStorage.ON_PWD2 = document.getElementById("pass2").value;
localStorage.ON_PWD3 = document.getElementById("pass3").value;
}
</script>
</div>
</body>
</html>