-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
737 additions
and
543 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
$("#pwChangeShare").click(function(){ | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"s","name":"<?php echo dencrypt(1,$name)?>","do":"pwChange","opw":$("#oldPwShare").val(),"npw":$("#newPwShare").val()}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status=='OK'){ | ||
alert("修改成功"); | ||
}else{ | ||
alert("旧密码错误"); | ||
//history.go(0); | ||
//$("#pwChangeCancel").CLICK(); | ||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}); | ||
|
||
$("#shareCloseBtn").click(function(){ | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"shareClose"}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status=='OK'){ | ||
alert("关闭分享成功"); | ||
}else{ | ||
alert("关闭分享失败,请尝试刷新后再试"); | ||
history.go(0); | ||
//$("#pwChangeCancel").CLICK(); | ||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}); | ||
$("#shareBtn").click(function(){ | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"shareOpen"}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status=='OK'){ | ||
document.getElementById("shareSuccessBtn").click(); | ||
}else{ | ||
alert("分享失败,请尝试刷新后再试"); | ||
history.go(0); | ||
//$("#pwChangeCancel").CLICK(); | ||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}); | ||
$("#pwChange").click(function(){ | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"pwChange","opw":$("#oldPw").val(),"npw":$("#newPw").val()}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status!='OK'){ | ||
alert("旧密码错误"); | ||
}else{ | ||
alert("修改成功"); | ||
history.go(0); | ||
//$("#pwChangeCancel").CLICK(); | ||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}); | ||
$("#pwJudge").click(function(){ | ||
//$("Pw").click(); | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"pwJudge","pw":$("#Pw").val()}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status!='OK'){ | ||
alert("密码错误"); | ||
}else{ | ||
history.go(0); | ||
//$("#pwChangeCancel").CLICK(); | ||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}); | ||
$(function() { | ||
var $textarea = $(".content"); | ||
var content = $textarea.val(); | ||
|
||
// Use jQuery Tabby Plugin to enable the tab key on textareas. | ||
$textarea.tabby(); | ||
$textarea.focus(); | ||
|
||
// Make content available to print. | ||
//$(".print").text(content); | ||
|
||
//初次访问 | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"noteRead"}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status=='OK'){ | ||
$textarea.text(data.result); | ||
$("#processOK").text(' √'); | ||
}else if(data.status=='permissionDenied'){ | ||
document.getElementById("keyJudgeBtn").click(); | ||
}else if(data.status!='notExist'){ | ||
alert(data.status); | ||
$("#processOK").text(' X'); | ||
|
||
} | ||
|
||
}, | ||
//error:function(){ | ||
// alert("请求失败1"); | ||
// $("#processOK").text(' X'); | ||
// | ||
//}, | ||
error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
}, | ||
dataType:"json" | ||
}); | ||
|
||
// If content changes, update it. | ||
setInterval(function() { | ||
if (content !== $textarea.val()) { | ||
content = $textarea.val(); | ||
//$("#processOK").text(' ...'); | ||
$.ajax({ | ||
url: './lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"noteChange","data":content}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status!='OK'){ | ||
alert(data.status); | ||
$("#processOK").text(' X'); | ||
}else{ | ||
$textarea.text(data.result); | ||
$("#processOK").text(' ...'); | ||
|
||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
$("#processOK").text(' X'); | ||
|
||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}else{ | ||
$("#processOK").text(' √'); | ||
|
||
} | ||
}, 500); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
$("#pwJudge").click(function(){ | ||
//$("Pw").click(); | ||
$.ajax({ | ||
url: '../lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"pwJudge","pw":$("#Pw").val()}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status!='OK'){ | ||
alert("密码错误"); | ||
}else{ | ||
history.go(0); | ||
//$("#pwChangeCancel").CLICK(); | ||
} | ||
}, | ||
error:function(){ | ||
alert("请求失败"); | ||
}, | ||
/*error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
},*/ | ||
dataType:"json" | ||
}); | ||
|
||
}); | ||
$(function() { | ||
$("#goto").attr("style","display:none"); | ||
$("#keyBtn").attr("style","display:none"); | ||
$("#shareBtn").attr("style","display:none"); | ||
var $textarea = $(".content"); | ||
var content = $textarea.val(); | ||
|
||
// Use jQuery Tabby Plugin to enable the tab key on textareas. | ||
$textarea.tabby(); | ||
//$textarea.focus(); | ||
$textarea.attr("disabled","disabled"); | ||
$textarea.attr("style","background-color:white;"); | ||
// Make content available to print. | ||
//$(".print").text(content); | ||
|
||
//初次访问 | ||
$.ajax({ | ||
url: '../lib/handle.php', | ||
type: "POST", | ||
//data: "&t=" + encodeURIComponent(content) | ||
data:{"es":"<?php echo $es?>","name":"<?php echo $name?>","do":"noteRead"}, | ||
//data:{"1":"1"}, | ||
success:function(data){ | ||
if(data.status=='OK'){ | ||
$textarea.text(data.result); | ||
$("#processOK").text(' √'); | ||
}else if(data.status=='permissionDenied'){ | ||
document.getElementById("keyJudgeBtn").click(); | ||
}else if(data.status!='notExist'){ | ||
alert(data.status); | ||
$("#processOK").text(' X'); | ||
|
||
} | ||
}, | ||
//error:function(){ | ||
// alert("请求失败1"); | ||
// $("#processOK").text(' X'); | ||
// | ||
//}, | ||
error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
alert(XMLHttpRequest.status); | ||
alert(XMLHttpRequest.readyState); | ||
alert(errorThrown); | ||
}, | ||
dataType:"json" | ||
}); | ||
}); |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.