Guest User

my version

a guest
Mar 8th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.84 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.  
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>GildoMúsica</title>
  7. <meta name="keywords" content="work center, portfolio, theme, free css templates, free webdesign, templatemo" />
  8. <meta name="description" content="Work Center, Portfolio, free CSS template by templatemo.com" />
  9. <link href="css/gildomusica_style.css" rel="stylesheet" type="text/css" />
  10. <link href="css/table_style.css" rel="stylesheet" type="text/css" />
  11.  
  12.  
  13.  
  14.  
  15. <script language="javascript" type="text/javascript">
  16. function clearText(field)
  17. {
  18.     if (field.defaultValue == field.value) field.value = '';
  19.     else if (field.value == '') field.value = field.defaultValue;
  20. }
  21. </script>
  22.  
  23. <link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
  24.  
  25. <script type="text/javascript" src="js/jquery.min.js"></script>
  26. <script type="text/javascript" src="js/ddsmoothmenu.js">
  27.  
  28.  
  29.  
  30. /***********************************************
  31. * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
  32. * This notice MUST stay intact for legal use
  33. * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
  34. ***********************************************/
  35.  
  36. </script>
  37.  
  38.  
  39.  
  40. <script type="text/javascript">
  41.  
  42. ddsmoothmenu.init({
  43.     mainmenuid: "gildomusica_menu", //menu DIV id
  44.     orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
  45.     classname: 'ddsmoothmenu', //class added to menu's outer DIV
  46.     //customtheme: ["#1c5a80", "#18374a"],
  47.     contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
  48. })
  49.  
  50. </script>
  51.  
  52.  
  53. <!-- Add jQuery library -->
  54.     <script type="text/javascript" src="/fancybox/lib/jquery-1.9.0.min.js"></script>
  55.  
  56.     <!-- Add mousewheel plugin (this is optional) -->
  57.     <script type="text/javascript" src="/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
  58.  
  59.     <!-- Add fancyBox main JS and CSS files -->
  60.     <script type="text/javascript" src="/fancybox/source/jquery.fancybox.js?v=2.1.4"></script>
  61.     <link rel="stylesheet" type="text/css" href="../source/jquery.fancybox.css?v=2.1.4" media="screen" />
  62.  
  63.     <!-- Add Button helper (this is optional) -->
  64.     <link rel="stylesheet" type="text/css" href="/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
  65.     <script type="text/javascript" src="../source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
  66.  
  67.     <!-- Add Thumbnail helper (this is optional) -->
  68.     <link rel="stylesheet" type="text/css" href="/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" />
  69.     <script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
  70.  
  71.     <!-- Add Media helper (this is optional) -->
  72.     <script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>
  73.  
  74.     <script type="text/javascript">
  75.         $(document).ready(function() {
  76.             /*
  77.              *  Simple image gallery. Uses default settings
  78.              */
  79.  
  80.             $('.fancybox').fancybox();
  81.  
  82.             /*
  83.              *  Different effects
  84.              */
  85.  
  86.             // Change title type, overlay closing speed
  87.             $(".fancybox-effects-a").fancybox({
  88.                 helpers: {
  89.                     title : {
  90.                         type : 'outside'
  91.                     },
  92.                     overlay : {
  93.                         speedOut : 0
  94.                     }
  95.                 }
  96.             });
  97.  
  98.             // Disable opening and closing animations, change title type
  99.             $(".fancybox-effects-b").fancybox({
  100.                 openEffect  : 'none',
  101.                 closeEffect : 'none',
  102.  
  103.                 helpers : {
  104.                     title : {
  105.                         type : 'over'
  106.                     }
  107.                 }
  108.             });
  109.  
  110.             // Set custom style, close if clicked, change title type and overlay color
  111.             $(".fancybox-effects-c").fancybox({
  112.                 wrapCSS    : 'fancybox-custom',
  113.                 closeClick : true,
  114.  
  115.                 openEffect : 'none',
  116.  
  117.                 helpers : {
  118.                     title : {
  119.                         type : 'inside'
  120.                     },
  121.                     overlay : {
  122.                         css : {
  123.                             'background' : 'rgba(238,238,238,0.85)'
  124.                         }
  125.                     }
  126.                 }
  127.             });
  128.  
  129.             // Remove padding, set opening and closing animations, close if clicked and disable overlay
  130.             $(".fancybox-effects-d").fancybox({
  131.                 padding: 0,
  132.  
  133.                 openEffect : 'elastic',
  134.                 openSpeed  : 150,
  135.  
  136.                 closeEffect : 'elastic',
  137.                 closeSpeed  : 150,
  138.  
  139.                 closeClick : true,
  140.  
  141.                 helpers : {
  142.                     overlay : null
  143.                 }
  144.             });
  145.  
  146.             /*
  147.              *  Button helper. Disable animations, hide close button, change title type and content
  148.              */
  149.  
  150.             $('.fancybox-buttons').fancybox({
  151.                 openEffect  : 'none',
  152.                 closeEffect : 'none',
  153.  
  154.                 prevEffect : 'none',
  155.                 nextEffect : 'none',
  156.  
  157.                 closeBtn  : false,
  158.  
  159.                 helpers : {
  160.                     title : {
  161.                         type : 'inside'
  162.                     },
  163.                     buttons : {}
  164.                 },
  165.  
  166.                 afterLoad : function() {
  167.                     this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
  168.                 }
  169.             });
  170.  
  171.  
  172.             /*
  173.              *  Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
  174.              */
  175.  
  176.             $('.fancybox-thumbs').fancybox({
  177.                 prevEffect : 'none',
  178.                 nextEffect : 'none',
  179.  
  180.                 closeBtn  : false,
  181.                 arrows    : false,
  182.                 nextClick : true,
  183.  
  184.                 helpers : {
  185.                     thumbs : {
  186.                         width  : 50,
  187.                         height : 50
  188.                     }
  189.                 }
  190.             });
  191.  
  192.             /*
  193.              *  Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
  194.             */
  195.             $('.fancybox-media')
  196.                 .attr('rel', 'media-gallery')
  197.                 .fancybox({
  198.                     openEffect : 'none',
  199.                     closeEffect : 'none',
  200.                     prevEffect : 'none',
  201.                     nextEffect : 'none',
  202.  
  203.                     arrows : false,
  204.                     helpers : {
  205.                         media : {},
  206.                         buttons : {}
  207.                     }
  208.                 });
  209.  
  210.             /*
  211.              *  Open manually
  212.              */
  213.  
  214.             $("#fancybox-manual-a").click(function() {
  215.                 $.fancybox.open('1_b.jpg');
  216.             });
  217.  
  218.             $("#fancybox-manual-b").click(function() {
  219.                 $.fancybox.open({
  220.                     href : 'iframe.html',
  221.                     type : 'iframe',
  222.                     padding : 5
  223.                 });
  224.             });
  225.  
  226.             $("#fancybox-manual-c").click(function() {
  227.                 $.fancybox.open([
  228.                     {
  229.                         href : '1_b.jpg',
  230.                         title : 'My title'
  231.                     }, {
  232.                         href : '2_b.jpg',
  233.                         title : '2nd title'
  234.                     }, {
  235.                         href : '3_b.jpg'
  236.                     }
  237.                 ], {
  238.                     helpers : {
  239.                         thumbs : {
  240.                             width: 75,
  241.                             height: 50
  242.                         }
  243.                     }
  244.                 });
  245.             });
  246.  
  247.  
  248.         });
  249.     </script>
  250.     <style type="text/css">
  251.         .fancybox-custom .fancybox-skin {
  252.             box-shadow: 0 0 50px #222;
  253.         }
  254.     </style>
  255.        
  256.        
  257.        
  258. </head>
  259.  
  260. <?php
  261. //valores da pagina
  262. $current_page = "portfolio";
  263. ?>
  264.  
  265. <body id="home">
  266.  
  267. <?php
  268. include_once('header.php');
  269. ?>
  270.  
  271. <div id="gildomusica_main_top"></div>
  272. <div id="gildomusica_main">
  273.         <h2>Vídeos</h2>
  274.         <br>
  275.         <br>
  276. <?php
  277. //incluir o ficheiro de defini谥s deliga袯 ࡢd
  278. include_once('ligacaoBD.php');
  279.  
  280. //construir a consulta
  281. $query="select * from videos ORDER BY Id_video DESC;";
  282.  
  283. //depois de seleccionado o registo, vamos mostrar os dados
  284. $resultado=mysql_query($query,$ligacao) or die("Não é possivel aceder aos dados!");
  285. $n_elementos=mysql_num_rows($resultado);
  286.  
  287. //mostrar os dados
  288. if(($n_elementos=mysql_num_rows($resultado))==0)
  289.     echo "Não existem registos na Base de Dados";
  290. else
  291.     {
  292.     //tabela
  293.     echo '<table id="box-table-a" width=?"100%" cellpadding=?"0" cellspacing=?"0" border=?"1" align=?"center">';
  294.     //cabeçalho da tabela
  295.     echo '<thead>
  296.         <tr>
  297.             <th scope="col">#</th>
  298.            <th scope="col">Nome</th>
  299.        </tr>
  300.    </thead>
  301.    <tbody>';
  302.     }
  303.    
  304.     //desenhar linhas
  305.     for($i=0;$i<$n_elementos;$i++)
  306.     {
  307.     $id_file=$i+1;
  308.     echo '<tbody>
  309.         <tr>';
  310.     echo "<td>$id_file</td>";
  311.     echo "<td> <a class=\"fancybox-media\" href=".mysql_result($resultado,$i,'url_video')."    >".mysql_result($resultado,$i,'titulo_video')." </a></td>";
  312.     echo "</tr>";
  313.     }
  314.  
  315.  
  316.    
  317. //fechar tabela
  318. echo "</tbody> </table>";
  319. ?>     
  320.  
  321. <div class="cleaner"></div>
  322. </div> <!-- END of main -->
  323. <?php
  324. include_once('footer.php');
  325. ?>
  326.  
  327. </body>
  328. </html>
Advertisement
Add Comment
Please, Sign In to add comment