mcclellanfsu Posted February 23, 2007 Share Posted February 23, 2007 Hello, sorry this is such a long page to ask someone to look through. But I have been staring at this for the last couple of days now. There are 2 forms on this page. The first is supposed to allow me to edit a members team status. The second allows me to assign a member to a team. The second for on the page works without a hitch. The first however is causing me to pull my hair out. This is a module I found online. I didn't write it, I'm just trying to figure out where the problem is because the author won't support it anymore. When I click the "Edit Member" button, absoultely nothing happens. It doesn't even look like it is trying to do anything and I can't figure out what is wrong. No errors or nothing. Here is the code for admin_manage_teams.php: <?php /* +--------------------------------------------------------------------------------+ | jbRoster - by Jesse Burns aka jburns131 aka Jakle (jburns131@jbwebware.com) | Plugin Support Site: www.jbwebware.com | | For the e107 website system | http://e107.org | | Released under the terms and conditions of the | GNU General Public License (http://gnu.org). | +--------------------------------------------------------------------------------+ */ require_once("../../class2.php"); require_once(e_HANDLER."userclass_class.php"); if(!getperms("P")){ header("location:".e_BASE."index.php"); } require_once(e_ADMIN."auth.php"); require_once("includes/config.php"); $sql = new db; $sql->db_Select(DB_TABLE_PREFERENCES, "*", "organization_id=1") or die(mysql_error()); while ($row = $sql->db_Fetch()) { $organizationType = $row['organization_type']; } $sql1 = new db; $sql1 -> db_Select(DB_TABLE_LEADER_STATUS, "*", "status_name != 'None' AND status_name != 'Organization Leader' AND status_name != 'Organization Captain' AND status_name != 'Web Admin'"); while($row1 = $sql1-> db_Fetch()){ // start loop $customArgs .= " OR leader_status like '".$row1['status_name']."%'"; } if ($sql->db_Count(DB_TABLE_MEMBERS, "(*)", "WHERE leader_status like 'Organization Leader%' OR leader_status like 'Organization Captain%' OR leader_status like 'Web Admin%'$customArgs") == 0) { // Don't display leader block } else { $text_1 = " <form action='admin_manage_teams_edit.php' method='POST'> <br /> <center> <div style='width:70%'> <table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'> <tr> <td colspan=6 class='forumheader'><b>Organization Leaders</b></td> </tr> <tr> <td class='forumheader3'><b>Name</b></td> <td class='forumheader3'><b>Email</b></td> <td class='forumheader3'><b><center>Organization Leader</center></b></td> <td class='forumheader3'><b><center>Change Order</center></b></td> </tr>"; $sql -> db_Select(DB_TABLE_MEMBERS, "*", "leader_status like 'Organization Leader%' OR leader_status like 'Organization Captain%' OR leader_status like 'Web Admin%'$customArgs ORDER BY leader_order"); while($row = $sql-> db_Fetch()){ $sql2 = new db; $sql2 -> db_Select(DB_TABLE_CUSTOM_ATTRIBUTE_VALUES, "*", "member_id=".$row['member_id']." AND attribute_id=5"); while($row2 = $sql2-> db_Fetch()){ // start loop $leaderStatus = $row2['attribute_value']; } $sql2 = new db; $sql2 -> db_Select(DB_TABLE_CUSTOM_ATTRIBUTE_VALUES, "*", "member_id=".$row['member_id']." AND attribute_id=8"); while($row2 = $sql2-> db_Fetch()){ // start loop $email = $row2['attribute_value']; } $sql2 = new db; $sql2 -> db_Select(DB_TABLE_CUSTOM_ATTRIBUTE_VALUES, "*", "member_id=".$row['member_id']." AND attribute_id=9"); while($row2 = $sql2-> db_Fetch()){ // start loop $xfire = $row2['attribute_value']; } $text_1 .="<tr>"; if ($row['nickname'] == '') { $text_1 .= " <td class='forumheader3'> </td>"; } else { $text_1 .= " <td class='forumheader3'>".$row['nickname']."</td>"; } if ($email == '') { $text_1 .= " <td class='forumheader3'> </td>"; } else { $text_1 .= " <td class='forumheader3'><a href='mailto:$email'>$email</a></td>"; } $text_1 .= " <td class='forumheader3'> <select class='tbox' name='leader_status[]'>"; $sql3 = new db; $sql3 -> db_Select(DB_TABLE_LEADER_STATUS, "*", "ORDER BY status_order", $mode="no-where"); while ($row3 = $sql3 -> db_Fetch()) { if ($row['leader_status'] == $row3['status_name']) { $text_1 .= " <option value='".$row['member_id'].DELIMITER_1.$row3['status_name']."' selected='selected'>".$row3['status_name']."</option>"; } else { $text_1 .= " <option value='".$row['member_id'].DELIMITER_1.$row3['status_name']."'>".$row3['status_name']."</option>"; } } $text_1 .= " </select> </td> <td class='forumheader3'> <center>"; $text_1 .= " <select class='tbox' name='leader_new_member_leader_order[]'>"; $sql4 = new db; $num_rows = $sql4 -> db_Count(DB_TABLE_MEMBERS, "(*)", " WHERE leader_status like 'Organization Leader%' OR leader_status like 'Organization Captain%' OR leader_status like 'Web Admin%'$customArgs "); $count = 1; while ($count <= $num_rows) { if ($row['leader_order'] == $count) { $text_1 .= " <option value='leader".DELIMITER_1.$row['member_id'].DELIMITER_1.$count."' selected='selected'>".$count."</option>"; } else { $text_1 .= " <option value='leader".DELIMITER_1.$row['member_id'].DELIMITER_1.$count."'>".$count."</option>"; } $count++; } $text_1 .= " </select>"; $text_1 .=" </center> </td>"; } $text_1 .= " </tr> </table> </div> </center>"; } $sql -> db_Select(DB_TABLE_TEAMS, "*", "ORDER BY team_order", $mode="no_where"); while($row1 = $sql -> db_Fetch()){ $text_1 .= " <br /><br /> <center> <div style='width:80%'> <table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'> <tr> <td colspan=7> <table width='100%' cellspacing='0' cellpadding='0'> <tr>"; if($organizationType == 6) { if ($row1['team_name'] == '') { $text_1 .= " <td class='forumheader3' align=right width='100%'> </td>"; } else { $text_1 .= " <td class='forumheader' align=right width='100%'> <b>".$row1['team_name']."</b> </td>"; } } else { if ($row1['game_name'] == '') { if ($row1['team_name'] == '') { $text_1 .= " <td class='forumheader3' align=right width='100%'> </td>"; } else { $text_1 .= " <td class='forumheader' align=right width='100%'> <b>".$row1['team_name']."</b> </td>"; } } else { if ($row1['team_name'] == '') { $text_1 .= " <td class='forumheader3' style='border-right: 0px;' align=right width='50%'> </td>"; } else { $text_1 .= " <td class='forumheader' style='border-right: 0px;' align=right width='50%'> <b>".$row1['team_name']."</b> </td>"; } $text_1 .= " <td class='forumheader' style='border-left: 0px;' align=right width='50%'> <b>Game: " .$row1['game_name']."</b> </td>"; } } $text_1 .= " <td class='forumheader' style='border-right: 0px;' align=right width='50%'> <a href='admin_create_teams_edit.php?delete_team=1&team_id=".$row1['team_id']."&url=".$_SERVER['PHP_SELF']."&game_id=".$row1['game_id']."'><b>Delete</b></a> </td> </tr> </table> </td> </tr> <tr> <td class='forumheader3'><b><center>Current Order</center></b></td> <td class='forumheader3'><b><center>Name</center></b></td> <td class='forumheader3'><b><center>Current Status</center></b></td> <td class='forumheader3'><b><center>Change Team</center></b></td> <td class='forumheader3'><b><center>Change Status</center></b></td> <td class='forumheader3'><b><center>Change Order</center></b></td> </tr>"; $sql2 = new db; $sql2-> db_Select(DB_TABLE_TEAM_MEMBERS, "*", "team_id = '".$row1['team_id']."' ORDER BY member_team_order"); while($row2 = $sql2-> db_Fetch()){ $text_1 .=" <tr>"; if ($row2['member_team_order'] == '') { $text_1 .= " <td class='forumheader3'> </td>"; } else { $text_1 .= " <td class='forumheader3'><center>".$row2['member_team_order']."</center></td>"; } if ($row2['member_name'] == '') { $text_1 .= " <td class='forumheader3'> </td>"; } else { $text_1 .= " <td class='forumheader3'>".$row2['member_name']."</td>"; } if ($row2['member_team_status'] == '') { $text_1 .= " <td class='forumheader3'> </td>"; } else { $text_1 .= " <td class='forumheader3'>".$row2['member_team_status']."</td>"; } $text_1 .= " <td class='forumheader3'> <center> <select class='tbox' name='team_new_member_team[]'>"; if ($organizationType == 6) { if ($row2['team_name'] == "None") { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['team_id'].DELIMITER_1."None' selected='selected'>Remove</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['team_id'].DELIMITER_1."None'>Remove</option>"; } } else { if ($row2['team_name'] == "None") { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row2['game_name'].DELIMITER_1."None' selected='selected'>Remove</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row2['game_name'].DELIMITER_1."None'>Remove</option>"; } } $sql3 = new db; $sql3 -> db_Select(DB_TABLE_TEAMS, "*", "ORDER BY team_order", $mode="no-where"); while($row3 = $sql3-> db_Fetch()){ //* if ($organizationType == 6) { if ($row2['team_id'] == $row3['team_id']) { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row4['team_id'].DELIMITER_1.$row4['team_name']."' selected='selected'>".$row4['team_name']."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row4['team_id'].DELIMITER_1.$row4['team_name']."'>".$row4['team_name']."</option>"; } } else { //*/ if ($row2['team_id'] == $row3['team_id']) { if ($row3['game_name'] == '') { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row2['game_name'].DELIMITER_1.$row3['team_id'].DELIMITER_1.$row3['team_name'].DELIMITER_1.$row3['game_id'].DELIMITER_1.$row3['game_name']."' selected='selected'>".$row3['team_name']."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row2['game_name'].DELIMITER_1.$row3['team_id'].DELIMITER_1.$row3['team_name'].DELIMITER_1.$row3['game_id'].DELIMITER_1.$row3['game_name']."' selected='selected'>".$row3['team_name']." (".$row3['game_name'].")</option>"; } } else { if ($row3['game_name'] == '') { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row2['game_name'].DELIMITER_1.$row3['team_id'].DELIMITER_1.$row3['team_name'].DELIMITER_1.$row3['game_id'].DELIMITER_1.$row3['game_name']."'>".$row3['team_name']."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['team_name'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row2['game_name'].DELIMITER_1.$row3['team_id'].DELIMITER_1.$row3['team_name'].DELIMITER_1.$row3['game_id'].DELIMITER_1.$row3['game_name']."'>".$row3['team_name']." (".$row3['game_name'].")</option>"; } } } } $text_1 .= " </select> </center> </td> <td class='forumheader3'> <center> <select class='tbox' name='team_new_member_team_status[]'>"; // BEGIN PROBLEM AREA, BEGIN PROBLEM AREA, BEGIN PROBLEM AREA, BEGIN PROBLEM AREA $sql3 = new db; $sql3 -> db_Select(DB_TABLE_TEAM_STATUS, "*", "team_id='".$row1['team_id']."' ORDER BY status_order") or die(mysql_error()); while($row3 = $sql3-> db_Fetch()){ if ($organizationType == 6) { if ($row2['member_team_status'] == $row3['status_name']) { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['member_team_status'].DELIMITER_1.$row3['status_name']."' selected='selected'>".$row3['status_name']."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['member_team_status'].DELIMITER_1.$row3['status_name']."'>".$row3['status_name']."</option>"; } } else { if ($row2['member_team_status'] == $row3['status_name']) { // SHOULD I CHECK AND SEE IF THERE IS A GAME ID, // AND IF NOT, DON'T SEND THE GAME INFO $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['member_team_status'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row3['status_name']."' selected='selected'>".$row3['status_name']."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['member_team_status'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$row3['status_name']."'>".$row3['status_name']."</option>"; } } } // END PROBLEM AREA, END PROBLEM AREA, END PROBLEM AREA, END PROBLEM AREA $text_1 .= " </select> </center> </td> <td class='forumheader3'> <center>"; $text_1 .= " <select class='tbox' name='team_new_member_team_order[]'>"; $sql4 = new db; $num_rows = $sql4 -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE team_name='".$row1['team_name']."' AND game_name='".$row1['game_name']."' "); $count = 1; while ($count <= $num_rows) { if ($organizationType == 6) { if ($row2['member_team_order'] == $count) { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['member_team_order'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$count."' selected='selected'>".$count."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['member_team_order'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$count."'>".$count."</option>"; } } else { if ($row2['member_team_order'] == $count) { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['member_team_order'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$count."' selected='selected'>".$count."</option>"; } else { $text_1 .= " <option value='".$row2['member_id'].DELIMITER_1.$row2['team_id'].DELIMITER_1.$row2['member_team_order'].DELIMITER_1.$row2['game_id'].DELIMITER_1.$count."'>".$count."</option>"; } } $count++; } $text_1 .= " </select>"; $text_1 .= " </center> </td>"; } $text_1 .= " </tr> </table> </div> </center> <br /><br />"; } $text_1 .= " <input type='hidden' name='edit_team' value='1'> <center> <input class='button' type='submit' value='Edit Teams'> </center> <br /> </form>"; // Render the value of $text_1 in a table. $title = "<b>Current Teams</b>"; $ns -> tablerender($title, $text_1); $text_2 = " <form action='admin_manage_teams_edit.php' method='POST'> <br /> <center> <div style='width:60%'> <table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'> <tr> <td colspan=6 class='forumheader'><b>Assign Member</b></td> <tr> <td width='50%' class='forumheader3'><b><center>Name</center></b></td> <td width='50%' class='forumheader3'><b><center>Assign Team</center></b></td> </tr>"; $sql1 = new db; $sql1 -> db_Select(DB_TABLE_MEMBER_STATUS, "*", "status_name != 'Team Member' AND status_name != 'General Member' AND status_name != 'Cadet' AND status_name != 'Recruit' AND status_name != 'Inactive Member' AND status_name != 'Open Application' AND status_name != 'Closed Application'"); while($row1 = $sql1-> db_Fetch()){ // start loop $customArgs .= " OR member_status like '".$row1['status_name']."%'"; } $sql -> db_Select(DB_TABLE_MEMBERS, "*", "member_status like 'Team Member%' OR member_status like 'Cadet%' OR member_status like 'Recruit%'$customArgs ORDER BY nickname"); while($row3 = $sql-> db_Fetch()){ $text_2 .=" <tr>"; if ($row3['nickname'] == '') { $text_2 .= " <td width='50%' class='forumheader3'> </td>"; } else { $text_2 .= " <td width='50%' class='forumheader3'><center>".$row3['nickname']."</center></td>"; } $text_2 .= " <td width='50%' class='forumheader3'> <center> <select class='tbox' name='team_assign_team[]'> <option value='".$row3['member_id'].".None' selected='selected'></option>"; $sql2 = new db; $sql2 -> db_Select(DB_TABLE_TEAMS, "*", "ORDER BY team_order", $mode="no_where"); while($row4 = $sql2-> db_Fetch()){ // start loop if ($row4['game_name'] == '') { $text_2 .= " <option value='".$row3['member_id'].DELIMITER_1.$row4['team_id'].DELIMITER_1.$row4['team_name'].DELIMITER_1.$row4['game_id'].DELIMITER_1.$row4['game_name']."'>".$row4['team_name']."</option>"; } else { $text_2 .= " <option value='".$row3['member_id'].DELIMITER_1.$row4['team_id'].DELIMITER_1.$row4['team_name'].DELIMITER_1.$row4['game_id'].DELIMITER_1.$row4['game_name']."'>".$row4['team_name']." (".$row4['game_name'].")</option>"; } } $text_2 .= " </select> </center> </td>"; } $text_2 .= " </tr> </table> </div> </center> <br /><br />"; $text_2 .= " <input type='hidden' name='assign_team' value='1'> <center> <input class='button' type='submit' value='Assign Team'> </center> <br /> </form>"; // Render the value of $text_2 in a table. $title = "<b>Assign Members</b>"; $ns -> tablerender($title, $text_2); require_once(e_ADMIN."footer.php"); ?> Thank you so much to anyone who helps me out on this! It is driving me nuts! Quote Link to comment Share on other sites More sharing options...
mcclellanfsu Posted February 23, 2007 Author Share Posted February 23, 2007 And this is the code for admin_manage_teams_edit.php: <?php /* +--------------------------------------------------------------------------------+ | jbRoster - by Jesse Burns aka jburns131 aka Jakle (jburns131@jbwebware.com) | Plugin Support Site: www.jbwebware.com | | For the e107 website system | http://e107.org | | Released under the terms and conditions of the | GNU General Public License (http://gnu.org). | +--------------------------------------------------------------------------------+ */ require_once("../../class2.php"); require_once(e_HANDLER."userclass_class.php"); if(!getperms("P")){ header("location:".e_BASE."index.php"); } require_once(e_ADMIN."auth.php"); require_once("includes/config.php"); $sql = new db; $sql->db_Select(DB_TABLE_PREFERENCES, "*", "organization_id=1"); while ($row = $sql->db_Fetch()) { $organizationType = $row['organization_type']; } function tokenizeArray($array) { unset($GLOBALS['tokens']); $delims = DELIMITER_1; $word = strtok( $array, $delims ); while ( is_string( $word ) ) { if ( $word ) { global $tokens; $tokens[] = $word; } $word = strtok ( $delims ); } } if ($_POST['assign_team'] == '1') { /********************************************************************** * * Assign members to team * **********************************************************************/ /* print "<pre>"; print_r( $_POST ); print "</pre>"; //*/ //* for ($x = 0; $x < count($_POST['team_assign_team']); $x++) { tokenizeArray($_POST['team_assign_team'][$x]); $newAssignTeamArray[$x] = $tokens; } //*/ /* print "<pre>"; print_r( $newAssignTeamArray ); print "</pre>"; //*/ /* // If $organizationType is 6 // $newLeaderStatusArray[$x][0] = member_id // $newLeaderStatusArray[$x][1] = team_id // $newLeaderStatusArray[$x][2] = team_name //*/ /* // If $organizationType is not 6 // $newLeaderStatusArray[$x][0] = member_id // $newLeaderStatusArray[$x][1] = team_id // $newLeaderStatusArray[$x][2] = team_name // $newLeaderStatusArray[$x][3] = game_id // $newLeaderStatusArray[$x][4] = game_name //*/ //* for ($x = 0; $x < count($newAssignTeamArray); $x++) { if (!isset($newAssignTeamArray[$x][2])) { // Do nothing } else { if ($organizationType == 6) { if ($newAssignTeamArray[$x][1] == "None") { // Do Nothing } else { $numRows = $sql -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE member_id=".$newAssignTeamArray[$x][0]." AND team_id=".$newAssignTeamArray[$x][1]." AND team_name='".$newAssignTeamArray[$x][2]."'"); if ($numRows > 0) { // Let them know that the member is already in that team } else { $sql2 = new db; $sql2 -> db_Select(DB_TABLE_MEMBERS, "*", "member_id=".$newAssignTeamArray[$x][0].""); while($row2 = $sql2-> db_Fetch()){ // start loop $nickname = $row2['nickname']; } $sql3 = new db; $sql3 -> db_Insert( DB_TABLE_TEAM_MEMBERS, "".$newAssignTeamArray[$x][0].", '".$nickname."', ".$newAssignTeamArray[$x][1].", '".$newAssignTeamArray[$x][2]."', '', '', 'None', '#FFFFFF', 1"); } } } else { if ($newAssignTeamArray[$x][1] == "None") { // Do Nothing } else { $numRows = $sql -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE member_id=".$newAssignTeamArray[$x][0]." AND team_id=".$newAssignTeamArray[$x][1]." AND team_name='".$newAssignTeamArray[$x][2]."' AND game_id=".$newAssignTeamArray[$x][3]." AND game_name='".$newAssignTeamArray[$x][4]."'"); if ($numRows > 0) { // Let them know that the member is already in that team } else { $sql2 = new db; $sql2 -> db_Select(DB_TABLE_MEMBERS, "*", "member_id=".$newAssignTeamArray[$x][0].""); while($row2 = $sql2-> db_Fetch()){ // start loop $nickname = $row2['nickname']; } $sql3 = new db; $sql3 -> db_Insert( DB_TABLE_TEAM_MEMBERS, "".$newAssignTeamArray[$x][0].", '".$nickname."', ".$newAssignTeamArray[$x][1].", '".$newAssignTeamArray[$x][2]."', '".$newAssignTeamArray[$x][3]."', '".$newAssignTeamArray[$x][4]."', 'None', '#FFFFFF', 1"); } } } } } //*/ //* header("Location: admin_manage_teams.php"); exit; //*/ } else if ($_POST['edit_team'] == '1') { /********************************************************************** * * Change Leader Status * **********************************************************************/ /* print "<pre>"; print_r( $_POST ); print "</pre>"; //*/ //* for ($x = 0; $x < count($_POST['leader_status']); $x++) { tokenizeArray($_POST['leader_status'][$x]); $newLeaderStatusArray[$x] = $tokens; } //*/ /* print "<pre>"; print_r( $newLeaderStatusArray ); print "</pre>"; //*/ /* // $newLeaderStatusArray[$x][0] = member_id // $newLeaderStatusArray[$x][1] = new_leader_status //*/ //* for ($x = 0; $x < count($newLeaderStatusArray); $x++) { if ($sql -> db_Count(DB_TABLE_MEMBERS, "(*)", " WHERE member_id=".$newLeaderStatusArray[$x][0]." AND leader_status='".$newLeaderStatusArray[$x][1]."'") > 0) { // Do Nothing } else { $sql -> db_Update(DB_TABLE_MEMBERS, "leader_status='".$newLeaderStatusArray[$x][1]."' WHERE member_id=".$newLeaderStatusArray[$x][0]); } if ($sql -> db_Count(DB_TABLE_CUSTOM_ATTRIBUTE_VALUES, "(*)", " WHERE member_id=".$newLeaderStatusArray[$x][0]." AND attribute_value='".$newLeaderStatusArray[$x][1]."'") > 0) { // Do Nothing } else { $sql -> db_Update(DB_TABLE_CUSTOM_ATTRIBUTE_VALUES, "attribute_value='".$newLeaderStatusArray[$x][1]."' WHERE member_id=".$newLeaderStatusArray[$x][0]." AND attribute_id=5"); } } //*/ /* print "<pre>"; print_r( $newLeaderStatusArray ); print "</pre>"; //*/ /********************************************************************** * * Change Leader Order * **********************************************************************/ //* for ($x = 0; $x < count($_POST['leader_new_member_leader_order']); $x++) { tokenizeArray($_POST['leader_new_member_leader_order'][$x]); $newLeaderOrderArray[$x] = $tokens; } //*/ /* print "<pre>"; print_r( $newLeaderOrderArray ); print "</pre>"; //*/ /* // $newLeaderOrderArray[$x][0] = type of query statement (Leader of Team) // $newLeaderOrderArray[$x][1] = member_id // $newLeaderOrderArray[$x][2] = new_order //*/ //* for ($x = 0; $x < count($newLeaderOrderArray); $x++) { $sql2 = new db; $sql2 -> db_Update(DB_TABLE_MEMBERS, "leader_order=".$newLeaderOrderArray[$x][2]." WHERE member_id=".$newLeaderOrderArray[$x][1]); } //*/ /********************************************************************** * * Change Teams * **********************************************************************/ //* for ($x = 0; $x < count($_POST['team_new_member_team']); $x++) { tokenizeArray($_POST['team_new_member_team'][$x]); $newTeamArray[$x] = $tokens; } //*/ /* print "<pre>"; print_r( $newTeamArray ); print "</pre>"; //*/ /* // values when $organizationType is 6 // $newTeamArray[$x][0] = member_id // $newTeamArray[$x][1] = current_team_id // $newTeamArray[$x][2] = current_team_name // $newTeamArray[$x][3] = new_team_id // $newTeamArray[$x][4] = new_team_name //*/ /* // values when $organizationType is not 6 // $newTeamArray[$x][0] = member_id // $newTeamArray[$x][1] = current_team_id // $newTeamArray[$x][2] = current_team_name // $newTeamArray[$x][3] = current_game_id // $newTeamArray[$x][4] = current_game_name // $newTeamArray[$x][5] = new_team_id // $newTeamArray[$x][6] = new_team_name // $newTeamArray[$x][7] = new_game_id // $newTeamArray[$x][8] = new_game_name //*/ //* for ($x = 0; $x < count($newTeamArray); $x++) { if ($organizationType == 6) { if ($newTeamArray[$x][4] == "None") { // Delete record $sql3 = new db; $sql3 -> db_Delete(DB_TABLE_TEAM_MEMBERS, " member_id=".$newTeamArray[$x][0]." AND team_id=".$newTeamArray[$x][1]); } else { $sql3 = new db; $numRows = $sql3 -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE member_id=".$newTeamArray[$x][0]." AND team_id=".$newTeamArray[$x][3]); if ($numRows > 0) { // Let them know that the member is already in that team } else { $sql4 = new db; $sql4 -> db_Select(DB_TABLE_MEMBERS, "*", "member_id=".$newTeamArray[$x][0]); while($row4 = $sql4-> db_Fetch()){ // start loop $nickname = $row4['nickname']; } // Delete record $sql5 = new db; $sql5 -> db_Delete(DB_TABLE_TEAM_MEMBERS, " member_id=".$newTeamArray[$x][0]." AND team_id=".$newTeamArray[$x][1]); $sql6 = new db; $sql6 -> db_Insert(DB_TABLE_TEAM_MEMBERS, "".$newTeamArray[$x][0].", '$nickname', ".$newTeamArray[$x][3].", '".$newTeamArray[$x][4]."', '', '', 'None', 'FFFFFF', 1"); } } } else { if (!isset($newTeamArray[$x][4])) { // Don't edit this team } else { if ($newTeamArray[$x][3] == "None") { // Delete record $sql3 = new db; $sql3 -> db_Delete(DB_TABLE_TEAM_MEMBERS, " member_id=".$newTeamArray[$x][0]." AND team_id='".$newTeamArray[$x][1]."' AND game_id='".$newTeamArray[$x][3]."'"); } else { $sql3 = new db; $numRows = $sql3 -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE member_id=".$newTeamArray[$x][0]." AND team_id='".$newTeamArray[$x][5]."' AND game_id='".$newTeamArray[$x][7]."'"); if ($numRows > 0) { // Let them know that the member is already in that team } else { $sql4 = new db; $sql4 -> db_Select(DB_TABLE_MEMBERS, "*", "member_id=".$newTeamArray[$x][0]); while($row4 = $sql4-> db_Fetch()){ // start loop $nickname = $row4['nickname']; } // Delete record $sql5 = new db; $sql5 -> db_Delete(DB_TABLE_TEAM_MEMBERS, " member_id=".$newTeamArray[$x][0]." AND team_id=".$newTeamArray[$x][1]); $sql6 = new db; $sql6 -> db_Insert(DB_TABLE_TEAM_MEMBERS, "".$newTeamArray[$x][0].", '$nickname', ".$newTeamArray[$x][5].", '".$newTeamArray[$x][6]."', ".$newTeamArray[$x][7].", '".$newTeamArray[$x][8]."', 'None', 'FFFFFF', 1"); } } } } } //*/ /********************************************************************** * * Change Team Status * **********************************************************************/ //* for ($x = 0; $x < count($_POST['team_new_member_team_status']); $x++) { tokenizeArray($_POST['team_new_member_team_status'][$x]); $newTeamStatusArray[$x] = $tokens; } //*/ /* print "<pre>"; print_r( $newTeamStatusArray ); print "</pre>"; //*/ /* // When $organizationType is 6 // $newTeamStatusArray[$x][0] = member_id // $newTeamStatusArray[$x][1] = team_id // $newTeamStatusArray[$x][2] = current_status // $newTeamStatusArray[$x][3] = new_status //*/ /* // When $organizationType is not 6 // $newTeamStatusArray[$x][0] = member_id // $newTeamStatusArray[$x][1] = current_team_id // $newTeamStatusArray[$x][2] = current_status // $newTeamStatusArray[$x][3] = current_game_id // $newTeamStatusArray[$x][4] = new_status //*/ //* for ($x = 0; $x < count($newTeamStatusArray); $x++) { if ($organizationType == 6) { if ($newTeamStatusArray[$x][3] == "") { // Do Nothing } else { $sql5 = new db; $sql5 -> db_Update(DB_TABLE_TEAM_MEMBERS, "member_team_status='".$newTeamStatusArray[$x][3]."' WHERE member_id=".$newTeamStatusArray[$x][0]." AND member_team_status='".$newTeamStatusArray[$x][2]."' AND team_id=".$newTeamStatusArray[$x][1]); $sql6 = new db; $sql6 -> db_Update(DB_TABLE_CUSTOM_ATTRIBUTE_ENTRIES, "attribute_value='".$newTeamStatusArray[$x][3]."' WHERE member_id=".$newTeamStatusArray[$x][0]." AND attribute_id=3"); } } else { if ($newTeamStatusArray[$x][4] == "") { // Do Nothing } else { $sql5 = new db; $sql5 -> db_Update(DB_TABLE_TEAM_MEMBERS, "member_team_status='".$newTeamStatusArray[$x][4]."' WHERE member_id=".$newTeamStatusArray[$x][0]." AND member_team_status='".$newTeamStatusArray[$x][2]."' AND team_id='".$newTeamStatusArray[$x][1]."' AND game_id='".$newTeamStatusArray[$x][3]."'"); $sql6 = new db; $sql6 -> db_Update(DB_TABLE_CUSTOM_ATTRIBUTE_ENTRIES, "attribute_value='".$newTeamStatusArray[$x][4]."' WHERE member_id=".$newTeamStatusArray[$x][0]." AND attribute_id=3"); } } } //*/ /********************************************************************** * * Change Team Order * **********************************************************************/ //* for ($x = 0; $x < count($_POST['team_new_member_team_order']); $x++) { tokenizeArray($_POST['team_new_member_team_order'][$x]); $newTeamOrderArray[$x] = $tokens; } //*/ /* print "<pre>"; print_r( $newTeamOrderArray ); print "</pre>"; //*/ /* // When $organizationType is 6 // $newTeamOrderArray[$x][0] = member_id // $newTeamOrderArray[$x][1] = member_team_order // $newTeamOrderArray[$x][2] = team_id // $newTeamOrderArray[$x][3] = new_team_order //*/ /* // When $organizationType is not 6 // $newTeamOrderArray[$x][0] = member_id // $newTeamOrderArray[$x][1] = current_team_id // $newTeamOrderArray[$x][2] = current_order // $newTeamOrderArray[$x][3] = current_game_id // $newTeamOrderArray[$x][4] = new_order //*/ //* for ($x = 0; $x < count($newTeamOrderArray); $x++) { if ($organizationType == 6) { $sql6 = new db; $numRows = $sql6 -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE member_id=".$newTeamOrderArray[$x][0]." AND team_id='".$newTeamOrderArray[$x][2]."' AND member_team_order =".$newTeamOrderArray[$x][3]); if ($numRows > 0) { // Do Nothing } else { $sql7 = new db; $sql7 -> db_Update(DB_TABLE_TEAM_MEMBERS, "member_team_order=".$newTeamOrderArray[$x][3]." WHERE member_id=".$newTeamOrderArray[$x][0]." AND member_team_order=".$newTeamOrderArray[$x][1]." AND team_id='".$newTeamOrderArray[$x][2]."'"); } } else { $sql6 = new db; $numRows = $sql6 -> db_Count(DB_TABLE_TEAM_MEMBERS, "(*)", " WHERE member_id=".$newTeamOrderArray[$x][0]." AND team_id='".$newTeamOrderArray[$x][1]."' AND game_id='".$newTeamOrderArray[$x][3]."' AND member_team_order =".$newTeamOrderArray[$x][4]); if ($numRows > 0) { // Do Nothing } else { $sql7 = new db; $sql7 -> db_Update(DB_TABLE_TEAM_MEMBERS, "member_team_order=".$newTeamOrderArray[$x][4]." WHERE member_id=".$newTeamOrderArray[$x][0]." AND member_team_order=".$newTeamOrderArray[$x][2]." AND team_id='".$newTeamOrderArray[$x][1]."' AND game_id='".$newTeamOrderArray[$x][3]."'"); } } } //*/ /* print "<pre>"; print_r( $_POST ); print "</pre>"; //*/ /* print "<pre>"; print_r( $newTeamArray ); print "</pre>"; //*/ /* print "<pre>"; print_r( $newTeamStatusArray ); print "</pre>"; //*/ /* print "<pre>"; print_r( $newTeamOrderArray ); print "</pre>"; //*/ //* header("Location: admin_manage_teams.php"); exit; //*/ } else { //* header("Location: admin_manage_teams.php"); exit; //*/ } require_once(e_ADMIN."footer.php"); ?> Agian, thank you to anyone who can help me. Quote Link to comment Share on other sites More sharing options...
mcclellanfsu Posted February 26, 2007 Author Share Posted February 26, 2007 Still stuck on this one. Any help would be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted February 26, 2007 Share Posted February 26, 2007 This is an HTML problem, not a PHP problem. For a submit button to work without Javascript, it needs to be of type "submit", yours are of type "button". Change the lines like this: <input class='button' type='submit' value='Assign Team'> to <input class='submit' type='submit' value='Assign Team'> Ken Quote Link to comment Share on other sites More sharing options...
mrinfin1ty Posted December 13, 2007 Share Posted December 13, 2007 Ken, I see you're online, I have EXACTLY the same issue, I tried changing the code but all it did was turn it into a normal button rather than just a stylish one. This is also driving me insane, totally... as this plugin is great, yet this is the only thing not working. HELP ME! Quote Link to comment Share on other sites More sharing options...
mrinfin1ty Posted December 13, 2007 Share Posted December 13, 2007 *bump* Please guys, someone must be able to spot an error, i've gone over both files... cant see anything Quote Link to comment Share on other sites More sharing options...
mrinfin1ty Posted December 16, 2007 Share Posted December 16, 2007 Bump... Quote Link to comment Share on other sites More sharing options...
haku Posted December 16, 2007 Share Posted December 16, 2007 The answer has already been given. Change it to type="submit". Submit buttons are not very easily stylized, they are also not a php issue. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 16, 2007 Share Posted December 16, 2007 A STYLE does not determine if its a submit button or not. Try giving it a name='submit' <input class='button' name='edit_team' type='submit' value='Assign Team'> Quote Link to comment Share on other sites More sharing options...
revraz Posted December 16, 2007 Share Posted December 16, 2007 You may have to change this too } else if ($_POST['edit_team'] == '1') { to } else if ($_POST['edit_team'] == 'Edit Teams') { But I would just redo both the forms myself. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.