Plugins  LAST
 All Data Structures Files Functions Variables Pages
index.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 /* $Revision$ */
20 
21 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
22 
23 /*!\file
24  * \brief main file for tools
25  */
27 $version_plugin=SVNINFO;
28 Extension::check_version(6910);
29 
30 /*
31  * load javascript
32  */
33 ob_start();
34 require_once('tools_javascript.js');
35 $j=ob_get_contents();
36 ob_end_clean();
37 echo create_script($j);
38 
39 $url='?'.dossier::get()."&plugin_code=".$_REQUEST['plugin_code']."&ac=".$_REQUEST['ac'];
40 $array=array (
41  array($url.'&sa=op',_('Opération'),_('Changer poste comptable ou fiche'),1),
42  array($url.'&sa=pj',_('Pièce'),_('Rénuméroter des pièces justificative'),2),
43  array($url.'&sa=exe',_('Exercice'),_('Ajouter des années comptables'),3),
44  array($url.'&sa=exp',_('Export'),_('Exporter les opérations'),4)
45  );
46 
47 $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"";
48 $def=0;
49 switch($sa)
50  {
51  case 'op':
52  $def=1;
53  break;
54  case 'pj':
55  $def=2;
56  break;
57  case 'exe':
58  $def=3;
59  break;
60  case 'exp':
61  $def=4;
62  break;
63  }
64 
65 $cn=Dossier::connect();
66 // show menu
67 echo '<div style="float:right"><a class="mtitle" style="font-size:140%" href="http://wiki.noalyss.eu/doku.php?id=outil_comptable" target="_blank">Aide</a>'.
68 '<span style="font-size:0.8em;color:red;display:inline">vers:SVNINFO</span>'.
69 '</div>';
70 
71 echo ShowItem($array,'H','mtitle ','mtitle ',$def,' style="width:80%;margin-left:10%;border-collapse: separate;border-spacing: 5px;"');
72 require_once('include/tool_function.php');
73 echo '<div class="content" style="width:80%;margin-left:10%">';
74 // include the right file
75 if ($def==1)
76  {
77  require_once('include/operation.inc.php');
78  exit();
79  }
80 
81 /* Receipt */
82 if ($def==2)
83  {
84  require_once('include/receipt.inc.php');
85  exit();
86  }
87 /* Exercice */
88  if ($def == 3 )
89  {
90  require_once 'include/tools_exercice.inc.php';
91  exit();
92  }
93  /** export */
94  if ($def == 4 )
95  {
96  require_once 'include/export_operation.inc.php';
97  exit();
98  }
99 ?>
global $version_plugin
Definition: index.php:22
$_REQUEST['sa']
Definition: index.php:68
$cn
Definition: index.php:42
$sa
Definition: index.php:67
$def
Definition: index.php:69
$j
Definition: index.php:36
$array
Definition: index.php:42
$url
Definition: index.php:40