Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Formulario de paz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ulises Morales Ramírez
Formulario de paz
Commits
917b96dc
Commit
917b96dc
authored
Aug 14, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cambio de selector
parent
be8c950e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
87 deletions
+65
-87
encuesta.php
encuesta.php
+1
-1
funcionalidad.zip
funcionalidad.zip
+0
-0
index.php
index.php
+2
-83
insertar.php
insertar.php
+1
-1
ownStyle.css
ownStyle.css
+7
-1
readEscuelas.php
readEscuelas.php
+1
-1
script.js
script.js
+53
-0
No files found.
encuesta.php
View file @
917b96dc
...
...
@@ -77,7 +77,7 @@ session_start();
<div
class=
"input-group-append"
>
<span
class=
"input-group-text"
><i
class=
"fas fa-sort-numeric-up"
></i></span>
</div>
<input
type=
"number"
pattern=
"\d*
"
min=
"1"
max=
"99"
name=
"edad"
class=
"form-control input_user"
value=
""
placeholder=
"
<?php
<input
type=
"number"
pattern=
"\d*
|^[0-9]*$"
min=
"1"
max=
"99"
name=
"edad"
class=
"form-control input_user"
value=
""
placeholder=
"
<?php
if
(
$_POST
[
'idioma'
]
==
'Maya'
)
{
echo
"Ja'ab"
;
...
...
funcionalidad.zip
0 → 100644
View file @
917b96dc
File added
index.php
View file @
917b96dc
<!--
/* Coded by Ing. Ulises Morales Ramirez */
-->
<?php
include
'conexion.php'
;
$sql
=
"SELECT * FROM Inicial"
;
$result0
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Preescolar"
;
$result1
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Primaria"
;
$result2
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Secundaria"
;
$result3
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Media"
;
$result4
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Superior"
;
$result5
=
$conn
->
query
(
$sql
);
/*
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "id: " . $row["id"]. " - Name: " . $row["firstname"]. " " . $row["lastname"]. "<br>";
}
} else {
echo "0 results";
}
$conn->close();*/
?>
<!DOCTYPE html>
<html>
<head>
<title>
Mi Huella por la Paz - Yucatán
</title>
<!-- Favicon -->
...
...
@@ -98,7 +67,7 @@ $conn->close();*/
<input
type=
"hidden"
name=
"longitude"
id=
"longitude"
>
</div>
<div
class=
"input-group"
>
<div
id=
"suggesstion-box"
></div>
<div
id=
"suggesstion-box"
class=
"col-md-12"
></div>
</div>
<div
class=
""
style=
"color: white;"
>
...
...
@@ -151,57 +120,7 @@ $conn->close();*/
</div>
</div>
<script>
function
getLocation
()
{
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
showPosition
);
}
else
{
x
.
innerHTML
=
"Geolocation is not supported by this browser."
;
}
}
function
showPosition
(
position
)
{
$
(
"#latitude"
).
val
(
position
.
coords
.
latitude
);
$
(
"#longitude"
).
val
(
position
.
coords
.
longitude
);
}
$
(
document
).
ready
(
function
()
{
$
(
"#search-box"
).
keyup
(
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"readEscuelas.php"
,
data
:
'keyword='
+
$
(
this
).
val
(),
beforeSend
:
function
()
{
$
(
"#search-box"
).
css
(
"background"
,
"#FFF url(images/LoaderIcon.gif) no-repeat 165px"
);
},
success
:
function
(
data
)
{
$
(
"#suggesstion-box"
).
show
();
$
(
"#suggesstion-box"
).
html
(
data
);
$
(
"#search-box"
).
css
(
"background"
,
"#FFF"
);
}
});
});
});
function
selectCountry
(
val
,
clave
,
localidad
)
{
$
(
'#nombre_escuela'
).
empty
();
$
(
'#clave'
).
empty
();
$
(
'#titulo1'
).
empty
();
$
(
'#titulo2'
).
empty
();
$
(
"#search-box"
).
val
(
val
);
$
(
"#suggesstion-box"
).
hide
();
$
(
'#clave_escuela'
).
val
(
clave
);
$
(
'#nombre_escuela'
).
append
(
''
+
$
(
'#search-box'
).
val
());
$
(
'#titulo1'
).
append
(
'<h1><b>Escuela: </b></h1>'
);
$
(
'#titulo2'
).
append
(
'<h3><b>Localidad:</b></h3>'
);
$
(
'#clave'
).
append
(
localidad
);
$
(
'#next'
).
attr
(
"disabled"
,
false
);
}
</script>
<script
src=
"script.js"
></script>
</body>
</html>
insertar.php
View file @
917b96dc
...
...
@@ -16,7 +16,7 @@ $nombre = str_replace("'","''",$_POST['nombre']);
$comentario
=
str_replace
(
"'"
,
"''"
,
$_POST
[
'comentario'
]);
$sql
=
"INSERT INTO `respuesta`(`id_respuesta`, `clave_escuela`, `idioma`, `nombre`, `edad`, `comentario`, `fecha`, `REMOTE_ADDR`, `HTTP_USER_AGENT`, `latitude`, `longitude`) VALUES (null ,'"
.
$_SESSION
[
'clave_escuela'
]
.
"','"
.
$_POST
[
'idioma'
]
.
"','"
.
$nombre
.
"',"
.
$_POST
[
'edad'
]
.
",'"
.
$comentario
.
"', CURRENT_TIMESTAMP,'"
.
$_SERVER
[
'REMOTE_ADDR'
]
.
"','"
.
$_SERVER
[
'HTTP_USER_AGENT'
]
.
"','"
.
$_SESSION
[
"latitude"
]
.
"','"
.
$_SESSION
[
"longitude"
]
.
"')"
;
$sql
=
"INSERT INTO `respuesta`(`id_respuesta`, `clave_escuela`, `idioma`, `nombre`, `edad`, `comentario`, `fecha`, `REMOTE_ADDR`, `HTTP_USER_AGENT`, `latitude`, `longitude`) VALUES (null ,'"
.
$_SESSION
[
'clave_escuela'
]
.
"','"
.
$_POST
[
'idioma'
]
.
"','"
.
$nombre
.
"',"
.
abs
(
$_POST
[
'edad'
])
.
",'"
.
$comentario
.
"', CURRENT_TIMESTAMP,'"
.
$_SERVER
[
'REMOTE_ADDR'
]
.
"','"
.
$_SERVER
[
'HTTP_USER_AGENT'
]
.
"','"
.
$_SESSION
[
"latitude"
]
.
"','"
.
$_SESSION
[
"longitude"
]
.
"')"
;
if
(
$conn
->
query
(
$sql
)
===
TRUE
)
{
echo
"New record created successfully"
;
...
...
ownStyle.css
View file @
917b96dc
...
...
@@ -308,7 +308,13 @@ input[type=number]::-webkit-outer-spin-button {
}
}
#suggesstion-box
{
position
:
absolute
;
height
:
20em
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
}
#country-list
{
list-style
:
none
;
z-index
:
1
;
position
:
absolute
;}
#country-list
{
list-style
:
none
;
z-index
:
1
;
position
:
absolute
;
max-height
:
10px
}
#country-list
li
{
padding
:
10px
;
background
:
#f0f0f0
;
border-bottom
:
#bbb9b9
1px
solid
;}
#country-list
li
:hover
{
background
:
#ece3d2
;
cursor
:
pointer
;}
\ No newline at end of file
readEscuelas.php
View file @
917b96dc
...
...
@@ -2,7 +2,7 @@
include
"conexion.php"
;
if
(
!
empty
(
$_POST
[
"keyword"
]))
{
?>
<ul
id=
"country-list"
class=
"col-md-12 pull-right
"
>
<ul
id=
"country-list"
class=
"col-md-12 pull-right
dropdown"
>
<?php
$sql
=
'SELECT * FROM Inicial WHERE CV_CCT LIKE "%'
.
$_POST
[
'keyword'
]
.
'%" OR NOMBRECT LIKE "%'
.
$_POST
[
'keyword'
]
.
'%" LIMIT 0,6'
;
$result
=
$conn
->
query
(
$sql
);
...
...
script.js
0 → 100644
View file @
917b96dc
function
getLocation
()
{
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
showPosition
);
}
else
{
x
.
innerHTML
=
"Geolocation is not supported by this browser."
;
}
}
function
showPosition
(
position
)
{
$
(
"#latitude"
).
val
(
position
.
coords
.
latitude
);
$
(
"#longitude"
).
val
(
position
.
coords
.
longitude
);
}
$
(
document
).
ready
(
function
()
{
$
(
"#search-box"
).
keyup
(
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"readEscuelas.php"
,
data
:
'keyword='
+
$
(
this
).
val
(),
beforeSend
:
function
()
{
$
(
"#search-box"
).
css
(
"background"
,
"#FFF url(images/LoaderIcon.gif) no-repeat 165px"
);
},
success
:
function
(
data
)
{
$
(
"#suggesstion-box"
).
show
();
$
(
"#suggesstion-box"
).
html
(
data
);
$
(
"#search-box"
).
css
(
"background"
,
"#FFF"
);
}
});
});
});
function
selectCountry
(
val
,
clave
,
localidad
)
{
$
(
'#nombre_escuela'
).
empty
();
$
(
'#clave'
).
empty
();
$
(
'#titulo1'
).
empty
();
$
(
'#titulo2'
).
empty
();
//$("#suggesstion-box").empty();
$
(
"#search-box"
).
val
(
val
);
//
$
(
'#suggesstion-box'
).
empty
();
$
(
"#suggesstion-box"
).
hide
();
$
(
'#clave_escuela'
).
val
(
clave
);
$
(
'#nombre_escuela'
).
append
(
''
+
$
(
'#search-box'
).
val
());
$
(
'#titulo1'
).
append
(
'<h1><b>Escuela: </b></h1>'
);
$
(
'#titulo2'
).
append
(
'<h3><b>Localidad:</b></h3>'
);
$
(
'#clave'
).
append
(
localidad
);
$
(
'#next'
).
attr
(
"disabled"
,
false
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment