示例#1
0
        $strCol .= "Capogita:<br>";
        $strCol .= $db->record['nome'] . " " . $db->record['cognome'];
        $strCol .= "<br>";
        $strCol .= "Bici consigliata:";
        if ($db->record['tipobici'] == 'T') {
            $strCol .= "Tutte";
        } elseif ($db->record['tipobici'] == 'V') {
            $strCol .= "Con cambio";
        } elseif ($db->record['tipobici'] == 'C') {
            $strCol .= "Da citt&agrave";
        } else {
            $strCol .= "MTB";
        }
        $cols[] = $strCol;
        $aligns = array('justify', 'center');
        $doc->addTableRow($cols, $aligns, "", array('font-family' => 'Arial', 'width' => '10cm'));
        //$doc->addTableRow($cols, $aligns, "", array('font-weight' => 'bold'));
        unset($cols);
        $doc->endTable();
        $doc->addParagraph('<br>');
    }
    $doc->output('Lista gite approvate ' . date("Y") . '.doc');
    exit;
}
if (is_numeric($_GET['evid'])) {
    makeHead("Evento", "", "onload=\"init();\"");
    vis_evento();
    makeTail();
    exit;
}
if (is_numeric($_GET['id'])) {
示例#2
0
$doc->addParagraph('<img src="../file/bk_hcm.gif"/>Truong Dai hoc Bach Khoa Tp. Ho Chi Minh', $format);
$format = array('text-align' => 'center', 'font-weight' => 'bold', 'font-size' => '18pt', 'color' => 'blue');
$doc->addParagraph('BANG DIEM SINH VIEN', $format);
$format = array('text-align' => 'center', 'font-weight' => 'bold', 'font-size' => '20pt', 'color' => 'red');
$doc->addParagraph(vnstr($r['student_name']) . '-' . $r['student_id'], $format);
foreach ($term_result as $term_result_) {
    $doc->newPage();
    $format = array('font-weight' => 'bold', 'font-size' => '15pt', 'color' => 'grey');
    $name = 'HK ' . substr($term_result_['ten_hk'], -1, 1) . ' Nam hoc ' . substr($term_result_['ten_hk'], 0, 4) . '-' . substr($term_result_['ten_hk'], 4, 4);
    $doc->addParagraph($name, $format);
    $doc->startTable();
    $format = array('font-weight' => 'bold', 'font-size' => '15pt', 'color' => 'grey', 'background-color' => '#800000', 'FontFamily' => 'Times New Roman', 'width' => '200pt');
    $tieude = array('Ma MH', 'Ten MH', 'So TC', 'Kiem tra', 'Thi', 'TB');
    $aligns = array('center', 'center', 'center', 'center', 'center', 'center');
    $valigns = array('middle', 'middle', 'center', 'center', 'center', 'center');
    $doc->addTableRow($tieude, $aligns, $valigns, $format);
    foreach ($term_result_['detail'] as $term_result__) {
        $format = array('font-size' => '13pt', 'color' => 'grey');
        $cols = array();
        $cols[0] = $term_result__['subject_id'];
        $cols[1] = vnstr($term_result__['subject_name']);
        $cols[2] = $term_result__['credit'];
        $cols[3] = $term_result__['mid_term'] == null ? '---' : $term_result__['mid_term'];
        $cols[4] = $term_result__['end_term'] == null ? '---' : $term_result__['end_term'];
        $cols[5] = $term_result__['avg'] == null ? '---' : $term_result__['avg'];
        $doc->addTableRow($cols, $aligns, $valigns, $format);
        unset($cols);
    }
    $doc->endTable();
    $doc->addParagraph('');
    $doc->addParagraph('Thong ke');