• 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!

Show your Vip Status [Mysql Table][Gesior/Modern Acc]

Acordion

Member
Joined
Mar 26, 2010
Messages
150
Reaction score
6
Location
Mèxico
How Show your Vip Status for Mysql Table

First add the public fuction
Gesior Acc: htdocs/pot/OTS_ACCOUNT.php
Modern Acc: htdocs\system\application\libraries\POT\OTS_Account.php

Next to

PHP:
'lastday' => 0,

Add this

PHP:
'vipdays' => 0,

Next to

PHP:
' . $this->db->fieldName('rlname') . ',

Add this

PHP:
'. $this->db->fieldName('vipdays') . ',

Next to

PHP:
' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ',

Add this

PHP:
' . $this->db->fieldName('vipdays') . ' = ' . $this->db->quote($this->data['vipdays']) . ',

After to

PHP:
	public function getRLName()
    {
        if( !isset($this->data['rlname']) )
        {
            throw new E_OTS_NotLoaded();
        }

        return $this->data['rlname'];
    }

Add this

PHP:
public function getPlayerVipDays()
    {
        if( !isset($this->data['vipdays']) )
        {
            throw new E_OTS_NotLoaded();
        }

        return $this->data['vipdays'];
    }

Yep! Now, You have the public fuction (getPlayerVipDays) :thumbup:

Gesior ACC
Now, How show in accounts and characters
Htdocs/Accountmanagement.php
Add after to

PHP:
                $account_email = $account_logged->getEMail();

Add this

PHP:
		/*Vip Status*/
		$account_vip = $account_logged->getPlayerVipDays() ? '<b><font color="green"> Vip Account, '.$account_logged->getPlayerVipDays().' Days left </font></b>' : '<b><font color="red">Not Vip Account</font></b>';

Next to

PHP:
" ><td class="LabelV" >Account Status:</td><td>'.$account_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';

Add this

PHP:
" ><td class="LabelV" >Vip Status:</td><td>'.$account_vip.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';

Htdocs/Characters.PHP
After to

PHP:
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>Account*Status:</TD><TD>';
				$main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free Account</font></b>';

Add this

PHP:
				/*Vip Status*/ 
            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>Vip*Status:</TD><TD>';  
            $main_content .= ($account->getPlayerVipDays()) ? '<b><font color="green">Vip Account</font></b>' : '<b><font color="red">Not Vip Account</font></b>';

Modern Acc
Okay, Now how show if you use Modern Acc :wub:
Fist, in htdocs\system\application\views\Account.php

Before
PHP:
	echo "<center><a href='".WEBSITE."/index.php/account/changepassword'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/account/changepassword';\">Change password</button></a></center>";

Add this
PHP:
	echo $account->getPlayerVipDays() ? '</br ><center><b><font color=green>You have '.$account->getPlayerVipDays().' Vip Days Last.</font></b></center>' : '</br ><b><center>Not Vip Account</center></b>';

In htdocs\system\application\views\view_character.php
between this two lines

PHP:
	<tr><td width='30%'>Status</td><td><?php echo $status = ($player->isOnline()) ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?></td></tr>
	<tr><td width='30%'>Created</td><td><?php echo ago($created)." | ".UNIX_TimeStamp($created); ?></td></tr>

Add this
PHP:
	<tr><td width='30%'>Vip Status</td><td><?php echo $status = ($account->getPlayerVipDays()) ? "<font color='green'>Vip Account</font>" : "<font color='red'>Not Vip Account</font>"; ?></td></tr>

Done and close, You finish :rolleyes: but if you use signatures like this
201280782525.png


You can show too the vip status, is easy. Only in htdocs\injections\character_view\signature\signature.php

Below
PHP:
	// Account Status
	$MadGD->addText( 'Account Status:', $MadGD->textBold )->setPosition( 10, $row * $height );
	$MadGD->addText( ( $character->getAccount()->getPremDays() > 0 ? 'Premium Account' : 'Free Account' ) )->setPosition( ); $row++;

Add this
PHP:
	// Vip Status
	$MadGD->addText( 'Vip Status:', $MadGD->textBold )->setPosition( 10, $row * $height );
	$MadGD->addText( ( $character->getAccount()->getPlayerVipDays() > 0 ? 'Vip Account' : 'Not Vip Account' ) )->setPosition( ); $row++;

201281030282.png


This is all :thumbup:
 
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vipdays' in 'field list' in C:\xampp\htdocs\aleria\aleria\pot\OTS_Account.php on line 228
 
modern acc:
men I can not put this part I get the error I can put exactly as you plz

In htdocs\system\application\views\view_character.php
between this two lines
 
Back
Top