📄 execute.js
字号:
}catch(e)
{
alert('更新失败!请重试或与管理员联系');
}
if(returnValue!=true)
{
alert('更新失败!请重试或与管理员联系');
}
else
{
alert('更新日记成功!');
this.DiaryShowLoad();
}
}
//删除日记
this.DiaryDelete=function(id)
{
var returnValue=this.OBJ.diaryDelete(id).value;
if(returnValue!=true)
{
alert('删除失败!请重试或与管理员联系');
}
else
{
alert('删除成功!');
this.DiaryShowLoad(getValueById('txtPageIndex'));
}
}
//显示隐藏类别
this.DiaryIsVisible=function(id)
{
var returnValue=this.OBJ.diaryVisible(id).value;
if(returnValue!=true)
{
alert('公开/隐藏操作失败!');
}
else
{
this.DiaryShowLoad(getValueById('txtPageIndex'));
}
}
/*备忘录管理操作
Author:笨笨
Date:2006-2-28
*/
//备忘录添加面板
this.MemoPostLoad=function(editId)
{
if(editId==null)
{
var url=ServerPath+'ClubManage/Skin/'+'memoPost.aspx?cacheid='+Math.random();
setInnerHtmlById('mainContent',getHttpHtml(url));
ValMe('execute.MemoAdd()');
}
else
{
var url=ServerPath+'ClubManage/Skin/'+'memoPost.aspx?MemoID='+editId+'&cacheid='+Math.random();
setInnerHtmlById('mainContent',getHttpHtml(url));
ValMe('execute.MemoUpdate()');
}
}
//备忘录显示
this.MemoShowLoad=function(pageIndex)
{
var url=ServerPath+'ClubManage/Skin/'+'memoShow.aspx?cacheid='+Math.random();
if(pageIndex!=null)
{
url=ServerPath+'ClubManage/Skin/'+'memoShow.aspx?PageIndex='+pageIndex+'&cacheid='+Math.random();
}
setInnerHtmlById('mainContent',getHttpHtml(url));
}
//添加备忘录
this.MemoAdd=function()
{
var isRemind=document.getElementById('txtIsRemind').checked;
var returnValue;
returnValue=this.OBJ.memoAdd(getValueById('txtContent'),getValueById('txtRemindDate'),isRemind).value;
if(returnValue!=true)
{
alert('备忘录提交失败!请重试或与管理员联系!');
return;
}
alert('提交备忘录成功!');
this.MemoShowLoad();
}
//删除备忘录
this.MemoDelete=function(id)
{
var returnValue;
returnValue=this.OBJ.memoDelete(id).value;
if(returnValue!=true)
{
alert('备忘录删除失败!请重试或与管理员联系!');
return;
}
alert('删除备忘录成功!');
this.MemoShowLoad(getValueById('txtPageIndex'));
}
//备忘录提醒操作
this.MemoRemind=function(id)
{
var returnValue=this.OBJ.memoRemind(id).value;
if(returnValue!=true)
{
alert('备忘录提醒操作失败!请重试或与管理员联系!');
return;
}
this.MemoShowLoad(getValueById('txtPageIndex'));
}
//添加备忘录
this.MemoUpdate=function()
{
var isRemind=document.getElementById('txtIsRemind').checked;
var returnValue;
returnValue=this.OBJ.memoUpdate(getValueById('txtID'),getValueById('txtContent'),getValueById('txtRemindDate'),isRemind).value;
if(returnValue!=true)
{
alert('备忘录更新失败!请重试或与管理员联系!');
return;
}
alert('备忘录更新成功!');
this.MemoShowLoad();
}
/*备忘录管理操作
Author:笨笨
Date:2006-2-29
*/
//备忘录添加面板
this.MusicPostLoad=function(editId)
{
if(editId==null)
{
var url=ServerPath+'ClubManage/Skin/'+'musicPost.aspx?cacheid='+Math.random();
setInnerHtmlById('mainContent',getHttpHtml(url));
ValMe('execute.MusicAdd()');
}
else
{
var url=ServerPath+'ClubManage/Skin/'+'musicPost.aspx?MusicID='+editId+'&cacheid='+Math.random();
setInnerHtmlById('mainContent',getHttpHtml(url));
ValMe('execute.MusicUpdate()');
}
}
//音乐载入
this.MusicShowLoad=function(pageIndex,sortId)
{
var url=ServerPath+'ClubManage/Skin/'+'musicShow.aspx?cacheid='+Math.random();
if(pageIndex!=null)
{
url=ServerPath+'ClubManage/Skin/'+'musicShow.aspx?PageIndex='+pageIndex+'&cacheid='+Math.random();
}
if(sortId!=null)
{
url=ServerPath+'ClubManage/Skin/'+'musicShow.aspx?SortID='+sortId+'&cacheid='+Math.random();
}
if(pageIndex!=null&&sortId!=null)
{
url=ServerPath+'ClubManage/Skin/'+'musicShow.aspx?SortID='+sortId+'&PageIndex='+pageIndex+'&cacheid='+Math.random();
}
setInnerHtmlById('mainContent',getHttpHtml(url));
}
//上传MP3面版显示
this.UpLoadMusicShow=function(type)
{
if(type==1)
{
var returnValue=window.showModalDialog(ServerPath+'ClubManage/upMusic.aspx?Show=False',null,'dialogWidth:350px;dialogHeight:150px;');
if(returnValue)
{
document.getElementById('txtFileName').value=returnValue;
document.getElementById('panelUrl').style.display='none';
document.getElementById('panelMusic').style.display='';
document.getElementById('panelIsUpload').style.display='none';
}
else
{
var isUpLoadObj = document.getElementsByName('txtIsUpload');
isUpLoadObj[0].checked=true;
isUpLoadObj[1].checked=false;
document.getElementById('panelUrl').style.display='';
}
}
else
{
document.getElementById('txtMusicUrl').value='';
document.getElementById('panelUrl').style.display='';
}
}
//删除音乐
this.DelMusicFile=function()
{
if(!confirm("你的操作将删除所上传音乐,确定删除?"))
{
return;
}
this.OBJ.delMusic(getValueById('txtFileName'));
var isUpLoadObj = document.getElementsByName('txtIsUpload');
isUpLoadObj[0].checked=true;
isUpLoadObj[1].checked=false;
document.getElementById('panelUrl').style.display='';
document.getElementById('txtFileName').value='';
document.getElementById('panelMusic').style.display='none';
document.getElementById('panelIsUpload').style.display='';
}
//添加音乐
this.MusicAdd=function()
{
var isUpLoadObj = document.getElementsByName('txtIsUpLoad');
var musicUrl;
var isUpLoad;
if(isUpLoadObj[0].checked)
{
isUpLoad=false;
musicUrl=getValueById('txtMusicUrl');
if(!musicUrl)
{
alert('请输入音乐地址,格式如http://www.dooogo.com/abc.mp3,音乐格式:asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid');
return;
}
else
{
if(CheckFileType(musicUrl,'asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid')!=true)
{
alert('请输入正确格式的音乐地址');
return;
}
}
}
else
{
musicUrl=getValueById('txtFileName');
isUpLoad=true;
if(!musicUrl)
{
alert('请上传音乐,音乐格式:asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid');
return ;
}
else
{
if(CheckFileType(musicUrl,'asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid')!=true)
{
alert('请上传正确格式的音乐格式');
return ;
}
}
}
var returnValue;
try
{
returnValue=this.OBJ.musicAdd(getValueById('txtMusicName'),getValueById('txtSinger'),musicUrl,isUpLoad,getValueById('txtExplain'),getSelectValue('txtSortId')).value;
}catch(e)
{
alert(e);
}
if(returnValue!=true)
{
alert('添加音乐失败!请重试或与管理员联系!');
return ;
}
alert('添加音乐成功!');
this.MusicShowLoad();
}
//添加音乐
this.MusicUpdate=function()
{
var isUpLoadObj = document.getElementsByName('txtIsUpLoad');
var musicUrl;
var isUpLoad;
if(isUpLoadObj[0].checked)
{
isUpLoad=false;
musicUrl=getValueById('txtMusicUrl');
if(!musicUrl)
{
alert('请输入音乐地址,格式如http://www.dooogo.com/abc.mp3,音乐格式:asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid');
return;
}
else
{
if(CheckFileType(musicUrl,'asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid')!=true)
{
alert('请输入正确格式的音乐地址');
return;
}
}
}
else
{
musicUrl=getValueById('txtFileName');
isUpLoad=true;
if(!musicUrl)
{
alert('请上传音乐,音乐格式:asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid');
alert(musicUrl);
return ;
}
else
{
if(CheckFileType(musicUrl,'asf,asx,wma,wmx,wmv,wvx,mp3,wav,mid')!=true)
{
alert('请上传正确格式的音乐格式');
return ;
}
}
}
var returnValue;
try
{
returnValue=this.OBJ.musicUpdate(getValueById('txtID'),getValueById('txtMusicName'),getValueById('txtSinger'),musicUrl,isUpLoad,getValueById('txtExplain'),getSelectValue('txtSortId')).value;
}catch(e)
{
alert(e);
}
if(returnValue!=true)
{
alert('更新音乐失败!请重试或与管理员联系!');
return ;
}
alert('更新音乐成功!');
this.MusicShowLoad();
}
//删除音乐
this.MusicDelete=function(id)
{
var returnValue;
returnValue=this.OBJ.musicDelete(id).value;
if(returnValue!=true)
{
alert(returnValue);
alert('删除失败!请重试或与管理员联系!');
return ;
}
alert('删除成功!');
this.MusicShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}
this.MusicDeleteMore=function(sortID,pageIndex)
{
if(confirm("慎重!\n你的操作将删除所选中的音乐,确定删除?"))
{
var checkObjs = document.getElementsByName("checkID");
var delCount=0;
try
{
for(var i=0;i<checkObjs.length;i++)
{
if(checkObjs[i].checked==true)
{
this.OBJ.musicDelete(checkObjs[i].value).value;
delCount++;
}
}
if(delCount<=0)
{
alert('请选择要删除的音乐!');
return;
}
alert('已删除'+delCount+'条记录!');
this.MusicShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}catch(e)
{
alert('删除过程出错!请稍后再试或将问题提交网站管理员!');
}
}
}
//转移音乐
this.MusicMove=function()
{
if(confirm("确定转移?")!=true)
{
return ;
}
var checkObjs = document.getElementsByName("checkID");
var moveCount=0;
var ids='';
try
{
for(var i=0;i<checkObjs.length;i++)
{
if(checkObjs[i].checked==true)
{
ids=ids+checkObjs[i].value+',';
moveCount++;
}
}
if(moveCount<=0)
{
alert('请选择要转移的音乐!');
return;
}
this.OBJ.musicMove(getSelectValue('moveSortID'),ids);
alert('已转移'+moveCount+'条记录');
this.MusicShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}catch(e)
{
alert('转移过程出错!请稍后再试或将问题提交网站管理员!');
}
}
//上升
this.MusicUp=function(index)
{
if(index<=0)
{
alert("对不起,已经到顶啦!");
return ;
}
var returnValue=this.OBJ.musicUpDown(getValueById('id_'+index),getValueById('orderId_'+index),getValueById('id_'+(index-1)),getValueById('orderId_'+(index-1))).value;
if(returnValue!=true)
{
alert('上移失败!请重试!');
}
else
{
this.MusicShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}
}
//下降
this.MusicDown=function(index)
{
if(index>=(document.getElementsByName('checkID').length-1))
{
alert("对不起,已经到底啦!");
return ;
}
var returnValue=this.OBJ.musicUpDown(getValueById('id_'+index),getValueById('orderId_'+index),getValueById('id_'+(index+1)),getValueById('orderId_'+(index+1))).value;
if(returnValue!=true)
{
alert('下移失败!请重试!');
}
else
{
this.MusicShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -