m_item.php 21 KB

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