<!--
if(moz) {
extendEventObject();
extendElementModel();
emulateAttachEvent();
}
function viewArc(aid){
if(aid==0) aid = getOneItem();
window.open("archives_do.php?aid="+aid+"&dopost=viewArchives");
}
function kwArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
if(qstr=='')
{
alert('必須選擇一個(gè)或多個(gè)文檔!');
return;
}
location="archives_do.php?aid="+aid+"&dopost=makekw&qstr="+qstr;
}
function editArc(aid){
if(aid==0) aid = getOneItem();
location="archives_do.php?aid="+aid+"&dopost=editArchives";
}
function updateArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="archives_do.php?aid="+aid+"&dopost=makeArchives&qstr="+qstr;
}
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="archives_do.php?aid="+aid+"&dopost=checkArchives&qstr="+qstr;
}
function moveArc(e, obj, cid){
var qstr=getCheckboxItem();
if(qstr=='')
{
alert('必須選擇一個(gè)或多個(gè)文檔!');
return;
}
LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr='+qstr+'&channelid='+cid+'&rnd='+Math.random(), 'moveArchives', '450px', '180px');
ChangeFullDiv('show');
}
function adArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr;
}
function cAtts(jname, e, obj)
{
var qstr=getCheckboxItem();
var screeheight = document.body.clientHeight + 20;
if(qstr=='')
{
alert('必須選擇一個(gè)或多個(gè)文檔!');
return;
}
LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'attsDlg', '450px', '160px');
ChangeFullDiv('show', screeheight);
}
function delArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives";
}
function QuickEdit(aid, e, obj)
{
LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid='+aid+'&rnd='+Math.random(), 'quickEdit', '450px', '300px');
ChangeFullDiv('show');
}
//百度排名
function getBaiduRanking(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
if(qstr=='')
{
alert('必須選擇一個(gè)或多個(gè)文檔!');
return;
}
location="ext_baidu.php?aid="+aid+"&dopost=BaiduRanking&qstr="+qstr;
}
//百度收錄
function getBaiduShoulu(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
if(qstr=='')
{
alert('必須選擇一個(gè)或多個(gè)文檔!');
return;
}
location="ext_baidu.php?aid="+aid+"&dopost=BaiduShoulu&qstr="+qstr;
}
//百度收錄排名 綜合查詢(xún)
function getBaiduZhonghe(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
if(qstr=='')
{
alert('必須選擇一個(gè)或多個(gè)文檔!');
return;
}
location="ext_baidu.php?aid="+aid+"&dopost=BaiduZhonghe&qstr="+qstr;
}
//上下文菜單
function ShowMenu(evt,obj,aid,atitle)
{
var popupoptions
popupoptions = [
new ContextItem("瀏覽文檔",function(){ viewArc(aid); }),
new ContextItem("編輯屬性",function(){ QuickEdit(aid, evt, obj); }),
new ContextItem("編輯文檔",function(){ editArc(aid); }),
new ContextSeperator(),
new ContextItem("更新HTML",function(){ updateArc(aid); }),
new ContextItem("審核文檔",function(){ checkArc(aid); }),
new ContextItem("推薦文檔",function(){ adArc(aid); }),
new ContextItem("刪除文檔",function(){ delArc(aid); }),
new ContextSeperator(),
new ContextItem("復(fù)制(<u>C</u>)",function(){ copyToClipboard(atitle); }),
new ContextItem("重載頁(yè)面",function(){ location.reload(); }),
new ContextSeperator(),
new ContextItem("全部選擇",function(){ selAll(); }),
new ContextItem("取消選擇",function(){ noSelAll(); }),
new ContextSeperator(),
new ContextItem("關(guān)閉菜單",function(){})
]
ContextMenu.display(evt,popupoptions);
//location="catalog_main.php";
}
//獲得選中文件的文件名
function getCheckboxItem()
{
var allSel="";
if(document.form2.arcID.value) return document.form2.arcID.value;
for(i=0;i<document.form2.arcID.length;i++)
{
if(document.form2.arcID[i].checked)
{
if(allSel=="")
allSel=document.form2.arcID[i].value;
else
allSel=allSel+"`"+document.form2.arcID[i].value;
}
}
return allSel;
}