noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
extension.raw.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 this file includes the called plugin. It check first
24 * the security. Load several javascript files
25 */
26require_once '../include/constant.php';
27require_once NOALYSS_INCLUDE.'/class/database.class.php';
28require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
29require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
30require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
31require_once NOALYSS_INCLUDE.'/class/extension.class.php';
32require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
33require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
34require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
35
36MaintenanceMode("block.html");
37
39$cn=Dossier::connect();
41
43$cn=Dossier::connect();
44$g_user=new Noalyss_user($cn);
45$g_user->check();
46$only_plugin=$g_user->check_dossier(dossier::id());
47
48
51
52if ( $ext->search($http->request("plugin_code")) != -1 )
53 {
54 /* security */
55 if ( !isset ($_SESSION[SESSION_KEY.'g_user']) || $ext->can_request($_SESSION[SESSION_KEY.'g_user']) == 0 )
56 {
57 exit();
58 }
59 define ('ALLOWED',True);
60 if ( LOGINPUT)
61 {
62 $file_loginput=fopen($_ENV['TMP'].'/plugin-export-'.$ext->me_code.'-'.$_SERVER['REQUEST_TIME'].'.php','a+');
63 fwrite ($file_loginput,"<?php \n");
64 fwrite ($file_loginput,'//@description: export '.$ext->me_code."\n");
65 fwrite($file_loginput, '$_GET='.var_export($_GET,true));
66 fwrite($file_loginput,";\n");
67 fwrite($file_loginput, '$_POST='.var_export($_POST,true));
68 fwrite($file_loginput,";\n");
69 fwrite($file_loginput, '$_POST[\'gDossier\']=$gDossierLogInput;');
70 fwrite($file_loginput,"\n");
71 fwrite($file_loginput, '$_GET[\'gDossier\']=$gDossierLogInput;');
72 fwrite($file_loginput,"\n");
73 fwrite($file_loginput,' $_REQUEST=array_merge($_GET,$_POST);');
74 fwrite($file_loginput,"\n");
75 fclose($file_loginput);
76 }
77 /* call the ajax script */
78 require_once NOALYSS_PLUGIN.DIRECTORY_SEPARATOR.dirname(trim($ext->getp('me_file'))).DIRECTORY_SEPARATOR.'raw.php';
79 }
80else
81 {
82 alert(j(_("Cette extension n'existe pas ")));
83 exit();
84 }
85?>
MaintenanceMode($p_file)
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message ...
set_language()
set the lang thanks the _SESSION['g_lang'] var.
j($p_string)
escape correctly php string to javascript
Definition ac_common.php:96
alert($p_msg, $buffer=false)
alert in javascript
global $g_parameter
global $g_user
if no group available , then stop
_("actif, passif,charge,...")
$_GET['qcode']
manage the extension, it involves the table extension
manage the http input (get , post, request) and extract from an array
Class to manage the company parameter (address, name...)
$_POST['ac']
Definition do.php:312
for($e=0; $e< count($afiche); $e++) exit