ça avance lentement. A debug

This commit is contained in:
gnieark 2015-12-03 22:21:33 +01:00
parent a9e95a8007
commit e358fc3e53
4 changed files with 3918 additions and 4 deletions

View File

@ -64,7 +64,8 @@ aside{
}
form textarea, form input, form select {width:40%;}
form input[type=checkbox], fieldset input[type=radio] { width:15px; }
form input[type=checkbox], form input[type=radio] { width:15px; }
form input[type=submit]{width: 100%;}
form label {
float:left;
width:40%;

View File

@ -15,7 +15,7 @@ switch($_POST['act']){
$rs=mysqli_query($lnMysql,
"SELECT 1
FROM bots
WHERE name='".mysqli_real_escape_string($lnMysql,$_POST['botname'])."'
WHERE name='".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botname']))."'
AND game='".mysqli_real_escape_string($lnMysql,$_POST['game'])."';");
if(mysqli_num_rows($rs) > 0){
$alerts.="Un bot existant pour ce je porte le même nom\n";
@ -40,12 +40,32 @@ switch($_POST['act']){
//BotDescription=> a voir
if($alerts <>""){
}else{
//enregistrer le bot et envoyer un email pour la validation
$secret=rand_str(8, '$-_.+!*\'(),ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890');
$rs=mysqli_query($lnMysql,
"INSERT INTO bots (name,game,url,description,active,date_inscription,validate_secret) VALUES
( '".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botname']))."',
'".mysqli_real_escape_string($lnMysql,$_POST['botGame'])."',
'".mysqli_real_escape_string($lnMysql,htmlentities($_POST['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."'"
);
require_once (__DIR__."/class.phpmailer.php");
}

3884
src/class.phpmailer.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,3 +5,12 @@ $mysqlParams=array(
'pass' => '',
'database'=>''
);
$smtpParams=array(
//exemple for gmail
'auth' => true,
'secure' => 'tls',
'host' => 'smtp.gmail.com',
'port' => 587,
'username' => "email@gmail.com",
'pass' => ""
);