Beispiel #1
0
	default :
		$NoSearchResults = get_lang('NoCategories');
		Display :: display_header($tool_name);
		api_display_tool_title($tool_name);

		echo $msg;
		echo '<div class="actions">';
		echo '<a href="m_category.php?action=add"><img src="../img/view_more_stats.gif" border="0" alt="" title="'.get_lang('AddNewBookingPeriod').'"/>'.get_lang('AddNewResourceType').'</a><br />';
		echo '</div>';
		if (isset ($_POST['action'])) {
			switch ($_POST['action']) {
				case 'delete_categories' :
					$ids = $_POST['categories'];
					if (count($ids) > 0) {
						foreach ($ids as $index => $id) {
							$result = Rsys :: delete_category($id);
							if ($result != 0)
								$warning = true;
						}
					}
					if ($warning) {
						ob_start();
						Display :: display_normal_message(get_lang('ResourceTypeNotDeleted'),false);
						$msg2 = ob_get_contents();
						ob_end_clean();
					}
					break;
			}
		}
		echo $msg2;
		$table = new SortableTable('category', array ('Rsys', 'get_num_categories'), array ('Rsys', 'get_table_categories'), 1);