Esempio n. 1
0
function addHTML($where, $what, $value = "", $text = false)
{
    if ($text) {
        $node = cHTML($what);
        $node = cText($node, $value);
    } else {
        $node = cHTML($what, $value);
    }
    $where->appendChild($node);
    return $node;
}
Esempio n. 2
0
         } else {
             $texto .= "<br> " . $lang_crear_diseno_word_h_web20 . ": " . $lang_crear_diseno_word_no;
         }
         //Herramienta de trabajos: REVISIÖN
         replaceHtml($tableFormularioDiseno->addCell($anchoContenido), $texto);
         $tableFormularioDiseno->addRow(400);
         $tableFormularioDiseno->addCell($anchoEtiqueta, $styleTableFormularioDisenoCelda2)->addText(cText($lang_nueva_actividad_inicio), $styleCelda);
         replaceHtml($tableFormularioDiseno->addCell($anchoContenido), $_actividades[$i]['ac_instrucciones_inicio']);
         $tableFormularioDiseno->addRow(400);
         $tableFormularioDiseno->addCell($anchoEtiqueta, $styleTableFormularioDisenoCelda2)->addText(cText($lang_nueva_actividad_desarrollo), $styleCelda);
         replaceHtml($tableFormularioDiseno->addCell($anchoContenido), $_actividades[$i]['ac_instrucciones_desarrollo']);
         $tableFormularioDiseno->addRow(400);
         $tableFormularioDiseno->addCell($anchoEtiqueta, $styleTableFormularioDisenoCelda2)->addText(cText($lang_nueva_actividad_cierre), $styleCelda);
         replaceHtml($tableFormularioDiseno->addCell($anchoContenido), $_actividades[$i]['ac_instrucciones_cierre']);
         $tableFormularioDiseno->addRow(400);
         $tableFormularioDiseno->addCell($anchoEtiqueta, $styleTableFormularioDisenoCelda2)->addText(cText($lang_nueva_actividad_consejos_practicos), $styleCelda);
         replaceHtml($tableFormularioDiseno->addCell($anchoContenido), $_actividades[$i]['ac_consejos_practicos']);
     }
     $section->addTextBreak(1);
 }
 $footer = $section->createFooter();
 $footer->addPreserveText('{PAGE}');
 $nombre_temp = str_replace(" ", "_", $fcd_nombre);
 $nombre_temp = str_replace(array("á", "é", "í", "ó", "ú", "Á", "É", "Í", "Ó", "Ú"), array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U"), $nombre_temp);
 $nombre_temp = preg_replace('/[^A-Za-z0-9_]/', '', $nombre_temp);
 $nombreArchivo = $nombre_temp . "_" . date('dmY') . ".docx";
 // Save File
 $objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
 $objWriter->save('./data/' . $nombreArchivo);
 // Download the file:
 header('Content-Description: File Transfer');