$representative_ext, 'width' => $file_infos['width'], 'height' => $file_infos['height'], ), array('id' => $image_id) ); array_push( $page['infos'], l10n('The representative picture was updated') ); } // force refresh of multiple sizes delete_element_derivatives($row); } } // +-----------------------------------------------------------------------+ // | Tabs | // +-----------------------------------------------------------------------+ include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); $page['tab'] = 'update'; $tabsheet = new tabsheet(); $tabsheet->set_id('photo'); $tabsheet->select('update'); $tabsheet->assign(); // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filenames( array( 'plugin_admin_content' => dirname(__FILE__).'/admin.tpl' ) ); // retrieving direct information about picture $query = ' SELECT * FROM '.IMAGES_TABLE.' WHERE id = '.$_GET['image_id'].' ;'; $row = pwg_db_fetch_assoc(pwg_query($query)); if (!in_array(get_extension($row['path']), $conf['picture_ext']) or !empty($row['representative_ext'])) { $template->assign('show_file_to_update', true); } $template->assign( array( 'TN_SRC' => DerivativeImage::thumb_url($row), 'original_filename' => $row['file'], 'TITLE' => render_element_name($row), ) ); // +-----------------------------------------------------------------------+ // | sending html code | // +-----------------------------------------------------------------------+ $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); ?>