$esteCampo = "noti"; $atributos['id'] = $esteCampo; $atributos['estilo'] = "demo2 demof"; echo $this->miFormulario->division("inicio", $atributos); unset($atributos); echo "<ul id='lista-noticias'>"; // var_dump($matrizNoticias); if ($matrizNoticias) { foreach ($matrizNoticias as $noticia) { echo "<li>"; $pordefecto = $rutaUrlBloque . "images/silueta.gif"; $imagen = "<img id='foto-noti' "; if ($noticia['noti_img_usr_enlace']) { $imagen .= "src='" . imagenBase64($rutaUrlBloque . "images/" . trim($noticia['noti_img_usr_enlace'])) . "'"; } else { $imagen .= "src='" . imagenBase64($pordefecto) . "'"; } $imagen .= " alt='" . $noticia['noti_usr_remi'] . "' title='" . $noticia['noti_usr_remi'] . "'>"; echo $imagen; $atributos['id'] = 'enlacetitulo'; $atributos['enlace'] = "#"; $atributos['enlaceTitulo'] = "Prueba"; $atributos['enlaceTexto'] = $noticia['noti_nombre']; echo $this->miFormulario->enlace($atributos); echo "<p id='texto'>"; $descrip = trim($noticia['noti_descripcion']); if ($noticia['noti_enlace']) { $descrip = str_replace("[", "<a id='enlaceinterno' href='" . trim($noticia['noti_enlace']) . "'>", $descrip); } else { $descrip = str_replace("[", "<a id='enlaceinterno' href=''>", $descrip); }
public function uploadImagen_photo($id, $e) { if ($this->input->post('photop') != 0) { $codeBase64 = $this->input->post('protocapture'); if ($codeBase64 && $codeBase64 != '') { $this->load->helper('base64'); if ($e) { rename('./images/employees/' . $id . '.jpg', './images/employees/temp_' . $id . '.jpg'); } if (imagenBase64('employees/' . $id . '.jpg', $codeBase64)) { if ($e) { unlink('./images/employees/temp_' . $id . '.jpg'); } return true; } else { if ($e) { rename('./images/employees/temp_' . $id . '.jpg', './images/employees/' . $id . '.jpg'); } return false; } } return 'no imagen'; } else { //carga de imagen $config['upload_path'] = './images/employees'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '1000000'; $config['max_width'] = '3600'; $config['max_height'] = '2800'; $config['file_name'] = $id . '.jpg'; $this->load->library('upload', $config); $this->upload->initialize($config); try { $nameLogo['file_name'] = ''; if ($e) { rename($config['upload_path'] . '/' . $config['file_name'], $config['upload_path'] . '/temp_' . $config['file_name']); } if ($this->upload->do_upload('photo_e')) { $nameLogo = $this->upload->data(); if ($e) { unlink($config['upload_path'] . '/temp_' . $config['file_name']); } $data = ['upload_status' => 1, 'upload_message' => $nameLogo['file_name']]; } else { if ($e) { rename($config['upload_path'] . '/temp_' . $config['file_name'], $config['upload_path'] . '/' . $config['file_name']); } if ($this->upload->display_errors(true) == '1') { $data = ['upload_status' => 2, 'upload_message' => 'vacio']; } else { $data = ['upload_status' => 0, 'upload_message' => $this->upload->display_errors(false, '', '')]; } } } catch (Exception $e) { $data = ['upload_status' => -1, 'upload_message' => 'no se cargo']; $nameLogo['file_name'] = ''; } if ($nameLogo['file_name'] != '') { //redimension $configR['image_library'] = 'gd2'; $configR['source_image'] = $config['upload_path'] . '/' . $config['file_name']; $configR['create_thumb'] = false; $configR['maintain_ratio'] = false; $configR['width'] = 140; $configR['height'] = 140; $this->load->library('image_lib', $configR); $this->image_lib->resize(); //fin redimension // $logo = $nameLogo['file_name']; } // }else{ $logo = $this->input->post('logo_name'); } return $data; } }
?> <div class="col-lg-2"> </div> <div class="row"> <div class="col-xs-12 col-sm-10 col-lg-8"> <table id="table-datos"> <caption><h4 class="nombre"><?php echo $info_nombre; ?> </h4></caption> <tbody> <tr> <td class="usuario" rowspan="9"> <img id="foto-perfil" src="<?php echo imagenBase64($url_foto_perfil); ?> " alt="Perfil" style="width: 170px; height: 170px;" class="foto-user img-responsive img-rounded profilepicture" /> </td> </tr> <tr> <td class="tipo-info">Usuario:</td> <td class="info-user"><?php echo $info_usuario; ?> </td> </tr> <tr> <td class="tipo-info">Correo:</td> <td class="info-user"><?php echo $info_correo;