web/client.php
changeset 420 eb7c2cff1816
parent 415 593250f3a286
child 456 53572585324d
equal deleted inserted replaced
419:ad151a86046f 420:eb7c2cff1816
    37 $head_logo = URL_ROOT."$rep/images/head_logo.gif";
    37 $head_logo = URL_ROOT."$rep/images/head_logo.gif";
    38 if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) {
    38 if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) {
    39     $head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo');
    39     $head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo');
    40 }
    40 }
    41 
    41 
       
    42 include dirname(__FILE__). ( ( isset($config['use_tweetcast']) && $config['use_tweetcast'] ) ? '/client_new.php' : '/client_old.php' )
       
    43 
    42 ?>
    44 ?>
    43 
       
    44 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       
    45    "http://www.w3.org/TR/html4/strict.dtd">
       
    46 
       
    47 <html lang="<?php echo($actual); ?>">
       
    48   <head>
       
    49     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       
    50     <title>Live Video and Annotation</title>
       
    51     <meta http-equiv="X-UA-Compatible" content="IE=9" />
       
    52 
       
    53     <!-- FONT -->
       
    54     <link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'>
       
    55     <link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'>
       
    56     
       
    57     <!-- CSS -->
       
    58     <link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen">
       
    59     <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>" type="text/css" media="screen, projection"/>
       
    60 
       
    61     <!-- JAVASCRIPT -->
       
    62     <script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
       
    63     <script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'))?>"></script>
       
    64     <script type="text/javascript" src="<?php echo(registry_url('jquery-scrollto','js'))?>"></script>
       
    65     <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script>
       
    66     <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script>
       
    67     <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
       
    68     
       
    69     <script type="text/javascript" src="<?php echo(registry_url('twcx-standalone','js'))?>"></script>
       
    70     <script type="text/javascript" src="<?php echo(registry_url('twcx-main','js'))?>"></script>
       
    71     <script type="text/javascript" src="config.js"></script>
       
    72 
       
    73     <script type="text/javascript">
       
    74     l10n = { "rechercher" : "<?php echo $translate->_('Rechercher'); ?>" }
       
    75     
       
    76     function add_grammar(value) {
       
    77         var _st = $('#status'),
       
    78             _val = _st.val();
       
    79         _st.val( _val + ( _val[_val.length - 1] == " " ? "" : " " ) + value ).change();
       
    80     }
       
    81     
       
    82     $(document).ready(function() {
       
    83         
       
    84         setTimeout(function() {
       
    85             $.scrollTo(70, 1000);
       
    86         }, 2000);
       
    87         
       
    88         $("#accordeon li.acctitre").click(function() {
       
    89             $("#accordeon li.acctexte").slideToggle();
       
    90         })
       
    91 
       
    92             //$("txt").hide();
       
    93             $(".loginbutton").click(function() {
       
    94                 document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
    95             });
       
    96             $("#IDENTIFIER").click(function() {
       
    97                 document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
    98             });
       
    99             
       
   100             // BUTTONS
       
   101             $(".tweetButton").click(function() {
       
   102                 add_grammar($(this).text());
       
   103             })
       
   104             
       
   105             // SEND TWEETS
       
   106             $("#sendTweet").click(function(){
       
   107                 var MyStatus = $('#status').val();
       
   108                 $.post('tweet_ajax.php', {status:MyStatus}
       
   109                 ,function(data) {
       
   110                 
       
   111                     if(data=="true"){
       
   112                         $("#messageSuccess").show('fast');
       
   113                         $("#messageSuccess").delay(800).hide('slow');
       
   114                         $('#status').val("<?php echo($config['hashtag']); ?>");
       
   115                         $('#status').change();
       
   116                     }else{
       
   117                         $("#error").text(data);
       
   118                         $("#messageFailed").show('fast');
       
   119                         $("#messageFailed").delay(800).hide('slow');
       
   120                     }
       
   121                     
       
   122                 });
       
   123                 
       
   124             });
       
   125 
       
   126             $("#status").bind("change keyup paste blur focus",function() {
       
   127                 newval = 140-$("#status").val().length;
       
   128                 $('#tweetCounter').val(newval);
       
   129                 if(newval < 0) {
       
   130                     $('#tweetCounter').addClass("tweetCounterNegative");
       
   131                 }
       
   132                 else {
       
   133                     $('#tweetCounter').removeClass("tweetCounterNegative");
       
   134                 }
       
   135             });
       
   136             
       
   137             
       
   138             $("#Program").fancybox({
       
   139                 'width'             : '75%',
       
   140                 'height'            : '75%',
       
   141                 'autoScale'         : false,
       
   142                 'transitionIn'      : 'none',
       
   143                 'transitionOut'     : 'none',
       
   144                 'type'              : 'iframe'
       
   145             });
       
   146             
       
   147 
       
   148         });
       
   149 
       
   150         //<!-- LIMIT TEXTAREA:
       
   151         function imposemax(obj) {
       
   152             obj.value = obj.value.substr(0,140);
       
   153         };
       
   154         // End -->
       
   155 
       
   156     </script>
       
   157     
       
   158     <script type="text/javascript">
       
   159     
       
   160       var _gaq = _gaq || [];
       
   161       _gaq.push(['_setAccount', 'UA-23581291-1']);
       
   162       _gaq.push(['_trackPageview']);
       
   163       _gaq.push(['_setAllowAnchor', true]);
       
   164     
       
   165       (function() {
       
   166         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
       
   167         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
       
   168         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       
   169       })();
       
   170     
       
   171     </script>
       
   172     
       
   173   </head>
       
   174   <body>
       
   175     <div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div>
       
   176 
       
   177         <div id="container">
       
   178             <div id="colgauche">
       
   179                 <div class="barre">
       
   180                     <img id="headlogo" src="<?php echo($head_logo); ?>" width="171" height="63" />
       
   181                     <div id="minilogo"></div>
       
   182                     <ul class="menu">
       
   183                         <li>
       
   184                             <a href="<?php echo(URL_ROOT); ?>" class="menuLink">
       
   185                                 <?php print $translate->_("Accueil"); ?>
       
   186                             </a>
       
   187                         </li>
       
   188                         <li>
       
   189                             <a href="<?php echo($translate->_('config__link')); ?>" class="menuLink" target="_blank" id='Program'>
       
   190                                 <?php print $translate->_("Programme"); ?>
       
   191                             </a>
       
   192                         </li>
       
   193                         <li>
       
   194                             <a href="../about.php" class="menuLink" >
       
   195                                 <?php print $translate->_("A propos"); ?>
       
   196                             </a>
       
   197                         </li>
       
   198                     </ul>
       
   199                     <ul class="menu">
       
   200                         <li>
       
   201                             <a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" >
       
   202                                 <img src='<?php echo(URL_ROOT); ?>images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
       
   203                                 <?php print $translate->_("Japonais"); ?>
       
   204                             </a></li>
       
   205                         <li>
       
   206                             <a href="<?php URL_ROOT ?>client.php?lang=fr" class="menuLink">
       
   207                                 <img src='<?php echo(URL_ROOT); ?>images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
       
   208                                 <?php print $translate->_("Français"); ?>
       
   209                             </a>
       
   210                         </li>
       
   211                         <li>
       
   212                             <a href="<?php URL_ROOT ?>client.php?lang=en" class="menuLink">
       
   213                                 <img src='<?php echo(URL_ROOT); ?>images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> />
       
   214                                 <?php print $translate->_("Anglais"); ?>
       
   215                             </a>
       
   216                         </li>
       
   217                     </ul>
       
   218                 </div>
       
   219                 <div id="twwWrap">
       
   220                     <div id="tweetWriter">
       
   221                         <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3>
       
   222                         <form  action="tweet.php" method="post" id="statusform" >
       
   223                             <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
       
   224                                 echo("<div class='loginbutton'><a href='".URL_ROOT."$rep/client.php?CONNECT=true' class='loginlink'>".$translate->_("Vous n'êtes pas connecté.")."</a></div>");
       
   225                             } else {
       
   226                                 echo("<textarea name='status' id='status' rows='3' cols='50' onkeypress='imposemax(this);'>$config[hashtag]</textarea>");
       
   227                             }
       
   228                             ?>
       
   229                             <div id="messageSuccess" style="background-color:lightgreen; display: none;">
       
   230                                 <?php print $translate->_("Envoyé"); ?><br/><br/>
       
   231                             </div>
       
   232                             <div id="messageFailed" style="background-color:red; display: none;">
       
   233                                 <?php print $translate->_("Erreur1"); ?><div id="error">&nbsp;</div><br/><br/>
       
   234                             </div>
       
   235                             <a href="#"  id="sendTweet" >
       
   236                                 <span><?php print $translate->_("Envoyer"); ?></span>
       
   237                             </a>
       
   238                             <?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
       
   239                             <input id="tweetCounter" value="<?php echo(140-strlen($config['hashtag']));?>" disabled="disabled" size="3"/>
       
   240                             <?php endif;?>
       
   241                             <a id="positive" title="<?php echo $translate->_('Agree'); ?>" class="tweetButton">++</a>
       
   242                             <a id="negative" title="<?php echo $translate->_('Disagree'); ?>" class="tweetButton">--</a>
       
   243                             <a id="reference" title="<?php echo $translate->_('Reference'); ?>" class="tweetButton">==</a>
       
   244                             <a id="question" title="<?php echo $translate->_('Question'); ?>" class="tweetButton"> ??</a>
       
   245                             
       
   246                             <div style="clear: both;"></div>
       
   247                         </form>
       
   248                     </div>
       
   249                 </div>
       
   250                 <div id="tweetviz">
       
   251                     <div class="barre">
       
   252                         <form id="recherche">
       
   253                             <input autocomplete="off" class="greyed" id="inp_q" value="<?php echo $translate->_('Rechercher'); ?>" />
       
   254                             <input id="inp_submit" type="submit" />
       
   255                             <input id="inp_reset" type="reset" />
       
   256                             <div id="time_controls">
       
   257                                 <div id="time_legende"></div>
       
   258                                 <div id="time_scale"></div>
       
   259                                 <a href="#" id="time_zoomout"></a>
       
   260                                 <a href="#" id="time_zoomin"></a>
       
   261                             </div>
       
   262                             <div id="recherche_annot">
       
   263                                 <?php echo $translate->_('SearchByPolemic'); ?> : <span id="rech_list_annot"></span><br />
       
   264                             </div>
       
   265                         </form>
       
   266                     </div>
       
   267                     <ul id="tweetlist"></ul>
       
   268                     <div id="timeline"></div>
       
   269                     <div id="scrollcont">
       
   270                         <div id="scrollin"></div>
       
   271                     </div>
       
   272                 </div>
       
   273             </div>
       
   274             <div id="coldroite">
       
   275                 <div id="vlWrap">
       
   276                     <div id="videoLivePlayer">
       
   277                     <?php if ($config['islive']):?>
       
   278                         <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="480" height="320">
       
   279                             <param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" />
       
   280                             <param name="allowfullscreen" value="true" />
       
   281                             <param name="allowscriptaccess" value="always" />
       
   282                             <param name="wmode" value="transparent" />
       
   283                             <param name="flashvars" value="autostart=true&live=true&image=<?php echo($big_visual_url); ?>&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&controlbar=none&autostart=true" />
       
   284                             <embed
       
   285                                 type="application/x-shockwave-flash"
       
   286                                 id="player2"
       
   287                                 name="player2"
       
   288                                 src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"
       
   289                                 width="480"
       
   290                                 height="320"
       
   291                                 allowscriptaccess="always"
       
   292                                 allowfullscreen="true"
       
   293                                 wmode="transparent"
       
   294                                 flashvars="autostart=true&live=true&provider=rtmp&streamer=rtmp://media.iri.centrepompidou.fr/ddc_player/&file=livestream&image=<?php echo($big_visual_url); ?>&controlbar=none&autostart=true"
       
   295                             />
       
   296                         </object>
       
   297                     <?php elseif(isset($config['islive_embed']) && count($config['islive_embed'])>0):?>
       
   298                         <?php echo($config['islive_embed']); ?>
       
   299                     <?php else: ?>
       
   300                         <img src="<?php echo($big_visual_url); ?>" width="480"  height="320" />
       
   301                     <?php endif; ?>
       
   302                     </div>
       
   303                 </div>
       
   304                 <div id="out_fleche">
       
   305                 <!--    <div id="in_fleche"></div> -->
       
   306                 </div>
       
   307                 <ul id="accordeon">
       
   308                     <li class="acctitre">
       
   309                         <h3><?php echo($translate->_('config__title')); ?></h3>
       
   310                     </li>
       
   311                     <li class="acctexte">
       
   312                         <p><?php echo($translate->_('config__description')); ?></p>
       
   313                     </li>
       
   314                     <li class="acctitre">
       
   315                         <h3><?php echo($translate->_('keywords')); ?></h3>
       
   316                     </li>
       
   317                     <li class="acctexte hidden">
       
   318                         <div class="accsubtitle">
       
   319                             <div class="aroundsubtitle">
       
   320                                 <h4><?php echo($translate->_('suggested')); ?></h4>
       
   321                             </div>
       
   322                         </div>
       
   323                         <div class="tagcloud" id="suggkw"></div>
       
   324                     </li>
       
   325                     <li class="acctexte hidden">
       
   326                         <div class="accsubtitle">
       
   327                             <div class="aroundsubtitle">
       
   328                                 <h4><?php echo($translate->_('contextual')); ?></h4>
       
   329                             </div>
       
   330                         </div>
       
   331                         <div class="tagcloud" id="motscles"></div>
       
   332                     </li>
       
   333                     <li class="acctitre">
       
   334                         <h3>
       
   335                             <a href="../sweet-tweet" target="_blank">Visualisation par thèmes "Sweet Tweets"</a>
       
   336                         </h3>
       
   337                     </li>
       
   338                 </ul>
       
   339             </div>
       
   340             <div class="footer">
       
   341                 <hr />
       
   342          <?php
       
   343                 echo($translate->_('config__partenaires'));
       
   344                 
       
   345                 if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
       
   346                     echo("| <a href='clear.php' class='footerLink'>".$translate->_("D&eacute;connexion")."</a>");
       
   347                 }
       
   348          ?>
       
   349             </div>
       
   350         </div>
       
   351         <div id="hovertweet">
       
   352             <div id="hovercontent"></div>
       
   353             <div id="hoverarrow"></div>
       
   354         </div>
       
   355         <ul id="hoverkw">
       
   356             <li><a id="hkwsearch" href="#"><?php echo $translate->_('Rechercher'); ?></a></li>
       
   357             <li><a id="hkwtweet" href="#"><?php echo $translate->_('addToTweet'); ?></a></li>
       
   358         </ul>
       
   359   </body>
       
   360 </html>