PageRenderTime 50ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/JEF/sites/all/themes/unicauca_vice/unicauca_vice/print--pdf--node--acta.tpl.php

https://bitbucket.org/desarrollojef/jef
PHP | 340 lines | 304 code | 26 blank | 10 comment | 6 complexity | 0b1ccd83861c265e6f4289efee0c8412 MD5 | raw file
Possible License(s): AGPL-3.0, AGPL-1.0, LGPL-2.1, LGPL-3.0, GPL-3.0, GPL-2.0
  1. <?php
  2. $node = $print['node'];
  3. function variables($nomCampo, $node){
  4. $arrFormApi = field_view_field('node', $node, $nomCampo);
  5. $arrFormApi['#label_display'] = 'hidden';
  6. return render($arrFormApi);
  7. }
  8. function usuarios($nomCampo, $node){
  9. $arrFormApi = field_view_field('user', $node, $nomCampo);
  10. $arrFormApi['#label_display'] = 'hidden';
  11. return render($arrFormApi);
  12. }
  13. $i = 1;
  14. $x = 1;
  15. $y = 1;
  16. $z = 1;
  17. ?>
  18. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  19. <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $print['language']; ?>" xml:lang="<?php print $print['language']; ?>">
  20. <head>
  21. <?php print $print['head']; ?>
  22. <?php print $print['base_href']; ?>
  23. <title><?php //print $print['title']; ?></title>
  24. <?php print $print['scripts']; ?>
  25. <?php print $print['sendtoprinter']; ?>
  26. <?php print $print['robots_meta']; ?>
  27. <?php print $print['favicon']; ?>
  28. <?php print $print['css']; ?>
  29. </head>
  30. <body >
  31. <?php
  32. $ciudad = variables('field_crear_acta_ciudad',$node);
  33. $fecha = variables('field_crear_acta_fecha',$node);
  34. $horainicio = variables('field_hora_inicio',$node);
  35. $horafin = variables('field_hora_fin',$node);
  36. $lugar = variables('field_crear_lugar_desarrollo',$node);
  37. $observaciones = variables('field_observaciones',$node);
  38. //$dpto = variables('field_acta_departamento', $node);
  39. $arrFormApi = field_view_field('node', $node, 'field_acta_departamento');
  40. $dpto = $arrFormApi[0]["#title"];
  41. $arreglo = explode(',', $fecha);
  42. $var1 = $arreglo[0];
  43. $var2 = $arreglo[1];
  44. $aux = explode(' ',$var2);
  45. //$arrFormApi = field_view_field('node', $node, 'field_acta_departamento');
  46. //echo $arrFormApi[0]["#title"];
  47. ?>
  48. <div><table border="1">
  49. <tr height="30%">
  50. <td width="30%" align="center"><?php print $print['logo']; ?> </td>
  51. <td width="70%" align="center" valign="middle">
  52. <tr>
  53. <td></td>
  54. </tr>
  55. <tr>
  56. <td></td>
  57. </tr>
  58. <tr>
  59. <td></td>
  60. </tr>
  61. <tr>
  62. <td><h3>UNIVERSIDAD DEL CAUCA</h3></td>
  63. </tr>
  64. <tr>
  65. <td></td>
  66. </tr>
  67. <tr>
  68. <td><h3>Acta para Reuniones</h3></td>
  69. </tr>
  70. <tr>
  71. <td></td>
  72. </tr>
  73. </td>
  74. </tr>
  75. </table>
  76. </div>
  77. <div>
  78. <table border="1">
  79. <tr height="30%">
  80. <td width="12%"><strong>Ciudad</strong></td>
  81. <td width="18%"><?php print $ciudad; ?></td>
  82. <td width="35%"><strong>Dependencia(s) responsable(s) de la reuni&oacute;n</strong></td>
  83. <td width="35%"><?php echo "Departamento de ".$dpto;
  84. ?></td>
  85. </tr>
  86. <tr>
  87. <td rowspan="2" valign="middle" width="12% "><strong>Fecha</strong></td>
  88. <td width="6%"><?php print $aux[1]; ?></td>
  89. <td width="6%"><?php print $aux[2]; ?></td>
  90. <td width="6%"><?php echo $aux[3][0];echo $aux[3][1];echo $aux[3][2];echo $aux[3][3];?></td>
  91. <td width="12%"><strong>Hora Inicio</strong></td>
  92. <td width="12%"><strong>Hora Finalizaci&oacute;n</strong></td>
  93. <td width="28%"><strong>Lugar de desarrollo</strong></td>
  94. <td width="18%"><strong>ACTA No</strong></td>
  95. </tr>
  96. <tr>
  97. <td width="6%"><strong>Dia</strong></td>
  98. <td width="6%"><strong>Mes</strong></td>
  99. <td width="6%"><strong>A&ntilde;o</strong></td>
  100. <td width="12%"><?php print $horainicio ?></td>
  101. <td width="12%"><?php print $horafin ?></td>
  102. <td width="28%"><?php print $lugar ?></td>
  103. <td width="18%"><?php print $print['title'] ?></td>
  104. </tr>
  105. </table>
  106. </div>
  107. <table><tr><td width=100%><h4>ORDEN DEL D&Iacute;A:</h4></td></tr>
  108. <tr><td width="5%"></td><td width="95%"><h4>1. Verificaci&oacute;n de Asistencia</h4></td></tr>
  109. <tr><td width="5%"></td><td width="95%"><h4>2. Lectura de acta anterior SI <input type="radio" name="option" value="Milk"> NO <input type="radio" name="option" value="Milk"></h4></td></tr>
  110. <tr><td width="5%"></td><td width="95%"><h4>3. Temas a tratar</h4></td></tr>
  111. <tr><td></td></tr>
  112. <table>
  113. <div>
  114. <table border="1">
  115. <tr>
  116. <td width="5%"><strong>No</strong></td>
  117. <td width="95%" align="center"><strong>Tema</strong></td>
  118. </tr>
  119. <?php
  120. $wrapper = entity_metadata_wrapper('node', $node);
  121. $formtype = field_get_items('node', $node, 'field_crear_temas_reunion');
  122. foreach($formtype as $itemid) {
  123. ?>
  124. <tr>
  125. <td width="5%"><?php print $x++ ?></td>
  126. <?php $item = field_collection_field_get_entity($itemid); ?>
  127. <td width="95%">
  128. <?php
  129. print ' '.$item->field_tema['und'][0]['safe_value'];
  130. //print $item->field_desarrollo_reunion['und'][0]['safe_value'];
  131. ?>
  132. </td>
  133. </tr>
  134. <?php
  135. }
  136. ?>
  137. <tr>
  138. <td width="5%">
  139. <?php print $x;?>
  140. </td>
  141. <td width="95%">
  142. Varios
  143. </td>
  144. </tr>
  145. </table>
  146. </div>
  147. <h4><strong>Desarrollo de la reunion:</strong></h4>
  148. <div>
  149. <table border="1">
  150. <?php
  151. $wrapper = entity_metadata_wrapper('node', $node);
  152. $formtype = field_get_items('node', $node, 'field_crear_temas_reunion');
  153. foreach($formtype as $itemid) {
  154. ?>
  155. <tr>
  156. <td><?php
  157. $item = field_collection_field_get_entity($itemid);
  158. ?><strong><?php print $i++.". ".$item->field_tema['und'][0]['safe_value'];?></strong>
  159. <?php $var = $item->field_desarrollo_reunion['und'][0]['safe_value'];
  160. print $var;
  161. ?>
  162. </td>
  163. </tr>
  164. <?php }
  165. $wrapper1 = entity_metadata_wrapper('node', $node);
  166. $formtype1 = field_get_items('node', $node, 'field_acta_varios_docente');
  167. echo "<tr><td>";
  168. echo "<strong>".$i.". ".'VARIOS'."</strong>";
  169. echo "<br/>";
  170. if (is_array($formtype1)) {
  171. foreach($formtype1 as $itemid1) {
  172. ?>
  173. <?php
  174. $item1 = field_collection_field_get_entity($itemid1);
  175. $user=user_load($item1->field_user_docente['und'][0]['target_id']);
  176. $arrFormApi = field_view_field('user',$user,'field_user_nombre');
  177. $arrFormApi['#label_display'] = 'hidden';
  178. $nombre= drupal_render($arrFormApi);
  179. ?><?php print 'Varios del profesor(a): '.$nombre;?>
  180. <?php $var = $item1->field_user_desarrollo['und'][0]['safe_value'];
  181. print "- ".$var;
  182. ?>
  183. <br/><br/>
  184. <?php
  185. }
  186. }
  187. echo "</td></tr>";
  188. ?>
  189. </table>
  190. </div>
  191. <h4><strong>ASISTENTES</strong></h4>
  192. <div>
  193. <table border="1">
  194. <tr>
  195. <td width="5%"><strong>No.</strong></td>
  196. <td width="35%" align="center"><strong>Nombre y Apellido</strong></td>
  197. <td width="34%" align="center"><strong>Cargo y Dependencia</strong></td>
  198. <td width="26%" align="center"><strong>Firma</strong></td>
  199. </tr>
  200. <?php
  201. $fieldAsistentes = $node->field_asistentes;
  202. $arrFieldAsistentes = $fieldAsistentes['und'];
  203. /*echo "<pre>";
  204. var_dump($fieldAsistentes);
  205. echo "</pre>";*/
  206. $arrAsistentes = array();
  207. foreach ($arrFieldAsistentes as $fieldAsistente) {
  208. ?>
  209. <tr>
  210. <td><?php print $y++ ?></td>
  211. <td>
  212. <?php
  213. $userid=$fieldAsistente['target_id'];
  214. $user=user_load($userid);
  215. $arrFormApi = field_view_field('user',$user,'field_user_nombre');
  216. $arrFormApi['#label_display'] = 'hidden';
  217. $nombre= drupal_render($arrFormApi);
  218. print ' '.$nombre;
  219. ?>
  220. </td>
  221. <td><?php
  222. $arrFormApi = field_view_field('user',$user,'field_user_cargo');
  223. $arrFormApi['#label_display'] = 'hidden';
  224. $cargo= drupal_render($arrFormApi);
  225. $auxiliar2 = $arrFormApi[0]["#title"];
  226. print ' '.$auxiliar2.'- '.$dpto;
  227. ?></td>
  228. <td></td>
  229. </tr>
  230. <?php
  231. }
  232. //var_dump($arrAsistentes);
  233. //print $arrAsistentes[0];
  234. ?>
  235. </table>
  236. </div>
  237. <h4><strong>COMPROMISOS</strong></h4>
  238. <div>
  239. <table border="1">
  240. <tr>
  241. <td width="5%"><strong>No.</strong></td>
  242. <td width="30%" align="center"><strong>Compromiso</strong></td>
  243. <td width="25%" align="center"><strong>Responsable</strong></td>
  244. <td width="20%" align="center"><strong>Fecha de Compromiso</strong></td>
  245. <td width="20%" align="center"><strong>Fecha de Realizaci&oacute;n</strong></td>
  246. </tr>
  247. <?php
  248. $wrapper1 = entity_metadata_wrapper('node', $node);
  249. //var_dump($wrapper);
  250. $formtype1 = field_get_items('node', $node, 'field_compromisos');
  251. if (is_array($formtype1)) {
  252. foreach($formtype1 as $itemid1) {
  253. ?>
  254. <tr>
  255. <td width="5%"><?php print $z++ ?></td>
  256. <?php $item1 = field_collection_field_get_entity($itemid1); ?>
  257. <td width="30%">
  258. <?php
  259. $cont=0;
  260. $compromiso=$item1->field_compromiso['und'][0]['safe_value'];
  261. $responsable=$item1->field_responsable['und'][0]['safe_value'];
  262. $fecha_compromiso=$item1->field_fecha_compromiso['und'][0]['value'];
  263. $fecha_realizacion=$item1->field_fecha_realizacion['und'][0]['value'];
  264. print $compromiso;
  265. ?>
  266. </td>
  267. <td width="25%">
  268. <?php
  269. print $responsable;
  270. ?>
  271. </td>
  272. <td width="20%">
  273. <?php
  274. if($compromiso!=" "){
  275. for($i=0;$i<10;$i++){
  276. print $fecha_compromiso[$i];
  277. }
  278. }
  279. ?>
  280. </td>
  281. <td width="20%">
  282. <?php
  283. if($compromiso!=" "){
  284. for($i=0;$i<10;$i++){
  285. print $fecha_realizacion[$i];
  286. }
  287. }
  288. ?>
  289. </td>
  290. </tr>
  291. <?php
  292. }
  293. }
  294. ?>
  295. <pre>
  296. <?php
  297. ?>
  298. </pre>
  299. </table>
  300. </div>
  301. <pre>
  302. </pre>
  303. <h4><strong>OBSERVACIONES</strong></h4>
  304. <div>
  305. <table border="1">
  306. <tr>
  307. <td><?php print $observaciones ?></td>
  308. </tr>
  309. </table>
  310. </div>
  311. <div class="print-site_name"><?php //print $print['site_name']; ?></div>
  312. <div class="print-footer"><?php print $print['footer_message']; ?></div>
  313. </body>
  314. </html>