Remove pre.inc.php

This commit is contained in:
Laurent Destailleur 2010-03-27 14:50:05 +00:00
parent d2aff43936
commit 3ef00adb4a
27 changed files with 26 additions and 687 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -22,6 +22,7 @@
* \file htdocs/compta/stats/comp.php
* \ingroup commercial
* \version $Id$
* TODO Remove or add page in menus
*/
require('../../main.inc.php');
@ -262,9 +263,9 @@ function ppt ($db, $year, $socid)
print "<table width=\"100%\">";
print '<tr class="liste_titre"><td align="center" valign="top" width="30%">';
print "CA Pr<EFBFBD>visionnel bas<61> sur les propal $year";
print "CA Previsionnel base sur les propal $year";
print "</td><td align=\"center\" valign=\"top\">CA R<EFBFBD>alis<EFBFBD> $year</td>";
print "</td><td align=\"center\" valign=\"top\">CA Realise $year</td>";
print "<td align=\"center\" valign=\"top\">Delta $year</td></tr>";
print '<tr><td valign="top" align="center" width="30%">';

View File

@ -1,124 +0,0 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* 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.
*/
/**
\file htdocs/compta/stats/cumul.php
\brief Page reporting compta chiffre affaire cumule
\version $Id$
*/
require('../../main.inc.php');
// Security check
if ($user->societe_id > 0)
{
$socid = $user->societe_id;
}
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->compta->mode;
if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
llxHeader();
print_titre("Chiffre d'affaire cumul<75> (".$langs->trans("Currency".$conf->monnaie)." HT)");
print '<table width="100%"><tr><td valign="top">';
$sql = "SELECT sum(f.total) as amount , date_format(f.datef,'%Y-%m') as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_statut in (1,2)";
$sql.= " AND f.entity = ".$conf->entity;
if ($modecompta != 'CREANCES-DETTES') $sql.= " AND f.paye = 1";
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY dm";
pt($db, $sql,"Suivi cumul par mois");
print '</td><td valign="top">';
$sql = "SELECT sum(f.total) as amount, year(f.datef) as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_statut in (1,2)";
$sql.= " AND f.entity = ".$conf->entity;
if ($modecompta != 'CREANCES-DETTES') $sql.= " AND f.paye = 1";
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY dm";
pt($db, $sql,"Suivi cumul par ann<6E>e");
print "</td></tr></table>";
$db->close();
llxFooter('$Date$ - $Revision$');
/*
* Fonctions
*
*/
function pt ($db, $sql, $date)
{
global $langs;
$bc[0]="class=\"pair\"";
$bc[1]="class=\"impair\"";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0; $total = 0 ;
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print "<td width=\"60%\">$date</td>";
print "<td align=\"right\">".$langs->trans("Amount")."</td>";
print "<td align=\"right\">".$langs->trans("Total")."</td>\n";
print "</tr>\n";
$var=True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$var=!$var;
$total = $total + $obj->amount;
print "<tr $bc[$var]>";
print "<td>$obj->dm</td>\n";
print "<td align=\"right\">".price($obj->amount)."</td><td align=\"right\">".price($total)."</td>\n";
print "</tr>\n";
$i++;
}
print "<tr class=\"liste_total\"><td align=\"right\">".$langs->trans("Total")."</td><td align=\"right\">&nbsp;</b></td><td align=\"right\"><b>".price($total)."</b></td></tr>\n";
print "</table>\n";
$db->free($resql);
}
}
llxFooter('$Date$ - $Revision$');
?>

View File

