Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- /*
- UserSpice 4
- An Open Source PHP User Management System
- by the UserSpice Team at http://UserSpice.com
- 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 <http://www.gnu.org/licenses/>.
- */
- ?>
- <?php require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php'; ?>
- <?php require_once $abs_us_root.$us_url_root.'users/includes/user_spice_ver.php'; ?>
- <?php header('X-Frame-Options: DENY'); ?>
- <?php
- //check for a custom page
- $currentPage = currentPage();
- if(isset($_GET['err'])){
- $err = Input::get('err');
- }
- if(file_exists($abs_us_root.$us_url_root.'usersc/'.$currentPage)){
- if(currentFolder()!= 'usersc'){
- $url = $us_url_root.'usersc/'.$currentPage;
- if(isset($_GET)){
- $url .= '?r=1'; //add initial ?
- foreach ($_GET as $key=>$value){
- $url .= '&'.$key.'='.$value;
- }
- }
- }
- Redirect::to($url);
- }
- $db = DB::getInstance();
- $settingsQ = $db->query("Select * FROM settings");
- $settings = $settingsQ->first();
- if ($settings->site_offline==1){
- die("The site is currently offline.");
- }
- if ($settings->force_ssl==1){
- if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
- // if request is not secure, redirect to secure url
- $url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
- Redirect::to($url);
- exit;
- }
- }
- //if track_guest enabled AND there is a user logged in
- if($settings->track_guest == 1 && $user->isLoggedIn()){
- if ($user->isLoggedIn()){
- $user_id=$user->data()->id;
- }else{
- $user_id=0;
- }
- new_user_online($user_id);
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <meta name="description" content="">
- <meta name="author" content="">
- <?php
- if(file_exists($abs_us_root.$us_url_root.'usersc/includes/head_tags.php')){
- require_once $abs_us_root.$us_url_root.'usersc/includes/head_tags.php';
- }
- ?>
- <title><?=$settings->site_name;?></title>
- <!-- Bootstrap Core CSS -->
- <!-- AKA Primary CSS -->
- <link href="<?=$us_url_root?><?=str_replace('../','',$settings->us_css1);?>" rel="stylesheet">
- <!-- Template CSS -->
- <!-- AKA Secondary CSS -->
- <link href="<?=$us_url_root?><?=str_replace('../','',$settings->us_css2);?>" rel="stylesheet">
- <!-- Your Custom CSS Goes Here!-->
- <link href="<?=$us_url_root?><?=str_replace('../','',$settings->us_css3);?>" rel="stylesheet">
- <!-- Custom Fonts -->
- <link href="<?=$us_url_root?>users/fonts/css/font-awesome.min.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <?php if(isset($_GET['err'])){
- bold("<br>".$err);
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement