コード例 #1
0
ファイル: FrequenciaSearch.php プロジェクト: tammy00/paps
 public function searchMinhasFrequencias($params, $idM)
 {
     $query = Frequencia::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     //$usuario = Usuario::findOne(['CPF' => Yii::$app->user->identity->cpf]);
     //$monitoria = Monitoria::findOne(['IDAluno' => $usuario->id]);
     $query->andFilterWhere(['id' => $this->id, 'IDMonitoria' => $idM, 'dmy' => $this->dmy, 'ch' => $this->ch, 'atividade' => $this->atividade]);
     $query->orderBy(['dmy' => SORT_ASC]);
     return $dataProvider;
 }
コード例 #2
0
ファイル: FrequenciaController.php プロジェクト: tammy00/paps
 /**
  * Finds the Frequencia model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Frequencia the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Frequencia::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('A página requisitada não existe.');
     }
 }
コード例 #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdFrequencia0()
 {
     return $this->hasOne(Frequencia::className(), ['idFrequencia' => 'idFrequencia']);
 }
コード例 #4
0
ファイル: MonitoriaController.php プロジェクト: tammy00/paps
    public function actionFrequenciaindividual()
    {
        $modelPeriodo = DisciplinaPeriodo::find()->orderBy(['anoPeriodo' => SORT_DESC, 'numPeriodo' => SORT_DESC])->one();
        $periodoletivo = $modelPeriodo->anoPeriodo . '/' . $modelPeriodo->numPeriodo;
        $dadosCabecalho = Periodo::find()->where(['codigo' => $periodoletivo])->one();
        $monitor = Usuario::find()->where(['cpf' => Yii::$app->user->identity->cpf])->one();
        $monitoria = AlunoMonitoria::find()->where(['periodo' => $periodoletivo])->andWhere(['IDAluno' => $monitor->id])->andFilterWhere(['or', ['like', 'status', 'Selecionado com bolsa'], ['like', 'status', 'Selecionado sem bolsa']])->one();
        if ($monitoria == null) {
            return $this->render('index', ['erro' => 1]);
        } else {
            $disc = DisciplinaMonitoria::find()->where(['id' => $monitoria->id_disciplina])->one();
        }
        if ($dadosCabecalho != null) {
            $cssfile = file_get_contents('../web/css/estilo5.css');
            $mpdf = new mPDF('utf-8', 'A4-L');
            $mpdf->title = '3. Frequência Individual';
            $mpdf->WriteHTML($cssfile, 1);
            // Cabeçalho do doc
            $mpdf->SetHTMLHeader('
                <img src="../web/img/cabecalho5.png" alt="Universidade Federal do Amazonas...." width="980" height="100">
                ');
            $mes = Monitoria::nomeMes(date('m') - 1);
            $ano = date('Y');
            if ($mes == 0) {
                $mes = 12;
                $ano = $ano - 1;
            }
            $mesNome = Monitoria::nomeMes($mes);
            $mpdf->WriteHTML('
                <br><br><br><br>
                <table id="periodoLetivo_mesAno" width="56%">
                    <tr>
                        <td bgcolor="#e6e6e6" width="7%">PERÍODO LETIVO</td>
                        <td width="21%">' . $periodoletivo . '</td>
                        <td bgcolor="#e6e6e6" width="7%">MÊS/ANO</td>
                        <td width="21%">' . $mesNome . '/' . $ano . '</td>
                    </tr>
                </table>
                <br>
                <table id="department_unity" width="99%">
                    <tr>
                        <td bgcolor="#e6e6e6" width="11%">DEPARTAMENTO</td>
                        <td width="40%">Coordenação Acadêmica</td>
                        <td bgcolor="#e6e6e6" width="10%">UNIDADE</td>
                        <td width="28%">Instituto de Computação - IComp</td>
                    </tr>
                </table>
                <br>
                <table id="disc_dados" width="99%">
                    <tr>
                        <td bgcolor="#e6e6e6" width="25%">DISCIPLINA<br>(código e título sem abreviações)</td>
                        <td width="74%">' . $disc->codDisciplina . ' - ' . $monitoria->nomeDisciplina . '</td>
                    </tr>
                </table>
            ');
            $mpdf->WriteHTML('
                <br>
                <table id="prof_monitor" width="99%">
                    <tr>
                        <td bgcolor="#e6e6e6" width="49%">PROFESSOR ORIENTADOR<br>(nome completo, sem abreviações e assinatura)</td>
                        <td bgcolor="#e6e6e6" width="50%">MONITOR<br>(nome completo, sem abreviações, nº de matrícula e assinatura)</td>
                    </tr>
                    <tr>
                        <td width="49%" align="left">Nome completo: ' . $monitoria->professor . '</td>
                        <td width="50%" align="left">Nome completo: ' . $monitoria->aluno . '</td>
                    </tr>
                    <tr>
                        <td width="49%" height="50" align="left">Ass:</td>
                        <td width="50%" height="50" align="left">Ass:</td>
                    </tr>
                </table>
                <br>
            ');
            $array_diaSemana = array();
            $array_diaMes = array();
            $array_carga = array();
            $cont_dia = 1;
            $dia = $ano . '-' . $mes . '-01';
            // O primeiro dia (data) do mês anterior
            $diaTotal = date('d', strtotime(date('Y-m-t', strtotime($dia))));
            while ($cont_dia <= $diaTotal) {
                $f = Frequencia::find()->where(['dmy' => $dia])->andWhere(['>=', 'IDMonitoria', $monitoria->id])->one();
                if ($f != null) {
                    $array_carga[] = $f->ch;
                } else {
                    $array_carga[] = '-';
                }
                $array_diaSemana[] = Monitoria::nomeDia(date('w', strtotime($dia)));
                // Pega tradução do dia da semana e põe no array
                $aux = strtotime("+1 day", strtotime($dia));
                $dia = date('Y-m-d', $aux);
                $array_diaMes[] = $cont_dia;
                // Põe o dia no array
                $cont_dia++;
            }
            //return $this->render('index');
            if ($diaTotal == 28) {
                $mpdf->WriteHTML('
                    <table id="calendario"  height="25px" width="900px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_da_semana.png" alt="DIA DA SEMANA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaSemana[0] . '</td> <td width="30px">' . $array_diaSemana[1] . '</td> <td width="30px">' . $array_diaSemana[2] . '</td> 
                            <td width="30px">' . $array_diaSemana[3] . '</td> <td width="30px">' . $array_diaSemana[4] . '</td> <td width="30px">' . $array_diaSemana[5] . '</td>
                            <td width="30px">' . $array_diaSemana[6] . '</td> <td width="30px">' . $array_diaSemana[7] . '</td> <td width="30px">' . $array_diaSemana[8] . '</td>
                            <td width="30px">' . $array_diaSemana[9] . '</td> <td width="30px">' . $array_diaSemana[10] . '</td> <td width="30px">' . $array_diaSemana[11] . '</td>
                            <td width="30px">' . $array_diaSemana[12] . '</td> <td width="30px">' . $array_diaSemana[13] . '</td> <td width="30px">' . $array_diaSemana[14] . '</td>
                            <td width="30px">' . $array_diaSemana[15] . '</td> <td width="30px">' . $array_diaSemana[16] . '</td> <td width="30px">' . $array_diaSemana[17] . '</td>
                            <td width="30px">' . $array_diaSemana[18] . '</td> <td width="30px">' . $array_diaSemana[19] . '</td> <td width="30px">' . $array_diaSemana[20] . '</td>
                            <td width="30px">' . $array_diaSemana[21] . '</td> <td width="30px">' . $array_diaSemana[22] . '</td> <td width="30px">' . $array_diaSemana[23] . '</td>
                            <td width="30px">' . $array_diaSemana[24] . '</td> <td width="30px">' . $array_diaSemana[25] . '</td> <td width="30px">' . $array_diaSemana[26] . '</td>
                            <td width="30px">' . $array_diaSemana[27] . '</td> <td width="30px">' . $array_diaSemana[28] . '</td> <td width="30px">' . $array_diaSemana[29] . '</td>
                            <td width="30px">' . $array_diaSemana[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="902px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_do_mes.png" alt="DIA DO MÊS" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaMes[0] . '</td> <td width="30px">' . $array_diaMes[1] . '</td> <td width="30px">' . $array_diaMes[2] . '</td> 
                            <td width="30px">' . $array_diaMes[3] . '</td> <td width="30px">' . $array_diaMes[4] . '</td> <td width="30px">' . $array_diaMes[5] . '</td>
                            <td width="30px">' . $array_diaMes[6] . '</td> <td width="30px">' . $array_diaMes[7] . '</td> <td width="30px">' . $array_diaMes[8] . '</td>
                            <td width="30px">' . $array_diaMes[9] . '</td> <td width="30px">' . $array_diaMes[10] . '</td> <td width="30px">' . $array_diaMes[11] . '</td>
                            <td width="30px">' . $array_diaMes[12] . '</td> <td width="30px">' . $array_diaMes[13] . '</td> <td width="30px">' . $array_diaMes[14] . '</td>
                            <td width="30px">' . $array_diaMes[15] . '</td> <td width="30px">' . $array_diaMes[16] . '</td> <td width="30px">' . $array_diaMes[17] . '</td>
                            <td width="30px">' . $array_diaMes[18] . '</td> <td width="30px">' . $array_diaMes[19] . '</td> <td width="30px">' . $array_diaMes[20] . '</td>
                            <td width="30px">' . $array_diaMes[21] . '</td> <td width="30px">' . $array_diaMes[22] . '</td> <td width="30px">' . $array_diaMes[23] . '</td>
                            <td width="30px">' . $array_diaMes[24] . '</td> <td width="30px">' . $array_diaMes[25] . '</td> <td width="30px">' . $array_diaMes[26] . '</td>
                            <td width="30px">' . $array_diaMes[27] . '</td> <td width="30px">' . $array_diaMes[28] . '</td> <td width="30px">' . $array_diaMes[29] . '</td>
                            <td width="30px">' . $array_diaMes[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="90px">
                        <tr>
                            <td bgcolor="#e6e6e6">
                            <img src="../web/img/carga_horaria.png" alt="CARGA HORÁRIA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_carga[0] . '</td> <td width="30px">' . $array_carga[1] . '</td> <td width="30px">' . $array_carga[2] . '</td> 
                            <td width="30px">' . $array_carga[3] . '</td> <td width="30px">' . $array_carga[4] . '</td> <td width="30px">' . $array_carga[5] . '</td>
                            <td width="30px">' . $array_carga[6] . '</td> <td width="30px">' . $array_carga[7] . '</td> <td width="30px">' . $array_carga[8] . '</td>
                            <td width="30px">' . $array_carga[9] . '</td> <td width="30px">' . $array_carga[10] . '</td> <td width="30px">' . $array_carga[11] . '</td>
                            <td width="30px">' . $array_carga[12] . '</td> <td width="30px">' . $array_carga[13] . '</td> <td width="30px">' . $array_carga[14] . '</td>
                            <td width="30px">' . $array_carga[15] . '</td> <td width="30px">' . $array_carga[16] . '</td> <td width="30px">' . $array_carga[17] . '</td>
                            <td width="30px">' . $array_carga[18] . '</td> <td width="30px">' . $array_carga[19] . '</td> <td width="30px">' . $array_carga[20] . '</td>
                            <td width="30px">' . $array_carga[21] . '</td> <td width="30px">' . $array_carga[22] . '</td> <td width="30px">' . $array_carga[23] . '</td>
                            <td width="30px">' . $array_carga[24] . '</td> <td width="30px">' . $array_carga[25] . '</td> <td width="30px">' . $array_carga[26] . '</td>
                            <td width="30px">' . $array_carga[27] . '</td> <td width="30px"> -- </td> <td width="30px"> -- </td>
                            <td width="30px"> -- </td>
                        </tr>
                    </table>
                ');
            } elseif ($diaTotal == 29) {
                $mpdf->WriteHTML('
                    <table id="calendario"  height="25px" width="900px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_da_semana.png" alt="DIA DA SEMANA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaSemana[0] . '</td> <td width="30px">' . $array_diaSemana[1] . '</td> <td width="30px">' . $array_diaSemana[2] . '</td> 
                            <td width="30px">' . $array_diaSemana[3] . '</td> <td width="30px">' . $array_diaSemana[4] . '</td> <td width="30px">' . $array_diaSemana[5] . '</td>
                            <td width="30px">' . $array_diaSemana[6] . '</td> <td width="30px">' . $array_diaSemana[7] . '</td> <td width="30px">' . $array_diaSemana[8] . '</td>
                            <td width="30px">' . $array_diaSemana[9] . '</td> <td width="30px">' . $array_diaSemana[10] . '</td> <td width="30px">' . $array_diaSemana[11] . '</td>
                            <td width="30px">' . $array_diaSemana[12] . '</td> <td width="30px">' . $array_diaSemana[13] . '</td> <td width="30px">' . $array_diaSemana[14] . '</td>
                            <td width="30px">' . $array_diaSemana[15] . '</td> <td width="30px">' . $array_diaSemana[16] . '</td> <td width="30px">' . $array_diaSemana[17] . '</td>
                            <td width="30px">' . $array_diaSemana[18] . '</td> <td width="30px">' . $array_diaSemana[19] . '</td> <td width="30px">' . $array_diaSemana[20] . '</td>
                            <td width="30px">' . $array_diaSemana[21] . '</td> <td width="30px">' . $array_diaSemana[22] . '</td> <td width="30px">' . $array_diaSemana[23] . '</td>
                            <td width="30px">' . $array_diaSemana[24] . '</td> <td width="30px">' . $array_diaSemana[25] . '</td> <td width="30px">' . $array_diaSemana[26] . '</td>
                            <td width="30px">' . $array_diaSemana[27] . '</td> <td width="30px">' . $array_diaSemana[28] . '</td> <td width="30px">' . $array_diaSemana[29] . '</td>
                            <td width="30px">' . $array_diaSemana[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="902px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_do_mes.png" alt="DIA DO MÊS" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaMes[0] . '</td> <td width="30px">' . $array_diaMes[1] . '</td> <td width="30px">' . $array_diaMes[2] . '</td> 
                            <td width="30px">' . $array_diaMes[3] . '</td> <td width="30px">' . $array_diaMes[4] . '</td> <td width="30px">' . $array_diaMes[5] . '</td>
                            <td width="30px">' . $array_diaMes[6] . '</td> <td width="30px">' . $array_diaMes[7] . '</td> <td width="30px">' . $array_diaMes[8] . '</td>
                            <td width="30px">' . $array_diaMes[9] . '</td> <td width="30px">' . $array_diaMes[10] . '</td> <td width="30px">' . $array_diaMes[11] . '</td>
                            <td width="30px">' . $array_diaMes[12] . '</td> <td width="30px">' . $array_diaMes[13] . '</td> <td width="30px">' . $array_diaMes[14] . '</td>
                            <td width="30px">' . $array_diaMes[15] . '</td> <td width="30px">' . $array_diaMes[16] . '</td> <td width="30px">' . $array_diaMes[17] . '</td>
                            <td width="30px">' . $array_diaMes[18] . '</td> <td width="30px">' . $array_diaMes[19] . '</td> <td width="30px">' . $array_diaMes[20] . '</td>
                            <td width="30px">' . $array_diaMes[21] . '</td> <td width="30px">' . $array_diaMes[22] . '</td> <td width="30px">' . $array_diaMes[23] . '</td>
                            <td width="30px">' . $array_diaMes[24] . '</td> <td width="30px">' . $array_diaMes[25] . '</td> <td width="30px">' . $array_diaMes[26] . '</td>
                            <td width="30px">' . $array_diaMes[27] . '</td> <td width="30px">' . $array_diaMes[28] . '</td> <td width="30px">' . $array_diaMes[29] . '</td>
                            <td width="30px">' . $array_diaMes[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="90px">
                        <tr>
                            <td bgcolor="#e6e6e6">
                            <img src="../web/img/carga_horaria.png" alt="CARGA HORÁRIA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_carga[0] . '</td> <td width="30px">' . $array_carga[1] . '</td> <td width="30px">' . $array_carga[2] . '</td> 
                            <td width="30px">' . $array_carga[3] . '</td> <td width="30px">' . $array_carga[4] . '</td> <td width="30px">' . $array_carga[5] . '</td>
                            <td width="30px">' . $array_carga[6] . '</td> <td width="30px">' . $array_carga[7] . '</td> <td width="30px">' . $array_carga[8] . '</td>
                            <td width="30px">' . $array_carga[9] . '</td> <td width="30px">' . $array_carga[10] . '</td> <td width="30px">' . $array_carga[11] . '</td>
                            <td width="30px">' . $array_carga[12] . '</td> <td width="30px">' . $array_carga[13] . '</td> <td width="30px">' . $array_carga[14] . '</td>
                            <td width="30px">' . $array_carga[15] . '</td> <td width="30px">' . $array_carga[16] . '</td> <td width="30px">' . $array_carga[17] . '</td>
                            <td width="30px">' . $array_carga[18] . '</td> <td width="30px">' . $array_carga[19] . '</td> <td width="30px">' . $array_carga[20] . '</td>
                            <td width="30px">' . $array_carga[21] . '</td> <td width="30px">' . $array_carga[22] . '</td> <td width="30px">' . $array_carga[23] . '</td>
                            <td width="30px">' . $array_carga[24] . '</td> <td width="30px">' . $array_carga[25] . '</td> <td width="30px">' . $array_carga[26] . '</td>
                            <td width="30px">' . $array_carga[27] . '</td> <td width="30px">' . $array_carga[28] . '</td> <td width="30px"> -- </td>
                            <td width="30px"> -- </td>
                        </tr>
                    </table>
                ');
            } elseif ($diaTotal == 30) {
                $mpdf->WriteHTML('
                    <table id="calendario"  height="25px" width="900px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_da_semana.png" alt="DIA DA SEMANA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaSemana[0] . '</td> <td width="30px">' . $array_diaSemana[1] . '</td> <td width="30px">' . $array_diaSemana[2] . '</td> 
                            <td width="30px">' . $array_diaSemana[3] . '</td> <td width="30px">' . $array_diaSemana[4] . '</td> <td width="30px">' . $array_diaSemana[5] . '</td>
                            <td width="30px">' . $array_diaSemana[6] . '</td> <td width="30px">' . $array_diaSemana[7] . '</td> <td width="30px">' . $array_diaSemana[8] . '</td>
                            <td width="30px">' . $array_diaSemana[9] . '</td> <td width="30px">' . $array_diaSemana[10] . '</td> <td width="30px">' . $array_diaSemana[11] . '</td>
                            <td width="30px">' . $array_diaSemana[12] . '</td> <td width="30px">' . $array_diaSemana[13] . '</td> <td width="30px">' . $array_diaSemana[14] . '</td>
                            <td width="30px">' . $array_diaSemana[15] . '</td> <td width="30px">' . $array_diaSemana[16] . '</td> <td width="30px">' . $array_diaSemana[17] . '</td>
                            <td width="30px">' . $array_diaSemana[18] . '</td> <td width="30px">' . $array_diaSemana[19] . '</td> <td width="30px">' . $array_diaSemana[20] . '</td>
                            <td width="30px">' . $array_diaSemana[21] . '</td> <td width="30px">' . $array_diaSemana[22] . '</td> <td width="30px">' . $array_diaSemana[23] . '</td>
                            <td width="30px">' . $array_diaSemana[24] . '</td> <td width="30px">' . $array_diaSemana[25] . '</td> <td width="30px">' . $array_diaSemana[26] . '</td>
                            <td width="30px">' . $array_diaSemana[27] . '</td> <td width="30px">' . $array_diaSemana[28] . '</td> <td width="30px">' . $array_diaSemana[29] . '</td>
                            <td width="30px">' . $array_diaSemana[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="902px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_do_mes.png" alt="DIA DO MÊS" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaMes[0] . '</td> <td width="30px">' . $array_diaMes[1] . '</td> <td width="30px">' . $array_diaMes[2] . '</td> 
                            <td width="30px">' . $array_diaMes[3] . '</td> <td width="30px">' . $array_diaMes[4] . '</td> <td width="30px">' . $array_diaMes[5] . '</td>
                            <td width="30px">' . $array_diaMes[6] . '</td> <td width="30px">' . $array_diaMes[7] . '</td> <td width="30px">' . $array_diaMes[8] . '</td>
                            <td width="30px">' . $array_diaMes[9] . '</td> <td width="30px">' . $array_diaMes[10] . '</td> <td width="30px">' . $array_diaMes[11] . '</td>
                            <td width="30px">' . $array_diaMes[12] . '</td> <td width="30px">' . $array_diaMes[13] . '</td> <td width="30px">' . $array_diaMes[14] . '</td>
                            <td width="30px">' . $array_diaMes[15] . '</td> <td width="30px">' . $array_diaMes[16] . '</td> <td width="30px">' . $array_diaMes[17] . '</td>
                            <td width="30px">' . $array_diaMes[18] . '</td> <td width="30px">' . $array_diaMes[19] . '</td> <td width="30px">' . $array_diaMes[20] . '</td>
                            <td width="30px">' . $array_diaMes[21] . '</td> <td width="30px">' . $array_diaMes[22] . '</td> <td width="30px">' . $array_diaMes[23] . '</td>
                            <td width="30px">' . $array_diaMes[24] . '</td> <td width="30px">' . $array_diaMes[25] . '</td> <td width="30px">' . $array_diaMes[26] . '</td>
                            <td width="30px">' . $array_diaMes[27] . '</td> <td width="30px">' . $array_diaMes[28] . '</td> <td width="30px">' . $array_diaMes[29] . '</td>
                            <td width="30px">' . $array_diaMes[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="90px">
                        <tr>
                            <td bgcolor="#e6e6e6">
                            <img src="../web/img/carga_horaria.png" alt="CARGA HORÁRIA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_carga[0] . '</td> <td width="30px">' . $array_carga[1] . '</td> <td width="30px">' . $array_carga[2] . '</td> 
                            <td width="30px">' . $array_carga[3] . '</td> <td width="30px">' . $array_carga[4] . '</td> <td width="30px">' . $array_carga[5] . '</td>
                            <td width="30px">' . $array_carga[6] . '</td> <td width="30px">' . $array_carga[7] . '</td> <td width="30px">' . $array_carga[8] . '</td>
                            <td width="30px">' . $array_carga[9] . '</td> <td width="30px">' . $array_carga[10] . '</td> <td width="30px">' . $array_carga[11] . '</td>
                            <td width="30px">' . $array_carga[12] . '</td> <td width="30px">' . $array_carga[13] . '</td> <td width="30px">' . $array_carga[14] . '</td>
                            <td width="30px">' . $array_carga[15] . '</td> <td width="30px">' . $array_carga[16] . '</td> <td width="30px">' . $array_carga[17] . '</td>
                            <td width="30px">' . $array_carga[18] . '</td> <td width="30px">' . $array_carga[19] . '</td> <td width="30px">' . $array_carga[20] . '</td>
                            <td width="30px">' . $array_carga[21] . '</td> <td width="30px">' . $array_carga[22] . '</td> <td width="30px">' . $array_carga[23] . '</td>
                            <td width="30px">' . $array_carga[24] . '</td> <td width="30px">' . $array_carga[25] . '</td> <td width="30px">' . $array_carga[26] . '</td>
                            <td width="30px">' . $array_carga[27] . '</td> <td width="30px">' . $array_carga[28] . '</td> <td width="30px">' . $array_carga[29] . '</td>
                            <td width="30px"> -- </td>
                        </tr>
                    </table>
                ');
            } elseif ($diaTotal == 31) {
                $mpdf->WriteHTML('
                    <table id="calendario"  height="25px" width="900px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_da_semana.png" alt="DIA DA SEMANA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaSemana[0] . '</td> <td width="30px">' . $array_diaSemana[1] . '</td> <td width="30px">' . $array_diaSemana[2] . '</td> 
                            <td width="30px">' . $array_diaSemana[3] . '</td> <td width="30px">' . $array_diaSemana[4] . '</td> <td width="30px">' . $array_diaSemana[5] . '</td>
                            <td width="30px">' . $array_diaSemana[6] . '</td> <td width="30px">' . $array_diaSemana[7] . '</td> <td width="30px">' . $array_diaSemana[8] . '</td>
                            <td width="30px">' . $array_diaSemana[9] . '</td> <td width="30px">' . $array_diaSemana[10] . '</td> <td width="30px">' . $array_diaSemana[11] . '</td>
                            <td width="30px">' . $array_diaSemana[12] . '</td> <td width="30px">' . $array_diaSemana[13] . '</td> <td width="30px">' . $array_diaSemana[14] . '</td>
                            <td width="30px">' . $array_diaSemana[15] . '</td> <td width="30px">' . $array_diaSemana[16] . '</td> <td width="30px">' . $array_diaSemana[17] . '</td>
                            <td width="30px">' . $array_diaSemana[18] . '</td> <td width="30px">' . $array_diaSemana[19] . '</td> <td width="30px">' . $array_diaSemana[20] . '</td>
                            <td width="30px">' . $array_diaSemana[21] . '</td> <td width="30px">' . $array_diaSemana[22] . '</td> <td width="30px">' . $array_diaSemana[23] . '</td>
                            <td width="30px">' . $array_diaSemana[24] . '</td> <td width="30px">' . $array_diaSemana[25] . '</td> <td width="30px">' . $array_diaSemana[26] . '</td>
                            <td width="30px">' . $array_diaSemana[27] . '</td> <td width="30px">' . $array_diaSemana[28] . '</td> <td width="30px">' . $array_diaSemana[29] . '</td>
                            <td width="30px">' . $array_diaSemana[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="902px">
                        <tr>
                            <td bgcolor="#e6e6e6" >
                            <img src="../web/img/dia_do_mes.png" alt="DIA DO MÊS" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_diaMes[0] . '</td> <td width="30px">' . $array_diaMes[1] . '</td> <td width="30px">' . $array_diaMes[2] . '</td> 
                            <td width="30px">' . $array_diaMes[3] . '</td> <td width="30px">' . $array_diaMes[4] . '</td> <td width="30px">' . $array_diaMes[5] . '</td>
                            <td width="30px">' . $array_diaMes[6] . '</td> <td width="30px">' . $array_diaMes[7] . '</td> <td width="30px">' . $array_diaMes[8] . '</td>
                            <td width="30px">' . $array_diaMes[9] . '</td> <td width="30px">' . $array_diaMes[10] . '</td> <td width="30px">' . $array_diaMes[11] . '</td>
                            <td width="30px">' . $array_diaMes[12] . '</td> <td width="30px">' . $array_diaMes[13] . '</td> <td width="30px">' . $array_diaMes[14] . '</td>
                            <td width="30px">' . $array_diaMes[15] . '</td> <td width="30px">' . $array_diaMes[16] . '</td> <td width="30px">' . $array_diaMes[17] . '</td>
                            <td width="30px">' . $array_diaMes[18] . '</td> <td width="30px">' . $array_diaMes[19] . '</td> <td width="30px">' . $array_diaMes[20] . '</td>
                            <td width="30px">' . $array_diaMes[21] . '</td> <td width="30px">' . $array_diaMes[22] . '</td> <td width="30px">' . $array_diaMes[23] . '</td>
                            <td width="30px">' . $array_diaMes[24] . '</td> <td width="30px">' . $array_diaMes[25] . '</td> <td width="30px">' . $array_diaMes[26] . '</td>
                            <td width="30px">' . $array_diaMes[27] . '</td> <td width="30px">' . $array_diaMes[28] . '</td> <td width="30px">' . $array_diaMes[29] . '</td>
                            <td width="30px">' . $array_diaMes[30] . '</td>
                        </tr>
                    </table>
                ');
                $mpdf->WriteHTML('
                    <table id="calendario" height="25px" width="90px">
                        <tr>
                            <td bgcolor="#e6e6e6">
                            <img src="../web/img/carga_horaria.png" alt="CARGA HORÁRIA" width="42px" height="50px">
                            </td>
                            <td width="30px">' . $array_carga[0] . '</td> <td width="30px">' . $array_carga[1] . '</td> <td width="30px">' . $array_carga[2] . '</td> 
                            <td width="30px">' . $array_carga[3] . '</td> <td width="30px">' . $array_carga[4] . '</td> <td width="30px">' . $array_carga[5] . '</td>
                            <td width="30px">' . $array_carga[6] . '</td> <td width="30px">' . $array_carga[7] . '</td> <td width="30px">' . $array_carga[8] . '</td>
                            <td width="30px">' . $array_carga[9] . '</td> <td width="30px">' . $array_carga[10] . '</td> <td width="30px">' . $array_carga[11] . '</td>
                            <td width="30px">' . $array_carga[12] . '</td> <td width="30px">' . $array_carga[13] . '</td> <td width="30px">' . $array_carga[14] . '</td>
                            <td width="30px">' . $array_carga[15] . '</td> <td width="30px">' . $array_carga[16] . '</td> <td width="30px">' . $array_carga[17] . '</td>
                            <td width="30px">' . $array_carga[18] . '</td> <td width="30px">' . $array_carga[19] . '</td> <td width="30px">' . $array_carga[20] . '</td>
                            <td width="30px">' . $array_carga[21] . '</td> <td width="30px">' . $array_carga[22] . '</td> <td width="30px">' . $array_carga[23] . '</td>
                            <td width="30px">' . $array_carga[24] . '</td> <td width="30px">' . $array_carga[25] . '</td> <td width="30px">' . $array_carga[26] . '</td>
                            <td width="30px">' . $array_carga[27] . '</td> <td width="30px">' . $array_carga[28] . '</td> <td width="30px">' . $array_carga[29] . '</td>
                            <td width="30px">' . $array_carga[30] . '</td>
                        </tr>
                    </table>
                ');
            }
            $mpdf->WriteHTML('
                <br>
                <table id="assinatura" style="margin-left:30em;">
                    <tr>
                        <td bgcolor="#e6e6e6" text-align:center>
                            VISTO DA CHEFIA <br>DO DEPARTAMENTO ACADÊMICO <br> (COM CARIMBO)
                        </td>

                        <td width="70%" height="100"> </td>
                    </tr>
                </table>');
            $mpdf->Output();
            exit;
        } else {
            return $this->render('index', ['erro' => 2]);
        }
    }