noalyss Version-9
export.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21
22/*!\file
23 * \brief manage all the export to CSV or PDF
24 * act can be
25 *
26 */
27define ('ALLOWED',1);
28require_once '../include/constant.php';
29require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
30MaintenanceMode("block.html");
31
33require_once NOALYSS_INCLUDE.'/class/database.class.php';
34require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
35require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
39mb_internal_encoding("UTF-8");
40$g_user=new Noalyss_user($cn);
41$g_user->Check();
42$action=$g_user->check_dossier($gDossier);
45$action=$hi->get("act");
46
47if ( $action=='X' || $g_user->check_print($action)==0 )
48 {
49 echo alert(_('Accès interdit'));
50 redirect("do.php?".dossier::get());
51 exit();
52 }
53// get file and execute it
54
55 $prfile=$cn->get_value("select me_file from menu_ref where me_code=$1",array($action));
56 if ( $prfile == "" || !file_exists(NOALYSS_INCLUDE."/export/$prfile")) {
58 die (_('Export impossible'));
59 }
60 require_once NOALYSS_INCLUDE."/export/$prfile";
61 ?>
MaintenanceMode($p_file)
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message ...
Definition: ac_common.php:1663
set_language()
set the lang thanks the _SESSION['g_lang'] var.
Definition: ac_common.php:754
alert($p_msg, $buffer=false)
alert in javascript
Definition: ac_common.php:738
$input_from id
Definition: balance.inc.php:63
static connect()
manage the http input (get , post, request) and extract from an array
Class to manage the company parameter (address, name...)
$gDossier
Definition: export.php:36
global $cn
Definition: export.php:32
global $g_user
Definition: export.php:32
global $g_parameter
Definition: export.php:32
$hi
Definition: export.php:44
$action
Definition: export.php:42
if( $action=='X'|| $g_user->check_print($action)==0) $prfile
Definition: export.php:55
for($e=0; $e< count($afiche); $e++) exit
print
Type of printing.
redirect($p_string, $p_time=0)