当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPWord::loadTemplate方法代码示例

本文整理汇总了PHP中PHPWord::loadTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWord::loadTemplate方法的具体用法?PHP PHPWord::loadTemplate怎么用?PHP PHPWord::loadTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPWord的用法示例。


在下文中一共展示了PHPWord::loadTemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: postCancelar

 public function postCancelar()
 {
     //return Input::all();
     $this->response->Cancelar(Input::get('contratos'), Input::get('penaCapital'), Input::get('penaAccesorios'), Input::get('penaMoratorios'), Input::get('capital'));
     $cliente = DB::table('expediente')->where('id_expediente', Input::get('contratos'))->join('cliente', 'cliente.rfc', '=', 'expediente.fk_rfc')->select('cliente.nombre', 'cliente.ape_mate', 'cliente.ape_pate')->get()[0];
     $terreno = DB::table('expediente')->where('id_expediente', Input::get('contratos'))->join('solicitud', 'solicitud.fk_expediente', '=', 'expediente.id_expediente')->join('lote', 'lote.id_lote', '=', 'solicitud.fk_lote')->join('manzana', 'manzana.id_manzana', '=', 'lote.fk_manzana')->join('desarrollo', 'desarrollo.id_desarrollo', '=', 'manzana.fk_desarrollo')->select('lote.lote', 'manzana.num_letra', 'desarrollo.nombre')->get()[0];
     if (Input::get('capital') - Input::get('penaCapital') > 0) {
         $ImporteLiquido = Input::get('capital') - Input::get('penaCapital');
     } else {
         $ImporteLiquido = 0;
     }
     $PHPWord = new PHPWord();
     $document = $PHPWord->loadTemplate(dirname(__FILE__) . '/PHPWord/recibo_liquidacion.docx');
     $fecha = explode('-', date('Y-m-d'));
     $document->setValue('dia', $fecha[2]);
     $document->setValue('mes', $fecha[1]);
     $document->setValue('anio', $fecha[0]);
     $document->setValue('cantidadDevuelta', '$' . $ImporteLiquido);
     $document->setValue('expediente', Input::get('contratos'));
     $document->setValue('Terreno', $terreno->lote);
     $document->setValue('Manzana', $terreno->num_letra);
     $document->setValue('Fraccionamiento', $terreno->nombre);
     $document->setValue('Penalizacion', Input::get('penalizacionCapital') . '%');
     $document->setValue('PrecioVenta', '$' . Input::get('importeTotal'));
     $document->setValue('CapitalPagado', '$' . Input::get('capital'));
     $document->setValue('cantidadPenal', '$' . Input::get('penaCapital'));
     $document->setValue('ImporteLiquido', '$' . $ImporteLiquido);
     $document->setValue('Cliente', $cliente->nombre . " " . $cliente->ape_pate . " " . $cliente->ape_mate);
     $document->save(Input::get('contratos') . '_cancelacion.docx');
     return View::make('cobranza/mensajeCobranza')->with('datos', array('seccion' => 'SICyA | Cobranza | Cancealr Terreno', 'cabecera' => 'Cancelando Contrato', 'icono' => 'glyphicon glyphicon-file', 'tipo_mensaje' => true, 'mensaje' => "Se ha Cancelado el Contrato."));
 }
开发者ID:vipomx,项目名称:Castilla,代码行数:31,代码来源:ReestructuraController.php

示例2: array

