*/ if (!defined('EVO_MAIN_INIT')) { die('Please, do not access this page directly.'); } load_class('items/model/_itemtype.class.php', 'ItemType'); global $dispatcher; // Create query $SQL = new SQL(); $SQL->SELECT('*'); $SQL->FROM('T_items__type'); // Create result set: $Results = new Results($SQL->get(), 'ptyp_'); $Results->title = T_('Item/Post/Page types'); // get reserved ids global $reserved_ids; $reserved_ids = ItemType::get_reserved_ids(); /** * Callback to build possible actions depending on item type id * */ function get_actions_for_itemtype($id) { global $reserved_ids; $action = action_icon(T_('Duplicate this item type...'), 'copy', regenerate_url('action', 'ptyp_ID=' . $id . '&action=new')); if ($id < $reserved_ids[0] || $id > $reserved_ids[1]) { // not reserved id $action = action_icon(T_('Edit this item type...'), 'edit', regenerate_url('action', 'ptyp_ID=' . $id . '&action=edit')) . $action . action_icon(T_('Delete this item type!'), 'delete', regenerate_url('action', 'ptyp_ID=' . $id . '&action=delete&' . url_crumb('itemtype') . '')); } return $action; } /**