fera holy kina
Ubuntu 10.04
- Joined
- Jan 27, 2009
- Messages
- 192
- Reaction score
- 5
my system and the VIP's Kekox
and now trying to get in vip Gesior more of the following problem
I want to add day
and this time adding a premium account
Anyone know how to solve example when I buy one day of VIP
Sorry, for my bad Inglesh.
and now trying to get in vip Gesior more of the following problem
I want to add day
and this time adding a premium account
Anyone know how to solve example when I buy one day of VIP
VIP Days added!
1 days of VIP days added to the account of player Jackzinho for 1 premium points from your account.
16:09 You have 1309028962 vip days left.
PHP:
if(isset($buy_offer['id'])) { //item exist in database
if($user_premium_points >= $buy_offer['points']) {
if(check_name($buy_name)) {
$buy_player = new OTS_Player();
$buy_player->find($buy_name);
if($buy_player->isLoaded()) {
$buy_player_account = $buy_player->getAccount();
if($_SESSION['viewed_confirmation_page'] == 'yes' && $_POST['buy_confirmed'] == 'yes') {
if($buy_offer['type'] == 'pacc') {
$player_vipdays = $buy_player_account->getCustomField('vipdays');
$player_lastlogin = $buy_player_account->getCustomField('lastday');
$save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
$SQL->query($save_transaction);
if($player_vipdays > 0)
$buy_player_account->setCustomField('vipdays', $player_vipdays + $buy_offer['days'] * 86400);
else
$buy_player_account->setCustomField('vipdays', time() + $buy_offer['days'] * 86400);
$buy_player_account->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
$user_premium_points = $user_premium_points - $buy_offer['points'];
if ($player_vip_days >= 1) {
}
$main_content .= '<center><h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of VIP days added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>';
}
Sorry, for my bad Inglesh.