Viewing file: actualizar_cta_cte.php (1.72 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? session_start(); $pagina_actual="actualizar-rubros"; $categoria_actual="rubros"; require_once("includes/config.php"); require_once("includes/funciones.php");?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento sin título</title> </head>
<body> <? $query = $mysqli->query("TRUNCATE TABLE banking_comprobantes"); $lines = file('extraer/cuentas_corrientes.txt'); $y=0; foreach ($lines as $line_num => $line) { $datos = explode(" ", $line); $ww=0; while ($ww<=3) { $datos[$ww] = str_replace("\n", "", $datos[$ww]); $datos[$ww]=trim($datos[$ww]); $datos[$ww] = str_replace("'", "_",$datos[$ww]); $ww=$ww+1; $fecha=saleamd($datos[0]); $aux=explode(" ",$datos[2]); $tipo=$aux[0]; $letra=$aux[1]; $saldo_cc = $datos[3]; $saldo_cc = str_replace(",", ".",$saldo_cc); } $insertSQL = $mysqli->query("INSERT INTO banking_comprobantes (fecha, id_padron, nombre, total, tipo, letra) VALUES ('$fecha','$datos[1]','".utf8_decode($datos[2])."','$saldo_cc','$tipo','$letra')"); /*if ($y<=30) {echo "INSERT INTO banking_comprobantes (fecha, id_padron, nombre, total, tipo, letra) VALUES ('$fecha','$datos[1]','$datos[2]','$saldo_cc','$tipo','$letra') <br> ";} $y=$y+1;*/ } //fin foreach ?><script language="javascript">location.href = "subir_actualizacion.php?exito=si";</script> <? //echo "INSERT INTO banking_comprobantes (fecha, id_padron, nombre, total, tipo, letra) VALUES ('$fecha','$datos[1]','$datos[2]','$saldo_cc','$tipo','$letra')"?> </body> </html>
|