commit ffeed9f33d18a1f5d41d9adaa2650e81ba6755e0 Author: jdg Date: Sun Sep 12 22:52:08 2021 +0200 First commit 08/03/2002 diff --git a/README.md b/README.md new file mode 100644 index 0000000..f2d0182 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +#equipalsa + + +*08/03/2002* + +ToDo: wwtcf? + + +![screenshot](/equipalsa.png "Screenshot") diff --git a/common/config.inc.php b/common/config.inc.php new file mode 100644 index 0000000..3054caf --- /dev/null +++ b/common/config.inc.php @@ -0,0 +1,25 @@ +
$string
"; +}; + + +?> \ No newline at end of file diff --git a/common/dbnav_bar.php b/common/dbnav_bar.php new file mode 100644 index 0000000..f5a13f1 --- /dev/null +++ b/common/dbnav_bar.php @@ -0,0 +1,47 @@ +".mysql_error($conexion)); + $numrows = mysql_num_rows( $res ); + + $nav_buttons = "

"; + if ( $offset > 1 ) + $nav_buttons .= "<< Anterior -"; + else + $nav_buttons .= "<< Anterior -"; + if ( $numrows > 0 ) + { + $pages = intval( $numrows/$limit ); + if ( $numrows%$limit ) $pages++; + for ( $i=1;$i<=$pages;$i++) + { + $newoffset=$limit*($i-1); + if ( $newoffset == $offset ) + $nav_buttons .= "[$i]-"; + else + $nav_buttons .= "$i-"; + } + } + $nav_buttons .= "

"; + if ( ($offset+$limit)<$numrows ) + $nav_buttons .= "Siguiente >>"; + else + $nav_buttons .= "Siguiente >>"; + $nav_buttons .= "
"; +}; + +function ShowDBnav() +{ + global $nav_buttons; + echo $nav_buttons; +}; + +function GetDBnav() +{ + global $nav_buttons; + return $nav_buttons; +}; diff --git a/eq.css b/eq.css new file mode 100644 index 0000000..e8e8ccc --- /dev/null +++ b/eq.css @@ -0,0 +1,69 @@ + /* Enlaces */ + a { + color: #000000; + font-size: 9pt; + text-decoration: none; + } + + A:hover {color: #FF0000;} + + .a2 { + color: #303030; + font-size: 12pt; + font-weight: bold; + text-decoration: none; + } + + A:hover.a2 {color: #FF0000;} + + h1 { + color: #D8A60E; + font-size: 24pt; + font-weight: bold; + text-decoration: none; + } + +BODY { + scrollbar-face-color: #FFFFFF; + scrollbar-highlight-color: #000000; + scrollbar-3dlight-color: #FFFFFF; + scrollbar-darkshadow-color: #0000FF; + scrollbar-shadow-color: #FFFFFF; + scrollbar-arrow-color: #0000FF; + scrollbar-track-color: #FFFFFF; + font-family: arial, helvetica, sans-serif; + font-size: 10pt; + color: #000000; +} + + /* Tablas */ + td, th { + font-size: 10pt; + color: #000000; + text-align: justify;margin-right:5.0pt; + } + + .tdr { + font-size: 10pt; + color: #D8A60E; + text-align: right;margin-right:5.0pt; + } +/* formularios */ +input { + background-color: #242424; + border-width: 0; + border-color: #646464; + border-style: solid; + color: #CC3333; + font-size: 10pt; +} + +select { + background-color: #242424; + border-width: 1; + border-color: #646464; + border-style: solid; + color: #CC3333; + font-size: 10pt; +} + diff --git a/error.htm b/error.htm new file mode 100644 index 0000000..23f29b7 --- /dev/null +++ b/error.htm @@ -0,0 +1,62 @@ + + + + + +-= Coordinación de Stocks =- + + + + + + +


+
+

+
+ + + + + + +
+ + + + + + +
Coordinador + de Stocks
+ + + +
Error!
+
+
+
+ +


+

+ +

+ + Coordinador de Stocks
 Diseñado por JDsoft
     www.infdj.com + +

+ + diff --git a/foro.php b/foro.php new file mode 100644 index 0000000..391b254 --- /dev/null +++ b/foro.php @@ -0,0 +1,294 @@ +" ); + +require ("common/config.inc.php"); +require ("common/dbnav_bar.php"); + +$limit = 8; +if ( !isset( $offset ) ) $offset = 0; + + // Segun TIPO selecionamos las pelis + $conexion = mysql_connect( 'localhost', 'equipalsa_users', '06mar2002' ) OR die("No puedo conectar"); + $id = mysql_select_db( 'EQUIPALSA', $conexion ) OR die("No puedo abrir Base de Datos"); +?> + + + +-= foro =- + + + + + + +$consulta
".mysql_error($conexion)); +?> +
+ + + + +
+ + + + +
+

-foro-
+ -=[ Insertar nueva noticia ]=-

+ + + + +
  + + Hacer zoom (Iniciar en una ventana nueva) + +
+
+
+ + +".mysql_error($conexion)); + $NResp = mysql_result( $resp, 0, 'Respuestas' ); + + echo "". + "". + "". + ""; + } + // Fin del bucle de noticias (Cabeceras) +?> +
Fecha -AsuntoResp.Usuario..
$datos[4] -$datos[6]$NResp[-$datos[3]-]"; + if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) ) + echo ""; + echo ""; + if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) ) + echo "'\"Eliminar"; + echo "
+
+

+ + +
" method="POST"> +
+ + + + +
+ + + + +

-foro-
+ -=[ Insertando nueva + Noticia ]=-

+ + + + +
 Cancelar la operaci¢n actual
+
+
+ + + + + + + + + + +
[]

+
+
+
+ +$sql_ins
".mysql_error($conexion)); + + $dev = MakeBox( "

Tu \"Noticia\" ha sido insertada
-[ver noticias]-


" ); + } else { + $dev = MakeBox( "

No puedo insertar una noticia VACIA.
-[ver noticias]-


" ); + } + echo $dev; + } + // Actualizamos los datos + if ( strcmp( $accion, "edit" )==0 ) + { + if ( isset( $p_asunto ) && !empty( $p_asunto ) && + isset( $p_comentario ) && !empty( $p_comentario ) ) + { + if ( $user_id != 1 ) $ps_comentario = strip_tags($p_comentario); else $ps_comentario = $p_comentario; + $sql_upd = "UPDATE foro SET Asunto='$p_asunto', Comentario='$p_comentario' WHERE id=$new"; + $res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar la Actualizacion de la Noticia
$sql_upd
".mysql_error($conexion)); + $dev = MakeBox( "

Tu \"Noticia\" ha sido actualizada
-[ver noticias]-


" ); + } else { + $dev = MakeBox( "

No puedo modificar una noticia a VACIA.
-[ver noticias]-


" ); + } + echo $dev; + } + // Eliminamos la noticia + if ( strcmp( $accion, "del" )==0 ) + { + if ( isset( $new ) ) + { + $sql_upd = "DELETE FROM foro WHERE id=$new"; + $res = mysql_query( $sql_upd, $conexion ) OR die("No puedo eliminar la Noticia
$sql_upd
".mysql_error($conexion)); + $dev = MakeBox( "

La \"Noticia\" ha sido eliminada
-[ver noticias]-


" ); + } else { + $dev = MakeBox( "

No estas autorizado a eliminar esa Noticia
-[ver noticias]-


" ); + } + echo $dev; + } + } + + // VER NOTICIA + if ( strcmp( $accion, "vn" ) == 0 ) + { + $qFROM = "foro WHERE id=$nid OR post_ant=$nid"; + $consulta = "SELECT * FROM $qFROM ORDER BY id LIMIT $offset, $limit"; + $res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta
$consulta
".mysql_error($conexion)); + +?> +
+ + + + +
+ + + + +
+

-foro-
+ -=[ Responder a esta noticia ]=-

+ + + + +
  + + Hacer zoom (Iniciar en una ventana nueva) + +
+
+
+ +" . + "". + ""; + } +// Fin del bucle de noticias +?> +
". + "". + "". + "". + "". + "
$datos[4] - $datos[6][-$datos[3]-]"; + if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) ) + echo ""; + echo ""; + if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) ) + echo "'\"Eliminar"; + echo "

". nl2br($datos[7]) ."

+
-=[ volver al foro ]=-

+
+

+ + + diff --git a/gestion.php b/gestion.php new file mode 100644 index 0000000..c7dc928 --- /dev/null +++ b/gestion.php @@ -0,0 +1,60 @@ + 0 ) + { + $pwd = mysql_result( $res, 0, 'Password' ); + if ( strcmp( $pwd, $user_pwd ) == 0 ) + { + session_name( "EQUIPALSA" ); + $v1="user_id"; + $v2="user_name"; + $v3="user_auth"; + session_register($v1,$v2,$v3); + session_start(); + + $sin_error = true; + $user_id = mysql_result( $res, 0, "id" ); + $user_name = $user; + $user_auth = true; + $sin_error = true; + } + } + mysql_free_result($res); + mysql_close($conexion); + } + + if ( $sin_error == false ) + { + echo ""; + } else { +?> + + + + +-= Coordinación de Stocks =- + + + + + + + + + + + diff --git a/images/FlechaRight02.gif b/images/FlechaRight02.gif new file mode 100644 index 0000000..0c13009 Binary files /dev/null and b/images/FlechaRight02.gif differ diff --git a/images/bt-jdsoft0.gif b/images/bt-jdsoft0.gif new file mode 100644 index 0000000..8a57da8 Binary files /dev/null and b/images/bt-jdsoft0.gif differ diff --git a/images/bt-jdsoft1.gif b/images/bt-jdsoft1.gif new file mode 100644 index 0000000..1367319 Binary files /dev/null and b/images/bt-jdsoft1.gif differ diff --git a/images/enviar.gif b/images/enviar.gif new file mode 100644 index 0000000..7e9d9fe Binary files /dev/null and b/images/enviar.gif differ diff --git a/images/into.gif b/images/into.gif new file mode 100644 index 0000000..e510409 Binary files /dev/null and b/images/into.gif differ diff --git a/images/mbot.gif b/images/mbot.gif new file mode 100644 index 0000000..bc2d9c9 Binary files /dev/null and b/images/mbot.gif differ diff --git a/images/mficha0.gif b/images/mficha0.gif new file mode 100644 index 0000000..c5a4338 Binary files /dev/null and b/images/mficha0.gif differ diff --git a/images/mficha1.gif b/images/mficha1.gif new file mode 100644 index 0000000..6ae08ba Binary files /dev/null and b/images/mficha1.gif differ diff --git a/images/mforo0.gif b/images/mforo0.gif new file mode 100644 index 0000000..8f745cc Binary files /dev/null and b/images/mforo0.gif differ diff --git a/images/mforo1.gif b/images/mforo1.gif new file mode 100644 index 0000000..b5a8373 Binary files /dev/null and b/images/mforo1.gif differ diff --git a/images/minfo.gif b/images/minfo.gif new file mode 100644 index 0000000..3617dca Binary files /dev/null and b/images/minfo.gif differ diff --git a/images/minsertar0.gif b/images/minsertar0.gif new file mode 100644 index 0000000..5be8847 Binary files /dev/null and b/images/minsertar0.gif differ diff --git a/images/minsertar1.gif b/images/minsertar1.gif new file mode 100644 index 0000000..1348375 Binary files /dev/null and b/images/minsertar1.gif differ diff --git a/images/mlistado0.gif b/images/mlistado0.gif new file mode 100644 index 0000000..47aba23 Binary files /dev/null and b/images/mlistado0.gif differ diff --git a/images/mlistado1.gif b/images/mlistado1.gif new file mode 100644 index 0000000..26f105b Binary files /dev/null and b/images/mlistado1.gif differ diff --git a/images/mlistadog0.gif b/images/mlistadog0.gif new file mode 100644 index 0000000..b4597e0 Binary files /dev/null and b/images/mlistadog0.gif differ diff --git a/images/mlistadog1.gif b/images/mlistadog1.gif new file mode 100644 index 0000000..3b72c5e Binary files /dev/null and b/images/mlistadog1.gif differ diff --git a/images/mnews0.gif b/images/mnews0.gif new file mode 100644 index 0000000..8f0e97c Binary files /dev/null and b/images/mnews0.gif differ diff --git a/images/mnews1.gif b/images/mnews1.gif new file mode 100644 index 0000000..9508b6d Binary files /dev/null and b/images/mnews1.gif differ diff --git a/images/mtop.gif b/images/mtop.gif new file mode 100644 index 0000000..bf3d479 Binary files /dev/null and b/images/mtop.gif differ diff --git a/images/separador.gif b/images/separador.gif new file mode 100644 index 0000000..99af6ee Binary files /dev/null and b/images/separador.gif differ diff --git a/images/topd.gif b/images/topd.gif new file mode 100644 index 0000000..646c0b2 Binary files /dev/null and b/images/topd.gif differ diff --git a/images/topt.gif b/images/topt.gif new file mode 100644 index 0000000..faf5c2e Binary files /dev/null and b/images/topt.gif differ diff --git a/images/toptd.gif b/images/toptd.gif new file mode 100644 index 0000000..7aa1b93 Binary files /dev/null and b/images/toptd.gif differ diff --git a/index.htm b/index.htm new file mode 100644 index 0000000..7978912 --- /dev/null +++ b/index.htm @@ -0,0 +1,90 @@ + + + + +-= Coordinación de Stocks =- + + + + + + +


+
+

+
+
+ + + + + +
+ + + + + + +
Coordinador + de Stocks
+ + + + + + +
+ + + + +
+ + + + + + + + +
Login:
Password:
+
+
+
Necesario para + actualizar tus stocks.Si no tienes, + solicitalos!.
+
+
+
+
+


+

+ +

+ + Coordinador de Stocks
 Diseñado por JDsoft
     www.infdj.com + +

+ + diff --git a/menu.htm b/menu.htm new file mode 100644 index 0000000..3eac8d5 --- /dev/null +++ b/menu.htm @@ -0,0 +1,81 @@ + + + + +Sin título Página normal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +


+
+
+
+
+
+

+
+ + + + + + +
+ Coordinador de Stocks
 Diseñado por JDsoft
     www.infdj.com +
+
+ + diff --git a/miFicha.php b/miFicha.php new file mode 100644 index 0000000..94eb812 --- /dev/null +++ b/miFicha.php @@ -0,0 +1,167 @@ + + + + + + +-= SYNCRO =- + + + + + + +$sql_upd
".mysql_error($conexion)); + } else { + if ( isset( $info_user ) ) + $consulta = "SELECT * FROM users WHERE id = ".$info_user; + else + $consulta = "SELECT * FROM users WHERE id = ".$user_id; + $res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta"); + if ( mysql_num_rows($res) > 0 ) + { + $nombre = mysql_result( $res, 0, 'Nombre' ); + $apellidos= mysql_result( $res, 0, 'Apellidos' ); + $email = mysql_result( $res, 0, 'e_Mail' ); + $tlf1 = mysql_result( $res, 0, 'Telefono1' ); + $tlf2 = mysql_result( $res, 0, 'Telefono2' ); + $tlf3 = mysql_result( $res, 0, 'Telefono3' ); + $tlf4 = mysql_result( $res, 0, 'Telefono4' ); + $url = mysql_result( $res, 0, 'url' ); + $calle = mysql_result( $res, 0, 'Calle' ); + $calle2 = mysql_result( $res, 0, 'Calle2' ); + $cp = mysql_result( $res, 0, 'CP' ); + $poblacion= mysql_result( $res, 0, 'Poblacion' ); + $provincia= mysql_result( $res, 0, 'Provincia' ); + $pwd = mysql_result( $res, 0, 'Password' ); + } + mysql_free_result($res); + } + mysql_close($conexion); + +if ( isset($info_user) ) $hidden_pwd = "hidden"; else $hidden_pwd =""; +?> +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Nombre:Apellidos:Password: +"; + else + echo ""; +?> +
Telefonos:Fax:
e-mail: Dirección pág. WEB: 
+ +
+ + + + + +
+ + + + + + + + + + + + + + +
Calle 
Población:Provincia: CP:
+
+ +
+
+
+ + + + \ No newline at end of file diff --git a/news.php b/news.php new file mode 100644 index 0000000..406b66a --- /dev/null +++ b/news.php @@ -0,0 +1,222 @@ + + + + +-= SYNCRO news =- + + + + + + +$consulta
".mysql_error($conexion)); +?> +
+ + + + +
+ + + + +
+

Coordinador -news-
+Insertar nueva noticia ]=-"; +?>

+ + + + +
  + + Hacer zoom (Iniciar en una ventana nueva) + +
+
+
+ +" . + "". + ""; + } +// Fin del bucle de noticias +?> +
". + "". + "". + "". + "". + "
$datos[3] - $datos[5][-$datos[2]-]"; + if ( $user_auth && ( $user_id == $datos[1] || $user_id == 1 ) ) + echo ""; + echo ""; + if ( $user_auth && ( $user_id == $datos[1] || $user_id == 1 ) ) + echo "'\"Eliminar"; + echo "

".nl2br($datos[6])."

+
+

+ + +
" method="POST"> +
+ + + + +
+ + + + +

SyNcro + -news-
+ -=[ Insertando nueva + Noticia]=-

+ + + + +
 Cancelar la operaci¢n actual
+
+
+ + + + + + + + + + +
[]

+
+
+
+ +$sql_ins
".mysql_error($conexion)); + + $dev = MakeBox( "

Tu \"Noticia\" ha sido insertada
-[ver noticias]-


" ); + } else { + $dev = MakeBox( "

No puedo insertar una noticia VACIA.
-[ver noticias]-


" ); + } + echo $dev; + } + // Actualizamos los datos + if ( strcmp( $accion, "edit" )==0 ) + { + if ( isset( $p_asunto ) && !empty( $p_asunto ) && + isset( $p_comentario ) && !empty( $p_comentario ) ) + { + $sql_upd = "UPDATE news SET Asunto='$p_asunto', Comentario='$p_comentario' WHERE id=$new"; + $res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar la Actualizacion de la Noticia
$sql_upd
".mysql_error($conexion)); + $dev = MakeBox( "

Tu \"Noticia\" ha sido actualizada
-[ver noticias]-


" ); + } else { + $dev = MakeBox( "

No puedo modificar una noticia a VACIA.
-[ver noticias]-


" ); + } + echo $dev; + } + // Eliminamos la noticia + if ( strcmp( $accion, "del" )==0 ) + { + if ( isset( $new ) ) + { + $sql_upd = "DELETE FROM news WHERE id=$new"; + $res = mysql_query( $sql_upd, $conexion ) OR die("No puedo eliminar la Noticia
$sql_upd
".mysql_error($conexion)); + $dev = MakeBox( "

La \"Noticia\" ha sido eliminada
-[ver noticias]-


" ); + } else { + $dev = MakeBox( "

No estas autorizado a eliminar esa Noticia
-[ver noticias]-


" ); + } + echo $dev; + } + } + mysql_close($conexion); +?> + + diff --git a/plantilla.htm b/plantilla.htm new file mode 100644 index 0000000..70ca0fc --- /dev/null +++ b/plantilla.htm @@ -0,0 +1,114 @@ + + + + + +-= Coordinación de Stocks =- + + + + + + +


+

+
+ + + + + +

 

+
+
+ +


+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FamiliaCódigoDescripción 
    
    
    
    
    
    
    
    
    
    
    
+
+ +


+

+ +

 

+ + diff --git a/portada.htm b/portada.htm new file mode 100644 index 0000000..0748fdf --- /dev/null +++ b/portada.htm @@ -0,0 +1,22 @@ + + + + + +-= Coordinación de Stocks =- + + + + + + +


+
+

+


+Estas páginas estan preparadas para una resolución de 1024x768, aunque fueron pensadas para su correcto funcionamiento en 800x600, con una configuración de barra de herramientas SIN TITULOS y la barra de direccion anexa a la de herramientas. +

+ + diff --git a/sql/Leeme.txt b/sql/Leeme.txt new file mode 100644 index 0000000..ed28979 --- /dev/null +++ b/sql/Leeme.txt @@ -0,0 +1,19 @@ +Este directorio contiene los ficheros que pueden ser usados para configurar la base de datos 'EQUIPALSA' que será usada por dichas páginas. + +Lo primero que debemos hacer, es crear la base de datos usando el programa 'mysql': + +mysql> CREATE DATABASE EQUIPALSA; +mysql> USE EQUIPALSA; + +Para crear las tablas necesarias: + +% mysql -p EQUIPALSA < cr_users_tbl.sql +% mysql -p EQUIPALSA < cr_prod_tbl.sql +% mysql -p EQUIPALSA < cr_pelis_user_tbl.sql +% mysql -p EQUIPALSA < cr_news_tbl.sql +% mysql -p EQUIPALSA < cr_foro_tbl.sql + +Para asignar los permisos: +% mysql -p SYNCRO < cr_global_key.sql + + diff --git a/sql/Pruebas.txt b/sql/Pruebas.txt new file mode 100644 index 0000000..e69de29 diff --git a/sql/cr_foro_tbl.sql b/sql/cr_foro_tbl.sql new file mode 100644 index 0000000..d74e247 --- /dev/null +++ b/sql/cr_foro_tbl.sql @@ -0,0 +1,28 @@ +# drop the "foro" table if it exists, then recreate it + +DROP TABLE IF EXISTS foro; + +CREATE TABLE foro +( + # /********************\ + #|* Datos Básicos *| + # \********************/ + id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, + post_ant SMALLINT, + owner SMALLINT, + Apodo VARCHAR(15), + fecha DATE, + hora TIME, + Asunto VARCHAR(40), + Comentario TEXT, + + # /************************\ + #|* CLAVES PK, SK *| + # \************************/ + + PRIMARY KEY (id) +); + +# Cargamos otros datos suministrados por defecto... +# LOAD DATA LOCAL INFILE "foro.txt" INTO TABLE personas; + diff --git a/sql/cr_global_key.sql b/sql/cr_global_key.sql new file mode 100644 index 0000000..c2e6e54 --- /dev/null +++ b/sql/cr_global_key.sql @@ -0,0 +1,9 @@ +######################################### +# Definimos 3 Nuevos USUARIOS # +# # +################# PERMISOS ESPECIFICOS ## +## +GRANT ALL PRIVILEGES ON SYNCRO.* to syncro_users@localhost + IDENTIFIED BY '29dic2001' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON SYNCRO.* to syncro_users@"%" + IDENTIFIED BY '29dic2001' WITH GRANT OPTION; diff --git a/sql/cr_news_tbl.sql b/sql/cr_news_tbl.sql new file mode 100644 index 0000000..bb92b6c --- /dev/null +++ b/sql/cr_news_tbl.sql @@ -0,0 +1,27 @@ +# drop the "pelis" table if it exists, then recreate it + +DROP TABLE IF EXISTS news; + +CREATE TABLE news +( + # /********************\ + #|* Datos Básicos *| + # \********************/ + id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, + owner SMALLINT, + Apodo VARCHAR(15), + fecha DATE, + hora TIME, + Asunto VARCHAR(40), + Comentario TEXT, + + # /************************\ + #|* CLAVES PK, SK *| + # \************************/ + + PRIMARY KEY (id) +); + +# Cargamos otros datos suministrados por defecto... +# LOAD DATA LOCAL INFILE "pelis.txt" INTO TABLE personas; + diff --git a/sql/cr_prod_tbl.sql b/sql/cr_prod_tbl.sql new file mode 100644 index 0000000..f53b913 --- /dev/null +++ b/sql/cr_prod_tbl.sql @@ -0,0 +1,25 @@ +# drop the "prod" table if it exists, then recreate it + +DROP TABLE IF EXISTS prod; + +CREATE TABLE prod +( + # /********************\ + #|* Datos Básicos *| + # \********************/ + id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, + familia SMALLINT, + desc VARCHAR(30), + Imagen BLOB, + filetype VARCHAR(50) + + # /************************\ + #|* CLAVES PK, SK *| + # \************************/ + + PRIMARY KEY (id), +); + +# Cargamos otros datos suministrados por defecto... +# LOAD DATA LOCAL INFILE "pelis.txt" INTO TABLE personas; + diff --git a/sql/cr_prod_users_tbl.sql b/sql/cr_prod_users_tbl.sql new file mode 100644 index 0000000..5c614ea --- /dev/null +++ b/sql/cr_prod_users_tbl.sql @@ -0,0 +1,20 @@ +# drop the "prod_user" table if it exists, then recreate it + +DROP TABLE IF EXISTS prod_user; + +CREATE TABLE prod_user +( + # /********************\ + #|* Datos Básicos *| + # \********************/ + user SMALLINT UNSIGNED NOT NULL REFERENCES users, + prod SMALLINT UNSIGNED NOT NULL REFERENCES prod, + stock SMALLINT + + PRIMARY KEY (user, prod) + +); + +# Cargamos otros datos suministrados por defecto... +# LOAD DATA LOCAL INFILE "pelis_user.txt" INTO TABLE personas; + diff --git a/sql/cr_users_tbl.sql b/sql/cr_users_tbl.sql new file mode 100644 index 0000000..ce4cb8c --- /dev/null +++ b/sql/cr_users_tbl.sql @@ -0,0 +1,43 @@ +# drop the "personas" table if it exists, then recreate it + +DROP TABLE IF EXISTS users; + +CREATE TABLE users +( + # /********************\ + #|* Datos Básicos *| + # \********************/ + id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, + Empresa VARCHAR(30) NOT NULL, + Nombre VARCHAR(15), + Apellidos VARCHAR(30), + + Telefono1 VARCHAR(15), + Telefono2 VARCHAR(15), + Telefono3 VARCHAR(15), + Telefono4 VARCHAR(15), + e_Mail VARCHAR(30), + url VARCHAR(50), + Calle VARCHAR(25), + Calle2 VARCHAR(25), + Num VARCHAR(4), + Piso VARCHAR(2), + Letra VARCHAR(2), + Poblacion VARCHAR(20), + Provincia VARCHAR(15), + CP SMALLINT, + + Password VARCHAR(15), + + Imagen BLOB, + + # /************************\ + #|* CLAVES PK, SK *| + # \************************/ + + PRIMARY KEY (id) +); + +# Cargamos otros datos suministrados por defecto... +# LOAD DATA LOCAL INFILE "personas.txt" INTO TABLE personas; + diff --git a/test.htm b/test.htm new file mode 100644 index 0000000..83366ec --- /dev/null +++ b/test.htm @@ -0,0 +1,18 @@ + + + + +-= Coordinación de Stocks =- + + + + + + + + + + +