// Array Hari
$array_hari = array(1 => 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu');
$hari = $array_hari[date('N')];
//Format Tanggal
$tanggal = date('j');
//Array Bulan
$array_bulan = array(1 => 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember');
$bulan = $array_bulan[date('n')];
//Format Tahun
$tahun = date('Y');
$bilangan = new Terbilang();
// Include the PHPWord.php, all other classes were loaded by an autoloader
include '../../../../../plugin/PHPWord.php';
// Create a new PHPWord Object
$PHPWord = new PHPWord();
$document = $PHPWord->loadTemplate('../../../../../config/Template/Amplop.docx');
$document->setValue('nama_pembeli', $nama_pembeli);
$document->setValue('alamat', $alamat);
$document->setValue('telepon', $tlp1);
$path = 'E:\\';
$nama_file = "AMPLOP PPJB " . $nama_pembeli . " " . $tanggal . " " . $bulan . " " . $tahun . ".doc";
// $document->save('E:\\andonnikahTemplate.docx');
//$document->save('E:\\'.$nama_file);
// At least write the document to webspace:
$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
// // save as a random file in temp file
$temp_file = tempnam(sys_get_temp_dir(), 'PHPWord');
$document->save($temp_file);
// Your browser will name the file "myFile.docx"
// regardless of what it's named on the server
header("Content-Disposition: attachment; filename=\"" . basename($nama_file) . "\"");
开发者ID:rizafr,项目名称:market_ancol,代码行数:31,代码来源:alamat_cetak.php

示例3: executeIndex

 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
 public function executeIndex(sfWebRequest $request)
 {
     // Recuperar el Tramite y el Proceso
     $this->setLayout('descarga');
     $template = Doctrine::getTable('ClaDocumentos')->findOneByClaTramiteIdAndClaProcesoId($request->getParameter('tramite'), $request->getParameter('proceso'));
     $seguimiento = Doctrine::getTable('ProcSeguimiento')->getTramite($request->getParameter('seguimiento'));
     $PHPWord = new PHPWord();
     $filename = 'carta_' . $request->getParameter('tramite') . '_' . $request->getParameter('proceso') . '.docx';
     $document = $PHPWord->loadTemplate(sfConfig::get('sf_root_dir') . '/archivos/templates/' . $template->getPath());
     date_default_timezone_set('America/La_Paz');
     setlocale(LC_TIME, 'spanish');
     $document->setValue('fecha_carta', strftime("%d de %B de %Y"));
     foreach ($seguimiento->ProcFormularios as $formulario) {
         $tabla = Doctrine::getTable($formulario->ClaTabla->getDescripcion())->findOneById($formulario->getGetId());
         if ($formulario->ClaTabla->getDescripcion() == 'DatPersonas') {
             $document->setValue('nombre_estudiante', $tabla->getNombreCompleto());
         }
     }
     $document->save(sfConfig::get('sf_root_dir') . '/archivos/generados/' . $filename);
     //        $guardar = new ClaDocumentos();
     //        $guardar->setClaTramiteId(1);
     //        $guardar->setClaProcesoId(1);
     //        $guardar->setPath($filename);
     //        $guardar->save();
     $this->filename = $filename;
     $this->enlace = sfConfig::get('sf_root_dir') . '/archivos/generados//' . $filename;
 }
开发者ID:remberto,项目名称:university,代码行数:32,代码来源:actions.class.php

示例4: _createDocument

 /**
  * create new excel document
  *
  * @return void
  */
 protected function _createDocument()
 {
     // this looks stupid, but the PHPDoc library is beta, so this is needed. otherwise the lib would create temp files in the template folder ;(
     $templateFile = $this->_getTemplateFilename();
     $tempTemplateFile = Tinebase_Core::guessTempDir() . DIRECTORY_SEPARATOR . Tinebase_Record_Abstract::generateUID() . '.docx';
     copy($templateFile, $tempTemplateFile);
     $this->_docObject = new PHPWord();
     if ($templateFile !== NULL) {
         $this->_docTemplate = $this->_docObject->loadTemplate($tempTemplateFile);
     }
     unlink($tempTemplateFile);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:17,代码来源:Doc.php

示例5: createDoc

 function createDoc($name = null)
 {
     $PHPWord = new PHPWord();
     //return;
     $this->getData();
     $template = $PHPWord->loadTemplate($this->modelliDir . $this->modello);
     foreach ($this->data as $tb => $data) {
         foreach ($data as $col => $val) {
             try {
                 $val = mb_detect_encoding($val) == 'UTF-8' ? utf8_decode($val) : $val;
                 $template->setValue("{$tb}.{$col}", $val);
             } catch (Exception $e) {
                 echo "<p>{$tb}.{$col}</p>";
             }
         }
     }
     $template->setValue("data", date("d/m/Y"));
     $pr = new pratica($this->pratica);
     $file = $name ? $pr->documenti . $name : $pr->documenti . $this->docName;
     $template->save($file);
 }
开发者ID:mamogmx,项目名称:praticaweb-alghero,代码行数:21,代码来源:stampe.word.class.php

示例6: GeraArquivoDoc

    public Function GeraArquivoDoc() {

	$PHPWord = new PHPWord();
	
	$arquivo_clinica = "../../../sgmo/laudo_modelo/$MY_PARAMETRO_ID/normal/$arquivo_laudo";

	$document = $PHPWord->loadTemplate($arquivo_clinica);

	//caso seja necessário preencher o cabeçalho com os dados da clínica
	$document->setValue('nome_emp', " $clinica_rs");
	$document->setValue('cnpj_emp', " $clinica_cnpj");
	$document->setValue('rua_emp', " $endereco");
	$document->setValue('tel_emp', " $tel_clinica");
	$document->setValue('cidade_emp', " $cidade");
	$document->setValue('estado_emp', " $estado");

	//Dados do funcinário para preencher o cabeçalho
	$document->setValue('nome_func', " $funcionario");
	$document->setValue('doc_func', " $doc_funcionario");
	$document->setValue('empresa_func', " $empresa");
	$document->setValue('dat_func', " $data_nascimento");
	$document->setValue('func_funcionario', " $funcao");
	$document->setValue('idade_func', " $idade");
	$document->setValue('tel_func', " $telefone");
	$document->setValue('idade_func', " $idade");
	$document->setValue('data_exame_func', " $data_exame");
	$document->setValue('medico_solicitante', " ");
	$document->setValue('medico_solicitante', " ");
	$document->setValue('convenio_func', " $clinica_rs");
	$document->setValue('observacao', " XXXXXXXXXXXXXXXXXXXXXX");

	//Marcações no documento
	$document->setValue('nx', "X");

	$nome_arquivo = $funcionario . "_" . $numero_ficha;
	$arquivo = "laudados/" . removerAcento($nome_arquivo) . ".docx";
	$document->save($arquivo);
    }
开发者ID:helbertfurbino,项目名称:laudoonline,代码行数:38,代码来源:CGeraOITNormal.php

示例7: PHPWord

<?php

require_once '../PHPWord.php';
$PHPWord = new PHPWord();
$document = $PHPWord->loadTemplate('tort.docx');
$document->setValue('Value1', 'Sun');
$document->setValue('Value2', 'Mercury');
$document->setValue('Value3', 'Venus');
$document->setValue('Value4', 'Earth');
$document->setValue('Value5', 'Mars');
$document->setValue('Value6', 'Jupiter');
$document->setValue('Value7', 'Saturn');
$document->setValue('Value8', 'Uranus');
$document->setValue('Value9', 'Neptun');
$document->setValue('Value10', 'Pluto');
$document->setValue('weekday', date('l'));
$document->setValue('time', date('H:i'));
$document->save('Solarsystem.doc');
开发者ID:AliAliyev,项目名称:htdocs,代码行数:18,代码来源:Template.php

示例8: PHPWord

include 'functions.php';
// ----------------------------------------------------------------------------------------
$PHPWord = new PHPWord();
if ($_POST['type_doc'] == 'pre_dogovor') {
    //-------------------------------------------------------------------------------------
    // Принятие данных с форматом datepicker и обработка их,
    // информация приходит в виде объекта данных string с инфой: dd.mm.yy
    //-------------------------------------------------------------------------------------
    // Дата заключения договора
    $pre_date_of_dogovor = DateTime::createFromFormat('d.m.Y', $_POST['pre_date_of_dogovor']);
    $pre_day_of_dogovor = $pre_date_of_dogovor->format('d');
    $pre_month_of_dogovor = $pre_date_of_dogovor->format('m');
    $pre_year_of_dogovor = $pre_date_of_dogovor->format('Y');
    // Если не требуется распарсить строку, то можно сразу же обращаться к данным через супермассив $_POST
    //-------------------------------------------------------------------------------------
    $document = $PHPWord->loadTemplate('pre_dogovor.docx');
    //шаблон
    // Замена переменных
    $document->setValue('city', $_POST['pre_placeOfDogovor']);
    //Место заключения договора
    $document->setValue('dayOfDogovor', get_day_from_number($pre_day_of_dogovor));
    //Дата заключения договора: день
    $document->setValue('monthOfDogovor', get_month_from_number($pre_month_of_dogovor));
    //Дата заключения договора: месяц
    $document->setValue('yearOfDogovor', get_year_from_number($pre_year_of_dogovor));
    //Дата заключения договора: год
    $document->setValue('pre_fio', $_POST['pre_fio']);
    //ФИО продавца
    $document->setValue('birthday_of_vendor', $_POST['pre_birthday_of_vendor']);
    //Дата рождения продавца
    $document->setValue('pre_passport', $_POST['pre_passport']);
开发者ID:WebLions,项目名称:love-travel.local,代码行数:31,代码来源:convert.php

示例9: CONVERT

 if ($status == 2) {
     $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_TUNAI = NOMOR_SURAT_TUNAI + 1";
     ex_false($conn->execute($query), $query);
 } else {
     if ($status == 1) {
         $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_KPR = NOMOR_SURAT_KPR + 1";
         ex_false($conn->execute($query), $query);
     }
 }
 $query = "update RENCANA set NO_SURAT5 = '{$nomor_surat}', TANGGAL_SURAT5 = CONVERT(DATETIME,GETDATE(),105) \n\t\t\tWHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)";
 ex_false($conn->execute($query), $query);
 $query = "update SPP set STATUS_WANPRESTASI = 1 \n\t\t\tWHERE KODE_BLOK = '{$id}' ";
 ex_false($conn->execute($query), $query);
 // Create a new PHPWord Object
 $PHPWord = new PHPWord();
 $document = $PHPWord->loadTemplate('../../../../../surat/Surat_Wanprestasi.docx');
 //header
 $document->setValue('tanggal_cetak', $tanggal_cetak);
 $document->setValue('nomor_surat', $nomor_surat);
 $document->setValue('nama_pembeli', $nama_pembeli);
 $document->setValue('alamat', $alamat);
 $document->setValue('telepon', $telepon);
 $document->setValue('tanggal_spp', $tanggal_spp);
 $document->setValue('nomor_spp', $nomor_spp);
 $document->setValue('tanggal_ppjb', $tanggal_ppjb);
 $document->setValue('nomor_ppjb', $nomor_ppjb);
 $document->setValue('tanggal_tempo', $tgl_tempo);
 $document->setValue('no_somasi1', $no_somasi1);
 $document->setValue('tgl_somasi1', $tgl_somasi1);
 $document->setValue('no_somasi2', $no_somasi2);
 $document->setValue('tgl_somasi2', $tgl_somasi2);
开发者ID:rizafr,项目名称:market_ancol,代码行数:31,代码来源:surat_wanprestasi.php

示例10: kontgl

 $nomor_surat_dahulu = $obj->fields['NO_SURAT3'];
 $tanggal_surat_dahulu = kontgl(tgltgl(date("d M Y", strtotime($obj->fields['TANGGAL_SURAT3']))));
 if ($status == 2) {
     $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_TUNAI = NOMOR_SURAT_TUNAI + 1";
     ex_false($conn->execute($query), $query);
 } else {
     if ($status == 1) {
         $query = "update CS_REGISTER_CUSTOMER_SERVICE set NOMOR_SURAT_KPR = NOMOR_SURAT_KPR + 1";
         ex_false($conn->execute($query), $query);
     }
 }
 $query = "update RENCANA set NO_SURAT4 = '{$nomor_surat}', TANGGAL_SURAT4 = CONVERT(DATETIME,GETDATE(),105) \n\t\t\tWHERE KODE_BLOK = '{$id}'\n\t\t\tAND TANGGAL >= CONVERT(DATETIME,'01-{$bln}-{$thn}',105) \n\t\t\tAND TANGGAL < CONVERT(DATETIME,'01-{$next_bln}-{$next_thn}',105)";
 ex_false($conn->execute($query), $query);
 // Create a new PHPWord Object
 $PHPWord = new PHPWord();
 $document = $PHPWord->loadTemplate('../../../../../surat/Surat_Somasi_3.docx');
 //header
 $document->setValue('tanggal_cetak', $tanggal_cetak);
 $document->setValue('nomor_surat', $nomor_surat);
 $document->setValue('nama_pembeli', $nama_pembeli);
 $document->setValue('alamat', $alamat);
 $document->setValue('telepon', $telepon);
 $document->setValue('tanggal_spp', $tanggal_spp);
 $document->setValue('tanggal_tempo', $tgl_tempo);
 $document->setValue('nomor_surat_dahulu', $nomor_surat_dahulu);
 $document->setValue('tanggal_surat_dahulu', $tanggal_surat_dahulu);
 $document->setValue('blok', $blok);
 $document->setValue('nomor', $nomor);
 $document->setValue('kav_bang', $kav_bang);
 $document->setValue('nilai', to_money($nilai) . ".00");
 $document->setValue('bulan', $bulan);
开发者ID:rizafr,项目名称:market_ancol,代码行数:31,代码来源:surat_somasi_tiga.php

示例11: PHPWord

// $template = str_replace("{ATTN_NAME}", $row['attn_name'],$template );
// $template = str_replace("{ATTN_PHONE}", $row['attn_phone'],$template);
// $template = str_replace("{ATTN_EMAIL}", $row['attn_name'],$template);
// $template = str_replace("{TEL}", $row['attn_tel'],$template);
// $template = str_replace("{FAX}",  $row['attn_fax'],$template);
// $template = str_replace("{MADETOUR}",   $row['groupprogram_code'],$template);
// if(!empty($row['nationlity'])){
// $template = str_replace("{NATIONLITY}", translate('countries_dom','',$row['nationlity']),$template);
// }
// else{$template = str_replace("{NATIONLITY}", translate('countries_dom','',''),$template); }
// $template = str_replace("{BOOKINGLINE}", $focus->get_bookingroom_detailview($record),$template);
// $template = str_replace("{NOTES}", html_entity_decode(nl2br($row['notes'])),$template);
// $template = str_replace("{CONVENTION}", html_entity_decode(nl2br($row['convention'])),$template);
// $template = str_replace("{COST}", html_entity_decode(nl2br($row['cost'])),$template);
// $template = str_replace("{INCLUDE}", html_entity_decode(nl2br($row['include'])),$template);
// $template = str_replace("{DINING_PLAN}", html_entity_decode(nl2br($row['dining_plan'])),$template);
// if($row['confirmed']== 0 ){
// $template = str_replace("{CONFIRM}", 'No',$template);
// }
// else {$template = str_replace("{CONFIRM}", 'Yes',$template); }
// $template = str_replace("{DATE}", date("d/m/Y",strtotime($row['date'])),$template);
// $template = str_replace("{DEPARMENT}", $row['deparment'],$template);
$PHPWord = new PHPWord();
$document = $PHPWord->loadTemplate('modules/RoomBookings/tpls/roombooking_template.docx');
$document->setValue('To', $row['name']);
$document->setValue('ToAddress', $row['hotel_address']);
$document->setValue('ToContactName', $row['attn_hotel_name']);
$document->setValue('ToContactPhone', $row['attn_hotel_phone']);
$document->setValue('Phone', $row['hotel_tel']);
$document->setValue('Fax', html_entity_decode(nl2br($row['convention'])));
$document->output('modules/RoomBookings/Room-Booking.docx');
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:export2word111.php

示例12: getDoc

 public function getDoc($expediente)
 {
     $cliente = $this->mysqli->query('select * from expediente, cliente where id_expediente="' . $expediente . '" and cliente.rfc=expediente.fk_rfc')->fetch_object();
     //$cliente = DB::table('expediente')->where('id_expediente', $expediente)->join('cliente', 'cliente.rfc', '=', 'expediente.fk_rfc')->get()[0];
     $lote = $this->mysqli->query('select * from expediente, solicitud, contrato, contrato_lote, lote, manzana, desarrollo where expediente.id_expediente="' . $expediente . '" and solicitud.fk_expediente=expediente.id_expediente and contrato.fk_solicitud=solicitud.id_solicitud  and contrato_lote.fk_contrato=contrato.id_contrato and lote.id_lote=contrato_lote.fk_lote and manzana.id_manzana=lote.fk_manzana and desarrollo.id_desarrollo=manzana.fk_desarrollo')->fetch_object();
     //$lote=DB::table('expediente')->where('id_expediente', $expediente)->join('solicitud', 'fk_expediente', '=','expediente.id_expediente')->join('contrato', 'contrato.fk_solicitud', '=','solicitud.id_solicitud')->join('contrato_lote','contrato_lote.fk_contrato', '=' ,'contrato.id_contrato')->join('lote','lote.id_lote', '=', 'contrato_lote.fk_lote')->join('manzana', 'manzana.id_manzana', '=', 'lote.fk_manzana')->join('desarrollo', 'desarrollo.id_desarrollo', '=', 'manzana.fk_desarrollo')->get()[0];
     $contrato = $this->mysqli->query('select * from contrato where id_contrato=' . $lote->id_contrato)->fetch_object();
     $categoria = $this->mysqli->query('select * from categoria where id_categoria=' . '"' . $lote->fk_categoria . '"')->fetch_object();
     //$categoria = DB::table('categoria')->where('id_categoria', $lote->fk_categoria)->get()[0];
     $cuenta = $this->mysqli->query('select * from cuenta where fk_contrato=' . $lote->id_contrato)->fetch_object();
     //$cuenta = DB::table('cuenta')->where('fk_contrato', $lote->id_contrato)->get()[0];
     $enganches = Estatica::getObjetos($this->mysqli->query('select * from enganche_parcial where fk_cuenta=' . $cuenta->id_cuenta));
     //$enganches = DB::table('enganche_parcial')->where('fk_cuenta', $cuenta->id_cuenta)->get();
     $partesContrato = DB::table('parte_contrato')->where('fk_desarrollo', $lote->fk_desarrollo)->get();
     $ala_Firma = 0;
     $textoEnganches = '';
     $bool_no_parciales = true;
     for ($e = 0; $e < count($enganches); $e++) {
         if (strtotime($enganches[$e]->fecha_promesa) > strtotime($contrato->fecha_realizacion)) {
             $textoEnganches = $textoEnganches . " Complemento de enganche por \$" . round($enganches[$e]->importe, 2) . ' ' . numtoletras(round($enganches[$e]->importe, 2)) . " que depositara en la fecha " . $enganches[$e]->fecha_promesa;
             $bool_no_parciales = false;
         } else {
             $ala_Firma += $enganches[$e]->importe;
         }
     }
     if ($bool_no_parciales == true) {
         $textoEnganches = 'Ningun enganche parcial.';
     }
     $PHPWord = new PHPWord();
     if ($lote->tipo_operacion == 1) {
         $document = $PHPWord->loadTemplate(dirname(__FILE__) . '/PHPWord/contrato_contado.docx');
     } else {
         $document = $PHPWord->loadTemplate(dirname(__FILE__) . '/PHPWord/Plantilla_Contrato_Credito.docx');
         $document->setValue('Plazo', $lote->plazo);
         $document->setValue('DiaCorte', $lote->dia_corte);
         $document->setValue('PlazoLetra', numtoletras_2($lote->plazo));
         $lote->fecha_inicial_pago = explode('-', $lote->fecha_inicial_pago);
         $document->setValue('IniciaDia', $lote->fecha_inicial_pago[2]);
         for ($parte = 0; $parte < count($partesContrato); $parte++) {
             $document->setValue('Parte' . ($parte + 1), $partesContrato[$parte]->texto);
         }
         $document->setValue('MesInicia', $this->mes($lote->fecha_inicial_pago[1]));
         $document->setValue('AnioInicia', $lote->fecha_inicial_pago[0]);
     }
     $document->setValue('Contrato', $expediente);
     $document->setValue('Cliente', $cliente->nombre . " " . $cliente->ape_pate . " " . $cliente->ape_mate);
     $document->setValue('CP', $cliente->cp);
     if ($cliente->estado_civil == 1) {
         $document->setValue('Edo_Civil', 'Soltero');
         $document->setValue('Regimen', ' ');
     } else {
         $document->setValue('Edo_Civil', 'Casado');
         if ($cliente->regimenMatrimonial == 1) {
             $document->setValue('Regimen', ' bajo el regimen de Bienes mancomunados');
         } else {
             $document->setValue('Regimen', 'bajo el regimen de Bienes separados');
         }
     }
     $document->setValue('Profesion', $cliente->profesion);
     $document->setValue('RFC', $cliente->rfc);
     $document->setValue('CURP', $cliente->curp);
     $document->setValue('Tel_Casa', $cliente->telefono);
     $document->setValue('Tel_Celular', $cliente->movil);
     $document->setValue('Email', $cliente->email);
     $document->setValue('Calle', $cliente->calle);
     $document->setValue('No', $cliente->numero_casa);
     $document->setValue('Colonia', $cliente->colonia);
     $document->setValue('Nacionalidad', $cliente->nacionalidad);
     $document->setValue('Desarrollo', $lote->nombre);
     $document->setValue('Lote', $lote->lote);
     $document->setValue('LoteLetra', numtoletras_2($lote->lote));
     $document->setValue('Manzana', $lote->num_letra);
     $document->setValue('ManzanaLetra', numtoletras_2($lote->num_letra));
     $document->setValue('MtNorte', $lote->metlinor);
     $document->setValue('LindaNorte', $lote->metlinor);
     $document->setValue('MtSur', $lote->metlinsur);
     $document->setValue('LindaSur', $lote->lindasur);
     $document->setValue('MtOriente', $lote->metlinoeste);
     $document->setValue('LindaOriente', $lote->lindaoriente);
     $document->setValue('MtPoniente', $lote->metlineste);
     $document->setValue('LindaPoniente', $lote->lindaponiente);
     $document->setValue('Total', round($categoria->precio * $lote->superficie), 2);
     $document->setValue('TotalLetra', numtoletras(round($categoria->precio * $lote->superficie), 2));
     $document->setValue('Precio_Metro', round($categoria->precio, 2));
     $document->setValue('PrecioMetroLetra', numtoletras(round($categoria->precio, 2)));
     $document->setValue('Superficie', round($lote->superficie, 2));
     $document->setValue('SuperficieLetra', numtoletras_2(round($lote->superficie, 2)));
     $document->setValue('SaldoFinanciar', round($cuenta->saldo_inicial));
     $document->setValue('SaldoFinanciarLetra', numtoletras(round($cuenta->saldo_inicial)));
     $document->setValue('Enganche', round($ala_Firma));
     $document->setValue('EngancheLetra', numtoletras(round($ala_Firma)));
     $document->setValue('Complementos', $textoEnganches);
     $lote->fecha_realizacion = explode("-", $lote->fecha_realizacion);
     $document->setValue('Dia', $lote->fecha_realizacion[2]);
     $document->setValue('Mes', $this->mes($lote->fecha_realizacion[1]));
     $document->setValue('Anio', $lote->fecha_realizacion[0]);
     $document->setValue('Referencia', $lote->fk_referencia);
     $document->setValue('Municipio', $cliente->municipio);
     $document->setValue('Complemento', $cliente->estado);
     if ($lote->tipo_operacion == 1) {
//.........这里部分代码省略.........
开发者ID:vipomx,项目名称:Castilla,代码行数:101,代码来源:ActionLotes.php

示例13: GeraOitAlterado

    public function GeraOitAlterado() {

	$CData = new Data();


	$SqlOit = "SELECT  * FROM oit_formulario WHERE my_parametro_id = " . $this->MyParametroId . " AND laudo_item_id =" . $this->getLaudoItemId();

	$BD = New Database();

	$Result = $BD->query($SqlOit);


	if ($Result->rowCount() == 0) {
	    $this->setMsg("Não foram encontradas informações para este laudo, não será possível concluir a geração do arquivo\n\n");
	    $this->setStatusGeracao(false);
	}

	$LinhaOit = $Result->fetchAll();


	$Cpf = $this->getCPF();
	$DocOit = !isset($Cpf) ? "CPF " . $this->getCPF() : "RG: " . $this->getRG();

	$_1a = $LinhaOit[0]["1a"];
	$_1b = $LinhaOit[0]["1b"];
	$_2a = $LinhaOit[0]["2a"];
	$_2b_pequenas_opacidades_primarias = $LinhaOit[0]["2b_pequenas_opacidades_primarias"];
	$_2b_pequenas_opacidades_secundarias = $LinhaOit[0]["2b_pequenas_opacidades_secundarias"];
	$_2b_zonas_d = $LinhaOit[0]["2b_zonas_d"];
	$_2c_profusao = $LinhaOit[0]["2c_profusao"];
	$_2c_grandes_opacidades = $LinhaOit[0]["2c_grandes_opacidades"];
	$_3a = $LinhaOit[0]["3a"];
	$_3b_placas_neurais = $LinhaOit[0]["3b_placas_neurais"];
	$_3b_parede_em_perfil_local = $LinhaOit[0]["3b_parede_em_perfil_local"];
	$_3b_parede_em_perfil_calcificacao = $LinhaOit[0]["3b_parede_em_perfil_calcificacao"];
	$_3b_frontal_local = $LinhaOit[0]["3b_frontal_local"];
	$_3b_frontal_calcificacao = $LinhaOit[0]["3b_frontal_calcificacao"];
	$_3b_diafragma_local = $LinhaOit[0]["3b_diafragma_local"];
	$_3b_diafragma_calcificacao = $LinhaOit[0]["3b_diafragma_calcificacao"];
	$_3b_outros_locais_local = $LinhaOit[0]["3b_outros_locais_local"];
	$_3b_outros_locais_calcificacao = $LinhaOit[0]["3b_outros_locais_calcificacao"];
	$_3b_combinado_0d = $LinhaOit[0]["3b_combinado_0d"];
	$_3b_combinado_0e = $LinhaOit[0]["3b_combinado_0e"];
	$_3b_combinado_d = $LinhaOit[0]["3b_combinado_d"];
	$_3b_combinado_e = $LinhaOit[0]["3b_combinado_e"];
	$_3c = $LinhaOit[0]["3c"];
	$_3d_espessamento_pleural_difuso = $LinhaOit[0]["3d_espessamento_pleural_difuso"];
	$_3d_parede_em_perfil_local = $LinhaOit[0]["3d_parede_em_perfil_local"];
	$_3d_parede_em_perfil_calcificacao = $LinhaOit[0]["3d_parede_em_perfil_calcificacao"];
	$_3d_frontal_local = $LinhaOit[0]["3d_frontal_local"];
	$_3d_frontal_calcificacao = $LinhaOit[0]["3d_frontal_calcificacao"];
	$_3d_combinado_0d = $LinhaOit[0]["3d_combinado_0d"];
	$_3d_combinado_0e = $LinhaOit[0]["3d_combinado_0e"];
	$_4a_outras_normalidades = $LinhaOit[0]["4a_outras_normalidades"];
	$_4b_outras_normalidades = $LinhaOit[0]["4b_outras_normalidades"];
	$_4c_comentarios = $LinhaOit[0]["4c_comentarios"];

	$PHPWord = new PHPWord();

	$ArquivoClinica = $this->VerificaDiretorioTemplateOIT();

	$document = $PHPWord->loadTemplate($ArquivoClinica);

	//clínica
	$document->setValue('nome_emp', $this->getRazaoSocialClinica());
	$document->setValue('cnpj_emp', $this->getCnpjClinica());
	$document->setValue('rua_emp', $this->getEnderecoClinica());
	$document->setValue('tel_emp', $this->getTelefoneClinica());
	$document->setValue('cidade_emp', $this->getCidadeClinica());
	$document->setValue('estado_emp', $this->getUFClinica());

	//Funcionário
	$document->setValue('nome_func', $this->getFuncionario());
	$document->setValue('doc_func', $DocOit);
	$document->setValue('empresa_func', $this->getRazaoSocialEmp());
	$document->setValue('dat_func', $this->getDataNascimento());
	$document->setValue('func_funcionario', $this->getFuncao());
	$document->setValue('idade_func', $this->IdadeFunc);
	$document->setValue('tel_func', $this->TelefoneClinica);
	$document->setValue('data_exame_func', $CData->convertDataBrasileira($this->getDataRealizacao()));

	$document->setValue('observacao', "$_4c_comentarios");

	//Marcações no documento
	//1A
	if ($_1a == 1) {
	    $document->setValue('1a1', "X");
	} else {
	    $document->setValue('1a1', "");
	};

	if ($_1a == 2) {
	    $document->setValue('1a2', "X");
	} else {
	    $document->setValue('1a2', "");
	}

	if ($_1a == 3) {
	    $document->setValue('1a3', "X");
	} else {
//.........这里部分代码省略.........
开发者ID:helbertfurbino,项目名称:laudoonline,代码行数:101,代码来源:CGeraLaudo.php

示例14: array

<?php

$rootAddress = '';
require_once "phpword/PHPWord.php";
$dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado");
$meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
$fecha = date('d') . 'días del mes de ' . $meses[date('n') - 1] . " del " . date('Y');
$word = new PHPWord();
$template = $word->loadTemplate($rootAddress . 'plantillas/PARA PPS.docx');
$template->setValue('${NOMBRE_ESTUDIANTE}', 'Luis Manuel Deras');
$template->setValue('${NUMERO_CUENTA}', '20112001640');
$template->setValue('${FECHA}', $fecha);
$template->save('test3.docx');
开发者ID:Joshuabenitez,项目名称:Proyecto-industria,代码行数:13,代码来源:modificarWord.php

示例15: date

$tanggal = date('j');
//Array Bulan
$array_bulan = array(1 => 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember');
$bulan = $array_bulan[date('n')];
//Format Tahun
$tahun = date('Y');
$bilangan = new Terbilang();
// Include the PHPWord.php, all other classes were loaded by an autoloader
include '../../../../../plugin/PHPWord.php';
// Create a new PHPWord Object
$PHPWord = new PHPWord();
$template = '../../../../../config/Template/' . $NAMA_FILE;
$nama_template = $NAMA_JENIS;
if (file_exists($template)) {
    $template = $template;
    $document = $PHPWord->loadTemplate($template);
    $document->setValue('nomor_ppjb', $nomor);
    $document->setValue('hari', $hari);
    $document->setValue('tanggal', $tanggal);
    $document->setValue('bulan', $bulan);
    $document->setValue('tahun', $tahun);
    $document->setValue('tahun_terbilang', $bilangan->eja($tahun));
    $document->setValue('nama_pembeli', $nama_pembeli);
    $document->setValue('no_identitas', $no_identitas);
    $document->setValue('alamat', $alamat);
    $document->setValue('telp1', $tlp1);
    $document->setValue('telp3', $tlp3);
    $document->setValue('NAMA_PEJABAT', $NAMA_PEJABAT);
    $document->setValue('NAMA_JABATAN', $NAMA_JABATAN);
    $document->setValue('PEJABAT_PPJB', $PEJABAT_PPJB);
    $document->setValue('JABATAN_PPJB', $JABATAN_PPJB);
开发者ID:rizafr,项目名称:market_ancol,代码行数:31,代码来源:ppjb_cetak.php


注:本文中的PHPWord::loadTemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。