From a08c0989442dfc400bb1ab2a489313ad2ed20e94 Mon Sep 17 00:00:00 2001 From: Kevin XU <kevin-xu@hotmail.fr> Date: Thu, 20 Dec 2018 00:34:58 +0100 Subject: [PATCH] organisation des graphs --- page_user/user.php | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/page_user/user.php b/page_user/user.php index 20d2da7..531eff0 100644 --- a/page_user/user.php +++ b/page_user/user.php @@ -62,6 +62,7 @@ error_reporting(E_ALL); ?> +<div style="display: flex;justify-content: space-between;"> <?php echo '<script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script> <script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script> @@ -85,7 +86,7 @@ error_reporting(E_ALL); "data": ['; - for( $i=0 ; $i < min(10,count($favt)-2) ; $i++){ + for( $i=0 ; $i < min(10,count($favt)-1) ; $i++){ $name = getUserScreenName($favt[$i]); $followers = getUserNbFollowers($favt[$i]); echo ' { @@ -132,7 +133,7 @@ error_reporting(E_ALL); "data": ['; - for( $i=0 ; $i < min(10,count($favy)-2) ; $i++){ + for( $i=0 ; $i < min(10,count($favy)-1) ; $i++){ $name = getChannelUsername($favy[$i]); $followers = getChannelNbFollowers($favy[$i]); echo ' { @@ -156,10 +157,11 @@ error_reporting(E_ALL); </script>'; ?> <div id="diagy">Le diagramme youtube s affiche ici ! - </div> - + </div></div> + <br><br><br> +<div style="display: flex;"> <table width="400" class="hovertable" align="center" style='text-align:center;background: white' border='1'> - <tr style="background: #3fcbfe;"><th>image</th><th>twitter</th></tr> + <tr style="background: #3fcbfe;"><th></th><th>twitter</th></tr> <?php $datarow = count($favt); @@ -168,12 +170,35 @@ error_reporting(E_ALL); $twitter = getUserScreenName($favt[$i]); $id = $favt[$i]; $image = getUserProfileImage($id); - echo "<tr onclick='showId(this.id)' id=\"$id\" style=\"background: #d4e3e5;\" onmouseover=\"this.style.backgroundColor='#ffff66';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\"><td><img src='$image'></td><td>$twitter</td></tr>"; + echo "<tr onclick='showIdt(this.id)' id=\"$id\" style=\"background: #d4e3e5;\" onmouseover=\"this.style.backgroundColor='#ffff66';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\"><td><img src='$image'></td><td>$twitter</td></tr>"; + } + + + + + ?> + </table> + + + <table width="400" class="hovertable" align="center" style='text-align:center;background: white' border='1'> + <tr style="background: #3fcbfe;"><th></th><th>youtube</th></tr> + + <?php + + + $datarow = count($favy); + for($i=0;$i<$datarow;$i++){ + + $youtube = getChannelUsername($favy[$i]); + $id = $favy[$i]; + $image = getChannelProfileImage($id); + echo "<tr onclick='showIdy(this.id)' id=\"$id\" style=\"background: #d4e3e5;\" onmouseover=\"this.style.backgroundColor='#ffff66';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\"><td><img src='$image' style='height: 80px;'></td><td>$youtube</td></tr>"; } ?> </table> + </div> </div> @@ -192,11 +217,16 @@ error_reporting(E_ALL); <!-- Default-JavaScript-File --> <script type="text/javascript"> - function showId(id){ + function showIdt(id){ location.href="../page_profile/profil.php?id="+id+"&sn=Twitter"; } + function showIdy(id){ + location.href="../page_profile/profil.php?id="+id+"&sn=Youtube"; + + } + </script> <!-- banner slider --> -- GitLab