Menu

Survivor Pool Duplicates

Help
Brian Less
2008-09-09
2013-04-11
  • Brian Less

    Brian Less - 2008-09-09

    Is the program suppose to warn you if you choose the same team twice or is it up to the administrator to make sure nobody selects the same team twice.

    Also what is the difference between the accounting_participants and accounting_pool tabs in the admin options

     
    • Robert Brown

      Robert Brown - 2008-10-01

      It won't let them pick the same team twice.
      try it.. you can "see" the team but you can't select it.

      accounting_participants
      Shows their credit and debits for thier account.

      accounting_pool
      Shows who has "ante in'd" in the pools.

      Any more than that... I'm not sure... I just started working on figuring out that section and rewriting the backend... so I still need to figure out what the pending withdrawal, etc... does and how it relates to everything else.

      Bob

       
    • Robert Brown

      Robert Brown - 2008-10-01

      Hey... I just was adding the background color the "picked teams" to be red in the pick section and while testing I noticed that if they have the "show cities" "on" it will allow them to choose the same team twice... if they have it off, it won't...

      I'll have to see why...

      But you will need to come up with your own fix, I have changed the code to get rid of the php shortcuts, changed the prints to echos and fixed the echos to use proper html and changed a lot of the naming conventions to more programmer friendly names. So any of my fixes or mods won't work on a "out of the box" setup.

       
    • Robert Brown

      Robert Brown - 2008-10-01

      well.. I figured it out... what it is doing is setting the team1/2 as the city so what this does, is ignore the stats and also the picks, because the sql farther down is using the team name to get the stats and the previous picks and not the city name.

      So what you will need to do is change the city settings and if they want the city set the display part of the code to replce the team name with the city name then in the "background" the previous picks and stats will work.

      Here's a fix for it....

      find and change these in the survivor_picks.inc file...

      Find

          if ($city==1) {
              $result_city_t1=mysql_query("select city from teams where t1='$row[team1]'");
              $row_city_t1=mysql_fetch_array($result_city_t1);
              $team1=$row_city_t1[city];
             
              $sql="select city from teams where t1='$row[team2]'";
              $result_city_t2=mysql_query($sql);
              $row_city_t2=mysql_fetch_array($result_city_t2);
              $team2=$row_city_t2[city];
             
          }   
      ============================

      change to

          if ($city==1) {
              $result_city_t1=mysql_query("select city from teams where t1='$row[team1]'");
              $row_city_t1=mysql_fetch_array($result_city_t1);
              $city_team1=$row_city_t1[city];
             
              $sql="select city from teams where t1='$row[team2]'";
              $result_city_t2=mysql_query($sql);
              $row_city_t2=mysql_fetch_array($result_city_t2);
              $city_team2=$row_city_t2[city];
             
          }   
      ============================

      I don't have the orginal code handy so find the code between:

            if (mysql_num_rows($t1_res)>0) {
              $o1="CHECKED";       
            }
            if (mysql_num_rows($t2_res)>0) {
              $o2="CHECKED";       
            }

      AND

      if(!$row['status']) $status="Game Time: ".date("g:i a", $row['game_time']); else $status=$row['status'];
      print "</td><td><font size='0'>$status</font></td></tr>\n";
      $dt=$row['game_day'];
      }

      ==========================================

      And select and replace it with this:

      if($o1=="Disabled"){echo'<td bgcolor="#ff9900">';}else{echo'<td>';}
      echo'
      <input type="radio" name="surv_pick" value="'.$team1.'"
      '.$o1.'>'.$team1_img.' ';
      if ($city==1) {echo $city_team1.'</td>';}else{echo $team1.'</td>';}
      echo'<td> vs. </td>';

      if($o2=="Disabled"){echo'<td bgcolor="#ff9900">';}else{echo'<td>';}
      echo'<input type="radio" name="surv_pick" value="'.$team2.'"
      '.$o2.'>'.$team2_img.' ';
      if ($city==1) {echo $city_team2.'</td>';}else{echo $team2.'</td>';}
      ==========================================

      This will change the previous picked teams to an orangeish back ground color and also allow the stats to work.

      So that section when replaced will look like this:

      ==========================================
            if (mysql_num_rows($t1_res)>0) {
              $o1="CHECKED";       
            }
            if (mysql_num_rows($t2_res)>0) {
              $o2="CHECKED";       
            }

      if($o1=="Disabled"){echo'<td bgcolor="#ff9900">';}else{echo'<td>';}
      echo'
      <input type="radio" name="surv_pick" value="'.$team1.'"
      '.$o1.'>'.$team1_img.' ';
      if ($city==1) {echo $city_team1.'</td>';}else{echo $team1.'</td>';}
      echo'<td> vs. </td>';

      if($o2=="Disabled"){echo'<td bgcolor="#ff9900">';}else{echo'<td>';}
      echo'<input type="radio" name="surv_pick" value="'.$team2.'"
      '.$o2.'>'.$team2_img.' ';
      if ($city==1) {echo $city_team2.'</td>';}else{echo $team2.'</td>';}

      if(!$row['status']) $status="Game Time: ".date("g:i a", $row['game_time']); else $status=$row['status'];
      print "</td><td><font size='0'>$status</font></td></tr>\n";
      $dt=$row['game_day'];
      }
      ==========================================

      Have fun...
      Bob

       
    • Robert Brown

      Robert Brown - 2008-10-01

      one small typo... I meant change the "survpick.inc.php" file which is in your includes dir...

      l8tr..
      b

       

Log in to post a comment.