<?php
/**********************************************************************
Copyright (C) FrontAccounting, LLC.
- Released under the terms of the GNU Affero General Public License,
- AGPL, as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+ Released under the terms of the GNU General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security = 15;
-$path_to_root="..";
+$page_security = 'SA_PRINTPROFILE';
+$path_to_root = "..";
include($path_to_root . "/includes/session.inc");
include($path_to_root . "/admin/db/printers_db.inc");
include($path_to_root . "/includes/ui.inc");
{
// check if selected profile is used by any user
if ($name=='') return 0; // cannot delete system default profile
- $sql = "SELECT * FROM ".TB_PREF."users WHERE print_profile='$name'";
+ $sql = "SELECT * FROM ".TB_PREF."users WHERE print_profile=".db_escape($name);
$res = db_query($sql,'cannot check printing profile usage');
return db_num_rows($res);
}
div_start('controls');
if (get_post('profile_id') == '') {
- submit_center('submit', _("Add New Profile"), true, '', true);
+ submit_center('submit', _("Add New Profile"), true, '', 'default');
} else {
submit_center_first('submit', _("Update Profile"),
- _('Update printer profile'), true);
+ _('Update printer profile'), 'default');
submit_center_last('delete', _("Delete Profile"),
_('Delete printer profile (only if not used by any user)'), true);
}