From b5043b766616a82f7f8b15c9fbc90fc1cb36d214 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 3 Jul 2007 12:16:15 +0000 Subject: [PATCH] Nouveau fichier --- htdocs/telephonie/facturation/cdr-import.php | 82 ++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 htdocs/telephonie/facturation/cdr-import.php diff --git a/htdocs/telephonie/facturation/cdr-import.php b/htdocs/telephonie/facturation/cdr-import.php new file mode 100644 index 00000000000..2cedb05a4f0 --- /dev/null +++ b/htdocs/telephonie/facturation/cdr-import.php @@ -0,0 +1,82 @@ + + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +require("./pre.inc.php"); +require_once DOL_DOCUMENT_ROOT.'/telephonie/facturation/FacturationImportCdr.class.php'; + +$dir = $conf->telephonie->dir_output."/cdr/atraiter/" ; + +$handle=opendir($dir); + +$files = array(); + +$var=true; +while (($file = readdir($handle))!==false) +{ + if (is_file($dir.'/'.$file)) + array_push($files, $file); +} +closedir($handle); + +if (!$user->rights->telephonie->facture->ecrire) accessforbidden(); + +llxHeader(); + +/* + * Sécurité accés client + */ +if ($user->societe_id > 0) +{ + $action = ''; + $socid = $user->societe_id; +} + + +/* + * + * + * + */ +print_barre_liste("Importation des fichiers CDR", $page, "files.php", "", $sortfield, $sortorder, '', $num); + +print ''; +print ''; +print ''; + +print "\n"; + +$var=True; + +$obj = new FacturationImportCdr($db); +$obj->Import(); + +foreach ($obj->messages as $message) +{ + $var=!$var; + print ""; + print ''; +} +print "
Message
'.$message.'
"; + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?>