MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_SRECURRENT';
+$path_to_root = "../..";
include($path_to_root . "/includes/session.inc");
include($path_to_root . "/includes/ui.inc");
if ($use_date_picker)
$js .= get_js_date_picker();
-page(_("Recurrent Invoices"), false, false, "", $js);
+page(_($help_context = "Recurrent Invoices"), false, false, "", $js);
simple_page_mode(true);
monthly=".input_num('monthly', 0).",
begin='".date2sql($_POST['begin'])."',
end='".date2sql($_POST['end'])."'
- WHERE id = '$selected_id'";
+ WHERE id = ".db_escape($selected_id);
$note = _('Selected recurrent invoice has been updated');
}
else
if ($cancel_delete == 0)
{
- $sql="DELETE FROM ".TB_PREF."recurrent_invoices WHERE id='" . $selected_id . "'";
+ $sql="DELETE FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($selected_id);
db_query($sql,"could not delete recurrent invoice");
display_notification(_('Selected recurrent invoice has been deleted'));
//-------------------------------------------------------------------------------------------------
function get_sales_group_name($group_no)
{
- $sql = "SELECT description FROM ".TB_PREF."groups WHERE id = $group_no";
+ $sql = "SELECT description FROM ".TB_PREF."groups WHERE id = ".db_escape($group_no);
$result = db_query($sql, "could not get group");
$row = db_fetch($result);
return $row[0];
alt_table_row_color($k);
label_cell($myrow["description"]);
- label_cell(get_customer_trans_view_str(30, $myrow["order_no"]));
+ label_cell(get_customer_trans_view_str(ST_SALESORDER, $myrow["order_no"]));
if ($myrow["debtor_no"] == 0)
{
label_cell("");
{
if ($Mode == 'Edit') {
//editing an existing area
- $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices WHERE id='$selected_id'";
+ $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($selected_id);
$result = db_query($sql,"could not get recurrent invoice");
$myrow = db_fetch($result);
end_table(1);
-submit_add_or_update_center($selected_id == -1, '', true);
+submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();