SHARE
TWEET

Untitled

a guest Jul 17th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private function doOdds() {
  2.             $timestamp = time();
  3.             $sentCnt = 0;
  4.             foreach ($this->myusers as $user) {
  5.                 $sql3 = "SELECT SessionLogs.eventid,                                MarketMatchWinner.HomeWin, MarketMatchWinner.AwayWin,       Market3Way.Home3Way
  6.  
  7. FROM  SessionLogs
  8. LEFT JOIN EventInfo ON SessionLogs.slotid = EventInfo.SlotID and EventInfo.PackageID = '{$user->packageid}'
  9. LEFT JOIN Market3Way ON EventInfo.Market3WayID = Market3Way.Market3WayID
  10. LEFT JOIN MarketMatchWinner ON EventInfo.MatchWinnerID = MarketMatchWinner.MatchWinnerID
  11. Order By SessionLogs.eventid desc
  12. Limit 1";
  13.  
  14. $res = db_fetch($sql3);
  15. $returnXML = '<Odds timestamp="'.$timestamp.'">';
  16. foreach ($res as $eventInfo) {
  17. $returnXML .= '<Event eventid="'.$eventInfo['eventid'].'"      
  18. Home3Way="'.$eventInfo['Home3Way'].'"
  19. Away3Way="'.$eventInfo['Away3Way'].'"                   Tie3Way="'.$eventInfo['Tie3Way'].'"/>';
  20.  
  21.                 }
  22.                 $returnXML .= "</Odds>";
  23.                 $this->send($user, $returnXML);
  24.                 $this->doLogMessage($user, 10);
  25.                 $sentCnt++;
  26.             }
  27.             echo "Sent Odds message to {$sentCnt} users.n";
  28.     }
  29.      
  30. else if (substr($message, 1, 4) == "Odds") {echo "Odds message receivedn";
  31. $this->DoMessageLog("Odds", $timestamp);
  32.  
  33. $eventInfo = $msgArr['Event'];
  34. $eventid = $eventInfo['@attributes']['eventid'];
  35. $Home3Way = $eventInfo['@attributes']['Home3Way'];
  36. $Away3Way = $eventInfo['@attributes']['Away3Way'];
  37. $Tie3Way = $eventInfo['@attributes']['Tie3Way'];
  38.  
  39.  
  40.                 $sql = "update SessionLogs set
  41.                 Away3Way = '{$Away3Way}',
  42.                 Home3Way = '{$Home3Way}',
  43.                 Tie3Way = '{$Tie3Way}'
  44.                 where SessionLogs.eventid in '{$eventid}'";
  45.                 db_query($sql);
  46.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top