Merge branch 'add_bs3'

Conflicts:
	snippets/header.html
	style/style.css
This commit is contained in:
root 2017-09-01 15:20:22 -03:00
commit aed93eb2ea
19 changed files with 1278 additions and 278 deletions

2
2021y22 Normal file
View File

@ -0,0 +1,2 @@
Nombre,Apellido,TipoDoc,Documento,Direccion,Pais,Ciudad,Telefono,Email,Profesión,Financiación,"Detalle Financiación"
German,Correa,C.I,4596793-2,"Salvador Garcia Pintos 1114",Uruguay,Montevideo,091432378,german.correa.balier@gmail.com,Estudiante,no,

2
2021y22.csv Normal file
View File

@ -0,0 +1,2 @@
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,
1 Nombre Apellido TipoDoc Documento Direccion Pais Ciudad Telefono Email Profesión Trabaja en Financiación Detalle Financiación
2 German Correa Otro 234 Salvador Garcia Pintos 1114 Alemania Montevideo 091432378 german.correa.balier@gmail.com Estudiante Primaria no

46
contact-old.html Normal file
View File

@ -0,0 +1,46 @@
<!DOCTYPE HTML>
<html>
<head>
<title>6to Coloquio Uruguayo de Matémática</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" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<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>
</head>
<body>
<div id="main">
<header id="header"></div>
<div id="site_content" class="container">
<div class="row">
<div id="content" class="col-xs-12 col-sm-8">
<h1>Contáctenos</h1>
<form id="contactform" action="contact.php" method="post">
<div class="form_settings">
<p><span>Nombre</span><input class="contact" type="text" name="nombre" value="" required/></p>
<p><span>Email:</span><input class="contact" type="email" name="email" value="" required/></p>
<p><span>Mensage</span><textarea class="contact textarea" rows="8" cols="50" name="mensage" required></textarea></p>
<p style="padding-top: 15px"><span>&nbsp;</span><input class="submit" type="submit" name="contact_submitted" value="submit" /></p>
</div>
</form>
<br/>
<div id="statusmsg" class="alert alert-success">
<strong>Success!</strong> Indicates a successful or positive action.
</div>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
</div>
<footer id="footer">
</footer>
</div>
</body>
</html>

View File

@ -2,34 +2,50 @@
<html>
<head>
<title>6to Coloquio Uruguayo de Matémática-Contacto</title>
<meta name="description" content="6to Coloquio uruguayo de matemática" />
<meta name="keywords" content="6to coloquio uruguay matemática" />
<title>6to Coloquio Uruguayo de Matémática</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" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<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>
</head>
<body>
<div id="main">
<div id="header">
<header id="header"></div>
<div id="site_content" class="container">
<div class="row">
</div>
<div id="site_content">
<div class="sidebar">
</div>
<div id="content">
<div id="content" class="col-xs-12 col-sm-8">
<h1>Contáctenos</h1>
<form id="contactform" action="contact.php" method="post">
<div class="form_settings">
<p><span>Nombre</span><input class="contact" type="text" name="nombre" value="" required/></p>
<p><span>Email:</span><input class="contact" type="email" name="email" value="" required/></p>
<p><span>Mensage</span><textarea class="contact textarea" rows="8" cols="50" name="mensage" required></textarea></p>
<p style="padding-top: 15px"><span>&nbsp;</span><input class="submit" type="submit" name="contact_submitted" value="submit" /></p>
<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 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 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 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>
</form>
<br/>
@ -37,11 +53,12 @@
<strong>Success!</strong> Indicates a successful or positive action.
</div>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
<div id="footer">
<p><a href="index.html">Home</a> | <a href="examples.html">Examples</a> | <a href="page.html">A Page</a> | <a href="another_page.html">Another Page</a> | <a href="contact.html">Contact Us</a></p>
<p>Copyright &copy; night_sky_2 | <a href="http://validator.w3.org/check?uri=referer">HTML5</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> | <a href="http://www.html5webtemplates.co.uk">Website templates</a></p>
</div>
<footer id="footer">
</footer>
</div>
</body>
</html>

BIN
img/afiche.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 KiB

