diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 174d0357ab2c6c75bbf8866f3456e13871c6f2b0..00fa42e21f085999f6c87b2979b28862ace7b131 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -135,6 +135,10 @@ if (! defined('NOREQUIREDB')) { $conf->entity = GETPOST("entity",'int'); } + else if (defined('DOLENTITY') && is_int(DOLENTITY)) // For public page with MultiCompany module + { + $conf->entity = DOLENTITY; + } //print "Will work with data into entity instance number '".$conf->entity."'"; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5c41d857bc7f8e1154f5ed2881267d3e7fbf2b86..b63a99d19a8850e32064bc767c9fb5060d6f3672 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2001-2002 Jean-Louis Bergamo <jlb@j1b.org> - * Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2001-2002 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 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 @@ -36,6 +37,13 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) +{ + define("DOLENTITY", $entity); +} + require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"); @@ -359,8 +367,9 @@ jQuery(document).ready(function () { // Print form print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'."\n"; -print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; -print '<input type="hidden" name="action" value="add">'; +print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" / >'; +print '<input type="hidden" name="entity" value"'.$entity.'" />'; +print '<input type="hidden" name="action" value="add" />'; print '<div id="divsubscribe">'; print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 7835d1e305538d763be7461b9862018a335e1cbb..c5435badeb16a991d10f97c33998c43ac100f5bb 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> - * Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 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 @@ -26,6 +27,13 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : 1); +if (is_int($entity)) +{ + define("DOLENTITY", $entity); +} + require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"); @@ -40,7 +48,7 @@ $langs->load("members"); $langs->load("companies"); $langs->load("other"); -$rowid=$_GET["id"]; +$id=GETPOST('id','int'); $object = new Adherent($db); $extrafields = new ExtraFields($db); @@ -62,7 +70,7 @@ llxHeaderVierge($langs->trans("MemberCard")); // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label('member'); -if ($rowid > 0) +if ($id > 0) { $res=$object->fetch($id,$ref); if ($res < 0) { dol_print_error($db,$object->error); exit; } diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 7edaba237a208c68b4d6819ee1d70e6fad2419c2..bf91f3616aa90982763169c99aa40fd156b6c91a 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> - * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 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 @@ -26,6 +27,13 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : 1); +if (is_int($entity)) +{ + define("DOLENTITY", $entity); +} + require("../../main.inc.php"); // Security check @@ -96,7 +104,8 @@ llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers")); $sql = "SELECT rowid, prenom, nom, societe, cp, ville, email, naiss, photo"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent"; -$sql.= " WHERE statut = 1"; +$sql.= " WHERE entity = ".$entity; +$sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 5382f8624a052560fdffb881dc896571b0f30197..10545bc8101ee94de87844f3f78e0bd594a8a510 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -312,8 +312,8 @@ td.showDragHandle { /* ============================================================================== */ div.fiche { - margin-<?php print $left; ?>: <?php print (empty($conf->browser->phone) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'20':'24'; ?>px; - margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'12':'6'; ?>px; + margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->browser->phone) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'20':'24')); ?>px; + margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->browser->phone)?'12':'6')); ?>px; } div.fichecenter { @@ -506,6 +506,7 @@ div.tmenucenter .mainmenuaspan { padding-right: 4px; + text-shadow: 1px 1px 1px #DDD; }