[Help ASAP] Points Shop redirects to /me page [Please!]

TinyBuilder

Bike ✔
Mar 19, 2012
717
66
Hello, in the morning, everything was going fine and when I came back and went to /pointshop/index.php, it just redirect me to the /me page :(

Can someone give me a fix for this?

Thanks a lot,
Tiny
 

Ghost

Legacy, it's all anyone leaves behind.
Jun 8, 2012
1,640
503
in the config you hotels url should be there and the Tab that Says Points shop on you Me Page or Where ever its located should lead to the shop with the code that links it. its like making a new tab.
 

TinyBuilder

Bike ✔
Mar 19, 2012
717
66
Please post the index.php


Index.php:

PHP:
<?php
define('IN_INDEX', 1);
require_once 'global.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js"></script>
<script type="text/javascript" src="js/default.js"></script>
<script type="text/javascript" src="js/tipTip.js"></script>
<script>
$(function(){
    $(".hover").tipTip();
});
</script>
<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css" />
<link href="css/tiptip.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $_CONFIG['cms']['name']; ?>: Points Shop</title>
</head>
<div id="headbox">
<?php if($_SESSION['points']['rank'] >=  $_CONFIG['admin']['add']) { echo ' <img src="images/tools.gif" class="hover" title="Tools!" id="tools-button" />'; } ?>
<img src="images/coins.png" class="hover" title="You have <b id='amount_points'><?php echo $points->getPoints($_SESSION['points']['id']); ?></b> Points!" /><b id="buymore" class="paypal_button">Buy Points</b>
<?php
if($_CONFIG['daily']['rewards'])
{
if(!in_array($_SESSION['points']['id'], $points->getDailyids())) echo '<b id="buymore" class="daily">Daily Reward</b>';
unset($ids);
}
?>
<img src="images/exit.png" class="hover" title="Exit the Shop" style="position:absolute; cursor:pointer; right:50px;" onclick="window.location.href='<?php echo $_CONFIG['cms']['url']; ?>'" />
<div id="button"><img id="button_image" src="images/up.png" title="Close" /></div>
</div>
<div id="headwrap"><img src="images/banner.png" onclick="window.location.href='index.php'" /></div>
<div id="content">
    <div class="container">
        <div class="wrapper">
            <div class="grid_24">
                <div id="tools">
                <div id="tools_msg" style="width:125px; display:none;"></div>
                <?php if($_SESSION['points']['rank'] >=  $_CONFIG['admin']['add']) include 'pages/tools.php'; ?>
                </div>
                <div id="tools_add">
                Add what ever >.>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="overlay hidden">
        <div class="page hidden">
            <div class="exitbutton"></div>
            <div class="loadPage">
            </div>
        </div>
    </div>
<div id="content">
    <div class="container">
    <div class="wrapper">
        <div class="grid_9">
        <div class="indent">
        <?php if($_CONFIG['sell']['vip']){ ?>
            <div class="box1">
            <h3>VIP</h3>
            <?php include 'pages/vip.php'; ?>
            <div style="display:none;" id="msg_vip"></div>
            </div>
            <?php }
            if($_CONFIG['sell']['credits']){?>
            <div class="box1">
            <h3>Credits</h3>
            <?php include 'pages/credits.php'; ?>
            <div style="display:none;" id="msg_credits"></div>
            </div>
            <?php }
            if($_CONFIG['sell']['pixels']) { ?>
            <div class="box1">
            <h3>Pixels</h3>
            <?php include 'pages/pixels.php'; ?>
            <div style="display:none;" id="msg_pixels"></div>
            </div>
            <?php } ?>
        </div>
        </div>
        <div class="grid_8">
        <?php if($_CONFIG['sell']['furni']){ ?>
            <div class="box1">
            <h3>Rares</h3>
            <?php include 'pages/furni.php'; ?>
            <div style="display:none;" id="msg_furni"></div>
            </div>
            <?php }
            if($_CONFIG['sell']['badges']){ ?>
            <div class="box1">
            <h3>Badges</h3>
            <?php include 'pages/badges.php'; ?>
            <div style="display:none;" id="msg_badge"></div>
            </div>
            <?php } ?>
        </div>
        <?php
        if($_CONFIG['sell']['commands']){?>
        <div class="grid_7">
            <div class="box1">
            <h3>Commands</h3>
            <?php include 'pages/commands.php'; ?>
            <div style="display:none;" id="msg_commands"></div>
            </div>
        </div>
        <?php }?>
    </div>
    </div>
</div>
  <div class="footer-wrap">
    <footer class="container">
        Points shop by <b><a href="http://www.otaku-studios.com/members/1664831.html">x9751</a></b> @ Otaku-Studios.com &copy; <?php echo $_CONFIG['cms']['name']; ?> Hotel
    </footer>
  </div>
<body>
</body>
<script type="text/javascript">
 
</script>
</html>

Few things
A) Are you logged in to the CMS?
B) Is the scripting alright, no redirects in their that aren't needed?
C) Maybe show us the pages?


A) Yup
B) Idk about the coding, i didn't code it!
C) Live Demo:  
in the config you hotels url should be there and the Tab that Says Points shop on you Me Page or Where ever its located should lead to the shop with the code that links it. its like making a new tab.

Yeah my hotel's URL is in the config.
 

Eronisch

Web Developer
Jan 1, 2011
234
25
Are you logged in?
If you aren't you will be redirected to the index page to login, could be possible that you can only view that page if you are logged in.

Did you edited your .htacces file?
 

TinyBuilder

Bike ✔
Mar 19, 2012
717
66
Are you logged in?
If you aren't you will be redirected to the index page to login, could be possible that you can only view that page if you are logged in.

Did you edited your .htacces file?
It doesn't redirect me to index page, i am sure I am logged in, but it redirect me to /me page. 
nothings wrong with that its that you don't have it linked right in your pages located.

As i said, I didn't code the shop, it's a fresh download and I didn't change anything in the folder except config.php [I have added some badges though]
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
If you use Inspect Element, you will see it requests the page, but it's cancelling it. Would you mind including your me.php page and the global.php page?
 

Ghost

Legacy, it's all anyone leaves behind.
Jun 8, 2012
1,640
503
It doesn't redirect me to index page, i am sure I am logged in, but it redirect me to /me page. 


As i said, I didn't code the shop, it's a fresh download and I didn't change anything in the folder except config.php [I have added some badges though]

I mean as in that YOU need to have it in the tabs on your RevCMS Theme...
 

TinyBuilder

Bike ✔
Mar 19, 2012
717
66
I mean as in that YOU need to have it in the tabs on your RevCMS Theme...

I use DeltaCMS. And yeah it is on the tab 
If you use Inspect Element, you will see it requests the page, but it's cancelling it. Would you mind including your me.php page and the global.php page?

Sorry not the me.php page :L

Global.php:

PHP:
<?php
//Simple but working coding :O//
if($index !== true){
    exit("Do not underestimate DeltaCMS. It has advanced security.");
}
 
//Defines the htdocs(for XAMPP) or wwwroot(for IIS) path//
$docs_split = explode('core', __FILE__);
if(isset($docs_split[0])){
    define('root', $docs_split[0]); // New Method //
} else {
    define('D_S', DIRECTORY_SEPARATOR); // Old Method //
    define('root', str_replace(array('\core'.D_S, '\style'.D_S), '', dirname(__FILE__).D_S).D_S); // Old Method //
}
 
 
//Includes config//
require_once root.'core/config.php';
 
//Gives error if config isn't correct//
if(!isset($sitename) || !isset($style) || !isset($maintenance) || !isset($debug)){
    exit("<b>Fatal Error</b>: Configuration file isn't correct!");
}
 
 
//Gives error if style doesn't exist//
if(!file_exists('style/'.$style.'/index.php')){
    if($debug == true){
        exit("<b>Wrong Style!</b> DeltaCMS will exit.");
    } else {
        exit("Put debug on for error information..");
    }
}
 
//With this you can use $_SESSIONs//
session_start();
 
//With this you can use $_COOKIEs - Not working yet//
$_COOKIE = array();
 
 
//The exploit-filter functions//
function clean($txt){ return stripslashes(trim($txt)); }
function X($txt){ return mysql_real_escape_string(clean($txt)); }
 
 
//Connects to MySQL//
if(!isset($debug) || $debug == true){
    error_reporting(E_ALL);
    $mysql = mysql_connect($dbhost, $dbuser, $dbpass) or die("Can't connect to the mysql host. Error: ".mysql_error());
    mysql_select_db($dbname, $mysql) or die("Error: ".mysql_error());
} else {
    error_reporting(0);
    $mysql = mysql_connect($dbhost, $dbuser, $dbpass) or die("Put debug on for error information..");
    mysql_select_db($dbname, $mysql) or die("Put debug on for error information..");
}
 
//Auto defines the Site: No config needed :O//
$site = 'http://'.X($_SERVER['SERVER_NAME']);
 
 
// For Proxy / CloudFlare / IIS //
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = X($_SERVER['HTTP_CF_CONNECTING_IP']); }
if(isset($_SERVER['HTTP_CLIENT_IP'])) { $_SERVER['REMOTE_ADDR'] = X($_SERVER['HTTP_CLIENT_IP']); }
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = X($_SERVER['HTTP_X_FORWARDED_FOR']); }
$remoteip = X($_SERVER['REMOTE_ADDR']);
 
 
require_once root.'core/habbocore.php';
$core = new Core();
$user = new User();
$top = new Top();
$swf = new Swf();
$tpl = new Tpl(); // NEW!! //
 
$online = $core->online();
$WebBuild = $core->WebBuild(nl);
?>
 

Users who are viewing this thread

Top