27if (!defined(
'NOLOGIN')) {
30if (!defined(
'NOCSRFCHECK')) {
31 define(
"NOCSRFCHECK", 1);
33if (!defined(
'NOIPCHECK')) {
34 define(
'NOIPCHECK',
'1');
36if (!defined(
'NOBROWSERNOTIF')) {
37 define(
'NOBROWSERNOTIF',
'1');
43$entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
44if (is_numeric($entity)) {
45 define(
"DOLENTITY", $entity);
49require
'../../main.inc.php';
52if (!isModEnabled(
'adherent')) {
56$langs->loadLangs(array(
"main",
"members",
"companies",
"other"));
70 print
'<body class="public_body">'.
"\n";
87$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
88$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
89$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
90$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
91if (empty($page) || $page == -1) {
94$offset = $limit * $page;
105 $sortfield =
"lastname";
113if (empty($conf->global->MEMBER_PUBLIC_ENABLED)) {
117$form =
new Form($db);
120if (!empty($conf->global->MEMBER_PUBLIC_CSS)) {
121 $morehead =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.
'">';
123 $morehead =
'<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.
'/theme/eldy/style.css.php">';
126llxHeaderVierge($langs->trans(
"ListOfValidatedPublicMembers"), $morehead);
128$sql =
"SELECT rowid, firstname, lastname, societe, zip, town, email, birth, photo";
129$sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent";
130$sql .=
" WHERE entity = ".((int) $entity);
131$sql .=
" AND statut = 1";
132$sql .=
" AND public = 1";
133$sql .= $db->order($sortfield, $sortorder);
134$sql .= $db->plimit($conf->liste_limit + 1, $offset);
140$result = $db->query($sql);
142 $num = $db->num_rows($result);
145 $param =
"&statut=$statut&sortorder=$sortorder&sortfield=$sortfield";
146 print_barre_liste($langs->trans(
"ListOfValidatedPublicMembers"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, 0,
'');
147 print
'<table class="public_border centpercent">';
149 print
'<tr class="public_liste_titre">';
150 print
'<th class="left"><a href="'.$_SERVER[
"PHP_SELF"].
'?page='.$page.
'&sortorder=ASC&sortfield=firstname">'.
dolGetFirstLastname($langs->trans(
"Firstname"), $langs->trans(
"Lastname")).
'</a></th>';
151 print
'<th class="left"><a href="'.$_SERVER[
"PHP_SELF"].
'?page='.$page.
'&sortorder=ASC&sortfield=societe">'.$langs->trans(
"Company").
'</a></th>'.
"\n";
153 print_liste_field_titre(
"EMail", $_SERVER[
"PHP_SELF"],
"email",
'', $param,
'', $sortfield, $sortorder,
'left public_');
154 print_liste_field_titre(
"Zip", $_SERVER[
"PHP_SELF"],
"zip",
"", $param,
'', $sortfield, $sortorder,
'left public_');
155 print_liste_field_titre(
"Town", $_SERVER[
"PHP_SELF"],
"town",
"", $param,
'', $sortfield, $sortorder,
'left public_');
156 print_liste_field_titre(
"Photo", $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center public_');
159 while ($i < $num && $i < $conf->liste_limit) {
160 $objp = $db->fetch_object($result);
162 print
'<tr class="oddeven">';
163 print
'<td><a href="public_card.php?id='.$objp->rowid.
'">'.
dolGetFirstLastname($objp->firstname, $objp->lastname).
'</a></td>'.
"\n";
164 print
'<td>'.$objp->societe.
'</td>'.
"\n";
165 print
'<td>'.$objp->email.
'</td>'.
"\n";
166 print
'<td>'.$objp->zip.
'</td>'.
"\n";
167 print
'<td>'.$objp->town.
'</td>'.
"\n";
168 if (isset($objp->photo) && $objp->photo !=
'') {
169 print
'<td class="center">';
170 print $form->showphoto(
'memberphoto', $objp, 64);
173 print
"<td> </td>\n";
if(!defined( 'NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined( 'NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined( 'NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined( 'NOIPCHECK')) llxHeaderVierge()
Header function.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
dolGetFirstLastname($firstname, $lastname, $nameorder=-1)
Return firstname and lastname in correct order.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.
llxFooterVierge()
Show footer for member list.
httponly_accessforbidden($message=1, $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.