Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
bdc.bdcloud.fr /
accountancy /
class /
Delete
Unzip
Name
Size
Permission
Date
Action
accountancycategory.class.php
24.46
KB
-rwxr-x---
2023-04-04 15:50
accountancyexport.class.php
61.99
KB
-rwxr-x---
2023-04-04 15:50
accountancyimport.class.php
4.45
KB
-rwxr-x---
2023-04-04 15:50
accountancysystem.class.php
3.88
KB
-rwxr-x---
2023-04-04 15:50
accountingaccount.class.php
32.77
KB
-rwxr-x---
2023-04-04 15:50
accountingjournal.class.php
38.74
KB
-rwxr-x---
2023-04-04 15:50
bookkeeping.class.php
71.01
KB
-rwxr-x---
2023-04-04 15:50
lettering.class.php
29.85
KB
-rwxr-x---
2023-04-04 15:50
Save
Rename
<?php /* * Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr> * Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com> * Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2017 André Schild <a.schild@aarboard.ch> * Copyright (C) 2020 Guillaume Alexandre <guillaume@tag-info.fr> * * This program 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 3 of the License, or * (at your option) any later version. * * This program 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 this program. If not, see <https://www.gnu.org/licenses/>. */ /** * \file htdocs/accountancy/class/accountancyimport.class.php * \ingroup Accountancy (Double entries) * \brief Class with methods for accountancy import */ /** * Manage the different format accountancy import */ class AccountancyImport { /** * @var DoliDB Database handler */ public $db; /** * Constructor * * @param DoliDb $db Database handler */ public function __construct(DoliDB $db) { $this->db = $db; } /** * Clean amount * * @param array $arrayrecord Array of read values: [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string), [fieldpos+1]... * @param array $listfields Fields list to add * @param int $record_key Record key * @return mixed Value */ public function cleanAmount(&$arrayrecord, $listfields, $record_key) { $value_trim = trim($arrayrecord[$record_key]['val']); return floatval($value_trim); } /** * Clean value with trim * * @param array $arrayrecord Array of read values: [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string), [fieldpos+1]... * @param array $listfields Fields list to add * @param int $record_key Record key * @return mixed Value */ public function cleanValue(&$arrayrecord, $listfields, $record_key) { return trim($arrayrecord[$record_key]['val']); } /** * Compute amount * * @param array $arrayrecord Array of read values: [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string), [fieldpos+1]... * @param array $listfields Fields list to add * @param int $record_key Record key * @return mixed Value */ public function computeAmount(&$arrayrecord, $listfields, $record_key) { // get fields indexes $field_index_list = array_flip($listfields); if (isset($field_index_list['debit']) && isset($field_index_list['credit'])) { $debit_index = $field_index_list['debit']; $credit_index = $field_index_list['credit']; $debit = floatval($arrayrecord[$debit_index]['val']); $credit = floatval($arrayrecord[$credit_index]['val']); if (!empty($debit)) { $amount = $debit; } else { $amount = $credit; } return "'" . $this->db->escape(abs($amount)) . "'"; } return "''"; } /** * Compute direction * * @param array $arrayrecord Array of read values: [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string), [fieldpos+1]... * @param array $listfields Fields list to add * @param int $record_key Record key * @return mixed Value */ public function computeDirection(&$arrayrecord, $listfields, $record_key) { $field_index_list = array_flip($listfields); if (isset($field_index_list['debit'])) { $debit_index = $field_index_list['debit']; $debit = floatval($arrayrecord[$debit_index]['val']); if (!empty($debit)) { $sens = 'D'; } else { $sens = 'C'; } return "'" . $this->db->escape($sens) . "'"; } return "''"; } }