function showForm(array $errors)
 {
     global $wgOut, $wgRequest;
     if (empty($errors)) {
         $wgOut->addWikiMsg('admanager_docu');
     } else {
         $text = "<div class=\"errorbox\">\n";
         foreach ($errors as $message => $pageTitles) {
             foreach ($pageTitles as $pageTitle) {
                 $text .= wfMsg($message, $pageTitle) . "<br />";
             }
         }
         $text .= "</div><br clear=\"both\" />";
         $wgOut->addWikiText($text);
     }
     $text = Xml::openElement('form', array('id' => 'admanager', 'action' => $this->getTitle()->getFullURL(), 'method' => 'post')) . "\n" . AdManagerUtils::hiddenField('title', $this->getTitle()->getPrefixedText()) . AdManagerUtils::hiddenField('submitted', 1);
     $this->currentData['Page'] = $this->getCurrentData('Page');
     $this->currentData['Category'] = $this->getCurrentData('Category');
     foreach ($this->adManagerZones as $zone) {
         $text .= '<h2> ' . wfMsg('admanager_zonenum', $zone) . ' </h2>';
         $text .= '<div style="float:left; margin-right: 6em;">';
         $text .= $this->drawTable('Page', $zone);
         $text .= '</div><div style="float: left;">';
         $text .= $this->drawTable('Category', $zone);
         $text .= '</div> <br clear="all">';
     }
     $text .= Xml::element('br');
     $text .= Xml::submitButton(wfMsg('admanager_submit'));
     $text .= Xml::closeElement('form');
     $text .= Xml::element('br');
     $wgOut->addHTML($text);
     $wgOut->addWikiMsg('admanager_gotozones');
 }
 function showForm(array $errors)
 {
     global $wgOut;
     if (empty($errors)) {
         $wgOut->addWikiMsg('admanagerzones_docu');
     } else {
         $text = "<div class=\"errorbox\">\n";
         foreach ($errors as $message => $pageTitles) {
             foreach ($pageTitles as $pageTitle) {
                 $text .= wfMsg($message, $pageTitle) . '<br />';
             }
         }
         $text .= "</div><br clear=\"both\" />";
         $wgOut->addWikiText($text);
     }
     $fullTableName = AD_ZONES_TABLE;
     $dbr = wfGetDB(DB_SLAVE);
     $current = $dbr->select($fullTableName, array('*'), array(), __METHOD__);
     // Fetch current table into array
     $currentArray = array();
     while ($currentRow = $current->fetchObject()) {
         $currentArray[] = $currentRow->ad_zone_id;
     }
     $display = '';
     foreach ($currentArray as $zone) {
         $display .= "{$zone}\n";
     }
     $text = Xml::openElement('form', array('id' => 'admanagerzones', 'action' => $this->getTitle()->getFullURL(), 'method' => 'post')) . "\n" . AdManagerUtils::hiddenField('title', $this->getTitle()->getPrefixedText()) . AdManagerUtils::hiddenField('submitted', 1);
     $text .= Xml::textarea('zones', $display, 25, 20, array('style' => 'width: auto; margin-bottom: 1em;'));
     $text .= Xml::element('br');
     $text .= Xml::submitButton(wfMsg('admanager_submit'));
     $text .= Xml::closeElement('form');
     $text .= Xml::element('br');
     $wgOut->addHTML($text);
     $wgOut->addWikiMsg('admanager_gotoads');
 }