示例#1
0
         }
         $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
         $tpl->set_ar_out(array('class' => $class, 'id' => $row['id'], 'name' => $row['name'], 'url' => $row['url'], 'pos' => $row['pos']), 4);
     }
     // Tabellenuebergang
     $tpl->out(1);
     // Aendern oder Einfuegen
     if ($aid == 'edit') {
         $mid = $menu->get(3);
         $erg = db_query('SELECT `pos`, `menu` FROM `prefix_modules` WHERE `id` = ' . $mid);
         $row = db_fetch_assoc($erg);
         $kat = getKats($row['menu']);
         $modul = dblistee($mid, 'SELECT `id`, `name` FROM `prefix_modules` WHERE (`menu` = "" AND (`gshow` = 1 OR `ashow` = 1)) OR `id` = ' . $mid . ' ORDER BY `name` ASC');
         $tpl->set_ar_out(array('aname' => 'Eintrag bearbeiten', 'modul' => $modul, 'kat' => $kat, 'pos' => $row['pos'], 'ANTISPAM' => get_antispam('adminuser_action', 0, true)), 5);
     } else {
         $kat = getKats();
         $modul = dblistee('', 'SELECT `id`, `name` FROM `prefix_modules` WHERE `menu` = "" AND (`gshow` = 1 OR `ashow` = 1) ORDER BY `name` ASC');
         $tpl->set_ar_out(array('aname' => 'Eintrag hinzufügen', 'modul' => $modul, 'kat' => $kat, 'pos' => $row['pos'], 'ANTISPAM' => get_antispam('adminuser_action', 0, true)), 5);
     }
     // Template-Footer
     $tpl->out(2);
     break;
 case 'del':
     // Betroffene Modul-ID
     $mid = $menu->get(3);
     // Aktuelle Position und Menus abfragen
     $erg = db_query('SELECT `pos`, `menu` FROM `prefix_modules` WHERE `id` = ' . $mid . ' LIMIT 0, 1');
     $row = db_fetch_assoc($erg);
     // Postitionen des alten Menues neu speichern und Modul-Kat zuruecksetzen
     db_query('UPDATE `prefix_modules` SET `pos` = `pos` -1 WHERE `menu` = "' . $row['menu'] . '" AND `pos` > ' . $row['pos']);
     db_query('UPDATE `prefix_modules` SET `menu` = "", `pos` = NULL WHERE `id` = ' . $mid);
示例#2
0
        $Ftxt = '';
        $Fgrecht = '';
        $FkatLis = '';
        $Fsub = 'Eintragen';
    } else {
        $row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE news_id = " . $menu->get(2)));
        $FnewsID = $row->news_id;
        $Faktion = 'change';
        $Fueber = $row->news_title;
        $Ftxt = stripslashes($row->news_text);
        $Fgrecht = $row->news_recht;
        $FkatLis = $row->news_kat;
        $Fsub = 'Ändern';
    }
    $tpl = new tpl('news', 1);
    $ar = array('NEWSID' => $FnewsID, 'AKTION' => $Faktion, 'MPL' => $MPL, 'UEBER' => $Fueber, 'txt' => $Ftxt, 'SMILIS' => getsmilies(), 'grecht' => dbliste($Fgrecht, $tpl, 'grecht', "SELECT id,name FROM prefix_grundrechte ORDER BY id DESC"), 'KATS' => getKats($FkatLis), 'FSUB' => $Fsub);
    $tpl->set_ar_out($ar, 0);
    // e d i t , d e l e t e
    $abf = 'SELECT news_id,news_title
	        FROM `prefix_news`
					ORDER BY news_time DESC
					LIMIT ' . $anfang . ',' . $limit;
    $erg = db_query($abf);
    $class = '';
    while ($row = db_fetch_object($erg)) {
        $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
        $tpl->set_ar_out(array('ID' => $row->news_id, 'class' => $class, 'TITEL' => $row->news_title), 1);
    }
    // e d i t , d e l e t e
    $tpl->set_ar_out(array('MPL' => $MPL), 2);
}
示例#3
0
        $Ftxt = '';
        $Fgrecht = '';
        $FkatLis = '';
        $Fsub = 'Eintragen';
    } else {
        $row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE `news_id` = " . $menu->get(2)));
        $FnewsID = $row->news_id;
        $Faktion = 'change';
        $Fueber = $row->news_title;
        $Ftxt = stripslashes($row->news_text);
        $Fgrecht = $row->news_recht;
        $FkatLis = $row->news_kat;
        $Fsub = 'Ändern';
    }
    $tpl = new tpl('news', 1);
    $ar = array('NEWSID' => $FnewsID, 'AKTION' => $Faktion, 'MPL' => $MPL, 'UEBER' => $Fueber, 'txt' => $Ftxt, 'SMILIS' => getsmilies(), 'grecht' => dbliste($Fgrecht, $tpl, 'grecht', "SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` DESC"), 'KATS' => getKats($FkatLis), 'FSUB' => $Fsub, 'ANTISPAM' => get_antispam('adminuser_action', 0, true));
    $tpl->set_ar_out($ar, 0);
    // e d i t , d e l e t e
    $abf = 'SELECT `news_id`,`news_title`
	        FROM `prefix_news`
					ORDER BY `news_time` DESC
					LIMIT ' . $anfang . ',' . $limit;
    $erg = db_query($abf);
    $class = '';
    while ($row = db_fetch_object($erg)) {
        $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
        $tpl->set_ar_out(array('ID' => $row->news_id, 'class' => $class, 'TITEL' => $row->news_title), 1);
    }
    // e d i t , d e l e t e
    $tpl->set_ar_out(array('MPL' => $MPL), 2);
}