list.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. <?php
  2. /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
  4. * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
  5. * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
  6. * Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. */
  21. /**
  22. * \file htdocs/don/list.php
  23. * \ingroup donations
  24. * \brief List of donations
  25. */
  26. // Load Dolibarr environment
  27. require '../main.inc.php';
  28. require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
  29. if (isModEnabled('project')) {
  30. require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
  31. }
  32. // Load translation files required by the page
  33. $langs->loadLangs(array('companies', 'donations'));
  34. $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
  35. $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
  36. $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'sclist';
  37. $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
  38. $sortfield = GETPOST('sortfield', 'aZ09comma');
  39. $sortorder = GETPOST('sortorder', 'aZ09comma');
  40. $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
  41. $type = GETPOST('type', 'aZ');
  42. $mode = GETPOST('mode', 'alpha');
  43. if (empty($page) || $page == -1) {
  44. $page = 0;
  45. } // If $page is not defined, or '' or -1
  46. $offset = $limit * $page;
  47. $pageprev = $page - 1;
  48. $pagenext = $page + 1;
  49. if (!$sortorder) {
  50. $sortorder = "DESC";
  51. }
  52. if (!$sortfield) {
  53. $sortfield = "d.datedon";
  54. }
  55. $search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_status", 'intcomma') : "-4";
  56. $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
  57. $search_ref = GETPOST('search_ref', 'alpha');
  58. $search_company = GETPOST('search_company', 'alpha');
  59. $search_thirdparty = GETPOST('search_thirdparty', 'alpha');
  60. $search_name = GETPOST('search_name', 'alpha');
  61. $search_amount = GETPOST('search_amount', 'alpha');
  62. $optioncss = GETPOST('optioncss', 'alpha');
  63. $moreforfilter = GETPOST('moreforfilter', 'alpha');
  64. if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
  65. $search_all = "";
  66. $search_ref = "";
  67. $search_company = "";
  68. $search_thirdparty = "";
  69. $search_name = "";
  70. $search_amount = "";
  71. $search_status = '';
  72. }
  73. // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
  74. $hookmanager->initHooks(array('donationlist'));
  75. // List of fields to search into when doing a "search in all"
  76. $fieldstosearchall = array(
  77. 'd.rowid'=>'Id',
  78. 'd.ref'=>'Ref',
  79. 'd.lastname'=>'Lastname',
  80. 'd.firstname'=>'Firstname',
  81. );
  82. // Security check
  83. $result = restrictedArea($user, 'don');
  84. $permissiontoread = $user->hasRight('don', 'read');
  85. $permissiontoadd = $user->hasRight('don', 'write');
  86. $permissiontodelete = $user->hasRight('don', 'delete');
  87. /*
  88. * Actions
  89. */
  90. if (GETPOST('cancel', 'alpha')) {
  91. $action = 'list';
  92. $massaction = '';
  93. }
  94. if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
  95. $massaction = '';
  96. }
  97. /*
  98. * View
  99. */
  100. $form = new Form($db);
  101. $donationstatic = new Don($db);
  102. if (isModEnabled('project')) {
  103. $projectstatic = new Project($db);
  104. }
  105. $title = $langs->trans("Donations");
  106. $help_url = 'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones|DE:Modul_Spenden';
  107. // Build and execute select
  108. // --------------------------------------------------------------------
  109. $sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,";
  110. $sql .= " d.amount, d.fk_statut as status,";
  111. $sql .= " p.rowid as pid, p.ref, p.title, p.public";
  112. $sqlfields = $sql; // $sql fields to remove for count total
  113. $sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
  114. $sql .= " ON p.rowid = d.fk_projet WHERE d.entity IN (".getEntity('donation').")";
  115. if ($search_status != '' && $search_status != '-4') {
  116. $sql .= " AND d.fk_statut IN (".$db->sanitize($search_status).")";
  117. }
  118. if (trim($search_ref) != '') {
  119. $sql .= natural_search('d.ref', $search_ref);
  120. }
  121. if (trim($search_all) != '') {
  122. $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
  123. }
  124. if (trim($search_company) != '') {
  125. $sql .= natural_search('d.societe', $search_company);
  126. }
  127. if (trim($search_name) != '') {
  128. $sql .= natural_search(array('d.lastname', 'd.firstname'), $search_name);
  129. }
  130. if ($search_amount) {
  131. $sql .= natural_search('d.amount', $search_amount, 1);
  132. }
  133. // Count total nb of records
  134. $nbtotalofrecords = '';
  135. if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
  136. /* The fast and low memory method to get and count full list converts the sql into a sql count */
  137. $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
  138. $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
  139. $resql = $db->query($sqlforcount);
  140. if ($resql) {
  141. $objforcount = $db->fetch_object($resql);
  142. $nbtotalofrecords = $objforcount->nbtotalofrecords;
  143. } else {
  144. dol_print_error($db);
  145. }
  146. if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
  147. $page = 0;
  148. $offset = 0;
  149. }
  150. $db->free($resql);
  151. }
  152. // Complete request and execute it with limit
  153. $sql .= $db->order($sortfield, $sortorder);
  154. if ($limit) {
  155. $sql .= $db->plimit($limit + 1, $offset);
  156. }
  157. $resql = $db->query($sql);
  158. if (!$resql) {
  159. dol_print_error($db);
  160. exit;
  161. }
  162. $num = $db->num_rows($resql);
  163. // Direct jump if only one record found
  164. if ($num == 1 && !getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
  165. $obj = $db->fetch_object($resql);
  166. $id = $obj->rowid;
  167. header("Location: ".dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$id);
  168. exit;
  169. }
  170. // Output page
  171. // --------------------------------------------------------------------
  172. llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
  173. // Example : Adding jquery code
  174. // print '<script type="text/javascript">
  175. // jQuery(document).ready(function() {
  176. // function init_myfunc()
  177. // {
  178. // jQuery("#myid").removeAttr(\'disabled\');
  179. // jQuery("#myid").attr(\'disabled\',\'disabled\');
  180. // }
  181. // init_myfunc();
  182. // jQuery("#mybutton").click(function() {
  183. // init_myfunc();
  184. // });
  185. // });
  186. // </script>';
  187. $arrayofselected = is_array($toselect) ? $toselect : array();
  188. $param = '';
  189. if (!empty($mode)) {
  190. $param .= '&mode='.urlencode($mode);
  191. }
  192. if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
  193. $param .= '&contextpage='.urlencode($contextpage);
  194. }
  195. if ($limit > 0 && $limit != $conf->liste_limit) {
  196. $param .= '&limit='.((int) $limit);
  197. }
  198. if ($optioncss != '') {
  199. $param .= '&optioncss='.urlencode($optioncss);
  200. }
  201. if ($search_status && $search_status != -1) {
  202. $param .= '&search_status='.urlencode($search_status);
  203. }
  204. if ($search_ref) {
  205. $param .= '&search_ref='.urlencode($search_ref);
  206. }
  207. if ($search_company) {
  208. $param .= '&search_company='.urlencode($search_company);
  209. }
  210. if ($search_name) {
  211. $param .= '&search_name='.urlencode($search_name);
  212. }
  213. if ($search_amount) {
  214. $param .= '&search_amount='.urlencode($search_amount);
  215. }
  216. // List of mass actions available
  217. $arrayofmassactions = array(
  218. //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
  219. //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
  220. //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
  221. //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
  222. );
  223. if (!empty($permissiontodelete)) {
  224. $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
  225. }
  226. if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
  227. $arrayofmassactions = array();
  228. }
  229. $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
  230. print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
  231. if ($optioncss != '') {
  232. print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
  233. }
  234. print '<input type="hidden" name="token" value="'.newToken().'">';
  235. print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
  236. print '<input type="hidden" name="action" value="list">';
  237. print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
  238. print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
  239. print '<input type="hidden" name="page" value="'.$page.'">';
  240. print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
  241. print '<input type="hidden" name="page_y" value="">';
  242. print '<input type="hidden" name="mode" value="'.$mode.'">';
  243. print '<input type="hidden" name="type" value="'.$type.'">';
  244. $newcardbutton = '';
  245. $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'));
  246. $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'));
  247. if ($user->rights->don->creer) {
  248. $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create');
  249. }
  250. print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1);
  251. if ($search_all) {
  252. $setupstring = '';
  253. foreach ($fieldstosearchall as $key => $val) {
  254. $fieldstosearchall[$key] = $langs->trans($val);
  255. $setupstring .= $key."=".$val.";";
  256. }
  257. print '<!-- Search done like if DONATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
  258. print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
  259. }
  260. $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
  261. $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
  262. $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
  263. print '<div class="div-table-responsive">';
  264. print '<table class="tagtable nobottomiftotal liste'.(!empty($moreforfilter) ? " listwithfilterbefore" : "").'">'."\n";
  265. // Fields title search
  266. // --------------------------------------------------------------------
  267. print '<tr class="liste_titre_filter">';
  268. // Action column
  269. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  270. print '<td class="liste_titre center maxwidthsearch">';
  271. $searchpicto = $form->showFilterButtons('left');
  272. print $searchpicto;
  273. print '</td>';
  274. }
  275. print '<td class="liste_titre">';
  276. print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
  277. print '</td>';
  278. if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) {
  279. print '<td class="liste_titre">';
  280. print '<input class="flat" size="10" type="text" name="search_thirdparty" value="'.$search_thirdparty.'">';
  281. print '</td>';
  282. } else {
  283. print '<td class="liste_titre">';
  284. print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
  285. print '</td>';
  286. }
  287. print '<td class="liste_titre">';
  288. print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
  289. print '</td>';
  290. print '<td class="liste_titre left">';
  291. print '&nbsp;';
  292. print '</td>';
  293. if (isModEnabled('project')) {
  294. print '<td class="liste_titre right">';
  295. print '&nbsp;';
  296. print '</td>';
  297. }
  298. print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
  299. print '<td class="liste_titre right parentonrightofpage">';
  300. $liststatus = array(
  301. Don::STATUS_DRAFT=>$langs->trans("DonationStatusPromiseNotValidated"),
  302. Don::STATUS_VALIDATED=>$langs->trans("DonationStatusPromiseValidated"),
  303. Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"),
  304. Don::STATUS_CANCELED=>$langs->trans("Canceled")
  305. );
  306. print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth100 onrightofpage');
  307. print '</td>';
  308. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  309. print '<td class="liste_titre center maxwidthsearch">';
  310. $searchpicto = $form->showFilterButtons();
  311. print $searchpicto;
  312. print '</td>';
  313. }
  314. print '</tr>'."\n";
  315. $totalarray = array();
  316. $totalarray['nbfield'] = 0;
  317. // Fields title label
  318. // --------------------------------------------------------------------
  319. print '<tr class="liste_titre">';
  320. // Action column
  321. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  322. print_liste_field_titre('');
  323. $totalarray['nbfield']++;
  324. }
  325. print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder);
  326. $totalarray['nbfield']++;
  327. if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) {
  328. print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder);
  329. $totalarray['nbfield']++;
  330. } else {
  331. print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);
  332. $totalarray['nbfield']++;
  333. }
  334. print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
  335. $totalarray['nbfield']++;
  336. print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
  337. $totalarray['nbfield']++;
  338. if (isModEnabled('project')) {
  339. $langs->load("projects");
  340. print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder);
  341. $totalarray['nbfield']++;
  342. }
  343. print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, '', $sortfield, $sortorder, 'right ');
  344. $totalarray['nbfield']++;
  345. print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
  346. $totalarray['nbfield']++;
  347. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  348. print_liste_field_titre('');
  349. $totalarray['nbfield']++;
  350. }
  351. print '</tr>'."\n";
  352. $i = 0;
  353. $savnbfield = $totalarray['nbfield'];
  354. $totalarray = array();
  355. $totalarray['nbfield'] = 0;
  356. $imaxinloop = ($limit ? min($num, $limit) : $num);
  357. while ($i < $imaxinloop) {
  358. $obj = $db->fetch_object($resql);
  359. $donationstatic->setVarsFromFetchObj($obj);
  360. $company = new Societe($db);
  361. $result = $company->fetch($obj->socid);
  362. if ($mode == 'kanban') {
  363. if ($i == 0) {
  364. print '<tr><td colspan="'.$savnbfield.'">';
  365. print '<div class="box-flex-container kanban">';
  366. }
  367. // Output Kanban
  368. $donationstatic->amount = $obj->amount;
  369. $donationstatic->date = $obj->datedon;
  370. $donationstatic->labelStatus = $obj->status;
  371. $donationstatic->id = $obj->rowid;
  372. $donationstatic->ref = $obj->rowid;
  373. if (!empty($obj->socid) && $company->id > 0) {
  374. $donationstatic->societe = $company->getNomUrl(1);
  375. } else {
  376. $donationstatic->societe = $obj->societe;
  377. }
  378. $object = $donationstatic;
  379. $selected = -1;
  380. if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
  381. $selected = 0;
  382. if (in_array($object->id, $arrayofselected)) {
  383. $selected = 1;
  384. }
  385. }
  386. print $donationstatic->getKanbanView('', array('selected' => $selected));
  387. if ($i == ($imaxinloop - 1)) {
  388. print '</div>';
  389. print '</td></tr>';
  390. }
  391. } else {
  392. print '<tr class="oddeven">';
  393. if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  394. print '<td></td>';
  395. }
  396. $donationstatic->id = $obj->rowid;
  397. $donationstatic->ref = $obj->rowid;
  398. $donationstatic->lastname = $obj->lastname;
  399. $donationstatic->firstname = $obj->firstname;
  400. print "<td>".$donationstatic->getNomUrl(1)."</td>";
  401. if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) {
  402. if (!empty($obj->socid) && $company->id > 0) {
  403. print "<td>".$company->getNomUrl(1)."</td>";
  404. } else {
  405. print "<td>".$obj->societe."</td>";
  406. }
  407. } else {
  408. print "<td>".$obj->societe."</td>";
  409. }
  410. print "<td>".$donationstatic->getFullName($langs)."</td>";
  411. print '<td class="center">'.dol_print_date($db->jdate($obj->datedon), 'day').'</td>';
  412. if (isModEnabled('project')) {
  413. print "<td>";
  414. if ($obj->pid) {
  415. $projectstatic->id = $obj->pid;
  416. $projectstatic->ref = $obj->ref;
  417. $projectstatic->id = $obj->pid;
  418. $projectstatic->public = $obj->public;
  419. $projectstatic->title = $obj->title;
  420. print $projectstatic->getNomUrl(1);
  421. } else {
  422. print '&nbsp;';
  423. }
  424. print "</td>\n";
  425. }
  426. print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
  427. print '<td class="right">'.$donationstatic->LibStatut($obj->status, 5).'</td>';
  428. if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
  429. print '<td></td>';
  430. }
  431. print "</tr>";
  432. }
  433. $i++;
  434. }
  435. print "</table>";
  436. print '</div>';
  437. print "</form>\n";
  438. $db->free($resql);
  439. llxFooter();
  440. $db->close();