@ -1,254 +0,0 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* 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.
*/
/**
\file htdocs/compta/stats/exercices.php
\brief Page ???
\version $Id$
*/
require('../../main.inc.php');
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->compta->mode;
if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
// S<>curit<69> acc<63>s client
if ($user->societe_id > 0)
{
$socid = $user->societe_id;
}
llxHeader();
print_titre("Comparatif CA ann<6E>e en cours avec ann<6E>e pr<70>c<EFBFBD>dente (".$langs->trans("Currency".$conf->monnaie)." HT, ".$modecompta.")");
print "<br>\n";
function factures ($db, $year, $month, $paye)
{
global $bc,$langs;
$sql = "SELECT s.nom, s.rowid as socid, f.facnumber, f.total as amount,".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND f.paye = ".$paye;
$sql.= " AND date_format(f.datef, '%Y') = ".$year;
$sql.= " AND round(date_format(f.datef, '%m')) = ".$month;
$sql.= " ORDER BY f.datef DESC ";
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows();
if ($num > 0) {
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">";
print "<TR bgcolor=\"orange\"><td colspan=\"3\"><b>Factures</b></td></tr>";
print "<TR bgcolor=\"orange\">";
print "<TD>Societe</td>";
print "<TD>Num</TD>";
print "<TD align=\"right\">Date</TD>";
print "<TD align=\"right\">Montant</TD>";
print "<TD align=\"right\">Pay<61></TD>";
print "</TR>\n";
$var=True;
while ($i < $num) {
$objp = $db->fetch_object($result);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"comp.php?socid=".$objp->socid."\">".$objp->nom."</a></TD>\n";
print "<TD><a href=\"facture.php?facid=".$objp->facid."\">".$objp->facnumber."</a></TD>\n";
if ($objp->df > 0 ) {
print "<TD align=\"right\">".dol_print_date($objp->df)."</TD>\n";
} else {
print "<TD align=\"right\"><b>!!!</b></TD>\n";
}
print "<TD align=\"right\">".price($objp->amount)."</TD>\n";
$payes[1] = "oui";
$payes[0] = "<b>non</b>";
print "<TD align=\"right\">".$payes[$objp->paye]."</TD>\n";
print "</TR>\n";
$total = $total + $objp->amount;
$i++;
}
print "<tr><td align=\"right\"><b>".$langs->trans("Total")." : ".price($total)."</b></td><td></td></tr>";
print "</TABLE>";
$db->free();
}
}
}
function pt ($db, $sql, $year) {
global $bc,$langs;
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows();
$i = 0; $total = 0 ;
print '<table class="border" width="100%">';
print "<tr class=\"liste_titre\">";
print '<td>'.$langs->trans("Month").'</td>';
print '<td align="right">'.$langs->trans("Amount").'</td></tr>';
$var=True;
$month = 1 ;
while ($i < $num) {
$obj = $db->fetch_object($result);
$var=!$var;
if ($obj->dm > $month ) {
for ($b = $month ; $b < $obj->dm ; $b++) {
print "<tr $bc[$var]>";
print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
print "<td align=\"right\">0</td>\n";
print "</tr>\n";
$var=!$var;
$ca[$b] = 0;
}
}
if ($obj->sum > 0) {
print "<tr $bc[$var]>";
print "<td>";
print dol_print_date(dol_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n";
print "<td align=\"right\">".price($obj->sum)."</td>\n";
print "</tr>\n";
$month = $obj->dm + 1;
$ca[$obj->dm] = $obj->sum;
$total = $total + $obj->sum;
}
$i++;
}
if ($num) {
$beg = $obj->dm;
} else {
$beg = 1 ;
}
if ($beg <= 12 ) {
for ($b = $beg + 1 ; $b < 13 ; $b++) {
$var=!$var;
print "<tr $bc[$var]>";
print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
print "<td align=\"right\">0</td>\n";
print "</tr>\n";
$ca[$b] = 0;
}
}
print "<tr class=\"total\"><td align=\"right\">Total :</td><td align=\"right\"><b>".price($total)."</b></td></tr>";
print "</table>";
$db->free();
return $ca;
} else {
print $db->error();
}
}
function ppt ($db, $year, $socid)
{
global $bc,$conf,$langs;
print "<table width=\"100%\">";
print "<tr class=\"liste_titre\"><td align=\"center\" width=\"30%\">";
print "CA ".($year - 1);
print "</td><td align=\"center\">CA $year</td>";
print '<td align="center">Delta</td></tr>';
print "<tr><td valign=\"top\" width=\"30%\">";
$sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_statut in (1,2)";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND date_format(f.datef,'%Y') = ".($year-1);
if ($conf->compta->mode != 'CREANCES-DETTES') $sql.= " AND f.paye = 1";
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY dm";
$prev = pt($db, $sql, $year - 1);
print "</td><td valign=\"top\" width=\"30%\">";
$sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_statut in (1,2)";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND date_format(f.datef,'%Y') = $year ";
if ($conf->compta->mode != 'CREANCES-DETTES') $sql.= " AND f.paye = 1";
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY dm";
$ca = pt($db, $sql, $year);
print "</td><td valign=\"top\" width=\"30%\">";
print '<table class="border" width="100%" cellspacing="0" cellpadding="3">';
print "<tr class=\"liste_titre\">";
print '<td>'.$langs->trans("Month").'</td>';
print '<td align="right">'.$langs->trans("Amount").'</td>';
print '<td align="right">Cumul</td>';
print "</tr>\n";
$var = 1 ;
for ($b = 1 ; $b <= 12 ; $b++)
{
$var=!$var;
$delta = $ca[$b] - $prev[$b];
$deltat = $deltat + $delta ;
print "<TR $bc[$var]>";
print "<TD>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</TD>\n";
print "<TD align=\"right\">".price($delta)."</TD>\n";
print "<TD align=\"right\">".price($deltat)."</TD>\n";
print "</TR>\n";
}
print '<tr class="total"><td align="right">Total :</td><td align="right"><b>'.price($deltat).'<b></td></tr>';
print '</table>';
print '</td></tr></table>';
}
$cyear = strftime ("%Y", time());
ppt($db, $cyear, $socid);
$db->close();
llxFooter('$Date$ - $Revision$');
?>

