<input name="imageField" type="image" src=http://www.dede58.com/"img/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer" />
<img src=http://www.dede58.com/"img/button_back.gif" width="60" height="22" border="0" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer" />
</td>
</td>
</tr>
</table>
</form>
<?php
//AJAX窗体结束
}
然后再/*--------------------------
//批量删除属性
function attsDel(){ }
---------------------------*/的模块(注意,这里是指整个模块结束)后面加上下面的代码
/ *--------------------------
//批量增加tag
function addTags(){ }
---------------------------*/
else if($dopost=='tagsAdd')
{
CheckPurview('a_Commend,sys_ArcBatch');
if( !empty($aid) && empty($qstr) )
{
$qstr = $aid;
}
if($qstr=='')
{
ShowMsg("参数无效!",$ENV_GOBACK_URL);
exit();
}
if(empty($tags))
{
ShowMsg("必须指定要添加的tags!",$ENV_GOBACK_URL);
exit();
}
$arcids = ereg_replace('[^0-9,]','',ereg_replace('`', ',', $qstr));
//分解keywords
if($tags!='' && !ereg(',',$tags))
{
$keyarr = explode(' ', $tags);
}
else
{
$keyarr = explode(',', $tags);
}
//遍历关键字
foreach($keyarr as $keyword)
{
$keyword = trim($keyword);
if($keyword != '' && strlen($keyword)<13 )
{
$keyword = addslashes($keyword);
$row = $dsql->getone("select id from `dede_tagindex` where tag like '$keyword'");
if(is_array($row))
{
$tid = $row['id'];
$query = "update `dede_tagindex` set `total`=`total`+1 where id='$tid' ";
//遍历文章ID
$idarr = explode(',', $arcids);
foreach($idarr as $tagid)
{
InsertTags($keyword, $tagid);
}
}
}
}
ShowMsg("成功对选中文档增加指定的tags!",$ENV_GOBACK_URL);
exit();
}
上传,覆盖,然后完成。