m_item.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. Item-manager (add, edit & delete)
  5. */
  6. require_once ('rsys.php');
  7. Rsys :: protect_script('m_item');
  8. $tool_name = get_lang('ResourceList');
  9. //$interbreadcrumb[] = array ("url" => "../admin/index.php", "name" => get_lang('PlatformAdmin'));
  10. /**
  11. * Filter to display the modify-buttons
  12. *
  13. * @param - int $id The item-id
  14. */
  15. function modify_filter($id) {
  16. $str='';
  17. $outtt=false;
  18. if(Rsys::item_allow($id,'edit')){
  19. $number = Rsys :: get_item($id);
  20. //checking the status
  21. if ($number[5]==1) {
  22. $str.= ' <a href="m_item.php?action=blackout&amp;id='.$id.'" title="'.get_lang('Inactive').'"><img alt="" src="../img/wrong.gif" /></a>';
  23. } else {
  24. $str.= ' <a href="m_item.php?action=blackout&amp;id='.$id.'" title="'.get_lang('Active').'"><img alt="" src="../img/right.gif" /></a>';
  25. }
  26. }
  27. if(Rsys::item_allow($id,'edit')){
  28. $str.='<a href="m_item.php?action=edit&amp;id='.$id.'" title="'.get_lang("EditItem2").'"><img alt="" src="../img/edit.gif" /></a>';
  29. }
  30. //if(Rsys::item_allow($id,'m_rights')) $str.=' &nbsp;<a href="m_item.php?action=m_rights&amp;item_id='.$id.'" title="'.get_lang("MRights").'"><img alt="" src="../img/info_small.gif" /></a>';
  31. if(Rsys::item_allow($id,'delete')) $str.=' <a href="m_item.php?action=delete&amp;id='.$id.'" title="'.get_lang('DeleteResource').'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmDeleteResource")))."'".')) return false;"><img alt="" src="../img/delete.gif" /></a>';
  32. return $str;
  33. }
  34. /**
  35. * Filter to display the modify-buttons
  36. *
  37. * @param - int $id The item-rights-id's
  38. */
  39. function modify_rights_filter($id) {
  40. return ' <a href="m_item.php?action=m_rights&amp;subaction=delete&amp;item_id='.substr($id, 0, strpos($id, '-')).'&amp;class_id='.substr($id, strrpos($id, '-') + 1).'" title="'.get_lang("RemoveClassRights").'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmDeleteResource")))."'".')) return false;"><img alt="" src="../img/delete.gif" /></a>';
  41. }
  42. if (isset ($_POST['action'])) {
  43. switch ($_POST['action']) {
  44. case 'delete_items' :
  45. $ids = $_POST['items'];
  46. $warning = false;
  47. if (count($ids) > 0) {
  48. foreach ($ids as $id) {
  49. $result = Rsys :: delete_item($id);
  50. if ($result != 0 && $warning <> true) // TODO: A strange looking logical condition, to be cleaned.
  51. $warning = true;
  52. }
  53. ob_start();
  54. if ($warning) {
  55. Display :: display_normal_message(get_lang('ItemNotDeleted'), false);
  56. } else {
  57. Display :: display_normal_message(get_lang('ResourceDeleted'), false);
  58. }
  59. $msg = ob_get_contents();
  60. ob_end_clean();
  61. }
  62. break;
  63. case 'delete_itemrights' :
  64. $ids = $_POST['itemrights'];
  65. if (count($ids) > 0) {
  66. foreach ($ids as $id)
  67. Rsys :: delete_item_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1));
  68. ob_start();
  69. Display :: display_normal_message(get_lang('ItemRightDeleted'),false);
  70. $msg = ob_get_contents();
  71. ob_end_clean();
  72. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  73. } else {
  74. header("Location: ".$_SERVER['HTTP_REFERER']);
  75. exit ();
  76. }
  77. $_GET['action'] = 'm_rights';
  78. break;
  79. case 'set_r_rights' :
  80. $ids = $_POST['itemrights'];
  81. if (count($ids) > 0) {
  82. foreach ($ids as $id)
  83. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'view_right', 1);
  84. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  85. } else {
  86. header("Location: ".$_SERVER['HTTP_REFERER']);
  87. exit ();
  88. }
  89. $_GET['action'] = 'm_rights';
  90. break;
  91. case 'unset_r_rights' :
  92. $ids = $_POST['itemrights'];
  93. if (count($ids) > 0) {
  94. foreach ($ids as $id)
  95. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'view_right', 0);
  96. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  97. } else {
  98. header("Location: ".$_SERVER['HTTP_REFERER']);
  99. exit ();
  100. }
  101. $_GET['action'] = 'm_rights';
  102. break;
  103. case 'set_edit_rights' :
  104. $ids = $_POST['itemrights'];
  105. if (count($ids) > 0) {
  106. foreach ($ids as $id)
  107. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'edit_right', 1);
  108. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  109. } else {
  110. header("Location: ".$_SERVER['HTTP_REFERER']);
  111. exit ();
  112. }
  113. $_GET['action'] = 'm_rights';
  114. break;
  115. case 'unset_edit_rights' :
  116. $ids = $_POST['itemrights'];
  117. if (count($ids) > 0) {
  118. foreach ($ids as $id)
  119. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'edit_right', 0);
  120. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  121. } else {
  122. header("Location: ".$_SERVER['HTTP_REFERER']);
  123. exit ();
  124. }
  125. $_GET['action'] = 'm_rights';
  126. break;
  127. case 'set_delete_rights' :
  128. $ids = $_POST['itemrights'];
  129. if (count($ids) > 0) {
  130. foreach ($ids as $id)
  131. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'delete_right', 1);
  132. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  133. } else {
  134. header("Location: ".$_SERVER['HTTP_REFERER']);
  135. exit ();
  136. }
  137. $_GET['action'] = 'm_rights';
  138. break;
  139. case 'unset_delete_rights' :
  140. $ids = $_POST['itemrights'];
  141. if (count($ids) > 0) {
  142. foreach ($ids as $id)
  143. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'delete_right', 0);
  144. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  145. } else {
  146. header("Location: ".$_SERVER['HTTP_REFERER']);
  147. exit ();
  148. }
  149. $_GET['action'] = 'm_rights';
  150. break;
  151. case 'set_mres_rights' :
  152. $ids = $_POST['itemrights'];
  153. if (count($ids) > 0) {
  154. foreach ($ids as $id)
  155. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'm_reservation', 1);
  156. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  157. } else {
  158. header("Location: ".$_SERVER['HTTP_REFERER']);
  159. exit ();
  160. }
  161. $_GET['action'] = 'm_rights';
  162. break;
  163. case 'unset_mres_rights' :
  164. $ids = $_POST['itemrights'];
  165. if (count($ids) > 0) {
  166. foreach ($ids as $id)
  167. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'm_reservation', 0);
  168. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  169. } else {
  170. header("Location: ".$_SERVER['HTTP_REFERER']);
  171. exit ();
  172. }
  173. $_GET['action'] = 'm_rights';
  174. break;
  175. case 'set_all_rights' :
  176. $ids = $_POST['itemrights'];
  177. if (count($ids) > 0) {
  178. foreach ($ids as $id){
  179. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'm_reservation', 1);
  180. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'edit_right', 1);
  181. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'delete_right', 1);
  182. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'view_right', 1);
  183. }
  184. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  185. } else {
  186. header("Location: ".$_SERVER['HTTP_REFERER']);
  187. exit ();
  188. }
  189. $_GET['action'] = 'm_rights';
  190. break;
  191. case 'unset_all_rights' :
  192. $ids = $_POST['itemrights'];
  193. if (count($ids) > 0) {
  194. foreach ($ids as $id){
  195. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'm_reservation', 0);
  196. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'edit_right', 0);
  197. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'delete_right', 0);
  198. Rsys :: set_new_right(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1), 'view_right', 0);
  199. }
  200. $_GET['item_id'] = substr($id, 0, strpos($id, '-'));
  201. } else {
  202. header("Location: ".$_SERVER['HTTP_REFERER']);
  203. exit ();
  204. }
  205. $_GET['action'] = 'm_rights';
  206. break;
  207. }
  208. }
  209. switch ($_GET['action']) {
  210. case 'm_rights' :
  211. if(!Rsys::item_allow($_GET['item_id'],'m_rights')) die('No Access!');
  212. switch ($_GET['subaction']) {
  213. case 'edit' :
  214. $item = Rsys :: get_item($_GET['item_id']);
  215. $classDB = Rsys :: get_class_group($_GET['class_id']);
  216. $item_rights = Rsys :: get_item_rights($_GET['item_id'], $_GET['class_id']);
  217. $interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
  218. $interbreadcrumb[] = array ("url" => "m_item.php", "name" => $tool_name);
  219. $interbreadcrumb[] = array ("url" => "m_item.php?&action=m_rights&id=".$item['id'], "name" => str_replace('#ITEM#', $item['name'], get_lang('MItemRights')));
  220. Display :: display_header(get_lang('EditRight'));
  221. api_display_tool_title(get_lang('EditRight'));
  222. $form = new FormValidator('itemright', 'post', "m_item.php?id=".$item['id']."&action=m_rights&subaction=edit");
  223. $form->add_textfield('classn', get_lang('Class'), true, array ('readonly' => 'readonly'));
  224. $form->addElement('checkbox', 'edit_right', get_lang('EditRight'));
  225. $form->addElement('checkbox', 'delete_right', get_lang('DeleteRight'));
  226. $form->addElement('checkbox', 'm_reservation', get_lang('MReservationRight'));
  227. $form->addElement('hidden', 'item_id', $item['id']);
  228. $form->addElement('hidden', 'class_id', $_GET['class_id']);
  229. $item_right['classn'] = $classDB[0]['name'];
  230. $item_right['edit_right'] = $item_rights[0]['edit_right'];
  231. $item_right['delete_right'] = $item_rights[0]['delete_right'];
  232. $item_right['m_reservation'] = $item_rights[0]['m_reservation'];
  233. $form->setDefaults($item_right);
  234. $form->addElement('style_submit_button', 'submit', get_lang('Ok'),'class="save"');
  235. if ($form->validate()) {
  236. $values = $form->exportValues();
  237. Rsys :: edit_item_right($values['item_id'], $values['class_id'], $values['edit_right'], $values['delete_right'], $values['m_reservation']);
  238. Display :: display_normal_message(Rsys :: get_return_msg(get_lang('ItemRightEdited'), "m_item.php?id=".$_GET['id']."&action=m_rights", str_replace('#ITEM#', $item['name'], get_lang('MItemRights'))),false);
  239. } else
  240. $form->display();
  241. break;
  242. case 'delete' :
  243. Rsys :: delete_item_right($_GET['item_id'], $_GET['class_id']);
  244. ob_start();
  245. Display :: display_normal_message(get_lang('ItemRightDeleted'),false);
  246. $msg = ob_get_contents();
  247. ob_end_clean();
  248. case 'switch' :
  249. switch ($_GET['switch']) {
  250. case 'edit' :
  251. Rsys :: set_new_right($_GET['item_id'], $_GET['class_id'], 'edit_right', $_GET['set']);
  252. break;
  253. case 'delete' :
  254. Rsys :: set_new_right($_GET['item_id'], $_GET['class_id'], 'delete_right', $_GET['set']);
  255. break;
  256. case 'manage' :
  257. Rsys :: set_new_right($_GET['item_id'], $_GET['class_id'], 'm_reservation', $_GET['set']);
  258. break;
  259. case 'view' :
  260. Rsys :: set_new_right($_GET['item_id'], $_GET['class_id'], 'view_right', $_GET['set']);
  261. break;
  262. }
  263. default :
  264. $item = Rsys :: get_item($_GET['item_id']);
  265. $NoSearchResults = get_lang('NoRights');
  266. $interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
  267. $interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
  268. Display :: display_header(str_replace('#ITEM#', $item['name'], get_lang('MItemRights')));
  269. api_display_tool_title(get_lang('MItemRights2'));
  270. echo $msg;
  271. $_s_item['id'] = $_GET['item_id'];
  272. $_s_item['name'] = $item['name'];
  273. api_session_register('_s_item');
  274. //api_session_register('s_item_name');
  275. //echo "<a href=\"m_item.php?action=add_classgroup\">".get_lang('MAddClassgroup')."</a>";
  276. $table = new SortableTable('itemrights', array ('Rsys', 'get_num_itemrights'), array ('Rsys', 'get_table_itemrights'), 1);
  277. $table->set_header(0, '', false, array ('style' => 'width:10px'));
  278. $table->set_additional_parameters(array('action'=>'m_rights','item_id'=>$_GET['item_id']));
  279. $table->set_header(1, get_lang('Class'), false);
  280. $table->set_header(2, get_lang('EditItemRight'), false);
  281. $table->set_header(3, get_lang('DeleteItemRight'), false);
  282. $table->set_header(4, get_lang('MBookingPeriodsRight'), false);
  283. $table->set_header(5, get_lang('ViewItemRight'), false);
  284. $table->set_header(6, '', false, array ('style' => 'width:50px;'));
  285. $table->set_column_filter(6, 'modify_rights_filter');
  286. $table->set_form_actions(array (
  287. 'delete_itemrights' => get_lang('DeleteSelectedItemRights'),
  288. 'set_edit_rights' => get_lang('SetEditRights'),
  289. 'unset_edit_rights' => get_lang('UnsetEditRights'),
  290. 'set_delete_rights' => get_lang('SetDeleteRights'),
  291. 'unset_delete_rights' => get_lang('UnsetDeleteRights'),
  292. 'set_mres_rights' => get_lang('SetMresRights'),
  293. 'unset_mres_rights' => get_lang('UnsetMresRights'),
  294. 'set_r_rights' => get_lang('SetViewRights'),
  295. 'unset_r_rights' => get_lang('UnsetViewRights'),
  296. 'set_all_rights' => get_lang('SetAllRights'),
  297. 'unset_all_rights' => get_lang('UnsetAllRights')
  298. ), 'itemrights');
  299. $table->display();
  300. }
  301. break;
  302. case 'add' :
  303. $interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
  304. $interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
  305. //$interbreadcrumb[] = array ("url" => "m_item.php", "name" => $tool_name);
  306. Display :: display_header(get_lang('AddNewResource'));
  307. api_display_tool_title(get_lang('AddNewResource'));
  308. $form = new FormValidator('item', 'post', 'm_item.php?action=add');
  309. $cats = Rsys :: get_category();
  310. foreach ($cats as $cat)
  311. $catOptions[$cat['id']] = $cat['name'];
  312. $form->addElement('select', 'category', get_lang('ResourceType'), $catOptions);
  313. $form->add_textfield('name', get_lang('ResourceName'), true, array ('maxlength' => '128'));
  314. $form->addElement('textarea', 'description', get_lang('Description'), array ('rows' => '3', 'cols' => '40'));
  315. $form->addRule('category', get_lang('ThisFieldIsRequired'), 'required');
  316. // TODO: get list of courses (to link it to the item)
  317. //$form->addElement('select', 'course_code', get_lang('ItemCourse'),array(''=>'','value'=>'tag'));
  318. //$form->addRule('course', get_lang('ThisFieldIsRequired'), 'required');
  319. $form->addElement('style_submit_button', 'submit', get_lang('AddNewResource'),'class="add"');
  320. if ($form->validate()) {
  321. $values = $form->exportValues();
  322. if (Rsys :: add_item($values['name'], $values['description'], $values['category'], $values['course_code']))
  323. {
  324. Display :: display_normal_message(Rsys :: get_return_msg(get_lang('ResourceAdded'), "m_item.php?action=m_rights&item_id=".Rsys :: get_item_id($values['name']), get_lang('MItemRight').' '.$values['name']),false);
  325. }
  326. else
  327. {
  328. Display :: display_normal_message(Rsys :: get_return_msg(get_lang('ResourceExist'), "m_item.php?action=add", get_lang('AddNewResource')),false);
  329. }
  330. } else
  331. $form->display();
  332. break;
  333. case 'edit' :
  334. $item = Rsys :: get_item($_GET['id']);
  335. $cats = Rsys :: get_category();
  336. foreach ($cats as $cat)
  337. $catOptions[$cat['id']] = $cat['name'];
  338. $interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
  339. $interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
  340. Display :: display_header(str_replace('#ITEM#', $item['name'], get_lang('EditResource')));
  341. api_display_tool_title(get_lang('EditResource'));
  342. $form = new FormValidator('item', 'post', 'm_item.php?action=edit');
  343. $form->addElement('select', 'category_id', get_lang('ResourceType'), $catOptions);
  344. $form->add_textfield('name', get_lang('ResourceName'), array ('maxlength' => '128'));
  345. $form->addElement('textarea', 'description', get_lang('Description'), array ('rows' => '3', 'cols' => '40'));
  346. $form->addRule('category_id', get_lang('ThisFieldIsRequired'), 'required');
  347. $form->addElement('hidden', 'id', $item['id']);
  348. $form->addElement('style_submit_button', 'submit', get_lang('EditResource'),'class="save"');
  349. $form->setDefaults($item);
  350. if ($form->validate()) {
  351. $values = $form->exportValues();
  352. if (Rsys :: edit_item($values['id'], $values['name'], $values['description'], $values['category_id'], $values['course_id']))
  353. Display :: display_normal_message(Rsys :: get_return_msg(get_lang('ResourceEdited'), "m_item.php", $tool_name),false);
  354. else
  355. Display :: display_normal_message(Rsys :: get_return_msg(get_lang('ResourceExist'), "m_item.php?action=edit&id=".$values['id'], get_lang('EditItem2')),false);
  356. } else
  357. $form->display();
  358. break;
  359. case 'delete' :
  360. $result = Rsys :: delete_item($_GET['id']);
  361. ob_start();
  362. if($result == '0'){
  363. Display :: display_normal_message(get_lang('ResourceDeleted'),false);}
  364. else
  365. Display :: display_normal_message(str_replace('#NUM#', $result, get_lang('ItemHasReservations')),false);
  366. $msg = ob_get_contents();
  367. ob_end_clean();
  368. default :
  369. $NoSearchResults = get_lang('NoItems');
  370. $interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
  371. //$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
  372. Display :: display_header(get_lang('ManageResources'));
  373. api_display_tool_title(get_lang('ResourceList'));
  374. echo $msg;
  375. if($_GET['action'] == 'blackout'){
  376. $result = Rsys :: black_out_changer($_GET['id']);
  377. if ($result==1) {
  378. Display :: display_normal_message(get_lang('ResourceInactivated'),false);
  379. }
  380. else {
  381. Display :: display_normal_message(get_lang('ResourceActivated'),false);
  382. }
  383. }
  384. echo '<form id="cat_form" action="m_item.php" method="get">';
  385. echo '<div class="actions">';
  386. echo '<a href="m_item.php?action=add"><img src="../img/view_more_stats.gif" border="0" alt="" title="'.get_lang('AddNewBookingPeriod').'"/>'.get_lang('AddNewResource').'</a>';
  387. echo '</div>';
  388. echo '<div style="text-align: right;">'.get_lang('ResourceFilter').': ';
  389. echo '<select name="cat" onchange="this.form.submit();"><option value="0"> '.get_lang('All').' </option>';
  390. $cats = Rsys :: get_category_with_items_manager();
  391. foreach ($cats as $cat)
  392. echo '<option value="'.$cat['id'].'"'. ($cat['id'] == $_GET['cat'] ? ' selected="selected"' : '').'>'.$cat['name'].'</option>';
  393. echo '</select></div></form>';
  394. $table = new SortableTable('item', array ('Rsys', 'get_num_items'), array ('Rsys', 'get_table_items'), 1);
  395. $table->set_additional_parameters(array('cat'=>$_GET['cat']));
  396. $table->set_header(0, '', false, array ('style' => 'width:10px'));
  397. $table->set_header(1, get_lang('ResourceName'), true);
  398. $table->set_header(2, get_lang('Description'), true);
  399. $table->set_header(3, get_lang('ResourceType'), true);
  400. $table->set_header(4, get_lang('Owner'), true);
  401. $table->set_header(5, '', false, array ('style' => 'width:100px;'));
  402. $table->set_column_filter(5, 'modify_filter');
  403. $table->set_form_actions(array ('delete_items' => get_lang('DeleteSelectedResources')), 'items');
  404. $table->display();
  405. }
  406. /**
  407. ---------------------------------------------------------------------
  408. */
  409. Display :: display_footer();
  410. ?>