X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fmanage%2Fwork_centres.php;h=716bb81886eca35c3be3eada781fc19618b9e2de;hb=6989100b74130784a524b1f941b3ae73f30f663a;hp=769d1b4b04c40f91ac6c53563ea5bd3237f82687;hpb=0b253e5e0d23400838d3bfb4f27fb3fb2637b3ab;p=fa-stable.git diff --git a/manufacturing/manage/work_centres.php b/manufacturing/manage/work_centres.php index 769d1b4b..716bb818 100644 --- a/manufacturing/manage/work_centres.php +++ b/manufacturing/manage/work_centres.php @@ -9,8 +9,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 3; -$path_to_root="../.."; +$page_security = 'SA_WORKCENTRES'; +$path_to_root = "../.."; include($path_to_root . "/includes/session.inc"); page(_("Work Centres")); @@ -56,7 +56,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."bom WHERE workcentre_added='$selected_id'"; + $sql= "SELECT COUNT(*) FROM ".TB_PREF."bom WHERE workcentre_added=".db_escape($selected_id); $result = db_query($sql, "check can delete work centre"); $myrow = db_fetch_row($result); if ($myrow[0] > 0) @@ -65,7 +65,7 @@ function can_delete($selected_id) return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."wo_requirements WHERE workcentre='$selected_id'"; + $sql= "SELECT COUNT(*) FROM ".TB_PREF."wo_requirements WHERE workcentre=".db_escape($selected_id); $result = db_query($sql, "check can delete work centre"); $myrow = db_fetch_row($result); if ($myrow[0] > 0)