/**
	 *  插入Tags
	 *
	 * @access    public
	 * @param     string  $tag  tag标签
	 * @param     int  $aid  文档AID
	 * @return    void
	 */
	if ( ! function_exists('InsertTags'))
	{
	    function InsertTags($tag, $aid)
	    {
	        $tags = explode(',',$tag);
	        foreach($tags as $tag)
	        {
	            $tag = trim($tag);
	            if(isset($tag[20]) || $tag!=stripslashes($tag))
	            {
	                continue;
	            }
	            InsertOneTag($tag,$aid);
	        }
	    }
	}
	 
	通过如下函数获取保存在表里的TAGS标签:
	/**
	 *  获得某文档的所有tag
	 *
	 * @param     int     $aid  文档id
	 * @return    string
	 */
	if ( ! function_exists('GetTags'))
	{
	    function GetTags($aid)
	    {
	        global $dsql;
	        $tags = '';
	        $query = "SELECT tag FROM `wmd_taglist` WHERE aid='$aid' ";
	        $dsql->Execute('tag',$query);
	        while($row = $dsql->GetArray('tag'))
	        {
	            $tags .= ($tags=='' ? $row['tag'] : ','.$row['tag']);
	        }
	        return $tags;
	    }
	}
	 
	函数在/include/helpers/archive.helper.php中
The End



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)