New: Can add a bookmark on all dolibarr pages.
This commit is contained in:
parent
7855cf7086
commit
df0ef9efe5
@ -1,4 +1,4 @@
|
|||||||
#Thu Jan 22 02:05:11 CET 2009
|
#Fri Jan 23 00:49:24 CET 2009
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//dev/initdemo/initdemo.sql=UTF-8
|
encoding//dev/initdemo/initdemo.sql=UTF-8
|
||||||
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
||||||
@ -176,6 +176,7 @@ encoding//htdocs/langs/en_US/admin.lang=UTF-8
|
|||||||
encoding//htdocs/langs/en_US/agenda.lang=UTF-8
|
encoding//htdocs/langs/en_US/agenda.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/banks.lang=UTF-8
|
encoding//htdocs/langs/en_US/banks.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/bills.lang=UTF-8
|
encoding//htdocs/langs/en_US/bills.lang=UTF-8
|
||||||
|
encoding//htdocs/langs/en_US/bookmarks.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/boxes.lang=UTF-8
|
encoding//htdocs/langs/en_US/boxes.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/categories.lang=UTF-8
|
encoding//htdocs/langs/en_US/categories.lang=UTF-8
|
||||||
encoding//htdocs/langs/en_US/commercial.lang=UTF-8
|
encoding//htdocs/langs/en_US/commercial.lang=UTF-8
|
||||||
@ -284,6 +285,7 @@ encoding//htdocs/langs/fr_FR/admin.lang=UTF-8
|
|||||||
encoding//htdocs/langs/fr_FR/agenda.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/agenda.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/banks.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/banks.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/bills.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/bills.lang=UTF-8
|
||||||
|
encoding//htdocs/langs/fr_FR/bookmarks.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/boxes.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/boxes.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/categories.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/categories.lang=UTF-8
|
||||||
encoding//htdocs/langs/fr_FR/commercial.lang=UTF-8
|
encoding//htdocs/langs/fr_FR/commercial.lang=UTF-8
|
||||||
|
|||||||
@ -3,6 +3,7 @@ English Dolibarr changelog
|
|||||||
***** Changelog for 2.5.1 compared to 2.5 *****
|
***** Changelog for 2.5.1 compared to 2.5 *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
|
- New: Can add bookmarks on all pages.
|
||||||
- New: Enhance bank transactions reportings.
|
- New: Enhance bank transactions reportings.
|
||||||
- New: When creating a contact from a third party, informations from third party card
|
- New: When creating a contact from a third party, informations from third party card
|
||||||
are automatically suggested.
|
are automatically suggested.
|
||||||
|
|||||||
190
bookmarks.patch
Normal file
190
bookmarks.patch
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php
|
||||||
|
--- /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php 2009-01-21 22:41:44.000000000 +0100
|
||||||
|
@@ -0,0 +1,51 @@
|
||||||
|
+<?php
|
||||||
|
+
|
||||||
|
+ function printBookmarksList ($aDb, $aLangs) {
|
||||||
|
+ $db = $aDb;
|
||||||
|
+ $langs = $aLangs;
|
||||||
|
+
|
||||||
|
+ require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
||||||
|
+
|
||||||
|
+ $bookm = new Bookmark($db);
|
||||||
|
+
|
||||||
|
+ $langs->load("bookmarks");
|
||||||
|
+
|
||||||
|
+ $ret = '';
|
||||||
|
+ $ret .= '<div class="blockvmenupair">';
|
||||||
|
+
|
||||||
|
+ $ret .= '<div class="menu_titre">';
|
||||||
|
+ $ret .= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||||
|
+ $ret .= '<a class="vsmenu"" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create"><img style="border: none; position: relative;" src="'.DOL_URL_ROOT.'/bookmarks/add.png" alt="'.$langs->trans('NewBookmark').'" title="'.$langs->trans('NewBookmark').'" /></a>';
|
||||||
|
+ $ret .= '</div>';
|
||||||
|
+
|
||||||
|
+ $ret .= '<div class="menu_contenu">';
|
||||||
|
+
|
||||||
|
+ $sql = "
|
||||||
|
+ SELECT rowid FROM ".MAIN_DB_PREFIX."bookmark
|
||||||
|
+ WHERE true
|
||||||
|
+ ;";
|
||||||
|
+
|
||||||
|
+ if ( $resql = $db->query($sql) ) {
|
||||||
|
+
|
||||||
|
+ while ( $obj = $db->fetch_object($resql) ) {
|
||||||
|
+
|
||||||
|
+ $bookm->fetch($obj->rowid);
|
||||||
|
+
|
||||||
|
+ $ret .='<a class="vsmenu" title="'.$bookm->title.'" href="'.$bookm->url.'">'.dolibarr_trunc($bookm->title, 30).'</a><br />';
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ } else {
|
||||||
|
+
|
||||||
|
+ dolibarr_print_error($db);
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ $ret .= '</div>';
|
||||||
|
+
|
||||||
|
+ $ret .= '<div class="menu_fin"></div></div>';
|
||||||
|
+
|
||||||
|
+ return $ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+?>
|
||||||
|
\ Pas de fin de ligne à la fin du fichier.
|
||||||
|
diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang
|
||||||
|
--- /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang 2009-01-21 22:14:05.000000000 +0100
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+# Dolibarr language file - fr_FR - marque pages
|
||||||
|
+CHARSET=ISO-8859-1
|
||||||
|
+Bookm=Marque pages
|
||||||
|
+NewBookmark=Nouveau marque page
|
||||||
|
\ Pas de fin de ligne à la fin du fichier.
|
||||||
|
diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/main.inc.php /var/www/html/dolibarr_dev/htdocs/main.inc.php
|
||||||
|
--- /var/www/html/dolibarr/htdocs/main.inc.php 2009-01-21 17:09:23.000000000 +0100
|
||||||
|
+++ /var/www/html/dolibarr_dev/htdocs/main.inc.php 2009-01-21 21:01:39.000000000 +0100
|
||||||
|
@@ -886,6 +886,15 @@
|
||||||
|
img_object($langs->trans("List"),'user').' '.$langs->trans("Members"), 'member', 'sall');
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Zone d'affichage permanente des marque pages
|
||||||
|
+ if ($conf->bookmark->enabled && $conf->global->MAIN_PERMANENT_BOOKMARKS && $user->rights->bookmark->lire)
|
||||||
|
+ {
|
||||||
|
+ include_once (DOL_DOCUMENT_ROOT.'/bookmarks/fonctions.inc.php');
|
||||||
|
+ $langs->load("bookmarks");
|
||||||
|
+
|
||||||
|
+ $ret.=printBookmarksList($db, $langs);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if ($ret)
|
||||||
|
{
|
||||||
|
print "\n";
|
||||||
|
@@ -901,7 +910,7 @@
|
||||||
|
{
|
||||||
|
print $form_search;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
// Lien vers l'aide en ligne (uniquement si langue fr_FR)
|
||||||
|
if ($helppagename)
|
||||||
|
{
|
||||||
|
diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/output.patch /var/www/html/dolibarr_dev/output.patch
|
||||||
|
--- /var/www/html/dolibarr/output.patch 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ /var/www/html/dolibarr_dev/output.patch 2009-01-21 22:41:47.000000000 +0100
|
||||||
|
@@ -0,0 +1,93 @@
|
||||||
|
+diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php
|
||||||
|
+--- /var/www/html/dolibarr/htdocs/bookmarks/fonctions.inc.php 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
++++ /var/www/html/dolibarr_dev/htdocs/bookmarks/fonctions.inc.php 2009-01-21 22:41:44.000000000 +0100
|
||||||
|
+@@ -0,0 +1,51 @@
|
||||||
|
++<?php
|
||||||
|
++
|
||||||
|
++ function printBookmarksList ($aDb, $aLangs) {
|
||||||
|
++ $db = $aDb;
|
||||||
|
++ $langs = $aLangs;
|
||||||
|
++
|
||||||
|
++ require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
||||||
|
++
|
||||||
|
++ $bookm = new Bookmark($db);
|
||||||
|
++
|
||||||
|
++ $langs->load("bookmarks");
|
||||||
|
++
|
||||||
|
++ $ret = '';
|
||||||
|
++ $ret .= '<div class="blockvmenupair">';
|
||||||
|
++
|
||||||
|
++ $ret .= '<div class="menu_titre">';
|
||||||
|
++ $ret .= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||||
|
++ $ret .= '<a class="vsmenu"" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create"><img style="border: none; position: relative;" src="'.DOL_URL_ROOT.'/bookmarks/add.png" alt="'.$langs->trans('NewBookmark').'" title="'.$langs->trans('NewBookmark').'" /></a>';
|
||||||
|
++ $ret .= '</div>';
|
||||||
|
++
|
||||||
|
++ $ret .= '<div class="menu_contenu">';
|
||||||
|
++
|
||||||
|
++ $sql = "
|
||||||
|
++ SELECT rowid FROM ".MAIN_DB_PREFIX."bookmark
|
||||||
|
++ WHERE true
|
||||||
|
++ ;";
|
||||||
|
++
|
||||||
|
++ if ( $resql = $db->query($sql) ) {
|
||||||
|
++
|
||||||
|
++ while ( $obj = $db->fetch_object($resql) ) {
|
||||||
|
++
|
||||||
|
++ $bookm->fetch($obj->rowid);
|
||||||
|
++
|
||||||
|
++ $ret .='<a class="vsmenu" title="'.$bookm->title.'" href="'.$bookm->url.'">'.dolibarr_trunc($bookm->title, 30).'</a><br />';
|
||||||
|
++
|
||||||
|
++ }
|
||||||
|
++
|
||||||
|
++ } else {
|
||||||
|
++
|
||||||
|
++ dolibarr_print_error($db);
|
||||||
|
++
|
||||||
|
++ }
|
||||||
|
++
|
||||||
|
++ $ret .= '</div>';
|
||||||
|
++
|
||||||
|
++ $ret .= '<div class="menu_fin"></div></div>';
|
||||||
|
++
|
||||||
|
++ return $ret;
|
||||||
|
++ }
|
||||||
|
++
|
||||||
|
++?>
|
||||||
|
+\ Pas de fin de ligne à la fin du fichier.
|
||||||
|
+diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang
|
||||||
|
+--- /var/www/html/dolibarr/htdocs/langs/fr_FR/bookmarks.lang 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
++++ /var/www/html/dolibarr_dev/htdocs/langs/fr_FR/bookmarks.lang 2009-01-21 22:14:05.000000000 +0100
|
||||||
|
+@@ -0,0 +1,4 @@
|
||||||
|
++# Dolibarr language file - fr_FR - marque pages
|
||||||
|
++CHARSET=ISO-8859-1
|
||||||
|
++Bookm=Marque pages
|
||||||
|
++NewBookmark=Nouveau marque page
|
||||||
|
+\ Pas de fin de ligne à la fin du fichier.
|
||||||
|
+diff -Naur --exclude=add.png --exclude=html.formactions.class.php --exclude=paiement.php --exclude=CVS --exclude=synchro_dev.sh --exclude=recup_cvs.sh --exclude=patch.sh --exclude='.#*' --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents /var/www/html/dolibarr/htdocs/main.inc.php /var/www/html/dolibarr_dev/htdocs/main.inc.php
|
||||||
|
+--- /var/www/html/dolibarr/htdocs/main.inc.php 2009-01-21 17:09:23.000000000 +0100
|
||||||
|
++++ /var/www/html/dolibarr_dev/htdocs/main.inc.php 2009-01-21 21:01:39.000000000 +0100
|
||||||
|
+@@ -886,6 +886,15 @@
|
||||||
|
+ img_object($langs->trans("List"),'user').' '.$langs->trans("Members"), 'member', 'sall');
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
++ // Zone d'affichage permanente des marque pages
|
||||||
|
++ if ($conf->bookmark->enabled && $conf->global->MAIN_PERMANENT_BOOKMARKS && $user->rights->bookmark->lire)
|
||||||
|
++ {
|
||||||
|
++ include_once (DOL_DOCUMENT_ROOT.'/bookmarks/fonctions.inc.php');
|
||||||
|
++ $langs->load("bookmarks");
|
||||||
|
++
|
||||||
|
++ $ret.=printBookmarksList($db, $langs);
|
||||||
|
++ }
|
||||||
|
++
|
||||||
|
+ if ($ret)
|
||||||
|
+ {
|
||||||
|
+ print "\n";
|
||||||
|
+@@ -901,7 +910,7 @@
|
||||||
|
+ {
|
||||||
|
+ print $form_search;
|
||||||
|
+ }
|
||||||
|
+-
|
||||||
|
++
|
||||||
|
+ // Lien vers l'aide en ligne (uniquement si langue fr_FR)
|
||||||
|
+ if ($helppagename)
|
||||||
|
+ {
|
||||||
69
htdocs/bookmarks/bookmarks.lib.php
Normal file
69
htdocs/bookmarks/bookmarks.lib.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 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/bookmarks.lib.php
|
||||||
|
* \ingroup bookmarks
|
||||||
|
* \brief File with library for bookmark module
|
||||||
|
* \version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
function printBookmarksList ($aDb, $aLangs)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$db = $aDb;
|
||||||
|
$langs = $aLangs;
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
||||||
|
|
||||||
|
$bookm = new Bookmark($db);
|
||||||
|
|
||||||
|
$langs->load("bookmarks");
|
||||||
|
|
||||||
|
$url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:'');
|
||||||
|
|
||||||
|
$ret = '';
|
||||||
|
// Menu bookmark
|
||||||
|
$ret.= '<div class="menu_titre"><a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a></div>';
|
||||||
|
// Menu New bookmark
|
||||||
|
$ret.= '<div class="menu_contenu"><a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url).'">';
|
||||||
|
$ret.= $langs->trans('NewBookmark').'</a><br></div>';
|
||||||
|
// Menu with all bookmarks
|
||||||
|
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||||
|
{
|
||||||
|
$sql = "SELECT rowid, title, url FROM ".MAIN_DB_PREFIX."bookmark";
|
||||||
|
if ( $resql = $db->query($sql) ) {
|
||||||
|
while ( $obj = $db->fetch_object($resql) ) {
|
||||||
|
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'">';
|
||||||
|
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
||||||
|
$ret.= dolibarr_trunc($obj->title, 30).'</a><br></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret .= '<div class="menu_fin"></div>';
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -24,7 +24,7 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/bookmarks/bookmark.class.php");
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ if ($action == 'add' || $action == 'addproduct')
|
|||||||
$res=$bookmark->create();
|
$res=$bookmark->create();
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
{
|
{
|
||||||
$urlsource=isset($_GET["urlsource"])?$_GET["urlsource"]:DOL_URL_ROOT.'/bookmarks/liste.php';
|
$urlsource=isset($_GET["urlsource"])?$_GET["urlsource"]:DOL_URL_ROOT.'/bookmarks/liste.php';
|
||||||
header("Location: ".$urlsource);
|
header("Location: ".$urlsource);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/comm/index.php
|
\file htdocs/comm/index.php
|
||||||
\ingroup commercial
|
\ingroup commercial
|
||||||
\brief Page acceuil de la zone commercial cliente
|
\brief Page acceuil de la zone commercial cliente
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/client.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/client.class.php");
|
||||||
@ -34,25 +34,25 @@ require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
|
||||||
|
|
||||||
if (!$user->rights->societe->lire)
|
if (!$user->rights->societe->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
// S<>curit<69> acc<63>s client
|
// S<>curit<69> acc<63>s clien
|
||||||
$socid='';
|
$socid='';
|
||||||
if ($_GET["socid"]) { $socid=$_GET["socid"]; }
|
if ($_GET["socid"]) { $socid=$_GET["socid"]; }
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$max=5;
|
$max=5;
|
||||||
|
|
||||||
|
|
||||||
if ($conf->propal->enabled) $propalstatic=new Propal($db);
|
if ($conf->propal->enabled) $propalstatic=new Propal($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -61,22 +61,22 @@ if ($conf->propal->enabled) $propalstatic=new Propal($db);
|
|||||||
|
|
||||||
if (isset($_GET["action"]) && $_GET["action"] == 'add_bookmark')
|
if (isset($_GET["action"]) && $_GET["action"] == 'add_bookmark')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$_GET["socid"]." AND fk_user=".$user->id;
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$_GET["socid"]." AND fk_user=".$user->id;
|
||||||
if (! $db->query($sql) )
|
if (! $db->query($sql) )
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$_GET["socid"].", ".$db->idate(mktime()).",".$user->id.");";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES (".$_GET["socid"].", ".$db->idate(mktime()).",".$user->id.");";
|
||||||
if (! $db->query($sql) )
|
if (! $db->query($sql) )
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark')
|
if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"];
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -98,17 +98,17 @@ print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
|||||||
// Recherche Propal
|
// Recherche Propal
|
||||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
$var=false;
|
$var=false;
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal.php">';
|
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal.php">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAProposal").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAProposal").'</td></tr>';
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td>';
|
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td>';
|
||||||
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||||
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
|
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print "</table></form>\n";
|
print "</table></form>\n";
|
||||||
print "<br />\n";
|
print "<br />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -116,17 +116,17 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
*/
|
*/
|
||||||
if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
||||||
{
|
{
|
||||||
$var=false;
|
$var=false;
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/liste.php">';
|
print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/liste.php">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAContract").'</td></tr>';
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>';
|
print '<td nowrap>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" name="search_contract" size="18"></td>';
|
||||||
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||||
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
|
print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print "</table></form>\n";
|
print "</table></form>\n";
|
||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -134,49 +134,49 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
|||||||
*/
|
*/
|
||||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom";
|
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE p.fk_statut = 0 and p.fk_soc = s.rowid";
|
$sql.= " WHERE p.fk_statut = 0 and p.fk_soc = s.rowid";
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.rowid = ".$socid;
|
$sql .= " AND s.rowid = ".$socid;
|
||||||
}
|
}
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$total = 0;
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
if ($num > 0)
|
|
||||||
{
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print "<tr class=\"liste_titre\">";
|
|
||||||
print "<td colspan=\"3\">".$langs->trans("ProposalsDraft")."</td></tr>";
|
|
||||||
|
|
||||||
$i = 0;
|
$resql=$db->query($sql);
|
||||||
$var=true;
|
if ($resql)
|
||||||
while ($i < $num)
|
{
|
||||||
{
|
$total = 0;
|
||||||
$obj = $db->fetch_object($resql);
|
$num = $db->num_rows($resql);
|
||||||
$var=!$var;
|
if ($num > 0)
|
||||||
print '<tr '.$bc[$var].'><td nowrap="nowrap">'."<a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref.'</a></td>';
|
{
|
||||||
print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<td align="right" nowrap="nowrap">'.price($obj->total_ht).'</td></tr>';
|
print "<tr class=\"liste_titre\">";
|
||||||
$i++;
|
print "<td colspan=\"3\">".$langs->trans("ProposalsDraft")."</td></tr>";
|
||||||
$total += $obj->price;
|
|
||||||
}
|
$i = 0;
|
||||||
if ($total>0)
|
$var=true;
|
||||||
{
|
while ($i < $num)
|
||||||
$var=!$var;
|
{
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
$obj = $db->fetch_object($resql);
|
||||||
}
|
$var=!$var;
|
||||||
print "</table><br>";
|
print '<tr '.$bc[$var].'><td nowrap="nowrap">'."<a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref.'</a></td>';
|
||||||
}
|
print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
||||||
$db->free($resql);
|
print '<td align="right" nowrap="nowrap">'.price($obj->total_ht).'</td></tr>';
|
||||||
}
|
$i++;
|
||||||
|
$total += $obj->price;
|
||||||
|
}
|
||||||
|
if ($total>0)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||||
|
}
|
||||||
|
print "</table><br>";
|
||||||
|
}
|
||||||
|
$db->free($resql);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -185,95 +185,49 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
*/
|
*/
|
||||||
if ($conf->commande->enabled && $user->rights->commande->lire)
|
if ($conf->commande->enabled && $user->rights->commande->lire)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.rowid as socid";
|
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.rowid as socid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE c.fk_soc = s.rowid AND c.fk_statut = 0";
|
$sql.= " WHERE c.fk_soc = s.rowid AND c.fk_statut = 0";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
$sql .= " AND c.fk_soc = ".$socid;
|
$sql .= " AND c.fk_soc = ".$socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var = true;
|
$var = true;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print '<tr '.$bc[$var].'><td nowrap="nowrap"><a href="../commande/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>';
|
print '<tr '.$bc[$var].'><td nowrap="nowrap"><a href="../commande/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>';
|
||||||
print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
print '<td nowrap="nowrap"><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
||||||
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
if ($total>0)
|
if ($total>0)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bookmark
|
|
||||||
*/
|
|
||||||
if ($conf->bookmark->enabled)
|
|
||||||
{
|
|
||||||
$sql = "SELECT s.rowid, s.nom,b.rowid as bid";
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b";
|
|
||||||
$sql .= " WHERE b.fk_soc = s.rowid AND b.fk_user = ".$user->id;
|
|
||||||
if ($socid)
|
|
||||||
{
|
|
||||||
$sql .= " AND s.rowid = ".$socid;
|
|
||||||
}
|
|
||||||
$sql .= " ORDER BY lower(s.nom) ASC";
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
|
||||||
{
|
|
||||||
$num = $db->num_rows();
|
|
||||||
|
|
||||||
if ($num)
|
|
||||||
{
|
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print "<tr class=\"liste_titre\">";
|
|
||||||
print "<td colspan=\"2\">".$langs->trans("Bookmarks")."</td>";
|
|
||||||
print "</tr>\n";
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$obj = $db->fetch_object();
|
|
||||||
$var = !$var;
|
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
print '<td><a href="fiche.php?socid='.$obj->rowid.'">'.$obj->nom.'</a></td>';
|
|
||||||
print '<td align="right"><a href="index.php?action=del_bookmark&bid='.$obj->bid.'">';
|
|
||||||
print img_delete();
|
|
||||||
print '</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
print '</table>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
@ -300,58 +254,58 @@ if ($user->rights->agenda->myactions->read)
|
|||||||
*/
|
*/
|
||||||
if ($user->rights->societe->lire)
|
if ($user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.rowid,s.nom,s.client,".$db->pdate("datec")." as datec";
|
$sql = "SELECT s.rowid,s.nom,s.client,".$db->pdate("datec")." as datec";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE s.client in (1,2)";
|
$sql.= " WHERE s.client in (1,2)";
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.rowid = $socid";
|
$sql .= " AND s.rowid = $socid";
|
||||||
}
|
}
|
||||||
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
||||||
{
|
{
|
||||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
}
|
}
|
||||||
$sql .= " ORDER BY s.datec DESC";
|
$sql .= " ORDER BY s.datec DESC";
|
||||||
$sql .= $db->plimit($max, 0);
|
$sql .= $db->plimit($max, 0);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).'</td></tr>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var=false;
|
$var=false;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td nowrap>";
|
print "<td nowrap>";
|
||||||
if ($objp->client == 1) print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom."</a></td>";
|
if ($objp->client == 1) print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom."</a></td>";
|
||||||
if ($objp->client == 2) print "<a href=\"".DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom."</a></td>";
|
if ($objp->client == 2) print "<a href=\"".DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->rowid."\">".img_object($langs->trans("ShowCustomer"),"company")." ".$objp->nom."</a></td>";
|
||||||
print '<td align="right" nowrap>';
|
print '<td align="right" nowrap>';
|
||||||
if ($objp->client == 1) print $langs->trans("Customer");
|
if ($objp->client == 1) print $langs->trans("Customer");
|
||||||
if ($objp->client == 2) print $langs->trans("Prospect");
|
if ($objp->client == 2) print $langs->trans("Prospect");
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td align="right" nowrap>'.dolibarr_print_date($objp->datec,'day')."</td>";
|
print '<td align="right" nowrap>'.dolibarr_print_date($objp->datec,'day')."</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -361,53 +315,53 @@ if ($user->rights->societe->lire)
|
|||||||
*/
|
*/
|
||||||
if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // \todo A REFAIRE DEPUIS NOUVEAU CONTRAT
|
if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // \todo A REFAIRE DEPUIS NOUVEAU CONTRAT
|
||||||
{
|
{
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|
||||||
$sql = "SELECT s.nom, s.rowid, c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo";
|
$sql = "SELECT s.nom, s.rowid, c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."product as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."product as p";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql .= " WHERE c.fk_soc = s.rowid and c.fk_product = p.rowid";
|
$sql .= " WHERE c.fk_soc = s.rowid and c.fk_product = p.rowid";
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
|
||||||
$sql .= " AND s.rowid = ".$socid;
|
|
||||||
}
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
|
||||||
{
|
|
||||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
|
||||||
}
|
|
||||||
$sql .= " ORDER BY c.tms DESC";
|
|
||||||
$sql .= $db->plimit(5, 0);
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
|
||||||
{
|
|
||||||
$num = $db->num_rows();
|
|
||||||
|
|
||||||
if ($num > 0)
|
|
||||||
{
|
{
|
||||||
|
$sql .= " AND s.rowid = ".$socid;
|
||||||
|
}
|
||||||
|
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
||||||
|
{
|
||||||
|
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
|
}
|
||||||
|
$sql .= " ORDER BY c.tms DESC";
|
||||||
|
$sql .= $db->plimit(5, 0);
|
||||||
|
|
||||||
|
if ( $db->query($sql) )
|
||||||
|
{
|
||||||
|
$num = $db->num_rows();
|
||||||
|
|
||||||
|
if ($num > 0)
|
||||||
|
{
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastContracts",5).'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastContracts",5).'</td></tr>';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$staticcontrat=new Contrat($db);
|
$staticcontrat=new Contrat($db);
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td><a href=\"../contrat/fiche.php?id=".$obj->contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."</a></td>";
|
print "<tr $bc[$var]><td><a href=\"../contrat/fiche.php?id=".$obj->contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."</a></td>";
|
||||||
print "<td><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany","company"))." ".$obj->nom."</a></td>\n";
|
print "<td><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany","company"))." ".$obj->nom."</a></td>\n";
|
||||||
print "<td align=\"right\">".$staticcontrat->LibStatut($obj->statut,3)."</td></tr>\n";
|
print "<td align=\"right\">".$staticcontrat->LibStatut($obj->statut,3)."</td></tr>\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dolibarr_print_error($db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -416,75 +370,75 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // \todo A REF
|
|||||||
*/
|
*/
|
||||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
|
|
||||||
$now=gmmktime();
|
|
||||||
|
|
||||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp";
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
|
||||||
$sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut = 1";
|
|
||||||
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
|
||||||
$sql .= " ORDER BY p.rowid DESC";
|
|
||||||
|
|
||||||
$result=$db->query($sql);
|
|
||||||
if ($result)
|
|
||||||
{
|
|
||||||
$total = 0;
|
|
||||||
$num = $db->num_rows($result);
|
|
||||||
$i = 0;
|
|
||||||
if ($num > 0)
|
|
||||||
{
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
$now=gmmktime();
|
||||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
|
||||||
while ($i < $num)
|
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp";
|
||||||
{
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$obj = $db->fetch_object($result);
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
||||||
$var=!$var;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
print "<tr $bc[$var]>";
|
$sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut = 1";
|
||||||
print '<td nowrap="nowrap" width="140">';
|
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
||||||
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
$propalstatic->id=$obj->propalid;
|
$sql .= " ORDER BY p.rowid DESC";
|
||||||
$propalstatic->ref=$obj->ref;
|
|
||||||
|
$result=$db->query($sql);
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
if ($result)
|
||||||
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
{
|
||||||
print $propalstatic->getNomUrl(1);
|
$total = 0;
|
||||||
print '</td>';
|
$num = $db->num_rows($result);
|
||||||
print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
|
$i = 0;
|
||||||
if ($obj->dp < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
if ($num > 0)
|
||||||
print '</td>';
|
{
|
||||||
print '<td width="16" align="center" class="nobordernopadding">';
|
$var=true;
|
||||||
$filename=sanitizeFileName($obj->ref);
|
|
||||||
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($obj->ref);
|
print '<table class="noborder" width="100%">';
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$obj->propalid;
|
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
while ($i < $num)
|
||||||
print '</td></tr></table>';
|
{
|
||||||
|
$obj = $db->fetch_object($result);
|
||||||
print "</td>";
|
$var=!$var;
|
||||||
print "<td align=\"left\"><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dolibarr_trunc($obj->nom,44)."</a></td>\n";
|
print "<tr $bc[$var]>";
|
||||||
print "<td align=\"right\">";
|
print '<td nowrap="nowrap" width="140">';
|
||||||
print dolibarr_print_date($obj->dp,'day')."</td>\n";
|
|
||||||
print "<td align=\"right\">".price($obj->total_ttc)."</td>";
|
$propalstatic->id=$obj->propalid;
|
||||||
print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($obj->fk_statut,3)."</td>\n";
|
$propalstatic->ref=$obj->ref;
|
||||||
print "</tr>\n";
|
|
||||||
$i++;
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
$total += $obj->total_ttc;
|
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
||||||
}
|
print $propalstatic->getNomUrl(1);
|
||||||
if ($total>0) {
|
print '</td>';
|
||||||
print '<tr class="liste_total"><td colspan="3" align="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
|
||||||
}
|
if ($obj->dp < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||||
print "</table><br>";
|
print '</td>';
|
||||||
}
|
print '<td width="16" align="center" class="nobordernopadding">';
|
||||||
}
|
$filename=sanitizeFileName($obj->ref);
|
||||||
else
|
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($obj->ref);
|
||||||
{
|
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$obj->propalid;
|
||||||
dolibarr_print_error($db);
|
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
||||||
}
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
print "</td>";
|
||||||
|
print "<td align=\"left\"><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dolibarr_trunc($obj->nom,44)."</a></td>\n";
|
||||||
|
print "<td align=\"right\">";
|
||||||
|
print dolibarr_print_date($obj->dp,'day')."</td>\n";
|
||||||
|
print "<td align=\"right\">".price($obj->total_ttc)."</td>";
|
||||||
|
print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($obj->fk_statut,3)."</td>\n";
|
||||||
|
print "</tr>\n";
|
||||||
|
$i++;
|
||||||
|
$total += $obj->total_ttc;
|
||||||
|
}
|
||||||
|
if ($total>0) {
|
||||||
|
print '<tr class="liste_total"><td colspan="3" align="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||||
|
}
|
||||||
|
print "</table><br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -494,67 +448,67 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
|
|
||||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
$NBMAX=5;
|
$NBMAX=5;
|
||||||
|
|
||||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp";
|
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut > 1";
|
$sql .= " WHERE p.fk_soc = s.rowid AND p.fk_statut > 1";
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.rowid = ".$socid;
|
$sql .= " AND s.rowid = ".$socid;
|
||||||
}
|
}
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
$sql .= " ORDER BY p.rowid DESC";
|
$sql .= " ORDER BY p.rowid DESC";
|
||||||
$sql .= $db->plimit($NBMAX, 0);
|
$sql .= $db->plimit($NBMAX, 0);
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="6">'.$langs->trans("LastClosedProposals",$NBMAX).'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="6">'.$langs->trans("LastClosedProposals",$NBMAX).'</td></tr>';
|
||||||
$var=False;
|
$var=False;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td nowrap="nowrap" width="140">';
|
print '<td nowrap="nowrap" width="140">';
|
||||||
|
|
||||||
$propalstatic->id=$objp->propalid;
|
$propalstatic->id=$objp->propalid;
|
||||||
$propalstatic->ref=$objp->ref;
|
$propalstatic->ref=$objp->ref;
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
||||||
print $propalstatic->getNomUrl(1);
|
print $propalstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="16" align="center" class="nobordernopadding">';
|
print '<td width="16" align="center" class="nobordernopadding">';
|
||||||
$filename=sanitizeFileName($objp->ref);
|
$filename=sanitizeFileName($objp->ref);
|
||||||
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref);
|
$filedir=$conf->propal->dir_output . '/' . sanitizeFileName($objp->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid;
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="left"><a href="fiche.php?socid='.$objp->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>';
|
print '<td align="left"><a href="fiche.php?socid='.$objp->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44).'</a></td>';
|
||||||
print "<td align=\"right\">";
|
print "<td align=\"right\">";
|
||||||
print dolibarr_print_date($objp->dp,'day')."</td>\n";
|
print dolibarr_print_date($objp->dp,'day')."</td>\n";
|
||||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||||
print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($objp->fk_statut,3)."</td>\n";
|
print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($objp->fk_statut,3)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -563,7 +517,7 @@ print '</td></tr>';
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -798,14 +798,6 @@ class MenuLeft {
|
|||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->bookmark->enabled))
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php?leftmenu=bookmarks", $langs->trans("Bookmarks"), 0, $user->rights->bookmark->lire);
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/fiche.php?action=create", $langs->trans("NewBookmark"), 1, $user->rights->bookmark->creer);
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List"), 1, $user->rights->bookmark->lire);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($conf->export->enabled))
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
@ -768,14 +768,6 @@ class MenuLeft {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->bookmark->enabled)
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php?leftmenu=bookmarks", $langs->trans("Bookmarks"), 0, $user->rights->bookmark->lire);
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/fiche.php?action=create", $langs->trans("NewBookmark"), 1, $user->rights->bookmark->creer);
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List"), 1, $user->rights->bookmark->lire);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($conf->export->enabled)
|
if ($conf->export->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
@ -231,8 +231,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled
|
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||||
|| $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|||||||
@ -231,8 +231,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled
|
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||||
|| $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|||||||
@ -231,8 +231,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->bookmark->enabled
|
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||||
|| $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|||||||
@ -262,9 +262,6 @@ insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`,
|
|||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3900__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0);
|
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3900__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0);
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/fiche.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0);
|
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/fiche.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0);
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/liste.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1);
|
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/liste.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1);
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4000__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/bookmarks/liste.php?leftmenu=bookmarks', 'Bookmarks', 0, 'other', '$user->rights->bookmark->lire', '', 2, 1);
|
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4001__+MAX_llx_menu__, 'tools', '', 4000__+MAX_llx_menu__, '/bookmarks/fiche.php?action=create', 'NewBookmark', 1, 'other', '$user->rights->bookmark->creer', '', 2, 0);
|
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4002__+MAX_llx_menu__, 'tools', '', 4000__+MAX_llx_menu__, '/bookmarks/liste.php', 'List', 1, 'other', '$user->rights->bookmark->lire', '', 2, 1);
|
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4100__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'FormatedExport', 0, 'exports', '$user->rights->export->lire', '', 2, 2);
|
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4100__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'FormatedExport', 0, 'exports', '$user->rights->export->lire', '', 2, 2);
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4101__+MAX_llx_menu__, 'tools', '', 4100__+MAX_llx_menu__, '/exports/export.php?leftmenu=export', 'NewExport', 1, 'exports', '$user->rights->export->creer', '', 2, 0);
|
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4101__+MAX_llx_menu__, 'tools', '', 4100__+MAX_llx_menu__, '/exports/export.php?leftmenu=export', 'NewExport', 1, 'exports', '$user->rights->export->creer', '', 2, 0);
|
||||||
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4130__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/admin/import/index.php?leftmenu=import', 'FormatedImport', 0, 'exports', '$user->rights->import->lire', '', 2, 2);
|
insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 4130__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/admin/import/index.php?leftmenu=import', 'FormatedImport', 0, 'exports', '$user->rights->import->lire', '', 2, 2);
|
||||||
|
|||||||
4
htdocs/langs/en_US/bookmarks.lang
Normal file
4
htdocs/langs/en_US/bookmarks.lang
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Dolibarr language file - en_US - marque pages
|
||||||
|
CHARSET=UTF-8
|
||||||
|
Bookm=Bookmarks
|
||||||
|
NewBookmark=New bookmark
|
||||||
4
htdocs/langs/fr_FR/bookmarks.lang
Normal file
4
htdocs/langs/fr_FR/bookmarks.lang
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Dolibarr language file - fr_FR - marque pages
|
||||||
|
CHARSET=UTF-8
|
||||||
|
Bookm=Marque pages
|
||||||
|
NewBookmark=Nouveau marque page
|
||||||
@ -120,14 +120,6 @@ function societe_prepare_head($objsoc)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->bookmark->enabled && $user->rights->bookmark->creer)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/bookmarks/fiche.php?action=add&socid=".$objsoc->id."&urlsource=".$_SERVER["PHP_SELF"]."?socid=".$objsoc->id;
|
|
||||||
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
|
|
||||||
$head[$h][2] = 'image';
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -143,14 +143,6 @@ function product_prepare_head($product, $user)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->bookmark->enabled && $user->rights->bookmark->creer)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/bookmarks/fiche.php?action=addproduct&id=".$product->id."&urlsource=".$_SERVER["PHP_SELF"]."?id=".$product->id;
|
|
||||||
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
|
|
||||||
$head[$h][2] = 'image';
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -901,6 +901,21 @@ function left_menu($menu_array, $helppagename='', $form_search='')
|
|||||||
{
|
{
|
||||||
print $form_search;
|
print $form_search;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Zone d'affichage permanente des marque pages
|
||||||
|
if ($conf->bookmark->enabled && $user->rights->bookmark->lire)
|
||||||
|
{
|
||||||
|
include_once (DOL_DOCUMENT_ROOT.'/bookmarks/bookmarks.lib.php');
|
||||||
|
$langs->load("bookmarks");
|
||||||
|
|
||||||
|
$ret=printBookmarksList($db, $langs);
|
||||||
|
print "\n";
|
||||||
|
print "<!-- Begin Bookmarks -->\n";
|
||||||
|
print '<div class="blockvmenupair">'."\n";
|
||||||
|
print $ret;
|
||||||
|
print '</div>'."\n";
|
||||||
|
print "<!-- End Bookmarks -->\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Lien vers l'aide en ligne (uniquement si langue fr_FR)
|
// Lien vers l'aide en ligne (uniquement si langue fr_FR)
|
||||||
if ($helppagename)
|
if ($helppagename)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
|
* Copyright (C) 2003 <EFBFBD>ric Seigne <erics@rycks.com>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
* Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
||||||
@ -142,7 +142,7 @@ function llxHeader($head = "")
|
|||||||
|
|
||||||
if (! empty($conf->telephonie->enabled))
|
if (! empty($conf->telephonie->enabled))
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Téléphonie");
|
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "T<EFBFBD>l<EFBFBD>phonie");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->don->enabled))
|
if (! empty($conf->don->enabled))
|
||||||
@ -173,11 +173,6 @@ function llxHeader($head = "")
|
|||||||
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
|
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->bookmark->enabled) && $user->rights->bookmark->lire)
|
|
||||||
{
|
|
||||||
$menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($conf->export->enabled))
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user