View File

@ -24,7 +24,7 @@
\version $Id$
*/
require ("./pre.inc.php");
require ("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/contract.lib.php');
require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");

View File

@ -27,7 +27,7 @@
\version $Id$
*/
require('./pre.inc.php');
require ("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/contract.lib.php");
require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");

View File

@ -26,7 +26,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require ("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/contract.lib.php');
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");

View File

@ -25,7 +25,7 @@
* \version $Revision$
*/
require("./pre.inc.php");
require ("../main.inc.php");
require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
$langs->load("products");

View File

@ -23,7 +23,7 @@
\version $Id$
*/
require("./pre.inc.php");
require ("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/contract.lib.php');
require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require ("../main.inc.php");
require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
$langs->load("contracts");

View File

@ -24,7 +24,7 @@
\version $Id$
*/
require("./pre.inc.php");
require ("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/contract.lib.php');
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");

View File

@ -1,49 +0,0 @@
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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.
*/
/**
\file htdocs/contrat/pre.inc.php
\ingroup contrat
\brief Fichier de gestion du menu gauche de l'espace contrat
\version $Id$
*/
require("../main.inc.php");
function llxHeader($head = '', $title='', $help_url='')
{
global $user, $conf, $langs;
$langs->load("contracts");
top_menu($head);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts"));
$menu->add_submenu(DOL_URL_ROOT."/societe.php", $langs->trans("NewContract"));
$menu->add_submenu(DOL_URL_ROOT."/contrat/liste.php", $langs->trans("List"));
$menu->add_submenu(DOL_URL_ROOT."/contrat/services.php", $langs->trans("MenuServices"));
$menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=0", $langs->trans("MenuInactiveServices"), 2 , true);
$menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=4", $langs->trans("MenuRunningServices"), 2 , true);
$menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=4&filter=expired", $langs->trans("MenuExpiredServices"), 2 , true);
$menu->add_submenu(DOL_URL_ROOT."/contrat/services.php?mode=5", $langs->trans("MenuClosedServices"), 2 , true);
left_menu($menu->liste, $help_url);
}
?>

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require ("../main.inc.php");
require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
require_once (DOL_DOCUMENT_ROOT."/product/product.class.php");
require_once (DOL_DOCUMENT_ROOT."/societe.class.php");

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");

View File

@ -1,41 +0,0 @@
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Auguria SARL <info@auguria.org>
*
* 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.
*/
/**
* \file htdocs/core/pre.inc.php
* \ingroup core
* \brief Menu file
* \version $Id$
*/
require("../main.inc.php");
function llxHeader($head = '',$help_url='', $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
{
global $user, $conf, $langs;
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
$menu = new Menu();
left_menu($menu->liste, $help_url);
}
?>

View File

@ -37,7 +37,8 @@
* \brief Search the city corresponding to the ZIP code entered. 1st round is sought in the company table, if we have two customers in the same city that is direct. If the search never does anything then we start looking in the table of postcodes.
* \version $Id$
*/
require("pre.inc.php");
require("../main.inc.php");
$langs->load("companies");
@ -210,7 +211,7 @@ function run_request($table)
}
else $sql.= " cp != '' AND cp IS NOT NULL";
$sql.= " ORDER by fk_pays, ville, cp";
$sql.= ' '.$db->plimit(50); // Avoid pb with bad criteria
$sql.= $db->plimit(50); // Avoid pb with bad criteria
//print $sql.'<br>';
$result=$db->query($sql);

View File

@ -23,7 +23,8 @@
\version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");

View File

@ -23,7 +23,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
/*

View File

@ -1,96 +0,0 @@
<?php
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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.
*/
/**
* \file htdocs/docs/pre.inc.php
* \brief Fichier gestionnaire du menu de gauche de l'accueil
* \version $Id$
*/
require_once("../main.inc.php");
function llxHeader($head = "", $title="", $help_url='')
{
global $user, $conf, $langs;
top_menu($head);
$menu = new Menu();
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
{
$langs->load("companies");
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("ThirdParties"));
if ($user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty"));
}
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
}
if (! empty($conf->categorie->enabled))
{
$langs->load("categories");
$menu->add(DOL_URL_ROOT."/categories/index.php?type=0", $langs->trans("Categories"));
}
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
{
$langs->trans("interventions");
$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
}
if (($conf->produit->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire))
{
$langs->load("products");
$chaine="";
if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); }
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); }
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
}
if ($conf->commande->enabled && $user->rights->commande->lire)
{
$langs->load("orders");
$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
}
if ($conf->document->enabled)
{
$menu->add(DOL_URL_ROOT."/docs/index.php", $langs->trans("DocumentsBuilder"));
$menu->add_submenu(DOL_URL_ROOT."/docs/generate.php", $langs->trans("Build"));
}
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire)
{
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
left_menu($menu->liste);
}
?>

