From 25b2974ae6098e89b16cad0e377c7102380c5727 Mon Sep 17 00:00:00 2001
From: "jp.dev"
Date: Wed, 18 Nov 2020 02:09:41 -0300
Subject: [PATCH] +IOT server, Crud php.. sueltos php
---
Simple_IOT_WebServer/conexion.php | 29 +++++
Simple_IOT_WebServer/conf.css | 9 ++
Simple_IOT_WebServer/config.html | 71 +++++++++++
Simple_IOT_WebServer/estilo.css | 131 +++++++++++++++++++++
Simple_IOT_WebServer/estilo2.css | 84 +++++++++++++
Simple_IOT_WebServer/index.html | 60 ++++++++++
php/ESP8266/conexion.php | 19 +++
php/ESP8266/conexion2.php | 19 +++
php/ESP8266/consultas.sql | 10 ++
php/ESP8266/estilo.css | 120 +++++++++++++++++++
php/ESP8266/favicon.ico | Bin 0 -> 1560 bytes
php/ESP8266/index.html | 37 ++++++
php/LogIn_Crud/Conexion.php | 18 +++
php/LogIn_Crud/HTMLmodeloTabla.html | 36 ++++++
php/LogIn_Crud/Usuario.php | 82 +++++++++++++
php/LogIn_Crud/cssmodeloTabla.css | 63 ++++++++++
php/LogIn_Crud/editarUsuario.php | 12 ++
php/LogIn_Crud/editarUsuarioFormulario.php | 42 +++++++
php/LogIn_Crud/eliminarUsuario.php | 9 ++
php/LogIn_Crud/estilo.css | 120 +++++++++++++++++++
php/LogIn_Crud/index.html | 33 ++++++
php/LogIn_Crud/indexUsuario.php | 37 ++++++
php/LogIn_Crud/listarUsuarios.php | 65 ++++++++++
php/LogIn_Crud/login.php | 17 +++
php/LogIn_Crud/nuevoUsuario.php | 10 ++
php/index.php | 18 +++
php/index2.php | 5 +
php/redirect1.php | 10 ++
28 files changed, 1166 insertions(+)
create mode 100755 Simple_IOT_WebServer/conexion.php
create mode 100755 Simple_IOT_WebServer/conf.css
create mode 100755 Simple_IOT_WebServer/config.html
create mode 100755 Simple_IOT_WebServer/estilo.css
create mode 100755 Simple_IOT_WebServer/estilo2.css
create mode 100755 Simple_IOT_WebServer/index.html
create mode 100755 php/ESP8266/conexion.php
create mode 100644 php/ESP8266/conexion2.php
create mode 100755 php/ESP8266/consultas.sql
create mode 100755 php/ESP8266/estilo.css
create mode 100644 php/ESP8266/favicon.ico
create mode 100755 php/ESP8266/index.html
create mode 100755 php/LogIn_Crud/Conexion.php
create mode 100755 php/LogIn_Crud/HTMLmodeloTabla.html
create mode 100755 php/LogIn_Crud/Usuario.php
create mode 100755 php/LogIn_Crud/cssmodeloTabla.css
create mode 100755 php/LogIn_Crud/editarUsuario.php
create mode 100755 php/LogIn_Crud/editarUsuarioFormulario.php
create mode 100755 php/LogIn_Crud/eliminarUsuario.php
create mode 100755 php/LogIn_Crud/estilo.css
create mode 100755 php/LogIn_Crud/index.html
create mode 100755 php/LogIn_Crud/indexUsuario.php
create mode 100755 php/LogIn_Crud/listarUsuarios.php
create mode 100755 php/LogIn_Crud/login.php
create mode 100755 php/LogIn_Crud/nuevoUsuario.php
create mode 100755 php/index.php
create mode 100644 php/index2.php
create mode 100644 php/redirect1.php
diff --git a/Simple_IOT_WebServer/conexion.php b/Simple_IOT_WebServer/conexion.php
new file mode 100755
index 0000000..b3b5603
--- /dev/null
+++ b/Simple_IOT_WebServer/conexion.php
@@ -0,0 +1,29 @@
+begin_transaction();
+ $pst = $conexion->prepare("INSERT INTO GARDENER(id,fechaBG,hum1,hum2,hum3,hum4,tempsup,humsup,tempinf,huminf,tempext,humext) values(?,?,?,?,?,?,?,?,?,?,?,?)");
+ //bind_param recive i=enteros d=double o decimal s=cadena b=boolean
+ $pst->bind_param('isiiiidididi',$id,$fecha,$hum1,$hum2,$hum3,$hum4,$tempsup,$humsup,$tempinf,$huminf,$tempext,$humext);
+ $pst->execute();
+ $conexion->commit();
+
+ echo "Datos Enviados, Volver ";
+?>
\ No newline at end of file
diff --git a/Simple_IOT_WebServer/conf.css b/Simple_IOT_WebServer/conf.css
new file mode 100755
index 0000000..a49f0a6
--- /dev/null
+++ b/Simple_IOT_WebServer/conf.css
@@ -0,0 +1,9 @@
+body {background-color:lightgreen;}
+h1 { font-family:verdana;color:darkgreen;text-align:center;}
+p {font-family:helvetica;font-size: 20px;color:darkblue;}
+h2 {font-family:verdana;color:darkgreen;}
+h3 {font-family:verdana;color:darkgreen;}
+input[type=number], select {padding:6px 8px;margin:2px 0;display:inline-block;border:1px solid #ccc;border-radius:8px;width:40px;box-sizing:content-box;}
+input[type=password], select {padding:12px 20px;margin:8px 0;display:inline-block;border:1px solid #ccc;border-radius:4px;width:300px;box-sizing:content-box;}
+input[type=submit]:hover {background-color:#45a049;}
+input[type=submit], select {width:200px;background-color: #4CAF50;color:white;padding:14px 20px;margin: 8px 0;border: none;border-radius:4px;cursor:pointer;}
\ No newline at end of file
diff --git a/Simple_IOT_WebServer/config.html b/Simple_IOT_WebServer/config.html
new file mode 100755
index 0000000..4c1b082
--- /dev/null
+++ b/Simple_IOT_WebServer/config.html
@@ -0,0 +1,71 @@
+
+
+
+
+ Configuracion Babylon
+
+
+
+
+
+
+
+
+
+
+ Humedad Macetas:
+ Minimo:
+
+ Maximo:
+
+
+
+ Temp Superior MIN:
+
+ Temp Superior MAX:
+
+
+ Humedad Sup MIN:
+
+ Humedad Sup MAX:
+
+
+
+ Temp Inferior MIN:
+
+ Temp Inferior MAX:
+
+
+ Humedad Inf MIN:
+
+ Humedad Inf MAX:
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Simple_IOT_WebServer/estilo.css b/Simple_IOT_WebServer/estilo.css
new file mode 100755
index 0000000..108ba76
--- /dev/null
+++ b/Simple_IOT_WebServer/estilo.css
@@ -0,0 +1,131 @@
+body {
+ background-color: lightgreen;
+}
+
+h1 {
+ font-family: verdana;
+ color: darkgreen;
+ text-align: center;
+}
+
+p {
+ font-family: verdana;
+ font-size: 20px;
+ color: darkblue;
+}
+
+h2 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+h3 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+
+input[type=text], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 2px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=number], select {
+ padding: 2px 4px;
+ /*margin: 8px 0;*/
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 8px;
+ width: 50px;
+ box-sizing: content-box;
+}
+
+input[type=descripcion], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit], select {
+ width: 200px;
+ background-color: #4CAF50;
+ color: white;
+ padding: 14px 20px;
+ margin: 8px 0;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+input[type=password], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit]:hover {
+ background-color: #45a049;
+}
+
+.celdas {
+ width: 300px;
+ /*box-sizing: content-box;*/
+}
+
+.cssTabla {
+ padding:2px;
+ border: 2px solid red;
+ border-radius: 8px;
+ border-style:
+ width: 100%;
+}
+.datagrid table {
+ border-collapse: collapse; text-align: left; width: 100%;
+}
+.datagrid {
+ font: normal 12px/150% Arial, Helvetica, sans-serif;
+ background: #fff; overflow: hidden; border: 1px solid #991821;
+ -webkit-border-radius: 13px; -moz-border-radius: 13px; border-radius: 13px;
+}
+.datagrid table td, .datagrid table th {
+ padding: 10px 5px;
+}
+.datagrid table thead th {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #991821), color-stop(1, #80141C) );
+ background:-moz-linear-gradient( center top, #991821 5%, #80141C 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#991821', endColorstr='#80141C');
+ background-color:#991821; color:#FFFFFF; font-size: 15px; font-weight: bold;
+ border-left: 1px solid #B01C26;
+}
+.datagrid table thead th:first-child {
+ border: none;
+}
+.datagrid table tbody td {
+ color: #80141C; border-left: 1px solid #F7CDCD;font-size: 12px;font-weight: normal;
+}
+.datagrid table tbody .alt td {
+ background: #F7CDCD; color: #80141C;
+}
+.datagrid table tbody td:first-child {
+ border-left: none;
+}
+.datagrid table tbody tr:last-child td {
+ border-bottom: none;
+}
+
diff --git a/Simple_IOT_WebServer/estilo2.css b/Simple_IOT_WebServer/estilo2.css
new file mode 100755
index 0000000..99437fd
--- /dev/null
+++ b/Simple_IOT_WebServer/estilo2.css
@@ -0,0 +1,84 @@
+body {
+ background-color: lightgreen;
+}
+
+h1 {
+ font-family: verdana;
+ color: darkgreen;
+ text-align: center;
+}
+
+p {
+ font-family: helvetica;
+ font-size: 20px;
+ color: darkblue;
+}
+
+h2 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+h3 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+
+input[type=text], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 2px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=number], select {
+ padding: 6px 8px;
+ margin: 2px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 8px;
+ width: 40px;
+ box-sizing: content-box;
+}
+
+input[type=descripcion], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit], select {
+ width: 200px;
+ background-color: #4CAF50;
+ color: white;
+ padding: 14px 20px;
+ margin: 8px 0;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+input[type=password], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit]:hover {
+ background-color: #45a049;
+}
diff --git a/Simple_IOT_WebServer/index.html b/Simple_IOT_WebServer/index.html
new file mode 100755
index 0000000..2e6a863
--- /dev/null
+++ b/Simple_IOT_WebServer/index.html
@@ -0,0 +1,60 @@
+
+
+
+
+ Guardar en PruebaDB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/php/ESP8266/conexion.php b/php/ESP8266/conexion.php
new file mode 100755
index 0000000..553c893
--- /dev/null
+++ b/php/ESP8266/conexion.php
@@ -0,0 +1,19 @@
+begin_transaction();
+ $pst = $conexion->prepare("INSERT INTO tabla_prueba(Fecha_INO,Temperatura,Humedad) values(?,?,?)");
+ //bind_param recive i=enteros d=double o decimal s=cadena b=boolean
+ $pst->bind_param('sdi',$fecha,$temperatura,$humedad);
+ $pst->execute();
+ $conexion->commit();
+ echo "Datos Enviados, Volver ";
+?>
\ No newline at end of file
diff --git a/php/ESP8266/conexion2.php b/php/ESP8266/conexion2.php
new file mode 100644
index 0000000..3a37123
--- /dev/null
+++ b/php/ESP8266/conexion2.php
@@ -0,0 +1,19 @@
+begin_transaction();
+ $pst = $conexion->prepare("INSERT INTO tabla_prueba(Fecha_INO,Temperatura,Humedad) values(?,?,?)");
+ //bind_param recive i=enteros d=double o decimal s=cadena b=boolean
+ $pst->bind_param('sdi',$fecha,$temp,$hum);
+ $pst->execute();
+ $conexion->commit();
+ echo "Datos Enviados, Volver ";
+?>
diff --git a/php/ESP8266/consultas.sql b/php/ESP8266/consultas.sql
new file mode 100755
index 0000000..d939941
--- /dev/null
+++ b/php/ESP8266/consultas.sql
@@ -0,0 +1,10 @@
+-- select User from mysql.user;
+-- show grants for 'usuario_pruebas';
+-- revoke all privileges on *.* from 'usuario-test'@'%';
+-- flush privileges;
+-- drop user 'usuario-test';
+-- create user usuario_pruebas identified by '*******';
+-- grant all privileges on pruebadb.tabla_prueba to usuario_pruebas@'%';
+-- show grants;
+
+insert into tabla_prueba (Fecha_INO,Temperatura,Humedad) values ('2018-08-29 20:30', '24.3', '41');
\ No newline at end of file
diff --git a/php/ESP8266/estilo.css b/php/ESP8266/estilo.css
new file mode 100755
index 0000000..a50d41d
--- /dev/null
+++ b/php/ESP8266/estilo.css
@@ -0,0 +1,120 @@
+body {
+ background-color: lightgreen;
+}
+
+h1 {
+ font-family: verdana;
+ color: darkgreen;
+ text-align: center;
+}
+
+p {
+ font-family: verdana;
+ font-size: 20px;
+}
+
+h2 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+h3 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+
+input[type=text], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 2px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=descripcion], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit], select {
+ width: 200px;
+ background-color: #4CAF50;
+ color: white;
+ padding: 14px 20px;
+ margin: 8px 0;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+input[type=password], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit]:hover {
+ background-color: #45a049;
+}
+
+.celdas {
+ width: 300px;
+ /*box-sizing: content-box;*/
+}
+
+.cssTabla {
+ padding:2px;
+ border: 2px solid red;
+ border-radius: 8px;
+ border-style:
+ width: 100%;
+}
+.datagrid table {
+ border-collapse: collapse; text-align: left; width: 100%;
+}
+.datagrid {
+ font: normal 12px/150% Arial, Helvetica, sans-serif;
+ background: #fff; overflow: hidden; border: 1px solid #991821;
+ -webkit-border-radius: 13px; -moz-border-radius: 13px; border-radius: 13px;
+}
+.datagrid table td, .datagrid table th {
+ padding: 10px 5px;
+}
+.datagrid table thead th {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #991821), color-stop(1, #80141C) );
+ background:-moz-linear-gradient( center top, #991821 5%, #80141C 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#991821', endColorstr='#80141C');
+ background-color:#991821; color:#FFFFFF; font-size: 15px; font-weight: bold;
+ border-left: 1px solid #B01C26;
+}
+.datagrid table thead th:first-child {
+ border: none;
+}
+.datagrid table tbody td {
+ color: #80141C; border-left: 1px solid #F7CDCD;font-size: 12px;font-weight: normal;
+}
+.datagrid table tbody .alt td {
+ background: #F7CDCD; color: #80141C;
+}
+.datagrid table tbody td:first-child {
+ border-left: none;
+}
+.datagrid table tbody tr:last-child td {
+ border-bottom: none;
+}
+
diff --git a/php/ESP8266/favicon.ico b/php/ESP8266/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..88ad7d9f16a01a11eff6e8fccc53e4fcdb290abf
GIT binary patch
literal 1560
zcmV+z2Iu*SP)d)Ixv?m+P73IXRDKYnpC}5H`(F%(nZJ>2z<@G<(7#rxK=lQAF%-3|OSpEe&~j
z7Ykk4rMES&=UZi^j9nXMxNnfyNB}nwvu!(UnuAG^z8jYHdC;;B$5N?J{x85%xBJD_
z9?xTyEgSgFOM7RWe>j9}Y~*4z!H4gkVW@Y2k^Uj#v%o3ao(`F2cg(UnuUppXU@CQ3
zM5ez2P)d2$>~dA^Iq(b{H#NcV7_4Xk+lJ~2*m^hocnh+sj*gB?v>*Qnf8Wpy
zaC96aEsUp9Lm|_AYcP@6a}&VpbUv~!Kff)vb_sud|1UFxdkerc;rK`JZacJ}g;)Ys
z)xp}8aPJ0KzXmDDqod;z@4R-D&ySyBYBC~!4~JJEA{nc8yIdaIpO+TW6fR9){PC!pOg8X8y(ra2n9G8aCYlPy8Ho2XtMAB5$S=4u^weI-N{d
z)=&nJr|Wl@IGuIH%c@wpvKB&Sz8S_V5eL;Y=VrXtv<)u23BzaL
z#l2AFgXdp?O+SV4Amf1$v57Digha&70CIGFIlyq&6`tMq0)ZPbIQ0sQo`=&1Vf($%
z_ByQF3H2?|`e#^H1qYsk{?l-<6-tY^aJ~~gnZg#C$ZS)klyhxvZf{w3b_GBhFg){QvhXFucU$DJH$J51H>bu`^|2itbE;C^5;#FKEo1O7Du<3VU_
z0AOrz1OPLg4g%-^`I>fDmZqusCpvE17@CHm6pnC&;SVlwwf&zQ{PmwGyrr0;TT3V|
zFU42s*<0~q}G%fnOt^km-?LY?L*7X(h2cI?!w(Q=GQ`hP4>}0gBkEq{|+p-`M
zB^rqmy?l)U;G76A8#;?hyf_RUYit4$VcNE@0_aL9XJcO8^7(+g>S~&rns|2iZoDNW
zJoeO6C{5$^$&-xq_7b>u4gLCcbfs`8h1;@`(E!%$j3c&fP1$xQfbKSohJ0Pm)L(!l
z_4S;1`)%<13Htq9{^ASnyZ?S_Yij|BMx&fOaf05iE&_f(@&10C^RAqjWrb2O2%yDH
zb9Bey13=Q@VC}kf^AjW|Cx;z7ck;x(ef+Yum1$kSsXZkU6pNvYMJ*
z_4V~t!B8lBvDeE&8X6cNOVe)hndx+3LBKqa0Bt~Fd)bQz^5+Fcuq1
z5x4F14a+(=7r)@I;+se*wFqz(I2`wQoX&=6%jzFD%>#2kj{g8dVyeW(zi9jb0000<
KMNUMnLSTYFXzp47
literal 0
HcmV?d00001
diff --git a/php/ESP8266/index.html b/php/ESP8266/index.html
new file mode 100755
index 0000000..60705bc
--- /dev/null
+++ b/php/ESP8266/index.html
@@ -0,0 +1,37 @@
+
+
+
+
+ Guardar en PruebaDB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/Conexion.php b/php/LogIn_Crud/Conexion.php
new file mode 100755
index 0000000..46c215f
--- /dev/null
+++ b/php/LogIn_Crud/Conexion.php
@@ -0,0 +1,18 @@
+tipo_de_base.':host='.$this->host.';dbname='.$this->nombre_de_base, $this->usuario, $this->contrasena);
+ }catch(PDOException $e){
+ echo 'Ha surgido un error y no se puede conectar a la base de datos. Detalle: ' . $e->getMessage();
+ exit;
+ }
+ }
+ }
+?>
\ No newline at end of file
diff --git a/php/LogIn_Crud/HTMLmodeloTabla.html b/php/LogIn_Crud/HTMLmodeloTabla.html
new file mode 100755
index 0000000..c93ae99
--- /dev/null
+++ b/php/LogIn_Crud/HTMLmodeloTabla.html
@@ -0,0 +1,36 @@
+
+
+
+ header header header header
+
+
+
+
+
+
+
+
+
+ data data data data
+
+
+ data data data data
+
+
+ data data data data
+
+ data data data data
+
+
+ data data data data
+
+
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/Usuario.php b/php/LogIn_Crud/Usuario.php
new file mode 100755
index 0000000..03e1afe
--- /dev/null
+++ b/php/LogIn_Crud/Usuario.php
@@ -0,0 +1,82 @@
+id_usuario=$id_usuario;
+ $this->nombre=$nombre;
+ $this->clave=$clave;
+ $this->descripcion=$descripcion;
+ }
+
+ public function login($nombre,$clave){
+ $conexion = new Conexion();
+ $consulta = $conexion->prepare('SELECT * FROM ' . self::TABLA . ' where nombre=:nombre and clave=:clave');
+ $consulta->bindParam(':nombre', $nombre);
+ $consulta->bindParam(':clave', $clave);
+ $consulta->execute();
+ $registros = $consulta->fetchAll();
+ if ($registros)
+ return true;
+ else
+ return false;
+ }
+
+ public function guardar($nombre,$password,$descripcion){
+ $conexion = new Conexion();
+ $consulta = $conexion->prepare('INSERT INTO ' . self::TABLA .' (nombre,clave,descripcion) VALUES(:nombre,:password,:descripcion)');
+ $consulta->bindParam(':nombre', $nombre);
+ $consulta->bindParam(':password', $password);
+ $consulta->bindParam(':descripcion', $descripcion);
+ $consulta->execute();
+ //$id_usuario = $conexion->lastInsertId();
+ $conexion = null;
+ }
+
+ public function getNombre(){
+ return $this->nombre;
+ }
+
+ public function verUsuarios(){
+ $conexion = new Conexion();
+ $consulta = $conexion->prepare('SELECT id_usuario,nombre,clave,descripcion FROM ' . self::TABLA . ' ORDER BY id_usuario desc');
+ $consulta->execute();
+ $registros = $consulta->fetchAll();
+ return $registros;
+ }
+
+ public function eliminar($id_usuario){
+ $conexion = new Conexion();
+ $consulta = $conexion->prepare('DELETE FROM ' . self::TABLA .' WHERE id_usuario=:id_usuario');
+ $consulta->bindParam(':id_usuario', $id_usuario);
+ $consulta->execute();
+ $conexion = null;
+ }
+
+ public function editar($id_usuario, $nombre, $password, $descripcion ){//<--- AƱadido
+ $conexion = new Conexion();
+ $consulta = $conexion->prepare('UPDATE ' . self::TABLA . ' SET nombre=:nombre, clave=:password, descripcion=:descripcion WHERE id_usuario=:id_usuario');
+ $consulta->bindParam(':id_usuario', $id_usuario);
+ $consulta->bindParam(':nombre', $nombre);
+ $consulta->bindParam(':password', $password);
+ $consulta->bindParam(':descripcion', $descripcion);
+ $consulta->execute();
+ $conexion = null;
+ }
+
+ public function verUsuario($id_usuario){
+ $conexion = new Conexion();
+ $consulta = $conexion->prepare('SELECT id_usuario,nombre,clave,descripcion FROM ' . self::TABLA . ' WHERE id_usuario=:id_usuario');
+ $consulta->bindParam(':id_usuario', $id_usuario);
+ $consulta->execute();
+ $registros = $consulta->fetchAll();
+ return $registros;
+ }
+}
+?>
\ No newline at end of file
diff --git a/php/LogIn_Crud/cssmodeloTabla.css b/php/LogIn_Crud/cssmodeloTabla.css
new file mode 100755
index 0000000..346476a
--- /dev/null
+++ b/php/LogIn_Crud/cssmodeloTabla.css
@@ -0,0 +1,63 @@
+.datagrid table {
+ border-collapse: collapse; text-align: left; width: 100%;
+}
+.datagrid {
+ font: normal 12px/150% Arial, Helvetica, sans-serif;
+ background: #fff; overflow: hidden; border: 1px solid #991821;
+ -webkit-border-radius: 13px; -moz-border-radius: 13px; border-radius: 13px;
+}
+.datagrid table td, .datagrid table th {
+ padding: 10px 5px;
+}
+.datagrid table thead th {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #991821), color-stop(1, #80141C) );
+ background:-moz-linear-gradient( center top, #991821 5%, #80141C 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#991821', endColorstr='#80141C');
+ background-color:#991821; color:#FFFFFF; font-size: 15px; font-weight: bold;
+ border-left: 1px solid #B01C26;
+}
+.datagrid table thead th:first-child {
+ border: none;
+}
+.datagrid table tbody td {
+ color: #80141C; border-left: 1px solid #F7CDCD;font-size: 12px;font-weight: normal;
+}
+.datagrid table tbody .alt td {
+ background: #F7CDCD; color: #80141C;
+}
+.datagrid table tbody td:first-child {
+ border-left: none;
+}
+.datagrid table tbody tr:last-child td {
+ border-bottom: none;
+}
+.datagrid table tfoot td div {
+ border-top: 1px solid #991821;background: #F7CDCD;
+}
+.datagrid table tfoot td {
+ padding: 0; font-size: 12px
+}
+.datagrid table tfoot td div{
+ padding: 2px;
+}
+.datagrid table tfoot td ul {
+ margin: 0; padding:0; list-style: none; text-align: right;
+}
+.datagrid table tfoot li {
+ display: inline;
+}
+.datagrid table tfoot li a {
+ text-decoration: none; display: inline-block; padding: 2px 8px; margin: 1px;color: #FFFFFF;
+ border: 1px solid #991821;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #991821), color-stop(1, #80141C) );
+ background:-moz-linear-gradient( center top, #991821 5%, #80141C 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#991821', endColorstr='#80141C');
+ background-color:#991821;
+}
+.datagrid table tfoot ul.active, .datagrid table tfoot ul a:hover {
+ text-decoration: none;border-color: #80141C; color: #FFFFFF;
+ background: none; background-color:#991821;
+}
+div.dhtmlx_window_active, div.dhx_modal_cover_dv {
+ position: fixed !important;
+}
diff --git a/php/LogIn_Crud/editarUsuario.php b/php/LogIn_Crud/editarUsuario.php
new file mode 100755
index 0000000..028bf99
--- /dev/null
+++ b/php/LogIn_Crud/editarUsuario.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/editarUsuarioFormulario.php b/php/LogIn_Crud/editarUsuarioFormulario.php
new file mode 100755
index 0000000..0fde288
--- /dev/null
+++ b/php/LogIn_Crud/editarUsuarioFormulario.php
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+ Editar Usuario
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/eliminarUsuario.php b/php/LogIn_Crud/eliminarUsuario.php
new file mode 100755
index 0000000..77454a5
--- /dev/null
+++ b/php/LogIn_Crud/eliminarUsuario.php
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/estilo.css b/php/LogIn_Crud/estilo.css
new file mode 100755
index 0000000..a50d41d
--- /dev/null
+++ b/php/LogIn_Crud/estilo.css
@@ -0,0 +1,120 @@
+body {
+ background-color: lightgreen;
+}
+
+h1 {
+ font-family: verdana;
+ color: darkgreen;
+ text-align: center;
+}
+
+p {
+ font-family: verdana;
+ font-size: 20px;
+}
+
+h2 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+h3 {
+ font-family: verdana;
+ color: darkgreen;
+}
+
+
+input[type=text], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 2px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=descripcion], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit], select {
+ width: 200px;
+ background-color: #4CAF50;
+ color: white;
+ padding: 14px 20px;
+ margin: 8px 0;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+input[type=password], select {
+ /*width: 100%;*/
+ padding: 12px 20px;
+ margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ width: 300px;
+ box-sizing: content-box;
+}
+
+input[type=submit]:hover {
+ background-color: #45a049;
+}
+
+.celdas {
+ width: 300px;
+ /*box-sizing: content-box;*/
+}
+
+.cssTabla {
+ padding:2px;
+ border: 2px solid red;
+ border-radius: 8px;
+ border-style:
+ width: 100%;
+}
+.datagrid table {
+ border-collapse: collapse; text-align: left; width: 100%;
+}
+.datagrid {
+ font: normal 12px/150% Arial, Helvetica, sans-serif;
+ background: #fff; overflow: hidden; border: 1px solid #991821;
+ -webkit-border-radius: 13px; -moz-border-radius: 13px; border-radius: 13px;
+}
+.datagrid table td, .datagrid table th {
+ padding: 10px 5px;
+}
+.datagrid table thead th {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #991821), color-stop(1, #80141C) );
+ background:-moz-linear-gradient( center top, #991821 5%, #80141C 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#991821', endColorstr='#80141C');
+ background-color:#991821; color:#FFFFFF; font-size: 15px; font-weight: bold;
+ border-left: 1px solid #B01C26;
+}
+.datagrid table thead th:first-child {
+ border: none;
+}
+.datagrid table tbody td {
+ color: #80141C; border-left: 1px solid #F7CDCD;font-size: 12px;font-weight: normal;
+}
+.datagrid table tbody .alt td {
+ background: #F7CDCD; color: #80141C;
+}
+.datagrid table tbody td:first-child {
+ border-left: none;
+}
+.datagrid table tbody tr:last-child td {
+ border-bottom: none;
+}
+
diff --git a/php/LogIn_Crud/index.html b/php/LogIn_Crud/index.html
new file mode 100755
index 0000000..ffa0162
--- /dev/null
+++ b/php/LogIn_Crud/index.html
@@ -0,0 +1,33 @@
+
+
+
+
+ Login
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/indexUsuario.php b/php/LogIn_Crud/indexUsuario.php
new file mode 100755
index 0000000..755a8ce
--- /dev/null
+++ b/php/LogIn_Crud/indexUsuario.php
@@ -0,0 +1,37 @@
+
+
+
+
+ Crear Usuario
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/php/LogIn_Crud/listarUsuarios.php b/php/LogIn_Crud/listarUsuarios.php
new file mode 100755
index 0000000..4171ecf
--- /dev/null
+++ b/php/LogIn_Crud/listarUsuarios.php
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+ Usuarios
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ NOMBRE
+
+ DESCRIPCION
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/php/LogIn_Crud/login.php b/php/LogIn_Crud/login.php
new file mode 100755
index 0000000..fa35491
--- /dev/null
+++ b/php/LogIn_Crud/login.php
@@ -0,0 +1,17 @@
+
diff --git a/php/LogIn_Crud/nuevoUsuario.php b/php/LogIn_Crud/nuevoUsuario.php
new file mode 100755
index 0000000..a14051c
--- /dev/null
+++ b/php/LogIn_Crud/nuevoUsuario.php
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/php/index.php b/php/index.php
new file mode 100755
index 0000000..0bd6759
--- /dev/null
+++ b/php/index.php
@@ -0,0 +1,18 @@
+pulgadasCentimetros(array("pulgadas" => 2));
+ $funciones=$client->__getFunctions();
+ foreach ($result as &$valor) {
+ echo "El resultado es: ".$valor;
+ echo "
";
+ }
+ $num=0;
+ foreach ($funciones as &$valor) {
+ echo "Funcion(".$num."): ".$valor;
+ echo "
";
+ $num++;
+ }
+
+?>
\ No newline at end of file
diff --git a/php/index2.php b/php/index2.php
new file mode 100644
index 0000000..89bbe85
--- /dev/null
+++ b/php/index2.php
@@ -0,0 +1,5 @@
+
diff --git a/php/redirect1.php b/php/redirect1.php
new file mode 100644
index 0000000..c83450a
--- /dev/null
+++ b/php/redirect1.php
@@ -0,0 +1,10 @@
+