Пример #1
0
   $list += $types;
   $ms2->AddTextSearchDropDown('Typ', 'b.type', $list);
 */
 $ms2->AddResultField(t('Titel'), 'b.caption');
 $ms2->AddSelect('r.userid');
 $ms2->AddSelect('b.price');
 $ms2->AddSelect('b.price_payed');
 $ms2->AddResultField(t('Typ'), 'b.type', 'FetchType');
 $ms2->AddResultField(t('Prio.'), 'b.priority');
 $ms2->AddResultField(t('Status'), 'b.state', 'FetchState');
 $ms2->AddResultField(t('Reporter'), 'r.username AS reporter', 'UserNameAndIcon');
 $ms2->AddResultField(t('Bearbeiter'), 'a.username AS agent');
 $ms2->AddResultField(t('Antw.'), 'COUNT(c.relatedto_id) AS comments');
 $ms2->AddResultField(t('Datum'), 'UNIX_TIMESTAMP(b.date) AS date', 'MS2GetDate');
 $ms2->AddResultField(t('Letzte Änderung'), 'UNIX_TIMESTAMP(b.changedate) AS changedate', 'MS2GetDate');
 $ms2->SetTargetPage('comments', 20);
 $ms2->AddIconField('details', 'index.php?mod=bugtracker&bugid=%id%&ms_page=%page%', t('Details'));
 if ($auth['type'] >= 2) {
     $ms2->AddIconField('edit', 'index.php?mod=bugtracker&action=add&bugid=', t('Editieren'));
 }
 if ($auth['type'] >= 3) {
     $ms2->AddIconField('delete', 'index.php?mod=bugtracker&action=delete&bugid=', t('Löschen'));
 }
 if ($auth['type'] >= 2) {
     foreach ($bugtracker->stati as $key => $val) {
         $ms2->AddMultiSelectAction(t('Status') . ' -> ' . $val, 'index.php?mod=bugtracker&state=' . $key);
     }
     $ms2->AddMultiSelectAction(t('Bearbeiter löschen'), 'index.php?mod=bugtracker&userid=0');
     $res = $db->qry("SELECT userid, username FROM %prefix%user WHERE type >= 2");
     while ($row = $db->fetch_array($res)) {
         $ms2->AddMultiSelectAction(t('Bearbeiter') . ' -> ' . $row['username'], 'index.php?mod=bugtracker&userid=' . $row['userid']);