delete('mst_voc_ctrl', 'topic_id='.$tid.' AND vocabolary_id='.$vid); echo ''; } if($itemID){ $table = new simbio_table(); $table->table_attr = 'align="center" class="detailTable" style="width: 98%;" cellpadding="2" cellspacing="0"'; // query database $voc_q = $dbs->query('SELECT * FROM mst_voc_ctrl WHERE topic_id='.$itemID); $row = 1; while ($voc_d = $voc_q->fetch_assoc()) { // fallback related topic id $topic_q = $dbs->query('SELECT topic FROM mst_topic WHERE topic_id='.$voc_d['related_topic_id']); $topic_d = $topic_q->fetch_row(); // alternate the row color $row_class = ($row%2 == 0)?'alterCell':'alterCell2'; // links $edit_link = ''; $remove_link = ''; $related_term = $voc_d['rt_id']; $table->appendTableRow(array($remove_link, $edit_link, $related_term, $topic_d[0])); $table->setCellAttr($row, null, 'valign="top" class="'.$row_class.'" style="font-weight: bold; width: auto;"'); $table->setCellAttr($row, 0, 'valign="top" class="'.$row_class.'" style="font-weight: bold; width: 5%;"'); $table->setCellAttr($row, 1, 'valign="top" class="'.$row_class.'" style="font-weight: bold; width: 5%;"'); $table->setCellAttr($row, 2, 'valign="top" class="'.$row_class.'" style="font-weight: bold; width: 8%;"'); $row++; } echo $table->printTable(); // hidden form echo '
'; } /* main content end */ $content = ob_get_clean(); // include the page template require SB.'/admin/'.$sysconf['admin_template']['dir'].'/notemplate_page_tpl.php';