Can anyone help me with my cms quick??

Dec 8, 2011
37
0
Right when i go to localhost it comes up with:

Code:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\Index.php on line 289

Can anyone help???

Do you need the full code of my index.php??
 
Dec 8, 2011
37
0
PHP:
<?php
 
// error_reporting(0);
session_start();
 
####################################
#  FoloCMS WAS CREATED BY X1M!    #
####################################
# I DONT DEMAND THAT YOU KEEP THE  #
# COPYRIGHT IN THE FOOTER, BUT I  #
# DO DEMAND THAT THIS NOTE IS KEPT #
# IN THE SOURCE CODE. YOU CAN EDIT #
# HOWEVER THE FUCK YOU WANT, JUST  #
# KEEP THIS NOTE. YOU MAY NOT RELE #
# ASE AS YOUR OWN, THIS IS STILL  #
# MADE BY ME.                -X1M! #
####################################
 
/* This is the only thing you NEED to edit. */
$hotelOwner = "ShayF"; // Hotel Owner
$pageTitle = "Crane Hotel"; // Hotel Name
/* This is the weekly rare system. Edit every week. */
$weeklyRare = "Golden Nelly"; // The name of the weekly rare.
$weeklyRareId = "gold_elephant"; // The ID of the weekly rare, as written in buy_furni.
$weeklyRarePrice = "2500"; // The price of the weekly rare.
$useWeeklyRareSystem = 1; // If this is 1, the weekly rare system will be used.
/* You don't need to edit this. */
$refillCredits = 3000; // How many credits a user can receive when refilling.
$refillCreditsBelow = 1500; // If the user has less than this amount, *he can refill them.
/* DO NOT EDIT THIS. */
$StartingCredits = file_get_contents("Server/database/new_habbo/credits.txt"); // Attracts visitors into registering.
 
/* Setting and Getting user settings. */
function setValue($username, $setting, $value) {
$fh = fopen("Server/database/habbos/".$username."/" . $setting . ".txt", "w") or die("ERROR WHEN EDITING ".$setting." SETTING FOR USER ".$username.".");
fwrite($fh, $value);
fclose($fh);
}
 
/* Updating the values. */
function updateValues($username) {
$_SESSION['user_username'] = file_get_contents("Server/database/habbos/".$username."/name.txt");
$_SESSION['user_password'] = file_get_contents("Server/database/habbos/".$username."/pass.txt");
$_SESSION['user_credits'] = file_get_contents("Server/database/habbos/".$username."/credits.txt");
$_SESSION['user_hcdays'] = file_get_contents("Server/database/habbos/".$username."/hcdays.txt");
$_SESSION['user_email'] = file_get_contents("Server/database/habbos/".$username."/email.txt");
$_SESSION['user_motto'] = file_get_contents("Server/database/habbos/".$username."/mission.txt");
$_SESSION['user_consolemotto'] = file_get_contents("Server/database/habbos/".$username."/consolemission.txt");
$_SESSION['user_sex'] = file_get_contents("Server/database/habbos/".$username."/sex.txt");
$_SESSION['user_hand'] = file_get_contents("Server/database/habbos/".$username."/hand.txt");
$_SESSION['user_tickets'] = file_get_contents("Server/database/habbos/".$username."/tickets.txt");
$_SESSION['user_film'] = file_get_contents("Server/database/habbos/".$username."/film.txt");
$_SESSION['user_badges'] = file_get_contents("Server/database/habbos/".$username."/badges.txt");
$_SESSION['user_badgeonoff'] = file_get_contents("Server/database/habbos/".$username."/badgeonoff.txt");
$_SESSION['user_rank'] = file_get_contents("Server/database/habbos/".$username."/rank.txt");
$_SESSION['user_curbadge'] = file_get_contents("Server/database/habbos/".$username."/curbadge.txt");
$_SESSION['user_friendlist'] = file_get_contents("Server/database/habbos/".$username."/friendlist.txt");
}
 
/* Logging out the user by deleteing the session. */
function logout() {
unset($_SESSION['isLoggedIn']);
}
 
