From 38aad287ebe7fc945203051aff477b049fa2418b Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 31 Dec 2010 15:19:11 +0000 Subject: feature 2089: finish removing element_set, now it's time for batch_manager git-svn-id: http://piwigo.org/svn/trunk@8417 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/element_set_unit.php | 286 --------------------------------------------- 1 file changed, 286 deletions(-) delete mode 100644 admin/element_set_unit.php (limited to 'admin/element_set_unit.php') diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php deleted file mode 100644 index fa89db7f2..000000000 --- a/admin/element_set_unit.php +++ /dev/null @@ -1,286 +0,0 @@ - array('id'), - 'update' => array('name','author','level','comment','date_creation') - ), - $datas - ); - - array_push($page['infos'], l10n('Picture informations updated')); -} - -// +-----------------------------------------------------------------------+ -// | template init | -// +-----------------------------------------------------------------------+ - -$template->set_filenames( - array('element_set_unit' => 'element_set_unit.tpl')); - -$base_url = PHPWG_ROOT_PATH.'admin.php'; - -$month_list = $lang['month']; -$month_list[0]='------------'; -ksort($month_list); - -$template->assign( - array( - 'CATEGORIES_NAV'=>$page['title'], - 'U_ELEMENTS_PAGE' - =>$base_url.get_query_string_diff(array('display','start')), - 'U_GLOBAL_MODE' - => - $base_url - .get_query_string_diff(array('mode','display')) - .'&mode=global', - 'F_ACTION'=>$base_url.get_query_string_diff(array()), - 'month_list' => $month_list, - 'level_options' => get_privacy_level_options(), - ) - ); - -// +-----------------------------------------------------------------------+ -// | global mode thumbnails | -// +-----------------------------------------------------------------------+ - -// how many items to display on this page -if (!empty($_GET['display'])) -{ - if ('all' == $_GET['display']) - { - $page['nb_images'] = count($page['cat_elements_id']); - } - else - { - $page['nb_images'] = intval($_GET['display']); - } -} -else -{ - $page['nb_images'] = 5; -} - - - -if (count($page['cat_elements_id']) > 0) -{ - $nav_bar = create_navigation_bar( - $base_url.get_query_string_diff(array('start')), - count($page['cat_elements_id']), - $page['start'], - $page['nb_images'] - ); - $template->assign(array('navbar' => $nav_bar)); - - // tags - $all_tags = get_all_tags(); - - $element_ids = array(); - - $query = ' -SELECT id,path,tn_ext,name,date_creation,comment,author,level,file - FROM '.IMAGES_TABLE; - - if (is_numeric($_GET['cat'])) - { - $category_info = get_cat_info($_GET['cat']); - - $conf['order_by'] = $conf['order_by_inside_category']; - if (!empty($category_info['image_order'])) - { - $conf['order_by'] = ' ORDER BY '.$category_info['image_order']; - } - - $query.= ' - JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id'; - } - - $query.= ' - WHERE id IN ('.implode(',', $page['cat_elements_id']).')'; - - if (is_numeric($_GET['cat'])) - { - $query.= ' - AND category_id = '.$_GET['cat']; - } - - $query.= ' - '.$conf['order_by'].' - LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].' -;'; - $result = pwg_query($query); - - while ($row = pwg_db_fetch_assoc($result)) - { - array_push($element_ids, $row['id']); - - $src = get_thumbnail_url($row); - - // creation date - if (!empty($row['date_creation'])) - { - list($year,$month,$day) = explode('-', $row['date_creation']); - } - else - { - list($year,$month,$day) = array('',0,0); - } - - $query = ' -SELECT - tag_id, - name AS tag_name - FROM '.IMAGE_TAG_TABLE.' AS it - JOIN '.TAGS_TABLE.' AS t ON t.id = it.tag_id - WHERE image_id = '.$row['id'].' -;'; - $tag_selection = get_fckb_taglist($query); - - $template->append( - 'elements', - array( - 'ID' => $row['id'], - 'TN_SRC' => $src, - 'LEGEND' => !empty($row['name']) ? - $row['name'] : get_name_from_file($row['file']), - 'U_EDIT' => - PHPWG_ROOT_PATH.'admin.php?page=picture_modify'. - '&image_id='.$row['id'], - 'NAME' => !empty($row['name'])?$row['name']:'', - 'AUTHOR' => !empty($row['author'])?htmlspecialchars($row['author']):'', - 'LEVEL' => !empty($row['level'])?$row['level']:'0', - 'DESCRIPTION' => !empty($row['comment'])?$row['comment']:'', - 'DATE_CREATION_YEAR' => $year, - 'DATE_CREATION_MONTH' => (int)$month, - 'DATE_CREATION_DAY' => (int)$day, - 'TAGS' => $tag_selection, - ) - ); - } - - $template->assign('ELEMENT_IDS', implode(',', $element_ids)); -} - -trigger_action('loc_end_element_set_unit'); - -// +-----------------------------------------------------------------------+ -// | sending html code | -// +-----------------------------------------------------------------------+ - -$template->assign_var_from_handle('ADMIN_CONTENT', 'element_set_unit'); -?> \ No newline at end of file -- cgit v1.2.3