PhpRiot

Listing 1412

Submitted by anonymous user, 29 June 2008
function getMismatch()
{
  $aryRosterNames = array();
  $aryRosterNames = getRosterFromHitech($aryRosterNames, "http://bbs.hitechcreations.com/newscores/sqdlist.php?player=twitchy&arena=0");
  $aryRosterNames = getRosterFromHitech($aryRosterNames, "http://bbs.hitechcreations.com/newscores/sqdlist.php?player=syko&arena=0");
  $aryRosterNames = getRosterFromHitech($aryRosterNames, "http://bbs.hitechcreations.com/newscores/sqdlist.php?player=sol74&arena=0");
 
  $con = mysql_connect("localhost","********","*******");
  mysql_select_db("******", $con);
  
  $rows = mysql_query("SELECT username FROM vb3_user WHERE usergroupid IN (2,27,23,24,22,10,15,11,13,14,16,17,18,19,20,21,2425,28,29,30) or membergroupids IN (2,27,23,24,22,10,15,11,13,14,16,17,18,19,20,21,2425,28,29,30)");
 
  $aryForumNames = array();    
  while($row = mysql_fetch_array($rows))
  {
    array_push($aryForumNames, $row['username']); 
  }
  
  $aryFullList = array();
  
  foreach($aryRosterNames as $rosterName)
  {
    $addName = true;
    
    foreach($aryForumNames as $forumName)
    {
      if (strtoupper($rosterName) == strtoupper($forumName))
      {
        $addName = false;
      }
    }
    if ($addName)
    {
      array_push($aryFullList, array($rosterName, 0)); 
    }
  }
  
  foreach($aryForumNames as $forumName)
  {
    $addName = true;
    
    foreach($aryRosterNames as $rosterName)
    {
      if (strtoupper($rosterName) == strtoupper($forumName))
      {
        $addName = false;
      }
    }
    if ($addName)
    {
      array_push($aryFullList, array($forumName, 1)); 
    }
  }
  return var_dump($aryFullList);
  
  asort($aryFullList);
  
  foreach($aryFullList as $key)
  {
    $member = $key[0];
    $column = $key[1];
    
    if ($column == 0)
    {
      $result .= "<tr><td>".$member."</td><td>&nbsp;</td></tr>\n";
    }
    else
    {
      $result .= "<tr><td>&nbsp;</td><td>".$member."</td></tr>\n";
    }
  }
  
  return $result;
}
Submit a Follow Up