Jump to content

Help Warning: Missing argument 10 for edit_teamb() in /var/www/vhosts/cgl-league


Guest Jester187

Recommended Posts

Guest Jester187
[quote]<?

function edit_team($teamid){
global $dir, $style, $style, $url, $out, $plyr, $site, $uinfo, $misc;

if(!$teamid){
include("$dir[func]/error.php");
display_error("Invalid Team ID.<br>");
}

//CHECK IF LEADER
if (mysql_num_rows(mysql_query("SELECT status FROM teammembers WHERE teamid='$teamid' AND playerid='$plyr[id]' AND status='1'")) < 1){
include("$dir[func]/error.php");
display_error("You are not allowed to edit this team.<br>");
}

$teaminfo=mysql_query("SELECT * FROM teams WHERE id='$teamid'");
$tinfo=mysql_fetch_array($teaminfo);

if(!$tinfo[teamname]){
include("$dir[func]/error.php");
display_error("Unknown Team ID.<br>");
}

$ladinfo=mysql_query("SELECT laddername FROM ladders WHERE id='$tinfo[ladderon]'");
$linfo=mysql_fetch_array($ladinfo);


if($tinfo[tagplace]=="0"){
$checkeda="CHECKED";
$checkedb="";
}else{
$checkeda="";
$checkedb="CHECKED";
}

if($misc[changeteamname]=="yes"){
$teamnameedit="<input type='text' name='t_alias' value='$tinfo[teamname]' size='30' maxlength='25'>";
}else{
$teamnameedit="<input type='hidden' name='t_alias' value='$tinfo[teamname]'>$tinfo[teamname]";
}



//TABLE ATERNATING COLORS
$altcolora="$style[altcolora]";
$altcolorb="$style[altcolorb]";



$tablehead=table_head("show","800","","left");
$tablefoot=table_foot("show");

$out[body]=$out[body]."
<center>
$tablehead
&nbsp; &nbsp;<strong><font color='$style[headerfont]'>Team Editor</font></strong><br>
<hr color='$style[headerfont]' size='1'>

<table width='100%' border='0' cellspacing='0' cellpadding='0' valign='top' align='center'>
<form method='post'>

<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>* Team Name</font></td>
<td width='50%' valign='center' align='center'>
$teamnameedit</td>
</tr>

<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>* Team Email</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_email' value='$tinfo[teamemail]' size='30' maxlength='50'></td>
</tr>

<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Tag</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_tag' value='$tinfo[tag]' size='30' maxlength='10'></td>
</tr>

<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Tag Placement</font></td>
<td width='50%' valign='center' align='center'>
Before Name: <input type='radio' name='t_tagplace' value='0' $checkeda>
After: <input type='radio' name='t_tagplace' value='1' $checkedb></td>
</tr>

<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Team Website</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_url' value='$tinfo[website]' size='30' maxlength='100'></td>
</tr>

<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Team Logo</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_logo' value='$tinfo[logo]' size='30' maxlength='100'></td>
</tr>


<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Team Music</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_mp3' value='$tinfo[mp3]' size='30' maxlength='100'></td>
</tr>


<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Contact Method (Irc Channel@Server or Icq)</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_contact' value='$tinfo[contact]' size='30' maxlength='50'></td>
</tr>";

$selected="";
$value="";
$value=$tinfo[challenge];
$selected[$value]="SELECTED";
$out[body]=$out[body]."
<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Enable Challenges?</font></td>
<td width='50%' valign='center' align='center'>
<select name='t_challenge'>
<option value='1' $selected[1]>Yes</option>
<option value='1' $selected[1]>Yes</option>
</select></td>
</tr>


<tr>
<td width='100%' valign='top' align='center' colspan='2'>
<br>
<input type='hidden' name='teamid' value='$teamid'>
<input type='hidden' name='action' value='teamb'>
<input type='submit' name='' value='Update Team'>
<input type='reset' name='' value='Reset'></td>
</form>
</tr>
</table>
$tablefoot";


include("$dir[curtheme]");
}




