diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index 16923e5ebbd..cb9e8ea09d4 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -50,48 +50,48 @@ $massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookkeepinglist'; -$search_mvt_num = GETPOSTINT('search_mvt_num'); +$search_mvt_num = GETPOST('search_mvt_num', 'alpha'); $search_doc_type = GETPOST("search_doc_type", 'alpha'); $search_doc_ref = GETPOST("search_doc_ref", 'alpha'); -$search_date_startyear = GETPOSTINT('search_date_startyear'); -$search_date_startmonth = GETPOSTINT('search_date_startmonth'); -$search_date_startday = GETPOSTINT('search_date_startday'); -$search_date_endyear = GETPOSTINT('search_date_endyear'); -$search_date_endmonth = GETPOSTINT('search_date_endmonth'); -$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endday = GETPOSTINT('search_date_endday'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); -$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); -$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); -$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); -$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); -$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); -$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); +$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); +$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); +$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); +$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); +$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); +$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); $search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); $search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); -$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); -$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); -$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); -$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); -$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); -$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); +$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); +$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); +$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); +$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); +$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); +$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); $search_date_modification_start = dol_mktime(0, 0, 0, $search_date_modification_startmonth, $search_date_modification_startday, $search_date_modification_startyear); $search_date_modification_end = dol_mktime(23, 59, 59, $search_date_modification_endmonth, $search_date_modification_endday, $search_date_modification_endyear); -$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); -$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); -$search_date_export_startday = GETPOSTINT('search_date_export_startday'); -$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); -$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); -$search_date_export_endday = GETPOSTINT('search_date_export_endday'); +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); -$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); -$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); -$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); -$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); -$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); -$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); $search_import_key = GETPOST("search_import_key", 'alpha'); diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index f776fb43b9e..a9931ab2ccb 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -53,7 +53,7 @@ $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookkeepinglist'; // Search Parameters -$search_mvt_num = GETPOST('search_mvt_num', 'intcomma'); +$search_mvt_num = GETPOST('search_mvt_num', 'alpha'); $search_doc_type = GETPOST("search_doc_type", 'alpha'); $search_doc_ref = GETPOST("search_doc_ref", 'alpha'); $search_date_startyear = GETPOSTINT('search_date_startyear'); @@ -154,7 +154,7 @@ $hookmanager->initHooks(array('bookkeepinglist')); $formaccounting = new FormAccounting($db); $form = new Form($db); -if (!in_array($action, array('delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOSTINT('page') == '' && !GETPOSTINT('noreset') && $user->hasRight('accounting', 'mouvements', 'export')) { +if (!in_array($action, array('delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'alpha') == '' && !GETPOSTINT('noreset') && $user->hasRight('accounting', 'mouvements', 'export')) { if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values') && !GETPOST('search_accountancy_code_start')) { $query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $query .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1"; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index bb549a3bc6d..338ca12e5f0 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -52,29 +52,29 @@ if ($type == 'sub') { $context_default = 'bookkeepingbyaccountlist'; } $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : $context_default; -$search_date_startyear = GETPOSTINT('search_date_startyear'); -$search_date_startmonth = GETPOSTINT('search_date_startmonth'); -$search_date_startday = GETPOSTINT('search_date_startday'); -$search_date_endyear = GETPOSTINT('search_date_endyear'); -$search_date_endmonth = GETPOSTINT('search_date_endmonth'); -$search_date_endday = GETPOSTINT('search_date_endday'); +$search_date_startyear = GETPOSTINT('search_date_startyear'); +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); +$search_date_startday = GETPOSTINT('search_date_startday'); +$search_date_endyear = GETPOSTINT('search_date_endyear'); +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); +$search_date_endday = GETPOSTINT('search_date_endday'); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); -$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); -$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); -$search_date_export_startday = GETPOSTINT('search_date_export_startday'); -$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); -$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); -$search_date_export_endday = GETPOSTINT('search_date_export_endday'); +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); -$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); -$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); -$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); -$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); -$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); -$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); $search_import_key = GETPOST("search_import_key", 'alpha'); @@ -91,7 +91,7 @@ if ($search_accountancy_code_end == - 1) { } $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); $search_label_operation = GETPOST('search_label_operation', 'alpha'); -$search_mvt_num = GETPOSTINT('search_mvt_num'); +$search_mvt_num = GETPOST('search_mvt_num', 'alpha'); $search_direction = GETPOST('search_direction', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_debit = GETPOST('search_debit', 'alpha');