remove old csv code

This commit is contained in:
German Correa 2017-12-01 21:32:56 -03:00
parent 379507e346
commit fe1762bf08

View File

@ -22,12 +22,12 @@ function verifyCaptcha(){
return $captcha_success; return $captcha_success;
} }
function verifyExistance($doc,$mail){ /*function verifyExistance($doc,$mail){
$fp = fopen("2021y22.csv", 'r'); $fp = fopen("2021y22.csv", 'r');
fclose($fp); fclose($fp);
} }*/
function setheaders() { /*function setheaders() {
$fp = fopen("2021y22.csv", 'w'); $fp = fopen("2021y22.csv", 'w');
$cabezal = array('Nombre', 'Apellido','TipoDoc','Documento', $cabezal = array('Nombre', 'Apellido','TipoDoc','Documento',
'Direccion','Pais','Ciudad', 'Telefono', 'Email', 'Direccion','Pais','Ciudad', 'Telefono', 'Email',
@ -39,9 +39,9 @@ function setheaders() {
else{ else{
die("unable to open file"); die("unable to open file");
} }
} }*/
function registrar($fila) { /*function registrar($fila) {
$fp = fopen("2021y22.csv", 'a'); $fp = fopen("2021y22.csv", 'a');
if($fp){ if($fp){
fputcsv($fp,$fila); fputcsv($fp,$fila);
@ -58,11 +58,11 @@ function bkpregister(){
$fecha = date("d-m-H:i:s"); $fecha = date("d-m-H:i:s");
$filebkp = "bkp/registro-".$fecha.".bak.csv"; $filebkp = "bkp/registro-".$fecha.".bak.csv";
copy("2021y22.csv",$filebkp); copy("2021y22.csv",$filebkp);
} }*/
$errors = array(); // array to hold validation errors $errors = array(); // array to hold validation errors
$data = array(); // array to pass back data $data = array(); // array to pass back data
$filename = "2021y22";
// validate the variables ====================================================== // validate the variables ======================================================
$data['nombre'] = $_POST['nombre']; $data['nombre'] = $_POST['nombre'];
@ -110,12 +110,8 @@ if ( !empty($errors)) {
} }
else { else {
$data['success'] = true; $data['success'] = true;
//bkpregister();
//$db = new DB();
$db->insert($fila); $db->insert($fila);
/* /*
registrar($fila);
$mail = $data["email"]; $mail = $data["email"];
$nombre = $data["nombre"] . " " . $data["apellido"]; $nombre = $data["nombre"] . " " . $data["apellido"];
$msg = "Hi ". $data["nombre"] ."!\n\n". $msg = "Hi ". $data["nombre"] ."!\n\n".