fix minor text, begin register implementation
@ -1 +0,0 @@
|
|||||||
,germanc,AM,10.12.2017 23:23,file:///home/germanc/.config/libreoffice/4;
|
|
10
db/db.php
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
public function insert($registro){
|
public function insert($registro){
|
||||||
$sql = 'INSERT INTO Registro (nombre,apellido,titulo,afiliacion,ciudad,'
|
$sql = 'INSERT INTO Registro (nombre,apellido,titulo,afiliacion,ciudad,'
|
||||||
.'pais,email,fechaLlegada,fechaPartida,financiacion,'
|
.'pais,email,fechaLlegada,fechaPartida,'
|
||||||
."invitado,cartaInvitacion,roomingPref,roommate,fechaRegistro)"
|
."cartaInvitacion,roomingPref,roommate,fechaRegistro)"
|
||||||
.' VALUES (:nombre,:apellido,:titulo,:afiliacion,:ciudad,:pais,:email,:fechaLlegada,'
|
.' VALUES (:nombre,:apellido,:titulo,:afiliacion,:ciudad,:pais,:email,:fechaLlegada,'
|
||||||
.':fechaPartida,:financiacion,:invitado,:cartaInvitacion,:roomingPref,:roommate,:fechaRegistro);';
|
.':fechaPartida,:cartaInvitacion,:roomingPref,:roommate,:fechaRegistro);';
|
||||||
|
|
||||||
$stmt = $this->pdo->prepare($sql);
|
$stmt = $this->pdo->prepare($sql);
|
||||||
$stmt->execute([
|
$stmt->execute([
|
||||||
@ -29,8 +29,8 @@
|
|||||||
':email' => $registro['email'],
|
':email' => $registro['email'],
|
||||||
':fechaLlegada' => $registro['bda'],
|
':fechaLlegada' => $registro['bda'],
|
||||||
':fechaPartida' => $registro['eda'],
|
':fechaPartida' => $registro['eda'],
|
||||||
':financiacion' => $registro['financiacion'],
|
//':financiacion' => $registro['financiacion'],
|
||||||
':invitado' => $registro['invited'],
|
//':invitado' => $registro['invited'],
|
||||||
':cartaInvitacion' => $registro['letterinvited'],
|
':cartaInvitacion' => $registro['letterinvited'],
|
||||||
':roomingPref' => $registro['roomtype'],
|
':roomingPref' => $registro['roomtype'],
|
||||||
':roommate' => $registro['roomate'],
|
':roommate' => $registro['roomate'],
|
||||||
|
@ -10,8 +10,8 @@ CREATE TABLE IF NOT EXISTS Registro
|
|||||||
email VARCHAR(80) NOT NULL UNIQUE,
|
email VARCHAR(80) NOT NULL UNIQUE,
|
||||||
fechaLlegada DATE,
|
fechaLlegada DATE,
|
||||||
fechaPartida DATE,
|
fechaPartida DATE,
|
||||||
financiacion BOOLEAN NOT NULL,
|
/*financiacion BOOLEAN NOT NULL,*/
|
||||||
invitado BOOLEAN NOT NULL,
|
/*invitado BOOLEAN NOT NULL,*/
|
||||||
cartaInvitacion BOOLEAN NOT NULL,
|
cartaInvitacion BOOLEAN NOT NULL,
|
||||||
roomingPref VARCHAR(50),
|
roomingPref VARCHAR(50),
|
||||||
roommate VARCHAR(50),
|
roommate VARCHAR(50),
|
||||||
@ -49,6 +49,8 @@ INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
|||||||
VALUES('Frédéric', 'Le Roux','Université Paris VI','img/speakers/fleroux.jpg','https://webusers.imj-prg.fr/~frederic.le-roux/',1);
|
VALUES('Frédéric', 'Le Roux','Université Paris VI','img/speakers/fleroux.jpg','https://webusers.imj-prg.fr/~frederic.le-roux/',1);
|
||||||
INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
||||||
VALUES('Salvador', 'Zanata','Universidade de São Paulo','img/speakers/szanata.jpg','https://www.ime.usp.br/~sazanata/',1);
|
VALUES('Salvador', 'Zanata','Universidade de São Paulo','img/speakers/szanata.jpg','https://www.ime.usp.br/~sazanata/',1);
|
||||||
|
INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
||||||
|
VALUES('Shinegori', 'Matsumoto','Nihon University','img/speakers/smatsumoto.jpg','https://researchmap.jp/read0028300/?lang=english',1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 131 KiB |
@ -89,19 +89,23 @@ function select2Focus() {
|
|||||||
|
|
||||||
},
|
},
|
||||||
submitHandler: function(form){
|
submitHandler: function(form){
|
||||||
|
|
||||||
var formdata = $(form).serializeArray();
|
var formdata = $(form).serializeArray();
|
||||||
formdata.find(item => item.name === "pais").value = $("#pais").select2("data")[0].text;
|
formdata.find(item => item.name === "pais").value = $("#pais").select2("data")[0].text;
|
||||||
formdata.find(item => item.name === "roomtype").value = $("#roomtype").select2("data")[0].text;
|
formdata.find(item => item.name === "roomtype").value = $("#roomtype").select2("data")[0].text;
|
||||||
var parameters = $.param(formdata);
|
var parameters = $.param(formdata);
|
||||||
|
$.post('api/register', parameters)
|
||||||
|
.done(function(data){
|
||||||
|
alert("post done");
|
||||||
|
|
||||||
var post = $.post('api/register', parameters);
|
|
||||||
post.done(function(data){
|
|
||||||
if(data.success){
|
if(data.success){
|
||||||
|
alert("peter");
|
||||||
validator.resetForm();
|
validator.resetForm();
|
||||||
reset($("#registerform"));
|
reset($("#registerform"));
|
||||||
showMsg(false,data.msg);
|
showMsg(false,data.msg);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
var errMsg = data.msg+"<ul>";
|
var errMsg = data.msg+"<ul>";
|
||||||
$.each(data.errors, function(k,v){
|
$.each(data.errors, function(k,v){
|
||||||
errMsg+="<li>"+v+"</li>";
|
errMsg+="<li>"+v+"</li>";
|
||||||
|
@ -12,7 +12,15 @@ $app->get('/', function (Request $request, Response $response, array $args) {
|
|||||||
|
|
||||||
$app->get('/registration', function (Request $request, Response $response, array $args) {
|
$app->get('/registration', function (Request $request, Response $response, array $args) {
|
||||||
$this->logger->info("GDDWorkshop '/registrtion' route");
|
$this->logger->info("GDDWorkshop '/registrtion' route");
|
||||||
return $this->renderer->render($response, 'registration.html', ['closed' => $this->settings['close_registration']]);
|
$recapsitekey = $this->settings["recaptcha"]["sitekey"];
|
||||||
|
if($this->settings["testing"]){
|
||||||
|
$recapsitekey = $this->settings["recaptcha"]["sitekeytest"];
|
||||||
|
}
|
||||||
|
return $this->renderer->render($response, 'registration.html',
|
||||||
|
[
|
||||||
|
'closed' => $this->settings['close_registration'],
|
||||||
|
'sitekey' => $recapsitekey
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -100,10 +108,10 @@ $app->group('/api', function($app){
|
|||||||
$messages->addMessageNow("submit-register-err", "Last name could not be empty");
|
$messages->addMessageNow("submit-register-err", "Last name could not be empty");
|
||||||
if(!isset($data['email'])||empty($data['email']))
|
if(!isset($data['email'])||empty($data['email']))
|
||||||
$messages->addMessageNow("submit-register-err", "E-mail could not be empty");
|
$messages->addMessageNow("submit-register-err", "E-mail could not be empty");
|
||||||
if(!isset($data['financiacion'])||!is_numeric($data['financiacion']))
|
/*if(!isset($data['financiacion'])||!is_numeric($data['financiacion']))
|
||||||
$messages->addMessageNow("submit-register-err", "Question about financial support must have a selected answer");
|
$messages->addMessageNow("submit-register-err", "Question about financial support must have a selected answer");*/
|
||||||
if(!isset($data['invited'])||!is_numeric($data['invited']))
|
/*if(!isset($data['invited'])||!is_numeric($data['invited']))
|
||||||
$messages->addMessageNow("submit-register-err", "Question about 'invited to participate in this conference' must have a selected answer");
|
$messages->addMessageNow("submit-register-err", "Question about 'invited to participate in this conference' must have a selected answer");*/
|
||||||
if(!isset($data['letterinvited'])||!is_numeric($data['letterinvited']))
|
if(!isset($data['letterinvited'])||!is_numeric($data['letterinvited']))
|
||||||
$messages->addMessageNow("submit-register-err", "Question about needing a letter of invitation must have a selected answer");
|
$messages->addMessageNow("submit-register-err", "Question about needing a letter of invitation must have a selected answer");
|
||||||
|
|
||||||
@ -112,7 +120,12 @@ $app->group('/api', function($app){
|
|||||||
$messages->addMessageNow("submit-register-err", "Please validate captcha!");
|
$messages->addMessageNow("submit-register-err", "Please validate captcha!");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$recaptcha = new ReCaptcha\ReCaptcha($this->settings['recaptcha']['secret-test']);
|
$recapsecret = $this->settings['recaptcha']['secret'];
|
||||||
|
if($this->settings['testing']){
|
||||||
|
$recapsecret = $this->settings['recaptcha']['secrettest'];
|
||||||
|
}
|
||||||
|
var_dump($recapsecret);
|
||||||
|
$recaptcha = new ReCaptcha\ReCaptcha($recapsecret);
|
||||||
//get remote ip from request header TODO
|
//get remote ip from request header TODO
|
||||||
$resp = $recaptcha->verify($data['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
|
$resp = $recaptcha->verify($data['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
|
||||||
if(!$resp->isSuccess()){
|
if(!$resp->isSuccess()){
|
||||||
@ -126,7 +139,7 @@ $app->group('/api', function($app){
|
|||||||
try{
|
try{
|
||||||
if($db->findByMail($data['email']))
|
if($db->findByMail($data['email']))
|
||||||
$messages->addMessageNow("submit-register-err", $data['email']." is already registered<br/>"
|
$messages->addMessageNow("submit-register-err", $data['email']." is already registered<br/>"
|
||||||
."Please contact: <b>ggdworkshop@cmat.edu.uy</b>");
|
."Please contact: <b>surfacedynamics2018@cmat.edu.uy</b>");
|
||||||
else
|
else
|
||||||
$db->insert($data);
|
$db->insert($data);
|
||||||
}
|
}
|
||||||
@ -146,14 +159,14 @@ $app->group('/api', function($app){
|
|||||||
"msg"=>"You have been successfully registered to the GGDWorkshop",
|
"msg"=>"You have been successfully registered to the GGDWorkshop",
|
||||||
"data"=>$data);
|
"data"=>$data);
|
||||||
$msg = "Hello ".$data["nombre"]." ".$data["apellido"].",\n\n".
|
$msg = "Hello ".$data["nombre"]." ".$data["apellido"].",\n\n".
|
||||||
"You have been successfully registered to the Workshop on Groups, Geometry and Dynamics!\n\n".
|
"You have been successfully registered to the Surface Dynamics 2018 Workshop!\n\n".
|
||||||
"For any questions please contact ggdworkshop@cmat.edu.uy\n\n".
|
"For any questions please contact surfacedynamics2018@cmat.edu.uy\n\n".
|
||||||
"Best!\n\n";
|
"Best!\n\n";
|
||||||
$headers = 'From: ' . "ggdworkshop@cmat.edu.uy" . "\r\n" .
|
$headers = 'From: ' . "surfacedynamics2018@cmat.edu.uy" . "\r\n" .
|
||||||
'Reply-To: ' . "ggdworkshop@cmat.edu.uy" . "\r\n" .
|
'Reply-To: ' . "surfacedynamics2018@edu.uy" . "\r\n" .
|
||||||
'Content-Type: ' . "text/plain; charset=UTF-8". "\r\n" .
|
'Content-Type: ' . "text/plain; charset=UTF-8". "\r\n" .
|
||||||
'X-Mailer: PHP/' . phpversion();
|
'X-Mailer: PHP/' . phpversion();
|
||||||
mail($data['email'], 'Successfully registered to the Workshop on Groups, Geometry and Dynamics', $msg, $headers);
|
mail($data['email'], 'Successfully registered to the Surface Dynamics 2018 Workshop', $msg, $headers);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ return [
|
|||||||
'displayErrorDetails' => true, // set to false in production
|
'displayErrorDetails' => true, // set to false in production
|
||||||
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
|
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
|
||||||
'debug' => true,
|
'debug' => true,
|
||||||
|
'testing' => true,
|
||||||
'close_registration' => false,
|
'close_registration' => false,
|
||||||
|
|
||||||
// Renderer settings
|
// Renderer settings
|
||||||
@ -28,7 +29,10 @@ return [
|
|||||||
],
|
],
|
||||||
'recaptcha' => [
|
'recaptcha' => [
|
||||||
'secret' => "6LesRDsUAAAAAA6t3UgL4U4Foc9njmXX-8HIiLj_",
|
'secret' => "6LesRDsUAAAAAA6t3UgL4U4Foc9njmXX-8HIiLj_",
|
||||||
'secret-test' => "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe",
|
'secrettest' => "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe",
|
||||||
|
'sitekey' => "6LesRDsUAAAAAJvyoODvjiza9u75qEGJmbKHEV6s",
|
||||||
|
'sitekeytest' => "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand visible-xs" href="#">Surfac Dynamics Menu</a>
|
<a class="navbar-brand visible-xs" href="#">Surface Dynamics Menu</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse" id="menucollapse">
|
<div class="navbar-collapse collapse" id="menucollapse">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<li id="home"><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
|
<li id="home"><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
|
||||||
<li id="program"><a href="program">Program</a></li>
|
<li id="program"><a href="program">Program</a></li>
|
||||||
<!--<li id="committees"><a href="committees">Committees</a></li>-->
|
<!--<li id="committees"><a href="committees">Committees</a></li>-->
|
||||||
<!--<li id="invitedspeakers"><a href="invitedspeakers">Invited Speakers</a></li>-->
|
<li id="invitedspeakers"><a href="invitedspeakers">Invited Speakers</a></li>
|
||||||
<li id="registration"><a href="registration">Registration</a></li>
|
<li id="registration"><a href="registration">Registration</a></li>
|
||||||
<li id="participants"><a href="participants">Participants</a></li>
|
<li id="participants"><a href="participants">Participants</a></li>
|
||||||
<li id="practicalinfo"><a href="practicalinfo">Practical Information</a></li>
|
<li id="practicalinfo"><a href="practicalinfo">Practical Information</a></li>
|
||||||
|
@ -176,14 +176,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-xs-12">
|
<div class="form-group col-xs-12">
|
||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<!--
|
|
||||||
<div id="testing" class="g-recaptcha"
|
|
||||||
data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
|
|
||||||
data-callback="recaptchaCallback"></div>
|
|
||||||
-->
|
|
||||||
<div class="g-recaptcha"
|
<div class="g-recaptcha"
|
||||||
data-sitekey="6LesRDsUAAAAAJvyoODvjiza9u75qEGJmbKHEV6s"
|
data-sitekey="{{ sitekey }}"
|
||||||
data-callback="recaptchaCallback"></div>
|
data-callback="recaptchaCallback">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
|
<input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
|
||||||
@ -219,7 +216,7 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">GGDWorkshop Registration</h4>
|
<h4 class="modal-title">Surface Dynamics 2018 Workshop Registration</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<a href="img/Workshop-GGD2018-afiche.pdf" target="_blank">
|
<a href="img/afiche.png" target="_blank">
|
||||||
<img id="afiche2" class="img-responsive" src="img/afiche.png" alt="Surface Workshop 2018 Poster"/>
|
<img id="afiche2" class="img-responsive" src="img/afiche.png" alt="Surface Workshop 2018 Poster"/>
|
||||||
</a>
|
</a>
|
||||||
<!--<div class="caption text-center">
|
<!--<div class="caption text-center">
|
||||||
|