function edit_teamb($teamid,$t_alias,$t_email,$t_tag,$t_tagplace,$t_url,$t_logo,$t_contact,$t_challenge,$t_mp3){
global $dir, $style, $style, $file, $url, $out, $plyr;

if(!$teamid){
include("$dir[func]/error.php");
display_error("Invalid Team ID.<br>");
}

//CHECK IF LEADER
if (mysql_num_rows(mysql_query("SELECT status FROM teammembers WHERE teamid='$teamid' AND playerid='$plyr[id]' AND status='1'")) < 1){
include("$dir[func]/error.php");
display_error("You are not allowed to edit this team.<br>");
}

$teaminfo=mysql_query("SELECT teamname FROM teams WHERE id='$teamid'");
$tinfo=mysql_fetch_array($teaminfo);

if(!$tinfo[teamname]){
include("$dir[func]/error.php");
display_error("Unknown Team ID.<br>");
}


include("$dir[func]/checkdata.php");

$t_alias=change_charecters($t_alias);
$t_email=change_charecters($t_email);
$t_tag=change_charecters($t_tag);

$errormessage=check_validlength($errormessage, $t_alias, "3", "50", "Your Name Must be 3-25 Characters Long");
$errormessage=check_validlength($errormessage, $t_tag, "0", "25", "Your Tag Must not Exceed 10 Characters Long");
$errormessage=check_validlength($errormessage, $t_email, "5", "100", "Your must include a valid team email.<br>Team Email cannot exceed 50 characters");
error_check($errormessage);

$errormessage=check_emailaddress($t_email);
error_check($errormessage);

if (mysql_num_rows(mysql_query("SELECT teamname FROM teams WHERE id!='$teamid' AND teamname='$t_alias'")) > 0){
include("$dir[func]/error.php");
display_error("That name already exist.<br>");
}

$t_tagplace=change_numbersonly($t_tagplace);
$t_url=change_url($t_url);
$t_logo=change_url($t_logo);
$t_mp3=change_url($t_mp3);

$t_url=change_charecters($t_url);
$t_logo=change_charecters($t_logo);
$t_mp3=change_charecters($t_mp3);

$t_contact=change_charecters($t_contact);
$t_challenge=change_numbersonly($t_challenge);

$errormessage=check_ban($errormessage, $t_alias, $email, $ip);
error_check($errormessage);


mysql_query("UPDATE teams SET
teamname='$t_alias',
teamemail='$t_email',
tag='$t_tag',
tagplace='$t_tagplace',
website='$t_url',
logo='$t_logo',
mp3='$t_mp3',  
contact='$t_contact',
challenge='$t_challenge'
WHERE id='$teamid'");


include("$dir[func]/finishmessage.php");
display_message("Your Team Information has been Updated","playerhome.php");

}



?>
[/quote]


Im getting Warning: Missing argument 10 for edit_teamb() in /var/www/vhosts/cgl-league
I cant figure out why the edit field for Team Music isnt changing in mysql and its giving me that error.
Link to comment
Share on other sites

Guest Jester187
They way i have it right now its showing the Team Music field by using $tinfo[mp3] it putes the link there to the mp3.

But when i cahnge it, its back when i refresh and it doesnt change in my sql under mp3 in teams

I dont have anything set up in editteamb to change the feature because i cannot figure out what to put
Maybe this will help u guys help me

<?

function edit_team($teamid){
global $dir, $style, $style, $url, $out, $plyr, $site, $uinfo, $misc;

if(!$teamid){
include("$dir[func]/error.php");
display_error("Invalid Team ID.<br>");
}

//CHECK IF LEADER
if (mysql_num_rows(mysql_query("SELECT status FROM teammembers WHERE teamid='$teamid' AND playerid='$plyr[id]' AND status='1'")) < 1){
include("$dir[func]/error.php");
display_error("You are not allowed to edit this team.<br>");
}

$teaminfo=mysql_query("SELECT * FROM teams WHERE id='$teamid'");
$tinfo=mysql_fetch_array($teaminfo);

if(!$tinfo[teamname]){
include("$dir[func]/error.php");
display_error("Unknown Team ID.<br>");
}

$ladinfo=mysql_query("SELECT laddername FROM ladders WHERE id='$tinfo[ladderon]'");
$linfo=mysql_fetch_array($ladinfo);


if($tinfo[tagplace]=="0"){
$checkeda="CHECKED";
$checkedb="";
}else{
$checkeda="";
$checkedb="CHECKED";
}

if($misc[changeteamname]=="yes"){
$teamnameedit="<input type='text' name='t_alias' value='$tinfo[teamname]' size='30' maxlength='25'>";
}else{
$teamnameedit="<input type='hidden' name='t_alias' value='$tinfo[teamname]'>$tinfo[teamname]";
}



//TABLE ATERNATING COLORS
$altcolora="$style[altcolora]";
$altcolorb="$style[altcolorb]";



$tablehead=table_head("show","800","","left");
$tablefoot=table_foot("show");

$out[body]=$out[body]."
<center>
$tablehead
&nbsp; &nbsp;<strong><font color='$style[headerfont]'>Team Editor</font></strong><br>
<hr color='$style[headerfont]' size='1'>

<table width='100%' border='0' cellspacing='0' cellpadding='0' valign='top' align='center'>
<form method='post'>

<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>* Team Name</font></td>
<td width='50%' valign='center' align='center'>
$teamnameedit</td>
</tr>

<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>* Team Email</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_email' value='$tinfo[teamemail]' size='30' maxlength='50'></td>
</tr>

<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Tag</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_tag' value='$tinfo[tag]' size='30' maxlength='10'></td>
</tr>

<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Tag Placement</font></td>
<td width='50%' valign='center' align='center'>
Before Name: <input type='radio' name='t_tagplace' value='0' $checkeda>
After: <input type='radio' name='t_tagplace' value='1' $checkedb></td>
</tr>

<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Team Website</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_url' value='$tinfo[website]' size='30' maxlength='100'></td>
</tr>

<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Team Logo</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_logo' value='$tinfo[logo]' size='30' maxlength='100'></td>
</tr>


<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Team Music</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_mp3' value='$tinfo[mp3]' size='30' maxlength='100'></td>
</tr>


<tr bgcolor='$altcolorb'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Contact Method (Irc Channel@Server or Icq)</font></td>
<td width='50%' valign='center' align='center'>
<input type='text' name='t_contact' value='$tinfo[contact]' size='30' maxlength='50'></td>
</tr>";

$selected="";
$value="";
$value=$tinfo[challenge];
$selected[$value]="SELECTED";
$out[body]=$out[body]."
<tr bgcolor='$altcolora'>
<td width='50%' valign='center' align='left'>
<font face='veradna,arial' size='2' color='$style[fontcolor]'>
Enable Challenges?</font></td>
<td width='50%' valign='center' align='center'>
<select name='t_challenge'>
<option value='1' $selected[1]>Yes</option>
<option value='1' $selected[1]>Yes</option>
</select></td>
</tr>


<tr>
<td width='100%' valign='top' align='center' colspan='2'>
<br>
<input type='hidden' name='teamid' value='$teamid'>
<input type='hidden' name='action' value='teamb'>
<input type='submit' name='' value='Update Team'>
<input type='reset' name='' value='Reset'></td>
</form>
</tr>
</table>
$tablefoot";


include("$dir[curtheme]");
}




function edit_teamb($teamid,$t_alias,$t_email,$t_tag,$t_tagplace,$t_url,$t_logo,$t_contact,$t_challenge){
global $dir, $style, $style, $file, $url, $out, $plyr;

$teaminfo=mysql_query("SELECT *,mp3 FROM teams WHERE id='$teamid'");
$tinfo=mysql_fetch_array($teaminfo);

if(!$teamid){
include("$dir[func]/error.php");
display_error("Invalid Team ID.<br>");
}


//CHECK IF LEADER
if (mysql_num_rows(mysql_query("SELECT status FROM teammembers WHERE teamid='$teamid' AND playerid='$plyr[id]' AND status='1'")) < 1){
include("$dir[func]/error.php");
display_error("You are not allowed to edit this team.<br>");
}

$teaminfo=mysql_query("SELECT teamname FROM teams WHERE id='$teamid'");
$tinfo=mysql_fetch_array($teaminfo);

if(!$tinfo[teamname]){
include("$dir[func]/error.php");
display_error("Unknown Team ID.<br>");
}


include("$dir[func]/checkdata.php");

$t_alias=change_charecters($t_alias);
$t_email=change_charecters($t_email);
$t_tag=change_charecters($t_tag);

$errormessage=check_validlength($errormessage, $t_alias, "3", "50", "Your Name Must be 3-25 Characters Long");
$errormessage=check_validlength($errormessage, $t_tag, "0", "25", "Your Tag Must not Exceed 10 Characters Long");
$errormessage=check_validlength($errormessage, $t_email, "5", "100", "Your must include a valid team email.<br>Team Email cannot exceed 50 characters");
error_check($errormessage);

$errormessage=check_emailaddress($t_email);
error_check($errormessage);

if (mysql_num_rows(mysql_query("SELECT teamname FROM teams WHERE id!='$teamid' AND teamname='$t_alias'")) > 0){
include("$dir[func]/error.php");
display_error("That name already exist.<br>");
}

$t_tagplace=change_numbersonly($t_tagplace);
$t_url=change_url($t_url);
$t_logo=change_url($t_logo);

$t_url=change_charecters($t_url);
$t_logo=change_charecters($t_logo);

$t_contact=change_charecters($t_contact);
$t_challenge=change_numbersonly($t_challenge);

$errormessage=check_ban($errormessage, $t_alias, $email, $ip);
error_check($errormessage);


mysql_query("UPDATE teams SET
teamname='$t_alias',
teamemail='$t_email',
tag='$t_tag',
tagplace='$t_tagplace',
website='$t_url',
logo='$t_logo',  
contact='$t_contact',
challenge='$t_challenge'
WHERE id='$teamid'");

include("$dir[func]/finishmessage.php");
display_message("Your Team Information has been Updated","playerhome.php");


}



?>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.