This commit is contained in:
Gnieark 2016-06-09 20:32:48 +02:00
parent a1eb5e6f90
commit 500ff10ead

View File

@ -45,7 +45,7 @@ switch($_POST['act']){
//last char must be alphanum. Mail client should cut url if isn't. //last char must be alphanum. Mail client should cut url if isn't.
$secret.=rand_str(1, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); $secret.=rand_str(1, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890');
$sql = "INSERT INTO bots (name,game,url,description,active,date_inscription,validate_secret,author_email) VALUES( $sql = "INSERT INTO bots (name,game,url,description,unclean_description,active,date_inscription,validate_secret,author_email) VALUES(
'".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botName']))."', '".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botName']))."',
'".mysqli_real_escape_string($lnMysql,$_POST['botGame'])."', '".mysqli_real_escape_string($lnMysql,$_POST['botGame'])."',
'".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botURL']))."', '".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botURL']))."',
@ -53,6 +53,7 @@ switch($_POST['act']){
preg_replace('#^(http|https|mailto|ftp)://(([a-z0-9\/\.\?-_=\#@:~])*)#i','<a href="$1://$2">$1://$2</a>' preg_replace('#^(http|https|mailto|ftp)://(([a-z0-9\/\.\?-_=\#@:~])*)#i','<a href="$1://$2">$1://$2</a>'
,nl2br(htmlentities($_POST['botDescription']))) ,nl2br(htmlentities($_POST['botDescription'])))
)."', )."',
'".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botDescription']))."',
'0', '0',
NOW(), NOW(),
'".$secret."', '".$secret."',