BIN
img/pmu15-tapa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -6,45 +6,71 @@
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=utf8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<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>
</head>
<body>
<div id="main">
<div id="header"></div>
<div id="site_content">
<div id="sidebar" class="sidebar"></div>
<div id="content">
<h1><strong>Bienvenidos al 6º Coloquio Uruguayo de Matemática 2017</strong></h1>
<!--<p>This standards compliant, simple, fixed width website template is released as an 'open source' design (under a <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 Licence</a>), which means that you are free to download and use it for anything you want (including modifying and amending it). All I ask is that you leave the 'design from HTML5webtemplates.co.uk' link in the footer of the template, but other than that...</p>
<p>This template is written entirely in <strong>HTML5</strong> and <strong>CSS</strong>, and can be validated using the links in the footer.</p>
<p>You can view more free HTML5 web templates <a href="http://www.html5webtemplates.co.uk">here</a>.</p>
<p>This template is a fully functional 5 page website, with an <a href="examples.html">examples</a> page that gives examples of all the styles available with this design.</p>
<h2>Browser Compatibility</h2>
<p>This template has been tested in the following browsers:</p>
<ul>
<li>Internet Explorer 8</li>
<li>FireFox 3</li>
<li>Google Chrome 13</li>
</ul>-->
<header id="header"></header>
<div id="site_content" class="container">
<div class="row">
<div id="content" class="col-xs-12 col-sm-8">
<h1 id="welcome"><strong>Bienvenidos!</strong></h1>
<h2>Comité organizador</h2>
<div class="col-xs-12">
<h3>El Coloquio está dirigidio a:</h3>
<ul>
<li>Viviana Gubitosi</li>
<li>Juliana Xavier</li>
<li>Elisa Rocha</li>
<li>Ezequiel Maderna</li>
<li>Martín Reiris</li>
<li>Investigadores</li>
<li>Especialistas afines</li>
<li>Estudiantes de grado y postgrado de matemática</li>
<li>Estudiantes IPA-CEIP</li>
<li>Docentes</li>
<li>Maestros</li>
</ul>
<h3>Actividades académicas:</h3>
<ul>
<li>Cursos para docentes</li>
<li>Cursos para estudiantes de grado y posgrado</li>
<li>Conferencias de investigación</li>
</ul>
<p>El evento es de carácter gratuito y se entregará certificado de participación.</p>
<p>
<strong>Organizadores: </strong>Viviana Gubitosi
Juliana Xavier
Elisa Rocha
Ezequiel Maderna
Martín Reiris
</p>
<p>
A 20 años de la creación del Centro de Matemática este propuso comenzar a realizar un evento periódico que promoviera el desarrollo de la investigación en Matemática y a su vez estimulara y organizara el estudio de esta tanto a nivel de grado como de posgrado e influyera en su desarrollo en todos sus niveles. Así fue que en el año 2007 el CMAT en conjunto con el IMERL comenzó a organizar está serie de Coloquios bianuales de Matemática orientados al público matemático en general, sean investigadores, estudiantes de grado y posgrado de matemática, docentes universitarios y de secundaria, estudiantes de profesorado (IPA, CERP), etc. El evento es de carácter gratuito y cuenta con cursos para docentes, para estudiantes de grado y posgrado y varias conferencias dictadas por investigadores tanto nacionales como invitados extranjeros.
</p>
<div class="col-xs-12">
<div class="media">
<div class="media-left media-top">
<img src="img/pmu15-tapa.png" class="media-object" style="width:110px">
</div>
<div class="media-body">
<h4 class="media-heading">Publicaciones Matemática del Uruguay (PMU)</h4>
<p>Los Coloquios se publican regularmente en las PMU.</p>
</div>
</div>
</div>
<div id="footer">
<p><a href="index.html">Home</a> | <a href="examples.html">Examples</a> | <a href="page.html">A Page</a> | <a href="another_page.html">Another Page</a> | <a href="contact.html">Contact Us</a></p>
<p>Copyright &copy; night_sky_2 | <a href="http://validator.w3.org/check?uri=referer">HTML5</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> | <a href="http://www.html5webtemplates.co.uk">Website templates</a></p>
</div>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
</div>
<footer id="footer">
</footer>
</div>
</body>
</html>

151
js/app.js
View File

