Skip to content

Instantly share code, notes, and snippets.

@Serubin
Created January 12, 2012 14:40
Show Gist options
  • Save Serubin/1600892 to your computer and use it in GitHub Desktop.
Save Serubin/1600892 to your computer and use it in GitHub Desktop.
<?php
session_start();
$isAdmin=isset($_SESSION['auth']);
if(isset($_POST['pass'])&&!$isAdmin){
if($_POST['pass']=="brl"){
$_SESSION['auth']=true;
$isAdmin=true;
}
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="shortcut icon"
href="img/favicon.ico" />
<title>BranchScape</title>
</head>
<body>
<div id="title">
<div id="header">
</div>
<div id="headerright">
<h4>Owners: Tanisjihanis, Venomm2, Serubin323</h4>
</div>
<ul class="menu">
<li><a href="#" id="homelink">Home</a></li>
<li><a href="#rules" id="ruleslink">Rules</a></li>
<li><a href="#map" id="maplink">Map</a></li>
<li><a href="#history">History</a></li>
<li><a href="#residents">Residents</a></li>
<li><a href="#login" id="loginlink">Login</a></li>
</ul>
</div>
<div id="home">
<div id="contenthome">
<div id="what">
<h3>What?</h3>
<p>For those of you wondering <big><b>"what is this branchscape thingy?"</b></big>, the answer is right here. Branchscape is a town themed after a <b>tree</b> that can be found in <u>Borjan</u>! Essentially, it is an incredibly realistic looking tree with a village <b><u>inside</b></u>. It currently supports 32 plots, including branch suites. Cottages on the ground are allowed as well, giving this town a huge population capacity.
</p>
<p><big>Click for Video</big></p>
<div id="whatpic">
<iframe src="http://player.vimeo.com/video/31655287?title=0&amp;byline=0&amp;portrait=0" width="400" height="300" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</div>
</div>
<div id="where">
<h3>Where?</h3>
<p>You can find branchscape in the far south borjan, a ways to the right of the south end station after you get off the main line. You should find a sandstone path crossing a river and going into a small tunnel. After you come out of the tunnel, you should see a tree. Go off the path and follow the trees to another sand path. That will take you to branchscape.
</p>
<div id="projects">
<h3>Current Projects</h3>
<ul>
<?php
$file = fopen("welcome.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
{
echo "<li>".fgets($file)."</li>";
}
fclose($file);
?>
</ul>
<div id="residents">
<h3>Residents</h3>
</div>
</div>
</div>
</div>
</div>
<div id="rules">
<div id="contentrules">
<h3>Settlement Rules:</h3>
<ul>
<li>Follow server rules</li>
<li>Follow any decrees made by the settlement owners whether temporary or permanent</li>
<li>Keep the town channel clean and use it for town use only</li>
<li>Keep caps minimal</li>
<li>No trespassing in others houses with out permission </li>
<li>We reserve the right to evict you with a 14 day notice (please notify use if you are away for an extended period of time)</li>
<li>We also reserve the right to evict you immediately under extreme circumstance </li>
<li>Having an all cobble building is grounds for eviction (if not fixed with in 7 days)</li>
<li><h3>Separate building rules for the main trees apply.
These rules include...</h3>
<ul><li>Remain within your plot unless explicitly allowed to do otherwise</li>
<li>Do not break any original parts of the tree(floor, dome, or branches) with out explicit permission</li>
<li>Ask before doing anything you think might not be allowed</li></ul></li></ul>
</div>
</div>
<div id="map">
<div id="contentmap">
<iframe src="http://www.escapecraft.net/maps/survival/?lat=6.700629&lng=-2.760316&zoom=6" width="500" height="450" style="margin: 0 auto; "> </iframe>
</div>
</div>
<div id="login">
<div id="contentlogin">
<form action="index.php" method="post">
Username: <input type="text" name="name" />
Password: <input type="text" name="pass" />
<input type="submit" />
</form>
<?php
echo $isAdmin;
echo $_SESSION;
if($isAdmin){
$projtext= file_get_contents("welcome.txt");
echo '<textarea name="projedit" cols="30" rows="10">'.$projtext.'</textarea>';
echo $projtxt;
}
/*
$pass = $_POST["pass"];
if ($pass=="brl"){ echo "Welcome to branchscape admin!";
$isAdmin = true;
echo $isAdmin;
//while(!feof($file))
// {
$projtext= file_get_contents("welcome.txt");
// }
echo '<textarea name="projedit" cols="30" rows="10">'.$projtext.'</textarea>';
echo $projtxt;
} echo $isAdmin;
*/
?>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/toggle.js"> </script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment