<?php   if(!defined('DEDEINC')) exit('Request Error!');
/**
 * 廣告調用
 *
 * @version        $Id: myad.lib.php 1 9:29 2010年7月6日Z tianya $
 * @package        DedeCMS.Taglib
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
 
/*>>dede>>
<name>廣告標籤</name>
<type>全局標記</type>
<for>V55,V56,V57</for>
<description>獲取廣告代碼</description>
<demo>
{dede:myad name=''/}
</demo>
<attributes>
    <iterm>typeid:投放範圍,0為全站</iterm> 
    <iterm>name:廣告標識</iterm>
</attributes> 
>>dede>>*/
 
require_once(DEDEINC.'/taglib/mytag.lib.php');

function lib_myad(&$ctag, &$refObj)
{
    $attlist = "typeid|0,name|";
    FillAttsDefault($ctag->CAttribute->Items,$attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);

    $body = lib_GetMyTagT($refObj, $typeid, $name, '#@__myad');
    
    return $body;
}