Advertisement
Guest User

BEPHP

a guest
Jan 17th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.81 KB | None | 0 0
  1. 1. <center>
  2. 2. <style>
  3. 3. body{
  4. 4. background:transparent;
  5. 5. padding:10px;
  6. 6. }
  7. 7. * {
  8. 8. transition: all 0.3s linear !important;
  9. 9. margin: 0;
  10. 10. padding: 0;
  11. 11. border-spacing: 0;
  12. 12. }
  13. 13. #blog-editors{
  14. 14. font-family:Roboto, Calibri, Arial, serif;
  15. 15. margin-top:15px;
  16. 16. width:700px;
  17. 17. }
  18. 18. #blog-editors a{
  19. 19. text-decoration:none;
  20. 20. color:inherit;
  21. 21. }
  22. 22. #blog-editors a:hover{
  23. 23. text-decoration:underline;
  24. 24. transition: 1.5s ease-in-out
  25. 25. }
  26. 26. #blog-editors td{
  27. 27. border:1px solid rgba(0,0,0,0.3);
  28. 28. border-top: line;
  29. 29. border-right: line;
  30. 30. border-left: line;
  31. 31. padding:0px;
  32. 32. height:40px;
  33. 33. }
  34. 34. #blog-editors td:first-child{
  35. 35. border-left: 1px solid rgba(0,0,0,0.3);
  36. 36. }
  37. 37. #blog-editors td:last-child{
  38. 38. border-right: 1px solid rgba(0,0,0,0.3);
  39. 39. }
  40. 40. #blog-editors #header{
  41. 41. font-weight:bold;
  42. 42. font-size:15pt;
  43. 43. color:#fff;
  44. 44. text-shadow:1px 1px 0px #000;
  45. 45. text-align:center;
  46. 46. background:#555;
  47. 47. }
  48. 48. #blog-editors #header:hover{
  49. 49. background:#003366;
  50. 50. color:#fff
  51. 51. transition: 1.5s ease-in-out
  52. 52. }
  53. 53. #blog-editors #footer{
  54. 54. font-weight:bold;
  55. 55. font-size:10pt;
  56. 56. color:#fff;
  57. 57. text-shadow:1px 1px 0px #000;
  58. 58. text-align:center;
  59. 59. background:#555;
  60. 60. }
  61. 61. #blog-editors #footer:hover{
  62. 62. background:#003366;
  63. 63. color:#fff
  64. 64. transition: 1.5s ease-in-out
  65. 65. }
  66. 66. #blog-editors #title td{
  67. 67. background:#003366;
  68. 68. color:#fff;
  69. 69. text-align:center;
  70. 70. text-shadow:1px 1px 0px #000;
  71. 71. font-weight:bold;
  72. 72. }
  73. 73. #blog-editors #title:hover td{
  74. 74. background:#222;
  75. 75. transition: 1.5s ease-in-out;
  76. 76. }
  77. 77. #blog-editors #admin{
  78. 78. background:#D19D73;
  79. 79. color:#000;
  80. 80. text-align:center;
  81. 81. }
  82. 82. #blog-editors #admin:hover{
  83. 83. background:#734017;
  84. 84. color:#fff;
  85. 85. font-weight:bold;
  86. 86. height: 40px;
  87. 87. text-shadow:1px 1px 2px #000;
  88. 88. transition: 1.5s ease-in-out;
  89. 89. }
  90. 90. #blog-editors #editor{
  91. 91. background:#90C3D4;
  92. 92. color:#000;
  93. 93. text-align:center;
  94. 94. }
  95. 95. #blog-editors #editor:hover{
  96. 96. background:#136C8A;
  97. 97. color:#fff;
  98. 98. font-weight:bold;
  99. 99. height: 40px;
  100. 100. text-shadow:1px 1px 2px #000;
  101. 101. transition: 1.5s ease-in-out
  102. 102. }
  103. 103. .zoom_img img{
  104. 104. -moz-transition:-moz-transform 0.5s ease-in;
  105. 105. -webkit-transition:-webkit-transform 0.5s ease-in;
  106. 106. -o-transition:-o-transform 0.5s ease-in;
  107. 107. }
  108. 108. .zoom_img img:hover{
  109. 109. -moz-transform:scale(1);
  110. 110. -webkit-transform:scale(1);
  111. 111. -o-transform:scale(1);
  112. 112. }
  113. 113. </style>
  114. 114.
  115. 115. <?php
  116. 116. function getInfos2($atts){
  117. 117. ob_start();
  118. 118.
  119. 119. $url = 'https://docs.google.com/spreadsheets/d/1WjBFuLQqmRX7p_nkB8xBQE2R2xjgV_7WCxCiicskEZU/pub?gid=1452634937&single=true&output=csv';
  120. 120. $fgc = file_get_contents($url);
  121. 121.
  122. 122. $return = array();
  123. 123. $lines = explode(chr(0x0A), $fgc);
  124. 124. $header = explode(',', $lines[0]);
  125. 125.
  126. 126. for($i = 1; $i < sizeof($lines); $i++)
  127. 127. {
  128. 128. $blog editors = explode(',', $lines[$i]);
  129. 129. $id = $blog editors[0];
  130. 130.
  131. 131. for($j = 1; $j < sizeof($blog editors); $j++)
  132. 132. $return[$id][$header[$j]] = $blog editors[$j];
  133. 133. }
  134. 134.
  135. 135. return $return;
  136. 136. }
  137. 137.
  138. 138. function getInfos()
  139. 139. {
  140. 140. if((filemtime('blogeditors.txt') + 300) < time())
  141. 141. {
  142. 142. $ret = serialize(getInfos2( $atts));
  143. 143. file_put_contents('blogeditors.txt', $ret);
  144. 144. return $ret;
  145. 145. }
  146. 146.
  147. 147. $file = trim(file_get_contents('blogeditors.txt'));
  148. 148.
  149. 149. return $file;
  150. 150. }
  151. 151.
  152. 152. $blog editors = unserialize(getInfos());
  153. 153.
  154. 154. echo '<table align="center" id="blog-editors">
  155. 155. <tr>
  156. 156. <td colspan="6" id="header"><img src="http://u.cubeupload.com/xatpaul/pRnBwWR.png" height="20"></a>
  157. 157. XAT5 CHAT BLOG EDITORS<br>
  158. 158. </tr>';
  159. 159. echo "<tr id='title'>
  160. 160. <td></td>
  161. 161. <td>Name</td>
  162. 162. <td>Regname & ID</td>
  163. 163. <td>Timezone</td>
  164. 164. <td>Rank</td>
  165. 165. </tr>
  166. 166. <tbody>";
  167. 167. foreach($blog editors as $i=>$v)
  168. 168. {
  169. 169.
  170. 170. $flag = strtolower($blog editors[$i]['origin']);
  171. 171. $flag2 = strtolower($blog editors[$i]['test']);
  172. 172. $img = ((strlen($flag) > 0) == true) ? '<img title="'.$flag2.'" alt="'.$flag2.'" src="http://xat.com/images/smw/flag/'.$flag.'.png"></div>' : '' ;
  173. 173. if($v['rank'] == "Blog Admin") echo '<tr id="admin">';
  174. 174. if($v['rank'] == "Blog Editor") echo '<tr id="editor">';
  175. 175. echo '<td><center><div class="zoom_img" >'.$img.'</div></center></td>';
  176. 176. echo "<td><center>".$i."</center></td>";
  177. 177. $regname = strtolower($blog editors[$i]['regname']);
  178. 178. echo '<td id="tooltiptext"><center><a href="http://xat.me/'.$regname.'" title="'.$regname.'" target="_blank">'.$blog editors[$i]['regname'].' ('.$blog editors[$i]['id'].')</center></td>';
  179. 179. //echo "<td><center>".$blog editors[$i]['id']."</center></td>";
  180. 180. echo "<td><center>".$blog editors[$i]['timezone']."</center></td>";
  181. 181. $smilie = strtolower($blog editors[$i]['origin']);
  182. 182. echo "<td><center>".$blog editors[$i]['rank']."</center></td>";
  183. 183.
  184. 184. echo '</tr>';
  185. 185. }
  186. 186. echo '</tbody>
  187. 187. <tr>
  188. 188. <td colspan="6" id="footer">Created by TypoKing<br>
  189. 189. </tr>
  190. 190. </table>
  191. 191. </center>';
  192. 192. echo '<link rel="stylesheet" type="text/css" href="/wp-content/plugins/xattest2/plugins/blog/css/jquery.dataTables.css">';
  193. 193. echo '<link rel="stylesheet" type="text/css" href="/wp-content/plugins/xattest2/plugins/blog/css/jquery.dataTables.min.css">';
  194. 194. echo '<link rel="stylesheet" type="text/css" href="/wp-content/plugins/xattest2/plugins/blog/css/jquery.dataTables_themeroller.css">';
  195. 195. echo '<script type="text/javascript" charset="utf8" src="/wp-content/plugins/xattest2/plugins/blog/js/jquery.js"></script>';
  196. 196. echo '<script type="text/javascript" charset="utf8" src="/wp-content/plugins/xattest2/plugins/blog/js/jquery.dataTables.min.js"></script>';
  197. 197. echo '<script type="text/javascript" charset="utf8" src="/wp-content/plugins/xattest2/plugins/blog/js/jquery.dataTables.js"></script>';
  198. 198. echo "<script>";
  199. 199. echo "$(document).ready(function() {";
  200. 200. echo "$('#').DataTable();";;
  201. 201. echo "} );";
  202. 202. echo "</script>";
  203. 203. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement