Banner Updated!

"; if (isset($_GET['action'])) { if( 0 == strcmp('new', $_GET['action'])) { $list = false; if (isset($_POST['save'])) { $sql = "INSERT INTO $adMangler->adsTable ( `width`, `height`, `active`, `approved`, `type`, `code`, `href`, `advertiser`, `base`, `src` ) VALUES ( ".intval($_POST['width']).", ".intval($_POST['height']).", ".intval($_POST['active']).", ".intval($_POST['approved']).", \"".$_POST['type']."\", \"".$_POST['code']."\", \"".$_POST['href']."\", \"".$_POST['advertiser']."\", ".intval($_POST['base']).", \"".$_POST['src']."\" );"; $wpdb->query($sql); echo $message; $sql = "SELECT * FROM $adMangler->adsTable ORDER BY id DESC LIMIT 1"; $banner = $wpdb->get_row($sql); echo $adMangler->FormatAd($banner); } } else if (0 == strcmp('delete', $_GET['action']) && isset($_GET['id'])) { $sql = "DELETE FROM $adMangler->adsTable WHERE id=".intval($_GET['id']); $wpdb->query($sql); $list = true; } else if (0 == strcmp('edit', $_GET['action']) && isset($_GET['id'])) { $list = false; if (isset($_POST['save'])) { $sql = "UPDATE $adMangler->adsTable SET width=".intval($_POST['width']).", height=".intval($_POST['height']).", active=".intval($_POST['active']).", approved=".intval($_POST['approved']).", type=\"".$_POST['type']."\", code=\"".$_POST['code']."\", href=\"".$_POST['href']."\", advertiser=\"".$_POST['advertiser']."\", base=".intval($_POST['base']).", src=\"".$_POST['src']."\" WHERE id=".intval($_GET['id']); $wpdb->query($sql); echo $message; } } if (isset($_GET['id'])) { $sql = "SELECT * FROM $adMangler->adsTable WHERE id=".intval($_GET['id']); $banner = $wpdb->get_row($sql); echo $adMangler->FormatAd($banner); } } if (!$list): ?>

Edit Banner


example: http://www.webternals.com/banner.jpg

example: http://www.webetrnals.com/
Will this ad be used when we have no purchased ads to show?
   Delete

View Banners

Add New Banner

adsTable"; $results = $wpdb->get_results($sql); ?>
Action Preview Advertiser Active Approved Base Type Size
Edit | Delete preview
FormatAd($result); ?>
advertiser; ?> active) ? "Yes" : "No"; ?> approved) ? "Yes" : "No"; ?> base) ? "Yes" : "No"; ?> type; ?> width; ?>xheight; ?>