[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 92/107: Code : remove direct use of $_GET
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 92/107: Code : remove direct use of $_GET |
Date: |
Mon, 26 Aug 2019 10:32:07 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit f32ef6ea3959674bee1d1c3e986ec4254481a962
Author: Dany De Bontridder <address@hidden>
Date: Tue Aug 20 10:28:23 2019 +0200
Code : remove direct use of $_GET
---
html/ajax_misc.php | 84 ++++++++++++++++++++++++++++--------------------------
1 file changed, 44 insertions(+), 40 deletions(-)
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index 9129176..c209d9d 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -317,30 +317,32 @@ switch ($op)
return;
break;
- case "remove_anc":
- if ($g_user->check_module('ANCODS') == 0)
- exit();
- $cn->exec_sql("delete from operation_analytique where
oa_group=$1", array($_GET['oa']));
- break;
- case "rm_stock":
- if ($g_user->check_module('STOCK') == 0)
- exit();
- require_once NOALYSS_INCLUDE.'/constant.security.php';
- $cn->exec_sql('delete from stock_goods where sg_id=$1',
array($s_id));
- $html = escape_xml($s_id);
- header('Content-type: text/xml; charset=UTF-8');
- printf('{"d_id":"%s"}', $s_id);
- exit();
- break;
- //--------------------------------------------------
- // get the last date of a ledger
- case 'lastdate':
- require_once NOALYSS_INCLUDE.'/class/acc_ledger_fin.class.php';
- $ledger = new Acc_Ledger_Fin($cn, $_GET['p_jrn']);
- $html = $ledger->get_last_date();
- $html = escape_xml($html);
- header('Content-type: text/xml; charset=UTF-8');
- echo <<<EOF
+ case "remove_anc":
+ if ($g_user->check_module('ANCODS') == 0)
+ exit();
+ $oa_group=$http->get("oa","number");
+ $cn->exec_sql("delete from operation_analytique where oa_group=$1",
array($oa_group));
+ break;
+ case "rm_stock":
+ if ($g_user->check_module('STOCK') == 0)
+ exit();
+ require_once NOALYSS_INCLUDE.'/constant.security.php';
+ $cn->exec_sql('delete from stock_goods where sg_id=$1', array($s_id));
+ $html = escape_xml($s_id);
+ header('Content-type: text/xml; charset=UTF-8');
+ printf('{"d_id":"%s"}', $s_id);
+ exit();
+ break;
+ //--------------------------------------------------
+ // get the last date of a ledger
+ case 'lastdate':
+ require_once NOALYSS_INCLUDE.'/class/acc_ledger_fin.class.php';
+ $p_jrn=$http->get('p_jrn','number');
+ $ledger = new Acc_Ledger_Fin($cn, $p_jrn);
+ $html = $ledger->get_last_date();
+ $html = escape_xml($html);
+ header('Content-type: text/xml; charset=UTF-8');
+ echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
<code>e_date</code>
@@ -348,12 +350,13 @@ switch ($op)
</data>
EOF;
- break;
- case 'bkname':
- require_once NOALYSS_INCLUDE.'/class/acc_ledger_fin.class.php';
- $ledger = new Acc_Ledger_Fin($cn, $_GET['p_jrn']);
- $html = $ledger->get_bank_name();
- $html = escape_xml($html);
+ break;
+ case 'bkname':
+ require_once NOALYSS_INCLUDE.'/class/acc_ledger_fin.class.php';
+ $p_jrn=$http->get('p_jrn','number');
+ $ledger = new Acc_Ledger_Fin($cn, $p_jrn);
+ $html = $ledger->get_bank_name();
+ $html = escape_xml($html);
header('Content-type: text/xml; charset=UTF-8');
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
@@ -364,16 +367,17 @@ EOF;
EOF;
break;
// display new calendar
- case 'cal':
- require_once NOALYSS_INCLUDE.'/class/calendar.class.php';
- /* others report */
- $cal = new Calendar();
- $cal->set_periode($per);
- $notitle=$http->get("notitle", "string",0);
- $html = "";
- $html = $cal->display($http->get('t'),$notitle);
- $html = escape_xml($html);
- header('Content-type: text/xml; charset=UTF-8');
+ case 'cal':
+ require_once NOALYSS_INCLUDE.'/class/calendar.class.php';
+ /* others report */
+ $cal = new Calendar();
+ $per=$http->get("per","number");
+ $cal->set_periode($per);
+ $notitle=$http->get("notitle", "string",0);
+ $html = "";
+ $html = $cal->display($http->get('t'),$notitle);
+ $html = escape_xml($html);
+ header('Content-type: text/xml; charset=UTF-8');
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
- [Noalyss-commit] [noalyss] 74/107: New : manage_table_sql has new function (input_custom and display_row_custom) for handling special data, (continued)
- [Noalyss-commit] [noalyss] 74/107: New : manage_table_sql has new function (input_custom and display_row_custom) for handling special data, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 73/107: Cosmetic & bug fix for SELECT_BOX, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 28/107: Debug : add function tracedebug, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 32/107: Cosmetic : font new symbol Cosmetic : CSS padding for div.menu2 a.mtitle, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 58/107: javascript Add new function json_response, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 52/107: Adapt Unit Test, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 76/107: fixup! Improve message progress bar + translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 78/107: Purpose is to contain all the prepared query called from different locations, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 83/107: Task#1734 New : Add PRINTTVA to have a summary of VAT by ledger, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 93/107: Documentation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 92/107: Code : remove direct use of $_GET,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 39/107: Code cleaning : split database into database (for noalyss) and databasecore , with the functions, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 98/107: New :: function Icon_Action::tips for short comment New : Icon_Action::unlock, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 84/107: Task #1734 Upgrade patch for PRINTTVA, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 46/107: Code Cleaning split PDF into PDF_Core and PDF, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 105/107: fixup! New Task 1728: Aide à l'encodage - Journaux négatifs (note de crédit), Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 106/107: cosmetic, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 64/107: Add demo for fontello, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 75/107: Task #0001731: Moyen de paiement, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 81/107: Task #0001733: Impression moyen paiement, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 56/107: New function PDF_Core:is_fill add documentation, Dany De Bontridder, 2019/08/26