Código:
<html> <head> <title>.: Multimax :.</title> <script language="javascript" src="../includes/javascriptGeneral.js" type="text/javascript"></script> <?php include_once("../includes/admin.php"); if(!empty($_REQUEST["accion"]) && $_REQUEST["accion"]=='modificar'){ if(!modificaCartelera($_REQUEST["cartelera"],$_REQUEST["peliculas"])) echo "<script language=\"javascript\">alert('Fallo al actualizar la cartelera de Home.')</script>"; else echo "<script language=\"javascript\">alert('Cartelera del Home modificada correctamente.')</script>"; } damePeliculas(); damePeliculasCartelera($_REQUEST["cartelera"]); ?> </head> <body> <form method="post" action="index_modificar.php"> <input type="hidden" name="accion" value="modificar"> <input type="hidden" name="cartelera" value="9"> <input type="hidden" name="peliculas"> <table width="549" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="4"> </td> <td width="545" valign="top"><table width="545" border="0" cellpadding="0" cellspacing="2"> <tr align="center"> <td height="50" colspan="7" valign="top" background="images/fondo_tit.jpg"><img src="images/trans.gif" width="540" height="15"><br> <span class="style16">MODIFICAR HOME </span></td> </tr> <tr align="center" valign="top"> <td colspan="7"><table width="545" height="285" border="0" cellpadding="0" cellspacing="0" bgcolor="#2D4C61"> <tr> <td colspan="4"><img src="images/trans.gif" width="8" height="5"></td> </tr> <tr> <td align="center" valign="top"><img src="images/detalle.gif" id="img1" width="167" height="248"> </td> <td width="10" height="241"> </td> <td width="340" valign="top"> <table width="340" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="340" height="25" valign="top"><span class="style6"> <input name="titulo" type="text" value="TITULO PELICULA"> <br> </span> <input name="duracion" type="text" value="Duración: "></td> </tr> <tr> <td valign="top" class="style9"><span class="style18"> <input name="paisano" type="text" value="PAIS ORIGEN (AÑO RELEASE) " size="30"> <br> <input name="clasificacion" type="text" value="Clasificación:"> <br> <input name="director" type="text" value="Director:"> <br> <input name="reparto" type="text" value="Reparto: "> </span></td> </tr> <tr> <td valign="top"><div align="justify"> <textarea name="sinopsis">SYNOPSIS</textarea> </div></td> </tr> </table> </td> <td width="10"> </td> </tr> <tr> <td align="center"><select name="sel1" onChange="gestionaCarteles(1)"> </select></td> <td height="39" colspan="3"><table width="103%" height="53" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left"><p> <span class="style18"><br> </span></p></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td> </td> <td></td> </tr> <tr> <td> </td> <td><table width="545" border="0" cellpadding="0" cellspacing="0" background="images/fondo_cartelera.gif"> <tr> <td align="center" valign="top"><table width="545" border="0" cellpadding="0" cellspacing="2"> <tr align="center"> <td height="50" colspan="7" valign="top" background="images/fondo_tit.jpg"><img src="images/trans.gif" width="540" height="15"><br> <span class="style16">CARTELERA</span></td> </tr> <tr align="center" valign="top"> <td width="123"><img src="images/thumb.gif" id="img2" width="105" height="158" border="0"></td> <td width="12"> </td> <td width="123"><img src="images/thumb.gif" id="img3" width="105" height="158" border="0"></td> <td width="12"> </td> <td width="124"><img src="images/thumb.gif" id="img4" width="105" height="158" border="0"></td> <td width="12"> </td> <td width="123"><img src="images/thumb.gif" id="img5" width="105" height="158" border="0"></td> </tr> <tr align="center" valign="middle" class="style8"> <td height="20"><select name="sel2" onChange="gestionaCarteles(2)"> </select></td> <td height="20"><span class="style19"></span></td> <td height="20"><select name="sel3" onChange="gestionaCarteles(3)"> </select></td> <td height="20"><span class="style19"></span></td> <td height="20" class="style18"><select name="sel4" onChange="gestionaCarteles(4)"> </select></td> <td height="20"><span class="style19"></span></td> <td height="20"><select name="sel5" onChange="gestionaCarteles(5)"> </select></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr align="center"> <td colspan="2"><span class="style18"> <input type="button" value="Modificar Home" onClick="compruebaCartelera()"> </span></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr align="center"> <td colspan="2"><a href="carteleras.htm" class="style4">Regresar al menú anterior</a></td> </tr> <tr> <td colspan="2"> </td> </tr> </table> </form> <script language="javascript"> llenaCombo(peliculas,'sel1',''); llenaCombo(peliculas,'sel2',''); llenaCombo(peliculas,'sel3',''); llenaCombo(peliculas,'sel4',''); llenaCombo(peliculas,'sel5',''); function gestionaCarteles(cartel){ for(var i=0;i<peliculas.length;i++){ if(eval("document.forms[0].sel"+cartel+".value=="+peliculas[i][0])){ if(cartel==1){ document.forms[0].titulo.value=peliculas[i][1]; document.forms[0].duracion.value=peliculas[i][2]; document.forms[0].paisano.value=peliculas[i][3]+"("+peliculas[i][4]+")"; document.forms[0].clasificacion.value=peliculas[i][11]; document.forms[0].director.value=peliculas[i][6]; document.forms[0].reparto.value=peliculas[i][7]; document.forms[0].sinopsis.value=peliculas[i][8]; } if(peliculas[i][9]!=""){ var imagen=document.getElementById("img"+cartel); imagen.src="images/peliculas/"+peliculas[i][9]; } } } } function compruebaCartelera(){ if(document.forms[0].sel1.value!=-1 && document.forms[0].sel2.value!=-1 && document.forms[0].sel3.value!=-1 && document.forms[0].sel4.value!=-1 && document.forms[0].sel5.value!=-1){ document.forms[0].peliculas.value=document.forms[0].sel1.value+"_"+1+"/"+document.forms[0].sel2.value+"_"+2+"/"+document.forms[0].sel3.value+"_"+3+"/"+document.forms[0].sel4.value+"_"+4+"/"+document.forms[0].sel5.value+"_"+5; alert(document.forms[0].peliculas.value); document.forms[0].submit(); }else alert("Debe rellenar todas las películas de la cartelera."); } function cargaCartelera(){ if(peliculasCartelera.length>0){ for(var i=0;i<peliculasCartelera.length;i++){ eval("llenaCombo(peliculas,'sel"+peliculasCartelera[i][1]+"','"+peliculasCartelera[i][0]+"');"); gestionaCarteles(peliculasCartelera[i][1]); } } } cargaCartelera() </script> </body> </html>
sigue..................