public function guardar() { $noticia = new Noticia($this->input->post('idnoticia')); $usuario = new UsuarioNoticia($this->input->post('idusuario')); $noticia->autor = $this->input->post('autor'); $noticia->fecha = fecha_mysql($this->input->post('fecha')); $noticia->destacada = $this->input->post('destacada'); $noticia->titular = $this->input->post('titular'); $noticia->texto = $this->input->post('texto'); if ($noticia->save($usuario)) { $this->session->set_flashdata('correcto', 'Se han guardado los cambios correctamente'); } redirect('admin/noticias/edicion/' . $noticia->id); }
$prg->header_textcolor = "#FFFFFF"; $prg->body_alignment = "left"; $prg->body_color = "#CCCCCC"; $prg->body_textcolor = "black"; $prg->surrounded = '1'; $sql = "select ticket_number as Ticket, org_name as Satelite, localizador as LOC, gds as GDS, ticket_creado as Fecha, "; $sql .= "paymentmethod as FormaPago, asesor as Asesora, localizador_status as Status_LOC "; $sql .= "from osticket1911.ost_crm where ticket_status_id=3 "; //POR ORG if ($_REQUEST['org']) { $sql .= " AND org_name='" . $_REQUEST['org'] . "' "; } //POR FECHA if ($_REQUEST['desde'] && $_REQUEST['hasta']) { $f1 = fecha_mysql($_REQUEST['desde']); $f2 = fecha_mysql($_REQUEST['hasta']); $sql .= "and CAST(ticket_creado AS DATE)>= '" . $f1 . "' AND CAST(ticket_creado AS DATE)<='" . $f2 . "' "; echo "<div align=center><strong>Mostrando: " . $_REQUEST['org'] . " Desde el " . $_REQUEST['desde'] . " Hasta el " . $_REQUEST['hasta'] . "</strong></div>"; } else { echo "<div align=center><strong>Mostrando: " . $_REQUEST['org'] . " Todos los Registros...</strong></div>"; } $sql .= "order by ticket_number, org_name"; //echo $sql; $res = mysql_query($sql); $prg->mysql_resource = $res; $prg->title = "Listado de Ventas"; $prg->generateReport(); ?> </body> </html>
$nprofesor = $row['no_prof']; $codasig = $row['c_asig']; } elseif ($row['c_asig'] == "2") { $nprofesor = $row['no_prof']; $codasig = "2"; } elseif ($row['c_asig'] == "21") { $nprofesor = $row['no_prof']; $codasig = "21"; } } mysqli_free_result($result); if ($codasig == "") { $nprofesor = $prof_orig; $codasig = $cod_orig; } $result = mysqli_query($db_con, "INSERT INTO FALTAS (CLAVEAL, unidad, NC, FECHA, DIA, HORA, PROFESOR, CODASI, FALTA) VALUES ('{$C_NUMESCOLAR}', '{$T_NOMBRE}', '{$nc_alumno}', '" . fecha_mysql($F_FALASI) . "', '" . strftime("%u", strtotime(fecha_mysql($F_FALASI))) . "', '{$hora_tramo}', '{$nprofesor}', '{$codasig}', '{$tipo_falta}')"); } unset($nprofesor); unset($codasig); } } echo '<span class="text-success">Importado</span></li>'; $draw_html = 1; } } // Eliminamos faltas de alumnos que se han dado de baja en el Centro. mysqli_query($db_con, "delete from FALTAS where nc='0'"); echo '</ul>'; echo '</div>'; echo '<br>'; echo '<a href="importarSeneca.php" class="btn btn-primary">Realizar otra importación</a> ';
$alumno = mysqli_fetch_array($result); if (!$filas > 1) { echo "<span style='color:red'>{$alumnos[$i]} --> {$alumno['1']} - {$alumno['0']}</span><br>"; } $i++; } $reg = $i; if ($reg != $todos[0]) { echo "Faltan alumnos"; } else { echo "CORRECTO!"; } echo "<h2>COMPROBACION DIAS</h2>"; $i = 0; while ($dias[$i] != FALSE) { $dia = fecha_mysql($dias[$i]); $diasem = strftime('%w', strtotime("{$dia}")); $result = mysqli_query($db_con, "SELECT * FROM festivos WHERE fecha='{$dia}'"); $filas = mysqli_num_rows($result); $error = 0; if ($diasem == 0 || $diasem == 6 || $filas > 1) { echo "<span style='color:red'>{$dias[$i]} --> {$diasem} (Es día festivo o fin de semana: (6) Sábado, (0) Domingo)</span><br>"; $error = 1; } $i++; } if (!$error) { echo "CORRECTO!"; } echo "<h2>COMPROBACION TRAMOS</h2>"; $tramos = mysqli_fetch_array(mysqli_query($db_con, "SELECT COUNT(*) FROM tramos"));