$height = $rows[$key]['bannertext'] ? $rows[$key]['height'] + 90 : $rows[$key]['height'] + 64;
            }
            echo "<td height='25' align='" . $phpAds_TextAlignRight . "'>";
            echo "<a href='banner-htmlpreview.php?bannerid=" . $rows[$key]['bannerid'] . "' target='_new' ";
            echo "onClick=\"return openWindow('banner-htmlpreview.php?bannerid=" . $rows[$key]['bannerid'] . "', '', 'status=no,scrollbars=no,resizable=no,width=" . $width . ",height=" . $height . "');\">";
            echo "<img src='images/icon-zoom.gif' align='absmiddle' border='0'>&nbsp;" . $strShowBanner . "</a>&nbsp;&nbsp;";
            echo "</td>";
            echo "</tr>";
            $i++;
        }
        if (!$i) {
            echo "<tr height='25' bgcolor='#F6F6F6'>";
            echo "<td colspan='4'>&nbsp;&nbsp;" . $strZoneProbNullPri . "</td>";
            echo "</tr>";
        }
        // Footer
        echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
        echo "</table>";
    }
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
if (isset($zoneid) && $zoneid != '') {
    phpAds_showZoneBanners($zoneid);
    echo "<br><br>";
}
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
phpAds_PageFooter();
echo "<select name='zonetype' onChange='this.form.submit();' accesskey='" . $keyList . "' tabindex='" . $tabindex++ . "'>";
echo "<option value='" . phpAds_ZoneCampaign . "'" . ($zonetype == phpAds_ZoneCampaign ? " selected" : "") . ">" . $strCampaignSelection . "</option>";
echo "<option value='" . phpAds_ZoneBanners . "'" . ($zonetype == phpAds_ZoneBanners ? " selected" : "") . ">" . $strBannerSelection . "</option>";
echo "<option value='" . phpAds_ZoneRaw . "'" . ($zonetype == phpAds_ZoneRaw ? " selected" : "") . ">" . $strRawQueryString . "</option>";
echo "</select>";
echo "&nbsp;<input type='image' src='images/" . $phpAds_TextDirection . "/go_blue.gif' border='0'>";
echo "</td></tr>";
echo "</table>";
phpAds_ShowBreak();
echo "</form>";
echo "<br>";
if ($zonetype == phpAds_ZoneCampaign) {
    phpAds_showZoneCampaign($zone["width"], $zone["height"], $zone["what"], $zone['delivery']);
}
if ($zonetype == phpAds_ZoneBanners) {
    phpAds_showZoneBanners($zone["width"], $zone["height"], $zone["what"], $zone["zonetype"], $zone['delivery']);
}
if ($zonetype == phpAds_ZoneRaw) {
    echo "<form name='zonetypeselection' method='post' action='zone-include.php'>";
    echo "<input type='hidden' name='zoneid' value='" . $zoneid . "'>";
    echo "<input type='hidden' name='affiliateid' value='" . $affiliateid . "'>";
    echo "<input type='hidden' name='zonetype' value='{$zonetype}'>";
    echo "<input type='hidden' name='action' value='set'>";
    echo "<textarea cols='50' rows='16' name='what' style='width:600px;' tabindex='" . $tabindex++ . "'>" . (isset($zone['what']) ? $zone['what'] : '') . "</textarea>";
    echo "<br><br>";
    echo "<br><br>";
    echo "<input type='submit' name='submit' value='{$strSaveChanges}' tabindex='" . $tabindex++ . "'>";
    echo "</form>";
}
/*********************************************************/
/* Store preferences                                     */