Arrow

update.php | Peter's Sports League Standings | Forum

Back to the sports standings script page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
update.php
September 4, 2008
8:42 pm
Bob
Guest

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!

September 4, 2008
8:47 pm
Bob
Guest

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!

September 5, 2008
2:00 am
Peter
Admin
Forum Posts: 841
Offline

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.

September 5, 2008
5:21 pm
Bob
Guest

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.

September 5, 2008
5:34 pm
Peter
Admin
Forum Posts: 841
Offline

$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.

September 5, 2008
5:41 pm
Bob
Guest

I have done all of the requested changes and still all teams are within the dropdown menu and changeable.

September 5, 2008
5:52 pm
Peter
Admin
Forum Posts: 841
Offline

If you are using version 1.2, unless you are testing this while still logged in as an administrator, I have no idea what the problem could be.

September 5, 2008
5:57 pm
Bob
Guest

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!

September 8, 2008
12:44 am
Peter
Admin
Forum Posts: 841
Offline

Hi Bob, I've e-mailed you about this. Let me know if you didn't get that.