web/client.php
changeset 557 636258d3fe4b
parent 553 65e5d6884a9e
child 559 64b3376aef6a
equal deleted inserted replaced
556:511810f90c93 557:636258d3fe4b
    24     /**
    24     /**
    25      * Now redirect user to Twitter site so they can log in and
    25      * Now redirect user to Twitter site so they can log in and
    26      * approve our access
    26      * approve our access
    27      */
    27      */
    28     $consumer->redirect();
    28     $consumer->redirect();
       
    29 } else {
       
    30     if (isset($_SESSION['TWITTER_REDIRECT_URL'])) {
       
    31         unset($_SESSION['TWITTER_REDIRECT_URL']);
       
    32     }
    29 }
    33 }
    30 
    34 
    31 
    35 
    32 $big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg";
    36 $big_visual_url = URL_ROOT."/$rep/images/big_visuel_rsln_mb.jpg";
    33 if($translate->_('config__client_visual') != 'config__client_visual' && $translate->_('config__client_visual') != null ) {
    37 if($translate->_('config__client_visual') != 'config__client_visual' && $translate->_('config__client_visual') != null ) {
    40 }
    44 }
    41 
    45 
    42     $embed = (isset($_REQUEST['embed']) && $_REQUEST['embed']);
    46     $embed = (isset($_REQUEST['embed']) && $_REQUEST['embed']);
    43     $videoWidth = ( $embed ? 412 : 480 );
    47     $videoWidth = ( $embed ? 412 : 480 );
    44     $videoHeight = ( $embed ? 280 : 320 );
    48     $videoHeight = ( $embed ? 280 : 320 );
       
    49     if ($embed && !isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_SERVER['HTTP_REFERER'])) {
       
    50         $_SESSION['TWITTER_REDIRECT_URL'] = $_SERVER['HTTP_REFERER'];
       
    51     };
    45 ?>
    52 ?>
    46 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    53 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    47    "http://www.w3.org/TR/html4/strict.dtd">
    54    "http://www.w3.org/TR/html4/strict.dtd">
    48 
    55 
    49 <html lang="<?php echo($actual); ?>">
    56 <html lang="<?php echo($actual); ?>">
    90         _st.val( _val + ( _val[_val.length - 1] == " " ? "" : " " ) + value ).change();
    97         _st.val( _val + ( _val[_val.length - 1] == " " ? "" : " " ) + value ).change();
    91     }
    98     }
    92     
    99     
    93     $(document).ready(function() {
   100     $(document).ready(function() {
    94         
   101         
    95 /*        setTimeout(function() {
       
    96             $.scrollTo(70, 1000);
       
    97         }, 2000); */
       
    98 
       
    99             //$("txt").hide();
       
   100             $(".loginbutton").click(function() {
       
   101                 document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
   102             });
       
   103             $("#IDENTIFIER").click(function() {
       
   104                 document.location.href="<?php echo(URL_ROOT.$rep); ?>/client.php?CONNECT=true";
       
   105             });
       
   106             
   102             
   107             function updateCounter() {
   103             function updateCounter() {
   108                 var _v = $("#status").val();
   104                 var _v = $("#status").val();
   109                 if (_v.length > 140) {
   105                 if (_v.length > 140) {
   110                     _v = _v.substr(0,140);
   106                     _v = _v.substr(0,140);
   300                         <p><?php echo($translate->_('config__description')); ?></p>
   296                         <p><?php echo($translate->_('config__description')); ?></p>
   301                     </li>
   297                     </li>
   302                     <li class="acctitre">
   298                     <li class="acctitre">
   303                         <h3><?php echo($translate->_('keywords')); ?></h3>
   299                         <h3><?php echo($translate->_('keywords')); ?></h3>
   304                     </li>
   300                     </li>
   305                     <li class="fl">
   301                     <li>
   306                         <ul class="fl">
   302                         <ul>
   307                             <li class="acctexte">
   303                             <li class="acctexte">
   308                                 <div class="accsubtitle">
   304                                 <div class="accsubtitle">
   309                                     <div class="aroundsubtitle">
   305                                     <div class="aroundsubtitle">
   310                                         <h4><?php echo($translate->_('suggested')); ?></h4>
   306                                         <h4><?php echo($translate->_('suggested')); ?></h4>
   311                                     </div>
   307                                     </div>
   312                                 </div>
   308                                 </div>
   313                                 <div class="tagcloud" id="suggkw"></div>
   309                                 <div class="tagcloud" id="suggkw">
       
   310                                     <div class="clearer"></div>
       
   311                                 </div>
   314                             </li>
   312                             </li>
   315                             <li class="acctexte">
   313                             <li class="acctexte">
   316                                 <div class="accsubtitle">
   314                                 <div class="accsubtitle">
   317                                     <div class="aroundsubtitle">
   315                                     <div class="aroundsubtitle">
   318                                         <h4><?php echo($translate->_('contextual')); ?></h4>
   316                                         <h4><?php echo($translate->_('contextual')); ?></h4>
   319                                     </div>
   317                                     </div>
   320                                 </div>
   318                                 </div>
   321                                 <div class="tagcloud" id="motscles"></div>
   319                                 <div class="tagcloud" id="motscles">
       
   320                                     <div class="clearer"></div>
       
   321                                 </div>
   322                             </li>
   322                             </li>
   323                         </ul>
   323                         </ul>
   324                     </li>
   324                     </li>
   325                 </ul>
   325                 </ul>
   326             </div>
   326             </div>
   371                             <div id="tweetCounter"><?php echo(140-strlen($config['hashtag']));?></div>
   371                             <div id="tweetCounter"><?php echo(140-strlen($config['hashtag']));?></div>
   372                             <?php endif;?>
   372                             <?php endif;?>
   373                         <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3>
   373                         <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3>
   374                         <form  action="tweet.php" method="post" id="statusform" >
   374                         <form  action="tweet.php" method="post" id="statusform" >
   375                             <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
   375                             <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
   376                                 echo("<div class='loginbutton'><a href='".URL_ROOT."$rep/client.php?CONNECT=true' class='loginlink'>".$translate->_("Vous n'êtes pas connecté.")."</a></div>");
   376                                 echo("<div class='loginbutton'><a href='".URL_ROOT."$rep/client.php?CONNECT=true' target='_top' class='loginlink'>".$translate->_("Vous n'êtes pas connecté.")."</a></div>");
   377                             } else {
   377                             } else {
   378                                 echo("<textarea name='status' id='status' rows='3' cols='50'>$config[hashtag]</textarea>");
   378                                 echo("<textarea name='status' id='status' rows='3' cols='50'>$config[hashtag]</textarea>");
   379                             }
   379                             }
   380                             ?>
   380                             ?>
   381                             <div id="messageSuccess" style="background-color:lightgreen; display: none;">
   381                             <div id="messageSuccess" style="background-color:lightgreen; display: none;">