Dolibarrize page
This commit is contained in:
parent
04bca1cc1f
commit
a6d1cdcef9
@ -50,6 +50,7 @@ $mode = GETPOST('mode', 'alopha');
|
|||||||
|
|
||||||
$sall = GETPOST("sall", "alpha");
|
$sall = GETPOST("sall", "alpha");
|
||||||
$filter = GETPOST("filter", 'alpha');
|
$filter = GETPOST("filter", 'alpha');
|
||||||
|
$search_ref = GETPOST('search_ref', 'alpha');
|
||||||
$search_lastname = GETPOST('search_lastname', 'alpha');
|
$search_lastname = GETPOST('search_lastname', 'alpha');
|
||||||
$search_login = GETPOST('search_login', 'alpha');
|
$search_login = GETPOST('search_login', 'alpha');
|
||||||
$search_email = GETPOST('search_email', 'alpha');
|
$search_email = GETPOST('search_email', 'alpha');
|
||||||
@ -96,15 +97,6 @@ $hookmanager->initHooks(array('membertypecard', 'globalcard'));
|
|||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
|
||||||
$search_lastname = "";
|
|
||||||
$search_login = "";
|
|
||||||
$search_email = "";
|
|
||||||
$type = "";
|
|
||||||
$sall = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'adherent', $rowid, 'adherent_type');
|
$result = restrictedArea($user, 'adherent', $rowid, 'adherent_type');
|
||||||
|
|
||||||
@ -113,6 +105,15 @@ $result = restrictedArea($user, 'adherent', $rowid, 'adherent_type');
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
||||||
|
$search_ref = "";
|
||||||
|
$search_lastname = "";
|
||||||
|
$search_login = "";
|
||||||
|
$search_email = "";
|
||||||
|
$type = "";
|
||||||
|
$sall = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) {
|
if (GETPOST('cancel', 'alpha')) {
|
||||||
$action = 'list';
|
$action = 'list';
|
||||||
$massaction = '';
|
$massaction = '';
|
||||||
@ -581,9 +582,9 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe as company,";
|
$sql = "SELECT d.rowid, d.ref, d.entity, d.login, d.firstname, d.lastname, d.societe as company, d.fk_soc,";
|
||||||
$sql .= " d.datefin,";
|
$sql .= " d.datefin,";
|
||||||
$sql .= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut as status,";
|
$sql .= " d.email, d.photo, d.fk_adherent_type as type_id, d.morphy, d.statut as status,";
|
||||||
$sql .= " t.libelle as type, t.subscription, t.amount";
|
$sql .= " t.libelle as type, t.subscription, t.amount";
|
||||||
|
|
||||||
$sqlfields = $sql; // $sql fields to remove for count total
|
$sqlfields = $sql; // $sql fields to remove for count total
|
||||||
@ -603,6 +604,9 @@ if ($rowid > 0) {
|
|||||||
$sql .= natural_search(array("d.firstname", "d.lastname"), GETPOST('search', 'alpha'));
|
$sql .= natural_search(array("d.firstname", "d.lastname"), GETPOST('search', 'alpha'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!empty($search_ref)) {
|
||||||
|
$sql .= natural_search("d.ref", $search_ref);
|
||||||
|
}
|
||||||
if (!empty($search_lastname)) {
|
if (!empty($search_lastname)) {
|
||||||
$sql .= natural_search(array("d.firstname", "d.lastname"), $search_lastname);
|
$sql .= natural_search(array("d.firstname", "d.lastname"), $search_lastname);
|
||||||
}
|
}
|
||||||
@ -691,6 +695,9 @@ if ($rowid > 0) {
|
|||||||
if (!empty($status)) {
|
if (!empty($status)) {
|
||||||
$param .= "&status=".urlencode($status);
|
$param .= "&status=".urlencode($status);
|
||||||
}
|
}
|
||||||
|
if (!empty($search_ref)) {
|
||||||
|
$param .= "&search_ref=".urlencode($search_ref);
|
||||||
|
}
|
||||||
if (!empty($search_lastname)) {
|
if (!empty($search_lastname)) {
|
||||||
$param .= "&search_lastname=".urlencode($search_lastname);
|
$param .= "&search_lastname=".urlencode($search_lastname);
|
||||||
}
|
}
|
||||||
@ -732,6 +739,9 @@ if ($rowid > 0) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<td class="liste_titre left">';
|
||||||
|
print '<input class="flat maxwidth100" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat maxwidth100" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
print '<input class="flat maxwidth100" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
||||||
|
|
||||||
@ -761,6 +771,7 @@ if ($rowid > 0) {
|
|||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.ref", $param, "", "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
|
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("MemberNature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
print_liste_field_titre("MemberNature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
||||||
@ -780,13 +791,19 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
$datefin = $db->jdate($objp->datefin);
|
$datefin = $db->jdate($objp->datefin);
|
||||||
|
|
||||||
|
$adh->id = $objp->rowid;
|
||||||
|
$adh->ref = $objp->ref;
|
||||||
|
$adh->login = $objp->login;
|
||||||
$adh->lastname = $objp->lastname;
|
$adh->lastname = $objp->lastname;
|
||||||
$adh->firstname = $objp->firstname;
|
$adh->firstname = $objp->firstname;
|
||||||
$adh->datefin = $datefin;
|
$adh->datefin = $datefin;
|
||||||
$adh->need_subscription = $objp->subscription;
|
$adh->need_subscription = $objp->subscription;
|
||||||
$adh->statut = $objp->status;
|
$adh->statut = $objp->status;
|
||||||
|
$adh->email = $objp->email;
|
||||||
|
$adh->photo = $objp->photo;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
@ -798,6 +815,12 @@ if ($rowid > 0) {
|
|||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ref
|
||||||
|
print "<td>";
|
||||||
|
print $adh->getNomUrl(-1, 0, 'card', 'ref', '', -1, 0, 1);
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
// Lastname
|
// Lastname
|
||||||
if ($objp->company != '') {
|
if ($objp->company != '') {
|
||||||
print '<td><a href="card.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"), "user", 'class="paddingright"').$adh->getFullName($langs, 0, -1, 20).' / '.dol_trunc($objp->company, 12).'</a></td>'."\n";
|
print '<td><a href="card.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"), "user", 'class="paddingright"').$adh->getFullName($langs, 0, -1, 20).' / '.dol_trunc($objp->company, 12).'</a></td>'."\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user