diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
- +
diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/views/juego.php b/views/juego.php index e194e81..ef8695b 100644 --- a/views/juego.php +++ b/views/juego.php @@ -1,51 +1,188 @@ + + window.location = "' . $url . '/home"; '; } -//$id = $pagina[1]; -$id=1; +$id = $pagina[1]; $query = mysqli_query($connect, "SELECT * FROM Asistentes WHERE id = " . $_SESSION['id_user']); $data = mysqli_fetch_array($query); $query = mysqli_query($connect, "SELECT * FROM juego_virtual WHERE id = " . $id); $juego = mysqli_fetch_array($query); +$moderador = true; +/* if ($data['rol'] == "JUGADOR") { + $moderador = false; +} */ +if ($moderador) { + if (isset($_POST["btn_form"])) { + $revisar = getimagesize($_FILES["image"]["tmp_name"]); + if ($revisar !== false) { + $image = $_FILES['image']['tmp_name']; + $imgContenido = addslashes(file_get_contents($image)); + + $cont = 0; + $query = mysqli_query($connect, "SELECT * FROM preguntas_google WHERE juego_virtual_id = " . $juego['id']); + $aux = 0; + while ($pregunta = mysqli_fetch_array($query)) { + $aux += 1; + if ($pregunta['respuesta'] == $_POST['check'.$aux]) { + $cont += 1; + } + } + + $sh1 = $_POST['check1']; + $sh2 = $_POST['check2']; + $sh3 = $_POST['check3']; + $sh4 = $_POST['check4']; + $e = $data['equipo']; + + $i = "insert into respuesta_map(res_1, res_2, res_3, res_4, puntaje, equipo, juego_id, imagen) values('$sh1','$sh2','$sh3','$sh4',$cont,'$e',$id, '$imgContenido');"; + //print_r($i); + + + $insertar = mysqli_query($connect, $i); + echo ""; + if ($insertar) { + + echo ""; + } else { + print_r($insertar); + echo ""; + } + // Sie el usuario no selecciona ninguna imagen + } else { + echo ""; + } + } +} ?> -
- +
-
-
-

-
- visita a: -

Preguntas

+
+
+

+
+ visita a: +

Preguntas

+
+
+ '; + + + + echo "" . $pregunta['pregunta'] . "
"; + if ($moderador) { + ?> +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + "; + } + + ?> +
+
+ + +
+ + + +
+
"; + if (!$moderador) { + ?> + +
+ +
+ -
- +
+ +
-
- + +
- +
\ No newline at end of file diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/views/juego.php b/views/juego.php index e194e81..ef8695b 100644 --- a/views/juego.php +++ b/views/juego.php @@ -1,51 +1,188 @@ + + window.location = "' . $url . '/home"; '; } -//$id = $pagina[1]; -$id=1; +$id = $pagina[1]; $query = mysqli_query($connect, "SELECT * FROM Asistentes WHERE id = " . $_SESSION['id_user']); $data = mysqli_fetch_array($query); $query = mysqli_query($connect, "SELECT * FROM juego_virtual WHERE id = " . $id); $juego = mysqli_fetch_array($query); +$moderador = true; +/* if ($data['rol'] == "JUGADOR") { + $moderador = false; +} */ +if ($moderador) { + if (isset($_POST["btn_form"])) { + $revisar = getimagesize($_FILES["image"]["tmp_name"]); + if ($revisar !== false) { + $image = $_FILES['image']['tmp_name']; + $imgContenido = addslashes(file_get_contents($image)); + + $cont = 0; + $query = mysqli_query($connect, "SELECT * FROM preguntas_google WHERE juego_virtual_id = " . $juego['id']); + $aux = 0; + while ($pregunta = mysqli_fetch_array($query)) { + $aux += 1; + if ($pregunta['respuesta'] == $_POST['check'.$aux]) { + $cont += 1; + } + } + + $sh1 = $_POST['check1']; + $sh2 = $_POST['check2']; + $sh3 = $_POST['check3']; + $sh4 = $_POST['check4']; + $e = $data['equipo']; + + $i = "insert into respuesta_map(res_1, res_2, res_3, res_4, puntaje, equipo, juego_id, imagen) values('$sh1','$sh2','$sh3','$sh4',$cont,'$e',$id, '$imgContenido');"; + //print_r($i); + + + $insertar = mysqli_query($connect, $i); + echo ""; + if ($insertar) { + + echo ""; + } else { + print_r($insertar); + echo ""; + } + // Sie el usuario no selecciona ninguna imagen + } else { + echo ""; + } + } +} ?> -
- +
-
-
-

-
- visita a: -

Preguntas

+
+
+

+
+ visita a: +

Preguntas

+
+
+ '; + + + + echo "" . $pregunta['pregunta'] . "
"; + if ($moderador) { + ?> +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + "; + } + + ?> +
+
+ + +
+ + + +
+
"; + if (!$moderador) { + ?> + +
+ +
+ -
- +
+ +
-
- + +
- +
\ No newline at end of file diff --git a/views/menu.php b/views/menu.php index 741700c..b6aec98 100644 --- a/views/menu.php +++ b/views/menu.php @@ -78,11 +78,11 @@ - + diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/views/juego.php b/views/juego.php index e194e81..ef8695b 100644 --- a/views/juego.php +++ b/views/juego.php @@ -1,51 +1,188 @@ + + window.location = "' . $url . '/home"; '; } -//$id = $pagina[1]; -$id=1; +$id = $pagina[1]; $query = mysqli_query($connect, "SELECT * FROM Asistentes WHERE id = " . $_SESSION['id_user']); $data = mysqli_fetch_array($query); $query = mysqli_query($connect, "SELECT * FROM juego_virtual WHERE id = " . $id); $juego = mysqli_fetch_array($query); +$moderador = true; +/* if ($data['rol'] == "JUGADOR") { + $moderador = false; +} */ +if ($moderador) { + if (isset($_POST["btn_form"])) { + $revisar = getimagesize($_FILES["image"]["tmp_name"]); + if ($revisar !== false) { + $image = $_FILES['image']['tmp_name']; + $imgContenido = addslashes(file_get_contents($image)); + + $cont = 0; + $query = mysqli_query($connect, "SELECT * FROM preguntas_google WHERE juego_virtual_id = " . $juego['id']); + $aux = 0; + while ($pregunta = mysqli_fetch_array($query)) { + $aux += 1; + if ($pregunta['respuesta'] == $_POST['check'.$aux]) { + $cont += 1; + } + } + + $sh1 = $_POST['check1']; + $sh2 = $_POST['check2']; + $sh3 = $_POST['check3']; + $sh4 = $_POST['check4']; + $e = $data['equipo']; + + $i = "insert into respuesta_map(res_1, res_2, res_3, res_4, puntaje, equipo, juego_id, imagen) values('$sh1','$sh2','$sh3','$sh4',$cont,'$e',$id, '$imgContenido');"; + //print_r($i); + + + $insertar = mysqli_query($connect, $i); + echo ""; + if ($insertar) { + + echo ""; + } else { + print_r($insertar); + echo ""; + } + // Sie el usuario no selecciona ninguna imagen + } else { + echo ""; + } + } +} ?> -
- +
-
-
-

-
- visita a: -

Preguntas

+
+
+

+
+ visita a: +

Preguntas