/* Login script */
If(isset($_GET['login']) && isset($_POST['login_name']) && isset($_POST['login_pass'])) {
if (file_exists("Server/database/habbos/".$_POST['login_name'])) {
if($_POST['login_pass'] == file_get_contents("Server/database/habbos/".$_POST['login_name']."/pass.txt")) {
$_SESSION['isLoggedIn'] = 1;
updateValues($_POST['login_name']);
echo "<script>alert('Welcome back, ".$_POST['login_name']."!');</script>";
}else{
echo "<script>alert('Invalid password or username specified.');</script>";
}
}else{
echo "<script>alert('Invalid password or username specified.');</script>";
}
}
 
/* Logout script. */
If(isset($_GET['logout']) && $_SESSION['isLoggedIn'] == 1) {
logout();
}
 
/* Update motto script. */
if(isset($_GET['motto']) && isset($_POST['usr_motto']) && $_SESSION['isLoggedIn'] == 1) {
setValue($_SESSION['user_username'], "mission", $_POST['usr_motto']);
// setValue($_SESSION['user_username'], "consolemission", $_POST['cnsl_motto']);
echo "<script>alert('Motto updated!');</script>";
updateValues($_SESSION['user_username']);
}
 
/* Refill credits to a specified amount when below a specified amount. */
if(isset($_GET['refill']) && $_SESSION['isLoggedIn'] == 1) {
if($_SESSION['credits'] < $refillCreditsBelow) {
$giveCredits = $refillCredits - $_SESSION['credits'];
setValue($_SESSION['user_username'], "credits", $giveCredits);
updateValues($_SESSION['user_username']);
echo "<script>alert('Your credits have been refilled, you we're given ".$giveCredits." credits!');</script>";
}else{
echo "<script>alert('You can only refill your credits when you have an amount below ".$refillCredits."!');</script>";
}
}
 
/* News system script. Edits the file with the feed. */
if(isset($_GET['editnews']) && $_SESSION['isLoggedIn'] == 1 && isset($_POST['news_content']) && $_SESSION['user_rank'] == "admin") {
$fh = fopen("Server/database/news_feed.txt", "w") or die("ERROR WHEN EDITING NEWS FEED.");
fwrite($fh, $_POST['news_content']);
fclose($fh);
}
 
/* Page Visits Counter */
$newNumber = file_get_contents("Server/database/visits.txt") + 1;
$fh = fopen("Server/database/visits.txt", "w") or die("COULNDT OPEN VISITOR COUNTER.");
fwrite($fh, $newNumber);
fclose($fh);
 
/* Check for banned people and hold them banned. */
if($_SESSION['isLoggedIn'] == 1) {
if(file_exists('server/database/user_bans/'.$_SESSION['user_username'].'.txt')) {
setCookie("isBanned", "true", "Never");
}
}
if($_COOKIE['isBanned'] == "true") {
echo "<script>alert('You have been banned!');</script>";
exit();
}
 
/* HC, Tickets and Films can be bought on Homepage. */
if(isset($_GET['buyhc']) && $_SESSION['isLoggedIn'] == 1) {
if($_SESSION['user_credits'] >= 50) {
$newHC = $_SESSION['user_hcdays'] + 100;
$newCredits = $_SESSION['user_credits'] - 50;
setValue($_SESSION['user_username'], "hcdays", $newHC);
setValue($_SESSION['user_username'], "credits", $newCredits);
echo "<script>alert('You have bought 100 days of HC membership!');</script>";
}else{
echo "<script>alert('You dont have enough credits to buy HC membership.');</script>";
}
}
if(isset($_GET['buyfilm']) && $_SESSION['isLoggedIn'] == 1) {
if($_SESSION['user_credits'] >= 20) {
$newFilm = $_SESSION['user_film'] + 15;
$newCredits = $_SESSION['user_credits'] - 20;
setValue($_SESSION['user_username'], "film", $newFilm);
setValue($_SESSION['user_username'], "credits", $newCredits);
echo "<script>alert('You have bought 15 films!');</script>";
}else{
echo "<script>alert('You dont have enough credits to buy films.');</script>";
}
}
if(isset($_GET['buytickets']) && $_SESSION['isLoggedIn'] == 1) {
if($_SESSION['user_credits'] >= 35) {
$newTickets = $_SESSION['user_tickets'] + 20;
$newCredits = $_SESSION['user_credits'] - 35;
setValue($_SESSION['user_username'], "tickets", $newTickets);
setValue($_SESSION['user_username'], "credits", $newCredits);
echo "<script>alert('You have bought 20 tickets!');</script>";
}else{
echo "<script>alert('You dont have enough credits to buy tickets.');</script>";
}
}
 
