|
@@ -57,6 +57,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selec
|
|
|
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeelist'; // To manage different context of search
|
|
|
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
|
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
|
|
+$mode = GETPOST('mode', 'alpha');
|
|
|
|
|
|
$id = GETPOST('id', 'int');
|
|
|
$conf_or_booth_id = GETPOST('conforboothid', 'int');
|
|
@@ -239,11 +240,6 @@ $now = dol_now();
|
|
|
|
|
|
//$help_url="EN:Module_ConferenceOrBoothAttendee|FR:Module_ConferenceOrBoothAttendee_FR|ES:Módulo_ConferenceOrBoothAttendee";
|
|
|
$help_url = '';
|
|
|
-if ($confOrBooth->id > 0) {
|
|
|
- $title = $langs->trans('ListOfAttendeesPerConference');
|
|
|
-} else {
|
|
|
- $title = $langs->trans('ListOfAttendeesOfEvent');
|
|
|
-}
|
|
|
$morejs = array();
|
|
|
$morecss = array();
|
|
|
|
|
@@ -377,7 +373,11 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+if ($confOrBooth->id > 0) {
|
|
|
+ $title = $langs->trans('ListOfAttendeesPerConference');
|
|
|
+} else {
|
|
|
+ $title = $langs->trans('ListOfAttendeesOfEvent');
|
|
|
+}
|
|
|
|
|
|
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs');
|
|
|
|
|
@@ -412,7 +412,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|
|
// Title
|
|
|
$morehtmlref .= $projectstatic->title;
|
|
|
// Thirdparty
|
|
|
- if ($projectstatic->thirdparty->id > 0) {
|
|
|
+ if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
|
|
|
$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
|
|
}
|
|
|
$morehtmlref .= '</div>';
|
|
@@ -591,7 +591,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|
|
//print '</span>';
|
|
|
print '</td><td>';
|
|
|
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
|
|
|
- $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
|
|
+ $encodedsecurekey = dol_hash(getDolUserString("EVENTORGANIZATION_SECUREKEYEVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
|
|
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
|
|
//print '<div class="urllink">';
|
|
|
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
|
@@ -608,7 +608,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|
|
//print '</span>';
|
|
|
print '</td><td>';
|
|
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.'&type=global';
|
|
|
- $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
|
|
+ $encodedsecurekey = dol_hash(getDolUserString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
|
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
|
|
//print '<div class="urllink">';
|
|
|
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
|
@@ -630,7 +630,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|
|
if (empty($confOrBooth->id)) {
|
|
|
$head = conferenceorboothProjectPrepareHead($projectstatic);
|
|
|
$tab = 'attendees';
|
|
|
- print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($project->public ? 'projectpub' : 'project'), 0, '', 'reposition');
|
|
|
+ print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, (!empty($project->public) ? 'projectpub' : 'project'), 0, '', 'reposition');
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -797,11 +797,11 @@ foreach ($object->fields as $key => $val) {
|
|
|
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
|
|
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
|
|
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
|
|
- print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
|
|
+ print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
|
|
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) {
|
|
|
- print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1);
|
|
|
+ print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1);
|
|
|
} elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
|
|
- print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
|
|
+ print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.(isset($search[$key]) ? dol_escape_htmltag($search[$key]) : "").'">';
|
|
|
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
|
|
print '<div class="nowrap">';
|
|
|
print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
|
@@ -872,6 +872,7 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar
|
|
|
// --------------------------------------------------------------------
|
|
|
$i = 0;
|
|
|
$totalarray = array();
|
|
|
+$totalarray['nbfield'] = 0;
|
|
|
while ($i < ($limit ? min($num, $limit) : $num)) {
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
if (empty($obj)) {
|
|
@@ -880,7 +881,6 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|
|
|
|
|
// Store properties in $object
|
|
|
$object->setVarsFromFetchObj($obj);
|
|
|
-
|
|
|
// Show here line of result
|
|
|
print '<tr class="oddeven">';
|
|
|
foreach ($object->fields as $key => $val) {
|