*/ $this->Header(['assets' => ['dialogs', 'spin', 'jvalidator']]); ?> <!-- Content Header (Page header) --> <section class="content-header"> <?php echo page_title(['ob' => $this, 'class' => 'fa fa-edit', 'text' => Uncamelize(__FILE__)]); ?> </section> <!-- Main content --> <div class="container"> <?php echo form_open('', ['class' => 'form-horizontal col-md-6', 'style' => 'margin-left: 20%'], ['ID_USUARIO' => $Info->ID_PRACTICANTE]); ?> <small style="margin-left: 20%;">Último cambio realizado <?php echo Momento($Info->FECHA_MODIFICA); ?> por <a href="<?php echo site_url("usuarios/verusuario/" . $Info->ID); ?> " target="_blank" class="btn-link"> <?php echo $Info->NOMBRE_USUARIO_MODIFICA; ?> </a></small> <hr style="border: 1px solid #3D8EBC;"/> <?php echo form_input(['placeholder' => 'Ingrese el nombre completo del practicante', 'name' => 'NOMBRE_PRACTICANTE', 'class' => 'obligatorio', 'label' => ['text' => 'Nombre']], $Info->NOMBRE_PRACTICANTE); ?> <?php
/** * @param array $params * @return string */ function TablaCierre(array $params) { extract($params); /** * @var array $columns * @var array $fields * @var array $dataProvider * @var string $actions * @var string $align * @var string $tableName * @var bool $autoNumeric * @var string $id * @var string $controller */ $align = isset($align) ? $align : 'left'; $autoNumeric = isset($autoNumeric) ? $autoNumeric : false; $table = '<table id="tabla" style="text-align:' . $align . '" data-name="' . $tableName . '" class="table table-bordered table-striped"><thead><tr>'; if ($autoNumeric) { $c = 0; $table .= '<th style="width: 20px;">#</th>'; } foreach ($columns as $columnName => $value) { if (!is_numeric($columnName)) { $table .= '<th style="' . (isset($value['style']) ? $value['style'] : '') . ';text-align:' . $align . '">' . $columnName . '</th>'; } else { $table .= '<th style="text-align:' . $align . '">' . $value . '</th>'; } } $table .= '</tr></thead><tbody>'; foreach ($dataProvider as $data) { $table .= '<tr>'; if ($autoNumeric) { $table .= '<td>' . ++$c . '</td>'; } foreach ($fields as $key => $value) { if (!is_numeric($key)) { switch ($value) { #Represents a moment helper case 'moment': $table .= '<td>' . Momento($data[$key]) . '</td>'; break; #Represents a date with the helper #Represents a date with the helper case 'date': $table .= '<td>' . date_format(new DateTime($data[$key]), 'd/m/Y') . '</td>'; break; #Represents a number format #Represents a number format case 'numeric': $table .= '<td>' . number_format($data[$key], 0, '', ',') . '</td>'; break; } } else { if ($value == 'CHECKBOX') { $table .= '<td><input type="checkbox"></td>'; } else { $table .= '<td>' . $data[$value] . '</td>'; } } } $table .= '</tr>'; } $table .= '</tbody></table>'; return $table; }
<?php echo form_input(['class' => '', 'readonly' => true, 'label' => ['text' => 'Fax']], $Info->FAX); ?> <div class='form-group'> <label for='$name' class='col-lg-2 control-label'>Página</label> <div class='col-lg-10'> <a target="_blank" class="btn-link" href="http://<?php echo str_replace('https', '', str_replace('http', '', str_replace('://', '', $Info->PAGINA_WEB))); ?> "><b><?php echo $Info->PAGINA_WEB; ?> </b></a> </div> </div> <?php echo form_input(['class' => 'obligatorio', 'readonly' => true, 'label' => ['text' => 'Fecha registro']], Momento($Info->FECHA_REGISTRO)); ?> <!--Envíar--> <?php echo call_spin_div(); ?> <br> <?php echo form_close(); ?> </div> <?php echo $this->Footer();
public static function UserTable(array $params) { extract($params); /** * @var array $columns * @var array $fields * @var array $dataProvider * @var string $actions * @var string $align * @var string $tableName * @var bool $autoNumeric * @var string $id * @var string $nivel * @var string $controller */ $align = isset($align) ? $align : 'left'; $actions = isset($actions) ? $actions : ''; $controller = isset($controller) ? $controller : ''; $autoNumeric = isset($autoNumeric) ? $autoNumeric : false; $view = strrchr($actions, 'v'); $update = strrchr($actions, 'u'); $delete = strrchr($actions, 'd'); $print = strrchr($actions, 'p'); $check = strrchr($actions, 'c'); $radio = strrchr($actions, 'r'); $action = $delete || $update || $view || $print || $check || $radio; $table = '<table id="tabla" style="text-align:' . $align . '" data-name="' . $tableName . '" class="table table-bordered table-striped"><thead><tr>'; if ($autoNumeric) { $c = 0; $table .= '<th style="width: 20px;">#</th>'; } foreach ($columns as $columnName => $value) { if (!is_numeric($columnName)) { $table .= '<th style="' . (isset($value['style']) ? $value['style'] : '') . ';text-align:' . $align . '">' . $columnName . '</th>'; } else { $table .= '<th style="text-align:' . $align . '">' . $value . '</th>'; } } if ($action) { $table .= '<th style="">Acciones</th>'; } $table .= '</tr></thead><tbody>'; foreach ($dataProvider as $data) { $back = $data['NIVEL'] == 2 ? "style='background: rgba(0, 0, 255, 0.11)'" : ''; $table .= "<tr {$back}>"; if ($autoNumeric) { $table .= '<td>' . ++$c . '</td>'; } foreach ($fields as $key => $value) { if (!is_numeric($key)) { if (is_array($value)) { switch ($value['type']) { case 'img': #Represents a image $table .= '<td><img class="img-circle" style="height: 25px;width: 25px;" src="' . $value['path'] . '/' . $data[$key] . '"></td>'; break; } } else { switch ($value) { #Represents a moment helper case 'moment': $table .= '<td>' . Momento($data[$key]) . '</td>'; break; #Represents a date with the helper #Represents a date with the helper case 'date': $table .= '<td>' . date_format(new DateTime($data[$key]), 'd/m/Y') . '</td>'; break; #Represents a number format #Represents a number format case 'numeric': $table .= '<td>' . number_format($data[$key], 0, '', ',') . '</td>'; break; #Represents a phone number #Represents a phone number case 'phone': $table .= '<td>' . Telefono($data[$key]) . '</td>'; break; #Periodo académico (Campo particular) #Periodo académico (Campo particular) case 'periodo': $table .= '<td>' . date('Y-', strtotime($data[$key])) . (date('m', strtotime($data[$key])) > 6 ? 2 : 1) . '</td>'; break; } } } else { //var_dump($data[$value]);exit; $table .= '<td>' . $data[$value] . '</td>'; } } if ($action) { $table .= '<td>'; $kview = $controller . '/ver' . $tableName; $kupdate = $controller . '/actualizar' . $tableName; $kprint = $controller . '/imprimir' . $tableName; $keys = ''; if (is_array($id)) { foreach ($id as $ikey => $ids) { if (!is_numeric($ids)) { $keys .= '/' . $data[$ids]; } else { $keys .= '/' . $ids; } } } else { $keys .= '/' . $data[$id]; } //var_dump($keys);exit; if ($view) { $table .= '<a href="' . site_url($kview . $keys) . '" style="font-size:20pt;color: #29a84b" class="fa fa-eye" target="_blank" data-toggle="tooltip" title="Ver más..."></a> '; } if ($print) { $table .= '<a href="' . site_url($kprint . $keys) . '" style="font-size:20pt;color: black" target="_blank" class="fa fa-print" data-toggle="tooltip" title="Imprimir"></a> '; } if ($update && ($data['NIVEL'] != 2 || $nivel)) { $table .= '<a href="' . site_url($kupdate . $keys) . '" target="_blank" style="font-size:20pt;color: #0065c3" class="fa fa-pencil" data-toggle="tooltip" title="Editar"></a> '; } if ($delete && $nivel && $data['NIVEL'] != 2) { $table .= " <a data-id='{$data[$id]}' style='color:#e54040;font-size:20pt;' class='fa fa-trash-o' data-toggle='tooltip' title='Eliminar'></a>"; } ###Check### if ($check) { $table .= "<input type='checkbox' value='" . $data[$id] . "' checked>"; } ###Radio### if ($radio) { $table .= "<input type='radio' name='RADIO' value='" . $data[$id] . "' checked>"; } $table .= '</td>'; } $table .= '</tr>'; } $table .= '</tbody></table>'; return $table; }
<?php echo form_input(['readonly' => true, 'label' => ['text' => 'Tipo de proyecto']], $Info->NOMBRE_TIPO_PROYECTO); ?> <?php if ($this->session->userdata('ADMIN')) { echo form_input(['readonly' => true, 'label' => ['text' => 'Asesor']], $Info->NOMBRE_USUARIO); echo form_input(['readonly' => true, 'label' => ['text' => 'Horario asesoría']], !is_null($Info->HORARIO) ? NombreDia($Info->HORARIO) . ', ' . date('h:i a', strtotime($Info->HORARIO)) : 'No asignado'); } else { echo "<div class='form-group'>\n <label for='' class='col-lg-2 control-label'>Horario asesoría</label>\n\n <div class='col-lg-10'>\n <a target='_blank' class='btn-link' data-toggle='tooltip' title='" . (!is_null($Info->HORARIO) ? 'Ver horarios' : 'Asignar un horario') . "'\n href='" . site_url('proyectos/horarios') . "'><b>" . (!is_null($Info->HORARIO) ? NombreDia($Info->HORARIO) . ', ' . date('h:i a', strtotime($Info->HORARIO)) : 'No asignado') . "</b></a>\n </div>\n </div>"; } ?> <?php echo form_input(['readonly' => true, 'label' => ['text' => 'Periodo']], date('Y-', strtotime($Info->PERIODO)) . (date('m', strtotime($Info->PERIODO)) > 6 ? 2 : 1)); ?> <?php echo form_input(['readonly' => true, 'label' => ['text' => 'Fecha registro', 'col' => 3], 'input' => ['col' => 9]], Momento($Info->FECHA_REGISTRO)); ?> <?php echo br(1); ?> <div class="box"> <div class="box-header bg-gray"> <h3 style="color:#7d7d80;text-align: center"><span class="fa fa-group"></span> Practicantes </h3> </div> <div class="box-body"> <?php echo Component::Table(['columns' => ['Nombre'], 'tableName' => 'practicante', 'id' => 'ID_PRACTICANTE', 'controller' => 'practicantes', 'fields' => ['NOMBRE_PRACTICANTE'], 'dataProvider' => $this->practicantes_model->TraePracticantesPorProyecto($Info->ID_PROYECTO), 'actions' => 'v']); ?> </div> </div>
public function TraeUltimoInicioSesionAdmin() { return @Momento($this->db->query('SELECT FACHA_ULTIMO_INICIO_SESION FROM t_usuarios WHERE NIVEL>0 AND ID_USUARIO=' . $this->session->userdata('ID_USUARIO'))->result()[0]->FACHA_ULTIMO_INICIO_SESION); }
<img src="<?php echo base_url('asesorfotos/' . $user['FOTO']); ?> " width="50" height="50" alt="User Image"> <a class="users-list-name" target="_blank" href="<?php echo ($user['NIVEL'] == 0 ? 'asesores/verasesor/' : 'usuarios/verusuario/') . $user['ID_USUARIO']; ?> "><?php echo $user['NOMBRE']; ?> </a> <span class="users-list-date">creado <?php echo strtolower(Momento($user['FECHA_REGISTRO'])); ?> </span> </li> <?php $c++; if ($c == 8) { break; } } ?> <?php if ($c == 0) { echo '<p> No hay usuarios ni asesores recientes...</p>'; } ?>
<div class="col-md-12 col-lg-push-0"> <!-- Widget: user widget style 1 --> <div class="box box-widget widget-user"> <!-- Add the bg color to the header using any of the bg-* classes --> <div class="widget-user-header bg-aqua-active"> <h3 class="widget-user-username"><?php echo $Info->NOMBRE; ?> </h3> <h5 class="widget-user-desc">Miembro desde, <?php echo Momento($Info->FECHA_REGISTRO); ?> </h5> <h5 class="widget-user-desc">Último inicio de sesión <?php echo Momento($Info->FACHA_ULTIMO_INICIO_SESION); ?> </h5> </div> <div class="widget-user-image"> <img class="img-circle" src="<?php echo base_url('asesorfotos/' . $Info->FOTO); ?> " width="128" height="128" alt="User Avatar"> </div> <div class="box-footer"> <div class="row"> <div class="col-sm-4 border-right"> <div class="description-block"> <h5 class="description-header" style="color: #3878a3"><?php
?> </div> <!-- Notificaxiones de asesorías --> <div class="row"> <?php foreach ($this->seguimientos_model->TraeEvaluacionEstudianteNotificacion(1, 'ap') as $i => $note) { ?> <div class="col-lg-10"> <?php echo Alert(['title' => '¡Acta de asesoría recibida!', 'text' => 'El estudainte <a target="_blank" data-toggle="tooltip" title="Ver practicante" href="practicantes/verpracticante/' . $note->ID_PRACTICANTE . '"><b>' . $note->NOMBRE_PRACTICANTE . '</b></a> ha diligenciado la asesoria de práctica #' . $note->CONSECUTIVO . '   ' . Momento($note->FECHA_FINALIZA) . '</b>']); ?> </div> <?php } ?> </div> <div class="row"> <?php foreach ($this->seguimientos_model->TraeEvaluacionEstudianteNotificacion(0, 'ap') as $i => $note) { ?> <div class="col-lg-10"> <?php echo Alert(['icon' => 'ion-clock', 'type' => 'danger', 'title' => 'En espera', 'text' => 'El estudainte <a target="_blank" data-toggle="tooltip" title="Ver practicante" href="practicantes/verpracticante/' . $note->ID_PRACTICANTE . '"><b>' . $note->NOMBRE_PRACTICANTE . '</b></a> aún no ha diligenciado la asesoria de práctica #' . $note->CONSECUTIVO . ' enviada   ' . Momento($note->FECHA_REGISTRO) . '</b>']); ?> </div> <?php } ?> </div> </section><!-- /.content -->