Jensej
Member
- Joined
- Feb 28, 2009
- Messages
- 807
- Reaction score
- 8
Witam.
Mam 1 problem.
otóż
Gdy wybiorę Gildie nr 3. Zawsze dodaje pkt gildi numer 1.
Chciałem zaznaczyć że usuń działa. Ale został problem z Akceptuj. Proszę o pomoc.
kod
Mam 1 problem.
otóż
Gdy wybiorę Gildie nr 3. Zawsze dodaje pkt gildi numer 1.
Chciałem zaznaczyć że usuń działa. Ale został problem z Akceptuj. Proszę o pomoc.
kod
PHP:
<?PHP
$bgcolor1 = $config['site']['darkborder'];
$bgcolor = $config['site']['lightborder'];
$bgcolor2 = $config['site']['vdarkborder'];
$dane = $SQL->query("SELECT `nazwagildi`,`id`,`nazwalidera`,`iloscgraczy` FROM `z_points_guild` ORDER BY `id` DESC LIMIT 1")->fetch();
$accountid = $SQL->query("SELECT `account_id` FROM `players` WHERE `name` = '".$dane['nazwalidera']."'; ")->fetch();
$cos = $SQL->query("SELECT `id` FROM `z_points_guild`")->fetch();
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
if($action == ""){
$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Witamy!<br><small><font color="gray">Znajdujesz się w Panelu Administratora. </font></small></b></center></td></tr>
</td></tr></table><br>';
$main_content .= '<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>
<TR bgcolor="'.$config['site']['vdarkborder'].'"><TD align=center colspan=5><font color="white"><b>Lista Zapisanych Gildii</b></font></TD></TR>
<TR bgcolor="'.$config['site']['vdarkborder'].'"><TD align=center><font color="white">Lp.</b></TD><TD align=center><font color="white">Nazwa Gildi.</b></TD><TD align=center><font color="white">Nazwa Lidera.</b></TD><TD align=center><font color="white">Ilość graczy</b></TD><TD align=center><font color="white">Edytuj</b></TD></TR>
';
$i = 0;
foreach($SQL->query('SELECT `nazwagildi`,`id`,`nazwalidera`,`iloscgraczy`,`status` FROM `z_points_guild` ORDER BY `id` DESC,`nazwagildi` DESC
LIMIT 0, 100;') as $dane)
{
$i++;
$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '">
<td>
<center>'.$i.'</center>
</td>
<td>
<center>'.$dane['nazwagildi'].'</center>
</td>
<td>
<center>'.$dane['nazwalidera'].'</center>
</td>
<td>
<center>'.$dane['iloscgraczy'].'</center>
</td>
<td>
<center><a href="?subtopic=panel&action=addpoints">Akceptuj</a> / <a href="?subtopic=panel&action=usun">Usuń</a></center>
</td>
</tr>';
}
$main_content .= ' </TABLE> ';
//huj
}//action = ""
if($action == "addpoints"){
$main_content .= ' '.$dane['nazwalidera'].' <br> '.$accountid['account_id'].'<br> '.$dane['iloscgraczy'].'';
if($dane['iloscgraczy'] == 10 ){
$SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + 11 WHERE `id` = '".$accountid['account_id']."' ");
}
if($dane['iloscgraczy'] == 30 ){
$SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + 22 WHERE `id` = '".$accountid['account_id']."' ");
}
if($dane['iloscgraczy'] == 40 ){ ///zaraz tutaj edit ja
$SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + 33 WHERE `id` = '".$accountid['account_id']."';");
}
$main_content .= 'Punkty Dodane<br>';
$main_content .= '<br><a href="?subtopic=panel"><font color="blue">Back</font></a>';
}
if($action == "usun"){
$SQL->query("DELETE FROM `z_points_guild` WHERE`id` = '".$dane['id']."' ");
$main_content .= '<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>
<TR BGCOLOR="'.$bgcolor2.'"><TD align="center"><font color="white"><b>Zarządzaj:</b></TD></TR></font>
<TR BGCOLOR="'.$bgcolor1.'"><TD style="padding-left:20px"><li><b>Wybrany Formularz został usunięty.</b></li>.</TD></TR>
</TABLE>';
$main_content .= '<br><a href="?subtopic=panel"><font color="blue">Back</font></a>';
}
}// czy admin koniec
?>
Last edited: