Exemplo n.º 1
0
function FechaFormal($Fecha, $abr = true)
{
    $Fecha = $Fecha == 'now' ? date('Y-m-d') : $Fecha;
    $abr = $abr === true ? MesNombreAbr($Fecha) : MesNombre($Fecha);
    return round(date('d', strtotime($Fecha))) . ' de ' . $abr . '/' . date('Y', strtotime($Fecha));
}
Exemplo n.º 2
0
 private function ImprimeCartaDecanatura()
 {
     $this->load->library('fpdf/pdf');
     $pdf = new PDF();
     $pdf->AddPage();
     $pdf->Image(base_url('public/images/logo.jpg'), 80, 15, 60, 18);
     $Dep = $this->parametros_model->TraeDependencias();
     #ENCABEZADO
     $pdf->SetFont('Arial', 'b', 10);
     $pdf->Text(178, 35, 'GD-026-F');
     $pdf->SetFillColor(230, 230, 230);
     $pdf->SetXY(25, 38);
     $pdf->Cell(170, 5, 'MEMORANDO', 0, 0, 'C', true);
     $pdf->Text(25, 48, strtoupper($this->input->post('CONSECUTIVO')));
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(25, 58, 'Medellín, ' . MesNombre(date('m')) . ' ' . round(date('d')) . ' de ' . date('Y'));
     #PARA
     $pdf->SetFont('Arial', 'b', 10);
     $pdf->Text(25, 75, 'PARA:');
     $pdf->Text(50, 75, ($Dep->DECANATURA_TITULO == 0 ? 'Ingeniera' : 'Ingeniero') . ' ' . $Dep->DECANATURA);
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(50, 80, ($Dep->DECANATURA_TITULO == 0 ? 'Decana' : 'Decano') . ' Facultad de ingeniería');
     #DE
     $pdf->SetFont('Arial', 'b', 10);
     $pdf->Text(25, 90, 'DE:');
     $pdf->Text(50, 90, $this->input->post('TITULO') . ' ' . $this->session->userdata('NOMBRE_USUARIO'));
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(50, 95, 'Docente Asesor de Prácticas');
     #ASUNTO
     $pdf->SetFont('Arial', 'b', 10);
     $pdf->Text(25, 103, 'ASUNTO:');
     $pdf->SetFont('Arial', '', 10);
     $pdf->SetXY(50, 100);
     $pdf->MultiCell(130, 4, $this->input->post('ASUNTO'));
     $pdf->Text(25, 130, 'Cordial Saludo,');
     $pdf->SetXY(25, 140);
     $pdf->MultiCell(165, 4, $this->input->post('CARTA'));
     $pdf->Text(25, 20 + $pdf->GetY(), 'Atentamente,');
     $pdf->SetFont('Arial', 'b', 10);
     $pdf->Text(25, $pdf->GetY() + 40, $this->session->userdata('NOMBRE_USUARIO'));
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(25, $pdf->GetY() + 45, 'Docente Asesor de Prácticas');
     $pdf->Output();
     $pdf->Cell($pdf->PageNo());
 }
Exemplo n.º 3
0
 public function CrearMesComponente()
 {
     $select = "<select class='form-control' name='MES'>";
     $select .= '<option>-- Seleccione un mes --</option>';
     if (date('m', strtotime($this->session->userdata('PERIODO'))) > 6) {
         for ($i = 7; $i <= 12; $i++) {
             $select .= "<option value='{$i}' >" . MesNombre($i) . "</option>";
         }
     } else {
         for ($i = 1; $i <= 6; $i++) {
             $select .= "<option value='{$i}' >" . MesNombre($i) . "</option>";
         }
     }
     return $select . '</select>';
 }
Exemplo n.º 4
0
 public function periodoAjax()
 {
     if ($this->input->is_ajax_request()) {
         if (is_numeric($this->input->post('DIAS'))) {
             $desde = new DateTime('now');
             $hasta = new DateTime('now');
             $hasta->add(new DateInterval('P' . $this->input->post('DIAS') . 'D'));
             echo 'Desde el ' . round($desde->format('d')) . ' de ' . MesNombre($desde->format('m')) . '/' . $desde->format('Y') . ' <b>Hasta el</b> ' . round($hasta->format('d')) . ' de ' . MesNombre($hasta->format('m')) . '/' . $hasta->format('Y') . ' Para evaluar';
         } else {
             echo '<b>N/A</b>';
         }
     }
 }