+
+
+ '; + + + + echo "" . $pregunta['pregunta'] . "
"; + if ($moderador) { + ?> +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + "; + } + + ?> +
+
+ + +
+ + + +
+
"; + if (!$moderador) { + ?> + +
+ +
+ -
- +
+ +
-
- + +
- +
\ No newline at end of file diff --git a/views/menu.php b/views/menu.php index 741700c..b6aec98 100644 --- a/views/menu.php +++ b/views/menu.php @@ -78,11 +78,11 @@ - + diff --git a/views/mostrar_imagen.php b/views/mostrar_imagen.php new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/views/mostrar_imagen.php diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/views/juego.php b/views/juego.php index e194e81..ef8695b 100644 --- a/views/juego.php +++ b/views/juego.php @@ -1,51 +1,188 @@ + + window.location = "' . $url . '/home"; '; } -//$id = $pagina[1]; -$id=1; +$id = $pagina[1]; $query = mysqli_query($connect, "SELECT * FROM Asistentes WHERE id = " . $_SESSION['id_user']); $data = mysqli_fetch_array($query); $query = mysqli_query($connect, "SELECT * FROM juego_virtual WHERE id = " . $id); $juego = mysqli_fetch_array($query); +$moderador = true; +/* if ($data['rol'] == "JUGADOR") { + $moderador = false; +} */ +if ($moderador) { + if (isset($_POST["btn_form"])) { + $revisar = getimagesize($_FILES["image"]["tmp_name"]); + if ($revisar !== false) { + $image = $_FILES['image']['tmp_name']; + $imgContenido = addslashes(file_get_contents($image)); + + $cont = 0; + $query = mysqli_query($connect, "SELECT * FROM preguntas_google WHERE juego_virtual_id = " . $juego['id']); + $aux = 0; + while ($pregunta = mysqli_fetch_array($query)) { + $aux += 1; + if ($pregunta['respuesta'] == $_POST['check'.$aux]) { + $cont += 1; + } + } + + $sh1 = $_POST['check1']; + $sh2 = $_POST['check2']; + $sh3 = $_POST['check3']; + $sh4 = $_POST['check4']; + $e = $data['equipo']; + + $i = "insert into respuesta_map(res_1, res_2, res_3, res_4, puntaje, equipo, juego_id, imagen) values('$sh1','$sh2','$sh3','$sh4',$cont,'$e',$id, '$imgContenido');"; + //print_r($i); + + + $insertar = mysqli_query($connect, $i); + echo ""; + if ($insertar) { + + echo ""; + } else { + print_r($insertar); + echo ""; + } + // Sie el usuario no selecciona ninguna imagen + } else { + echo ""; + } + } +} ?> -
- +
-
-
-

-
- visita a: -

Preguntas

+
+
+

+
+ visita a: +

Preguntas

+
+
+ '; + + + + echo "" . $pregunta['pregunta'] . "
"; + if ($moderador) { + ?> +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + "; + } + + ?> +
+
+ + +
+ + + +
+
"; + if (!$moderador) { + ?> + +
+ +
+ -
- +
+ +
-
- + +
- +
\ No newline at end of file diff --git a/views/menu.php b/views/menu.php index 741700c..b6aec98 100644 --- a/views/menu.php +++ b/views/menu.php @@ -78,11 +78,11 @@ - + diff --git a/views/mostrar_imagen.php b/views/mostrar_imagen.php new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/views/mostrar_imagen.php diff --git a/views/salones.php b/views/salones.php index 6de8c43..8caeb34 100644 --- a/views/salones.php +++ b/views/salones.php @@ -34,7 +34,7 @@ - + diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/views/juego.php b/views/juego.php index e194e81..ef8695b 100644 --- a/views/juego.php +++ b/views/juego.php @@ -1,51 +1,188 @@ + + window.location = "' . $url . '/home"; '; } -//$id = $pagina[1]; -$id=1; +$id = $pagina[1]; $query = mysqli_query($connect, "SELECT * FROM Asistentes WHERE id = " . $_SESSION['id_user']); $data = mysqli_fetch_array($query); $query = mysqli_query($connect, "SELECT * FROM juego_virtual WHERE id = " . $id); $juego = mysqli_fetch_array($query); +$moderador = true; +/* if ($data['rol'] == "JUGADOR") { + $moderador = false; +} */ +if ($moderador) { + if (isset($_POST["btn_form"])) { + $revisar = getimagesize($_FILES["image"]["tmp_name"]); + if ($revisar !== false) { + $image = $_FILES['image']['tmp_name']; + $imgContenido = addslashes(file_get_contents($image)); + + $cont = 0; + $query = mysqli_query($connect, "SELECT * FROM preguntas_google WHERE juego_virtual_id = " . $juego['id']); + $aux = 0; + while ($pregunta = mysqli_fetch_array($query)) { + $aux += 1; + if ($pregunta['respuesta'] == $_POST['check'.$aux]) { + $cont += 1; + } + } + + $sh1 = $_POST['check1']; + $sh2 = $_POST['check2']; + $sh3 = $_POST['check3']; + $sh4 = $_POST['check4']; + $e = $data['equipo']; + + $i = "insert into respuesta_map(res_1, res_2, res_3, res_4, puntaje, equipo, juego_id, imagen) values('$sh1','$sh2','$sh3','$sh4',$cont,'$e',$id, '$imgContenido');"; + //print_r($i); + + + $insertar = mysqli_query($connect, $i); + echo ""; + if ($insertar) { + + echo ""; + } else { + print_r($insertar); + echo ""; + } + // Sie el usuario no selecciona ninguna imagen + } else { + echo ""; + } + } +} ?> -
- +
-
-
-

-
- visita a: -

Preguntas

+
+
+

+
+ visita a: +

Preguntas

+
+
+ '; + + + + echo "" . $pregunta['pregunta'] . "
"; + if ($moderador) { + ?> +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + "; + } + + ?> +
+
+ + +
+ + + +
+
"; + if (!$moderador) { + ?> + +
+ +
+ -
- +
+ +
-
- + +
- +
\ No newline at end of file diff --git a/views/menu.php b/views/menu.php index 741700c..b6aec98 100644 --- a/views/menu.php +++ b/views/menu.php @@ -78,11 +78,11 @@ - + diff --git a/views/mostrar_imagen.php b/views/mostrar_imagen.php new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/views/mostrar_imagen.php diff --git a/views/salones.php b/views/salones.php index 6de8c43..8caeb34 100644 --- a/views/salones.php +++ b/views/salones.php @@ -34,7 +34,7 @@ - + diff --git a/views/secciones.php b/views/secciones.php index a956e8b..23800c0 100644 --- a/views/secciones.php +++ b/views/secciones.php @@ -64,7 +64,7 @@ .bt_agenda{ width: 100%; - max-width: 300px; + max-width: 370px; margin: 20px; transition: 0.5s all; } @@ -75,7 +75,7 @@
-
+
diff --git a/.DS_Store b/.DS_Store index 42d35ca..c5dee29 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/img/.DS_Store b/img/.DS_Store index f0d6a5c..2ffe34c 100644 --- a/img/.DS_Store +++ b/img/.DS_Store Binary files differ diff --git a/views/agenda.php b/views/agenda.php index 544b5a0..5e0b255 100644 --- a/views/agenda.php +++ b/views/agenda.php @@ -158,7 +158,7 @@
diff --git a/views/auditorio.php b/views/auditorio.php index 7a7d27c..b58e348 100644 --- a/views/auditorio.php +++ b/views/auditorio.php @@ -35,7 +35,7 @@ - + diff --git a/views/chat.php b/views/chat.php index c7c08ac..33a2dda 100644 --- a/views/chat.php +++ b/views/chat.php @@ -38,10 +38,10 @@ font-size: small; } - .header { + .header1 { background: gray; padding-right: 0; - position: fixed; + position: sticky; top: 0; left: 0; width: 100%; @@ -75,7 +75,7 @@ function init() { - myName = ""; + myName = ""; nameGroup = ""; messages = []; @@ -99,6 +99,14 @@ }); } else { var html = ""; + inicio = ` +
+
+

Bienvenido a al chat grupal del equipo `+nameGroup+`

+
+
+ `; + html+=inicio; messages.data.messages.forEach(msj => { var fecha = (new Date(msj.date)); var fechaOld = (new Date(msj.dateOld)); @@ -143,7 +151,7 @@
- `+item1+` + ` + item1 + `
` + item + ` @@ -152,9 +160,10 @@
`; + html += msjHtml; }); - document.getElementById('titulo').innerText = "Equipo "+nameGroup; + document.getElementById('titulo').innerText = "Equipo " + nameGroup; document.getElementById('contenedor').innerHTML = html; setTimeout(() => { console.log(document.getElementById('contenedor')); @@ -194,14 +203,18 @@
-

+
+

+
+
+
\ No newline at end of file diff --git a/views/concursos.php b/views/concursos.php index e24cf17..6d494f8 100644 --- a/views/concursos.php +++ b/views/concursos.php @@ -69,6 +69,7 @@

CONCURSOS

+
@@ -209,6 +210,124 @@
+ + + diff --git a/views/dia.php b/views/dia.php index 062efb8..192e3e6 100644 --- a/views/dia.php +++ b/views/dia.php @@ -241,12 +241,12 @@
diff --git a/views/juego.php b/views/juego.php index e194e81..ef8695b 100644 --- a/views/juego.php +++ b/views/juego.php @@ -1,51 +1,188 @@ + + window.location = "' . $url . '/home"; '; } -//$id = $pagina[1]; -$id=1; +$id = $pagina[1]; $query = mysqli_query($connect, "SELECT * FROM Asistentes WHERE id = " . $_SESSION['id_user']); $data = mysqli_fetch_array($query); $query = mysqli_query($connect, "SELECT * FROM juego_virtual WHERE id = " . $id); $juego = mysqli_fetch_array($query); +$moderador = true; +/* if ($data['rol'] == "JUGADOR") { + $moderador = false; +} */ +if ($moderador) { + if (isset($_POST["btn_form"])) { + $revisar = getimagesize($_FILES["image"]["tmp_name"]); + if ($revisar !== false) { + $image = $_FILES['image']['tmp_name']; + $imgContenido = addslashes(file_get_contents($image)); + + $cont = 0; + $query = mysqli_query($connect, "SELECT * FROM preguntas_google WHERE juego_virtual_id = " . $juego['id']); + $aux = 0; + while ($pregunta = mysqli_fetch_array($query)) { + $aux += 1; + if ($pregunta['respuesta'] == $_POST['check'.$aux]) { + $cont += 1; + } + } + + $sh1 = $_POST['check1']; + $sh2 = $_POST['check2']; + $sh3 = $_POST['check3']; + $sh4 = $_POST['check4']; + $e = $data['equipo']; + + $i = "insert into respuesta_map(res_1, res_2, res_3, res_4, puntaje, equipo, juego_id, imagen) values('$sh1','$sh2','$sh3','$sh4',$cont,'$e',$id, '$imgContenido');"; + //print_r($i); + + + $insertar = mysqli_query($connect, $i); + echo ""; + if ($insertar) { + + echo ""; + } else { + print_r($insertar); + echo ""; + } + // Sie el usuario no selecciona ninguna imagen + } else { + echo ""; + } + } +} ?> -
- +
-
-
-

-
- visita a: -

Preguntas

+
+
+

+
+ visita a: +

Preguntas

+
+
+ '; + + + + echo "" . $pregunta['pregunta'] . "
"; + if ($moderador) { + ?> +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + "; + } + + ?> +
+
+ + +
+ + + +
+
"; + if (!$moderador) { + ?> + +
+ +
+ -
- +
+ +
-
- + +
- +
\ No newline at end of file diff --git a/views/menu.php b/views/menu.php index 741700c..b6aec98 100644 --- a/views/menu.php +++ b/views/menu.php @@ -78,11 +78,11 @@ - + diff --git a/views/mostrar_imagen.php b/views/mostrar_imagen.php new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/views/mostrar_imagen.php diff --git a/views/salones.php b/views/salones.php index 6de8c43..8caeb34 100644 --- a/views/salones.php +++ b/views/salones.php @@ -34,7 +34,7 @@ - + diff --git a/views/secciones.php b/views/secciones.php index a956e8b..23800c0 100644 --- a/views/secciones.php +++ b/views/secciones.php @@ -64,7 +64,7 @@ .bt_agenda{ width: 100%; - max-width: 300px; + max-width: 370px; margin: 20px; transition: 0.5s all; } @@ -75,7 +75,7 @@
-
+
diff --git a/views/stand.php b/views/stand.php index 59e4f32..e3267b8 100644 --- a/views/stand.php +++ b/views/stand.php @@ -82,7 +82,7 @@ - +