First commit 31/12/2001

This commit is contained in:
José David Guillén 2021-09-12 22:53:35 +02:00
commit ec29dd1409
56 changed files with 2883 additions and 0 deletions

9
README.md Normal file
View File

@ -0,0 +1,9 @@
#SYNCRO
*31/12/2001*
ToDo: wwtcf?
![screenshot](/SYNCRO.png "Screenshot")

274
bajar-listado.php Normal file
View File

@ -0,0 +1,274 @@
<CORTAME: DESDE AQUI>
La lista esta tabulada, para que podais importarla en el excel
<CORTAME: HASTA AQUI>
ID Genero Status Titulo Duración NumCDs owner
086 101 Dálmatas Dib.Animado OK 00:00:00 1 2 celula
138 102 Dalmatas Comedia OK 01:30:00 1 6 ricardo
237 13 fantasmas Terror OK 00:00:00 0 3 lupen
035 15MINUTOS Cine Negro OK 00:00:00 1 3 lupen
289 7 días de vida Terror OK 00:00:00 1 2 celula
255 7 vidas Terror OK 00:00:00 1 5 dani
233 a si en el cielo como en la tierra Comedia OK 00:00:00 1 3 lupen
179 a todo gas Acción OK 00:00:00 0 3 lupen
264 Abre los Ojos C.Ficción OK 00:00:00 1 8 lumo
016 Airbag Comedia Por llegar 00:00:00 0 2 celula
017 Alien - El octavo pasajero C.Ficción Ripeando 00:00:00 0 2 celula
019 Alien III C.Ficción Ripeando 00:00:00 0 2 celula
020 Alien Resurrección C.Ficción Ripeando 00:00:00 0 2 celula
018 Aliens C.Ficción Ripeando 00:00:00 0 2 celula
205 Amelie SIN CLASIFICAR OK 00:00:00 2 6 ricardo
055 AMENAZA FANTASMA EPISODIO 1 C.Ficción OK 00:00:00 2 3 lupen
206 American pie 2 Comedia OK 00:00:00 2 6 ricardo
006 American psyco Intriga OK 00:00:00 1 2 celula
011 Anatomía de un asesinato Drama Ripeando 00:00:00 0 2 celula
194 Araña Mutante C.Ficción OK 01:26:00 1 2 celula
065 ASESINATO EN 8mm Intriga OK 00:00:00 1 3 lupen
166 Atlantis Dib.Animado OK 00:00:00 1 6 ricardo
168 Atlantis Dib.Animado OK 01:31:00 1 7 sires
001 Atmosfera Cero C.Ficción OK 01:44:00 1 2 celula
242 attica la carcel de la muerte SIN CLASIFICAR OK 00:00:00 1 5 dani
244 aun se lo que hicisteis el ultimo verano Terror OK 00:00:00 1 5 dani
296 Austin Powers II - La espía que ....... SIN CLASIFICAR OK 01:30:00 1 2 celula
273 bailando con lobos Oeste OK 00:00:00 1 3 lupen
107 bait Acción OK 00:00:00 0 3 lupen
124 Bajo Sospecha Intriga OK 00:00:00 1 7 sires
287 bandit Comedia OK 00:00:00 1 3 lupen
093 Bats (Murcielagos) Terror OK 00:00:00 1 7 sires
052 BICHOS Dib.Animado OK 00:00:00 1 3 lupen
076 Blancanieves Dib.Animado OK 00:00:00 1 2 celula
245 bowfinger el picaro Comedia OK 00:00:00 1 5 dani
070 BRAVEHEART Bélica OK 00:00:00 2 3 lupen
200 brother Acción OK 00:00:00 0 3 lupen
149 Buzzlightyear (la pelicula) Dib.Animado OK 00:00:00 1 7 sires
082 CADENA DE FAVORES Drama Para Alquilar 00:00:00 0 3 lupen
110 Call Girl Picantes OK 00:00:00 1 6 ricardo
175 Caminando entre dinosaurios Documental OK 03:00:00 3 7 sires
150 Caza al Terrorista SIN CLASIFICAR OK 00:00:00 1 1 jd
249 cherry falls Terror OK 00:00:00 1 5 dani
012 Ciudadano Kane Biografía Ripeando 00:00:00 0 2 celula
246 como perder la cabeza Comedia OK 00:00:00 1 5 dani
099 Como perros y gatos SIN CLASIFICAR OK 00:00:00 1 7 sires
235 conspiracion en la red Intriga OK 00:00:00 1 3 lupen
174 Conspiración en la Red Intriga OK 00:00:00 1 2 celula
004 Cube Fantástico OK 00:00:00 1 2 celula
247 cueste lo que cueste Comedia OK 00:00:00 1 5 dani
248 cut Terror OK 00:00:00 1 5 dani
238 d-tox Intriga OK 00:00:00 1 3 lupen
106 de vuelta a la tierra Comedia OK 00:00:00 0 3 lupen
151 Descubriemdo a Forrester SIN CLASIFICAR OK 00:00:00 1 1 jd
169 Destino de Caballero Acción OK 00:00:00 1 7 sires
182 destino de caballero Aventuras OK 00:00:00 1 3 lupen
284 dia de entrnamiento Intriga OK 00:00:00 1 3 lupen
152 Diario de un adicto al sexo Comedia OK 00:00:00 1 1 jd
250 dias contados Comedia OK 00:00:00 1 5 dani
030 Dime que no es verdad Comedia OK 00:00:00 1 2 celula
071 DINOSAURIO Animación OK 00:00:00 1 3 lupen
034 Dire Straits - On the night Musical OK 00:00:00 2 2 celula
277 dirty dancing Comedia OK 00:00:00 1 3 lupen
127 DOGMA Fantástico OK 00:00:00 1 3 lupen
085 Doraemon y las mil y una noches Dib.Animado OK 01:35:00 1 2 celula
075 Drácula - De brand stoker. Terror OK 00:00:00 1 2 celula
078 Dracula 2001 SIN CLASIFICAR OK 00:00:00 1 1 jd
056 DRAGONES Y MAZMORRAS C.Ficción OK 00:00:00 1 3 lupen
053 EL ARTE DE LA GUERRA Intriga OK 00:00:00 1 3 lupen
113 El Arte de la Guerra Acción OK 00:00:00 1 4 namet
252 el beso del dragon Acción OK 00:00:00 1 5 dani
143 El Bosque Animado Animación OK 01:23:00 1 6 ricardo
117 El cisne mudito Dib.Animado OK 00:00:00 1 6 ricardo
079 El Cuervo -3- Intriga OK 01:07:10 1 1 jd
060 EL DIARIO DE BRITGES JONES Comedia OK 00:00:00 1 3 lupen
057 EL DORADO Dib.Animado OK 00:00:00 1 3 lupen
153 El Emperador y sus locuras SIN CLASIFICAR OK 00:00:00 1 1 jd
251 el espinazo del diablo Terror OK 00:00:00 1 5 dani
134 El gigante de hierro Dib.Animado OK 00:00:00 1 2 celula
180 el golpe perfecto SIN CLASIFICAR OK 00:00:00 0 3 lupen
154 El Grinch Aventuras OK 00:00:00 1 1 jd
214 el hombre sin sombra C.Ficción OK 00:00:00 1 3 lupen
215 el juramento SIN CLASIFICAR OK 00:00:00 0 3 lupen
218 el mosquetero Acción OK 00:00:00 1 3 lupen
196 El pacto de los lobos Terror OK 00:01:35 2 5 dani
037 EL PLANETA DE LOS SIMIOS C.Ficción OK 00:00:00 1 3 lupen
148 El planeta de los Simios (2001) Acción OK 00:01:20 2 6 ricardo
253 el rey pasmado Biografía OK 00:00:00 1 5 dani
192 el sastre de panama Intriga OK 00:00:00 1 3 lupen
118 El señor de los anillos (dibujos) Animación Ripeando 00:00:00 1 6 ricardo
092 El sexto sentido Terror OK 00:00:00 1 7 sires
184 El Silencio de los corderos Intriga OK 00:00:00 2 7 sires
281 El ultimo escalon Terror OK 01:35:00 1 8 lumo
223 el unico Acción OK 00:00:00 1 3 lupen
230 El Unico Acción OK 00:00:00 1 6 ricardo
069 EN Q PIENSAN LAS MUJERES Comedia OK 00:00:00 1 3 lupen
183 Encuentros en la Tercera Fase C.Ficción OK 02:10:00 2 7 sires
049 ENEMIGO A LAS PUERTAS Bélica OK 00:00:00 1 3 lupen
201 estoy hecho un animal Comedia OK 00:00:00 1 3 lupen
195 Estoy hecho un animal Comedia OK 01:30:00 1 5 dani
125 Evasión en la granja Animación OK 00:00:00 1 6 ricardo
137 evulution C.Ficción OK 00:00:00 1 3 lupen
286 falsa identidad Intriga OK 00:00:00 1 3 lupen
067 FAMILI MEN Drama OK 00:00:00 0 3 lupen
221 fanatico Acción OK 00:00:00 1 3 lupen
211 Fantasmas de marte Acción OK 01:20:00 1 6 ricardo
173 Faust Terror OK 01:41:00 1 2 celula
207 Fausto 5.0 SIN CLASIFICAR OK 00:00:00 1 6 ricardo
263 Fausto 5.0 SIN CLASIFICAR OK 00:00:00 1 8 lumo
097 Final Fantasy C.Ficción OK 00:00:00 1 7 sires
080 fortaleza infernal II Acción OK 00:00:00 0 3 lupen
155 Fotaleza Infernal I C.Ficción OK 00:00:00 1 1 jd
089 Freddy Mercury Collection Musical Ripeando 00:00:00 0 2 celula
005 Fuego en el cuerpo Intriga OK 00:00:00 1 2 celula
141 gente pez Comedia OK 00:00:00 0 3 lupen
178 gente pez SIN CLASIFICAR OK 00:00:00 0 3 lupen
116 Ghost in the shell Animación OK 00:00:00 1 6 ricardo
096 Gladiator Drama OK 00:00:00 2 7 sires
162 Gozzila C.Ficción OK 02:13:31 2 7 sires
216 Harry Pother Aventuras OK 02:10:00 2 6 ricardo
144 Heavy Metal 2 - F.A.K.K.2 Animación OK 00:00:00 1 6 ricardo
050 HOMBRES DE HONOR Bélica OK 00:00:00 1 3 lupen
139 hora punta2 SIN CLASIFICAR OK 00:00:00 1 3 lupen
039 HUIDA DEL PLANETA DE LOS SIMIOS C.Ficción OK 00:00:00 1 3 lupen
109 I Swallow 14 Picantes OK 00:00:00 1 6 ricardo
204 IA C.Ficción Ripeando 00:00:00 0 2 celula
186 ingenuas y peligrosas Comedia OK 00:00:00 1 5 dani
266 Intacto Fantástico OK 01:30:00 1 8 lumo
208 Inteligencia Artificial SIN CLASIFICAR OK 00:00:00 2 6 ricardo
241 jay y bob Comedia OK 00:00:00 1 5 dani
270 jeepers creepers Terror OK 00:00:00 1 5 dani
275 johnny mnemonic C.Ficción OK 00:00:00 1 3 lupen
219 juana la loca Biografía OK 00:00:00 1 3 lupen
254 juego asesino Acción OK 00:00:00 1 5 dani
202 Kiriku y la buja Animación OK 00:00:00 1 6 ricardo
147 La bella Durmiente Dib.Animado OK 00:00:00 1 6 ricardo
163 La cabaña Terror OK 01:27:06 1 2 celula
041 LA CONQUISTA DEL PLANETA DE LOS SIMIOS C.Ficción OK 00:00:00 1 3 lupen
026 La cosa Terror OK 00:00:00 1 2 celula
131 La dama y el Vagabundo Dib.Animado OK 01:13:00 1 6 ricardo
112 La hoguera de las vanidades Comedia OK 00:00:00 1 2 celula
098 La Hora de la Araña Intriga OK 00:00:00 1 7 sires
217 La maldicion del escorpion de jade Comedia OK 00:00:00 1 6 ricardo
045 LA MOMIA C.Ficción OK 00:00:00 1 3 lupen
145 La naranja mecanica SIN CLASIFICAR OK 02:10:00 1 6 ricardo
087 La noche de los muertos vivientes (ByN) Terror OK 00:00:00 1 2 celula
028 La noche de los muertos vivientes (color) Terror OK 00:00:00 1 2 celula
227 la novena puerta Intriga OK 00:00:00 1 3 lupen
146 La pelicula de Tiger Dib.Animado OK 00:00:00 1 6 ricardo
282 La pervercion de Barbara Picantes OK 01:15:00 1 8 lumo
040 LA REBELION DEL PLANETA DE LOS SIMIOS C.Ficción OK 00:00:00 1 3 lupen
103 La Solución Final Histórica OK 01:31:54 1 7 sires
262 La sucia historia de Joe Guarro Comedia OK 00:00:00 1 8 lumo
203 la zona gris Drama OK 00:00:00 1 3 lupen
044 LAMOMIA2 C.Ficción OK 00:00:00 1 3 lupen
061 LAS ILUSIONES DE UN MENTIROSO Drama OK 00:00:00 1 3 lupen
027 Los Intocables de E.Ness Acción OK 00:00:00 2 2 celula
177 los limites del silencio SIN CLASIFICAR OK 00:00:00 0 3 lupen
210 los otros Intriga OK 00:00:00 1 3 lupen
088 Los Pazos de Ulloa Drama Ripeando 00:00:00 0 2 celula
130 Los Rios de Color Purpura Intriga OK 00:01:00 1 7 sires
171 Los rios de color purpura Intriga OK 01:41:00 1 1 jd
278 los ultimos dias del eden Intriga OK 00:00:00 1 3 lupen
158 Mad Max II - El guerrero de la carretera Acción OK 01:27:05 1 2 celula
023 Manolito gafotas - Mola ser jefe Comedia OK 01:32:00 1 2 celula
142 Manuelita Dib.Animado OK 01:23:00 1 6 ricardo
010 Matar a un ruiseñor Melodrama Ripeando 00:00:00 0 2 celula
224 matrix Fantástico OK 00:00:00 1 3 lupen
090 Matrix C.Ficción OK 00:00:00 2 7 sires
063 MAYBE BABY Comedia OK 00:00:00 1 3 lupen
121 men in black C.Ficción OK 00:00:00 1 3 lupen
190 menudo bocazas Comedia OK 00:00:00 1 3 lupen
172 Mi perro Skip Drama OK 00:00:00 1 2 celula
225 mirada de angel Drama OK 00:00:00 1 3 lupen
091 Misión a Marte C.Ficción OK 00:00:00 1 7 sires
269 Mision a marte Fantástico OK 01:45:00 1 8 lumo
105 Miss Agente Especial Comedia OK 01:45:40 1 7 sires
279 mothan C.Ficción OK 00:00:00 1 3 lupen
189 moulin rouge Musical OK 00:00:00 1 3 lupen
058 NAUFRAGO Catástrofe OK 00:00:00 1 3 lupen
229 ni una palabra Acción OK 00:00:00 1 3 lupen
280 Noche de miedo Terror OK 01:35:00 1 8 lumo
290 Nolosex 5 Picantes OK 00:00:00 1 2 celula
291 Nolosex 6 Picantes OK 00:00:00 1 2 celula
292 Nolosex 7 Picantes OK 00:00:00 1 2 celula
293 Nolosex 8 Picantes OK 00:00:00 1 2 celula
294 Nolosex 9 Picantes OK 00:00:00 1 2 celula
213 NOLOX IV Picantes OK 00:00:00 1 2 celula
132 NOLOX 1 Picantes OK 00:00:00 1 2 celula
133 NOLOX 2 Picantes OK 00:00:00 1 2 celula
212 NOLOX 3 Picantes OK 00:00:00 1 2 celula
267 Odisea 2010 Fantástico OK 01:55:00 1 8 lumo
165 Odissea 2001 C.Ficción OK 02:22:45 2 7 sires
032 Opera imaginare Musical OK 00:00:00 1 2 celula
123 Operación Swordfish Acción OK 00:00:00 1 7 sires
176 Osmosis Jones Animación OK 00:00:00 1 6 ricardo
209 pacto de lobos Terror OK 00:00:00 1 3 lupen
122 Parque Jurasico III Aventuras OK 00:00:00 1 7 sires
128 PEARL HARBOR SIN CLASIFICAR OK 00:00:00 2 3 lupen
226 pecado original Intriga OK 00:00:00 1 3 lupen
274 persiguiendo a betty Comedia OK 00:00:00 1 3 lupen
102 planes de boda Comedia OK 00:00:00 1 3 lupen
265 Planeta Rojo C.Ficción OK 01:50:00 1 8 lumo
119 Poseido Terror Ripeando 00:00:00 1 5 dani
240 Premonición Intriga OK 00:00:00 1 5 dani
199 q mas puede pasar Comedia OK 00:00:00 1 3 lupen
031 Queen greates Flix Musical OK 00:00:00 2 2 celula
077 Ranma ½ - Cap 1 al 5 Dib.Animado OK 00:00:00 1 1 jd
222 ratas a la carrera Comedia OK 00:00:00 1 3 lupen
268 Reflejos Intriga OK 01:40:00 1 8 lumo
220 reglas de compromiso Bélica OK 00:00:00 1 3 lupen
038 REGRESO AL PLANETA DE LOS SIMIOS C.Ficción OK 00:00:00 1 3 lupen
157 Replicant Acción OK 00:00:00 1 1 jd
074 Sade - Life promise Musical OK 00:00:00 1 2 celula
243 scary movie 2 Comedia OK 00:00:00 1 5 dani
115 Scream 3 Terror OK 00:00:00 1 4 namet
135 seductoras Comedia OK 00:00:00 1 3 lupen
114 Seven Intriga OK 00:00:00 1 4 namet
094 Shaft Acción OK 00:00:00 1 7 sires
234 shangai kid Acción OK 00:00:00 1 3 lupen
025 Shrek Dib.Animado OK 00:00:00 1 2 celula
042 SHREK Animación OK 00:00:00 1 3 lupen
228 sleepy hoyow Fantástico OK 00:00:00 1 3 lupen
059 SNATCH CERDOS Y DIAMANTES Drama OK 00:00:00 1 3 lupen
072 Socorro soy un Pez Dib.Animado OK 01:10:00 1 6 ricardo
136 soldier Acción OK 00:00:00 0 3 lupen
073 South Park - La película Animación OK 00:00:00 1 2 celula
239 spy game Cine Negro OK 00:00:00 1 3 lupen
161 Spy Kids Acción OK 00:00:00 1 6 ricardo
276 stalingrado Bélica OK 00:00:00 1 3 lupen
101 stigmata Intriga OK 00:00:00 0 3 lupen
029 Superman clasic cartoons Dib.Animado OK 00:00:00 1 2 celula
167 Sylvia´s creams Picantes OK 01:20:00 1 6 ricardo
051 TARZAN Dib.Animado OK 00:00:00 1 3 lupen
126 Tattoo Picantes OK 00:00:00 2 6 ricardo
081 taxi 2 Acción OK 00:00:00 0 3 lupen
009 Teléfono Rojo Comedia Para Alquilar 00:00:00 0 2 celula
272 the blair witch project 2 Terror OK 00:00:00 1 5 dani
095 The Body (El cuerpo) Intriga OK 00:00:00 1 7 sires
271 the forzaken Terror OK 00:00:00 1 5 dani
068 THE KID SIN CLASIFICAR Para Alquilar 00:00:00 0 3 lupen
259 the ladies man Comedia OK 00:00:00 1 5 dani
181 the mexican SIN CLASIFICAR OK 00:00:00 0 3 lupen
258 the score Intriga OK 00:00:00 1 5 dani
046 THE SIMPSON 1-2-3-4-5 Dib.Animado OK 00:00:00 1 3 lupen
048 THE SIMPSON 10-11-12-13 Dib.Animado OK 00:00:00 1 3 lupen
047 THE SIMPSON 6-7-8-9- Dib.Animado OK 00:00:00 1 3 lupen
159 The Terminator C.Ficción OK 00:00:00 1 7 sires
160 The Terminator 2 C.Ficción Para Alquilar 00:00:00 1 7 sires
054 TIGERLAND Bélica OK 00:00:00 1 3 lupen
033 Tina Turner - Simply the best '94 Musical OK 00:00:00 2 2 celula
022 Titan AE Dib.Animado OK 00:00:00 1 2 celula
036 TITANES Biografía OK 00:00:00 1 3 lupen
013 Titanic Melodrama Ripeando 00:00:00 0 2 celula
288 todos los chicos de mi vida Comedia OK 00:00:00 1 3 lupen
257 tom raider Acción OK 00:00:00 1 5 dani
232 tomates verdes fritos Drama OK 00:00:00 1 3 lupen
043 TORRENTE2 Comedia OK 00:00:00 1 3 lupen
256 toy stor2 Animación OK 00:00:00 1 5 dani
283 Training Day Acción OK 01:57:04 1 2 celula
193 tuno negro Intriga OK 00:00:00 1 3 lupen
062 UN PAPA GENIAL Comedia OK 00:00:00 1 3 lupen
295 vidocq Intriga OK 00:00:00 1 3 lupen
129 VOWFINGER EL PICARO Comedia OK 00:00:00 1 3 lupen
185 who am i Acción OK 00:00:00 1 5 dani
198 yamasaki Acción OK 00:00:00 1 3 lupen
015 Yo claudio Histórica Por llegar 00:00:00 0 2 celula
260 Zoolander Comedia OK 00:00:00 1 8 lumo

