27 if (!defined(
'NOLOGIN')) define(
"NOLOGIN", 1);
28 if (!defined(
'NOCSRFCHECK')) define(
"NOCSRFCHECK", 1);
29 if (!defined(
'NOIPCHECK')) define(
'NOIPCHECK',
'1');
30 if (!defined(
'NOBROWSERNOTIF')) define(
'NOBROWSERNOTIF',
'1');
35 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
36 if (is_numeric($entity)) define(
"DOLENTITY", $entity);
38 require
'../../main.inc.php';
44 $langs->loadLangs(array(
"main",
"members",
"companies",
"other"));
56 global $user, $conf, $langs;
58 header(
"Content-type: text/html; charset=".$conf->file->character_set_client);
61 print "<title>".$title.
"</title>\n";
62 if ($head)
print $head.
"\n";
64 print '<body class="public_body">'.
"\n";
81 $sortfield =
GETPOST(
"sortfield",
'alpha');
82 $sortorder =
GETPOST(
"sortorder",
'alpha');
83 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
85 if (empty($page) || $page == -1) { $page = 0; }
86 $offset = $limit * $page;
87 $pageprev = $page - 1;
88 $pagenext = $page + 1;
93 if (!$sortorder) { $sortorder =
"ASC"; }
94 if (!$sortfield) { $sortfield =
"lastname"; }
101 $form =
new Form($db);
104 if (!empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.
'">';
105 else $morehead =
'<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.
'/theme/eldy/style.css.php">';
107 llxHeaderVierge($langs->trans(
"ListOfValidatedPublicMembers"), $morehead);
109 $sql =
"SELECT rowid, firstname, lastname, societe, zip, town, email, birth, photo";
110 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent";
111 $sql .=
" WHERE entity = ".$entity;
112 $sql .=
" AND statut = 1";
113 $sql .=
" AND public = 1";
114 $sql .= $db->order($sortfield, $sortorder);
115 $sql .= $db->plimit($conf->liste_limit + 1, $offset);
121 $result = $db->query($sql);
124 $num = $db->num_rows($result);
127 $param =
"&statut=$statut&sortorder=$sortorder&sortfield=$sortfield";
128 print_barre_liste($langs->trans(
"ListOfValidatedPublicMembers"), $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, 0,
'');
129 print '<table class="public_border centpercent">';
131 print
'<tr class="public_liste_titre">';
132 print
'<td><a href="'.$_SERVER[
"PHP_SELF"].
'?page='.$page.
'&sortorder=ASC&sortfield=firstname">'.
dolGetFirstLastname($langs->trans(
"Firstname"), $langs->trans(
"Lastname")).
'</a></td>';
133 print
'<td><a href="'.$_SERVER[
"PHP_SELF"].
'?page='.$page.
'&sortorder=ASC&sortfield=societe">'.$langs->trans(
"Company").
'</a></td>'.
"\n";
135 print_liste_field_titre(
"EMail", $_SERVER[
"PHP_SELF"],
"email",
'', $param,
'', $sortfield, $sortorder,
'public_');
136 print_liste_field_titre(
"Zip", $_SERVER[
"PHP_SELF"],
"zip",
"", $param,
'', $sortfield, $sortorder,
'public_');
137 print_liste_field_titre(
"Town", $_SERVER[
"PHP_SELF"],
"town",
"", $param,
'', $sortfield, $sortorder,
'public_');
141 while ($i < $num && $i < $conf->liste_limit)
143 $objp = $db->fetch_object($result);
145 print
'<tr class="oddeven">';
146 print
'<td><a href="public_card.php?id='.$objp->rowid.
'">'.
dolGetFirstLastname($objp->firstname, $objp->lastname).
'</a></td>'.
"\n";
147 print
'<td>'.$objp->societe.
'</td>'.
"\n";
148 print
'<td>'.$objp->email.
'</td>'.
"\n";
149 print
'<td>'.$objp->zip.
'</td>'.
"\n";
150 print
'<td>'.$objp->town.
'</td>'.
"\n";
151 if (isset($objp->photo) && $objp->photo !=
'')
154 print $form->showphoto(
'memberphoto', $objp, 64);
157 print
"<td> </td>\n";
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
printCommonFooter($zone= 'private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print $_SERVER["PHP_SELF"]
Edit parameters.
llxHeaderVierge()
Header function.
print
Draft customers invoices.
llxFooterVierge()
Footer function.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dolGetFirstLastname($firstname, $lastname, $nameorder=-1)
Return firstname and lastname in correct order.