update.php | Peter's Sports League Standings | Forum
Back to the sports standings script page
8:42 pm
I have an administrator that continuously changes teams associated with games. How can I lock the teams by simply print: “winner” team name and “loser” team name instead of dropdown menu?
The lines I want to change are in the next post, since it gets skewed in here.
Obviously, the same would be changed for loser (visiting team).
Any assistance is greatly appreciated!
8:47 pm
WOW! Code get skewed no matter how it is input.
I finally have code that I would like edited as described:
[tr][td class='tbl1']Home: [select name="winner disabled="disabled"]
[?php
$query2="SELECT f2008_teams.teamid, f2008_teams.teamname, f2008_divs.divname FROM f2008_teams, f2008_divs WHERE f2008_teams.active = 1 AND f2008_teams.teamdiv = f2008_divs.divid AND f2008_divs.conference = $confid ORDER BY divorder ASC, teamname ASC";
$result2=mysql_query($query2);
while ($teams = mysql_fetch_array($result2, MYSQL_ASSOC)) {
print "[option value=\\"{$teams['teamid']}\\”";
if ($teams['teamid'] == $score['winner']) {
print ” selected=\\”selected\\”";
}
print “]{$teams['teamname']}[/option]\\n”;
}
print “[/select]
Again, any assistance is greatly appreciated!
Hi Bob, have you checked this thread? It explains your options — use “add score” permission limitations at the team level (if you don’t have too many teams) or make a simple hack to what is now in admin/editscore.php to make it so that only the administrator user can change teams.
5:21 pm
I cannot seem to figure out the options. I added the limitations, yet a new user still has drop down menu with all teams from Division/Conference and can manipulate the schedule.
I apologize from the confusion. I am just looking to echo the exact teams (home and away) within the selected game, removing the drop down menu list of assigned teams to the conference.
I import the schedules in MySQL from a different program so I do not use update.php to add games.The same code that
I am requesting assistance with is now in editscore.php line #273 in newest version. Please assist.
$is_admin || $is_manage_score || $is_manage_score_conf
Hi Bob, that dropdown menu should only have one option there, assuming that 1) they are not an admin, 2) they don’t have global manage score permissions, and 3) they do not have manage score permissions at the conference level.
Either way, if you remove the two other conditions in the code (twice -- once for home and once for away), that should do the trick.
The alternative of printing the names (and including hidden fields with the team IDs) is a bit more hacking intense. That and functionally haven’t dropdown lists with only one option accomplishes the same result.
5:57 pm
I am testing on free server before I upgrade and screw schedules up. You can access it at: http://standings.net78.net/sta.....ndings.php
Admin login is same as readme. If you can login and assign the other user so that I may see what I may be doing wrong, that would be great. I have already made the editscore.php as documented.
Thanks!