diff --git a/admin/alter_table.php b/admin/alter_table.php index 53be938..a6610c4 100644 --- a/admin/alter_table.php +++ b/admin/alter_table.php @@ -1,4 +1,5 @@ exec($strSQL); diff --git a/admin/dump.php b/admin/dump.php index 27e6ce8..47129dd 100644 --- a/admin/dump.php +++ b/admin/dump.php @@ -15,6 +15,9 @@ if (!$boolLogin) { header("Location: login.php"); } + $strDistrict=$_SESSION['district']; + $sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'"; + require("../config.db.php"); require ("../config.php"); @@ -28,7 +31,9 @@ // Query $strSQL="SELECT l.id as lid,l.*,adr.* - FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY created_at ASC"; + FROM location l LEFT JOIN address adr ON l.id=adr.loc_id + WHERE $sqlDistrict + ORDER BY created_at ASC"; $query = $db->query($strSQL); // Fetch the first row diff --git a/admin/export.php b/admin/export.php index 6fa6931..e67ae6c 100644 --- a/admin/export.php +++ b/admin/export.php @@ -15,6 +15,9 @@ if (!$boolLogin) { header("Location: login.php"); } + $strDistrict=$_SESSION['district']; + $sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'"; + require ("../config.php"); ?> @@ -37,7 +40,7 @@