svn+ssh://danydb@svn/svn/phpcompta/branches/rel500
........
r2906 | danydb | 2010-01-27 15:16:08 +0100 (Wed, 27 Jan 2010) | 2 lines
Cosmetic for html popup
........
r2907 | danydb | 2010-01-27 15:28:03 +0100 (Wed, 27 Jan 2010) | 5 lines
Fix typo translation
Fix Bug : cannot save extension in IE, probably because the same scripts are included several times
........
r2908 | danydb | 2010-01-28 13:56:37 +0100 (Thu, 28 Jan 2010) | 5 lines
Fix Bug In getNodeText when retrieving data for Internet Explorer,
it fails if the xmlNode.firstChild.nodeValue does not contains data.
It is directly set to undefined
........
r2909 | danydb | 2010-01-29 12:20:24 +0100 (Fri, 29 Jan 2010) | 2 lines
Generate invoice : update the comment of the entry only if there were no comment
........
r2910 | danydb | 2010-01-29 19:39:11 +0100 (Fri, 29 Jan 2010) | 6 lines
Improve User
============
Status only plugin means that the user can use only the plugin and can't access to
anything else.
........
r2911 | danydb | 2010-01-29 19:42:38 +0100 (Fri, 29 Jan 2010) | 1 line
Bug import Dexia
........
r2912 | danydb | 2010-01-31 16:24:22 +0100 (Sun, 31 Jan 2010) | 3 lines
For insert_jrnx, the desc is now in the function, we don't need anymore to update after inserting
........
r2913 | danydb | 2010-01-31 16:33:55 +0100 (Sun, 31 Jan 2010) | 4 lines
Fix bug : cannot see operation in quick_writing
cause : the p_action must be set to ALL, it wasn't for quick_writing
........
r2914 | danydb | 2010-02-02 14:52:37 +0100 (Tue, 02 Feb 2010) | 4 lines
Code cleaning
Bug : in ledger of sale, we have twice the possibility to add~ or generate document, and only for invoice (type 4)
Solution : fix the function Acc_Ledger_Purchase::extra_info (type of document = 10), remove extra code
........
r2915 | danydb | 2010-02-05 01:01:11 +0100 (Fri, 05 Feb 2010) | 4 lines
Improve : search_card you can also find a card thanks is tva_num
Documentation doxygen improved
........
r2916 | danydb | 2010-02-05 11:18:36 +0100 (Fri, 05 Feb 2010) | 2 lines
when inserting into ledger_sold the test to check the attach was wrong
........
r2917 | danydb | 2010-02-05 14:45:33 +0100 (Fri, 05 Feb 2010) | 2 lines
Extension : add the possibility to use ajax
........
r2918 | danydb | 2010-02-06 14:25:22 +0100 (Sat, 06 Feb 2010) | 1 line
rewrite the function encodeJSON, hide and show for doxygen
........
r2919 | danydb | 2010-02-06 14:26:07 +0100 (Sat, 06 Feb 2010) | 1 line
remove error where _SESSION is expired
........
r2920 | danydb | 2010-02-06 14:26:49 +0100 (Sat, 06 Feb 2010) | 1 line
In ITva_Select add the display
........
r2921 | danydb | 2010-02-06 14:27:47 +0100 (Sat, 06 Feb 2010) | 1 line
Cosmetic
........
r2922 | danydb | 2010-02-06 14:27:49 +0100 (Sat, 06 Feb 2010) | 1 line
IPopup add a new property drag to make the ipopup dragguable or not
........
r2923 | danydb | 2010-02-06 14:35:28 +0100 (Sat, 06 Feb 2010) | 5 lines
Middle of payment
=================
Feature : add or remove middle of payment
........
r2924 | danydb | 2010-02-06 18:17:15 +0100 (Sat, 06 Feb 2010) | 7 lines
Card
----
A same card can now have 2 different sides (debit or credit)
usefull to have only one card for a customer and a supplier
........
r2925 | danydb | 2010-02-06 18:23:03 +0100 (Sat, 06 Feb 2010) | 1 line
Add the sql script for the double accounting
........
r2926 | danydb | 2010-02-06 19:29:29 +0100 (Sat, 06 Feb 2010) | 2 lines
Update documentation
........
r2927 | danydb | 2010-02-06 20:37:12 +0100 (Sat, 06 Feb 2010) | 4 lines
Fiche_def
========
Permit to have 2 accouting as class_base
........
r2928 | danydb | 2010-02-06 20:56:00 +0100 (Sat, 06 Feb 2010) | 1 line
Bug : FK from stock prevent the removal of a card
........
r2929 | danydb | 2010-02-06 21:14:10 +0100 (Sat, 06 Feb 2010) | 1 line
removeless useless test
........
r2930 | danydb | 2010-02-07 00:55:03 +0100 (Sun, 07 Feb 2010) | 1 line
Improve appearance extension
........
r2931 | danydb | 2010-02-07 00:56:28 +0100 (Sun, 07 Feb 2010) | 2 lines
remove debug
........
r2932 | danydb | 2010-02-07 01:16:51 +0100 (Sun, 07 Feb 2010) | 1 line
Improve appearance extension
........
r2933 | danydb | 2010-02-07 01:19:08 +0100 (Sun, 07 Feb 2010) | 1 line
Improve appearance extension
........
r2934 | danydb | 2010-02-07 01:30:31 +0100 (Sun, 07 Feb 2010) | 1 line
Improve appearance extension
........
r2935 | danydb | 2010-02-07 02:36:25 +0100 (Sun, 07 Feb 2010) | 1 line
Version PHP5.3 : split is obsolete and replace by explode
........
r2936 | danydb | 2010-02-07 04:56:17 +0100 (Sun, 07 Feb 2010) | 1 line
remove owner
........
r2937 | danydb | 2010-02-08 22:34:07 +0100 (Mon, 08 Feb 2010) | 1 line
typo
........
r2938 | danydb | 2010-02-08 22:34:28 +0100 (Mon, 08 Feb 2010) | 1 line
Start translation for Dutch
........
485 lines
15 KiB
PHP
485 lines
15 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of PhpCompta.
|
|
*
|
|
* PhpCompta 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.
|
|
*
|
|
* PhpCompta 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 PhpCompta; if not, write to the Free Software
|
|
* Foundation, Inshowc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
/*!\file
|
|
* \brief Nearly all the menu are here, some of them returns a HTML string, others echo
|
|
* directly the result.
|
|
*/
|
|
|
|
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
|
/* $Revision$ */
|
|
|
|
require_once("class_idate.php");
|
|
require_once("class_icard.php");
|
|
require_once("class_ispan.php");
|
|
|
|
|
|
/*!
|
|
* \brief Show all the available folder for the users
|
|
* at the login page. For the special case 'E'
|
|
* go directly to extension and bypasse the dashboard
|
|
* \param $p_user user
|
|
* \param $p_admin 1 if admin
|
|
*
|
|
* \return table in HTML
|
|
*
|
|
*/
|
|
function u_ShowDossier($p_user,$p_admin,$p_filtre="")
|
|
{
|
|
$p_array=GetAvailableFolder($p_user,$p_admin,$p_filtre);
|
|
|
|
$result="";
|
|
if ( $p_array == 0 ) return $result." * Aucun dossier *";
|
|
$cn=new Database();
|
|
$user=new User($cn);
|
|
|
|
|
|
$result.="<TABLE style=\"width:75%;border-width:0px;border-collapse:collapse;\">";
|
|
for ($i=0;$i<sizeof($p_array);$i++) {
|
|
|
|
$id=$p_array[$i]['dos_id'];
|
|
$name= $p_array[$i]['dos_name'];
|
|
$desc=$p_array[$i]['dos_description'];
|
|
if ( $i%2 == 0)
|
|
$tr="odd";
|
|
else $tr="even";
|
|
if ( $user->check_dossier($id)!='P') {
|
|
$target="access.php?gDossier=$id";
|
|
} else {
|
|
$target="extension.php?gDossier=$id";
|
|
}
|
|
|
|
$result.="<TR class=\"$tr\">";
|
|
|
|
$result.="<TD class=\"$tr\">";
|
|
$result.="<A class=\"dossier\" HREF=\"$target\">";
|
|
$result.=$id." <B>".h($name)."</B>";
|
|
$result.="</A>";
|
|
$result.="</TD>";
|
|
$desc=($desc=="")?"<i>Aucune description</i>":h($desc);
|
|
$desc="<A class=\"dossier\" HREF=\"$target\">$desc</A>";
|
|
$result.="<TD class=\"$tr\">".$desc;
|
|
$result.="</TD>";
|
|
$result.="</TR>";
|
|
|
|
}
|
|
$result.="</TABLE>";
|
|
return $result;
|
|
}
|
|
/*!
|
|
* \brief Get all the available folders
|
|
* for the users, checked with the security
|
|
*
|
|
* \param $p_user user login
|
|
* \param $p_admin 1 if admin
|
|
* \return array containing
|
|
* - ac_dossier.dos_id
|
|
* - ac_dossier.dos_name
|
|
* - ac_dossier.dos_description
|
|
*
|
|
*/
|
|
function GetAvailableFolder($p_user,$p_admin,$p_filter="")
|
|
{
|
|
|
|
$filter="";
|
|
if ($p_admin==0) {
|
|
// show only available folders
|
|
// if user is not an admin
|
|
$sql="select distinct dos_id,dos_name,dos_description from ac_users
|
|
natural join jnt_use_dos
|
|
natural join ac_dossier
|
|
join priv_user on ( priv_jnt=jnt_id)
|
|
where use_active=1
|
|
and use_login='$p_user'
|
|
and priv_priv != 'X' and dos_name ilike '%$p_filter%'
|
|
order by dos_name";
|
|
|
|
} else {
|
|
$sql="select distinct dos_id,dos_name,dos_description from ac_dossier
|
|
where dos_name ilike '%$p_filter%' order by dos_name";
|
|
}
|
|
require_once('class_database.php');
|
|
$cn=new Database();
|
|
|
|
$Res=$cn->exec_sql($sql);
|
|
$max=Database::num_row($Res);
|
|
if ( $max == 0 ) return 0;
|
|
|
|
for ($i=0;$i<$max;$i++) {
|
|
$array[]=Database::fetch_array($Res,$i);
|
|
}
|
|
return $array;
|
|
}
|
|
/*!
|
|
* \brief show the top menu for the user profile
|
|
* and highight the selected one
|
|
* \param p_high what to hightlight, by default it is autodetected
|
|
* but sometimes it must be given. Default value=""
|
|
*
|
|
* \return string
|
|
*
|
|
*/
|
|
function ShowMenuCompta($p_high="")
|
|
{
|
|
require_once('class_database.php');
|
|
|
|
// find our current menu
|
|
$default=basename($_SERVER['PHP_SELF']);
|
|
|
|
switch ($default) {
|
|
case "user_jrn.php":
|
|
$default.="?show&".dossier::get();
|
|
break;
|
|
}
|
|
|
|
if ( $p_high !== "" ) $default=$p_high;
|
|
|
|
if ( isset($_REQUEST['p_action']))
|
|
{
|
|
switch ($_REQUEST['p_action'] ) {
|
|
case 'impress':
|
|
$default=5;
|
|
break;
|
|
case 'fiche':
|
|
$default=6;
|
|
break;
|
|
case 'quick_writing':
|
|
$default=4;
|
|
break;
|
|
case 'gl':
|
|
$default=0;
|
|
break;
|
|
case 'ven':
|
|
$default=1;
|
|
break;
|
|
case 'client':
|
|
$default=1;
|
|
break;
|
|
case 'ach':
|
|
case 'fournisseur':
|
|
$default=2;
|
|
break;
|
|
case 'fin':
|
|
$default=3;
|
|
break;
|
|
|
|
}
|
|
}
|
|
echo_debug('user_menu.php',__LINE__,'defaut is '.$default);
|
|
|
|
$str_dossier=dossier::get();
|
|
$p_array=array(
|
|
array("compta.php?p_action=gl&".$str_dossier ,_("Grand Livre"),_("Grand livre : toutes les opérations"),0),
|
|
array("compta.php?p_action=ven&".$str_dossier ,_("Vente"),_("Journal de vente / produit"),1),
|
|
array("compta.php?p_action=ach&".$str_dossier,_("Dépense"),_("Journaux de dépense, d'achat"),2 ),
|
|
array("compta.php?p_action=fin&".$str_dossier,_("Financier"),_("Journaux financiers: les banques, la caisse"),3),
|
|
array('compta.php?p_action=quick_writing&'.$str_dossier,_('Ecriture directe'),_('Ecriture directe dans les journaux'),4),
|
|
|
|
array("compta.php?p_action=impress&".$str_dossier,_("Impression"),_("Impression"),5),
|
|
array("compta.php?p_action=fiche&".$str_dossier,_("Fiche"),_("Ajouter, modifier ou effacer des fiches"),6),
|
|
array("user_advanced.php?".$str_dossier,_("Avancé"),_("Opérations délicates"),7),
|
|
);
|
|
|
|
$result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"');
|
|
$str_dossier=dossier::get();
|
|
$r="";
|
|
$r.=menu_tool("user_compta.php");
|
|
$r.='<div style="float:left;background-color:#879ED4;width:100%;">';
|
|
$r.=$result;
|
|
$r.='</div>';
|
|
|
|
return $r;
|
|
}
|
|
|
|
|
|
/*!
|
|
**************************************************
|
|
* \brief build the menu of user_advanced.php
|
|
*
|
|
* \param $default
|
|
*
|
|
* \return the menu
|
|
*/
|
|
function ShowMenuAdvanced($default="") {
|
|
$str_dossier=dossier::get();
|
|
// Show the left menu
|
|
$left_menu=ShowItem(array(
|
|
//('rapprt.php','Rapprochement'),
|
|
|
|
array('user_advanced.php?'.$str_dossier.'&p_action=preod',_('Ecritures definies'),"",9),
|
|
array('user_advanced.php?p_action=periode&'.$str_dossier,_('Periode'),_("Gestion des periodes"),2),
|
|
array('user_advanced.php?p_action=central&'.$str_dossier,_('Centralise'),_("Centralisation"),3),
|
|
|
|
array('compta.php?p_action=stock&'.$str_dossier,'Stock',_("Gestion des stocks"),5),
|
|
array('user_advanced.php?p_action=defreport&'.$str_dossier,_('Rapport'),_("Rapport"),6),
|
|
array('import.php?'.$str_dossier,_('Import Banque'),_("Banque"),7),
|
|
array('user_advanced.php?p_action=ouv&'.$str_dossier,_('Ecriture ouverture'),"",8),
|
|
array('user_advanced.php?p_action=verif&'.$str_dossier,_('Vérification'),"",10)
|
|
),
|
|
'H',"mtitle","mtitle",$default);
|
|
$r='<div class="u_subtmenu">'.$left_menu."</div>";
|
|
return $r;
|
|
}
|
|
/*!
|
|
* \brief Show the menu for the card management
|
|
*
|
|
* \param $p_dossier dossier 1
|
|
*
|
|
*
|
|
*
|
|
* \return nothing
|
|
*/
|
|
function ShowMenuFiche($p_dossier)
|
|
{
|
|
$cn=new Database($p_dossier);
|
|
$str_dossier=dossier::get();
|
|
echo '<div class="lmenu">';
|
|
echo '<TABLE>';
|
|
|
|
echo '<TR><TD colspan="1" class="mtitle">
|
|
<A class="mtitle" HREF="?p_action=fiche&action=add_modele&fiche=modele&'.$str_dossier.'">'._('Création').'</A></TD>
|
|
<TD><A class="mtitle" HREF="?p_action=fiche&'.$str_dossier.'">'._('Recherche').'</A></TD>
|
|
</TR>';
|
|
$Res=$cn->exec_sql("select fd_id,fd_label from fiche_def order by fd_label");
|
|
$Max=Database::num_row($Res);
|
|
for ( $i=0; $i < $Max;$i++) {
|
|
$l_line=Database::fetch_array($Res,$i);
|
|
printf('<TR><TD class="cell">
|
|
<A class="mtitle" HREF="?p_action=fiche&action=modifier&fiche=%d&%s">%s</A></TD>
|
|
<TD class="mshort">
|
|
<A class="mtitle" HREF="?p_action=fiche&action=vue&fiche=%d&%s">Liste</A>
|
|
</TD>
|
|
</TR>',
|
|
$l_line['fd_id'],
|
|
$str_dossier,
|
|
$l_line['fd_label'],
|
|
$l_line['fd_id'],
|
|
$str_dossier
|
|
|
|
);
|
|
}
|
|
echo "</TABLE>";
|
|
echo '</div>';
|
|
}
|
|
/*! MenuAdmin */
|
|
/* \brief show the menu for user/database management
|
|
/*
|
|
/* \return HTML code with the menu
|
|
*/
|
|
|
|
function MenuAdmin()
|
|
{
|
|
$def=-1;
|
|
if (isset($_REQUEST['UID']))
|
|
$def=0;
|
|
if ( isset ($_REQUEST['action'])){
|
|
switch ($_REQUEST['action']) {
|
|
case 'user_mgt':
|
|
$def=0;
|
|
break;
|
|
case 'dossier_mgt':
|
|
$def=1;
|
|
break;
|
|
case 'modele_mgt':
|
|
$def=2;
|
|
break;
|
|
case 'restore';
|
|
$def=3;
|
|
break;
|
|
}
|
|
}
|
|
$item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0),
|
|
array("admin_repo.php?action=dossier_mgt",_("Dossiers"),_('Gestion des dossiers'),1),
|
|
array("admin_repo.php?action=modele_mgt",_("Modèles"),_('Gestion des modèles'),2),
|
|
array("admin_repo.php?action=restore",_("Restaure"),_("Restaure une base de données"),3),
|
|
array("login.php",_("Accueil")),
|
|
array("logout.php",_("Sortie"))
|
|
);
|
|
|
|
$menu=ShowItem($item,'H',"mtitle","mtitle",$def,' width="100%" ');
|
|
return $menu;
|
|
}
|
|
/*!
|
|
* \brief Show the parameter menu
|
|
*
|
|
* \param $p_action the last action choosed
|
|
*
|
|
*
|
|
*
|
|
* \return HTML Code
|
|
*
|
|
*
|
|
*/
|
|
function ShowMenuParam($p_action="")
|
|
{
|
|
// The phpsessid is set manually to avoid problem when the server is
|
|
// misconfigured and the cookies are not sent (or accepted)
|
|
$s=dossier::get().'&PHPSESSID='.$_REQUEST['PHPSESSID'];
|
|
$sub_menu=ShowItem(array(
|
|
|
|
array('parametre.php?p_action=company&'.$s,_('Sociétés'),_('Parametre societe'),1),
|
|
array('parametre.php?p_action=divers&'.$s,_('Divers'),_('Devise, moyen de paiement'),2),
|
|
array('parametre.php?p_action=pcmn&'.$s,_('Plan Comptable'),_('Modification du plan comptable'),11),
|
|
array('parametre.php?p_action=ext&'.$s,_('Extension'),_('Extension'),3),
|
|
array('parametre.php?p_action=sec&'.$s,_('Sécurité'),_('securite'),8),
|
|
array('parametre.php?p_action=preod&'.$s,_('Ecritures définies'),_('Ecritures définies'),12),
|
|
array('parametre.php?p_action=document&'.$s,_('Document'),_('Facture, lettre de rappel, proposition...'),7),
|
|
array('parametre.php?p_action=jrn&'.$s,_('Journaux'),_('Creation et modification de journaux'),10)
|
|
|
|
),
|
|
'H',"mtitle","mtitle",$p_action,' width="100%"');
|
|
return $sub_menu;
|
|
|
|
}
|
|
/*!
|
|
* \brief display the html the menu in the jrn page
|
|
*
|
|
* \return nothing
|
|
*
|
|
*
|
|
*/
|
|
|
|
function MenuJrn()
|
|
{
|
|
$str_dossier=dossier::get();
|
|
echo '<TABLE>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=jrn&sa=add&'.$str_dossier.'">'._('Création').' </A></TD></TR>';
|
|
require_once('class_database.php');
|
|
$Cn=new Database(dossier::id());
|
|
$Ret=$Cn->exec_sql("select jrn_def_id,jrn_def_name,
|
|
jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc
|
|
from jrn_def join jrn_type on jrn_def_type=jrn_type_id order by jrn_def_name");
|
|
$Max=Database::num_row($Ret);
|
|
|
|
for ($i=0;$i<$Max;$i++) {
|
|
$l_line=Database::fetch_array($Ret,$i);
|
|
printf ('<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=jrn&sa=detail&p_jrn=%s&'.$str_dossier.'">%s</A></TD></TR>',
|
|
$l_line['jrn_def_id'],$l_line['jrn_def_name']);
|
|
|
|
}
|
|
echo "</TABLE>";
|
|
}
|
|
/*!
|
|
* \brief Show the menu from the pcmn page
|
|
*
|
|
* \param $p_start class start default=1
|
|
*
|
|
*
|
|
*
|
|
* \return nothing
|
|
*
|
|
*
|
|
*/
|
|
|
|
function ShowMenuPcmn($p_start=1)
|
|
{
|
|
$str_dossier="&".dossier::get();
|
|
echo '<TABLE>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=1'.$str_dossier.'">1'._(' Immobilisé').' </A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=2'.$str_dossier.'">2 '._('Actif a un an au plus').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=3'.$str_dossier.'">3 '._('Stock et commande').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=4'.$str_dossier.'">4 '._('Compte tiers').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=5'.$str_dossier.'">5'._('Actif').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=6'.$str_dossier.'">6'._('Charges').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=7'.$str_dossier.'">7'._('Produits').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=8'.$str_dossier.'">8'._('Hors Comptabilité').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="?p_action=pcmn&p_start=9'.$str_dossier.'">9 '._('Hors Comptabilité').'</A></TD></TR>';
|
|
echo "</TABLE>";
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Show the menu for importing, verify and transfert Bank CSV
|
|
*
|
|
* \return nothing
|
|
*/
|
|
function ShowMenuImport(){
|
|
$str_dossier=dossier::get();
|
|
|
|
echo '<TABLE>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=import&'.$str_dossier.'">'._('Importer CSV').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=verif&'.$str_dossier.'">'._('Verif CSV').'</A></TD></TR>';
|
|
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="import.php?action=transfer&'.$str_dossier.'">'._('Transfert CSV').'</A></TD></TR>';
|
|
|
|
echo "</TABLE>";
|
|
}
|
|
/*!\brief show the top menu to access the different modules in top
|
|
* \param $p_from from which module this function is called
|
|
* \note must include javascript : acc_ledger.js
|
|
* \return string
|
|
*/
|
|
function menu_tool($p_from) {
|
|
|
|
if ( ! isset ($_REQUEST['gDossier']))
|
|
return "" ;
|
|
$r="";
|
|
|
|
$r.= '<div class="u_tool">';
|
|
$r.= '<div class="name">';
|
|
$r.= "<H2 class=\"info\"> Dossier : ".h(dossier::name())."</h2> ";
|
|
$r.= '</div>';
|
|
$r.= '<div class="acces_direct">';
|
|
if ( $p_from == 'compta') $view='E';
|
|
else $view='S';
|
|
$agent=$_SERVER['HTTP_USER_AGENT'];
|
|
|
|
$amodule=array(
|
|
array('value'=>'access.php','label'=>_('Tableau de bord')),
|
|
array('value'=>'user_pref.php','label'=>_('Preference')),
|
|
array('value'=>'parametre.php','label'=>_('Paramètre')),
|
|
array('value'=>'user_login.php','label'=>_('Autre Dossier')),
|
|
array('value'=>'logout.php','label'=>_('Deconnexion')),
|
|
array('value'=>'new_line'),
|
|
array('value'=>'user_compta.php','label'=>_('Compta Générale')),
|
|
array('value'=>'commercial.php','label'=>_('Gestion')),
|
|
array('value'=>'comptanalytic.php','label'=>_('Compt. Analytique')),
|
|
array('value'=>'extension.php','label'=>_('Extension'))
|
|
) ;
|
|
|
|
$gDossier=dossier::id();
|
|
$r.= '<table>';
|
|
foreach($amodule as $col ) {
|
|
$url=$col['value'].'?'.dossier::get();
|
|
if ( $p_from==$col['value']) {
|
|
$r.= '<td style="background-color:red">'.
|
|
'<a class="mtitle" href="'.$url.'" >'.$col['label'].'</a>'.
|
|
'</td>';
|
|
|
|
} else {
|
|
if ( $col['value']=='new_line') {
|
|
$r.='</tr><tr>';
|
|
continue;
|
|
}
|
|
$r.= '<td>'.
|
|
'<a class="cell" href="'.$url.'" >'.$col['label'].'</a>'.
|
|
'</td>';
|
|
}
|
|
|
|
}
|
|
$r.='<td class="mtitle2">';
|
|
$r.= '<A class="cell" HREF="javascript:openRecherche(\''.$_REQUEST['PHPSESSID'].'\','.$gDossier.')">'.
|
|
_('Recherche').'</a></td>';
|
|
$r.='</tr>';
|
|
|
|
$r.= '</table>';
|
|
$r.= '</div>';
|
|
|
|
$r.= '</div>';
|
|
return $r;
|
|
}
|