📄 execute.js
字号:
return;
}
}
}
else
{
imageName=getValueById('txtFileName');
isUpLoad=true;
if(!imageName)
{
alert('请上传图片,图片格式:jpg,gif,png,bmp');
return ;
}
else
{
if(CheckFileType(imageName,'gif,bmp,jpg,png')!=true)
{
alert('请上传正确格式的图片地址');
return ;
}
}
}
try
{
var returnValue=this.OBJ.photoAdd(getValueById('txtPhotoName'),getValueById('txtPhotoExplian'),getSelectValue('txtSortId'),isUpLoad,photoType,0,imageName).value;
}
catch(e)
{
alert('添加失败,请检查图片地址的有效性!'+e);
return ;
}
if(returnValue!=true)
{
alert('添加失败,检查个人空间是否已满或图片地址是否正确!');
return ;
}
this.PhotoShowLoad(getValueById('txtPhotoType'),getValueById('txtSortType'));
loadState=false;
}
this.PhotoUpdate=function()
{
var isUpLoadObj = document.getElementsByName('txtIsUpload');
var imageName;
var isUpLoad;
if(isUpLoadObj[0].checked)
{
isUpLoad='false';
imageName=getValueById('txtUrl');
if(!imageName)
{
alert('请输入图片地址,格式如http://www.dooogo.com/abc.gif,图片格式:jpg,gif,png,bmp');
return;
}
else
{
if(CheckFileType(imageName,'gif,bmp,jpg,png')!=true)
{
alert('请输入正确格式的图片地址');
return;
}
}
}
else
{
imageName=getValueById('txtFileName');
isUpLoad=true;
if(!imageName)
{
alert('请上传图片,图片格式:jpg,gif,png,bmp');
return ;
}
else
{
if(CheckFileType(imageName,'gif,bmp,jpg,png')!=true)
{
alert('请上传正确格式的图片地址');
return ;
}
}
}
try
{
var returnValue=this.OBJ.photoUpdate(getValueById('txtID'),getValueById('txtPhotoName'),getValueById('txtPhotoExplian'),getSelectValue('txtSortId'),isUpLoad,getValueById('txtPhotoType'),0,imageName).value;
}
catch(e)
{
alert('更新失败,请检查图片地址的有效性!'+e);
return ;
}
if(returnValue!=true)
{
alert('更新失败,请检查图片地址的有效性稍后再试!');
return ;
}
alert('更新成功!');
this.PhotoShowLoad(getValueById('txtPhotoType'),getValueById('txtSortType'),null,getSelectValue('txtSortId'));
}
//转移类别
this.PhotoMove=function(photoType,sortType,sortId,pageIndex)
{
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.photoMove(getSelectValue('moveSortID'),ids);
alert('已转移'+moveCount+'条记录');
this.PhotoShowLoad(photoType,sortType,pageIndex,getValueById('txtSortID'));
}catch(e)
{
alert('转移过程出错!请稍后再试或将问题提交网站管理员!');
}
}
//上升
this.PhotoUp=function(index)
{
if(index<=0)
{
alert("对不起,已经到顶啦!");
return ;
}
var returnValue=this.OBJ.photoUpDown(getValueById('id_'+index),getValueById('orderId_'+index),getValueById('id_'+(index-1)),getValueById('orderId_'+(index-1))).value;
if(returnValue!=true)
{
alert('上移失败!请重试!');
}
else
{
this.PhotoShowLoad(getValueById('txtPhotoType'),getValueById('txtSortType'),getValueById('txtPageIndex'),getValueById('txtSortID'));
}
}
//下降
this.PhotoDown=function(index)
{
if(index>=(document.getElementsByName('checkID').length-1))
{
alert("对不起,已经到底啦!");
return ;
}
var returnValue=this.OBJ.photoUpDown(getValueById('id_'+index),getValueById('orderId_'+index),getValueById('id_'+(index+1)),getValueById('orderId_'+(index+1))).value;
if(returnValue!=true)
{
alert('下移失败!请重试!');
}
else
{
this.PhotoShowLoad(getValueById('txtPhotoType'),getValueById('txtSortType'),getValueById('txtPageIndex'),getValueById('txtSortID'));
}
}
/*文章管理操作
Author:笨笨
Date:2006-2-23
*/
//添加面板载入
this.ArticlePostLoad=function(editId)
{
if(editId==null)
{
var url=ServerPath+'ClubManage/Skin/'+'articlePost.aspx?cacheid='+Math.random();
setInnerHtmlById('mainContent',getHttpHtml(url));
ValMe('execute.ArticleAdd()');
}
else
{
var url=ServerPath+'ClubManage/Skin/'+'articlePost.aspx?ArticleID='+editId+'&cacheid='+Math.random();
var myPanel=getHttpHtml(url);
if(myPanel)
{
setInnerHtmlById('mainContent',myPanel);
if(confirm('确定编辑文章?')==true)
{
ValMe('execute.ArticleUpdate()');
}
else
{
this.ArticleShowLoad(1,getValueById('txtSortID'));
}
}
}
}
//添加文章
this.ArticleAdd=function()
{
var returnValue;
var content=getValueById('txtContent');
if(content.length<20)
{
alert('请输入大于20个字符的文章内容');
return ;
}
try
{
returnValue=this.OBJ.articleAdd(getValueById('txtTitle'),content,getSelectValue('txtArticleType'),getSelectValue('txtSortId')).value;
}catch(e)
{
alert('添加失败!请重试或与管理员联系');
}
if(returnValue!=true)
{
alert('添加失败!请重试或与管理员联系');
}
else
{
this.ArticleShowLoad();
}
}
//文章管理面板载入
this.ArticleShowLoad=function(pageIndex,sortId)
{
var url=ServerPath+'ClubManage/Skin/'+'articleShow.aspx?cacheid='+Math.random();
if(pageIndex!=null)
{
url=ServerPath+'ClubManage/Skin/'+'articleShow.aspx?PageIndex='+pageIndex+'&cacheid='+Math.random();
}
if(sortId!=null)
{
url=ServerPath+'ClubManage/Skin/'+'articleShow.aspx?SortID='+sortId+'&cacheid='+Math.random();
}
if(pageIndex!=null&&sortId!=null)
{
url=ServerPath+'ClubManage/Skin/'+'articleShow.aspx?SortID='+sortId+'&PageIndex='+pageIndex+'&cacheid='+Math.random();
}
setInnerHtmlById('mainContent',getHttpHtml(url));
}
//删除文章
this.ArticleDelete=function(id)
{
if(confirm("你的操作将删除该文章,确定删除?"))
{
var returnValue=this.OBJ.articleDelete(id).value;
if(returnValue!=true)
{
alert('删除失败!请稍后再试或将问题提交网站管理员!');
}
else
{
alert('删除成功!');
this.ArticleShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}
}
}
this.ArticleUpdate=function()
{
var content=getValueById('txtContent');
if(content.length<20)
{
alert('请输入大于20个字符的文章内容');
return ;
}
if(!confirm("确定更新?"))
{
return;
}
var returnValue=this.OBJ.articleUpdate(getValueById('txtId'),getValueById('txtTitle'),content,getSelectValue('txtArticleType'),getSelectValue('txtSortId')).value;
if(returnValue!=true)
{
alert('更新失败!请重试或与管理员联系!');
}
else
{
alert('更新成功!');
this.ArticleShowLoad(1,getValueById('txtSortID'));
}
}
//删除多条通讯录
this.ArticleDeleteMore=function()
{
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.articleDelete(checkObjs[i].value).value;
delCount++;
}
}
if(delCount<=0)
{
alert('请选择要删除的通讯录!');
return;
}
alert('已删除'+delCount+'条记录!');
this.ArticleShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}catch(e)
{
alert('删除过程出错!请稍后再试或将问题提交网站管理员!');
}
}
}
//转移文章
this.ArticleMove=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.articleMove(getSelectValue('moveSortID'),ids);
alert('已转移'+moveCount+'条记录');
this.ArticleShowLoad(getValueById('txtPageIndex'),getValueById('txtSortID'));
}catch(e)
{
alert('转移过程出错!请稍后再试或将问题提交网站管理员!');
}
}
/*日记管理操作
Author:笨笨
Date:2006-2-28
*/
//添加面板载入
this.DiaryPostLoad=function(editId)
{
if(editId==null)
{
var url=ServerPath+'ClubManage/Skin/'+'diaryPost.aspx?cacheid='+Math.random();
setInnerHtmlById('mainContent',getHttpHtml(url));
ValMe('execute.DiaryAdd()');
}
else
{
var url=ServerPath+'ClubManage/Skin/'+'diaryPost.aspx?DiaryID='+editId+'&cacheid='+Math.random();
var myPanel=getHttpHtml(url);
if(myPanel)
{
setInnerHtmlById('mainContent',myPanel);
if(confirm('确定编辑日记?')==true)
{
ValMe('execute.DiaryUpdate()');
}
else
{
this.DiaryShowLoad();
return ;
}
}
}
var mood = new BindSelect(ServerPath+"Javascript/mood.xml");
mood.BindData(document.getElementById("txtMood"),getValueById('editMood'));
var Weather = new BindSelect(ServerPath+"Javascript/Weather.xml");
Weather.BindData(document.getElementById("txtWeather"),getValueById('editWeather'));
}
//日记管理面板载入
this.DiaryShowLoad=function(pageIndex)
{
showLogin();
var url=ServerPath+'ClubManage/Skin/'+'diaryShow.aspx?cacheid='+Math.random();
if(pageIndex!=null)
{
url=ServerPath+'ClubManage/Skin/'+'diaryShow.aspx?PageIndex='+pageIndex+'&cacheid='+Math.random();
}
setInnerHtmlById('mainContent',getHttpHtml(url));
loadState=false;
}
//添加日记
this.DiaryAdd=function()
{
var returnValue;
var content=getValueById('txtContent');
var isVisible=document.getElementById('txtIsVisible').checked;
if(content.length<20)
{
alert('请输入大于20个字符的日记内容');
return ;
}
try
{
returnValue=this.OBJ.diaryAdd(getValueById('txtTitle'),content,getSelectValue('txtWeather'),getSelectValue('txtMood'),getValueById('txtPostDate'),isVisible).value;
}catch(e)
{
alert('提交失败!请重试或与管理员联系');
}
if(returnValue!=true)
{
alert('提交失败!请重试或与管理员联系');
}
else
{
alert('提交日记成功!');
this.DiaryShowLoad();
}
}
//更新成功
this.DiaryUpdate=function()
{
var returnValue;
var isVisible=document.getElementById('txtIsVisible').checked;
var content=getValueById('txtContent');
if(content.length<20)
{
alert('请输入大于20个字符的日记内容');
return ;
}
try
{
returnValue=this.OBJ.diaryUpdate(getValueById('txtID'),getValueById('txtTitle'),content,getSelectValue('txtWeather'),getSelectValue('txtMood'),getValueById('txtPostDate'),isVisible).value;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -