主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > 織夢(mèng)dedecms后臺(tái)文章百度收錄排名開(kāi)發(fā)教程

織夢(mèng)dedecms后臺(tái)文章百度收錄排名開(kāi)發(fā)教程

POST TIME:2020-03-31 11:55

1. 先把 :inc_baidu.php 放入后臺(tái)根目錄的的 inc 文件夾內(nèi),

2. 再把ext_baidu.php放入后臺(tái)根目錄

3. 然后修改后臺(tái)根目錄下的templets模版 文件夾 的content_list.htm :

代碼如下:

<a href="javascript:getBaiduRanking(0)" class="coolbg"> 百度排名 </a>
<a href="javascript:getBaiduShoulu(0)" class="coolbg"> 百度收錄 </a>
<a href="javascript:getBaiduZhonghe(0)" class="coolbg"> 百度綜合 </a>
4. 最后修改后臺(tái)根目錄下的js文件夾 的list.js :

代碼如下:
//百度排名
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;
}

inc_baidu.php完整代碼

<?php

require_once(dirname(__FILE__).'/../config.php');
require_once(DEDEADMIN.'/inc/inc_batchup.php');
require_once(DEDEADMIN.'/inc/inc_archives_functions.php');
require_once(DEDEINC.'/typelink.class.php');
require_once(DEDEINC.'/arc.archives.class.php');

//得到標(biāo)題
function getTitle($aid)
{
//利用傳遞ID,得到網(wǎng)址
$aid = $aid;
$aid = preg_replace("#[^0-9]#", '', $aid);
$Archives=new Archives();
//獲取表信息
$arcQuery = "SELECT title FROM `xjq_archives` WHERE id='$aid' ";
$arcRow =$Archives->dsql->GetOne($arcQuery);
$title=$arcRow[title];
return $title;
}

//得到網(wǎng)址
function getUrl($aid){
//利用傳遞ID,得到網(wǎng)址
$aid = $aid;
$aid = preg_replace("#[^0-9]#", '', $aid);
$Archives=new Archives();
//獲取主表信息
$query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon,
tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl
FROM `xjq_arctiny` arc
LEFT JOIN `xjq_arctype` tp ON tp.id=arc.typeid
LEFT JOIN `xjq_channeltype` ch ON ch.id=tp.channeltype
WHERE arc.id='$aid' ";
$trow = $Archives->dsql->GetOne($query);
$trow['maintable'] = ( trim($trow['maintable'])=='' ? 'xjq_archives' : trim($trow['maintable']) );
if($trow['issystem'] != -1)
{
$arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl
FROM `{$trow['maintable']}` arc LEFT JOIN `xjq_arctype` tp on arc.typeid=tp.id
LEFT JOIN `xjq_channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' ";
$arcRow =$Archives->dsql->GetOne($arcQuery);
if($arcRow['ismake']==-1 || $arcRow['corank']!=0 || $arcRow['arcrank']!=0 || ($arcRow['typeid']==0 && $arcRow['channel']!=-1) || $arcRow['money']>0)
{
$weburl='{$cfg_phpurl}/view.php?aid='.$aid;
return $weburl;
}
}
else
{
$arcRow['id'] = $aid;
$arcRow['typeid'] = $trow['typeid'];
$arcRow['senddate'] = $trow['senddate'];
$arcRow['title'] = '';
$arcRow['ismake'] = 1;
$arcRow['arcrank'] = $trow['corank'];
$arcRow['namerule'] = $trow['namerule'];
$arcRow['typedir'] = $trow['typedir'];
$arcRow['money'] = 0;
$arcRow['filename'] = '';
$arcRow['moresite'] = $trow['moresite'];
$arcRow['siteurl'] = $trow['siteurl'];
$arcRow['sitepath'] = $trow['sitepath'];
}
$arcurl = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],$arcRow['ismake'],$arcRow['arcrank'],
$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename'],$arcRow['moresite'],$arcRow['siteurl'],$arcRow['sitepath']);
$arcfile = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],
$arcRow['ismake'],$arcRow['arcrank'],$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename']);
if(preg_match("#^http:#", $arcfile))
{
$arcfile = preg_replace("#^http://([^/]*)/#i", '/', $arcfile);
}
$truefile = GetTruePath().$arcfile;
if(!file_exists($truefile))
{
MakeArt($aid,TRUE);
}
$weburl=$arcurl;
return $weburl;
}
/*//檢查排名
function getBaiduRanking($aid)
{
//利用傳遞ID,得到網(wǎng)址
$aid = $aid;
$aid = preg_replace("#[^0-9]#", '', $aid);
$Archives=new Archives();
//獲取主表信息
$query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon,
tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl
FROM `xjq_arctiny` arc
LEFT JOIN `xjq_arctype` tp ON tp.id=arc.typeid
LEFT JOIN `xjq_channeltype` ch ON ch.id=tp.channeltype
WHERE arc.id='$aid' ";
$trow = $Archives->dsql->GetOne($query);
$trow['maintable'] = ( trim($trow['maintable'])=='' ? 'xjq_archives' : trim($trow['maintable']) );
if($trow['issystem'] != -1)
{
$arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl
FROM `{$trow['maintable']}` arc LEFT JOIN `xjq_arctype` tp on arc.typeid=tp.id
LEFT JOIN `xjq_channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' ";
$arcRow =$Archives->dsql->GetOne($arcQuery);
if($arcRow['ismake']==-1 || $arcRow['corank']!=0 || $arcRow['arcrank']!=0 || ($arcRow['typeid']==0 && $arcRow['channel']!=-1) || $arcRow['money']>0)
{
$webname='{$cfg_phpurl}/view.php?aid='.$aid;
// exit();
}
}
else
{
$arcRow['id'] = $aid;
$arcRow['typeid'] = $trow['typeid'];
$arcRow['senddate'] = $trow['senddate'];
$arcRow['title'] = '';
$arcRow['ismake'] = 1;
$arcRow['arcrank'] = $trow['corank'];
$arcRow['namerule'] = $trow['namerule'];
$arcRow['typedir'] = $trow['typedir'];
$arcRow['money'] = 0;
$arcRow['filename'] = '';
$arcRow['moresite'] = $trow['moresite'];
$arcRow['siteurl'] = $trow['siteurl'];
$arcRow['sitepath'] = $trow['sitepath'];
}
$arcurl = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],$arcRow['ismake'],$arcRow['arcrank'],
$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename'],$arcRow['moresite'],$arcRow['siteurl'],$arcRow['sitepath']);
$arcfile = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],
$arcRow['ismake'],$arcRow['arcrank'],$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename']);
if(preg_match("#^http:#", $arcfile))
{
$arcfile = preg_replace("#^http://([^/]*)/#i", '/', $arcfile);
}
$truefile = GetTruePath().$arcfile;
if(!file_exists($truefile))
{
MakeArt($aid,TRUE);
}
$weburl=$arcurl;

$keyword=getTitle($aid);
$baiduurl = 'http://www.baidu.com/s?rn=100&wd='.$keyword;
$pagecode = RemoveUselessCode(file_get_contents($baiduurl));
//$pagecode = RemoveUselessCode($pagecode);
$seolist = getSeoList($pagecode);
$ranking = getNumber($seolist,$weburl);
return $ranking;
}*/
/*
//檢查收錄
function getBaiduShoulu($aid)
{
//利用傳遞ID,得到網(wǎng)址
$aid = $aid;
$aid = preg_replace("#[^0-9]#", '', $aid);
$Archives=new Archives();
//獲取主表信息
$query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon,
tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl
FROM `xjq_arctiny` arc
LEFT JOIN `xjq_arctype` tp ON tp.id=arc.typeid
LEFT JOIN `xjq_channeltype` ch ON ch.id=tp.channeltype
WHERE arc.id='$aid' ";
$trow = $Archives->dsql->GetOne($query);
$trow['maintable'] = ( trim($trow['maintable'])=='' ? 'xjq_archives' : trim($trow['maintable']) );
if($trow['issystem'] != -1)
{
$arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl
FROM `{$trow['maintable']}` arc LEFT JOIN `xjq_arctype` tp on arc.typeid=tp.id
LEFT JOIN `xjq_channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' ";
$arcRow =$Archives->dsql->GetOne($arcQuery);
if($arcRow['ismake']==-1 || $arcRow['corank']!=0 || $arcRow['arcrank']!=0 || ($arcRow['typeid']==0 && $arcRow['channel']!=-1) || $arcRow['money']>0)
{
$weburl='{$cfg_phpurl}/view.php?aid='.$aid;
// exit();
}
}
else
{
$arcRow['id'] = $aid;
$arcRow['typeid'] = $trow['typeid'];
$arcRow['senddate'] = $trow['senddate'];
$arcRow['title'] = '';
$arcRow['ismake'] = 1;
$arcRow['arcrank'] = $trow['corank'];
$arcRow['namerule'] = $trow['namerule'];
$arcRow['typedir'] = $trow['typedir'];
$arcRow['money'] = 0;
$arcRow['filename'] = '';
$arcRow['moresite'] = $trow['moresite'];
$arcRow['siteurl'] = $trow['siteurl'];
$arcRow['sitepath'] = $trow['sitepath'];
}
$arcurl = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],$arcRow['ismake'],$arcRow['arcrank'],
$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename'],$arcRow['moresite'],$arcRow['siteurl'],$arcRow['sitepath']);
$arcfile = GetFileUrl($arcRow['id'],$arcRow['typeid'],$arcRow['senddate'],$arcRow['title'],
$arcRow['ismake'],$arcRow['arcrank'],$arcRow['namerule'],$arcRow['typedir'],$arcRow['money'],$arcRow['filename']);
if(preg_match("#^http:#", $arcfile))
{
$arcfile = preg_replace("#^http://([^/]*)/#i", '/', $arcfile);
}
$truefile = GetTruePath().$arcfile;
if(!file_exists($truefile))
{
MakeArt($aid,TRUE);
}
$weburl=$arcurl;
// exit();
//return $weburl;

$baiduurl2 = 'http://www.baidu.com/s?wd='.$weburl;
//$baiduurl2 = 'http://www.baidu.com/s?wd=site%3A'.$weburl;
$pagecode2 = RemoveUselessCode(file_get_contents($baiduurl2));
$pagecode = RemoveUselessCode($pagecode);
$seolist2 = getSeoList($pagecode2);
$Shoulu = getShoulu($seolist2,$weburl);
return $Shoulu;
}*/
//檢查排名
function getBaiduRanking($aid)
{
$aid = $aid;
$keyword=getTitle($aid);
$weburl=getUrl($aid);

$baiduurl = 'http://www.baidu.com/s?rn=100&wd='.$keyword;
$pagecode = RemoveUselessCode(file_get_contents($baiduurl));
//$pagecode = RemoveUselessCode($pagecode);
$seolist = getSeoList($pagecode);
$ranking = getNumber($seolist,$weburl);
return $ranking;
}
//檢查收錄
function getBaiduShoulu($aid)
{
$aid = $aid;
$weburl=getUrl($aid);

$baiduurl2 = 'http://www.baidu.com/s?wd='.$weburl;
//$baiduurl2 = 'http://www.baidu.com/s?wd=site%3A'.$webname;
$pagecode2 = RemoveUselessCode(file_get_contents($baiduurl2));
$pagecode = RemoveUselessCode($pagecode);
$seolist2 = getSeoList($pagecode2);
$Shoulu = getShoulu($seolist2,$weburl);
return $Shoulu;
}
/*
* 去除不必要代碼 減少總字符數(shù) 增加處理速度
* @return string
*/
function RemoveUselessCode($string)
{
$string = preg_replace("/<style.*>.*</style>/isU", '', $string);//樣式
$string = preg_replace("/<script.*>.*</script>/isU", '', $string);//JS
$string = preg_replace("/<div id=&;out&;>.*</form></div>/isU", '', $string);//上導(dǎo)航
$string = preg_replace("/<div id=&;rs&;>.*</body>/isU", '', $string);//相關(guān)搜索
$string = preg_replace("/http://w{1,4}.baidu.com/.*&;/isU", '"', $string);//百度連接
$string = preg_replace("/<font color=#CC0000>(.*)</font>/isU", '\1', $string);//文字顏色
$string = preg_replace("/<em>(.*)</em>/isU", '\1', $string);//em標(biāo)簽
$string = preg_replace("/style=&;.*&;/isU", '', $string);//分樣式
$string = preg_replace("/onmousedown=&;.*&;/isU", '', $string);//動(dòng)作代碼
//$string = preg_replace('/s/isU', '', $string);
return $string;
}


/*
* 獲得自然排名信息列表
* @return array
*/
function getSeoList($string)
{
//列表正則
$Preg='/<table cellpadding=&;0&; cellspacing=&;0&;.*id=&;d{1,3}&;.*>.*</table>/isU';
//標(biāo)題正則
//$titlePreg='/<h3 class=&;t&;><a.*>(.*)</a></h3>/isU';
$titlePreg='/<td class=&;{0,1}f&;{0,1}.*>.*<a.* href=&;(.*)&;.*>(.*)</a>/isU';
//描述正則
$descriptionPreg='/<font size=&;{0,1}-1&;{0,1}>(.*)<br/isU';
//URL正則
$urlPreg='/<span class=&;g&;>(.*)</span>/isU';
//人工干預(yù)
$urlspecial='/<font color=&;{0,1}#008000&;{0,1}>(.*)</font>/isU';

preg_match_all($Preg,$string,$listinfo);
//print_r($listinfo);
if($listinfo == "")
{
return "-";
}
else
{
$i=0;
$list=array();
foreach($listinfo[0] as $listOne)
{
preg_match($titlePreg,$listOne,$title);
preg_match($descriptionPreg,$listOne,$description);
$description[1] = preg_replace('/<.*>(.*)</>/isU', '\1', $description[1]);
$list[$i]["title"]=$title[2];
$list[$i]["description"]=$description[1];
$list[$i]["url"]=$title[1];
$i++;
}
return $list;
}
}


/*
* 獲得排名
* @return string
*/
function getNumber(array $list,$weburl)
{
$number = 0;
foreach($list as $i=>$one)
{
if(stripos($one["url"],$weburl,0) !== false)
{
$number = $i+1;
return $number;
break;
}
}
return $number;
}

/*
* 判斷是否收錄
* @return string
*/
function getShoulu(array $list,$weburl)
{
$shoulu = '否';
foreach($list as $i=>$one)
{
if(stripos($one["url"],$weburl,0) !== false)
{
$shoulu = '是';
return $shoulu;
break;
}
}
return $shoulu;
}

?>

ext_baidu.php完整代碼

<?php
require_once(dirname(__FILE__).'/config.php');
require_once(DEDEADMIN.'/inc/inc_baidu.php');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>百度收錄排名by : w2kan.com</title>
</head>

<body>

<?php
$dopost=$_GET['dopost'];
$aid=$_GET['aid'];
$qstr=$_GET['qstr'];
if(empty($dopost))
{
ShowMsg('對(duì)不起,你沒(méi)指定運(yùn)行參數(shù)!','-1');
exit();
}
$aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : '';

/*--------------------------
//文檔百度排名
function getBaiduRanking(){ }
---------------------------*/
if($dopost=='BaiduRanking')
{
?>

<table width="500" border="1" align="center" cellpadding="1" cellspacing="1">
<tr bgcolor="#CCFFFF">
<td>ID</td>
<td>標(biāo)題</td>
<td>百度排名</td>

</tr>

<?php
if( !empty($aid) && empty($qstr) ) $qstr = $aid;

if($qstr=='')
{
ShowMsg("參數(shù)無(wú)效!","recycling.php");
exit();
}
$qstrs = explode("`", $qstr);
foreach($qstrs as $aid)
{
echo '<tr><td>'.$aid.'</td>';
echo '<td>'.getTitle($aid).'</td>';
echo '<td>'.getBaiduRanking($aid).'</td></tr>';
}



}

else if($dopost=='BaiduShoulu')
{
?>

<table width="500" border="1" align="center" cellpadding="1" cellspacing="1">
<tr bgcolor="#CCFFFF">
<td>ID</td>
<td>標(biāo)題</td>
<td>百度收錄</td>
</tr>

<?php
if( !empty($aid) && empty($qstr) ) $qstr = $aid;

if($qstr=='')
{
ShowMsg("參數(shù)無(wú)效!","recycling.php");
exit();
}
$qstrs = explode("`", $qstr);
foreach($qstrs as $aid)
{
echo '<tr><td>'.$aid.'</td>';
echo '<td>'.getTitle($aid).'</td>';
echo '<td>'.getBaiduShoulu($aid).'</td></tr>';
}



}else if($dopost=='BaiduZhonghe')

{
?>
<table width="500" border="1" align="center" cellpadding="1" cellspacing="1">
<tr bgcolor="#CCFFFF">
<td>ID</td>
<td>標(biāo)題</td>
<td>百度排名</td>
<td>百度收錄</td>
</tr>

<?php
if( !empty($aid) && empty($qstr) ) $qstr = $aid;

if($qstr=='')
{
ShowMsg("參數(shù)無(wú)效!","recycling.php");
exit();
}
$qstrs = explode("`", $qstr);
foreach($qstrs as $aid)
{
echo '<tr><td>'.$aid.'</td>';
echo '<td>'.getTitle($aid).'</td>';
echo '<td>'.getBaiduRanking($aid).'</td>';
echo '<td>'.getBaiduShoulu($aid).'</td></tr>';
}



}
?>
</table>
<br/>
<br/>

<table width="500" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><a href="content_list.php">返回列表</a></td>
<td>QQ:793664261

by@ w2kan.com</td>
</tr>
</table>

</body>
</html>

list.js 完整代碼

<!--
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;
}

//獲得選中其中一個(gè)的id
function getOneItem()
{
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)
{
allSel = document.form2.arcID[i].value;
break;
}
}
return allSel;
}

function selAll()
{
for(i=0;i<document.form2.arcID.length;i++)
{
if(!document.form2.arcID[i].checked)
{
document.form2.arcID[i].checked=true;
}
}
}
function noSelAll()
{
for(i=0;i<document.form2.arcID.length;i++)
{
if(document.form2.arcID[i].checked)
{
document.form2.arcID[i].checked=false;
}
}
}
-->



收縮
  • 微信客服
  • 微信二維碼
  • 電話(huà)咨詢(xún)

  • 400-1100-266