This commit is contained in:
Gnieark 2016-06-09 14:25:58 +02:00
parent dee44e7507
commit 62c51a3c7b

View File

@ -3,7 +3,7 @@
//Del unvalidated bots //Del unvalidated bots
mysqli_query($lnMysql, "DELETE FROM bots WHERE active='0' AND TIMESTAMPDIFF(DAY, NOW(), date_inscription) > 2"); mysqli_query($lnMysql, "DELETE FROM bots WHERE active='0' AND TIMESTAMPDIFF(DAY, NOW(), date_inscription) > 2");
mysqli_query($lnMysql, "DELETE FROM bot_modifs WHERE TIMESTAMPDIFF(DAY, NOW(), date_modification) > 2"); mysqli_query($lnMysql, "DELETE FROM bot_modifs WHERE TIMESTAMPDIFF(DAY, NOW(), date_modification) > 2");
print_r($_POST);
switch($_POST['act']){ switch($_POST['act']){
case "addBot": case "addBot":
//verifier les variables "botName""botGame""botURL""email""botDescription" //verifier les variables "botName""botGame""botURL""email""botDescription"
@ -140,19 +140,7 @@ switch($_POST['act']){
$botUrl = $_POST['botURL']; $botUrl = $_POST['botURL'];
} }
echo " INSERT INTO bots_modifs( name, game, url, description, date_modification, validate_secret, author_email) VALUES (
'".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botName']))."',
'".mysqli_real_escape_string($lnMysql,$_POST['botGame'])."',
'".mysqli_real_escape_string($lnMysql,$botUrl)."',
'".mysqli_real_escape_string($lnMysql,
preg_replace('#^(http|https|mailto|ftp)://(([a-z0-9\/\.\?-_=\#@:~])*)#i','<a href="$1://$2">$1://$2</a>'
,nl2br(htmlentities($_POST['botDescription'])))
)."',
NOW(),
'".$secret."',
'".mysqli_real_escape_string($lnMysql,$_POST['email'])."')";
mysqli_query($lnMysql, mysqli_query($lnMysql,
" INSERT INTO bots_modifs( name, game, url, description, date_modification, validate_secret, author_email) VALUES ( " INSERT INTO bots_modifs( name, game, url, description, date_modification, validate_secret, author_email) VALUES (
'".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botName']))."', '".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botName']))."',