web/archives-iframe.php
changeset 495 34f92d5b2acf
child 497 23c961f82e82
equal deleted inserted replaced
494:36b25df474ac 495:34f92d5b2acf
       
     1 <?php
       
     2 error_reporting(E_ALL);
       
     3 ini_set('display_errors', '1');
       
     4 /**
       
     5  * include some common code (like we did in the 90s)
       
     6  * People still do this? ;)
       
     7  */
       
     8 include_once './common.php';
       
     9 
       
    10 function special_display_archives_list($archives_list, $box_class, $url_root, $basepath, &$translate) {
       
    11     
       
    12     
       
    13     for($i=0;$i<count($archives_list);$i++) {
       
    14         print("             <div class=\"$box_class\">\n");
       
    15         $archive_ref = $archives_list[$i];
       
    16     
       
    17         $archive_name = $archive_ref;
       
    18         $metadata = null;
       
    19         if(is_array($archive_ref)) {
       
    20             $archive_name = $archive_ref[0];
       
    21             $metadata = $archive_ref[1];
       
    22         }
       
    23         print(get_archive_box($archive_name,$metadata, $url_root, $basepath, $translate));
       
    24         print("             </div>\n");
       
    25     }
       
    26 }
       
    27 
       
    28 ?>
       
    29 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
       
    30 <html lang="<?php echo($actual); ?>">
       
    31   <head>
       
    32     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       
    33     <title>Polemic tweet - Live Video and Annotation</title>
       
    34 
       
    35     <link rel="stylesheet" href="<?php echo(registry_url('archives-iframe','css'));?>" type="text/css" media="screen, projection"/>
       
    36 
       
    37     <!-- JAVASCRIPT -->
       
    38     <script type="text/javascript" src="<?php echo(registry_url('jquery','js'));?>"></script>
       
    39     <script type="text/javascript" src="<?php echo(registry_url('jquery-tools','js'));?>"></script>
       
    40 
       
    41     <!-- FONT -->
       
    42     <link href='<?php echo(registry_url('PT-Sans_Narrow','font'));?>' rel='stylesheet' type='text/css'>
       
    43 
       
    44     <script type="text/javascript">
       
    45         var _timerJqScroll;
       
    46         function startTimer() {
       
    47             if (_timerJqScroll) {
       
    48                 clearInterval(_timerJqScroll);
       
    49             }
       
    50             _timerJqScroll = setInterval(function() { $(".scrollable").scrollable().next()}, 5000);
       
    51         }
       
    52         $(function() {
       
    53             $(".archivesVideoBox").mouseover(function() {
       
    54                 $(this).css({'backgroundColor':'#fff'});
       
    55                 $(this).cursor = "pointer";
       
    56             }).mouseout(function() {
       
    57                 $(this).css({'backgroundColor':'#f2f2f2'});
       
    58             });
       
    59             $(".scrollable").scrollable({"circular":true});
       
    60             $(".browse, .item").click(function() {
       
    61                 startTimer();
       
    62             })
       
    63             startTimer();
       
    64         });
       
    65 
       
    66         var _gaq = _gaq || [];
       
    67         _gaq.push(['_setAccount', 'UA-23581291-1']);
       
    68         _gaq.push(['_trackPageview']);
       
    69         _gaq.push(['_setAllowAnchor', true]);
       
    70       
       
    71         (function() {
       
    72             var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
       
    73             ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
       
    74             var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       
    75         })();
       
    76     
       
    77     </script>
       
    78   </head>
       
    79   <body>
       
    80         <div class="archivesTitleContainer">
       
    81             <h3 class="archivesTitle"><?php print $translate->_("shortArchive"); ?></h3>
       
    82         </div>
       
    83         <div class="archivesBoxContainer scrollable">
       
    84             <!-- -->
       
    85             <div class="archivesTitleActionsContainer">
       
    86                 <div class="archivesActionsContainer" id="actions">
       
    87                     <a class="prev browse left"></a>
       
    88                     <a class="next browse right"></a>
       
    89                 </div>
       
    90             </div>
       
    91             
       
    92             <!-- -->
       
    93             <div class="items">
       
    94                 <?php
       
    95                 $arch_list = array_reverse($archives_list);
       
    96                 special_display_archives_list($arch_list, "archive_box_3 item", URL_ROOT, dirname(__FILE__)."/", $translate);
       
    97                 ?>
       
    98             </div>
       
    99         </div>
       
   100   </body>
       
   101 </html>