0) { $query = ' DELETE FROM '.CADDIE_TABLE.' WHERE element_id IN ('.implode(',', $_POST['selection']).') AND user_id = '.$user['id'].' ;'; pwg_query($query); } else { // TODO : add error } break; } case 'add_selected' : { if (isset($_POST['selection']) and count($_POST['selection']) > 0) { fill_caddie($_POST['selection']); } else { // TODO : add error } break; } } } else { // TODO : add error } } // +-----------------------------------------------------------------------+ // | initialize info about category | // +-----------------------------------------------------------------------+ // To element_set_(global|unit).php, we must provide the elements id of the // managed category in $page['cat_elements_id'] array. // Adaptions for unTagged $page['cat_elements_id'] = array(); //else if ('duplicates' == $_GET['cat']) if (true) { $page['title'] = l10n('Untagged elements'); // Retrieves ids from images tables // 1 - Retrieve Files $query = ' SELECT id FROM '.IMAGES_TABLE.' AS Img LEFT OUTER JOIN '.IMAGE_TAG_TABLE.' AS iTag ON Img.id = iTag.image_id WHERE iTag.image_id IS NULL;'; $page['cat_elements_id'] = array_from_query($query, 'id'); } // +-----------------------------------------------------------------------+ // | first element to display | // +-----------------------------------------------------------------------+ // $page['start'] contains the number of the first element in its // category. For exampe, $page['start'] = 12 means we must show elements #12 // and $page['nb_images'] next elements if (!isset($_GET['start']) or !is_numeric($_GET['start']) or $_GET['start'] < 0 or (isset($_GET['display']) and 'all' == $_GET['display'])) { $page['start'] = 0; } else { $page['start'] = $_GET['start']; } // +-----------------------------------------------------------------------+ // | open specific mode | // +-----------------------------------------------------------------------+ $_GET['mode'] = !empty($_GET['mode']) ? $_GET['mode'] : 'global'; switch ($_GET['mode']) { case 'global' : { include(PHPWG_ROOT_PATH.'admin/element_set_global.php'); break; } case 'unit' : { include(PHPWG_ROOT_PATH.'admin/element_set_unit.php'); break; } } if ( !function_exists( 'untagged_tools_menu' ) ) { function untagged_tools_menu() { global $template; $template->assign('ACTIVE_MENU', 4); } } add_event_handler('loc_end_admin', 'untagged_tools_menu'); // $template->assign('ACTIVE_MENU', 4); ?>