Exemplo n.º 1
0
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('mode', 'Kategorie');
$optionForm->addHTML('</td><td>');
$optionForm->addHTML('<select id="mode" name="mode">');
$optionForm->addHTML('<option value="lesenswert">lesenswerte Artikel</option>');
$optionForm->addHTML('<option value="exzellent">exzellente Artikel</option>');
$optionForm->addHTML('<option value="informativ">informative Listen</option>');
$optionForm->addHTML('<option value="portal">informatives Portal</option>');
$optionForm->addHTML('</select>');
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td colspan="2">');
$optionForm->addButton('submit', 'Abgleichen');
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('</table>');
$optionForm->output();
$page->closeBlock();
if ($rq->allRequiredDefined() == true) {
    $page->openBlock('div', 'iw-content');
    $page->addInline('h2', 'Ergebnisse');
    $db->replicaConnect(Database::getName('de', 'wikipedia'));
    $t1 = 'SELECT page_title FROM page, page_props';
    switch ($par['mode']) {
        case 'lesenswert':
            $t1 .= ' WHERE pp_propname = \'wikibase-badge-Q17437798\' AND pp_page = page_id AND page_namespace = 0';
            break;
        case 'exzellent':
            $t1 .= ' WHERE pp_propname = \'wikibase-badge-Q17437796\' AND pp_page = page_id AND page_namespace = 0';
            break;
        case 'informativ':
            $t1 .= ' WHERE pp_propname = \'wikibase-badge-Q17506997\' AND pp_page = page_id AND page_namespace = 0';
            break;