@ -11,13 +11,53 @@ function showmsg(msgTxt,ok){
}
$("#statusmsg").show();
}
function inputvalidate(){
var parent = $(this).parents("div.form-group");
if($(this).is(":invalid"))
parent.addClass("has-error");
else{
parent.removeClass("has-error");
//parent.removeClass("has-warning");
parent.addClass("has-success");
}
}
function validateTextarea(){
if($(this).val() == ""){
//$('#detallefinan').removeClass("has-warning");
$('#detallefinan').addClass("has-error");
$("#detallefinan textarea").tooltip("hide");
$("#detallefinan textarea").tooltip("destroy");
}
else{
//$('#detallefinan').removeClass("has-warning");
$('#detallefinan').removeClass("has-error");
$('#detallefinan').addClass("has-success");
}
}
$(document).ready(function(){
var ruta = window.location.pathname;
$("#statusmsg").hide();
$("#header").load("snippets/header.html");
$("#footer").load("snippets/footer.html");
$(".sidebar").load("snippets/sidebar.html");
$("#menu li a").click(function(){
$(this).addClass("selected").siblings().removeClass("selected");
});
$('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();
event.preventDefault();
var post = $.post('contact.php', $(this).serialize());
post.done(function(data){
data = $.parseJSON(data);
@ -36,34 +76,116 @@ $(document).ready(function(){
});
});
$("#detallefinan").hide();
$("#detallefinan textarea").val("");
$('input:radio[name="financiacion"]').change(function(){
if($(this).is(':checked') && $(this).val() == "si"){
$("#detallefinan").show();
$('#detallefinan textarea').prop('required',true);
$("#detallefinan textarea").addClass("has-error");
}
else{
else
$("#detallefinan").hide();
$('#detallefinan textarea').prop('required',false);
}
});
$('#doctype').change(function(){
if(this.value == "C.I"){
$('#txtdocnro').attr('placeholder',"1234567-0");
}
if(this.value == "PSP"){
$('#txtdocnro').attr('placeholder',"ABA-11125-444");
}
if(this.value == "Tipo:"){
$('#txtdocnro').attr('placeholder',"Seleccion un tipo de documento");
}
var tipodoc;
$('#tipodoc li a').click(function(event){
event.preventDefault();
$('#btntipodoc').tooltip("hide");
$('btnpais').tooltip("destroy");
tipodoc = $(this).text();
$("#btntipodoc").text($(this).text());
$("#btntipodoc").val($(this).text());
if(tipodoc == "Otro"){
$("#txtdocnro").attr('placeholder', 'Escriba su documento');
$("#txtdocnro").removeAttr('pattern');
}
if(tipodoc == "C.I."){
$("#txtdocnro").attr('placeholder', '1234567-0');
$("#txtdocnro").attr('pattern', '[0-9]{5,7}-[0-9]');
}
});
var pais;
$('#lstpais li a').click(function(event){
event.preventDefault();
pais = $(this).text();
$('#btnpais').tooltip("hide");
$('btnpais').tooltip("destroy");
$("#btnpais").text($(this).text());
$("#btnpais").val($(this).text());
});
var trabaja;
$('#lsttrabaja li a').click(function(event){
event.preventDefault();
trabaja = $(this).text();
$('#btntrabaja').tooltip("hide");
$('btnpais').tooltip("destroy");
$("#btntrabaja").text($(this).text());
$("#btntrabaja").val($(this).text());
});
$('#registerform').submit(function(event){
var fail = false;
$("#statusmsg").hide();
event.preventDefault();
if(tipodoc == null){
$('#btntipodoc').tooltip({
"title":"Seleccione Tipo de Documento",
"html":true,
"pacement":"auto left",
"trigger":"manual",
"delay":{"show":100,"hide":2000}
});
$('#btntipodoc').tooltip("show");
fail=true;
}
if(pais == null){
$('#btnpais').tooltip({
"title":"Seleccione País",
"html":true,
"pacement":"auto left",
"trigger":"manual",
"delay":{"show":100,"hide":2000}
});
$('#btnpais').tooltip("show");
fail=true;
}
if(trabaja == null){
$('#btntrabaja').tooltip({
"title":"Especifique donde trabaja",
"html":true,
"pacement":"auto left",
"trigger":"manual",
"delay":{"show":100,"hide":2000}
});
$('#btntrabaja').tooltip("show");
fail=true;
}
if($("#detallefinan textarea").val()=="" &&
$('input:radio[name="financiacion"]:checked').val()=="si"){
$("#detallefinan textarea").tooltip({
"title":"Escriba el detalle",
"html":true,
"pacement":"auto left",
"trigger":"manual"
});
$("#detallefinan textarea").tooltip("show");
fail=true;
}
if(!fail){
$("#txtpais").val(pais);
$("#txttipodoc").val(tipodoc);
$("#txttrabaja").val(trabaja);
console.log($(this).serialize());
var post = $.post('register.php', $(this).serialize());
post.done(function(data){
console.log(data);
data = $.parseJSON(data);
if(data.success){
showmsg(data.message,true);
@ -81,5 +203,6 @@ $(document).ready(function(){
console.log(error)
});
}
});
});

277
lib/recaptchalib.php Normal file
View File

@ -0,0 +1,277 @@
<?php
/*
* This is a PHP library that handles calling reCAPTCHA.
* - Documentation and latest version
* http://recaptcha.net/plugins/php/
* - Get a reCAPTCHA API Key
* https://www.google.com/recaptcha/admin/create
* - Discussion group
* http://groups.google.com/group/recaptcha
*
* Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
* AUTHORS:
* Mike Crawford
* Ben Maurer
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* The reCAPTCHA server URL's
*/
define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
/**
* Encodes the given data into a query string format
* @param $data - array of string elements to be encoded
* @return string - encoded request
*/
function _recaptcha_qsencode ($data) {
$req = "";
foreach ( $data as $key => $value )
$req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
// Cut the last '&'
$req=substr($req,0,strlen($req)-1);
return $req;
}
/**
* Submits an HTTP POST to a reCAPTCHA server
* @param string $host
* @param string $path
* @param array $data
* @param int port
* @return array response
*/
function _recaptcha_http_post($host, $path, $data, $port = 80) {
$req = _recaptcha_qsencode ($data);
$http_request = "POST $path HTTP/1.0\r\n";
$http_request .= "Host: $host\r\n";
$http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
$http_request .= "Content-Length: " . strlen($req) . "\r\n";
$http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
$http_request .= "\r\n";
$http_request .= $req;
$response = '';
if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
die ('Could not open socket');
}
fwrite($fs, $http_request);
while ( !feof($fs) )
$response .= fgets($fs, 1160); // One TCP-IP packet
fclose($fs);
$response = explode("\r\n\r\n", $response, 2);
return $response;
}
/**
* Gets the challenge HTML (javascript and non-javascript version).
* This is called from the browser, and the resulting reCAPTCHA HTML widget
* is embedded within the HTML form it was called from.
* @param string $pubkey A public key for reCAPTCHA
* @param string $error The error given by reCAPTCHA (optional, default is null)
* @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
* @return string - The HTML to be embedded in the user's form.
*/
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
if ($pubkey == null || $pubkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($use_ssl) {
$server = RECAPTCHA_API_SECURE_SERVER;
} else {
$server = RECAPTCHA_API_SERVER;
}
$errorpart = "";
if ($error) {
$errorpart = "&amp;error=" . $error;
}
return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>';
}
/**
* A ReCaptchaResponse is returned from recaptcha_check_answer()
*/
class ReCaptchaResponse {
var $is_valid;
var $error;
}
/**
* Calls an HTTP POST function to verify if the user's guess was correct
* @param string $privkey
* @param string $remoteip
* @param string $challenge
* @param string $response
* @param array $extra_params an array of extra variables to post to the server
* @return ReCaptchaResponse
*/
function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
{
if ($privkey == null || $privkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($remoteip == null || $remoteip == '') {
die ("For security reasons, you must pass the remote ip to reCAPTCHA");
}
//discard spam submissions
if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
$recaptcha_response = new ReCaptchaResponse();
$recaptcha_response->is_valid = false;
$recaptcha_response->error = 'incorrect-captcha-sol';
return $recaptcha_response;
}
$response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
array (
'privatekey' => $privkey,
'remoteip' => $remoteip,
'challenge' => $challenge,
'response' => $response
) + $extra_params
);
$answers = explode ("\n", $response [1]);
$recaptcha_response = new ReCaptchaResponse();
if (trim ($answers [0]) == 'true') {
$recaptcha_response->is_valid = true;
}
else {
$recaptcha_response->is_valid = false;
$recaptcha_response->error = $answers [1];
}
return $recaptcha_response;
}
/**
* gets a URL where the user can sign up for reCAPTCHA. If your application
* has a configuration page where you enter a key, you should provide a link
* using this function.
* @param string $domain The domain where the page is hosted
* @param string $appname The name of your application
*/
function recaptcha_get_signup_url ($domain = null, $appname = null) {
return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
}
function _recaptcha_aes_pad($val) {
$block_size = 16;
$numpad = $block_size - (strlen ($val) % $block_size);
return str_pad($val, strlen ($val) + $numpad, chr($numpad));
}
/* Mailhide related code */
function _recaptcha_aes_encrypt($val,$ky) {
if (! function_exists ("mcrypt_encrypt")) {
die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
}
$mode=MCRYPT_MODE_CBC;
$enc=MCRYPT_RIJNDAEL_128;
$val=_recaptcha_aes_pad($val);
return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
}
function _recaptcha_mailhide_urlbase64 ($x) {
return strtr(base64_encode ($x), '+/', '-_');
}
/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
function recaptcha_mailhide_url($pubkey, $privkey, $email) {
if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
"you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
}
$ky = pack('H*', $privkey);
$cryptmail = _recaptcha_aes_encrypt ($email, $ky);
return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
}
/**
* gets the parts of the email to expose to the user.
* eg, given johndoe@example,com return ["john", "example.com"].
* the email is then displayed as john...@example.com
*/
function _recaptcha_mailhide_email_parts ($email) {
$arr = preg_split("/@/", $email );
if (strlen ($arr[0]) <= 4) {
$arr[0] = substr ($arr[0], 0, 1);
} else if (strlen ($arr[0]) <= 6) {
$arr[0] = substr ($arr[0], 0, 3);
} else {
$arr[0] = substr ($arr[0], 0, 4);
}
return $arr;
}
/**
* Gets html to display an email address given a public an private key.
* to get a key, go to:
*
* http://www.google.com/recaptcha/mailhide/apikey
*/
function recaptcha_mailhide_html($pubkey, $privkey, $email) {
$emailparts = _recaptcha_mailhide_email_parts ($email);
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
}
?>

38
location.html Normal file
View File

@ -0,0 +1,38 @@
<!DOCTYPE HTML>
<html>
<head>
<title>6to Coloquio Uruguayo de Matémática</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" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<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>
</head>
<body>
<div id="main">
<header id="header"></header>
<div id="site_content" class="container">
<div class="row">
<div id="content" class="col-xs-12 col-sm-8">
<h1><strong>Lugar del evento:</strong></h1>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3271.5742234352!2d-56.16905248474392!3d-34.91713308037947!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x959f81a27b71199f%3A0x4ece30db435561f!2sEdificio+Polifuncional+%22Jose+Luis+Massera%22%2C+Senda+Nelson+Landoni+631%2C+11200+Montevideo!5e0!3m2!1ses!2suy!4v1504130822964" width="500" height="400" frameborder="0" style="border:0" allowfullscreen></iframe>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
</div>
<footer id="footer">
</footer>
</div>
</body>
</html>

85
register-old.html Normal file
View File

@ -0,0 +1,85 @@
<!DOCTYPE HTML>
<html>
<head>
<title>6to Coloquio Uruguayo de Matémática</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" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<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>
</head>
<body>
<div id="main">
<header id="header"></div>
<div id="site_content" class="container">
<div class="row">
<div id="content" class="col-xs-12 col-sm-8">
<h1>Registrarse</h1>
<form id="registerform" action="register.php" method="post">
<div class="form_settings">
<p class="inline-input">
<span>Nombre</span>
<!--bel for="nombre" class="control-label">Nombre</label>-->
<input placeholder="Juan" name="nombre" type="text" class="form-control" id="nombre" required>
<label for="apellido" class="control-label">Apellido</label>
<input name="apellido" placeholder="Rodriguez" type="text" class="form-control" id="apellido" required>
</p>
<p class="inline-input">
<span>Documento:</span>
<select class="small" name="doctype" required id="doctype">
<option>C.I</option>
<option>Otro</option>
</select>
<label for="docnro" class="control-label">Nro.</label>
<input type="text" id="txtdocnro" name="docnro" placeholder="1234567-0" required>
</p>
<p>
<span>Dirección:</span>
<input name="dir" placeholder="18 de Julio 1544" type="text" name="dir" required>
</p>
<p class="inline-input">
<span>Pais: </span>
<!--<label for="pais" class="control-label">Pais</label>-->
<input placeholder="Uruguay" type="text" class="form-control" name="pais" required>
<label for="estado" class="control-label">Ciudad</label>
<input placeholder="Montevideo" type="text" name="ciudad" required>
</p>
<p><span>Teléfono:</span><input placeholder="099 123 456" class="contact" type="text" name="tel" required /></p>
<p><span>Email:</span><input placeholder="mail@example.com" class="contact" type="email" name="email" value="" required/></p>
<p><span>Profesión:</span><input placeholder="Estudiante, Docente, Profesor" class="contact" type="text" name="profesion" required/></p>
<p>
<span style="width:150px;">Precisa financiación?</span>
<label>Si</label><input type="radio" name="financiacion" value="si" id="sifinan"/>
<label>No</label><input type="radio" checked="True" name="financiacion" value="no" id="nofinan"/>
</p>
<br/>
<p id="detallefinan">
<span>Detalle, con estimación de costo:</span>
<textarea class="contact textarea" type="text" rows="8" cols="50" name="detallefinan"></textarea>
</p>
<p style="padding-top: 15px"><span>&nbsp;</span><input class="submit" type="submit" name="contact_submitted" value="submit" /></p>
</div>
</form>
<div id="statusmsg" class="alert alert-success">
<strong>Success!</strong> Indicates a successful or positive action.
</div>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
</div>
<footer id="footer">
</footer>
</div>
</body>
</html>

View File

@ -2,90 +2,180 @@
<html>
<head>
<title>6to Coloquio Uruguayo de Matémática-Registro</title>
<title>6to Coloquio Uruguayo de Matémática</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" />
<!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<!-- Latest compiled and minified JavaScript
<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 type="text/javascript" src="js/app.js"></script>
</head>
<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>
<div id="main">
<div id="header">
</div>
<div id="site_content">
<div class="sidebar">
</div>
<div id="content">
<header id="header"></header>
<div id="site_content" class="container">
<div class="row">
<div id="content" class="col-xs-12 col-sm-8">
<h1>Registrarse</h1>
<form id="registerform" action="register.php" method="post">
<div class="form_settings">
<p class="inline-input">
<span>Nombre</span>
<!--bel for="nombre" class="control-label">Nombre</label>-->
<input placeholder="Juan" name="nombre" type="text" class="form-control" id="nombre" required>
<label for="apellido" class="control-label">Apellido</label>
<input name="apellido" placeholder="Rodriguez" type="text" class="form-control" id="apellido" required>
</p>
<p class="inline-input">
<span>Documento:</span>
<form id="registerform" action="register.php" method="post" class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2" for="txtnombre">Nombre:</label>
<div class="col-sm-8">
<input id="txtnombre" class="form-control" name="nombre"
placeholder="Juan" type="text" pattern="^[a-zA-Z][a-zA-Z\s\-.'`áéíóú]*[a-zA-Z]$" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtapellido">Apellido:</label>
<div class="col-sm-8">
<input id="txtapellido" class="form-control" name="apellido"
placeholder="Perez" type="text" pattern="^[a-zA-Z][a-zA-Z\s\-.'`áéíóú]*[a-zA-Z]$" required>
</div>
</div>
<!-- Selector de Documento mas nro-->
<div class="form-group row">
<label class="col-sm-2 control-label" for="txtdocnro">Documento:</label>
<div class="col-sm-8">
<div class="input-group">
<div class="input-group-btn">
<button id="btntipodoc" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tipo <span class="caret"></span></button>
<ul id="tipodoc" class="dropdown-menu">
<li><a href="#">C.I.</a></li>
<li><a href="#">Otro</a></li>
<input id="txttipodoc" name="doctype" type="hidden">
</ul>
</div><!-- /btn-group -->
<select class="small" name="doctype" required id="doctype">
<option>Tipo:</option>
<option>C.I</option>
<option>PSP</option>
</select>
<label for="docnro" class="control-label">Nro.</label>
<input placeholder="Seleccione Tipo.. " type="text" id="txtdocnro" name="docnro" required>
</p>
<p>
<span>Dirección:</span>
<input name="dir" placeholder="18 de Julio 1544" type="text" name="dir" required>
</p>
<p class="inline-input">
<span>Pais: </span>
<!--<label for="pais" class="control-label">Pais</label>-->
<input placeholder="Uruguay" type="text" class="form-control" name="pais" required>
<label for="estado" class="control-label">Ciudad</label>
<input placeholder="Montevideo" type="text" name="ciudad" required>
</p>
<p><span>Teléfono:</span><input placeholder="099 123 456" class="contact" type="text" name="tel" required /></p>
<p><span>Email:</span><input placeholder="mail@example.com" class="contact" type="email" name="email" value="" required/></p>
<p><span>Profesión:</span><input placeholder="Profesor" class="contact" type="text" name="profesion" required/></p>
<input id="txtdocnro" name="docnro" class="form-control"
placeholder="Seleccione Tipo de Documento..." type="text" required>
</div><!-- /input-group -->
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 control-label" for="txtdir">Pais:</label>
<div class="col-sm-2">
<button id="btnpais" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Pais <span class="caret"></span></button>
<ul id="lstpais" class="dropdown-menu">
<li><a href="#">Uruguay</a></li>
<li><a href="#">Alemania</a></li>
<li><a href="#">Austria</a></li>
<li><a href="#">Argentina</a></li>
<li><a href="#">Bolivia</a></li>
<li><a href="#">Brasil</a></li>
<li><a href="#">Canadá</a></li>
<li><a href="#">Chile</a></li>
<li><a href="#">Colombia</a></li>
<li><a href="#">Ecuador</a></li>
<li><a href="#">España</a></li>
<li><a href="#">Estados Unidos</a></li>
<li><a href="#">Francia</a></li>
<li><a href="#">Inglaterra</a></li>
<li><a href="#">Italia</a></li>
<li><a href="#">México</a></li>
<li><a href="#">Paraguay</a></li>
<li><a href="#">Perú</a></li>
<li><a href="#">Suiza</a></li>
<li><a href="#">Venezuela</a></li>
<li><a href="#">Otro</a></li>
</ul>
<input id="txtpais" name="pais" type="hidden">
</div>
<label class="col-sm-2 control-label" for="txtciudad">Ciudad:</label>
<div class="col-sm-4">
<input id="txtciudad" name="ciudad" class="form-control"
placeholder="Montevideo" type="text" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtdir">Direccion:</label>
<div class="col-sm-8">
<input id="txtdir" class="form-control" name="dir"
placeholder="18 de Julio 1432 apto 302" type="text" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtel">Telefono:</label>
<div class="col-sm-8">
<input id="txttel" class="form-control" name="tel"
placeholder="099123456" type="text" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtmail">Email:</label>
<div class="col-sm-8">
<input id="txtmail" class="form-control" name="email"
placeholder="mail@example.com" type="email" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtprof">Profesión:</label>
<div class="col-sm-8">
<input id="txtprof" class="form-control" name="profesion"
placeholder="Profesor, Docente o Estudiante, etc" type="text" pattern="[a-zA-Z]*" required>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 control-label" for="txttrabaja">Trabaja en:</label>
<div class="col-sm-8">
<button id="btntrabaja" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Seleccione <span class="caret"></span></button>
<ul id="lsttrabaja" class="dropdown-menu">
<li><a href="#">Primaria</a></li>
<li><a href="#">Secundaria</a></li>
<li><a href="#">Universidad</a></li>
<li><a href="#">UTU</a></li>
<li><a href="#">UTEC</a></li>
<li><a href="#">IPA/CERP</a></li>
<li><a href="#">Sector Privado</a></li>
<li><a href="#">Sector Público</a></li>
<li><a href="#">No trabaja</a></li>
</ul>
<input id="txttrabaja" name="trabaja" type="hidden">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="rdfinan">Financiación?</label>
<div class="col-sm-8">
<label class="radio-inline"><input id="sifinan" type="radio" name="financiacion" value="si"></label>
<label class="radio-inline"><input id="nofinan" type="radio" checked="true" name="financiacion" value="no">No</label>
</div>
</div>
<div id="detallefinan" class="form-group">
<label class="control-label col-sm-2" for="detallefinan">Detalle estimación de costo:</label>
<div class="col-sm-8">
<textarea class="form-control" name="detallefinan" row="10" style="height:200px;">
</textarea>
<p>
<span style="width:150px;">Precisa financiación?</span>
<label>Si</label><input type="radio" name="financiacion" value="si" id="sifinan"/>
<label>No</label><input type="radio" checked="True" name="financiacion" value="no" id="nofinan"/>
</p>
<br/>
<p id="detallefinan">
<span>Detalle, con estimación de costo:</span>
<textarea class="contact textarea" type="text" rows="8" cols="50" name="detallefinan"></textarea>
</p>
<p style="padding-top: 15px"><span>&nbsp;</span><input class="submit" type="submit" name="contact_submitted" value="submit" /></p>
</div>
</div>
<div class="form-group">
<div class="g-recaptcha" 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>
</form>
<div id="statusmsg" class="alert alert-success">
<strong>Success!</strong> Indicates a successful or positive action.
</div>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
<div id="footer">
<p><a href="index.html">Home</a> | <a href="examples.html">Examples</a> | <a href="page.html">A Page</a> | <a href="another_page.html">Another Page</a> | <a href="contact.html">Contact Us</a></p>
<p>Copyright &copy; night_sky_2 | <a href="http://validator.w3.org/check?uri=referer">HTML5</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> | <a href="http://www.html5webtemplates.co.uk">Website templates</a></p>
</div>
<footer id="footer">
</footer>
</div>
</div>
</body>
</html>

View File

@ -1,25 +1,58 @@
<?php
// process.php
$errors = array(); // array to hold validation errors
$data = array(); // array to pass back data
function verifyCaptcha(){
$url = 'https://www.google.com/recaptcha/api/siteverify';
$data = array(
'secret' => '6LeLxy4UAAAAABClplWLJUjZ1_nhX_-SI7CuNcm8',
'response' => $_POST["g-recaptcha-response"]
);
$options = array(
'http' => array (
'header' => 'Content-Type: application/x-www-form-urlencoded\r\n',
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$verify = file_get_contents($url, false, $context);
$captcha_success=json_decode($verify);
return captcha_success;
}
function setheaders() {
$fp = fopen('registro.csv', 'w');
$fp = fopen("2021y22.csv", 'w');
$cabezal = array('Nombre', 'Apellido','TipoDoc','Documento',
'Direccion','Pais','Ciudad', 'Telefono', 'Email',
'Profesión','Financiación','Detalle Financiación');
'Profesión','Trabaja en','Financiación','Detalle Financiación');
if($fp){
fputcsv($fp,$cabezal);
fclose($fp);
}
function registrar($fila){
$fp = fopen('registro.csv', 'w');
fputcsv($fp,$fila);
fclose($fp);
else{
die("unable to open file");
}
}
function registrar($fila) {
$fp = fopen("2021y22.csv", 'a');
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");
}
}
$errors = array(); // array to hold validation errors
$data = array(); // array to pass back data
$filename = "2021y22";
// validate the variables ======================================================
// if any of these variables don't exist, add an error to our $errors array
$data['nombre'] = $_POST['nombre'];
$data['apellido'] = $_POST['apellido'];
$data['tipodoc'] = $_POST['doctype'];
@ -30,6 +63,7 @@ function registrar($fila){
$data['telefono'] = $_POST['tel'];
$data['email'] = $_POST['email'];
$data['profesion'] = $_POST['profesion'];
$data['trabaja'] = $_POST['trabaja'];
$data['financiacion'] = $_POST['financiacion'];
$data['detallefinan'] = $_POST['detallefinan'];
@ -37,46 +71,70 @@ function registrar($fila){
$errors['nombre'] = 'Nombre is required.';
if (empty($_POST['apellido']))
$errors['nombre'] = 'Apellido is required.';
$errors['apellido'] = 'Apellido is required.';
if (empty($_POST['doctype']))
$errors['doctype'] = 'No seleccionó un tipo de doc';
if (empty($_POST['docnro']))
$errors['docnro'] = 'No ingreso un documento';
if (empty($_POST['dir']))
$errors['dir'] = 'No ingreso una direccion';
if (empty($_POST['pais']))
$errors['pais'] = 'Ingrese el pais de presedencia';
if (empty($_POST['ciudad']))
$errors['ciudad'] = 'Ingrese ciudad de presedencia';
if (empty($_POST['tel']))
$errors['ciudad'] = 'Telefono de contacto vacio o incorrecto';
if (empty($_POST['email']))
$errors['email'] = 'Email is required.';
$errors['email'] = 'E-Mail de contacto vacio o incorrecto';
if (empty($_POST['mensage']))
$errors['mensage'] = 'Mensaje is required.';
if (empty($_POST['profesion']))
$errors['email'] = 'indique profesion';
if( !file_exists("registro.csv")){
setheaders();
if (empty($_POST['trabaja']))
$errors['trabaja'] = 'Indique en el sector que trabaja';
if(empty($_POST['g-recaptcha-response'])){
$errors['recaptcha'] = 'Debe validar el captcha';
}
else if(!verifyCaptcha()){
$errors['recaptcha'] = 'Error en la validación de ReCaptcha';
}
//$fp = fopen("registro.csv", "w");
/*if ($_POST['g-recaptcha-response']){
$response = $reCaptcha->verifyResponse(
$_SERVER["REMOTE_ADDR"],
$_POST["g-recaptcha-response"]
);
if($response == null || !$response->sucess)
$errors['captcha'] = 'no captcha seleceted';
}
else{
echo "falta el captcha";
}*/
if( !file_exists("2021y22.csv"))
setheaders();
// return a response ===========================================================
// if there are any errors in our errors array, return a success boolean of false
if ( ! empty($errors)) {
// if there are items in our errors array, return those errors
$data['success'] = false;
$data['errors'] = $errors;
} else {
$fila = array();
// if there are no errors process our form, then return a message
// DO ALL YOUR FORM PROCESSING HERE
// THIS CAN BE WHATEVER YOU WANT TO DO (LOGIN, SAVE, UPDATE, WHATEVER)
// show a message of success and provide a true success variable
}
else {
$fila = $data;
registrar($fila);
$data['success'] = true;
$data['message'] = 'Registro exitoso';
}
// return all our data to an AJAX call

180
register2.html Normal file
View File

@ -0,0 +1,180 @@
<!DOCTYPE HTML>
<html>
<head>
<title>6to Coloquio Uruguayo de Matémática</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" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<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>
<div id="main">
<header id="header"></header>
<div id="site_content" class="container">
<div class="row">
<div id="content" class="col-xs-12 col-sm-8">
<h1>Registrarse</h1>
<form id="registerform" action="register.php" method="post" class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2" for="txtnombre">Nombre:</label>
<div class="col-sm-8">
<input id="txtnombre" class="form-control" name="nombre"
placeholder="Juan" type="text" pattern="^[a-zA-Z][a-zA-Z\s\-.'`áéíóú]*[a-zA-Z]$" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtapellido">Apellido:</label>
<div class="col-sm-8">
<input id="txtapellido" class="form-control" name="apellido"
placeholder="Perez" type="text" pattern="^[a-zA-Z][a-zA-Z\s\-.'`áéíóú]*[a-zA-Z]$" required>
</div>
</div>
<!-- Selector de Documento mas nro-->
<div class="form-group row">
<label class="col-sm-2 control-label" for="txtdocnro">Documento:</label>
<div class="col-sm-8">
<div class="input-group">
<div class="input-group-btn">
<button id="btntipodoc" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tipo <span class="caret"></span></button>
<ul id="tipodoc" class="dropdown-menu">
<li><a href="#">C.I.</a></li>
<li><a href="#">Otro</a></li>
<input id="txttipodoc" name="doctype" type="hidden">
</ul>
</div><!-- /btn-group -->
<input id="txtdocnro" name="docnro" class="form-control"
placeholder="Seleccione Tipo de Documento..." type="text" required>
</div><!-- /input-group -->
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 control-label" for="txtdir">Pais:</label>
<div class="col-sm-2">
<button id="btnpais" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Pais <span class="caret"></span></button>
<ul id="lstpais" class="dropdown-menu">
<li><a href="#">Uruguay</a></li>
<li><a href="#">Alemania</a></li>
<li><a href="#">Austria</a></li>
<li><a href="#">Argentina</a></li>
<li><a href="#">Bolivia</a></li>
<li><a href="#">Brasil</a></li>
<li><a href="#">Canadá</a></li>
<li><a href="#">Chile</a></li>
<li><a href="#">Colombia</a></li>
<li><a href="#">Ecuador</a></li>
<li><a href="#">España</a></li>
<li><a href="#">Estados Unidos</a></li>
<li><a href="#">Francia</a></li>
<li><a href="#">Inglaterra</a></li>
<li><a href="#">Italia</a></li>
<li><a href="#">México</a></li>
<li><a href="#">Paraguay</a></li>
<li><a href="#">Perú</a></li>
<li><a href="#">Suiza</a></li>
<li><a href="#">Venezuela</a></li>
<li><a href="#">Otro</a></li>
</ul>
<input id="txtpais" name="pais" type="hidden">
</div>
<label class="col-sm-2 control-label" for="txtciudad">Ciudad:</label>
<div class="col-sm-4">
<input id="txtciudad" name="ciudad" class="form-control"
placeholder="Montevideo" type="text" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtdir">Direccion:</label>
<div class="col-sm-8">
<input id="txtdir" class="form-control" name="dir"
placeholder="18 de Julio 1432 apto 302" type="text" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtel">Telefono:</label>
<div class="col-sm-8">
<input id="txttel" class="form-control" name="tel"
placeholder="099123456" type="text" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtmail">Email:</label>
<div class="col-sm-8">
<input id="txtmail" class="form-control" name="email"
placeholder="mail@example.com" type="email" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="txtprof">Profesión:</label>
<div class="col-sm-8">
<input id="txtprof" class="form-control" name="profesion"
placeholder="Profesor, Docente o Estudiante, etc" type="text" pattern="[a-zA-Z]*" required>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 control-label" for="txttrabaja">Trabaja en:</label>
<div class="col-sm-8">
<button id="btntraba" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Pais <span class="caret"></span></button>
<ul id="lsttrabaja" class="dropdown-menu">
<li><a href="#">Primaria</a></li>
<li><a href="#">Secundaria</a></li>
<li><a href="#">Universidad</a></li>
<li><a href="#">UTU</a></li>
<li><a href="#">UTEC</a></li>
<li><a href="#">IPA/CERP</a></li>
<li><a href="#">Sector Privado</a></li>
<li><a href="#">Sector Público</a></li>
</ul>
<input id="txttrabaja" name="trabaja" type="hidden">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="rdfinan">Financiación?</label>
<div class="col-sm-8">
<label class="radio-inline"><input id="sifinan" type="radio" name="financiacion" value="si"></label>
<label class="radio-inline"><input id="nofinan" type="radio" checked="true" name="financiacion" value="no">No</label>
</div>
</div>
<div id="detallefinan" class="form-group">
<label class="control-label col-sm-2" for="detallefinan">Detalle estimación de costo:</label>
<div class="col-sm-8">
<textarea class="form-control" name="detallefinan" row="10" style="height:200px;">
</textarea>
</div>
</div>
<div class="form-group">
<div class="g-recaptcha" 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>
</form>
<div id="statusmsg" class="alert alert-success">
<strong>Success!</strong> Indicates a successful or positive action.
</div>
</div>
<div id="sidebar" class="sidebar col-xs-12 col-sm-4"></div>
</div>
</div>
<footer id="footer">
</footer>
</div>
</div>
</body>
</html>

View File

@ -1 +0,0 @@
Nombre,Apellido,TipoDoc,Documento,Pais,Ciudad,Profesión,Telefono,Email,Financiación,"Detalle Financiación"
1 Nombre Apellido TipoDoc Documento Pais Ciudad Profesión Telefono Email Financiación Detalle Financiación

2
snippets/footer.html Normal file
View File

@ -0,0 +1,2 @@
<p>Creado por: <a href="wwww.cmat.edu.uy">El Centro de Matemática</a></p>
<p style="text-transform:none;">Germán Correa - germanc@cmat.edu.uy</a></p>

View File

@ -1,16 +1,20 @@
<div id="logo">
<div id="logo" class="jumbotron">
<div id="logo_text">
<!-- class="logo_colour", allows you to change the colour of the text -->
<h1><a href="/"><span class="logo_init">VI</span><span class="logo_colour"> Coloquio Uruguayo de Matemática</span></a></h1>
<h2 style="font-size:29px;"><strong>20, 21 y 22 de Diciembre</strong></h2>
<h1><a href="/"><span class="logo_init">VI</span><span class="logo_colour"> Coloquio Uruguayo<br/> de Matemática</span></a></h1>
<h2 style="font-size:29px;"><strong>20, 21 y 22 de Diciembre, 2017</strong></h2>
</div>
</div>
<div id="menubar">
<ul id="menu">
<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="contact.html">Contacto</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>
</ul>
</div>
</nav>

View File

@ -1,18 +1,21 @@
<img id="afiche" style="border:4px solid #222;" class="img-responsive img-thumbnail" src="img/afiche.jpg" />
<h1>Avisos</h1>
<h4>Se lanza el sitio del 6to Coloquio</h4>
<h5>22 de Agosto, 2017</h5>
<p>Se crea la página de presentación del 6to Coloquio de Matemática<br /><a href="#">Leer Mas</a></p>
<h4>Inscripciones Abiertas</h4>
<h5>30 de Agosto, 2017</h5>
<p>Si desea participar del coloquio <a title="Formulario de registro" href="/register.html">registrese </a></p>
<h1>Links de interés</h1>
<ul>
<li><a href="#">link 1</a></li>
<li><a href="#">link 2</a></li>
<li><a href="#">link 3</a></li>
<li><a href="#">link 4</a></li>
<ul class="interest-links">
<li><a target="_blank" data-toggle="tooltip" title="Centro de Matemática" href="http://www.cmat.edu.uy">CMat</a></li>
<li><a target="_blank" data-toggle="tooltip" title="Instituto de Matemática y Estadística Rafael Laguardia" href="http://www.find.edu.uy/imerl">IMERL</a></li>
<li><a target="_blank" data-toggle="tooltip" title="Programa de Desarrollo de las Ciencias Básicas" href="http://www.pedeciba.edu.uy/matematica/indice.php">Pedeciba Matemática</a></li>
<li><a target="_blank" data-toogle="tooltip" title="Imaginary Uruguay" href="http://imaginary.org/es/project/imaginary-uruguay">Imaginary</a></li>
</ul>
<h1>Buscar</h1>
<!--<h1>Chat</h1>
<form method="post" action="#" id="search_form">
<p>
<input class="search" type="text" name="search_field" value="Texto de busqueda...." />
<input name="search" type="image" style="border: 0; margin: 0 0 -9px 5px;" src="style/search.png" alt="Search" title="Search" />
</p>
</form>
</form>-->

View File

@ -4,7 +4,6 @@ body
{ font-family: "lucida sans", arial, sans-serif;
padding: 0px;
margin: 0px;
font-size: .78em;
background: #090708;
color: #5D5D5D;
@ -16,7 +15,7 @@ body{
rgba(0, 0, 0, 0.8)
),
url(background.jpg);*/
background-color: lightgray;
background-color: white;
}
@ -31,6 +30,9 @@ h1, h2, h3, h4, h5, h6
margin: 0 0 15px 0;
padding: 15px 0 5px 0;}
h1#welcome{
font-size:300%;
}
h2
{ font: normal 160% 'century gothic', arial, sans-serif;
color: #43423F;}
@ -113,7 +115,7 @@ ol li
margin-right: auto;}
#main
{ padding-bottom: 40px;}
{ /*padding-bottom: 40px;*/}
#header
{ /*background: transparent url(logo.jpg) no-repeat;*/
@ -121,14 +123,16 @@ ol li
}
#logo
{ width: 860px;
position: relative;
height: 200px;}
{ /*width: 860px;*/
/*position: relative*/;
/*height: 200px;*/
padding:10px 0px;
background:inherit;}
#logo #logo_text
{ position: absolute;
{ /*position: absolute;
top: 47px;
left: 0;}
left: 0;*/}
#logo h1, #logo h2
{ font: normal 300% 'century gothic', arial, sans-serif;
@ -164,17 +168,27 @@ ol li
color: #fff;}
#menubar
{ width: 870px;
height: 46px;
padding-top: 55px;
padding-left: 4px;}
{
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;}
#logo_text h1 a .logo_colour{font-size:30px;}
.logo_colour{font-size:30px;}
}
ul#menu
{ float: right;
{ /*float: right;
margin-right:10px;
margin: 0px;
background: black;
padding: 4px;
margin-top: 20px;
margin-top: 20px;*/
}
ul#menu li
@ -196,6 +210,18 @@ ul#menu li a
color: #FFF;
border: none;}
ul.dropdown-menu{
margin:0px;
min-width:100px;
}
ul.dropdown-menu li{
background:none!important;
padding:0px!important;
}
ul.dropdown-menu li a{
border:none;
}
ul#menu li.selected a
{ height: 20px;
padding: 7px 15px 4px 15px;
@ -204,25 +230,43 @@ ul#menu li.selected a
ul#menu li.selected
{ margin: 7px 0 0 0;}
ul#menu li.selected a, ul#menu li.selected a:hover
ul#menu li.selected a, ul#menu li.selected a:hover, ul#menu li a:active
{ color: #FC9C04;}
ul#menu li a:hover
{ color: #FC9C04;}
ul.interest-links li a{
font-weight: 800;
}
@media screen and (min-width: 1200px){
.container {
width:970px;}
}
#site_content
{ width: 858px;
overflow: hidden;
{ /*width: 858px;
overflow: hidden;*/
margin: 0 auto 0 auto;
padding: 10px 20px 20px 20px;
background: #F6F6F0 url(back.png) repeat-y;
border: 15px solid #FFF;}
/*padding: 0px 15px 0px 30px;*/
/*background: #F6F6F0 url(back.png) repeat-y;*/
border: 15px solid #FFF;*/}
.sidebar
{ float: right;
width: 190px;
padding: 0 15px 20px 15px;}
{ /*float: right;
width: 190px;*/
padding: 0 15px 20px 15px;
border: 1px solid;
}
#afiche{
display:block;
margin-top:15px;
margin-right: auto;
margin-left: auto;
height: 250px
}
.sidebar ul
{ width: 178px;
padding: 4px 0 0 0;
@ -243,8 +287,8 @@ ul#menu li a:hover
#content
{ text-align: left;
width: 615px;
padding: 0;}
/*width: 615px;*/
}
#content ul
{ margin: 2px 0 22px 0px;}
@ -257,22 +301,26 @@ ul#menu li a:hover
line-height: 1.5em;}
#footer
{ width: 916px;
{ /*width: 916px;*/
font-family: 'trebuchet ms', sans-serif;
font-size: 90%;
height: 28px;
padding: 20px 0 5px 0;
text-align: center;
background: transparent;
color: #EEF3CD;
color: black;
text-transform: uppercase;
letter-spacing: 0.1em;}
letter-spacing: 0.1em;
margin-top:50px;
}
#footer p
{ padding: 0;}
{ padding: 0;
color:black;
}
#footer a, #footer a:hover
{ color: #EEF3CD;
{ color: black;
text-decoration: none;}
#footer a:hover