/* Buying the weekly rare. */
if(isset($_GET['buyrare']) && $_SESSION['isLoggedIn'] == 1 && $useWeeklyRareSystem == 1) {
if($_SESSION['user_credits'] >= $weeklyRarePrice) {
$newHand = $_SESSION['user_hand'] . $weeklyRareId . ";";
$newCredits = $_SESSION['user_credits'] - $weeklyRarePrice;
setValue($_SESSION['user_username'], "hand", $newHand);
setValue($_SESSION['user_username'], "credits", $newCredits);
echo "<script>alert('You have bought a ".$weeklyRare." for ".$weeklyRarePrice."!');</script>";
}else{
echo "<script>alert('You dont have enough credits to buy the weekly rare..');</script>";
}
}
##############################################################################################
?>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
    <title><?php print $pageTitle; ?> - Powered by goodCMS</title>
   
 
    <link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon">
    <style>
        <?php include "Style.css"; ?>
    </style>
    <script>
    function openClient() {
    window.location = "client.php";
    }
   
function Hide(id) {
document.getElementById(id).setAttribute("class", "hide");
}
function Show(id) {
document.getElementById(id).setAttribute("class", "show");
}
    </script>
</head>
<body>
    <center>
        <table id="navigation_overlay">
            <tbody><tr>
                <td id="navigation_banner"></td>
                <td>
                    <!-- MENU --><a href="client.php"><input type="button" value="Client"></a>&nbsp;<?php if($_SESSION['isLoggedIn']): updateValues($_SESSION['user_username']); ?><a href="?logout"><input type="button" value="Logout"></a><?php endif; ?>
                    <div id="navigation_right">
                        <center>
                            <strong><!-- USERS ONLINE -->0 </strong> users online                        </center>
                    </div>
                </td>
            </tr>
        </tbody></table><br>        <table id="overview_overlay">
            <tbody><tr id="overview_verticaltop">
                <td>
                    <div id="overview_overlay_1">
                    <!-- BOX 3: USER INFORMATION -->
                    <?php if($_SESSION['isLoggedIn'] == 1): ?>
                        <b id="general_upper"><!-- USERNAME --><?php print $_SESSION['user_username']; ?></b> <span style="color: gray; font-size: 12px;">(<?php print $_SESSION['user_rank']; ?>)</span><br>
                        <br><b>Mission: </b><div style="height:3px;"></div>
                        <form method="post" action="?motto">
                            <input type="text" name="usr_motto" value="<?php print $_SESSION['user_motto']; ?>" style="margin-right: 5px; width: 175px;">
                            <!-- <input type="text" name="cnsl_motto" value="<?php print $_SESSION['user_motto']; ?>" style="margin-right: 5px; width: 175px;"> -->
                            <input type="submit" value="Update" name="hidden_motto" style="width: 65px;">
                        </form>
                        <br>
                        <input onClick="openClient();" type="submit" value="Check in!" style="margin-right: 5px; width: 249px;">
                        <br>
                                                <br><div id="overview_credits"></div><b>
                                                <!-- CREDITS --><?php print $_SESSION['user_credits']; ?></b> <?php if($_SESSION['user_credits'] < $refillCreditsBelow): ?><a href="?refill">refill</a> <?php endif; ?>credits&nbsp;-&nbsp;<b>
                                                <!-- HC --><?php print $_SESSION['user_hcdays']; ?></b> HC days&nbsp;-&nbsp;<b>
                                                <!-- FILMS --><?php print $_SESSION['user_film']; ?></b> films&nbsp;-&nbsp;<b>
                                                <!-- TICKETS --><?php print $_SESSION['user_tickets']; ?></b> tickets
                        <?php else: ?>
                        You are not logged in, please do so. -------------------->
                        <?php endif; ?>
                        </div>
                   
                    <div id="overview_overlay_1" style="margin-top: 20px;">
                    Registered Users: <?PHP PRINT file_get_contents("Server/Database/habbos/count.txt"); ?><br />
                    Created rooms: <?PHP PRINT file_get_contents("Server/Database/privaterooms/count.txt"); ?><br />
                    Furniture bought: <?PHP PRINT file_get_contents("Server/Database/furni/count.txt"); ?><br />
                    Total Page Visits: <?PHP PRINT file_get_contents("Server/database/visits.txt"); ?><br />
                    <?php if($_SESSION['isLoggedIn'] == 1): ?>
                    <div id="purchases" class="hide">
                    <!-- HC PURCHASE -->
                    <a href="?buyhc"><input type="button" value="Buy 100 days HC for 50 credits."></a><br /><br />
                    <!-- TICKETS PURCHASE -->
                    <a href="?buytickets"><input type="button" value="Buy 20 tickets for 35 credits."></a><br /><br />
                    <!-- FILM PURCHASE -->
                    <a href="?buyfilm"><input type="button" value="Buy 15 films for 20 credits."></a><br /><br />
                    <!-- WEEKLY RARE PURCHASE -->
                    <a href="?buyrare"><input type="button" value="Buy the weekly rare, a <?php print $weeklyRare; ?> for <?php print $weeklyRarePrice; ?> credits."></a><br />
                    </div>
                    <a href="#" onClick="Hide('purchases');">Hide</a>/<a href="#" onClick="Show('purchases');">Show</a> Purchases.
                    <?php endif; ?>
                  </div>           
            </td>
           
            <td>
                    <div id="overview_overlay_2">
                    <!-- BOX 2: LOGIN -->
                    <?php if($_SESSION['isLoggedIn'] != 1): ?>
                        <form method="post" action="?login">
                              <B id="general_upper">Username:</b> <input type="text" onClick="this.value=''" name="login_name" value="..."><br ><br >
                              <b id="general_upper">Password:</b> <input type="password" onClick="this.value=''" name="login_pass" value="..."><br ><br >
                              <input type="submit" value="Login!" name="hidden_motto" style="width: 65px;">
                        </form>
                        <b id="general_upper">Register now, and get <u><?php print $StartingCredits; ?></u> credits on the <a href="client.php">go</a>!
                    <?php else: ?>
                    <b> News and Information </b><br />
                    <?php if($_SESSION['user_rank'] == "admin"): ?>
                    <form method="post" action="?editnews">
                    <?php endif; ?>
                    <textarea style="height: <?php if($_SESSION['user_rank'] == "admin"): ?>175px<?php else: ?>209px<?php endif; ?>;" onClick="document.getElementById('focusME').focus();" name="news_content"<?php if($_SESSION['user_rank'] != "admin"): ?> readonly="true"<?php endif; ?>>
<?php echo str_replace("</textarea>", "&lt;/textarea&gt;", file_get_contents("Server/database/news_feed.txt")); ?>
                    </textarea><br /><br />
                    <?php if($_SESSION['user_rank'] == "admin"): ?>
                    <input type="submit" value="Update feed!" style="width: 260;">
                    </form>
                    <?php endif; ?>
                    <?php endif; ?>
                    </div>
                </td>
            </tr>
        </tbody></table><br>
   
    <br><div id="general_footer" style="border: 1px solid #CCC; background-color: white; padding 3px 3px 3px 3px;">
    Copyright &copy; 2010 - 2011 <?php print $CraneHotel all rights reserved; ?> [Powerd By FoloCmsCMS]
    </div>
</body></html>






That is the script! (PHP)
 

Users who are viewing this thread

Top