|
|
|
@ -3,6 +3,29 @@ function get_arenas_list(){
|
|
|
|
|
include (__DIR__."/arenas_lists.php");
|
|
|
|
|
return $arenas;
|
|
|
|
|
}
|
|
|
|
|
function(get_Bots_Array($arena,$activeOnly=true){
|
|
|
|
|
global $lnMysql;
|
|
|
|
|
//$bots[]=array("name" => $name, "url" =>$url);
|
|
|
|
|
|
|
|
|
|
if($activeOnly){
|
|
|
|
|
$addClause=" AND active='1'";
|
|
|
|
|
}else{
|
|
|
|
|
$addClause="";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$rs=mysqli_query($lnMysql,
|
|
|
|
|
"SELECT id,name,url,description FROM bots WHERE game='".mysqli_real_escape_string($lnMysql,$arena)."'".$addClause);
|
|
|
|
|
$bots=array();
|
|
|
|
|
while($r=mysqli_fetch_row($rs)){
|
|
|
|
|
$bots[]=array(
|
|
|
|
|
'id' => $r[0],
|
|
|
|
|
'name'=> $r[1],
|
|
|
|
|
'url' => $r[2],
|
|
|
|
|
'description' => $r[3]
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
return $bots;
|
|
|
|
|
}
|
|
|
|
|
function rand_str($length = 32, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'){
|
|
|
|
|
|
|
|
|
|
$chars_length = (strlen($chars) - 1);
|
|
|
|
@ -14,6 +37,7 @@ function rand_str($length = 32, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkl
|
|
|
|
|
}
|
|
|
|
|
return $string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function xd_check_input($id=1){
|
|
|
|
|
/*
|
|
|
|
|
*On génére un hash aléatoire qui sera
|
|
|
|
|