$module_name = $mm['module_name'];
 //$module_enabled = F_getBoolean($mm['module_enabled']);
 // ---- topic
 $where_sqls = 'subject_module_id=' . $module_id . '';
 if ($expmode < 2) {
     $where_sqls .= ' AND subject_id=' . $subject_id . '';
 }
 $sqls = F_select_subjects_sql($where_sqls);
 if ($rs = F_db_query($sqls, $db)) {
     while ($ms = F_db_fetch_array($rs)) {
         $subject_id = $ms['subject_id'];
         $subject_name = $ms['subject_name'];
         $subject_description = F_decode_tcecode($ms['subject_description']);
         //$subject_enabled = F_getBoolean($ms['subject_enabled']);
         // --- start page data ---
         $pdf->AddPage();
         // set barcode
         $pdf->setBarcode($subject_id);
         $pdf->SetFillColor(204, 204, 204);
         $pdf->SetLineWidth(0.1);
         $pdf->SetDrawColor(0, 0, 0);
         // print document name (title)
         $pdf->SetFont(PDF_FONT_NAME_DATA, 'B', PDF_FONT_SIZE_DATA * K_TITLE_MAGNIFICATION);
         $pdf->Cell(0, $main_cell_height * K_TITLE_MAGNIFICATION, $doc_title, 1, 1, 'C', 1);
         $pdf->Ln(5);
         // --- display subject info ---
         $pdf->SetFont(PDF_FONT_NAME_DATA, 'B', PDF_FONT_SIZE_DATA * HEAD_MAGNIFICATION);
         $pdf->Cell($page_width, $data_cell_height * HEAD_MAGNIFICATION, '' . $module_name . ' :: ' . $subject_name . '', 1, 1, $defalign, 1);
         $pdf->SetFont(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA);
         $pdf->writeHTMLCell(0, $data_cell_height, PDF_MARGIN_LEFT, $pdf->GetY(), $subject_description, 1, 1);
         // --- end subject info ---