add('pdhr', l10n('Purge All'), $my_base_url.'&tab=pdhr'); $tabsheet->select($page['tab']); $tabsheet->assign(); // Onglet gestion par photo switch ($page['tab']) { case 'pdhr': $template->assign( 'gestion', array( )); //purge photo if (isset($_POST['Purge all hits on all pictures gallery'])) { $query = ' UPDATE ' . IMAGES_TABLE . ' SET hit= \'0\' ;'; $result = pwg_query($query); array_push( $page['infos'], l10n('Hit purge completed successfully') ); } if (isset($_POST['Purge all rate on all pictures gallery'])) { $query = ' UPDATE ' . IMAGES_TABLE . ' SET rating_score= \'NULL\' ;'; $result = pwg_query($query); $query = ' TRUNCATE ' . RATE_TABLE . ' ;'; $result = pwg_query($query); array_push( $page['infos'], l10n('Rate purge completed successfully') ); } break; } $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); ?>