diff --git a/html/index.php b/html/index.php index 18afcf6..8342d2b 100644 --- a/html/index.php +++ b/html/index.php @@ -162,6 +162,27 @@ if(isset($_GET['arena'])){ break; case "editBot": + if(!isset($_GET['params'])){ + error(404,"Page does not exists"); + die; + } + $rs=mysqli_query($lnMysql, + "SELECT id,name,game,url,description,date_inscription + FROM bots + WHERE id='".mysqli_real_escape_string($lnMysql,$_GET['params'])."' + AND active='1'"); + if(!$r=mysqli_fetch_row($rs)){ + error(404,"Page doesn't exist"); + die; + } + $theBot=array( + 'id' => $r[0], + 'name' => $r[1], + 'game' => $r[2], + 'url' => $r[3], + 'description' => $r[4], + 'date_inscription' => $r[5] + ); $siteTitle="Modifier un bot"; $siteDescription="bots arena "; $permitIndex=false; diff --git a/src/editBot.php b/src/editBot.php index c688725..53bded3 100644 --- a/src/editBot.php +++ b/src/editBot.php @@ -1 +1,39 @@ -