File size: 5.82Kb
<?php
include("head.php");
////////////////////////////////////////MAIN PAGE
if($action=="main")
{
addvisitor();
addonline(getuid_sid($sid),"Sorting Hat","");
echo "<div><br/>Sorting Hat<br/></div>";
echo "<p align=\"center\">";
$name = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$uid."'"));
echo "<img src=\"/images/hat.jpg\" alt=\"*\"/><br/>";
echo "<b>Welcome To The Sorting Hat!</b><br/>";
echo "<br/>";
$hat = rand(1,4);
if($hat==1){
echo "$name[0] I See Good Things To Come From You In the Future!<br/><br/>";
}else if($hat==2){
echo "$name[0] Put All Your Thought Into This!<br/><br/>";
}else if($hat==3){
echo "$name[0] Theres Ssssomething Sssstrange About You!<br/><br/>";
}else if($hat==4){
echo "$name[0] Make Sure You Answer As Truthfully As Possible!<br/><br/>";
}
echo "Place Your Head Inside The Hat And Answer The Hats Questions!<br/>";
echo "<br/>";
echo "<a href=\"hat.php?action=q1\">Place Head Inside Hat</a><br/>";
echo getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////question 1
else if($action=="q1")
{
addvisitor();
addonline(getuid_sid($sid),"Sorting Hat","");
echo "<div><br/>Sorting Hat<br/></div>";
echo "<p align=\"center\">";
echo "<img src=\"/images/hat.jpg\" alt=\"*\"/><br/><br/>";
echo "<b>If You Found Ј10000 On A bus Would You... </b><br/><br/>";
echo "<a href=\"hat.php?action=q2&a=5\">Give It To Charity</a><br/>";
echo "<a href=\"hat.php?action=q2&a=2\">Keep It</a><br/>";
echo "<a href=\"hat.php?action=q2&a=3\">Give It To The Police</a><br/>";
echo "<a href=\"hat.php?action=q2&a=4\">Keep Half And Give Half To Charity</a><br/>";
echo "<br/><br/>";
echo getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////question 2
else if($action=="q2")
{
addonline(getuid_sid($sid),"Sorting Hat","");
echo "<div><br/>Sorting Hat<br/></div>";
echo "<p align=\"center\">";
$a=$_GET["a"];
$sc = $a;
echo "<img src=\"/images/hat.jpg\" alt=\"*\"/><br/><br/>";
echo "<b>What Animal Would You Choose... </b><br/><br/>";
echo "<a href=\"hat.php?action=q3&a=2&sc=$sc\">Snake</a><br/>";
echo "<a href=\"hat.php?action=q3&a=5&sc=$sc\">Owl</a><br/>";
echo "<a href=\"hat.php?action=q3&a=3&sc=$sc\">Rat</a><br/>";
echo "<a href=\"hat.php?action=q3&a=4&sc=$sc\">Cat</a><br/>";
echo "<br/><br/>";
echo getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////question 3
else if($action=="q3")
{
addonline(getuid_sid($sid),"Sorting Hat","");
echo "<div><br/>Sorting Hat<br/></div>";
echo "<p align=\"center\">";
$a=$_GET["a"];
$sc=$_GET["sc"];
$sc = $a + $sc;
echo "<img src=\"/images/hat.jpg\" alt=\"*\"/><br/><br/>";
echo "<b>What Flavour Jelly Bean Do You Like... </b><br/><br/>";
echo "<a href=\"hat.php?action=q4&a=5&sc=$sc\">Lime</a><br/>";
echo "<a href=\"hat.php?action=q4&a=3&sc=$sc\">Brussel Sprout</a><br/>";
echo "<a href=\"hat.php?action=q4&a=4&sc=$sc\">Chocolate</a><br/>";
echo "<a href=\"hat.php?action=q4&a=2&sc=$sc\">Boggie</a><br/>";
echo "<br/><br/>";
echo getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////question 4
else if($action=="q4")
{
addonline(getuid_sid($sid),"Sorting Hat","");
echo "<div><br/>Sorting Hat<br/></div>";
echo "<p align=\"center\">";
$a=$_GET["a"];
$sc=$_GET["sc"];
$sc = $a + $sc;
echo "<img src=\"/images/hat.jpg\" alt=\"*\"/><br/><br/>";
echo "<b>Which Magical Power Would You Choose... </b><br/><br/>";
echo "<a href=\"hat.php?action=end&a=2&sc=$sc\">Read Peoples Minds</a><br/>";
echo "<a href=\"hat.php?action=end&a=4&sc=$sc\">Move Things With Your Mind</a><br/>";
echo "<a href=\"hat.php?action=end&a=5&sc=$sc\">Invisability</a><br/>";
echo "<a href=\"hat.php?action=end&a=3&sc=$sc\">Fly</a><br/>";
echo "<br/><br/>";
echo getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////end
else if($action=="end")
{
addonline(getuid_sid($sid),"Sorting Hat","");
echo "<div><br/>Sorting Hat<br/></div>";
echo "<p align=\"center\">";
$a=$_GET["a"];
$sc=$_GET["sc"];
$sc = $a + $sc;
echo "<img src=\"/images/hat.jpg\" alt=\"*\"/><br/><br/>";
if($sc<11){
echo "Your Best Suited For Slytherin!<br/>";
echo "<img src=\"/images/slyth.jpg\" alt=\"Slytherin\"/><br/>";
$house = "Slytherin";
}else if($sc>10&&$sc<14){
echo "Your Best Suited For Hufflepuff<br/>";
echo "<img src=\"/images/huff.jpg\" alt=\"Hufflepuff\"/><br/>";
$house = "Hufflepuff";
}else if($sc>13&&$sc<17){
echo "Your Best Suited For Ravenclaw!<br/>";
echo "<img src=\"/images/raven.jpg\" alt=\"Ravenclaw\"/><br/>";
$house = "Ravenclaw";
}else if($sc>16){
echo "Your Best Suited For Gryffindor<br/>";
echo "<img src=\"/images/gryff.jpg\" alt=\"Gryffindor\"/><br/>";
$house = "Gryffindor";
}
$name = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$uid."'"));
$who = $name[0];
$message = "[id=$uid]$who [/id] Has Visited The Sorting Hat. [br/] The Sorting Hat Has Placed Them In [b] $house [/b] :wizard ";
autopm($message, 1781);
echo "<br/><br/>";
echo "<a href=\"index.php?action=viewtpc&tid=1295\">Back To Topic</a><br/><br/>";
echo getfoot($sid,$folder);
exit();
}
else{
addonline(getuid_sid($sid),"Lost in sorting hat lol","");
echo "<div><br/>Doh!<br/></div>";
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
echo getfoot($sid,$folder);
exit();
}
?>