X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fprinters.php;h=4c8ad144021e4b670a474469454ec81739dadcef;hb=8ea6c4dd0d9b31b3456d012b0c94339b801bee0c;hp=1b6d063b9a96e70b4ac9fdd7c995845de9236a7e;hpb=b17df731b4bb055c2fdd568bc4be9e5caa0ee07b;p=fa-stable.git diff --git a/admin/printers.php b/admin/printers.php index 1b6d063b..4c8ad144 100644 --- a/admin/printers.php +++ b/admin/printers.php @@ -1,15 +1,15 @@ . + See the License here . ***********************************************************************/ -$page_security = 15; +$page_security = 'SA_PRINTERS'; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -59,7 +59,7 @@ if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN print_profiles - $sql= "SELECT COUNT(*) FROM ".TB_PREF."print_profiles WHERE printer = '$selected_id'"; + $sql= "SELECT COUNT(*) FROM ".TB_PREF."print_profiles WHERE printer = ".db_escape($selected_id); $result = db_query($sql,"check printers relations failed"); $myrow = db_fetch_row($result); if ($myrow[0] > 0) @@ -68,7 +68,7 @@ if ($Mode == 'Delete') } else { - $sql="DELETE FROM ".TB_PREF."printers WHERE id='$selected_id'"; + $sql="DELETE FROM ".TB_PREF."printers WHERE id=".db_escape($selected_id); db_query($sql,"could not delete printer definition"); display_notification(_('Selected printer definition has been deleted')); } @@ -142,7 +142,7 @@ text_row(_("Timeout").':', 'tout', null, 5, 5); end_table(1); -submit_add_or_update_center($selected_id == -1, '', true); +submit_add_or_update_center($selected_id == -1, '', 'both'); end_form();