Fucnciona el captcha y el formulario de registro de forma correcta
Se requiere mas verificacion y respaldar el registro, ademas de chequear que no se puedan registrar mas de una vez. Mandar un mail para confirmarle al usuario que se registró ok. Agregar el captcha al formulario de contacto y las verificaciones faltantes
This commit is contained in:
parent
aed93eb2ea
commit
29b37d615f
@ -1,2 +1,5 @@
|
||||
Nombre,Apellido,TipoDoc,Documento,Direccion,Pais,Ciudad,Telefono,Email,Profesión,"Trabaja en",Financiación,"Detalle Financiación"
|
||||
German,Correa,Otro,234,"Salvador Garcia Pintos 1114",Alemania,Montevideo,091432378,german.correa.balier@gmail.com,Estudiante,Primaria,no,
|
||||
German,Correa,Otro,324,"Salvador Garcia Pintos 1114",Uruguay,Montevideo,091432378,german.correa.balier@gmail.com,Profesor,Universidad,si,"Preciso el pow"
|
||||
German,Correa,Otro,324,"Salvador Garcia Pintos 1114",Uruguay,Montevideo,091432378,german.correa.balier@gmail.com,Profesor,Universidad,si,"Preciso el pow"
|
||||
Peter,Capusoto,C.I.,4596793-2,"18 de Julio 1199",Uruguay,Montevideo,123083,mail@example.com,Profesor,Primaria,si,"Preciso 500$ para el pasaje
|
||||
200$ para el almuerzo"
|
||||
|
|
47
contact.html
47
contact.html
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>6to Coloquio Uruguayo de Matémática</title>
|
||||
<title>6to CUM - Contacto</title>
|
||||
<meta name="description" content="website description" />
|
||||
<meta name="keywords" content="website keywords, website keywords" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf8" />
|
||||
@ -12,6 +12,7 @@
|
||||
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="js/app.js"></script>
|
||||
<script src='https://www.google.com/recaptcha/api.js?hl=es'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -22,32 +23,32 @@
|
||||
|
||||
<div id="content" class="col-xs-12 col-sm-8">
|
||||
<h1>Contáctenos</h1>
|
||||
<form id="contactform" action="contact.php" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="nombre">Nombre:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="nombre" id="nombre" placeholder="Juan Perez" required>
|
||||
<form id="contactform" action="contact.php" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="nombre">Nombre:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="nombre" id="nombre" placeholder="Juan Perez" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="email">Email:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="email" class="form-control" name="email" id="email" placeholder="mail@example.com" required>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="email">Email:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="email" class="form-control" name="email" id="email" placeholder="mail@example.com" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="mensage">Mensaje:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="5" name="mensage"
|
||||
id="mensaje" placeholder="Los contacto por...." required></textarea>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="mensage">Mensaje:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="5" name="mensage"
|
||||
id="mensaje" placeholder="Los contacto por...." required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8 text-right">
|
||||
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8 text-right">
|
||||
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<br/>
|
||||
<div id="statusmsg" class="alert alert-success">
|
||||
<strong>Success!</strong> Indicates a successful or positive action.
|
||||
|
36
js/app.js
36
js/app.js
@ -35,24 +35,40 @@ function validateTextarea(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
var ruta = window.location.pathname;
|
||||
|
||||
$("#statusmsg").hide();
|
||||
$("#header").load("snippets/header.html");
|
||||
function loadFragments(){
|
||||
$("#header").load("snippets/header.html",routeMenu);
|
||||
$("#footer").load("snippets/footer.html");
|
||||
$(".sidebar").load("snippets/sidebar.html");
|
||||
$("#menu li a").click(function(){
|
||||
$(this).addClass("selected").siblings().removeClass("selected");
|
||||
});
|
||||
}
|
||||
function routeMenu(){
|
||||
var ruta = window.location.pathname.split(".")[0];
|
||||
$("ul#menu li").removeClass("selected");
|
||||
switch(ruta){
|
||||
case "/":
|
||||
$("li#home").addClass("selected");
|
||||
break;
|
||||
case "/contact":
|
||||
$("li#contacto").addClass("selected");
|
||||
break;
|
||||
case "/register":
|
||||
$("li#registro").addClass("selected");
|
||||
break;
|
||||
case "/location":
|
||||
$("li#mapa").addClass("selected");
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
loadFragments();
|
||||
$("#statusmsg").hide();
|
||||
$('input').focusin(inputvalidate);
|
||||
$('input').focusout(inputvalidate);
|
||||
$('input').keyup(inputvalidate);
|
||||
$("#detallefinan textarea").focusin(validateTextarea);
|
||||
$("#detallefinan textarea").focusout(validateTextarea);
|
||||
$("#detallefinan textarea").keyup(validateTextarea);
|
||||
//$('input:invalid').parents('div.form-group').addClass('has-warning');
|
||||
|
||||
$('#contactform').submit(function(event){
|
||||
$("#statusmsg").hide();
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>6to Coloquio Uruguayo de Matémática</title>
|
||||
<title>6to CUM - Mapa</title>
|
||||
<meta name="description" content="website description" />
|
||||
<meta name="keywords" content="website keywords, website keywords" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf8" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>6to Coloquio Uruguayo de Matémática</title>
|
||||
<title>6to CUM - Registro</title>
|
||||
<meta name="description" content="website description" />
|
||||
<meta name="keywords" content="website keywords, website keywords" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf8" />
|
||||
@ -155,12 +155,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="g-recaptcha" data-sitekey="6LeLxy4UAAAAALcrNXxcOiW1B3QgcfgZ6u4l52kZ"></div>
|
||||
<div class="g-recaptcha col-sm-8 col-sm-offset-2" data-sitekey="6LeLxy4UAAAAALcrNXxcOiW1B3QgcfgZ6u4l52kZ"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8 text-right">
|
||||
<button type="submit" class="btn btn-primary">Registrar</button>
|
||||
</div>
|
||||
<div class="col-sm-8 col-sm-offset-2">
|
||||
<button type="submit" class="btn-lg btn btn-primary">Registrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="statusmsg" class="alert alert-success">
|
||||
|
@ -16,7 +16,7 @@ function verifyCaptcha(){
|
||||
$context = stream_context_create($options);
|
||||
$verify = file_get_contents($url, false, $context);
|
||||
$captcha_success=json_decode($verify);
|
||||
return captcha_success;
|
||||
return $captcha_success;
|
||||
}
|
||||
|
||||
function setheaders() {
|
||||
@ -38,9 +38,7 @@ function registrar($fila) {
|
||||
if($fp){
|
||||
fputcsv($fp,$fila);
|
||||
fclose($fp);
|
||||
exec("git add 2021y22.csv");
|
||||
$cmd = "git commit -m 'Se registra a '".$fila[0]." ".$fila[1]."-".$fila[3];
|
||||
exec($cmd);
|
||||
|
||||
}
|
||||
else{
|
||||
die("unable to open file");
|
||||
|
@ -9,10 +9,10 @@
|
||||
<nav class="navbar navbar-inverse" id="menubar">
|
||||
<div class="container">
|
||||
<ul class="nav navbar-nav" id="menu">
|
||||
<li class="selected"><a href="/">Inicio</a></li>
|
||||
<li><a href="register.html">Registrarse</a></li>
|
||||
<li><a href="location.html">Mapa</a></li>
|
||||
<li><a href="contact.html">Contacto</a></li>
|
||||
<li id="home" class="selected"><a href="/">Inicio</a></li>
|
||||
<li id="registro"><a href="register.html">Registrarse</a></li>
|
||||
<li id="mapa"><a href="location.html">Mapa</a></li>
|
||||
<li id="contacto"><a href="contact.html">Contacto</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -172,10 +172,6 @@ ol li
|
||||
border-radius: 0px;
|
||||
}
|
||||
@media screen and (max-width: 600px){
|
||||
ul#menu{
|
||||
margin:auto!important;
|
||||
float:none!important;
|
||||
}
|
||||
#logo_text h1{font-size:30px;}
|
||||
#logo_text h2{font-size:20px!important;}
|
||||
#logo_text h1 a .logo_init{font-size:60px;}
|
||||
|
Loading…
Reference in New Issue
Block a user