• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Code Change [PHP]

Joined
Jun 19, 2009
Messages
1,852
Reaction score
5
Hello!

Aleh made a vip script(php).. I'm currently using his but I've changed my vip system now.. it's based on this script by Kekox

So my question is, cud someone change this php script so it works with the vip system I am currently using?

PHP:
$vip = $SQL->query('SELECT `player_storage`.`player_id`, `player_storage`.`key`, `players`.`id` FROM `player_storage`, `players` WHERE `player_storage`.`player_id` = '.$player->getId().' AND `key` = 11551;')->fetchall();
if($vip[0]['key'] == 11551)
    $vipp = '<center><font color="green"><b>VIP</b></font></center>';
else
    $vipp = '<center><font color="red"><b>FREE</b></font></center>';

thanks!
 
mmm test

PHP:
		$id = $account_logged->getId();
		$vip = $SQL->query('SELECT vip_days FROM accounts WHERE id = '.$id.';')->fetch();
		$vip_status = ($vip != 0) ? "<b><font color=green>VIP Account</font></b>" : "<b><font color=red>No VIP</font></b>";
 
Last edited:
Code:
$player = $ots->createObject('Player');
$player->find($skill['name']);
$account = $player->getAccount();
$ban = '';
        [COLOR="Red"]$id = $account_logged->getId();
        $vip = $SQL->query('SELECT vip_days FROM accounts WHERE id = '.$id.';')->fetch();
        $vip_status = ($vip != 0) ? "<b><font color=green>VIP Account</font></b>" : "<b><font color=red>No VIP</font></b>" [/COLOR]
if($account->isBanned())
$ban = '<font color="red"> [Banished]</font>';
    if($number_of_rows < 100)
    {
        if($list == "magic")
            $skill['value'] = $skill['maglevel'];
        if($list == "experience")
            $skill['value'] = $skill['level'];
        if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
        $main_content .= '<tr bgcolor="'.$bgcolor.'"><td>'.($offset + $number_of_rows).'.</td><td><a href="?subtopic=characters&name='.urlencode($skill['name']).'">'.($skill['online']>0 ? "<font color=\"green\">".$skill['name']."</font>" : "<font color=\"red\">".$skill['name']."</font>").'</a> '.$ban.'<br><small>'.$skill['level'].' '.$vocation_name[$world_id][$skill['promotion']][$skill['vocation']].'</small></td><td><center>'.$skill['value'].'</center></td> <td>'.$vipp.'</td>';
        if($list == "experience")
            $main_content .= '<td><center>'.$skill['experience'].'</center></td>';
        $main_content .= '</tr>';
    }
    else
        $show_link_to_next_page = TRUE;
}

is this part enough? if not, tell me, because I have a custom layout xD
(dont want to post it) but i can post it in pms ^^
 
PHP:
        $vip_status = ($vip != 0) ? "<b><font color=green>VIP Account</font></b>" : "<b><font color=red>No VIP</font></b>"
missing ; at the end of this line :p
 
Back
Top Bottom