25
common/config.inc.php Normal file
View File

@ -0,0 +1,25 @@
<?php
# Appearance
$bg_color = "#57A44D";
$tbl_width = 600;
$tbl_border = 1;
$tbl_borderc = "#000000";
$tbl_bg = "#427B42";
$tbl_rowscolor = "#488048";
#DataBase Control
$limit = 20;
function MakeBox( $string )
{
global $tbl_border, $tbl_borderc, $tbl_width, $bg_color, $tbl_bg;
if ( !isset( $box_template ) )
return "<div align=\"center\"><center><table border=\"$tbl_border\" cellpadding=\"0\" cellspacing=\"0\" width=\"$tbl_width\" bgcolor=\"$tbl_bg\" bordercolor=\"$tbl_borderc\" bordercolordark=\"$tbl_borderc\" bordercolorlight=\"$tbl_borderc\"><tr><td>$string</td></tr></table></center></div>";
};
?>

47
common/dbnav_bar.php Normal file
View File

@ -0,0 +1,47 @@
<?php
function CreateDBnav( $from )
{
global $limit,$offset,$conexion,$nav_buttons,$parse_options;
$qrows = "SELECT DISTINCT * FROM $from";
$res = mysql_query( $qrows, $conexion ) or die("No puedo obtener el n&uacute;mero de registros<br>".mysql_error($conexion));
$numrows = mysql_num_rows( $res );
$nav_buttons = "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\"><tr><td width=\"100%\"><p style=\"text-align:right\">";
if ( $offset > 1 )
$nav_buttons .= "<a href=\"$PHP_SELF?offset=".($offset-$limit)."$parse_options\">&lt;&lt; Anterior</a> -";
else
$nav_buttons .= "&lt;&lt; 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 .= "<a href=\"$PHP_SELF?offset=$newoffset$parse_options\">$i</a>-";
}
}
$nav_buttons .= "</p></td><td><nobr>";
if ( ($offset+$limit)<$numrows )
$nav_buttons .= "<a href=\"$PHP_SELF?offset=".($offset+$limit)."$parse_options\">Siguiente &gt;&gt;</a>";
else
$nav_buttons .= "Siguiente &gt;&gt;";
$nav_buttons .= "</nobr></td></tr></table>";
};
function ShowDBnav()
{
global $nav_buttons;
echo $nav_buttons;
};
function GetDBnav()
{
global $nav_buttons;
return $nav_buttons;
};

