Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/10/2009, 12:14
Mexman
 
Fecha de Ingreso: octubre-2009
Mensajes: 11
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: Galeria de Videos ASP YouTuBe

Bueno aquí os dejo los Códigos:

NOTA: He vuelto a sustituir las tres w y el protocolo h t t p, por asteriscos:

File: videos.asp

Código asp:
Ver original
  1. <!-- [email protected] / J.E.J.R.-2009 -->
  2. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "****://***.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="****://***.w3.org/1999/xhtml">
  5. <head>
  6. <meta ****-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  7. <title>videos</title>
  8. <!-- Scripts -->
  9.     <script type="text/javascript" src="****://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  10.     <script type="text/javascript" src="js/jquery.youtubeplaylist.js"></script>
  11.     <script type="text/ecmascript">
  12.             $(function() {
  13.                 $("div#demo").ytplaylist({addThumbs:true, autoPlay: false, holderId: 'video'});
  14.             });
  15.     </script>
  16. <!-- Estilos -->
  17. <link type="text/css" rel="stylesheet" href="css/aspviga.css" />
  18. </head>
  19. <!-- ////////////////////////////////////////////////// START ///////////////////////////////////////////////////////// -->
  20. <body>
  21. <!--  Universal -->
  22.     <div id="container">       
  23.         <div id="pag_n_up"></div>
  24.         <div id="pag_n_mid">
  25.         <!--  -->
  26. <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
  27.         <%                 
  28.         ' Variables.
  29.             Dim SQL, oConn, RS
  30.             Dim v_id, v_link, v_titulo, v_seccion, v_describe
  31.             Dim Salto
  32.         'Asigno Variables.
  33.             v_id = "v_id"
  34.             v_link = "v_link"
  35.             v_titulo = "v_titulo"
  36.             v_seccion = "v_seccion"
  37.             v_describe = "v_describe"  
  38.             salto = Replace (cadena, vbCrLf, "<BR>")   
  39.         %>
  40.         <!-- VIDEOS -->
  41.                 <div id="master">
  42.                     <div id="visor">
  43.                         <div id="video"></div>
  44.                     </div>
  45.                     <div id="selector">
  46.                         <div>
  47.         <%
  48.         'Creamos la conexión a la base de datos sin DSN
  49.             Set oConn=Server.CreateObject("ADODB.Connection")
  50.                                                                    
  51.         'Conexión BASE DE DATOS ----- por OLEDB
  52.             oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("./db/xxx.mdb")&";" '
  53.            
  54.         'Ejecutamos la SELECT SQL.
  55.             SQL = "SELECT * FROM videos ORDER BY v_id DESC"
  56.            
  57.         'Creo un Recordset y ejecutamos la orden.
  58.             Set RS = oConn.Execute(SQL)
  59.            
  60.         'Recorre todas las filas del resultado
  61.             Do While Not RS.EOF
  62.         ' Muestra la fila actual
  63.         %>
  64.                                 <div id="caja">        
  65.                                     <div id="demo">
  66.                                         <p><a href="<% Response.Write(RS.Fields(v_link)) & vbCrlf %>"></a></p>                                                                         
  67.                                     </div>                             
  68.                                     <div id="propiedades">
  69.                                         <ul>
  70.                                             <li><strong>Video:&nbsp;</strong><span class="pist"><% Response.Write(RS.Fields(v_id)) %>º</span></li>
  71.                                             <li><strong>Secci&oacute;n:&nbsp;</strong><span class="pist"><% Response.Write(RS.Fields(v_seccion)) %></span></li>
  72.                                             <li><strong>Titulo:&nbsp;</strong><span class="pist"><% Response.Write(RS.Fields(v_titulo)) %></span></li>                                     
  73.                                         </ul>
  74.                                     </div>
  75.                                     <div id="descripcion">
  76.                                         <p><% Response.Write(RS.Fields(v_describe)) %></p>
  77.                                     </div>
  78.                                 </div>
  79.         <!-- Hack para Hacer el salto de pagina.  -->
  80.         <!-- Si no pongo los Br se quedan todas las cajas en una unica posicion -->
  81.         <br /><br /><br /><br /><br /><br /><br />                                 
  82.         <%
  83.         'Pasa a la siguiente fila
  84.             RS.MoveNext
  85.             Loop   
  86.         %>
  87.                         </div>
  88.                     </div>
  89.                 </div> 
  90.         <!-- VIDEOS -->                                
  91.         <%             
  92.         'Libera memoria
  93.             RS.Close
  94.             Set RS = Nothing
  95.             oConn.Close
  96.             Set oConn = Nothing
  97.            
  98.         'Cerramos variables
  99.             Set v_link = Nothing
  100.             Set v_titulo = Nothing
  101.             Set v_seccion = Nothing
  102.             Set v_describe = Nothing       
  103.         'FIN.
  104.         %>         
  105. <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->                   
  106.         <!--  -->
  107.         </div>
  108.         <div id="pag_n_down"></div>
  109.     </div>
  110. <!-- // Universal -->
  111. </body>
  112. <!-- /////////////////////////////////////////////////// END ///////////////////////////////////////////////////////// -->
  113. </html>


Este es el File aspviga.css.

Código css:
Ver original
  1. /* CSS Document */
  2.    
  3. /* UNIVERSALES PAGINAS */
  4. #container {
  5.     padding:0px;
  6.     margin:0px;
  7.     position:relative;
  8.     margin:0px auto;   
  9.     width:810px;
  10.     height:600px;
  11.     min-height:500px;
  12.     float:left;
  13.     }
  14. #pag_n_up {
  15.     padding:0px;
  16.     margin:0px;
  17.     position:relative;
  18.     background: url(img/pag_n_up.png) no-repeat;
  19.     width:810px;
  20.     height:5px;
  21.     }
  22. #pag_n_mid {
  23.     padding:0px;
  24.     margin:0px;
  25.     position:relative;
  26.     background: url(img/pag_n_mid.png) repeat-y;
  27.     width:810px;
  28.     height:550px;
  29.     }
  30. #pag_n_down {
  31.     padding:0px;
  32.     margin:0px;
  33.     position:relative;
  34.     background: url(img/pag_n_down.png) no-repeat;
  35.     width:810px;
  36.     height:5px;
  37.     }
  38.    
  39. /* VISOR VIDEOS */
  40. #master {
  41.     border:1px solid white;
  42.     background:#B2B2B2;
  43.     padding:0px;
  44.     margin:0px;
  45.     position:relative;
  46.     margin:5px;
  47.     width:800px;
  48.     height:420px;
  49.     float:left;
  50.     }
  51. #video {
  52.     }
  53. #visor { /* Este afecta al visualizador principal de los videos */
  54.     border:none;
  55.     background:;
  56.     margin:0px;
  57.     padding:10px;
  58.     width:500px;
  59.     height:400px;    
  60.     float:left;
  61.     position:relative;
  62.     }
  63. #selector { /* Este afecta a la lista de videos a reproducir */
  64.     border:none;
  65.     background:;
  66.     margin:0px;
  67.     padding:0px;
  68.     width:270px;
  69.     height:420px;
  70.     float:left;    
  71.     display:block;
  72.     position:relative;
  73.     overflow-y:scroll;
  74.     overflow-x:hidden; 
  75.     }
  76. #caja {
  77.     border:1px outset #B2B2B2;
  78.     background:#333333;
  79.     margin:5px;
  80.     padding:0px;
  81.     width:240px;
  82.     height:132px;
  83.     float:left;
  84.     position:absolute;
  85.     }
  86. #demo {
  87.     border:1px dotted #CCCCCC;
  88.     border-right:none;
  89.     margin:0px;
  90.     padding:0px;
  91.     width: 110px;
  92.     height:80px;
  93.     float: left;
  94.     }
  95. #demo p {  
  96.     margin:0;
  97.     padding:0;
  98.     }
  99. #demo p a {
  100.     }
  101. #demo p img { /*  */
  102.     border:none;
  103.     width:110px;
  104.     height:80px;
  105.     float: left;   
  106.     position:absolute;
  107.     }
  108. #propiedades { /*  */
  109.     background: #333333;
  110.     margin:0px;
  111.     padding:0px;
  112.     width: 122px;
  113.     height:80px;
  114.     float: left;
  115.     position:relative;
  116.     }
  117. #propiedades ul {  
  118.     border:1px dotted #CCCCCC;
  119.     border-left:none;
  120.     margin:0;
  121.     padding:9px 3px 3px 6px;/* arriba - derecha - abajo - izquierda */
  122.     width: 119px;
  123.     height:68px;
  124.     position:absolute;
  125.     }  
  126. #propiedades ul li {
  127.     font-family: Arial, Helvetica, sans-serif;
  128.     font-size:0.7em;
  129.     line-height:1.2em;
  130.     text-align:left;
  131.     color:#F0F0F0;
  132.     float:left;
  133.     list-style-type: none;
  134.     list-style:none;
  135.     }
  136. #descripcion {
  137.     border:1px outset #CCCCCC;
  138.     background:#F0F0F0;
  139.     margin:0px;
  140.     padding:1px 4px 1px 4px;/* arriba - derecha - abajo - izquierda */
  141.     width: 230px;
  142.     height:46px;
  143.     font-family: Arial, Helvetica, sans-serif;
  144.     font-size:0.8em;
  145.     line-height:1.2em;
  146.     text-align:left;
  147.     float: left;
  148.     }
  149. #descripcion p {
  150.     margin:0;
  151.     padding:0;
  152.     width: 228px;
  153.     height:46px;
  154.     position:absolute;
  155.     }
  156. .pist {
  157.     color: #CCFF00;
  158.     }
  159. .currentvideo {
  160.     background: #e6e6e6;
  161.     }
  162.  
  163. /* FIN */