Example #1
0
?>
" name="changeads[]"></div>
				</div>
				
			<!--ad footer-->
				<div id="ad_footer" class="panel ibox">
					<h2><?php 
echo _T("admin_ad_title_footer");
?>
</h2>
					<div class="code_box"><p class="teaser"><?php 
echo _T("admin_ad_label_footer");
?>
 </p></div>
					<div class="code_box"><textarea name="ad5" id="ad5" rows="8" cols="5" class="text_input long"><?php 
echo get_ad_code('footer', false);
?>
</textarea></div>
					<div class="code_box"><input class="button button_cen" type="submit" value="<?php 
echo _T("admin_set_save_button");
?>
" name="changeads[]"></div>
				</div>

				<div class="clear"></div>
			</div>
		</form>
<?php 
require CFADMINPATH . 'admin_page_footer.php';
die;
exit;
Example #2
0
/**
 * get_ad($name,$div_class=null,$echo=true)
 * @param string $name, The name of the ad to get
 * @param string $list_id Optional, Css Class for diz box around the ad code,default is null and will not add a div box
 * @param bool $echo Optional, default is true. False will 'return' value
 * @return string Echos or returns based on param $echo
 */
function get_ad($name, $div_class = null, $echo = true)
{
    if (!($myVar = get_ad_code($name))) {
        return false;
    }
    if (!is_null($div_class)) {
        $myVar = '<div class="' . $div_class . '">' . $myVar . '</div>';
    }
    if (!$echo) {
        return $myVar;
    }
    echo $myVar;
}