Changeset:
        aa651180c556
        
https://sourceforge.net/p/mrbs/hg-code/ci/aa651180c5568e9993ef60ab57d22ff9d0d8b0b6
Author:
        John Beranek <jbera...@users.sourceforge.net>
Date:
        Sat Sep 17 18:41:48 2016 +0100
Log message:

Parameterised admin.php

diffstat:

 web/admin.php |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 47c5817a8209 -r aa651180c556 web/admin.php
--- a/web/admin.php     Sat Sep 17 18:39:45 2016 +0100
+++ b/web/admin.php     Sat Sep 17 18:41:48 2016 +0100
@@ -43,7 +43,7 @@
 // Get the details we need for this area
 if (isset($area))
 {
-  $res = sql_query("SELECT area_name, custom_html FROM $tbl_area WHERE 
id=$area LIMIT 1");
+  $res = sql_query("SELECT area_name, custom_html FROM $tbl_area WHERE id=? 
LIMIT 1", array($area));
   if (! $res)
   {
     trigger_error(sql_error(), E_USER_WARNING);
@@ -211,7 +211,7 @@
   echo "<div id=\"room_form\">\n";
   if (isset($area))
   {
-    $res = sql_query("SELECT * FROM $tbl_room WHERE area_id=$area ORDER BY 
sort_key");
+    $res = sql_query("SELECT * FROM $tbl_room WHERE area_id=? ORDER BY 
sort_key", array($area));
     if (! $res)
     {
       trigger_error(sql_error(), E_USER_WARNING);

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to