⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Data
/
Edit File: Outlookcsv.php
<?php /** * Copyright 1999-2017 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @author Jan Schneider <jan@horde.org> * @author Chuck Hagenbuch <chuck@horde.org> * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL * @package Data */ /** * Horde_Data implementation for Outlook comma-separated data (CSV). * * @author Jan Schneider <jan@horde.org> * @author Chuck Hagenbuch <chuck@horde.org> * @category Horde * @copyright 1999-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL * @package Data */ class Horde_Data_Outlookcsv extends Horde_Data_Csv { /** * Builds a CSV file from a given data structure and returns it as a * string. * * @param array $data A two-dimensional array containing the data * set. * @param boolean $header If true, the rows of $data are associative * arrays with field names as their keys. * @param array $export_mapping TODO * * @return string The CSV data. */ public function exportData($data, $header = false, $export_mapping = array()) { if (!is_array($data) || (count($data) == 0)) { return ''; } $export = ''; $eol = "\r\n"; $head = array_keys(current($data)); if ($header) { foreach ($head as $key) { if (!empty($key)) { if (isset($export_mapping[$key])) { $key = $export_mapping[$key]; } $export .= '"' . $key . '"'; } $export .= ','; } $export = substr($export, 0, -1) . $eol; } foreach ($data as $row) { foreach ($head as $key) { $cell = $row[$key]; if (!empty($cell) || $cell === 0) { $cell = preg_replace("/\"/", "\"\"", $cell); $export .= '"' . $cell . '"'; } $export .= ','; } $export = substr($export, 0, -1) . $eol; } return $export; } }
Simpan