PageRenderTime 33ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/application/views/dashboard-user-involved.php

https://gitlab.com/leonelsoriano3/sigepro
PHP | 201 lines | 147 code | 40 blank | 14 comment | 6 complexity | 29cadb91008a4cfa50c537f409ddae96 MD5 | raw file
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: leonel
  5. * Date: 19/05/16
  6. * Time: 20:46
  7. */
  8. defined('BASEPATH') OR exit('No direct script access allowed');
  9. ?>
  10. <?php
  11. /**
  12. * Created by PhpStorm.
  13. * User: leonel
  14. * Date: 17/05/16
  15. * Time: 21:59
  16. */
  17. defined('BASEPATH') OR exit('No direct script access allowed');
  18. ?>
  19. <div class="page-content">
  20. <!--..:::::::::::::::::::::..-->
  21. <!--ENCABEZADO DE CADA PAGINA-->
  22. <ol class="breadcrumb">
  23. <li class=""><a>System</a></li>
  24. <li class=""><a>Inicio</a></li>
  25. <li class=""><a>Proyectos</a></li>
  26. <li class="active"><a>Nuevo</a></li>
  27. </ol>
  28. <div class="page-heading">
  29. <h1><i class="icon-plus"></i> Agregar Nuevo <b>Proyectos</b></h1>
  30. <a href="proyectoslist.php" class="btnOnResponsiveLeft btn btn-default-alt pullRight mr2p">
  31. <i class="icon-arrow-left"></i> Volver al Listado
  32. </a>
  33. </div>
  34. <div class="container-fluid">
  35. <!--ENCABEZADO DE CADA PAGINA FIN-->
  36. <!--..:::::::::::::::::::::..-->
  37. <div class="panel panel-sky">
  38. <div class="panel-heading" style="background-color: #008084;">
  39. <h2>Formulario de Registro</h2>
  40. </div>
  41. <div class="panel-body">
  42. <div class="table-responsive">
  43. <table class="table">
  44. <tr>
  45. <td class="ewTableHeader"><span>Tipo de Usuario<span class='ewmsg'>&nbsp;*</span></span></td>
  46. <td>
  47. <?php echo($typeUserInput); ?>
  48. </td>
  49. <td class="ewTableHeader"><span>Usuarios<span class='ewmsg'>&nbsp;*</span></span></td>
  50. <td>
  51. <?php echo($userCombo); ?>
  52. </td>
  53. </tr>
  54. </table>
  55. <input onclick="addAjax()" type="button" style="float: right" class="btn btn-success" name="btnAction" id="btnAction" value="Agregar Registro">
  56. <script>
  57. function addAjax() {
  58. if($('#typeuser').val() != -1 || $('#userCombo').val() != -1 ){
  59. var parametros = {
  60. in_typeUsert : $('#typeuser').val(),
  61. };
  62. $.ajax({
  63. data: parametros,
  64. url: "./dashboard/loadTableProject/",
  65. type: "get",
  66. beforeSend: function () {
  67. // $("#resultado").html("<img src="../../images/ajax-loader.gif" alt="Ajax Cargando" height="42" width="42">");
  68. },
  69. success: function (response) {
  70. alert("jpƱaa");
  71. var $typeUser = $('#typeuser');
  72. $typeUser.val($typeUser.children('option:first').val());
  73. var $userCombo = $('#userCombo');
  74. $userCombo.val($userCombo.children('option:first').val());
  75. $("#tableProject").html(response);
  76. sweetAlert(" Datos Guardados Correctamente ", "Info");
  77. }
  78. });
  79. }else{
  80. sweetAlert(" Los dos Campos son Requeridos", "Error");
  81. }
  82. }
  83. </script>
  84. <link type="text/css" href="<?= base_url('/assets/css/jquery.dataTables.css') ?>" rel="stylesheet">
  85. <script type="text/javascript" src="<?= base_url('/assets/js/jquery.dataTables.min.js') ?>"></script>
  86. <div id="tableProject" style="margin-top: 75px">
  87. <table id="list" class="display" cellspacing="0" width="100%">
  88. <thead>
  89. <tr>
  90. <th>Nombre</th>
  91. <th>Apellido</th>
  92. <th>Telefono</th>
  93. <th>Correo</th>
  94. <th>Empresa</th>
  95. <th>Departamento</th>
  96. <th>Cargo</th>
  97. <th>Foto</th>
  98. <th>Detalle</th>
  99. <th>Modificar</th>
  100. <th>Eliminar</th>
  101. </tr>
  102. </thead>
  103. <tfoot>
  104. <tr>
  105. <th>Nombre</th>
  106. <th>Apellido</th>
  107. <th>Telefono</th>
  108. <th>Correo</th>
  109. <th>Empresa</th>
  110. <th>Departamento</th>
  111. <th>Cargo</th>
  112. <th>Foto</th>
  113. <th>Detalle</th>
  114. <th>Modificar</th>
  115. <th>Eliminar</th>
  116. </tr>
  117. </tfoot>
  118. <tbody>
  119. <tr>
  120. <?php if (count($table) != 0): ?>
  121. <td><?php echo($name); ?></td>
  122. <td><?php echo($surName); ?></td>
  123. <td><?php echo($phone); ?></td>
  124. <td><?php echo($email); ?></td>
  125. <td><?php echo($companyName); ?></td>
  126. <td><?php echo($departamentName); ?></td>
  127. <td><?php echo($positionName); ?></td>
  128. <td><?php echo($img); ?></td>
  129. <td><a href="javascript:void(0)" id="detailAjax"
  130. class="btn btn-info-alt"><i class="fa fa-folder-open-o"></i> Detalles</a>
  131. </td>
  132. <td><a href="javascript:void(0)" id="modificateAjax"
  133. class="btn btn-info-alt"><i class="fa fa-edit"></i> Modificar</a></td>
  134. <td><a href="javascript:void(0)" id="deleteAjax"
  135. class="btn btn-danger-alt"><i class="icon-trash"></i> Eliminar</a></td>
  136. <?php endif; ?>
  137. </tr>
  138. </tbody>
  139. </table>
  140. </div>
  141. <script>
  142. // sweetAlert("Oops, Lo Sentimos... Usuario no Existe ", "error");
  143. </script>
  144. </div>
  145. </div>
  146. </div>
  147. </div> <!-- .container-fluid -->
  148. </div> <!-- #page-content -->
  149. </div>
  150. <footer role="contentinfo">
  151. <div class="clearfix">
  152. <ul class="list-unstyled list-inline pull-left">
  153. <li><h6 style="margin: 0;"> &copy; 2016 ISM Center</h6></li>
  154. </ul>
  155. <button class="pull-right btn btn-link btn-xs hidden-print" id="back-to-top"><i class="fa fa-arrow-circle-up"></i></button>
  156. </div>
  157. </footer>
  158. </div>
  159. <script>
  160. $('#list').DataTable();
  161. </script>