function display_links($member_id) { global $config, $t, $db; /// $links = array(); foreach ((array) $config['aff']['links'] as $k => $l) { $l['url'] = aff_make_url($l['url'], 'l' . $k, $member_id); $l['code'] = "<a href=\"{$l['url']}\">{$l['title']}</a>"; $links[] = $l; } $t->assign('links', $links); /// $banners = array(); foreach ((array) $config['aff']['banners'] as $k => $l) { $l['url'] = aff_make_url($l['url'], 'b' . $k, $member_id); $alt = htmlspecialchars($l[alt]); $wc = ($w = $l['width']) ? "width={$w}" : ""; $hc = ($h = $l['height']) ? "height={$h}" : ""; $l['code'] = "<a href=\"{$l['url']}\"><img src=\"{$l['image_url']}\" border=0 alt=\"{$alt}\" {$wc} {$hc}></a>"; $banners[] = $l; } $t->assign('banners', $banners); /// $t->display('aff_links.html'); }
function display_banners() { global $db, $t, $config; ///// $links = array(); foreach ((array) $config['aff']['links'] as $i => $l) { $l['url'] = aff_make_url($l['url'], 'l' . $i, -1); $l['code'] = "<a href=\"{$l['url']}\">{$l['title']}</a>"; $links[$i] = $l; } $t->assign('links', $links); ///////// foreach ((array) $config['aff']['banners'] as $i => $l) { $l['url'] = aff_make_url($l['url'], 'b' . $i, -1); $alt = htmlspecialchars($l['alt']); $wc = ($w = $l['width']) ? "width={$w}" : ""; $hc = ($h = $l['height']) ? "height={$h}" : ""; $l['code'] = "<a href=\"{$l['url']}\"><img src=\"{$l['image_url']}\" border=0 alt=\"{$alt}\" {$wc} {$hc}></a>"; $banners[$i] = $l; } $t->assign('banners', $banners); $t->display("admin/aff_banners.html"); }