From 7f88684495b018b1e77fde4f2025cfb36d406a4f Mon Sep 17 00:00:00 2001
From: gnieark
Date: Tue, 8 Dec 2015 23:56:33 +0100
Subject: [PATCH] Validation ajout d'un bot
---
src/act.php | 2 +-
src/addBot.php | 21 ++++++++++++++++++++-
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/act.php b/src/act.php
index 22a4036..04ec6ae 100644
--- a/src/act.php
+++ b/src/act.php
@@ -76,7 +76,7 @@ switch($_POST['act']){
$mail->Subject = 'BotsArena';
$mail->addAddress($_POST['email']);
//$mail->msgHTML=$lang['E_MAIL_ADD_BOT_INTRO_HTML'].''.$siteParam['BASEURL'].'validateBot/'.$secret.'
'.$lang['E_MAIL_ADD_BOT_SIGNATURE_HTML'];
- $mail->Body = $lang['E_MAIL_ADD_BOT_INTRO']."\n".$siteParam['BASEURL'].'validateBot/'.$secret."\n".$lang['E_MAIL_ADD_BOT_SIGNATURE'];
+ $mail->Body = $lang['E_MAIL_ADD_BOT_INTRO']."\n".$siteParam['BASEURL'].'/p/addBot/'.$secret."\n".$lang['E_MAIL_ADD_BOT_SIGNATURE'];
if (!$mail->send()) {
error(500,"Mailer Error: " . $mail->ErrorInfo);
} else {
diff --git a/src/addBot.php b/src/addBot.php
index 30d96ac..c885382 100644
--- a/src/addBot.php
+++ b/src/addBot.php
@@ -1 +1,20 @@
-Add Bot
\ No newline at end of file
+Add Bot
+Ce bot a déjà été activé
";
+ }else{
+ mysqli_query($lnMysql, "UPDATE bots SET active='0' WHERE id='".$r[0]."'");
+ echo "Merci! Votre Bot vient d'être activé, RDV sur son arène pour le faire combattre.
";
+ }
+ }else{
+ //problem
+ echo "Paramètre incorrect, désolé.
";
+ }
+}else{
+ //problem
+ echo "Paramètre incorrect, désolé.
";
+}