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
Add this
Next to
Add this
Next to
Add this
After to
Add this
Yep! Now, You have the public fuction (getPlayerVipDays) :thumbup:
Gesior ACC
Now, How show in accounts and characters
Htdocs/Accountmanagement.php
Add after to
Add this
Next to
Add this
Htdocs/Characters.PHP
After to
Add this
Modern Acc
Okay, Now how show if you use Modern Acc :wub:
Fist, in htdocs\system\application\views\Account.php
Before
Add this
In htdocs\system\application\views\view_character.php
between this two lines
Add this
Done and close, You finish but if you use signatures like this
You can show too the vip status, is easy. Only in htdocs\injections\character_view\signature\signature.php
Below
Add this
This is all :thumbup:
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 but if you use signatures like this
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++;
This is all :thumbup: