elseif($buy_offer['type'] == 'redskull')
{
//Obtener id ed la cuenta
$my_acc_id = $buy_player->getCustomField('id');
$dataget = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$my_acc_id.';')->fetch();
if($dataget['skull'] >= '1' AND $dataget['online'] >= '0' AND $dataget['skulltime'] > '0') {
$SQL->query('UPDATE players SET skull=0, skulltime=0 WHERE id='. $my_acc_id .';');
$account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
$user_premium_points = $user_premium_points - $buy_offer['points'];
$main_content .= '
<h2>
Skull Removed!
</h2>
<b>
Your skull has been removed to the player '.$buy_player->getName().',
<br>
Now you have
<b>
'.$user_premium_points.' premium points
</b>.
<br>
<a href="index.php?subtopic=shopsystem">
GO TO MAIN SHOP SITE
</a>';
} else
{
$main_content .= '
<b>
'.$buy_player->getName().' has to be offline or have skull to complete transaction!.
</b>
<br>
<a href="index.php?subtopic=shopsystem">
GO BACK
</a>';
}
}
elseif($buy_offer['type'] == 'redskull')
{
//Obtener id ed la cuenta
$my_acc_id = $buy_player->getCustomField('id');
$dataget = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$my_acc_id.';')->fetch();
if($dataget['skull'] >= '1' AND $dataget['online'] >= '0' AND $dataget['skulltime'] > '0') {
$SQL->query('UPDATE players SET skull=0, skulltime=0 WHERE id='. $my_acc_id .';');
$account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
$user_premium_points = $user_premium_points - $buy_offer['points'];
$main_content .= '
<h2>
Skull Removed!
</h2>
<b>
Your skull has been removed to the player '.$buy_player->getName().',
<br>
Now you have
<b>
'.$user_premium_points.' premium points
</b>.
<br>
<a href="index.php?subtopic=shopsystem">
GO TO MAIN SHOP SITE
</a>';
} else
{
$main_content .= '
<b>
'.$buy_player->getName().' has to be offline or have skull to complete transaction!.
</b>
<br>
<a href="index.php?subtopic=shopsystem">
GO BACK
</a>';
}
}