[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 58/119: Missing file
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 58/119: Missing file |
Date: |
Mon, 26 Oct 2020 18:27:20 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 0b5ea0c2cef93b277df421d444b4750fbe1bac42
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Wed Oct 7 11:45:34 2020 +0200
Missing file
---
include/ajax/ajax_save_card_option.php | 60 ++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/include/ajax/ajax_save_card_option.php
b/include/ajax/ajax_save_card_option.php
new file mode 100644
index 0000000..6a6b36c
--- /dev/null
+++ b/include/ajax/ajax_save_card_option.php
@@ -0,0 +1,60 @@
+<?php
+
+/*
+ * This file is part of NOALYSS.
+ *
+ * PhpCompta is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpCompta 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
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PhpCompta; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+// Copyright (2002-2020) Author Dany De Bontridder <danydb@noalyss.eu>
+
+if (!defined('ALLOWED'))
+ die('Appel direct ne sont pas permis');
+
+/**
+ * @file
+ * @brief save option of card into action_person_option
+ */
+
+try {
+ $ap_value=$http->post("ap_value","array",[]);
+ $ap_id=$http->post("ap_id","array",[]);
+ $cor_id=$http->post("cor_id","array",[]);
+ $fiche_id=$http->post("f_id");
+ $ag_id=$http->post("ag_id");
+ $action_person_id=$http->post("action_person_id");
+} catch (Exception $ex) {
+ record_log("ASCO01".$ex->getMessage().$ex->getTraceAsString());
+ return;
+}
+
+/// If cannot write we stop it
+if ( ! $g_user->can_write_action($ag_id)) {
+ record_log("ASCO02 Security ");
+}
+
+$nb=count($ap_value);
+// nothing to save
+if ($nb == 0) return;
+
+for ($i=0;$i<$nb; $i++) {
+ if ( $ap_id[$i] == -1 ) {
+ $cn->exec_sql("INSERT INTO public.action_person_option (ap_value,
contact_option_ref_id, action_person_id)
+ VALUES($1, $2, $3) ",
+ [$ap_value[$i],$cor_id[$i],$action_person_id]);
+ } else {
+ $cn->exec_sql("UPDATE public.action_person_option SET ap_value=$1
WHERE ap_id=$2)",
+ [$ap_value[$i],$action_person_id]);
+ }
+}
\ No newline at end of file
- [Noalyss-commit] [noalyss] 34/119: doc, (continued)
- [Noalyss-commit] [noalyss] 34/119: doc, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 27/119: Bug : correct search remove ~, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 42/119: Bug : cannot duplicate ACH, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 45/119: ManageTable : add tbody and thead , fix javascript error, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 44/119: Fix: predefined operation with overflow for details, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 49/119: tag - cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 47/119: Tag and Group Tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 53/119: NEW Security : add tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 56/119: Cosmetic for cells for tag and contact, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 58/119: Missing file,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 72/119: Tag Limit column size , replace input_switch by check_box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 61/119: Search Card Paginate, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return a string instead, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 81/119: Search card :typo, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 90/119: select_box cosmetic font, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENTS, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 93/119: Follow-up new column "Status", Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 98/119: Follow up add followup action, Dany De Bontridder, 2020/10/26
- Prev by Date:
[Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0)
- Next by Date:
[Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT
- Previous by thread:
[Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0)
- Next by thread:
[Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT
- Index(es):