ça avance lentement. A debug
This commit is contained in:
parent
a9e95a8007
commit
e358fc3e53
|
@ -64,7 +64,8 @@ aside{
|
||||||
}
|
}
|
||||||
|
|
||||||
form textarea, form input, form select {width:40%;}
|
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 {
|
form label {
|
||||||
float:left;
|
float:left;
|
||||||
width:40%;
|
width:40%;
|
||||||
|
|
26
src/act.php
26
src/act.php
|
@ -15,7 +15,7 @@ switch($_POST['act']){
|
||||||
$rs=mysqli_query($lnMysql,
|
$rs=mysqli_query($lnMysql,
|
||||||
"SELECT 1
|
"SELECT 1
|
||||||
FROM bots
|
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'])."';");
|
AND game='".mysqli_real_escape_string($lnMysql,$_POST['game'])."';");
|
||||||
if(mysqli_num_rows($rs) > 0){
|
if(mysqli_num_rows($rs) > 0){
|
||||||
$alerts.="Un bot existant pour ce je porte le même nom\n";
|
$alerts.="Un bot existant pour ce je porte le même nom\n";
|
||||||
|
@ -40,13 +40,33 @@ switch($_POST['act']){
|
||||||
|
|
||||||
//BotDescription=> a voir
|
//BotDescription=> a voir
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($alerts <>""){
|
if($alerts <>""){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//enregistrer le bot et envoyer un email pour la validation
|
//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
3884
src/class.phpmailer.php
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -5,3 +5,12 @@ $mysqlParams=array(
|
||||||
'pass' => '',
|
'pass' => '',
|
||||||
'database'=>''
|
'database'=>''
|
||||||
);
|
);
|
||||||
|
$smtpParams=array(
|
||||||
|
//exemple for gmail
|
||||||
|
'auth' => true,
|
||||||
|
'secure' => 'tls',
|
||||||
|
'host' => 'smtp.gmail.com',
|
||||||
|
'port' => 587,
|
||||||
|
'username' => "email@gmail.com",
|
||||||
|
'pass' => ""
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user