📄 guest_book_add.js
字号:
//——————————————————————————————
//作用:更新XML数据、无XML文件自动创建,发送成功状态HTML文件头,
//同时存储到ACCESS数据库,进行了特殊字符过滤。
//组成文件:guest_book_add.js - 接收成功状态
// guestbook.js - 装载部分
//——————————————————————————————
//歌手评论发表
function send_Singer(strType){
var doc=document.guestbook;
if(doc.username.value==""||doc.password.value==""){
alert('您的用户名不能为空');
return false;
}
if(doc.ping.value==""){
alert('您的评论不能为空');
doc.ping.focus();
return false;
}
xmlname=strType;
xmlnames="/pl/guest_book_add.asp?rep="+doc.REP.value+"&f="+doc.UserIcon.value+"&u="+doc.username.value+"&p="+doc.password.value+"&ping="+doc.ping.value+"&url="+xmlname+"&g_id="+ID
//document.write (xmlnames);
document.body.style.cursor='wait';
guest_show.style.display="none";
guest_none.style.display="block";
var sxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
sxmlhttp.open("GET",xmlnames,true);
sxmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
sxmlhttp.onreadystatechange=manges;
sxmlhttp.send()
function manges(){
if(sxmlhttp.readyState==4){
var infos=sxmlhttp.getResponseHeader("info");
if(infos=="ok"){
clearf();
alert("发表成功");
guestbook(xmlname);
}else{
if (infos!="用户名密码出错"){
alert(infos);
}else{
if (confirm('你的用户名密码出错?')){
window.open('http://my.yymp3.com/reg/Reg.asp');
}
}
}
guest_show.style.display="block";
guest_none.style.display="none";
document.body.style.cursor='';
}
}
}
//专辑评论发表
function send_Ablum(strType){
var doc=document.guestbook;
if(doc.username.value==""||doc.password.value==""){
alert('您的用户名不能为空');
return false;
}
if(doc.ping.value==""){
alert('您的评论不能为空');
doc.ping.focus();
return false;
}
xmlname=strType;
xmlnames="/pl/guest_book_adds.asp?rep="+doc.REP.value+"&f="+doc.UserIcon.value+"&u="+doc.username.value+"&p="+doc.password.value+"&ping="+doc.ping.value+"&url="+xmlname+"&g_id="+ID
//document.write (xmlnames);
document.body.style.cursor='wait';
guest_show.style.display="none";
guest_none.style.display="block";
var sxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
sxmlhttp.open("GET",xmlnames,true);
sxmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
sxmlhttp.onreadystatechange=manges;
sxmlhttp.send()
function manges(){
if(sxmlhttp.readyState==4){
var infos=sxmlhttp.getResponseHeader("info");
if(infos=="ok"){
clearf();
alert("发表成功");
guestbook(xmlname);
}else{
if (infos!="用户名密码出错"){
alert(infos);
}else{
if (confirm('你的用户名密码出错,?')){
window.open('http://my.yymp3.com/reg/Reg.asp');
}
}
}
guest_show.style.display="block";
guest_none.style.display="none";
document.body.style.cursor='';
}
}
}
//歌曲评论发表
function send_Music(strType,path){
var doc=document.guestbook;
if(doc.username.value==""||doc.password.value==""){
alert('您的用户名不能为空');
return false;
}
if(doc.ping.value==""){
alert('您的评论不能为空');
doc.ping.focus();
return false;
}
xmlname=path+Math.floor(strType/10000)+"/"+strType+".xml";
xmlnames="/pl/add_pl.aspx?pingf="+pingf+"&rep="+doc.REP.value+"&u="+doc.username.value+"&p="+doc.password.value+"&ping="+doc.ping.value+"&url="+xmlname+"&g_id="+ID+"&path="+xmlname;
//document.write (xmlnames);
document.body.style.cursor='wait';
guest_show.style.display="none";
guest_none.style.display="block";
var sxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
sxmlhttp.open("GET",xmlnames,true);
sxmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
sxmlhttp.onreadystatechange=manges;
sxmlhttp.send()
function manges(){
if(sxmlhttp.readyState==4){
var infos=sxmlhttp.getResponseHeader("info");
if(infos=="ok"){
clearf();
alert("发表成功");
guestbook(xmlname);
}else{
if (infos!="用户名密码出错"){
alert(infos);
}else{
if (confirm('你的用户名密码出错?')){
window.open('http://my.yymp3.com/reg/');
}
}
}
guest_show.style.display="block";
guest_none.style.display="none";
document.body.style.cursor='';
}
}
}
var prevIcon;
function icon(num,numb){
num.className="selected";
if(typeof(prevIcon)!="undefined"){
prevIcon.className="unselected";
}else{
document.all.firstface.className="unselected";
}
if(num.className=="unselected"){
num.className="selected";
}
prevIcon=num;
document.guestbook.UserIcon.value=numb;
faces.innerHTML="<img src='face/e"+numb+".gif'>"
}
function test()
{
document.domain="yymp3.com";
parent.document.all.comment.style.height=document.body.scrollHeight;
}
function clearf(){
document.guestbook.ping.value="";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -