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