web/client.php
changeset 536 5dd170a735e9
parent 489 a543cdb3cc79
child 538 ba7bf4da33d9
equal deleted inserted replaced
535:8276f3ff7a3f 536:5dd170a735e9
    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' )
    42     $embed = (isset($_REQUEST['embed']) && $_REQUEST['embed']);
    43 
    43     $videoWidth = ( $embed ? 442 : 480 );
    44 include dirname(__FILE__).'/client_new.php'
    44     $videoHeight = ( $embed ? 250 : 320 );
    45 
       
    46 ?>
    45 ?>
       
    46 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       
    47    "http://www.w3.org/TR/html4/strict.dtd">
       
    48 
       
    49 <html lang="<?php echo($actual); ?>">
       
    50   <head>
       
    51     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       
    52     <title>Live Video and Annotation</title>
       
    53     <meta http-equiv="X-UA-Compatible" content="IE=9" />
       
    54 
       
    55     <!-- FONT -->
       
    56     <link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'>
       
    57     <link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'>
       
    58     
       
    59     <!-- CSS -->
       
    60     <link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen">
       
    61     <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>" type="text/css" media="screen, projection"/>
       
    62 
       
    63     <!-- JAVASCRIPT -->
       
    64     <script type="text/javascript" src="<?php echo(registry_url('jquery','js'))?>"></script>
       
    65     <script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'))?>"></script>
       
    66     <script type="text/javascript" src="<?php echo(registry_url('jquery-scrollto','js'))?>"></script>
       
    67     <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script>
       
    68     <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script>
       
    69     <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
       
    70     
       
    71     <script type="text/javascript">
       
    72         <?php if (isset($config['hashtag'])) echo "var tracking_keywords = ".json_encode(array($config['hashtag'])).";"; ?>
       
    73         <?php if (isset($config['suggested_keywords'])) echo "var suggested_keywords = ".json_encode($config['suggested_keywords']).";"; ?>
       
    74         <?php if (isset($config['js_config'])) echo $config['js_config']; ?>
       
    75     </script>
       
    76     <script type="text/javascript" src="<?php echo(registry_url('twcx-main','js'))?>"></script>
       
    77 
       
    78     <script type="text/javascript">
       
    79     l10n = { "rechercher" : "<?php echo $translate->_('Rechercher'); ?>" }
       
    80     
       
    81     function add_grammar(value) {
       
    82         var _st = $('#status'),
       
    83             _val = _st.val();
       
    84         _st.val( _val + ( _val[_val.length - 1] == " " ? "" : " " ) + value ).change();
       
    85     }
       
    86     
       
    87     $(document).ready(function() {
       
    88         
       
    89 /*        setTimeout(function() {
       
    90             $.scrollTo(70, 1000);
       
    91         }, 2000); */
       
    92 
       
    93             //$("txt").hide();
       
    94             $(".loginbutton").click(function() {
       
    95                 document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
    96             });
       
    97             $("#IDENTIFIER").click(function() {
       
    98                 document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
    99             });
       
   100             
       
   101             function updateCounter() {
       
   102                 var _v = $("#status").val();
       
   103                 if (_v.length > 140) {
       
   104                     _v = _v.substr(0,140);
       
   105                     $("#status").val(_v);
       
   106                 }
       
   107                 $('#tweetCounter').html(140-_v.length);
       
   108                 if(140-_v.length < 0) {
       
   109                     $('#tweetCounter').addClass("tweetCounterNegative");
       
   110                 }
       
   111                 else {
       
   112                     $('#tweetCounter').removeClass("tweetCounterNegative");
       
   113                 }
       
   114                 $(".tweetButton").each(function(_i, _e) {
       
   115                     if (_v.search($(_e).find('span.twbSyntax').text().replace(/(\W)/g, '\\$1')) > -1) {
       
   116                         $(_e).addClass('selected');
       
   117                     } else {
       
   118                         $(_e).removeClass('selected');
       
   119                     }
       
   120                 });
       
   121             }
       
   122             
       
   123             // BUTTONS
       
   124             $(".tweetButton").click(function() {
       
   125                 add_grammar($(this).find('span.twbSyntax').text());
       
   126                 updateCounter();
       
   127             })
       
   128             
       
   129             // SEND TWEETS
       
   130             $("#sendTweet").click(function(){
       
   131                 var MyStatus = $('#status').val();
       
   132                 $.post('tweet_ajax.php', {status:MyStatus}
       
   133                 ,function(data) {
       
   134                 
       
   135                     if(data=="true"){
       
   136                         $("#messageSuccess").show('fast');
       
   137                         $("#messageSuccess").delay(800).hide('slow');
       
   138                         $('#status').val("<?php echo($config['hashtag']); ?>");
       
   139                         $('#status').change();
       
   140                     }else{
       
   141                         $("#error").text(data);
       
   142                         $("#messageFailed").show('fast');
       
   143                         $("#messageFailed").delay(800).hide('slow');
       
   144                     }
       
   145                     
       
   146                 });
       
   147                 
       
   148             });
       
   149             
       
   150 
       
   151             $("#status").bind("change keyup paste blur focus",updateCounter);
       
   152             
       
   153             
       
   154             $("#Program").fancybox({
       
   155                 'width'             : '75%',
       
   156                 'height'            : '75%',
       
   157                 'autoScale'         : false,
       
   158                 'transitionIn'      : 'none',
       
   159                 'transitionOut'     : 'none',
       
   160                 'type'              : 'iframe'
       
   161             });
       
   162             $(".embedbutton").fancybox({
       
   163                 'width'             : 360,
       
   164                 'height'            : 360,
       
   165                 'autoDimensions'    : false,
       
   166                 'transitionIn'      : 'none',
       
   167                 'transitionOut'     : 'none',
       
   168                 'type'              : 'iframe'
       
   169             });
       
   170             
       
   171     $("#onglets a").click(function() {
       
   172         $("div.ifwrap").hide();
       
   173         $("#onglets li").removeClass("selected");
       
   174         $(this).parent().addClass("selected");
       
   175         var hr = $(this).attr("href");
       
   176         if (hr[0] == '#') {
       
   177             $(hr).show();
       
   178         } else {
       
   179             $("#iframeWrap").show();
       
   180             $("#graphFrame").attr("src", hr);
       
   181         }
       
   182         return false;
       
   183     });
       
   184             
       
   185 
       
   186         });
       
   187 
       
   188         //<!-- LIMIT TEXTAREA:
       
   189         // End -->
       
   190 
       
   191     </script>
       
   192     
       
   193     <script type="text/javascript">
       
   194     
       
   195       var _gaq = _gaq || [];
       
   196       _gaq.push(['_setAccount', 'UA-23581291-1']);
       
   197       _gaq.push(['_trackPageview']);
       
   198       _gaq.push(['_setAllowAnchor', true]);
       
   199     
       
   200       (function() {
       
   201         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
       
   202         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
       
   203         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       
   204       })();
       
   205     
       
   206     </script>
       
   207     
       
   208   </head>
       
   209   <body<?php if ($embed) { echo ' class="embed"'; } ?>>
       
   210     <div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div>
       
   211 
       
   212         <div id="container">
       
   213             
       
   214             <div id="coldroite">
       
   215                 
       
   216                 <div class="embedbar">
       
   217                     <a class="embedbutton" href="<?php echo(URL_ROOT.$rep)?>/live_embed_form.php">Intégrer</a>
       
   218                     <!-- AddThis Button BEGIN -->
       
   219                     <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
       
   220                         <a class="addthis_button_facebook"></a>
       
   221                         <a class="addthis_button_twitter"></a>
       
   222                         <a class="addthis_button_email"></a>
       
   223                         <a class="addthis_button_compact"></a>
       
   224                     </div>
       
   225                     <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
       
   226                     <!-- AddThis Button END -->
       
   227                 </div>
       
   228                 <ul id="onglets">
       
   229 <?php if (isset($config['semantic_board']) or isset($config['knowtex_url'])) { ?>
       
   230                     <li class="selected">
       
   231                         <a href="#vlWrap"><?php echo($translate->_('Video')); ?></a>
       
   232                     </li>
       
   233 <?php } ?>
       
   234 <?php if (isset($config['semantic_board']) and $config['semantic_board']) { ?>
       
   235                     <li>
       
   236                         <a href="semanticboard.php?small=1&theme=jour"><?php echo($translate->_('SemanticBoard')); ?></a>
       
   237                     </li>
       
   238 <?php } ?>
       
   239 <?php if (isset($config['knowtex_url'])) { ?>
       
   240                     <li>
       
   241                         <a href="<?php echo $config['knowtex_url'] ?>"><?php echo($translate->_('SocialGraph')); ?></a>
       
   242                     </li>
       
   243 <?php } ?>
       
   244                 </ul>
       
   245                 <div class="ifwrap" id="vlWrap">
       
   246                     <div id="videoLivePlayer">
       
   247                     <?php if ($config['islive']):?>
       
   248                         <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="<?php echo $videoWidth; ?>" height="<?php echo $videoHeight; ?>">
       
   249                             <param name="movie" value="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf" />
       
   250                             <param name="allowfullscreen" value="true" />
       
   251                             <param name="allowscriptaccess" value="always" />
       
   252                             <param name="wmode" value="transparent" />
       
   253                             <?php
       
   254 
       
   255 function flv_param($name,$default) {
       
   256     global $config;
       
   257     return ( isset($config["flv_$name"]) ? ( $config["flv_$name"] ? "&$name=".$config["flv_$name"] : "" ) : "&$name=$default" );
       
   258 }
       
   259 
       
   260 $flashvars = "autostart=true&live=true".flv_param("provider", "rtmp").flv_param("streamer", "rtmp://media.iri.centrepompidou.fr/ddc_player/").flv_param("file", "livestream")."&image=$big_visual_url&controlbar=none&autostart=true";
       
   261                             ?>
       
   262                             <param name="flashvars" value="<?php echo $flashvars; ?>" />
       
   263                             <embed
       
   264                                 type="application/x-shockwave-flash"
       
   265                                 id="player2"
       
   266                                 name="player2"
       
   267                                 src="<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"
       
   268                                 width="<?php echo $videoWidth; ?>"
       
   269                                 height="<?php echo $videoHeight; ?>"
       
   270                                 allowscriptaccess="always"
       
   271                                 allowfullscreen="true"
       
   272                                 wmode="transparent"
       
   273                                 flashvars="<?php echo $flashvars; ?>"
       
   274                             />
       
   275                         </object>
       
   276                     <?php elseif(isset($config['islive_embed']) && count($config['islive_embed'])>0):?>
       
   277                         <?php echo($config['islive_embed']); ?>
       
   278                     <?php else: ?>
       
   279                         <img src="<?php echo($big_visual_url); ?>" width="<?php echo $videoWidth; ?>"  height="<?php echo $videoHeight; ?>" />
       
   280                     <?php endif; ?>
       
   281                     </div>
       
   282                 </div>
       
   283                 <div class="ifwrap hidden" id="iframeWrap">
       
   284                     <iframe id="graphFrame"></iframe>
       
   285                 </div>
       
   286                 <div id="out_fleche">
       
   287                 <!--    <div id="in_fleche"></div> -->
       
   288                 </div>
       
   289                 <ul id="accordeon">
       
   290                     <li class="acctitre">
       
   291                         <h3><?php echo($translate->_('config__title')); ?></h3>
       
   292                     </li>
       
   293                     <li class="acctexte">
       
   294                         <p><?php echo($translate->_('config__description')); ?></p>
       
   295                     </li>
       
   296                     <li class="acctitre">
       
   297                         <h3><?php echo($translate->_('keywords')); ?></h3>
       
   298                     </li>
       
   299                     <li class="fl">
       
   300                         <ul class="fl">
       
   301                             <li class="acctexte">
       
   302                                 <div class="accsubtitle">
       
   303                                     <div class="aroundsubtitle">
       
   304                                         <h4><?php echo($translate->_('suggested')); ?></h4>
       
   305                                     </div>
       
   306                                 </div>
       
   307                                 <div class="tagcloud" id="suggkw"></div>
       
   308                             </li>
       
   309                             <li class="acctexte">
       
   310                                 <div class="accsubtitle">
       
   311                                     <div class="aroundsubtitle">
       
   312                                         <h4><?php echo($translate->_('contextual')); ?></h4>
       
   313                                     </div>
       
   314                                 </div>
       
   315                                 <div class="tagcloud" id="motscles"></div>
       
   316                             </li>
       
   317                         </ul>
       
   318                     </li>
       
   319                 </ul>
       
   320             </div>
       
   321             <div id="colgauche">
       
   322                 <div class="barre">
       
   323                     <img id="headlogo" src="<?php echo($head_logo); ?>" width="171" height="63" />
       
   324                     <div id="minilogo"></div>
       
   325                     <ul class="menu">
       
   326                         <li>
       
   327                             <a href="<?php echo(URL_ROOT); ?>" class="menuLink">
       
   328                                 <?php print $translate->_("Accueil"); ?>
       
   329                             </a>
       
   330                         </li>
       
   331                         <li>
       
   332                             <a href="<?php echo($translate->_('config__link')); ?>" class="menuLink" target="_blank" id='Program'>
       
   333                                 <?php print $translate->_("Programme"); ?>
       
   334                             </a>
       
   335                         </li>
       
   336                         <li>
       
   337                             <a href="../about.php" class="menuLink" >
       
   338                                 <?php print $translate->_("A propos"); ?>
       
   339                             </a>
       
   340                         </li>
       
   341                     </ul>
       
   342                     <ul class="menu">
       
   343                         <li>
       
   344                             <a href="<?php URL_ROOT ?>client.php?lang=ja_JP" class="menuLink" >
       
   345                                 <img src='<?php echo(URL_ROOT); ?>images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
       
   346                                 <?php print $translate->_("Japonais"); ?>
       
   347                             </a></li>
       
   348                         <li>
       
   349                             <a href="<?php URL_ROOT ?>client.php?lang=fr" class="menuLink">
       
   350                                 <img src='<?php echo(URL_ROOT); ?>images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> />
       
   351                                 <?php print $translate->_("Français"); ?>
       
   352                             </a>
       
   353                         </li>
       
   354                         <li>
       
   355                             <a href="<?php URL_ROOT ?>client.php?lang=en" class="menuLink">
       
   356                                 <img src='<?php echo(URL_ROOT); ?>images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> />
       
   357                                 <?php print $translate->_("Anglais"); ?>
       
   358                             </a>
       
   359                         </li>
       
   360                     </ul>
       
   361                 </div>
       
   362                 <div id="twwWrap">
       
   363                     <div id="tweetWriter">
       
   364                             <?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])): ?>
       
   365                             <div id="tweetCounter"><?php echo(140-strlen($config['hashtag']));?></div>
       
   366                             <?php endif;?>
       
   367                         <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3>
       
   368                         <form  action="tweet.php" method="post" id="statusform" >
       
   369                             <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
       
   370                                 echo("<div class='loginbutton'><a href='".URL_ROOT."$rep/client.php?CONNECT=true' class='loginlink'>".$translate->_("Vous n'êtes pas connecté.")."</a></div>");
       
   371                             } else {
       
   372                                 echo("<textarea name='status' id='status' rows='3' cols='50'>$config[hashtag]</textarea>");
       
   373                             }
       
   374                             ?>
       
   375                             <div id="messageSuccess" style="background-color:lightgreen; display: none;">
       
   376                                 <?php print $translate->_("Envoyé"); ?><br/><br/>
       
   377                             </div>
       
   378                             <div id="messageFailed" style="background-color:red; display: none;">
       
   379                                 <?php print $translate->_("Erreur1"); ?><div id="error">&nbsp;</div><br/><br/>
       
   380                             </div>
       
   381                             <a href="#"  id="sendTweet" >
       
   382                                 <span><?php print $translate->_("Envoyer"); ?></span>
       
   383                             </a>
       
   384                             <a id="positive" title="++ | <?php echo $translate->_('Agree'); ?>" class="tweetButton twbGreen">
       
   385                                 <span class="twbSyntax">++</span>
       
   386                                 <span class="twbSeparator">|</span>
       
   387                                 <span class="twbLabel"><?php echo $translate->_('Agree'); ?></span>
       
   388                             </a>
       
   389                             <a id="negative" title="-- | <?php echo $translate->_('Disagree'); ?>" class="tweetButton twbRed">
       
   390                                 <span class="twbSyntax">--</span>
       
   391                                 <span class="twbSeparator">|</span>
       
   392                                 <span class="twbLabel"><?php echo $translate->_('Disagree'); ?></span>
       
   393                             </a>
       
   394                             <a id="reference" title="== | <?php echo $translate->_('Reference'); ?>" class="tweetButton twbYellow">
       
   395                                 <span class="twbSyntax">==</span>
       
   396                                 <span class="twbSeparator">|</span>
       
   397                                 <span class="twbLabel"><?php echo $translate->_('Reference'); ?></span>
       
   398                             </a>
       
   399                             <a id="question" title="?? | <?php echo $translate->_('Question'); ?>" class="tweetButton twbBlue">
       
   400                                 <span class="twbSyntax">??</span>
       
   401                                 <span class="twbSeparator">|</span>
       
   402                                 <span class="twbLabel"><?php echo $translate->_('Question'); ?></span>
       
   403                             </a>
       
   404                             
       
   405                             <div style="clear: both;"></div>
       
   406                         </form>
       
   407                     </div>
       
   408                 </div>
       
   409                 <div id="tweetviz">
       
   410                     <div class="barre">
       
   411                         <form id="recherche">
       
   412                             <input autocomplete="off" class="greyed" id="inp_q" value="<?php echo $translate->_('Rechercher'); ?>" />
       
   413                             <input id="inp_submit" type="submit" />
       
   414                             <input id="inp_reset" type="reset" />
       
   415                             <div id="time_controls">
       
   416                                 <div id="time_legende"></div>
       
   417                                 <div id="time_scale"></div>
       
   418                                 <a href="#" id="time_zoomout"></a>
       
   419                                 <a href="#" id="time_zoomin"></a>
       
   420                             </div>
       
   421                             <div id="recherche_annot">
       
   422                                 <?php echo $translate->_('SearchByPolemic'); ?> : <span id="rech_list_annot"></span><br />
       
   423                             </div>
       
   424                         </form>
       
   425                     </div>
       
   426                     <ul id="tweetlist"></ul>
       
   427                     <div id="timeline"></div>
       
   428                     <div id="scrollcont">
       
   429                         <div id="scrollin"></div>
       
   430                     </div>
       
   431                 </div>
       
   432             </div>
       
   433             <div class="footer">
       
   434                 <hr />
       
   435          <?php
       
   436                 echo($translate->_('config__partenaires'));
       
   437                 
       
   438                 if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
       
   439                     echo("| <a href='clear.php' class='footerLink'>".$translate->_("D&eacute;connexion")."</a>");
       
   440                 }
       
   441          ?>
       
   442             </div>
       
   443         </div>
       
   444         <div id="hovertweet">
       
   445             <div id="hovercontent"></div>
       
   446             <div id="hoverarrow"></div>
       
   447         </div>
       
   448         <ul id="hoverkw">
       
   449             <li><a id="hkwsearch" href="#"><?php echo $translate->_('Rechercher'); ?></a></li>
       
   450             <li><a id="hkwtweet" href="#"><?php echo $translate->_('addToTweet'); ?></a></li>
       
   451         </ul>
       
   452   </body>
       
   453 </html>