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
d7954779
Commit
d7954779
authored
Aug 08, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modificaciones:
responsivo no permita ingresar escuelas inexistentes
parent
d12fa8ca
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
854 additions
and
36 deletions
+854
-36
Escuelas.sql
Escuelas.sql
+808
-11
ajax_post.php
ajax_post.php
+13
-6
index.php
index.php
+6
-0
lenguaje.php
lenguaje.php
+27
-19
No files found.
Escuelas.sql
View file @
d7954779
This diff is collapsed.
Click to expand it.
ajax_post.php
View file @
d7954779
...
@@ -2,37 +2,44 @@
...
@@ -2,37 +2,44 @@
include
'conexion.php'
;
include
'conexion.php'
;
//echo $_POST['dato'];
//echo $_POST['dato'];
$sql
=
'SELECT * FROM
Preescolar WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$sql
=
'SELECT * FROM
Inicial WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
echo
"1"
;
echo
"1"
;
}
else
{
}
else
{
$sql
=
'SELECT * FROM Pr
imaria WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$sql
=
'SELECT * FROM Pr
eescolar WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
echo
"1"
;
echo
"1"
;
}
else
{
}
else
{
$sql
=
'SELECT * FROM
Secundaria WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$sql
=
'SELECT * FROM
Primaria WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
echo
"1"
;
echo
"1"
;
}
else
{
}
else
{
$sql
=
'SELECT * FROM
Media WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$sql
=
'SELECT * FROM
Secundaria WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
echo
"1"
;
echo
"1"
;
}
else
{
}
else
{
$sql
=
'SELECT * FROM
Superior WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$sql
=
'SELECT * FROM
Media WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
echo
"1"
;
echo
"1"
;
}
else
{
}
else
{
echo
"0"
;
$sql
=
'SELECT * FROM Superior WHERE CV_CCT LIKE "'
.
$_POST
[
'dato'
]
.
'" OR NOMBRECT LIKE "'
.
$_POST
[
'dato'
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
echo
"1"
;
}
else
{
echo
"0"
;
}
}
}
}
}
}
}
...
...
index.php
View file @
d7954779
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
<?php
<?php
include
'conexion.php'
;
include
'conexion.php'
;
$sql
=
"SELECT * FROM Inicial"
;
$result0
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Preescolar"
;
$sql
=
"SELECT * FROM Preescolar"
;
$result1
=
$conn
->
query
(
$sql
);
$result1
=
$conn
->
query
(
$sql
);
$sql
=
"SELECT * FROM Primaria"
;
$sql
=
"SELECT * FROM Primaria"
;
...
@@ -92,6 +94,10 @@ $conn->close();*/
...
@@ -92,6 +94,10 @@ $conn->close();*/
<datalist
id=
"Escuelas"
>
<datalist
id=
"Escuelas"
>
<?php
<?php
while
(
$row
=
$result0
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
' <br>('
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
')</option>'
;
//echo '<option value="'.utf8_encode($row["NOMBRECT"]).'">de '.utf8_encode($row["C_NOM_LOC"]).' <br>clave: '.utf8_encode($row["CV_CCT"]).'</option>';
}
while
(
$row
=
$result1
->
fetch_assoc
())
{
while
(
$row
=
$result1
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
' <br>('
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
')</option>'
;
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
' <br>('
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
')</option>'
;
//echo '<option value="'.utf8_encode($row["NOMBRECT"]).'">de '.utf8_encode($row["C_NOM_LOC"]).' <br>clave: '.utf8_encode($row["CV_CCT"]).'</option>';
//echo '<option value="'.utf8_encode($row["NOMBRECT"]).'">de '.utf8_encode($row["C_NOM_LOC"]).' <br>clave: '.utf8_encode($row["CV_CCT"]).'</option>';
...
...
lenguaje.php
View file @
d7954779
...
@@ -6,50 +6,58 @@
...
@@ -6,50 +6,58 @@
session_start
();
session_start
();
include
"conexion.php"
;
include
"conexion.php"
;
if
(
isset
(
$_POST
[
'escuela'
]))
{
if
(
isset
(
$_POST
[
'escuela'
]))
{
$control
=
0
;
$control
=
0
;
$arr
=
explode
(
" de "
,
$_POST
[
'escuela'
]);
$arr
=
explode
(
" de "
,
$_POST
[
'escuela'
]);
$_SESSION
[
"escuela"
]
=
$arr
[
0
];
$_SESSION
[
"escuela"
]
=
$arr
[
0
];
$_SESSION
[
"localidad"
]
=
$arr
[
1
];
$_SESSION
[
"localidad"
]
=
$arr
[
1
];
$_SESSION
[
"clave_escuela"
]
=
$_POST
[
'clave_escuela'
];
$_SESSION
[
"clave_escuela"
]
=
$_POST
[
'clave_escuela'
];
}
}
$sql
=
'SELECT * FROM
Preescolar WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$sql
=
'SELECT * FROM
Inicial WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
}
else
{
}
else
{
$sql
=
'SELECT * FROM Pr
imaria WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$sql
=
'SELECT * FROM Pr
eescolar WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
}
else
{
}
else
{
$sql
=
'SELECT * FROM
Secundaria WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$sql
=
'SELECT * FROM
Primaria WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
}
else
{
}
else
{
$sql
=
'SELECT * FROM
Media WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$sql
=
'SELECT * FROM
Secundaria WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
}
else
{
}
else
{
$sql
=
'SELECT * FROM
Superior WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$sql
=
'SELECT * FROM
Media WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
$result
=
$conn
->
query
(
$sql
);
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
if
(
$result
->
num_rows
>
0
)
{
}
else
{
}
else
{
header
(
"location: index.php?err=1"
);
$sql
=
'SELECT * FROM Superior WHERE CV_CCT LIKE "'
.
$_SESSION
[
"clave_escuela"
]
.
'" AND NOMBRECT LIKE "'
.
$_SESSION
[
"escuela"
]
.
'"'
;
mysql_close
();
$result
=
$conn
->
query
(
$sql
);
if
(
$result
->
num_rows
>
0
)
{
}
else
{
header
(
"location: index.php?err=1"
);
mysql_close
();
}
}
}
}
}
}
}
}
}
}
}
?>
?>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
...
@@ -86,7 +94,7 @@ if ($result->num_rows > 0) {
...
@@ -86,7 +94,7 @@ if ($result->num_rows > 0) {
</div>
</div>
<div
class=
"container col-md-12"
style=
"margin-top: 10%"
>
<div
class=
"container col-md-12"
style=
"margin-top: 10%"
>
<div
class=
"d-flex justify-content-center col-md-12 col-sm-12 col-xs-12"
>
<div
class=
"d-flex justify-content-center col-md-12 col-sm-12 col-xs-12"
>
<div
class=
"user_card"
>
<div
class=
"user_card"
>
...
@@ -107,15 +115,15 @@ if ($result->num_rows > 0) {
...
@@ -107,15 +115,15 @@ if ($result->num_rows > 0) {
<input
type=
"hidden"
name=
"escuela"
value=
"
<?=
$_SESSION
[
"escuela"
]
?>
"
>
<input
type=
"hidden"
name=
"escuela"
value=
"
<?=
$_SESSION
[
"escuela"
]
?>
"
>
<div
class=
"mt-4 text-center"
style=
"margin-top: -20px!important; color: white;"
>
<div
class=
"mt-4 text-center"
style=
"margin-top: -20px!important; color: white;"
>
<b>
<b>
<h1>
Escuela:
</h1>
<h1>
Escuela:
</h1>
<h2>
<?=
$_SESSION
[
"escuela"
]
?>
</h2>
<h2>
<?=
$_SESSION
[
"escuela"
]
?>
</h2>
<div
class=
"d-flex justify-content-center links"
style=
"margin-top: 100px!important;"
>
<div
class=
"d-flex justify-content-center links"
style=
"margin-top: 100px!important;"
>
<b>
¿EN QUÉ LENGUAJE DESEA CONTESTAR?
<b>
¿EN QUÉ LENGUAJE DESEA CONTESTAR?
<br>
<br>
¿BA'AX TI T'AANIL A K'AAT A NÚUKTIK?
</>
¿BA'AX TI T'AANIL A K'AAT A NÚUKTIK?
</>
</div>
</div>
</b>
</b>
</div>
</div>
...
@@ -141,7 +149,7 @@ if ($result->num_rows > 0) {
...
@@ -141,7 +149,7 @@ if ($result->num_rows > 0) {
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
...
...
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