From ad33503cc0a4bb5d3b7ae338fdf98106c79fed72 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Sun, 27 Dec 2015 16:50:10 +0100 Subject: [PATCH] edit bots --- html/index.php | 21 +++++++++++++++++++++ src/editBot.php | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) 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 @@ -

EditBot

\ No newline at end of file + +

EditBot

+
+ +

+

+

+

+

+

+

+
\ No newline at end of file