Nutella Messages : 5
|
Donc : Pack_bonus.php <?php define('INSIDE' , true); define('INSTALL' , false);
$xgp_root = './'; include($xgp_root . 'extension.inc.php'); include($xgp_root . 'common.' . $phpEx);
$Mode = $_GET['mode']; $Points_Bonus = intval($user['points_bonus']); $Galaxy = intval($planetrow['galaxy']); $System = intval($planetrow['system']); $Planet = intval($planetrow['planet']); $IdUser = intval($user['id']);
$parse = array();
$parse = array();
if( $Mode == 'ressources' && $Points_Bonus >= 40) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '40' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 40;
$Qry = " UPDATE {{table}} SET `metal` = `metal` + '60000000', `crystal` = `crystal` + '30000000', `deuterium` = `deuterium` + '10000000' WHERE `galaxy` = '{$Galaxy}' AND `system` = '{$System}' AND `planet` = '{$Planet}';"; doquery($Qry, 'planets');
$Message = "Vous venez de dépenser 40 points Bonus pour l'achat d'un pack ressources."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php");
}
if( $Mode == 'ressource1' && $Points_Bonus >= 15) {
$Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '15' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 15;
$Qry = " UPDATE {{table}} SET `metal` = `metal` + '10000000' WHERE `galaxy` = '{$Galaxy}' AND `system` = '{$System}' AND `planet` = '{$Planet}';"; doquery($Qry, 'planets');
$Message = "Vous venez de dépenser 15 point Bonus pour l'achat d'un pack ressource Métal."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php"); }
if( $Mode == 'ressource2' && $Points_Bonus >= 15) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '15' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 15;
$Qry = " UPDATE {{table}} SET `crystal` = `crystal` + '7000000' WHERE `galaxy` = '{$Galaxy}' AND `system` = '{$System}' AND `planet` = '{$Planet}';"; doquery($Qry, 'planets');
$Message = "Vous venez de dépenser 15 points Bonus pour l'achat d'un pack ressource Cristal."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php"); }
if( $Mode == 'ressource3' && $Points_Bonus >= 15) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '15' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 15;
$Qry = " UPDATE {{table}} SET `deuterium` = `deuterium` + '3500000' WHERE `galaxy` = '{$Galaxy}' AND `system` = '{$System}' AND `planet` = '{$Planet}';"; doquery($Qry, 'planets');
$Message = "Vous venez de dépenser 15 points Bonus pour l'achat d'un pack ressource Deutérium."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php"); }
if( $Mode == 'ressource5' && $Points_Bonus >= 30) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '30' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 30;
$Qry = " UPDATE {{table}} SET `darkmatter` = `darkmatter` + '25000' WHERE `id` = '{$IdUser}';"; doquery($Qry, 'users');
$Message = "Vous venez de dépenser 30 points Bonus pour l'achat d'un pack Anti-matiere."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php"); }
if( $Mode == 'techno' && $Points_Bonus >= 45) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '45' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 45;
$Qry = " UPDATE {{table}} SET `military_tech` = `military_tech` + '1', `defence_tech` = `defence_tech` + '1', `shield_tech` = `shield_tech` + '1' WHERE `id` = '{$IdUser}';"; doquery($Qry, 'users');
$Message = "Vous venez de dépenser 45 points Bonus pour l'achat d'un pack Technologies."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php"); }
if( $Mode == 'flotte' && $Points_Bonus >= 100) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '100' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 100;
$Qry = " UPDATE {{table}} SET `big_ship_cargo` = `big_ship_cargo` + '7000', `battle_ship` = `battle_ship` + '5000', `recycler` = `recycler` + '3000' WHERE `galaxy` = '{$Galaxy}' AND `system` = '{$System}' AND `planet` = '{$Planet}';"; doquery($Qry, 'planets'); $Message = "Vous venez de dépenser 100 points Bonus pour l'achat d'un pack Flotte."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php");
}
if ($Mode == 'builds' && $Points_Bonus >= 60) { $Qry = " UPDATE {{table}} SET `points_bonus` = `points_bonus` - '60' WHERE `id` = '{$IdUser}';";
doquery($Qry, 'users');
$Points_Bonus -= 60;
$Qry = " UPDATE {{table}} SET `metal_mine` = `metal_mine` + '1', `crystal_mine` = `crystal_mine` + '1', `deuterium_sintetizer` = `deuterium_sintetizer` + '1' WHERE `galaxy` = '{$Galaxy}' AND `system` = '{$System}' AND `planet` = '{$Planet}';"; doquery($Qry, 'planets'); $Message = "Vous venez de dépenser 60 points Bonus pour l'achat d'un pack Flotte."; $Titre = "Vous disposez de {$Points_Bonus} points bonus."; message ($Message, $Titre, "achatbonus.php"); } $Message = "Vous n'avez pas assez de points bonus, vous disposez de {$Points_Bonus} points bonus."; $Titre = "Erreur"; message ($Message, $Titre, "achatbonus.php"); display(parsetemplate(gettemplate('pack_bonus'), $parse), 'PackBonus', false, '',false, false); ?>
Achatbonus.php <?php define('INSIDE' , true); define('INSTALL' , false);
$xgp_root = './'; include($xgp_root . 'extension.inc.php'); include($xgp_root . 'common.' . $phpEx);
$parse['user'] = htmlentities($user['username']); $parse['darkmatter'] = intval ($user['darkmatter']); $parse['points'] = intval($user['points_bonus']);
display(parsetemplate(gettemplate('achatbonus'), $parse), false, '',false, false); ?> J'imagine que vous n'avez pas besoin de bonus.php donc je ne la met pas Pack.php <?php
define('INSIDE' , true); define('INSTALL' , false);
$xgp_root = './'; include($xgp_root . 'extension.inc.php'); include($xgp_root . 'common.' . $phpEx);; include($xgp_root . 'includes/functions/SortUserPlanets.' . $phpEx); $CodeAllopass = $_GET['RECALL']; $CodeAllopassBDD = mysql_real_escape_string($_GET['RECALL']); $CodeAllopassEncode = urlencode( $CodeAllopass );
if ( trim($CodeAllopass) == "" && strlen(trim($CodeAllopass)) != 8 ) message("Erreur dans la récupération du code Allopass", "Information", "bonus.php", 5); $time = time(); $Qry = <<<SQL DELETE FROM {{table}} WHERE `time_update` < '{$time}'; SQL; doquery($Qry, 'code');
$Qry = <<<SQL SELECT COUNT(*) AS `nbre` FROM {{table}} WHERE `CodeAllopass` = '{$CodeAllopassBDD}'; SQL; $Rep = doquery($Qry, 'code', true); if ($Rep['nbre'] > 0) message("Vous avez déjà rentré ce code", "Information", "bonus.php", 5); if ( ini_get('allow_url_fopen') == 0 ) message("Votre serveur ne peut pas ouvrir des fichiers distants", "Erreur");
$Auth = urlencode( "252521/997315/4605315" ); $r = @file( "http://payment.allopass.com/api/checkcode.apu?code={$CodeAllopassEncode}&auth={$Auth}" );
if( substr( $r[0],0,2 ) != "OK" ) { message("Code Allopass erroné", "Information", "bonus.php", 5); } if( substr( $r[0],0,2 ) == "OK" ) { $time = time() + 600; $Qry = <<<SQL INSERT INTO {{table}} SET `CodeAllopass` = '{$CodeAllopassBDD}', `time_update` = '{$time}'; SQL;
doquery($Qry, 'code'); $Qry = <<<SQL UPDATE {{table}} SET `points_bonus` = `points_bonus` + '10' WHERE `id` = {$user['id']}; SQL;
doquery($Qry,'users'); $user['points_bonus']++;
message ('Votre compte a ete crédité de dix points bonus en plus. Merci','Vous disposez de '. intval($user['points_bonus']) .' points bonus',"game.php?page=overview", 5); } ?>
Et enfin Achatbonus.tpl <div style=" height:100%; overflow:auto;"> <meta name="generator" content="Namo WebEditor(Trial)"> <br> <center> <br> <br> Merci d'envoyer un mail ou un message privé à l'administrateur contenant votre/vos code(s) Allopass <b>non utilisé(s)</b> pour recevoir vos points bonus. <h2><tr><th><center><a href="https://payment.allopass.com/buy/buy.apu?ids=252521&idd=997315">Pour Plus de Points Cliquez Ici !</a></h2><br> <table border="0" width="436" style="border: 1px solid #E5E3FF;" cellpadding="0" cellspacing="0"> <td class="c"> Vous disposez a ce jour de : {points} Points bonus.</td> <table border="0" width="436" height="411" style="border: 1px solid #E5E3FF;" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" width="436"> <table width="436" border="0" cellpadding="0" cellspacing="0"> <tr height="27"> <td width="127" align="left" bgcolor="#D0D0FD"> <a href="http://www.allopass.com/" target="_blank"><img src="http://payment.allopass.com/imgweb/common/access/logo.gif" width="127" height="27" border="0" alt="Allopass"></a> </td> <td width="309" align="right" bgcolor="#D0D0FD"> <font style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000084; font-style : none; font-weight: bold; text-decoration: none;"> Solution de micro paiement sécurisé<br>Secure micro payment solution </font> </td> </tr> <tr height="30"> <td colspan="2" width="436" align="center" valign="middle" bgcolor="#F1F0FF"> <font style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; color: #000084; font-style : none; font-weight: bold; text-decoration: none;"> Pour acheter ce contenu, insérez le code obtenu en cliquant sur le drapeau de votre pays </font> <br> <font style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; color: #5E5E90; font-style : none; font-weight: bold; text-decoration: none;"> To buy this content, insert your access code obtained by clicking on your country flag </font> </td> </tr> <tr height="2"><td colspan="2" width="436" bgcolor="#E5E3FF"></td></tr> </table> </td> </tr> <tr height="347"> <td width="284"> <iframe name="APsleft" width="284" height="347" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://payment.allopass.com/acte/scripts/iframe/left.apu?ids=252521&idd=997315&lang=fr"></iframe> </td> <td width="152"> <iframe name="APsright" width="152" height="347" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://payment.allopass.com/acte/scripts/iframe/right.apu?ids=252521&idd=997315&lang=fr"></iframe> </td> </tr> <tr height="5"><td colspan="2" bgcolor="#D0D0FD" width="436"></td></tr> </table>
</table> <br>
<br> <table border="0" width="436" style="border: 1px solid #E5E3FF;" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" class="c">Liste des bonus disponibles:</td> </tr> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=ressources" target="{mf}"> <img border="0" src="images/bonus/dollars.jpg" " align="top" width="120" height="120"> </a></td> <td class="c">Le pack ressources vous permet d'acheter: <br><br> 60 000 000 Metal,<br> 30 000 000 Cristal, <br> 7 500 000 Deuterium <br><br>Cout: 40 points bonus</td> <br> <tr> <td width="120" class="c"> <img border="0" src="images/bonus/deplacementplanetaire.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack deplacement planetaire:<br><br> vous permet de changer de milieu tout en gardant votre planete et ses caracteristiques: changement de coordonnees et de position<br>Cout: 30 points bonus</td> </tr> <tr> <td width="120" class="c"> <img border="0" src="images/bonus/terraformation.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack terraformation vous permet d'acheter: <br><br>100 cases de plus sur la planète de votre choix<br>Cout: 30 points bonus</td> </tr> <center>NOTE : les deux pack terraformation et deplacement planetaires seront effectifs apres l'envoi a l'administrateur</center> <center>du code allopass NON UTILISE et des coordonnees de la planete concernee.</center> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=ressource1" target="{mf}"> <img border="0" src="images/bonus/metal.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack ressource metal vous permet d'acheter: <br><br> 10 000 000 metal<br>Cout: 15 points bonus</td> </tr> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=ressource2" target="{mf}"> <img border="0" src="images/bonus/cristal.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack ressource cristal vous permet d'acheter: <br><br> 7 000 000 cristal<br>Cout: 15 points bonus</td> </tr> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=ressource3" target="{mf}"> <img border="0" src="images/bonus/deuter.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack ressource deuterium vous permet d'acheter: <br><br> 3 500 000 Deuterium<br>Cout: 15 points bonus</td> </tr> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=ressource5" target="{mf}"> <img border="0" src="images/bonus/DMaterie.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack anti-matiere vous permet d'acheter: <br><br> 25 000 Anti-matiere<br>Cout: 30 points bonus</td> </tr> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=techno" target="{mf}"> <img border="0" src="images/bonus/techno.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack technologie vous permet d'acheter: <br><br> 1 technologie Arme,<br> 1 technologie Bouclier, <br> 1 technologie Blindage <br><br>Cout: 45 points bonus</td> </tr> <tr> <td width="120" class="c"><a href="pack_bonus.php?mode=flotte" target="{mf}"> <img border="0" src="images/bonus/flotte.jpg" align="top" width="120" height="120"> </a></td> <td class="c">Le pack flotte vous permet d'acheter: <br><br> 7.000 Grands Transporteurs,<br> 5.000 Vaisseaux de Batailles,<br> 3.000 Recycleurs <br><br>Cout: 100 points bonus</td> </tr> <td width="120" class="c"><a href="pack_bonus.php?mode=builds" target="{mf}"> <img border="0" src="images/bonus/batiment.jpg" align="top" width="120" height="120"></td> <td class="c">Le Pack batiment vous permet d'acheter : <br><br> + 1 Niveaux de Mine de métal !!!, <br> + 1 Niveaux de Mine de cristal !!!, <br> + 1 Niveaux de Mine de deuterium!!! !!!!!! <br><br> Cout: 80 points Bonus</td> </table> <blink></blink> </center> |