This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ // File cannot be called directly if (isset($_SERVER['SCRIPT_FILENAME']) && 'only-users.php' == basename($_SERVER['SCRIPT_FILENAME'])) { die (''); // Silence is Gold } global $user_ID; if ( $user_ID ) { if ( STYLESHEETPATH !== TEMPLATEPATH && file_exists(STYLESHEETPATH . '/page.php') ) { include (STYLESHEETPATH . '/page.php'); } else { include (TEMPLATEPATH . '/page.php'); } } else { if ( have_posts() ) { the_post(); $go_to = get_permalink(); wp_redirect(get_bloginfo('url') .'/wp-login.php?redirect_to='. $go_to, 401); } }