View File

@ -19,7 +19,7 @@
* $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
/*

View File

@ -1,45 +0,0 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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$
*/
require_once("../main.inc.php");
function llxHeader($head = "") {
global $user, $conf;
/*
*
*
*/
top_menu($head);
$menu = new Menu();
$menu->add("/comm/index.php", "Commercial");
$menu->add_submenu("/comm/clients.php", "Clients");
$menu->add_submenu("/compta/", "Factures");
left_menu($menu->liste);
}
?>

View File

@ -25,7 +25,7 @@
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/ecm/htmlecm.form.class.php");
require_once(DOL_DOCUMENT_ROOT."/ecm/ecmdirectory.class.php");

View File

@ -24,7 +24,7 @@
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/ecm/htmlecm.form.class.php");
require_once(DOL_DOCUMENT_ROOT."/ecm/ecmdirectory.class.php");

View File

@ -25,7 +25,7 @@
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/ecm/ecmdirectory.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");

View File

@ -10,7 +10,7 @@
\author Laurent Destailleur
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
// Load traductions files

View File

@ -25,7 +25,7 @@
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/ecm.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");

View File

@ -1,55 +0,0 @@
<?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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.
*/
/**
* \file htdocs/ecm/pre.inc.php
* \ingroup ecm
* \brief File to manage left menu for ecm module
* \version $Id$
*/
require ("../main.inc.php");
$user->getrights('ecm');
function llxHeader($head = '', $title='', $help_url='', $morehtml='')
{
global $conf,$langs,$user;
$langs->load("ecm");
$langs->load("bills");
$langs->load("propal");
top_menu($head, $title);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/ecm/index.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("MenuECM"),0,$user->rights->ecm->download);
$menu->add_submenu(DOL_URL_ROOT."/ecm/index.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("List"),1,$user->rights->ecm->download);
//$menu->add_submenu(DOL_URL_ROOT."/ecm/index?mainmenu=ecm&action=create&idmenu=".$_SESSION["idmenu"], $langs->trans("ECMNewDocument"),1,$user->rights->ecm->upload);
$menu->add_submenu(DOL_URL_ROOT."/ecm/search.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("Search"),1,$user->rights->ecm->download);
/* if ($conf->societe->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsThirdParties"),2);
if ($conf->contrat->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsContracts"),2);
if ($conf->propal->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsProposals"),2);
if ($conf->commande->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsOrders"),2);
if ($conf->facture->enabled) $menu->add_submenu(DOL_URL_ROOT."/ecm/docother.php?mainmenu=ecm&idmenu=".$_SESSION["idmenu"], $langs->trans("DocsInvoices"),2);
*/
left_menu($menu->liste, $help_url, $morehtml);
}
?>

View File

@ -25,7 +25,7 @@
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/ecm.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");