recruitmentcandidature_list.php 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. <?php
  2. /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. */
  17. /**
  18. * \file recruitmentcandidature_list.php
  19. * \ingroup recruitment
  20. * \brief List page for recruitmentcandidature
  21. */
  22. // Load Dolibarr environment
  23. require_once '../main.inc.php';
  24. require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
  25. require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
  27. require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
  28. require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
  29. require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
  30. require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
  31. // Load translation files required by the page
  32. $langs->loadLangs(array("recruitment", "other"));
  33. $id = GETPOST('id', 'int');
  34. $ref = GETPOST('ref', 'alpha');
  35. $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
  36. $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
  37. $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
  38. $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
  39. $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
  40. $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
  41. $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : ((empty($id) && empty($ref)) ? 'recruitmentcandidaturelist' : 'recruitmentjobposition_candidature'); // To manage different context of search
  42. $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
  43. $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
  44. $mode = GETPOST('mode', 'aZ');
  45. // Load variable for pagination
  46. $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
  47. $sortfield = GETPOST('sortfield', 'aZ09comma');
  48. $sortorder = GETPOST('sortorder', 'aZ09comma');
  49. $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
  50. if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
  51. // If $page is not defined, or '' or -1 or if we click on clear filters
  52. $page = 0;
  53. }
  54. $offset = $limit * $page;
  55. $pageprev = $page - 1;
  56. $pagenext = $page + 1;
  57. // Initialize technical objects
  58. $object = new RecruitmentCandidature($db);
  59. $extrafields = new ExtraFields($db);
  60. $diroutputmassaction = $conf->recruitment->dir_output.'/temp/massgeneration/'.$user->id;
  61. $hookmanager->initHooks(array('recruitmentcandidaturelist')); // Note that conf->hooks_modules contains array
  62. // Fetch optionals attributes and labels
  63. $extrafields->fetch_name_optionals_label($object->table_element);
  64. //$extrafields->fetch_name_optionals_label($object->table_element_line);
  65. $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
  66. // Default sort order (if not yet defined by previous GETPOST)
  67. if (!$sortfield) {
  68. $sortfield = "t.date_creation"; // Set here default search field. By default 1st field in definition.
  69. }
  70. if (!$sortorder) {
  71. $sortorder = "DESC";
  72. }
  73. // Initialize array of search criterias
  74. $search_all = GETPOST('search_all', 'alphanohtml');
  75. $search = array();
  76. foreach ($object->fields as $key => $val) {
  77. if (GETPOST('search_'.$key, 'alpha') !== '') {
  78. $search[$key] = GETPOST('search_'.$key, 'alpha');
  79. }
  80. if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
  81. $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int'));
  82. $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int'));
  83. }
  84. }
  85. // List of fields to search into when doing a "search in all"
  86. $fieldstosearchall = array();
  87. foreach ($object->fields as $key => $val) {
  88. if (!empty($val['searchall'])) {
  89. $fieldstosearchall['t.'.$key] = $val['label'];
  90. }
  91. }
  92. // Definition of array of fields for columns
  93. $arrayfields = array();
  94. foreach ($object->fields as $key => $val) {
  95. // If $val['visible']==0, then we never show the field
  96. if (!empty($val['visible'])) {
  97. $visible = (int) dol_eval($val['visible'], 1);
  98. $arrayfields['t.'.$key] = array(
  99. 'label'=>$val['label'],
  100. 'checked'=>(($visible < 0) ? 0 : 1),
  101. 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)),
  102. 'position'=>$val['position'],
  103. 'help'=> isset($val['help']) ? $val['help'] : ''
  104. );
  105. }
  106. }
  107. // Extra fields
  108. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
  109. // Load object
  110. $jobposition = new RecruitmentJobPosition($db);
  111. if ($id > 0 || !empty($ref)) {
  112. $jobposition->fetch($id, $ref);
  113. $id = $jobposition->id;
  114. }
  115. $object->fields = dol_sort_array($object->fields, 'position');
  116. $arrayfields = dol_sort_array($arrayfields, 'position');
  117. $permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
  118. $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
  119. $permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete;
  120. // Security check - Protection if external user
  121. //if ($user->socid > 0) accessforbidden();
  122. //if ($user->socid > 0) $socid = $user->socid;
  123. //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
  124. if ($jobposition->id > 0) {
  125. $isdraft = (($jobposition->status == $jobposition::STATUS_DRAFT) ? 1 : 0);
  126. $result = restrictedArea($user, 'recruitment', $jobposition->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft);
  127. } else {
  128. $result = restrictedArea($user, 'recruitment', 0, 'recruitment_recruitmentcandidature', 'recruitmentjobposition');
  129. }
  130. /*
  131. * Actions
  132. */
  133. if (GETPOST('cancel', 'alpha')) {
  134. $action = 'list';
  135. $massaction = '';
  136. }
  137. if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
  138. $massaction = '';
  139. }
  140. $parameters = array();
  141. $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
  142. if ($reshook < 0) {
  143. setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
  144. }
  145. if (empty($reshook)) {
  146. // Selection of new fields
  147. include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
  148. // Purge search criteria
  149. 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
  150. foreach ($object->fields as $key => $val) {
  151. $search[$key] = '';
  152. if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
  153. $search[$key.'_dtstart'] = '';
  154. $search[$key.'_dtend'] = '';
  155. }
  156. }
  157. $toselect = array();
  158. $search_array_options = array();
  159. }
  160. if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
  161. || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
  162. $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
  163. }
  164. // Mass actions
  165. $objectclass = 'RecruitmentCandidature';
  166. $objectlabel = 'RecruitmentCandidature';
  167. $uploaddir = $conf->recruitment->dir_output;
  168. include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
  169. }
  170. /*
  171. * View
  172. */
  173. $form = new Form($db);
  174. $now = dol_now();
  175. //$help_url="EN:Module_RecruitmentCandidature|FR:Module_RecruitmentCandidature_FR|ES:Módulo_RecruitmentCandidature";
  176. $help_url = '';
  177. $title = $langs->trans('RecruitmentCandidatures');
  178. $morejs = array();
  179. $morecss = array();
  180. // Build and execute select
  181. // --------------------------------------------------------------------
  182. $sql = 'SELECT ';
  183. $sql .= $object->getFieldList('t');
  184. // Add fields from extrafields
  185. if (!empty($extrafields->attributes[$object->table_element]['label'])) {
  186. foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
  187. $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
  188. }
  189. }
  190. // Add fields from hooks
  191. $parameters = array();
  192. $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
  193. $sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
  194. $sql = preg_replace('/,\s*$/', '', $sql);
  195. $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
  196. if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
  197. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
  198. }
  199. // Add table from hooks
  200. $parameters = array();
  201. $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
  202. $sql .= $hookmanager->resPrint;
  203. if ($object->ismultientitymanaged == 1) {
  204. $sql .= " WHERE t.entity IN (".getEntity($object->element).")";
  205. } else {
  206. $sql .= " WHERE 1 = 1";
  207. }
  208. foreach ($search as $key => $val) {
  209. if (array_key_exists($key, $object->fields)) {
  210. if ($key == 'status' && $search[$key] == -1) {
  211. continue;
  212. }
  213. $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
  214. if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
  215. if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) {
  216. $search[$key] = '';
  217. }
  218. $mode_search = 2;
  219. }
  220. if ($search[$key] != '') {
  221. $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
  222. }
  223. } else {
  224. if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
  225. $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
  226. if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
  227. if (preg_match('/_dtstart$/', $key)) {
  228. $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'";
  229. }
  230. if (preg_match('/_dtend$/', $key)) {
  231. $sql .= " AND t.".$db->escape($columnName)." <= '" . $db->idate($search[$key])."'";
  232. }
  233. }
  234. }
  235. }
  236. }
  237. if ($search_all) {
  238. $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
  239. }
  240. if (!empty($id)) {
  241. $sql .= " AND t.fk_recruitmentjobposition = ".((int) $id);
  242. }
  243. //$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear);
  244. // Add where from extra fields
  245. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
  246. // Add where from hooks
  247. $parameters = array();
  248. $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
  249. $sql .= $hookmanager->resPrint;
  250. /* If a group by is required
  251. $sql.= " GROUP BY ";
  252. foreach ($object->fields as $key => $val) {
  253. $sql .= "t.".$db->escape($key).", ";
  254. }
  255. // Add fields from extrafields
  256. if (!empty($extrafields->attributes[$object->table_element]['label'])) {
  257. foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
  258. $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
  259. }
  260. }
  261. // Add where from hooks
  262. $parameters=array();
  263. $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
  264. $sql .= $hookmanager->resPrint;
  265. $sql = preg_replace('/,\s*$/', '', $sql);
  266. */
  267. // Count total nb of records
  268. $nbtotalofrecords = '';
  269. if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
  270. /* The fast and low memory method to get and count full list converts the sql into a sql count */
  271. $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql);
  272. $resql = $db->query($sqlforcount);
  273. if ($resql) {
  274. $objforcount = $db->fetch_object($resql);
  275. $nbtotalofrecords = $objforcount->nbtotalofrecords;
  276. } else {
  277. dol_print_error($db);
  278. }
  279. if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0
  280. $page = 0;
  281. $offset = 0;
  282. }
  283. $db->free($resql);
  284. }
  285. // Complete request and execute it with limit
  286. $sql .= $db->order($sortfield, $sortorder);
  287. if ($limit) {
  288. $sql .= $db->plimit($limit + 1, $offset);
  289. }
  290. $resql = $db->query($sql);
  291. if (!$resql) {
  292. dol_print_error($db);
  293. exit;
  294. }
  295. $num = $db->num_rows($resql);
  296. // Direct jump if only one record found
  297. if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
  298. $obj = $db->fetch_object($resql);
  299. $id = $obj->rowid;
  300. header("Location: ".DOL_URL_ROOT.'/recruitment/recruitmentcandidature_card.php?id='.$id);
  301. exit;
  302. }
  303. // Output page
  304. // --------------------------------------------------------------------
  305. llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
  306. // Part to show record
  307. if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
  308. $savobject = $object;
  309. $object = $jobposition;
  310. $res = $object->fetch_optionals();
  311. $head = recruitmentjobpositionPrepareHead($object);
  312. print dol_get_fiche_head($head, 'candidatures', $langs->trans("RecruitmentCandidatures"), -1, $object->picto);
  313. $formconfirm = '';
  314. // Confirmation to delete
  315. if ($action == 'delete') {
  316. $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRecruitmentJobPosition'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
  317. }
  318. // Confirmation to delete line
  319. if ($action == 'deleteline') {
  320. $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
  321. }
  322. // Clone confirmation
  323. if ($action == 'clone') {
  324. // Create an array for form
  325. $formquestion = array();
  326. $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
  327. }
  328. // Confirmation of action xxxx
  329. if ($action == 'xxx') {
  330. $formquestion = array();
  331. /*
  332. $forcecombo=0;
  333. if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
  334. $formquestion = array(
  335. // 'text' => $langs->trans("ConfirmClone"),
  336. // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
  337. // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
  338. // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
  339. );
  340. */
  341. $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
  342. }
  343. // Call Hook formConfirm
  344. $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
  345. $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
  346. if (empty($reshook)) {
  347. $formconfirm .= $hookmanager->resPrint;
  348. } elseif ($reshook > 0) {
  349. $formconfirm = $hookmanager->resPrint;
  350. }
  351. // Print form confirm
  352. print $formconfirm;
  353. // Object card
  354. // ------------------------------------------------------------
  355. $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
  356. $morehtmlref = '<div class="refidno">';
  357. /*
  358. // Ref customer
  359. $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
  360. $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
  361. // Thirdparty
  362. $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
  363. */
  364. // Project
  365. if (!empty($conf->project->enabled)) {
  366. $langs->load("projects");
  367. $morehtmlref .= $langs->trans('Project').' ';
  368. if ($permissiontoadd) {
  369. if ($action != 'classify') {
  370. $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>';
  371. }
  372. $morehtmlref .= ' : ';
  373. if ($action == 'classify') {
  374. //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
  375. $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
  376. $morehtmlref .= '<input type="hidden" name="action" value="classin">';
  377. $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
  378. $morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
  379. $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
  380. $morehtmlref .= '</form>';
  381. } else {
  382. $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
  383. }
  384. } else {
  385. if (!empty($object->fk_project)) {
  386. $proj = new Project($db);
  387. $proj->fetch($object->fk_project);
  388. $morehtmlref .= ': '.$proj->getNomUrl();
  389. } else {
  390. $morehtmlref .= '';
  391. }
  392. }
  393. }
  394. $morehtmlref .= '</div>';
  395. dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
  396. print '<div class="fichecenter">';
  397. print '<div class="fichehalfleft">';
  398. print '<div class="underbanner clearboth"></div>';
  399. print '<table class="border centpercent tableforfield">'."\n";
  400. // Common attributes
  401. $keyforbreak = 'description'; // We change column just after this field
  402. unset($object->fields['fk_project']); // Hide field already shown in banner
  403. //unset($object->fields['fk_soc']); // Hide field already shown in banner
  404. include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
  405. // Other attributes. Fields from hook formObjectOptions and Extrafields.
  406. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
  407. print '</table>';
  408. print '</div>';
  409. print '</div>';
  410. print '<div class="clearboth"></div>';
  411. print dol_get_fiche_end();
  412. print '<br>';
  413. $object = $savobject;
  414. }
  415. $arrayofselected = is_array($toselect) ? $toselect : array();
  416. $param = '';
  417. if (!empty($id)) {
  418. $param .= '&id='.urlencode($id);
  419. }
  420. if (!empty($mode)) {
  421. $param .= '&mode='.urlencode($mode);
  422. }
  423. if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
  424. $param .= '&contextpage='.urlencode($contextpage);
  425. }
  426. if ($limit > 0 && $limit != $conf->liste_limit) {
  427. $param .= '&limit='.urlencode($limit);
  428. }
  429. foreach ($search as $key => $val) {
  430. if (is_array($search[$key]) && count($search[$key])) {
  431. foreach ($search[$key] as $skey) {
  432. if ($skey != '') {
  433. $param .= '&search_'.$key.'[]='.urlencode($skey);
  434. }
  435. }
  436. } elseif ($search[$key] != '') {
  437. $param .= '&search_'.$key.'='.urlencode($search[$key]);
  438. }
  439. }
  440. if ($optioncss != '') {
  441. $param .= '&optioncss='.urlencode($optioncss);
  442. }
  443. // Add $param from extra fields
  444. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
  445. // Add $param from hooks
  446. $parameters = array();
  447. $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
  448. $param .= $hookmanager->resPrint;
  449. // List of mass actions available
  450. $arrayofmassactions = array(
  451. 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
  452. //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
  453. //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
  454. //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
  455. );
  456. if (!empty($permissiontodelete)) {
  457. $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
  458. }
  459. if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
  460. $arrayofmassactions = array();
  461. }
  462. $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
  463. print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
  464. if ($optioncss != '') {
  465. print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
  466. }
  467. print '<input type="hidden" name="token" value="'.newToken().'">';
  468. print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
  469. print '<input type="hidden" name="action" value="list">';
  470. print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
  471. print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
  472. print '<input type="hidden" name="page" value="'.$page.'">';
  473. print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
  474. print '<input type="hidden" name="mode" value="'.$mode.'">';
  475. print '<input type="hidden" name="id" value="'.$id.'">';
  476. $newcardbutton = '';
  477. $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
  478. $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
  479. $newcardbutton .= dolGetButtonTitleSeparator();
  480. $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?action=create&fk_recruitmentjobposition='.$id, '', $permissiontoadd);
  481. print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
  482. // Add code for pre mass action (confirmation or email presend form)
  483. $topicmail = "SendRecruitmentCandidatureRef";
  484. $modelmail = "recruitmentcandidature";
  485. $objecttmp = new RecruitmentCandidature($db);
  486. $trackid = 'recruitmentapplication'.$object->id;
  487. include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
  488. if ($search_all) {
  489. $setupstring = '';
  490. foreach ($fieldstosearchall as $key => $val) {
  491. $fieldstosearchall[$key] = $langs->trans($val);
  492. $setupstring .= $key."=".$val.";";
  493. }
  494. print '<!-- Search done like if PRODUCT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
  495. print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'."\n";
  496. }
  497. $moreforfilter = '';
  498. /*$moreforfilter.='<div class="divsearchfield">';
  499. $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
  500. $moreforfilter.= '</div>';*/
  501. $parameters = array();
  502. $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
  503. if (empty($reshook)) {
  504. $moreforfilter .= $hookmanager->resPrint;
  505. } else {
  506. $moreforfilter = $hookmanager->resPrint;
  507. }
  508. if (!empty($moreforfilter)) {
  509. print '<div class="liste_titre liste_titre_bydiv centpercent">';
  510. print $moreforfilter;
  511. print '</div>';
  512. }
  513. $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
  514. $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
  515. $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
  516. print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
  517. print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
  518. // Fields title search
  519. // --------------------------------------------------------------------
  520. print '<tr class="liste_titre">';
  521. // Action column
  522. if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
  523. print '<td class="liste_titre maxwidthsearch">';
  524. $searchpicto = $form->showFilterButtons('left');
  525. print $searchpicto;
  526. print '</td>';
  527. }
  528. foreach ($object->fields as $key => $val) {
  529. $searchkey = empty($search[$key]) ? '' : $search[$key];
  530. $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
  531. if ($key == 'status') {
  532. $cssforfield .= ($cssforfield ? ' ' : '').'center';
  533. } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
  534. $cssforfield .= ($cssforfield ? ' ' : '').'center';
  535. } elseif (in_array($val['type'], array('timestamp'))) {
  536. $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
  537. } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
  538. $cssforfield .= ($cssforfield ? ' ' : '').'right';
  539. }
  540. if (!empty($arrayfields['t.'.$key]['checked'])) {
  541. print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
  542. if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
  543. print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
  544. } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
  545. print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
  546. } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
  547. print '<div class="nowrap">';
  548. print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
  549. print '</div>';
  550. print '<div class="nowrap">';
  551. print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
  552. print '</div>';
  553. } elseif ($key == 'lang') {
  554. require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
  555. $formadmin = new FormAdmin($db);
  556. print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth150 maxwidth200', 2);
  557. } else {
  558. print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
  559. }
  560. print '</td>';
  561. }
  562. }
  563. // Extra fields
  564. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
  565. // Fields from hook
  566. $parameters = array('arrayfields'=>$arrayfields);
  567. $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
  568. print $hookmanager->resPrint;
  569. // Action column
  570. if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
  571. print '<td class="liste_titre maxwidthsearch">';
  572. $searchpicto = $form->showFilterButtons();
  573. print $searchpicto;
  574. print '</td>';
  575. }
  576. print '</tr>'."\n";
  577. $totalarray = array();
  578. $totalarray['nbfield'] = 0;
  579. // Fields title label
  580. // --------------------------------------------------------------------
  581. print '<tr class="liste_titre">';
  582. if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
  583. print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
  584. }
  585. foreach ($object->fields as $key => $val) {
  586. $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
  587. if ($key == 'status') {
  588. $cssforfield .= ($cssforfield ? ' ' : '').'center';
  589. } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
  590. $cssforfield .= ($cssforfield ? ' ' : '').'center';
  591. } elseif (in_array($val['type'], array('timestamp'))) {
  592. $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
  593. } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
  594. $cssforfield .= ($cssforfield ? ' ' : '').'right';
  595. }
  596. $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
  597. if (!empty($arrayfields['t.'.$key]['checked'])) {
  598. print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
  599. $totalarray['nbfield']++;
  600. }
  601. }
  602. // Extra fields
  603. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
  604. // Hook fields
  605. $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
  606. $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
  607. print $hookmanager->resPrint;
  608. // Action column
  609. if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
  610. print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
  611. }
  612. $totalarray['nbfield']++;
  613. print '</tr>'."\n";
  614. // Detect if we need a fetch on each output line
  615. $needToFetchEachLine = 0;
  616. if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
  617. foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
  618. if (preg_match('/\$object/', $val)) {
  619. $needToFetchEachLine++; // There is at least one compute field that use $object
  620. }
  621. }
  622. }
  623. // Loop on record
  624. // --------------------------------------------------------------------
  625. $i = 0;
  626. $savnbfield = $totalarray['nbfield'];
  627. $totalarray = array();
  628. $totalarray['nbfield'] = 0;
  629. $imaxinloop = ($limit ? min($num, $limit) : $num);
  630. while ($i < $imaxinloop) {
  631. $obj = $db->fetch_object($resql);
  632. if (empty($obj)) {
  633. break; // Should not happen
  634. }
  635. // Store properties in $object
  636. $object->setVarsFromFetchObj($obj);
  637. if ($mode == 'kanban') {
  638. if ($i == 0) {
  639. print '<tr><td colspan="'.$savnbfield.'">';
  640. print '<div class="box-flex-container">';
  641. }
  642. // Output Kanban
  643. print $object->getKanbanView('');
  644. if ($i == ($imaxinloop - 1)) {
  645. print '</div>';
  646. print '</td></tr>';
  647. }
  648. } else {
  649. // Show here line of result
  650. $j = 0;
  651. print '<tr data-rowid="'.$object->id.'" class="oddeven">';
  652. // Action column
  653. if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
  654. print '<td class="nowrap center">';
  655. if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
  656. $selected = 0;
  657. if (in_array($object->id, $arrayofselected)) {
  658. $selected = 1;
  659. }
  660. print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
  661. }
  662. print '</td>';
  663. }
  664. foreach ($object->fields as $key => $val) {
  665. $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
  666. if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
  667. $cssforfield .= ($cssforfield ? ' ' : '').'center';
  668. } elseif ($key == 'status') {
  669. $cssforfield .= ($cssforfield ? ' ' : '').'center';
  670. }
  671. if (in_array($val['type'], array('timestamp'))) {
  672. $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
  673. } elseif ($key == 'ref') {
  674. $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
  675. }
  676. if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) {
  677. $cssforfield .= ($cssforfield ? ' ' : '').'right';
  678. }
  679. //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
  680. if (!empty($arrayfields['t.'.$key]['checked'])) {
  681. print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '');
  682. if (preg_match('/tdoverflow/', $cssforfield)) {
  683. print ' title="'.dol_escape_htmltag($object->$key).'"';
  684. }
  685. print '>';
  686. if ($key == 'status') {
  687. print $object->getLibStatut(5);
  688. } elseif ($key == 'rowid') {
  689. print $object->showOutputField($val, $key, $object->id, '');
  690. } else {
  691. print $object->showOutputField($val, $key, $object->$key, '');
  692. }
  693. print '</td>';
  694. if (!$i) {
  695. $totalarray['nbfield']++;
  696. }
  697. if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
  698. if (!$i) {
  699. $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
  700. }
  701. if (!isset($totalarray['val'])) {
  702. $totalarray['val'] = array();
  703. }
  704. if (!isset($totalarray['val']['t.'.$key])) {
  705. $totalarray['val']['t.'.$key] = 0;
  706. }
  707. $totalarray['val']['t.'.$key] += $object->$key;
  708. }
  709. }
  710. }
  711. // Extra fields
  712. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
  713. // Fields from hook
  714. $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
  715. $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
  716. print $hookmanager->resPrint;
  717. // Action column
  718. if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
  719. print '<td class="nowrap center">';
  720. if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
  721. $selected = 0;
  722. if (in_array($object->id, $arrayofselected)) {
  723. $selected = 1;
  724. }
  725. print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
  726. }
  727. print '</td>';
  728. }
  729. if (!$i) {
  730. $totalarray['nbfield']++;
  731. }
  732. print '</tr>'."\n";
  733. }
  734. $i++;
  735. }
  736. // Show total line
  737. include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
  738. // If no record found
  739. if ($num == 0) {
  740. $colspan = 1;
  741. foreach ($arrayfields as $key => $val) {
  742. if (!empty($val['checked'])) {
  743. $colspan++;
  744. }
  745. }
  746. print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
  747. }
  748. $db->free($resql);
  749. $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
  750. $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
  751. print $hookmanager->resPrint;
  752. print '</table>'."\n";
  753. print '</div>'."\n";
  754. print '</form>'."\n";
  755. if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {
  756. $hidegeneratedfilelistifempty = 1;
  757. if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) {
  758. $hidegeneratedfilelistifempty = 0;
  759. }
  760. require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
  761. $formfile = new FormFile($db);
  762. // Show list of available documents
  763. $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
  764. $urlsource .= str_replace('&amp;', '&', $param);
  765. $filedir = $diroutputmassaction;
  766. $genallowed = $permissiontoread;
  767. $delallowed = $permissiontoadd;
  768. print $formfile->showdocuments('massfilesarea_recruitment', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
  769. }
  770. // End of page
  771. llxFooter();
  772. $db->close();