diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 174d0357ab2..00fa42e21f0 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 5c41d857bc7..b63a99d19a8 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -1,7 +1,8 @@ - * Copyright (C) 2001-2002 Jean-Louis Bergamo - * Copyright (C) 2006-2011 Laurent Destailleur +/* Copyright (C) 2001-2002 Rodolphe Quiedeville + * Copyright (C) 2001-2002 Jean-Louis Bergamo + * Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin * * 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 '
'."\n"; -print ''; -print ''; +print ''; +print ''; +print ''; print '
'; print ''."\n"; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 7835d1e3055..c5435badeb1 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -1,7 +1,8 @@ - * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2007-2012 Laurent Destailleur +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2007-2012 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin * * 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 7edaba237a2..bf91f3616aa 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -1,7 +1,8 @@ - * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2009 Laurent Destailleur +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin * * 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 5382f8624a0..10545bc8101 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -312,8 +312,8 @@ td.showDragHandle { /* ============================================================================== */ div.fiche { - margin-: browser->phone) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'20':'24'; ?>px; - margin-: browser->phone)?'12':'6'; ?>px; + margin-: browser->phone) || empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?'20':'24')); ?>px; + margin-: browser->phone)?'12':'6')); ?>px; } div.fichecenter { @@ -506,6 +506,7 @@ div.tmenucenter .mainmenuaspan { padding-right: 4px; + text-shadow: 1px 1px 1px #DDD; }