include($path_to_root . "/admin/db/printers_db.inc");
include($path_to_root . "/includes/ui.inc");
-page(_("Printing Profiles"));
+page(_($help_context = "Printing Profiles"));
$selected_id = get_post('profile_id','');
{
// 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=".db_escape($name);
- $res = db_query($sql,'cannot check printing profile usage');
- return db_num_rows($res);
+ return key_in_foreign_table($name, 'users', 'print_profile');
}
//-------------------------------------------------------------------------------------------
if ( get_post('submit'))
label_cell($descr == '' ? '???<sup>1)</sup>' : _($descr));
$_POST['Prn'.$rep] = isset($prints[$rep]) ? $prints[$rep] : '';
echo '<td>';
- printers_list('Prn'.$rep, null,
+ echo printers_list('Prn'.$rep, null,
$rep == '' ? _('Browser support') : _('Default'));
echo '</td>';
if ($descr == '') $unkn = 1;