28
error.htm Normal file
View File

@ -0,0 +1,28 @@
<HTML>
<HEAD>
<title>SYNCRO - ERROR procesando su petición</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css"
body="syncro.css"></head>
<body bgcolor="#57A44D"><div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/error1.gif" width="138" height="332"></td>
<td valign="top" width="455" background="images/error2.gif"><br>
<br><br><br><br><br><br><br><br><br><br>
<br>
<table border="0" width="80%">
<tr>
<td>Ocurrio un error mientras se procesaba su
petición, (puede que el login/password sean
incorrectos), si el problema persiste consulte
con su administrador.<p>&lt;&lt; <a
href="javascript:history.go(-1);">Volver</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</body>

295
foro.php Normal file
View File

@ -0,0 +1,295 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
if ( !$user_auth ) die( "<META CONTENT=\"0; URL=error.htm\" HTTP-EQUIV=\"REFRESH\">" );
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', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>-= SYNCRO foro =- </title>
<link href="images/syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css" body="syncro.css">
</head>
<body bgcolor="#57A44D">
<?
if ( !isset( $accion ) )
{
$qFROM = "foro WHERE post_ant is NULL";
$consulta = "SELECT id, post_ant, owner, Apodo, fecha, hora, Asunto FROM $qFROM ORDER BY id DESC LIMIT $offset, $limit";
CreateDBnav( $qFROM );
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
?>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600" bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000" bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td valign="top" width="225">
<p style='text-align:center'><font size="6">SyNcro -foro-</font><br>
-=[ <a href="<? echo $PHP_SELF ?>?accion=sins">Insertar nueva noticia</a> ]=-</p></td>
<td valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20">
<a href="<? echo $PHP_SELF ?>" target="_blank">
<img src="images/exp.gif" alt="Hacer zoom (Iniciar en una ventana nueva)" align="absmiddle" border="0" width="20" height="18">
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<table border="0" width="100%">
<tr bgcolor="#488048"><td width="80">Fecha -</td><td>Asunto</td><td width="20">Resp.</td><td width="100">Usuario</td><td width="26">.</td><td width="26">.</td></tr>
<?
// Bucle de NOTICIAS (Cabeceras)
while ( $datos = mysql_fetch_array($res) )
{
// Contamos las respuestas (Si tiene) a este mensaje...
$resp = mysql_query( "SELECT COUNT(*) AS Respuestas FROM foro WHERE post_ant=$datos[0]", $conexion ) or die("No puedo obtener el n&uacute;mero de registros<br>".mysql_error($conexion));
$NResp = mysql_result( $resp, 0, 'Respuestas' );
echo "<tr><td width=\"80\"><strong>$datos[4] -</td><td><a href=\"foro.php?accion=vn&nid=$datos[0]\">$datos[6]</a></strong></td>".
"<td width=\"20\">$NResp</td>".
"<td width=\"100\">[-<font color=\"#FFFFBB\">$datos[3]</font>-]</td>".
"<td width=\"26\">";
if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) )
echo "<a href=\"$PHP_SELF?accion=sedit&new=$datos[0]\"><img src=\"images/edit.gif\" width=\"25\" height=\"31\" border=\"0\"></a>";
echo "</td><td valign=\"bottom\" width=\"26\">";
if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) )
echo "'<a href=\"$PHP_SELF?accion=del&new=$datos[0]\"><img src=\"images/del.gif\" alt=\"Eliminar esta noticia\" width=\"17\" height=\"15\" border=\"0\"></a>";
echo "</td></tr>";
}
// Fin del bucle de noticias (Cabeceras)
?>
</table>
</td>
</tr>
</table>
</center></div><br>
<?
$navBarBox = MakeBox( GetDBnav() );
echo $navBarBox;
} else {
// Muestra la pantalla de insertar...
if ( strcmp( $accion, "sins" )==0 ||
strcmp( $accion, "sedit" )==0 )
{
if ( strcmp( $accion, "sins" ) == 0 )
{
if ( isset( $nid ) )
$next_action = "ins&nid=$nid";
else
$next_action = "ins";
$fecha = date("Y-m-d");
$n_user_name = $user_name;
} else {
$next_action = "edit&new=$new";
// Leemos los datos actuales...
$sql = "SELECT fecha, Apodo, Asunto, Comentario FROM foro WHERE id = $new";
$res = mysql_query( $sql, $conexion );
$datos = mysql_fetch_array($res);
$fecha = $datos[0];
$n_user_name = $datos[1];
$p_asunto = $datos[2];
$p_comentario = $datos[3];
}
?>
<form action="<? echo "$PHP_SELF?accion=$next_action" ?>" method="POST">
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600"
bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td valign="top" width="225"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><font size="6">SyNcro
-foro-</font><br>
-=[ <font color="#FFFF80">Insertando nueva
Noticia</font> ]=-<!--webbot bot="HTMLMarkup"
startspan --></p><!--webbot bot="HTMLMarkup"
endspan --></td>
<td valign="top"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20"><a href="javascript:history.go(-1);"><img src="images/del.gif"
alt="Cancelar la operaci¢n actual"
align="absmiddle" border="0" width="20"
height="18"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><strong><? echo $fecha; ?></strong></td>
<td><input type="text" size="40"
name="p_asunto" value="<? echo $p_asunto ?>"></td>
<td width="100">[<? echo $n_user_name ?>]</td>
</tr>
<tr>
<td align="center"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><input
type="image" name="I1"
src="images/enviar.gif" align="bottom"
border="0" width="20" height="71"><!--webbot
bot="HTMLMarkup" startspan --></p><!--webbot
bot="HTMLMarkup" endspan --></td>
<td colspan="2"><textarea name="p_comentario"
rows="6" cols="60"><? echo $p_comentario ?></textarea></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<?
}
// Inserta los datos...
if ( strcmp( $accion, "ins" )==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;
if ( !isset( $nid ) )
{
$sql_ins = "INSERT INTO foro (owner, Apodo, fecha, hora, Asunto, Comentario)".
"VALUES ('$user_id', '$user_name', '".date("Y-m-d")."', '".date("H:i:s")."', '$p_asunto', '$ps_comentario')";
} else {
$sql_ins = "INSERT INTO foro (owner, post_ant, Apodo, fecha, hora, Asunto, Comentario)".
"VALUES ('$user_id', '$nid', '$user_name', '".date("Y-m-d")."', '".date("H:i:s")."', '$p_asunto', '$ps_comentario')";
}
$res = mysql_query( $sql_ins, $conexion ) OR die("No puedo realizar la Insersión en el foro<br>$sql_ins<br>".mysql_error($conexion));
$dev = MakeBox( "<br><p style=\"text-align:center\">Tu \"Noticia\" ha sido insertada<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
} else {
$dev = MakeBox( "<br><p style=\"text-align:center\">No puedo insertar una noticia VACIA.<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
}
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<br>$sql_upd<br>".mysql_error($conexion));
$dev = MakeBox( "<br><p style=\"text-align:center\">Tu \"Noticia\" ha sido actualizada<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
} else {
$dev = MakeBox( "<br><p style=\"text-align:center\">No puedo modificar una noticia a VACIA.<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
}
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<br>$sql_upd<br>".mysql_error($conexion));
$dev = MakeBox( "<br><p style=\"text-align:center\">La \"Noticia\" ha sido eliminada<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
} else {
$dev = MakeBox( "<br><p style=\"text-align:center\">No estas autorizado a eliminar esa Noticia<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
}
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<br>$consulta<br>".mysql_error($conexion));
?>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600" bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000" bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td valign="top" width="225">
<p style='text-align:center'><font size="6">SyNcro -foro-</font><br>
-=[ <a href="<? echo $PHP_SELF ?>?accion=sins&nid=<? echo $nid ?>">Responder a esta noticia</a> ]=-</p></td>
<td valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20">
<a href="<? echo $PHP_SELF ?>" target="_blank">
<img src="images/exp.gif" alt="Hacer zoom (Iniciar en una ventana nueva)" align="absmiddle" border="0" width="20" height="18">
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<table border="0" width="100%">
<?
// Bucle de NOTICIAS
while ( $datos = mysql_fetch_array($res) )
{
echo "<tr bgcolor=\"#488048\">" .
"<td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">".
"<tr><td><strong>$datos[4] - $datos[6]</strong></td>".
"<td width=\"100\">[-<font color=\"#FFFFBB\">$datos[3]</font>-]</td>".
"<td width=\"26\">";
if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) )
echo "<a href=\"$PHP_SELF?accion=sedit&new=$datos[0]\"><img src=\"images/edit.gif\" width=\"26\" height=\"34\" border=\"0\"></a>";
echo "</td><td valign=\"bottom\" width=\"26\">";
if ( $user_auth && ( $user_id == $datos[2] || $user_id == 1 ) )
echo "'<a href=\"$PHP_SELF?accion=del&new=$datos[0]\"><img src=\"images/del.gif\" alt=\"Eliminar esta noticia\" width=\"17\" height=\"15\" border=\"0\"></a>";
echo "</td>".
"</tr>".
"</table></td></tr>".
"<tr><td><blockquote><p>". nl2br($datos[7]) ."</p></blockquote></td></tr>";
}
// Fin del bucle de noticias
?>
</table>
<hr><center>-=[ <a href="javascript:history.go(-1);">volver al foro</a> ]=-</center><br>
</td>
</tr>
</table>
</center></div><br>
<?
}
mysql_close($conexion);
?>
</body>
</html>

104
gestion-amispelis.php Normal file
View File

@ -0,0 +1,104 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
if ( empty( $user_auth ) || !isset($peli_id) ||
( !isset($p_status) && !isset($peli_name) )
)
{
echo "<META CONTENT=\"0; URL=index.htm\" HTTP-EQUIV=\"REFRESH\">";
}else {
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
if ( isset( $p_status ) )
{
if ( strcmp( $accion, "insertar" )==0 )
{
// INSERTAMOS EN LA LISTA PERSONAL...
$sql_upd = "INSERT INTO pelis_user (user, peli, status) VALUES($user_id,$peli_id,'$p_status')";
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar las Inserciones Personales<br>$sql_upd<br>".mysql_error($conexion));
$ins_upd = true;
} else
if ( strcmp( $accion, "editar" )==0 )
{
$sql_upd = "UPDATE pelis_user SET status='$p_status' WHERE user = $user_id AND peli = $peli_id";
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar las Actualizaciones Personales<br>$sql_upd<br>".mysql_error($conexion));
$ins_upd = true;
}
}
if ( !isset($accion) )
{
$res = mysql_query( "SELECT * FROM pelis_user WHERE user='$user_id' AND peli='$peli_id'", $conexion ) OR die("No puedo consultar si tienes esta peli.<br>$sql_upd<br>".mysql_error($conexion));
if ( mysql_num_rows( $res ) != 0 ) $accion = "editar";
}
mysql_close($conexion);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SYNCRO: Listado de peliculas</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css" body="syncro.css">
</head>
<body bgcolor="#57A44D">
<?
if ( isset( $accion ) )
echo "<form action='gestion-amispelis.php?peli_id=$peli_id&peli_name=$peli_name&accion=editar' method='POST'>";
else
echo "<form action='gestion-amispelis.php?peli_id=$peli_id&peli_name=$peli_name&accion=insertar' method='POST'>";
?>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td>
<?
if ( isset( $ins_upd ) )
{
echo "<center>La pelicula &quot;<a href='gestion-pelisp.php?peli_id=$peli_id'>$peli_name</a>&quot; ha sido agregada ó modificada de tu lista personal";
}else {
?>
<div align="center"><center><table border="0"
cellpadding="2" cellspacing="0">
<tr>
<td width="250"><br>
Agregar la película &quot;<a href="gestion-pelisp.php?peli_id=<? echo $peli_id ?>"><? echo $peli_name ?></a>&quot;, a
mi listado personal con el siguiente estado:<p><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center;margin-right:5.0pt'><!--webbot
bot="HTMLMarkup" endspan -->Estado: <select
name="p_status" size="1">
<option selected>OK</option>
<option>PEDIR</option>
</select><!--webbot bot="HTMLMarkup"
startspan --></p><!--webbot bot="HTMLMarkup"
endspan --></p>
</td>
<td><input type="image" name="I3"
src="images/enviar.gif" alt="ENVIAR"
align="bottom" border="0" width="20"
height="71"></td>
</tr>
</table>
</center></div>
<?
}
?>
</td>
</tr>
</table>
</center></div>
</form>
</body>
</html>
<?
}
?>

28
gestion-fotop.php Normal file
View File

@ -0,0 +1,28 @@
<?
if($idf) {
require ("open_db_prod.php" );
$query = "SELECT Imagen, filetype FROM productos WHERE id=".$idf;
$res = mysql_query($query, $conexion) or die("ERROR BUSCANDO IMAGEN");
$data = mysql_result($res,0,'Imagen');
$type = mysql_result($res,0,'filetype');
mysql_free_result($res);
mysql_close($conexion);
if ( !empty( $type) )
{
Header( "Content-type: $type" );
echo $data;
} else {
Header("Content-type: image/gif");
$fp = fopen("prod/images/simagen.gif","rb");
$file = fread($fp,filesize("prod/images/simagen.gif"));
fclose($fp);
echo $file;
}
} else {
echo "<META CONTENT=\"0; URL=error.htm\" HTTP-EQUIV=\"REFRESH\">";
}
?>

280
gestion-listado.php Normal file
View File

@ -0,0 +1,280 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
require ("common/config.inc.php");
require ("common/dbnav_bar.php");
if ( !isset( $offset ) ) $offset = 0;
$sql_orden = "";
$MWhere = "";
$parse_options = "";
if ( isset( $orden ) )
{
$parse_options .= "&orden=$orden";
if ( strcmp( $orden, "g" ) == 0 )
$sql_orden = " ORDER BY Genero, Titulo ";
if ( strcmp( $orden, "t" ) == 0 )
$sql_orden = " ORDER BY Titulo ";
}
if ( isset( $status ) )
{
switch( $status )
{
case "-= CUALQUIERA =-":
break;
case "No la tengo";
$MWhere = "WHERE pu.status IS NULL";
$parse_options .="&status=$status";
break;
default:
$MWhere = "WHERE p.status = '$status'";
$parse_options .="&status=$status";
break;
}
}
if ( isset( $genero ) )
{
if ( empty( $MWhere ) ) { $MWhere = "WHERE "; $And = ""; } else { $And =" AND "; }
switch( $genero )
{
case "-= CUALQUIERA =-";
break;
default:
$MWhere .= $And ." p.Genero='$genero'";
$parse_options .="&genero=$genero";
break;
}
}
// Segun TIPO selecionamos las pelis
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
$sdown = false;
if ( $user_auth )
{
$qFROM = "pelis AS p LEFT JOIN pelis_user AS pu ON (pu.user=$user_id AND p.id=pu.peli) $MWhere";
$consulta = "SELECT DISTINCT p.id, p.Genero, p.Status, p.Titulo, p.Duracion, p.NumCDs, pu.status FROM $qFROM $sql_orden LIMIT $offset, $limit";
$sdown = true;
} else {
$qFROM = "pelis p";
$consulta = "SELECT p.id, p.Genero, p.Status, p.Titulo, p.Duracion, p.NumCDs, p.owner, u.Apodo FROM $qFROM, users u WHERE u.id = p.owner $sql_orden LIMIT $offset, $limit";
}
if ( isset( $q ) )
{
if ( strcmp( $q, "mias" )==0 && $user_auth )
{
// $qFROM = "pelis p, pelis_user pu WHERE pu.user = $user_id AND p.id = pu.peli";
// $consulta = "SELECT DISTINCT p.id, p.Genero, p.Status, p.Titulo, p.Duracion, p.NumCDs, pu.status FROM $qFROM $sql_orden LIMIT $offset, $limit";
$qFROM = "pelis p, pelis_user pu LEFT JOIN pelis_user pup ON (pup.status='PEDIR' AND pu.status='OK' AND p.id=pup.peli) WHERE pu.user=$user_id AND p.id=pu.peli";
$consulta = "SELECT DISTINCT p.id, p.Genero, p.Status, p.Titulo, p.Duracion, p.NumCDs, pu.status, pup.peli FROM $qFROM $sql_orden LIMIT $offset, $limit";
$sdown = true;
$slapiden = true;
$parse_options .= "&q=mias";
}
if ( strcmp( $q, "en_curso" )==0 && $user_auth )
{
$qFROM = "pelis p WHERE p.Status != 'OK'";
$consulta = "SELECT p.id, p.Genero, p.Status, p.Titulo, p.Duracion, p.NumCDs FROM $qFROM $sql_orden LIMIT $offset, $limit";
$sdown = false;
$parse_options .= "&q=en_curso";
}
}
CreateDBnav( $qFROM );
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SYNCRO: Listado de peliculas</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css" body="syncro.css">
</head>
<body bgcolor="#57A44D">
<br>
<form action="<? echo "$PHP_SELF?$parse_options"?> method="post">
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td width="300">Leyenda:</td>
<td width="150">Filtrar por Estado: </td>
<td width="150"><select name="status"
size="1">
<option selected>-= CUALQUIERA =-</option>
<option>ok</option>
<option>para alquilar</option>
<option>ripeando</option>
<option>por llegar</option>
<? if ( $user_auth ) echo "<option>No la tengo</option>"; ?>
</select></td>
<? if ( $user_auth ) echo '<td width="20" rowspan="2" valign="top" ><input type="image" name="I2" src="images/ok.gif" alt="ENVIAR" align="bottom" border="0" width="20" height="58"></td>'; ?>
</tr>
<tr>
<td width="300">
<font color="#427B42">:-(</font><img src="images/prip.gif" width="15" height="15"> Aun no disponible<br>
<?
if ( isset( $slapiden ) )
echo '<font color="#427B42">:-(</font><img src="images/ppre.gif" width="15" height="15"> ¡La estan pidiendo!<br>';
else
echo '<font color="#427B42">:-)</font><img src="images/pdown.gif" width="18" height="18"> Añadir a mi listado<br>';
?>
<font color="#427B42">:-)</font><img src="images/pped.gif" width="15" height="15"> ¡Tengo que pedirla!<br>
</td><td valign="top" width="150">Filtrar por Género:<br>
</td>
<td valign="top" width="150"><select
name="genero" size="1">
<option selected>-= CUALQUIERA =-</option>
<option>SIN CLASIFICAR</option>
<option>Acción</option>
<option>Animación</option>
<option>Aventuras</option>
<option>Bélica</option>
<option>Biografía</option>
<option>Catástrofe</option>
<option>C.Ficción</option>
<option>Fantástico</option>
<option>Cine Negro</option>
<option>Comedia</option>
<option>Dib.Animado</option>
<option>Documental</option>
<option>Drama</option>
<option>Histórica</option>
<option>Intriga</option>
<option>Musical</option>
<option>Melodrama</option>
<option>Oeste</option>
<option>Terror</option>
<option>Picantes</option>
</select><br>
</td>
</tr>
</table>
<? ShowDBnav(); ?>
</td>
</tr>
</table>
</center></div>
</form>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600"
bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" width="100%" cellspacing="0" >
<tr>
<td bgcolor="#000000">
<? if ( strcmp( $orden, "g" ) != 0 )
echo "<a href=\"$PHP_SELF?$parse_options&orden=g\"><img src=\"images/sortd.gif\" border=\"0\"></a>";
?><strong> Género</strong></td>
<td bgcolor="#000000">
<? if ( strcmp( $orden, "t" ) != 0 )
echo "<a href=\"$PHP_SELF?$parse_options&orden=t\"><img src=\"images/sortd.gif\" border=\"0\"></a>";
?><strong> Título</strong></td>
<td bgcolor="#000000"><strong>Dur.</strong></td>
<td bgcolor="#000000"><strong><? if ( !sdown ) echo "Ripper"; ?></strong></td>
<td bgcolor="#000000"><strong>CD's</strong></td>
<td bgcolor="#000000" colspan="4" style="text-align:center"><strong>- status -</strong></td>
</tr>
<?
$numrows = mysql_num_rows( $res );
if ( $numrows > 0 )
{
if ( $user_auth )
{
$ver_preview = "gestion-pelisp.php?peli_id=";
$target = "target='preview'";
} else $ver_preview = "#";
while ( $datos = mysql_fetch_array($res) )
{
if ( strcmp( $datos[2], "OK" ) == 0 )
$p_imgStatus = "";
else
$p_imgStatus = "<img src='images/prip.gif'>";
if ( strcmp($datos[4], "00:00:00" ) != 0 )
{
$hh = strtok($datos[4], ":");
$mm = strtok(":");
$dur = $hh*60 + $mm;
if ( $dur == 0 ) $dur = "";
} else $dur="";
if ( $linea_color )
echo "<tr>";
else
echo "<tr bgcolor=\"#488048\">";
$linea_color = !$linea_color;
echo "<td>$datos[1]</td>" .
"<td><a href='$ver_preview $datos[0]' $target >$datos[3]</a></td>" .
"<td class=\"tdr\">$dur</td>";
if ( !$slapiden ) echo "<td>$datos[7]</td>";
echo "<td>$datos[5]</td>" .
"<td>$p_imgStatus</td>";
if ( $user_auth && empty( $p_imgStatus ) )
{
if ( $sdown )
{
if ( empty($datos[6]) )
{
echo "<td><a href='gestion-amispelis.php?peli_id=$datos[0]&peli_name=$datos[3]' target='preview'><img src='images/pdown.gif' border='0'></a></td>";
} else {
if ( strcmp($datos[6],"OK") != 0 )
echo "<td><a href='gestion-amispelis.php?peli_id=$datos[0]&peli_name=$datos[3]&accion=editar' target='preview'><img src='images/pped.gif' border='0'></a></td>";
else
echo "<td>&nbsp;</td>";
}
} else {
echo "<td>&nbsp;</td>";
}
if ( $slapiden && !empty($datos[7]) )
echo "<td><a href='gestion-pidiendo.php?peli_id=$datos[0]' target='preview'><img src='images/ppre.gif' width='15' height='15' border='0'></a></td>";
else
echo "<td>&nbsp;</td>";
} else {
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
}
echo "</tr>";
};
} else {
echo "<tr><td>-= ERROR =-</td><td>La consulta no produjo resultados</td><td></td><td></td><td></td><td></td><td></td>";
}
?>
</table>
</td>
</tr>
</table>
</center></div><br>
<?
$navBarBox = MakeBox( GetDBnav() );
echo $navBarBox;
mysql_close($conexion);
?>
<p align="center">&nbsp;</p>
</body>
</html>

85
gestion-menu.php Normal file
View File

@ -0,0 +1,85 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
$SID=$SYNCRO;
?>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>-= SYNCRO =-</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css"
body="syncro.css">
</head>
<body bgcolor="#57A44D">
<?
if (!empty($user_auth))
{
?>
<p align="center"><font size="+3"><br>SyNcro</font><br>-=[ <a href="news.php" target="preview">News</a> ]=-<br><br></p>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/mbi.gif" width="24" height="217"></td>
<td valign="top" width="82" background="images/mbf.gif"><table
border="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&gt;&gt; <a
href="miFicha.php?<?=SID?>"
target="preview">Mi Ficha</a></td>
</tr>
<tr>
<td>&gt;&gt; Listar</td>
</tr>
<tr>
<td><font color="#20803F">-</font>+ <a
href="gestion-listado.php?<?=SID?>&q=todo" target="listado">Todo</a><br>
<font color="#20803F">-</font>+ <a
href="gestion-listado.php?<?=SID?>&q=mias"
target="listado">Mias</a><br> <font color="#20803F">-</font>+ <a
href="gestion-listado.php?<?=SID?>&q=en_curso" target="listado">En curso</a><br>
</td>
</tr>
<tr><td>&gt;<a href="bajar-listado.php" target="listado">Bajar lista</a>
</td></tr>
<tr>
<td>&gt;&gt; <a
href="gestion-pelisp.php?<?=SID?>"
target="preview">Insertar</a></td>
</tr>
<tr><td>&gt;&gt; <a href="foro.php" target="preview">Foro</a></td></tr>
<tr>
<td>
&gt;&gt; <a href="salir.php" target="_top">Salir</a></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
<p align="center"><br>
</p>
<p align="center"><br>
Diseñado por: <br>
<a href="mailto:jd@infdj.com">JD soft.</a></p>
<?
}
?>
</body>
</html>

307
gestion-pelisp.php Normal file
View File

@ -0,0 +1,307 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
$mostrar_enviar = false;
$mostrar_borrar = false;
// Si nos dan un número de referencia, mostramos la peli
if ( isset($peli_id) )
{
// Quizas sea para eliminarla...
if ( isset( $accion ) )
{
if ( strcmp( $accion, "borrar" ) == 0 )
{
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
$borr = "DELETE FROM pelis_user WHERE user = $user_id AND peli = $peli_id";
$res = mysql_query( $borr, $conexion ) OR die("No puedo eliminar esta peli de mi lista<br>$sql_upd<br>".mysql_error($conexion));
$consulta = "SELECT * FROM pelis_user WHERE peli = $peli_id";
$res = mysql_query( $consulta, $conexion ) OR die("No puedo consultar que usuarios tienen esta peli");
$nres = mysql_num_rows($res);
mysql_free_result($res);
if ( $nres == 0 )
{
// Como nadie mas tiene esta peli, la eliminamos completamente
$borr = "DELETE FROM pelis WHERE id = $peli_id";
$res = mysql_query( $borr, $conexion ) OR die("No puedo eliminar esta peli de la lista<br>$sql_upd<br>".mysql_error($conexion));
}
mysql_close($conexion);
}
if ( isset( $p_id ) )
{
if ( strcmp( $accion, "editar" ) == 0 && $user_auth )
{
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
$modf = "UPDATE pelis SET ";
// Solo el que la creo, puede modificar su estado...
if ( $user_id == $p_uid )
{
$modf = $modf . " Genero = '$p_genero'";
$modf = $modf . ", Status = '$p_status'";
$modf = $modf . ", titulo = '$p_titulo'";
$modf = $modf . ", FechaRip = '$p_frip'";
$modf = $modf . ", Duracion = '$p_dur'";
$modf = $modf . ", NumCDs = '$p_cds'";
$modf = $modf . ", Comentarios = '$p_comm'";
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$imgW = $img_prop[0]; $p_imgW = $imgW;
$imgH = $img_prop[1]; $p_imgH = $imgH;
$data = addslashes(fread(fopen($imgData,"rb"), filesize($imgData)));
$modf = $modf . ", Imagen = '$data', filetype='$imgData_type', imgW='$imgW', imgH='$imgH'";
}
} else {
$modf = $modf . " Comentarios = '$p_comm'";
}
$modf = $modf . " WHERE id = ".$p_id;
}
$res = mysql_query( $modf, $conexion ) OR die("No puedo modificar esta peli<br>$sql_upd<br>".mysql_error($conexion));
mysql_close($conexion);
}
} else {
// La visionamos...
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
$consulta = "SELECT ";
$consulta = $consulta . "p.owner, p.Genero, p.Status, p.Titulo, p.FechaRip, p.Duracion, p.NumCDs, p.Comentarios, p.imgH, p.imgW";
$consulta = $consulta . ", u.Apodo";
$consulta = $consulta . " FROM pelis p, users u WHERE p.id = $peli_id AND p.owner = u.id";
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta");
if ( mysql_num_rows($res) > 0 )
{
$p_uid = mysql_result( $res, 0, 'owner' );
$p_user = mysql_result( $res, 0, 'Apodo' );
$p_genero= mysql_result( $res, 0, 'Genero' );
$p_status= mysql_result( $res, 0, 'Status' );
$p_titulo= mysql_result( $res, 0, 'Titulo' );
$p_frip = mysql_result( $res, 0, 'FechaRip' );
$p_cds = mysql_result( $res, 0, 'NumCDs' );
$p_dur = mysql_result( $res, 0, 'Duracion' );
$p_comm = mysql_result( $res, 0, 'Comentarios' );
$p_imgH = mysql_result( $res, 0, 'imgH' );
$p_imgW = mysql_result( $res, 0, 'imgW' );
}
mysql_free_result($res);
mysql_close($conexion);
if ( $user_auth )
{
$mostrar_enviar = true;
$mostrar_borrar = true;
}
}
} else {
// Modo Insertar PELI
// Si el usuario esta 'authenticate'
if ( user_auth )
{
$ins_ok = isset( $p_titulo ) && !empty( $p_titulo );
if ( $ins_ok )
{
if ( empty( $p_titulo ) )
die( "Es imprescindible introducir el Titulo" );
// Procedemos a la insercion:
// 1º insertamos la peli en la base de datos...
// 2º insertamos la peli en la lista personal...
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$imgW = $img_prop[0]; $p_imgW = $imgW;
$imgH = $img_prop[1]; $p_imgH = $imgH;
$data = addslashes(fread(fopen($imgData,"rb"), filesize($imgData)));
$sql_upd = "INSERT INTO pelis (owner, Genero, Status, Titulo, FechaRip, Duracion, NumCDs, Comentarios, Imagen, filetype, imgW, imgH) VALUES";
$sql_upd = $sql_upd . "($user_id, '$p_genero', '$p_status', '$p_titulo', '$p_frip', '$p_dur', '$p_cds', '$p_comm', '$data', '$imgData_type', '$imgW', '$imgH')";
} else {
$sql_upd = "INSERT INTO pelis (owner, Genero, Status, Titulo, FechaRip, Duracion, NumCDs, Comentarios) VALUES";
$sql_upd = $sql_upd . "($user_id, '$p_genero', '$p_status', '$p_titulo', '$p_frip', '$p_dur', '$p_cds', '$p_comm')";
}
$mostrar_enviar = false;
$mostrar_borrar = false;
} else {
$p_uid = $user_id;
$p_user = $user_name;
$mostrar_enviar = true;
$mostrar_borrar = false;
}
if ( $ins_ok )
{
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar las Inserciones<br>$sql_upd<br>".mysql_error($conexion));
$sql_upd = "INSERT INTO pelis_user (user, peli) VALUES($user_id,LAST_INSERT_ID())";
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar las Inserciones Personales<br>$sql_upd<br>".mysql_error($conexion));
mysql_close($conexion);
}
}
}
$image_prop = "";
if ( $p_imgW > 0 )
{
if ( $p_imgW > $p_imgH )
{
$imgH = intval(($p_imgH/$p_imgW)*180); $imgW = 180;
$image_prop = " width=\"180\" height=\"".$imgH."\"";
} else {
$imgW = intval(($p_imgW/$p_imgH)*150); $imgH = 150;
$image_prop = " height=\"150\" width=\"".$imgW."\"";
}
}
?>
<html>
<head>
<title>-= SYNCRO =-</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css"
body="syncro.css">
</head>
<body bgcolor="#57A44D">
<?
if ( $user_auth )
{
if ( !isset( $peli_id ) )
echo "<form action=\"$PHP_SELF\" method=\"POST\" enctype=\"multipart/form-data\">";
else
echo "<form action=\"$PHP_SELF?peli_id=$peli_id&accion=editar\" method=\"POST\" enctype=\"multipart/form-data\">";
} else {
echo '<form>';
}
?>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="200"><center><a href="gestion-fotop.php?idf=<?echo $peli_id?>" target="_blank"><img src="gestion-fotop.php?idf=<?echo $peli_id?>" border="0" <?echo $image_prop ?> ></a></center>
</td>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td>Ripeador:</td>
<td><a href="miFicha.php?info_user=<? echo $p_uid ?>"><? echo $p_user ?></a></td>
<td>Estado Actual:</td>
<td><select name="p_status"
size="1">
<option <? if ( strcmp($p_status,"OK")==0 ) echo " SELECTED "; ?> >OK</option>
<option <? if ( strcmp($p_status,"Para Alquilar")==0 ) echo " SELECTED "; ?> >Para Alquilar</option>
<option <? if ( strcmp($p_status,"Ripeando")==0 ) echo " SELECTED "; ?> >Ripeando</option>
<option <? if ( strcmp($p_status,"Por llegar")==0 ) echo " SELECTED "; ?> >Por llegar</option>
</select></td>
</tr>
<tr>
<td>Num.CD's:</td>
<td><input type="text"
size="15" name="p_cds" value="<? echo $p_cds ?>" ></td>
<td>Género:</td>
<td><select name="p_genero"
size="1">
<option <? if ( strcmp($p_genero,"SIN CLASIFICAR")==0 ) echo " SELECTED "; ?> >SIN CLASIFICAR</option>
<option <? if ( strcmp($p_genero,"Acción")==0 ) echo " SELECTED "; ?> >Acción</option>
<option <? if ( strcmp($p_genero,"Animación")==0 ) echo " SELECTED "; ?> >Animación</option>
<option <? if ( strcmp($p_genero,"Aventuras")==0 ) echo " SELECTED "; ?> >Aventuras</option>
<option <? if ( strcmp($p_genero,"Bélica")==0 ) echo " SELECTED "; ?> >Bélica</option>
<option <? if ( strcmp($p_genero,"Biografía")==0 ) echo " SELECTED "; ?> >Biografía</option>
<option <? if ( strcmp($p_genero,"Catástrofe")==0 ) echo " SELECTED "; ?> >Catástrofe</option>
<option <? if ( strcmp($p_genero,"C.Ficción")==0 ) echo " SELECTED "; ?> >C.Ficción</option>
<option <? if ( strcmp($p_genero,"Fantástico")==0 ) echo " SELECTED "; ?> >Fantástico</option>
<option <? if ( strcmp($p_genero,"Cine Negro")==0 ) echo " SELECTED "; ?> >Cine Negro</option>
<option <? if ( strcmp($p_genero,"Comedia")==0 ) echo " SELECTED "; ?> >Comedia</option>
<option <? if ( strcmp($p_genero,"Dib.Animado")==0 ) echo " SELECTED "; ?> >Dib.Animado</option>
<option <? if ( strcmp($p_genero,"Documental")==0 ) echo " SELECTED "; ?> >Documental</option>
<option <? if ( strcmp($p_genero,"Drama")==0 ) echo " SELECTED "; ?> >Drama</option>
<option <? if ( strcmp($p_genero,"Histórica")==0 ) echo " SELECTED "; ?> >Histórica</option>
<option <? if ( strcmp($p_genero,"Intriga")==0 ) echo " SELECTED "; ?> >Intriga</option>
<option <? if ( strcmp($p_genero,"Musical")==0 ) echo " SELECTED "; ?> >Musical</option>
<option <? if ( strcmp($p_genero,"Melodrama")==0 ) echo " SELECTED "; ?> >Melodrama</option>
<option <? if ( strcmp($p_genero,"Oeste")==0 ) echo " SELECTED "; ?> >Oeste</option>
<option <? if ( strcmp($p_genero,"Terror")==0 ) echo " SELECTED "; ?> >Terror</option>
<option <? if ( strcmp($p_genero,"Picantes")==0 ) echo " SELECTED "; ?> >Picantes</option>
</select></td>
</tr>
</table>
<table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td>Fecha Rip.</td>
<td>Titulo</td>
<td>Duración</td>
</tr>
<tr>
<td><input type="text"
size="15" name="p_frip" value="<? echo $p_frip ?>" ></td>
<td><input type="text"
size="30" name="p_titulo" value="<? echo $p_titulo ?>" ></td>
<td><input type="text"
size="7" name="p_dur" value="<? echo $p_dur ?>" ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td><textarea name="p_comm"
rows="5" cols="40" ><? echo $p_comm ?></textarea></td>
<td>
<input type=hidden name="p_uid" value="<? echo $p_uid ?>">
<input type=hidden name="p_id" value="<? echo $peli_id ?>">
<?
if ( $mostrar_borrar )
echo '<a href="gestion-pelisp.php?peli_id='.$peli_id.'&accion=borrar"><img src="images/borrar.gif" alt="ELIMINAR" align="bottom" border="0" width="20" height="71"></a>';
if ( $mostrar_enviar )
echo '<input type="image" name="I2" src="images/enviar.gif" alt="ENVIAR" align="bottom" border="0" width="20" height="71">';
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
if ( $user_id == $p_uid ) {
?>
<table border="0">
<tr>
<td><INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="300000">
<input type="file" size="40" name="imgData"></td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
<INPUT TYPE="hidden" name="p_imgH" value="<? echo $imgH ?>">
<INPUT TYPE="hidden" name="p_imgW" value="<? echo $imgW ?>">
</form>
</body>
</html>

98
gestion-pidiendo.php Normal file
View File

@ -0,0 +1,98 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
require ("common/config.inc.php");
require ("common/dbnav_bar.php");
// Segun TIPO selecionamos las pelis
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
if ( $user_auth )
{
if ( isset( $peli_id ) ) {
$solo_esta_peli = "pu.peli=$peli_id AND ";
$parse_options = "peli_id=$peli_id";
} else {
$solo_esta_peli="pu.user <> $user_id AND ";
$parse_options = "";
}
$qFROM = "users u, pelis_user pu, pelis_user mu WHERE $solo_esta_peli pu.user = u.id AND pu.status='PEDIR' AND mu.user=$user_id AND pu.peli=mu.peli AND mu.status='OK'";
$consulta = "SELECT DISTINCT u.id, u.Apodo FROM $qFROM";
} else {
die("<META CONTENT=\"0; URL=index.htm\" HTTP-EQUIV=\"REFRESH\">");
}
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
if ( isset( $uid ) )
$resp = mysql_query( "SELECT p.Titulo FROM pelis_user pu, pelis_user mu, pelis p WHERE pu.user='$uid' AND pu.status='PEDIR' AND mu.user='$user_id' AND mu.status='OK' AND pu.peli=mu.peli AND p.id=pu.peli ORDER BY p.Titulo", $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SYNCRO: Listado de usuarios que solicitan una pelicula</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css" body="syncro.css">
</head>
<body bgcolor="#57A44D">
<br><div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000" >
<tr><td valign="top" width="200"><table border="0" width="100%" cellspacing="0" >
<tr>
<td bgcolor="#000000">&gt; Usuario</td>
<td bgcolor="#000000" colspan="3" align="center">+</td>
</tr>
<?
$numrows = mysql_num_rows( $res );
if ( $numrows > 0 )
{
while ( $datos = mysql_fetch_array($res) )
{
if ( $linea_color )
echo "<tr>";
else
echo "<tr bgcolor=\"#488048\">";
$linea_color = !$linea_color;
echo "<td><a href=\"miFicha.php?info_user=$datos[0]\">$datos[1]</a></td><td>+</td><td>+</td><td><a href=\"$PHP_SELF?$parse_options&uid=$datos[0]\" onmouseover=\"javascript:document['mi$datos[0]'].src='images/minfo.gif'\" onmouseout=\"javascript:document['mi$datos[0]'].src='images/minfo-.gif'\"><img name=\"mi$datos[0]\" src=\"images/minfo-.gif\" border=\"0\"></a></td></tr>";
};
} else {
echo "-= ERROR =- La consulta no produjo resultados";
}
?></table>
</td>
<td>
<? if ( !isset( $uid ) ) { ?>
Para ver que otras peliculas (de las que tu ya tienes), esta pidiendo otro usuario, pica sobre el icono correspondiente.<br><br>[ ESTO AUN NO ESTA ]
<? } else { ?>
<blockquote>
<?
$numrows = mysql_num_rows( $resp );
if ( $numrows > 0 )
{
while ( $datos = mysql_fetch_array($resp) )
{
echo $datos[0] . "<br>";
}
}
?>
</blockquote>
<? } ?>
<br><br><a href="<?echo $PHP_SELF?>"><img src="images/!.gif" border="0" align="right" ALT="Mostrar todos los usuarios a los que le puedo prestar algo"></a>
</td>
</tr></table></center></div>
<p align="center">&nbsp;</p>
</body>
</html>

60
gestion.php Normal file
View File

@ -0,0 +1,60 @@
<?
$sin_error = false;
if ( empty($user) || empty($user_pwd) )
{
$sin_error = false;
} else {
// Comprobar que login/user sean válidos...
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
$consulta = 'SELECT id, Apodo, Password FROM users WHERE Apodo = "' . $user . '"';
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta");
if ( mysql_num_rows($res) > 0 )
{
$pwd = mysql_result( $res, 0, 'Password' );
if ( strcmp( $pwd, $user_pwd ) == 0 )
{
session_name( "SYNCRO" );
$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 "<META CONTENT=\"0; URL=error.htm\" HTTP-EQUIV=\"REFRESH\">";
} else {
?>
<HTML>
<HEAD>
<script language="JavaScript" TYPE="text/javascript">
window.status = "SYNCRO v1.0";
</script>
<LINK REL="SHORTCUT ICON" HREF="images/syncro.ico">
<title>-= SYNCRO =-</title>
</HEAD>
<FRAMESET COLS=120,* FRAMEBORDER=NO border="0" color="#000000" NORESIZE FRAMESPACING="0" marginwidth=0 marginheight=0>
<FRAME SCROLLING=NO NORESIZE SRC="gestion-menu.php?<?=SID?>" NAME="menu" border=0 marginwidth=0 marginheight=0>
<FRAMESET ROWS=*,210 FRAMEBORDER=NO border="0" NORESIZE FRAMESPACING="0" marginwidth=0 marginheight=0>
<FRAME NORESIZE SRC="gestion-listado.php" NAME="listado" border=0 marginwidth=0 marginheight=0>
<FRAME NORESIZE SRC="news.php" NAME="preview" border=0 marginwidth=0 marginheight=4>
</FRAMESET>
</FRAMESET>
<?
}
?>
</HTML>

BIN
images/!.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/0-chapter.BMP Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

BIN
images/bd.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/bf.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/bi.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/borrar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/del.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

BIN
images/down.BMP Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

BIN
images/edit.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/enviar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/error1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
images/error2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/exp.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

BIN
images/mbf.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/mbi.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/minfo-.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

BIN
images/minfo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
images/ntm-new.BMP Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

BIN
images/ok.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/pdown.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

BIN
images/pped.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

BIN
images/ppre.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

BIN
images/prip.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

BIN
images/simagen.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

BIN
images/sortd.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

BIN
images/syncro.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
images/triangle-l.BMP Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

99
index.htm Normal file
View File

@ -0,0 +1,99 @@
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>-= SYNCRO =-</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css"
body="syncro.css">
</head>
<body bgcolor="#57A44D">
<p align="center"><br>
<br>
<br>
</p>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="491">
<tr>
<td width="68"><img src="images/bi.gif" width="68"
height="498"></td>
<td valign="top" width="380" background="images/bf.gif"><table
border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="bottom"><h1><br>
SyNcro</h1>
</td>
</tr>
<tr>
<td><hr>
</td>
</tr>
</table>
<p>Esto solo funciona si usamos estas páginas para
coordinarnos y saber que tiene quien, y que esta pasando
(o pretende pasar) cada uno.</p>
<p>Asi que ya sabeis, usadlo para organizar vuestras
pelis, y notificar al resto el estado de los trabajos.<br>
<br>
<br>
</p>
<form method="POST" name="login" action="gestion.php">
<div align="center"><center><table border="0"
width="200">
<tr>
<td><div align="center"><center><table
border="0">
<tr>
<td><table border="0">
<tr>
<td>Login:</td>
<td><input type="text"
size="12" name="user"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password"
size="12" name="user_pwd"></td>
</tr>
</table>
</td>
<td><input type="image" name
src="images/enviar.gif" alt="ENVIAR"
align="bottom" border="0" width="20"
height="71"> </td>
</tr>
</table>
</center></div></td>
</tr>
<tr>
<td>Necesario para actualizar tus listados.Si
no tienes, solicitalos!.</td>
</tr>
</table>
</center></div>
</form>
<p align="center"><br>
<br>
</p>
<hr>
<table border="0" width="100%">
<tr>
<td align="right"><!--webbot bot="HTMLMarkup"
startspan --><p style='text-align:right;'><!--webbot bot="HTMLMarkup"
endspan -->[ <a href="gestion-listado.php">Listado
Global</a> ]<!--webbot bot="HTMLMarkup"
startspan --></p><!--webbot bot="HTMLMarkup"
endspan --></td>
</tr>
</table>
</td>
<td width="43"><img src="images/bd.gif" width="43"
height="499"></td>
</tr>
</table>
</center></div>
</body>
</html>

180
miFicha.php Normal file
View File

@ -0,0 +1,180 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
?>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>-= SYNCRO =-</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css"
body="syncro.css">
</head>
<body bgcolor="#57A44D">
<?
if (!empty($user_auth))
{
$conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
if ( isset($nombre) )
{
// Actualizamos la ficha...
$sql_upd = "UPDATE users SET ";
$sql_upd = $sql_upd . " Nombre='$nombre'";
$sql_upd = $sql_upd . ", Apellidos='$apellidos'";
$sql_upd = $sql_upd . ", e_Mail='$email'";
$sql_upd = $sql_upd . ", Telefono1='$tlf1'";
$sql_upd = $sql_upd . ", Telefono2='$tlf2'";
$sql_upd = $sql_upd . ", Telefono3='$tlf3'";
$sql_upd = $sql_upd . ", Telefono4='$tlf4'";
$sql_upd = $sql_upd . ", url='$url'";
$sql_upd = $sql_upd . ", Calle='$calle'";
$sql_upd = $sql_upd . ", Calle2='$calle2'";
$sql_upd = $sql_upd . ", Num='$num'";
$sql_upd = $sql_upd . ", Piso='$piso'";
$sql_upd = $sql_upd . ", Letra='$letra'";
$sql_upd = $sql_upd . ", CP='$cp'";
$sql_upd = $sql_upd . ", Poblacion='$poblacion'";
$sql_upd = $sql_upd . ", Provincia='$provincia'";
$sql_upd = $sql_upd . ", Password='$pwd'";
$sql_upd = $sql_upd . " WHERE id = ".$user_id;
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo realizar las actualizaciones<br>$sql_upd<br>".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' );
$num = mysql_result( $res, 0, 'Num' );
$piso = mysql_result( $res, 0, 'Piso' );
$letra = mysql_result( $res, 0, 'Letra' );
$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 ="";
?>
<form action="miFicha.php" method="POST">
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" width="100%">
<tr>
<td>Nombre:</td>
<td><input type="text" size="15"
name="nombre" value="<? echo $nombre ?>"></td>
<td>Apellidos:</td>
<td><input type="text" size="15"
name="apellidos" value="<? echo $apellidos ?>"></td>
<td>Password:</td>
<td>
<?
if ( !isset($info_user) )
echo "<input type=\"password\" size=\"15\" name=\"pwd\" value=\"$pwd\">";
else
echo "<input type=\"password\" size=\"15\" name=\"fpwd\" value=\"QueTeLoHasCreido\">";
?>
</td>
</tr>
<tr>
<td>Telefonos:</td>
<td><input type="text" size="15" name="tlf1" value="<? echo $tlf1 ?>"></td>
<td><input type="text" size="15" name="tlf2" value="<? echo $tlf2 ?>"></td>
<td><input type="text" size="15" name="tlf3" value="<? echo $tlf3 ?>"></td>
<td>Fax:</td>
<td><input type="text" size="15" name="tlf4" value="<? echo $tlf4 ?>"></td>
</tr>
<tr>
<td>e-mail:</td>
<td><input type="text" size="15" name="email" value="<? echo $email ?>"></td>
<td>&nbsp;</td>
<td>Dirección pág. WEB:</td>
<td colspan="2"><input type="text" size="30"
name="url" value="<? echo $url ?>"></td>
<td>&nbsp;</td>
</tr>
</table>
<? if ( !isset($info_user) ){ ?>
<hr>
<table border="0" width="100%">
<tr>
<td><table border="0">
<tr>
<td>Calle</td>
<td><input type="text" size="30"
name="calle" value="<? echo $calle ?>"></td>
<td>Num/Piso/Letra</td>
<td><input type="text" size="5"
name="num" value="<? echo $num ?>">-<input type="text"
size="5" name="piso" value="<? echo $piso ?>">-<input
type="text" size="5" name="letra" value="<? echo $letra ?>"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="text" size="30"
name="calle2" value="<? echo $calle2 ?>"></td>
<td>CP:</td>
<td><input type="text" size="10"
name="cp" value="<? echo $cp ?>"></td>
</tr>
<tr>
<td>Población:</td>
<td><input type="text" size="15"
name="poblacion" value="<? echo $poblacion ?>"></td>
<td>Provincia:</td>
<td><input type="text" size="15"
name="provincia" value="<? echo $provincia ?>"></td>
</tr>
</table>
</td>
<td><input type="image" name="I1"
src="images/enviar.gif" alt="ENVIAR"
align="bottom" border="0" width="20"
height="71"></td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
</center></div>
</form>
<?
}
?>
</body>
</html>

222
news.php Normal file
View File

@ -0,0 +1,222 @@
<?
session_name( "SYNCRO" );
$v1="user_id";
$v2="user_name";
$v3="user_auth";
session_register($v1,$v2,$v3);
session_start();
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', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
$id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>-= SYNCRO news =- </title>
<link href="images/syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css" body="syncro.css">
</head>
<body bgcolor="#57A44D">
<?
if ( !isset( $accion ) )
{
$qFROM = "news";
$consulta = "SELECT * FROM $qFROM ORDER BY id DESC LIMIT $offset, $limit";
CreateDBnav( $qFROM );
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
?>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600" bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000" bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td valign="top" width="225">
<p style='text-align:center'><font size="6">SyNcro -news-</font><br>
<?
if ( $user_id == 1 )
echo "-=[ <a href=\"$PHP_SELF?accion=sins\">Insertar nueva noticia</a> ]=-";
?></p></td>
<td valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20">
<a href="<? echo $PHP_SELF ?>" target="_blank">
<img src="images/exp.gif" alt="Hacer zoom (Iniciar en una ventana nueva)" align="absmiddle" border="0" width="20" height="18">
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<table border="0" width="100%">
<?
// Bucle de NOTICIAS
while ( $datos = mysql_fetch_array($res) )
{
echo "<tr>" .
"<td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">".
"<tr><td><strong>$datos[3] - $datos[5]</strong></td>".
"<td width=\"100\">[-<font color=\"#FFFFBB\">$datos[2]</font>-]</td>".
"<td width=\"26\">";
if ( $user_auth && ( $user_id == $datos[1] || $user_id == 1 ) )
echo "<a href=\"$PHP_SELF?accion=sedit&new=$datos[0]\"><img src=\"images/edit.gif\" width=\"26\" height=\"34\" border=\"0\"></a>";
echo "</td><td valign=\"bottom\" width=\"26\">";
if ( $user_auth && ( $user_id == $datos[1] || $user_id == 1 ) )
echo "'<a href=\"$PHP_SELF?accion=del&new=$datos[0]\"><img src=\"images/del.gif\" alt=\"Eliminar esta noticia\" width=\"17\" height=\"15\" border=\"0\"></a>";
echo "</td>".
"</tr>".
"</table></td></tr>".
"<tr><td><blockquote><p>$datos[6]</p></blockquote></td></tr>";
}
// Fin del bucle de noticias
?>
</table>
</td>
</tr>
</table>
</center></div><br>
<?
$navBarBox = MakeBox( GetDBnav() );
echo $navBarBox;
} else {
// Muestra la pantalla de insertar...
if ( strcmp( $accion, "sins" )==0 ||
strcmp( $accion, "sedit" )==0 )
{
if ( strcmp( $accion, "sins" ) == 0 )
{
$next_action = "ins";
$fecha = date("Y-m-d");
$n_user_name = $user_name;
} else {
$next_action = "edit&new=$new";
// Leemos los datos actuales...
$sql = "SELECT fecha, Apodo, Asunto, Comentario FROM news WHERE id = $new";
$res = mysql_query( $sql, $conexion );
$datos = mysql_fetch_array($res);
$fecha = $datos[0];
$n_user_name = $datos[1];
$p_asunto = $datos[2];
$p_comentario = $datos[3];
}
?>
<form action="<? echo "$PHP_SELF?accion=$next_action" ?>" method="POST">
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600"
bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td valign="top" width="225"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><font size="6">SyNcro
-news-</font><br>
-=[ <font color="#FFFF80">Insertando nueva
Noticia</font>]=-<!--webbot bot="HTMLMarkup"
startspan --></p><!--webbot bot="HTMLMarkup"
endspan --></td>
<td valign="top"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20"><a href="<? echo $PHP_SELF ?>"><img src="images/del.gif"
alt="Cancelar la operaci¢n actual"
align="absmiddle" border="0" width="20"
height="18"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><strong><? echo $fecha; ?></strong></td>
<td><input type="text" size="40"
name="p_asunto" value="<? echo $p_asunto ?>"></td>
<td width="100">[<? echo $n_user_name ?>]</td>
</tr>
<tr>
<td align="center"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><input
type="image" name="I1"
src="images/enviar.gif" align="bottom"
border="0" width="20" height="71"><!--webbot
bot="HTMLMarkup" startspan --></p><!--webbot
bot="HTMLMarkup" endspan --></td>
<td colspan="2"><textarea name="p_comentario"
rows="6" cols="60"><? echo $p_comentario ?></textarea></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<?
}
// Inserta los datos...
if ( strcmp( $accion, "ins" )==0 )
{
if ( isset( $p_asunto ) && !empty( $p_asunto ) &&
isset( $p_comentario ) && !empty( $p_comentario ) )
{
$sql_ins = "INSERT INTO news (owner, Apodo, fecha, hora, Asunto, Comentario)".
"VALUES ('$user_id', '$user_name', '".date("Y-m-d")."', '".date("H:i:s")."', '$p_asunto', '$p_comentario')";
$res = mysql_query( $sql_ins, $conexion ) OR die("No puedo realizar la Insersión de NEWS<br>$sql_ins<br>".mysql_error($conexion));
$dev = MakeBox( "<br><p style=\"text-align:center\">Tu \"Noticia\" ha sido insertada<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
} else {
$dev = MakeBox( "<br><p style=\"text-align:center\">No puedo insertar una noticia VACIA.<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
}
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<br>$sql_upd<br>".mysql_error($conexion));
$dev = MakeBox( "<br><p style=\"text-align:center\">Tu \"Noticia\" ha sido actualizada<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
} else {
$dev = MakeBox( "<br><p style=\"text-align:center\">No puedo modificar una noticia a VACIA.<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
}
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<br>$sql_upd<br>".mysql_error($conexion));
$dev = MakeBox( "<br><p style=\"text-align:center\">La \"Noticia\" ha sido eliminada<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
} else {
$dev = MakeBox( "<br><p style=\"text-align:center\">No estas autorizado a eliminar esa Noticia<br>-[<a href=\"$PHP_SELF\">ver noticias</a>]-</p><br>" );
}
echo $dev;
}
}
mysql_close($conexion);
?>
</body>
</html>

440
plantilla.htm Normal file
View File

@ -0,0 +1,440 @@
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>-= SYNCRO =-</title>
<link href="syncro.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="syncro.css"
body="syncro.css">
</head>
<body bgcolor="#57A44D" text="#E0B505">
<p align="center"><br>
</p>
<form action="gestion-pelisp.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000"><div
align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="200">-- Reservado para una foto --<p>--
Reservado para una foto --</p>
<p>-- Reservado para una foto --</p>
</td>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td>Ripeador:</td>
<td>NOMBRE</td>
<td>Estado Actual:</td>
<td><select name="status"
size="1">
<option selected>OK</option>
<option>Para Alquilar</option>
<option>Ripeando</option>
<option>Por llegar</option>
</select></td>
</tr>
<tr>
<td>Num.CD's:</td>
<td><input type="text"
size="15" name="cds"></td>
<td>Género:</td>
<td><select name="genero"
size="1" disabled>
<option>SIN CLASIFICAR</option>
<option>Acción</option>
<option>Animación</option>
<option>Aventuras</option>
<option>Bélica</option>
<option>Biografía</option>
<option>Catástrofe</option>
<option>C.Ficción</option>
<option>Fantástico</option>
<option>Cine Negro</option>
<option>Comedia</option>
<option>Dib.Animado</option>
<option>Documental</option>
<option>Drama</option>
<option>Histórica</option>
<option>Intriga</option>
<option>Musical</option>
<option>Melodrama</option>
<option>Oeste</option>
<option>Terror</option>
<option>Picantes</option>
</select></td>
</tr>
</table>
<table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td>Fecha Rip.</td>
<td>Titulo</td>
<td>Duración</td>
</tr>
<tr>
<td><input type="text"
size="15" name="fecharip"></td>
<td><input type="text"
size="30" name="titulo"
disabled></td>
<td><input type="text"
size="7" name="duracion"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td><textarea name="textc"
rows="5" cols="40"></textarea></td>
<td><a href="dfgf"><img
src="images/borrar.gif"
border="0" width="20"
height="71"></a><input
type="image" name="I2"
src="images/enviar.gif"
alt="ENVIAR" align="bottom"
border="0" width="20"
height="71"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0">
<tr>
<td><input type="text" size="40"
name="form_data"></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div><p><br>
</p>
</form>
<p align="center"><br>
-SEPARACION-</p>
<form>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td width="300">Leyenda:</td>
<td width="150">Filtrar por Estado: </td>
<td width="150"><select name="status"
size="1">
<option selected>-= CUALQUIERA =-</option>
<option>OK</option>
<option>Para Alquilar</option>
<option>Ripeando</option>
<option>Por llegar</option>
</select></td>
</tr>
<tr>
<td width="300"><font color="#427B42">:-(</font>
<img src="images/prip.gif" width="15"
height="15"> Aun no disponible<br>
<font color="#427B42">:-)</font> <img
src="images/pdown.gif" width="18" height="18">
Añadir a mi listado</td>
<td valign="top" width="150">Filtrar por Género:<br>
</td>
<td valign="top" width="150"><select
name="genero" size="1">
<option selected>-= CUALQUIERA =-</option>
<option>SIN CLASIFICAR</option>
<option>Acción</option>
<option>Animación</option>
<option>Aventuras</option>
<option>Bélica</option>
<option>Biografía</option>
<option>Catástrofe</option>
<option>C.Ficción</option>
<option>Fantástico</option>
<option>Cine Negro</option>
<option>Comedia</option>
<option>Dib.Animado</option>
<option>Documental</option>
<option>Drama</option>
<option>Histórica</option>
<option>Intriga</option>
<option>Musical</option>
<option>Melodrama</option>
<option>Oeste</option>
<option>Terror</option>
<option>Picantes</option>
</select><br>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><!--webbot bot="HTMLMarkup" startspan --><p style='text-align:right;margin-right:5.0pt'><!--webbot
bot="HTMLMarkup" endspan -->&lt;&lt; Anterior<!--webbot
bot="HTMLMarkup" startspan --></p><!--webbot
bot="HTMLMarkup" endspan --></td>
<td class="tdr">Siguiente &gt;&gt;</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="600"
bgcolor="#427B42" bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" width="100%">
<tr>
<td bgcolor="#000000"><strong>Género</strong></td>
<td bgcolor="#000000"><strong>Título</strong></td>
<td bgcolor="#000000"><strong>Duración</strong></td>
<td bgcolor="#000000"><strong>CD's</strong></td>
<td bgcolor="#000000"><strong>Status</strong></td>
<td bgcolor="#000000">&nbsp;</td>
<td bgcolor="#000000">&nbsp;</td>
</tr>
<tr>
<td>p_gen sdadasdas</td>
<td>p_tit asdasdasdasdasdasdd</td>
<td>p_durasdasdasdasdasd</td>
<td>p_cda</td>
<td>p_inf</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
<form>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td width="300">.</td>
<td><!--webbot bot="HTMLMarkup" startspan --><p style='text-align:right;margin-right:5.0pt'><!--webbot
bot="HTMLMarkup" endspan -->&lt;&lt; Anterior<!--webbot
bot="HTMLMarkup" startspan --></p><!--webbot
bot="HTMLMarkup" endspan --></td>
<td>Siguiente &gt;&gt;</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<p>&nbsp;</p>
<p align="center">- SEPARACION -</p>
<form>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><div align="center"><center><table border="0"
cellpadding="2" cellspacing="0">
<tr>
<td width="250"><br>
Agregar la película &quot;PELICULA&quot;, a
mi listado personal con el siguiente estado:<p><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center;margin-right:5.0pt'><!--webbot
bot="HTMLMarkup" endspan -->Estado: <select
name="p_status" size="1">
<option selected>OK</option>
<option>PEDIR</option>
</select><!--webbot bot="HTMLMarkup"
startspan --></p><!--webbot bot="HTMLMarkup"
endspan --></p>
</td>
<td><input type="image" name="I3"
src="images/enviar.gif" alt="ENVIAR"
align="bottom" border="0" width="20"
height="71"></td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</center></div>
</form>
<p>&nbsp;</p>
<p align="center">- SEPARACION -</p>
<p align="center">&nbsp;</p>
<form>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td valign="top" width="225"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><font size="6">SyNcro
-news-</font><br>
-=[ <a href="$PHPSELF?action=sins">Insertar
nueva noticia</a> ]=-<!--webbot
bot="HTMLMarkup" startspan --></p><!--webbot
bot="HTMLMarkup" endspan --></td>
<td valign="top"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20"><a href="$PHPSELF"
target="_blank"><img
src="images/exp.gif"
alt="Hacer zoom (Iniciar en una ventana nueva)"
align="absmiddle" border="0"
width="20" height="18"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<table border="0" width="100%">
<tr>
<td><table border="0" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td><strong>00-00-00 Subject</strong></td>
<td width="100">[user]</td>
<td width="26"><img
src="images/edit.gif" width="26"
height="34"></td>
<td valign="bottom" width="26">'<img
src="images/del.GIF"
alt="Eliminar esta noticia"
width="17" height="15"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><blockquote>
<p>TEXTO DEL MENSAJE</p>
</blockquote>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<p>&nbsp;</p>
<p align="center">- SEPARACION -</p>
<p align="center">&nbsp;</p>
<form>
<div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" width="600" bgcolor="#427B42"
bordercolor="#000000" bordercolordark="#000000"
bordercolorlight="#000000">
<tr>
<td><table border="0" cellpadding="2" cellspacing="0"
width="100%">
<tr>
<td valign="top" width="225"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><font size="6">SyNcro
-news-</font><br>
-=[ <font color="#FFFF80">Insertando nueva
Noticia</font>]=-<!--webbot bot="HTMLMarkup"
startspan --></p><!--webbot bot="HTMLMarkup"
endspan --></td>
<td valign="top"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>&nbsp;</td>
<td width="20"><a href="$PHPSELF"
target="_blank"><img
src="images/exp.gif"
alt="Hacer zoom (Iniciar en una ventana nueva)"
align="absmiddle" border="0"
width="20" height="18"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td><hr>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><strong>00-00-00</strong></td>
<td><input type="text" size="40"
name="p_asunto"></td>
<td width="100">[user]</td>
</tr>
<tr>
<td align="center"><!--webbot
bot="HTMLMarkup" startspan --><p style='text-align:center'><!--webbot
bot="HTMLMarkup" endspan --><input
type="image" name="I1"
src="images/enviar.gif" align="bottom"
border="0" width="20" height="71"><!--webbot
bot="HTMLMarkup" startspan --></p><!--webbot
bot="HTMLMarkup" endspan --></td>
<td colspan="2"><textarea name="p_comentario"
rows="7" cols="60"></textarea></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
</body>
</html>

6
salir.php Normal file
View File

@ -0,0 +1,6 @@
<?
session_name("SYNCRO");
session_start();
session_destroy();
echo "<META CONTENT=\"0; URL=index.htm\" HTTP-EQUIV=\"REFRESH\">";
?>

18
sql/Leeme.txt Normal file
View File

@ -0,0 +1,18 @@
Este directorio contiene los ficheros que pueden ser usados para configurar la base de datos 'SYNCRO' 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 SYNCRO;
mysql> USE SYNCRO;
Para crear las tablas necesarias:
% mysql -p SYNCRO < cr_users_tbl.sql
% mysql -p SYNCRO < cr_pelis_tbl.sql
% mysql -p SYNCRO < cr_pelis_user_tbl.sql
% mysql -p SYNCRO < cr_news_tbl.sql
Para asignar los permisos:
% mysql -p SYNCRO < cr_global_key.sql

23
sql/Pruebas.txt Normal file
View File

@ -0,0 +1,23 @@
Pelis de un usuario:
SELECT p.titulo, pu.status FROM pelis p, pelis_user pu WHERE pu.user=7 AND p.id=pu.peli;
Pelis que pide alguien:
SELECT DISTINCT pu.peli FROM pelis_user pu WHERE pu.status='PEDIR';
Pelis poseidas por un USUARIO que pide ALGUIEN sin incluir las que pido
SELECT DISTINCT p.titulo, pu.status, pup.peli FROM pelis p, pelis_user pu
LEFT JOIN pelis_user pup ON (pup.status='PEDIR' AND pu.status='OK' AND p.id=pup
.peli) WHERE pu.user=7 AND p.id=pu.peli;
Noticias y nº de respuestas
SELECT f.Asunto
(SELECT COUNT(p.post_ant)
FROM foro p
WHERE p.post_ant=f.id) AS Respuestas
FROM foro f
WHERE f.post_ant is NULL;
SELECT f.post_ant, COUNT(*) AS Respuestas FROM foro p GROUP BY p.post_ant;

28
sql/cr_foro_tbl.sql Normal file
View File

@ -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;

9
sql/cr_global_key.sql Normal file
View File

@ -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;

27
sql/cr_news_tbl.sql Normal file
View File

@ -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;

58
sql/cr_pelis_tbl.sql Normal file
View File

@ -0,0 +1,58 @@
# drop the "pelis" table if it exists, then recreate it
DROP TABLE IF EXISTS pelis;
CREATE TABLE pelis
(
# /********************\
#|* Datos Básicos *|
# \********************/
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
owner SMALLINT,
Genero ENUM( "SIN CLASIFICAR",
"Acción",
"Animación",
"Aventuras",
"Bélica",
"Biografía",
"Catástrofe",
"C.Ficción",
"Fantástico",
"Cine Negro",
"Comedia",
"Dib.Animado",
"Documental",
"Drama",
"Histórica",
"Intriga",
"Musical",
"Melodrama",
"Oeste",
"Terror",
"Picantes"
) DEFAULT "SIN CLASIFICAR",
Status ENUM( "OK",
"Para Alquilar",
"Ripeando",
"Por llegar"
),
Titulo VARCHAR(30) NOT NULL,
FechaRip DATE,
Duracion TIME,
NumCDs SMALLINT DEFAULT '1',
Comentarios TEXT,
Imagen BLOB,
filetype VARCHAR(50),
imgH SMALLINT,
imgW SMALLINT,
# /************************\
#|* CLAVES PK, SK *|
# \************************/
PRIMARY KEY (id),
);
# Cargamos otros datos suministrados por defecto...
# LOAD DATA LOCAL INFILE "pelis.txt" INTO TABLE personas;

View File

@ -0,0 +1,20 @@
# drop the "pelis_user" table if it exists, then recreate it
DROP TABLE IF EXISTS pelis_user;
CREATE TABLE pelis_user
(
# /********************\
#|* Datos Básicos *|
# \********************/
user SMALLINT UNSIGNED NOT NULL REFERENCES users,
peli SMALLINT UNSIGNED NOT NULL REFERENCES pelis,
status ENUM( "OK", "PEDIR" ) DEFAULT "OK"
PRIMARY KEY (user, peli)
);
# Cargamos otros datos suministrados por defecto...
# LOAD DATA LOCAL INFILE "pelis_user.txt" INTO TABLE personas;

43
sql/cr_users_tbl.sql Normal file
View File

@ -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,
Apodo VARCHAR(10) 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;

69
syncro.css Normal file
View File

@ -0,0 +1,69 @@
/* Enlaces */
a {
color: #FFFFBB;
font-size: 9pt;
text-decoration: none;
}
A:hover {color: #FFFF00;}
.a2 {
color: #800000;
font-size: 14pt;
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: #52A54A;
scrollbar-highlight-color: #484848;
scrollbar-3dlight-color: #52A54A;
scrollbar-darkshadow-color: #427B42;
scrollbar-shadow-color: #FFFFFF;
scrollbar-arrow-color: #FFFF00;
scrollbar-track-color: #52A54A;
font-family: arial, helvetica, sans-serif;
font-size: 10pt;
color: #D8A60E;
}
/* Tablas */
td, th {
font-size: 10pt;
color: #D8A60E;
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;
}

1
test.php Normal file
View File

@ -0,0 +1 @@
<?phpinfo()?>

BIN
tmp-syncro.rar Normal file

Binary file not shown.