Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. $GAnalytics = "SELECT GAnalyticsEST, GAnalyticsRUS FROM GAME_game WHERE id = ".$GID." ; ";
  2. $res= mysql_query($GAnalytics);
  3. $resul = array();
  4. while ($row = mysql_fetch_array($res))
  5. array_push($resul, array('GAnalyticsEST' => $row[0], 'GAnalyticsRUS' => $row[1] ));
  6. echo json_encode(array("resul"=>$resul));
  7.  
  8. $(document).ready( function() {
  9. done();
  10. });
  11.  
  12. function done() {
  13. setTimeout( function() {
  14. updates();
  15. done();
  16. }, 9000);
  17. }
  18.  
  19. function updates() {
  20. $.getJSON( '../src/sms/game_statistics.inc', function(data) {
  21. $("ul").empty();
  22. $.each(data.resul, function(){
  23. $("ul").append("<li>GoogleEST: "+this['GAnalyticsEST']+"</li><li>GoogleRUS: "+this['GAnalyticsRUS']+"</li><br />");
  24. });
  25. });
  26. }
  27.  
  28. <?php require_once('../../file_outside_www.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement