Ejemplo n.º 1
0
        echo '
			</td>
			</tr>
			</table>
			';
        tEnd();
    }
    tBegin("Create a new kingdom");
    echo '
		Creating a kingdom requires <a href="index.php?page=kingdom&action=createprice">a lot of resources</a>: not only do you have to teleport your castle to your new land with a powerful spell,
		but you also have to pay for the construction of a few basic facilities like the town hall, the pub, the post office and the war room.
		';
    fTitle("index.php?page=kingdom&action=createkingdom");
    fText("Kingdom Name:", "name");
    $array = array(array("name" => "Don't choose coordinates (no additional cost)", "value" => "auto"), array("name" => "Choose coordinates (costs resources)", "value" => "choose"));
    fRadio("Coordinates:", "coordinates", $array);
    fEnd("create");
    tEnd();
    tBegin("Join a kingdom");
    $cost = round(pow($gdTeleportationCost * (1 + $acc["level"] * $gdTeleportationCostLevelMultiplier) * $gdKingdomJoiningMultiplier, $exponent));
    echo '
		You can only join a kingdom when the king or queen invites you.<br>
		Joining a kingdom will cost you <a href="index.php?page=kingdom&action=joinprice">a certain amount of resources</a>.
		';
    tEnd();
    if ($kd["type"] != 1) {
        tBegin("Leave a kingdom");
        echo '
			<a href="index.php?page=kingdom&action=leavekingdom">Click here</a> if you want to leave this kingdom.<br>
			All active curses will be cancelled.<br>
			';
Ejemplo n.º 2
0
        }
        echo '
			</table>
			<br><br>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			<td width="20%">
			</td>
			<td width="60%">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			';
        fText("Brimstone:", "brimstone", "0");
        fText("Crystal:", "crystal", "0");
        fText("Essence:", "essence", "0");
        fText("Granite:", "granite", "0");
        fRadio("Name setting:", "namesetting", array(array("name" => "scholar picks name", "value" => "scholar"), array("name" => "you pick name", "value" => "you")), 1);
        fText("New name:", "name");
        fEnd("Rename Nether");
    }
}
if ($action == "scholarorb" && $scholarperc >= 100) {
    echo '
		"<i>I sell magical orbs containing the spirit of a dead Nether Creature. They\'re the basic resource for a powerful spell that will improve fresh Nether eggs and will improve the quality of new Itherian items.<br>
		Use these spells together with enchanted gems to enhance your Nether creature. If you want to improve your Itherian item, you\'ll have to sacrifice some creatures as well.<br> 
		Orbs have a different color, depending on what kind of creature the trapped spirit used to be. They have different properties and some are more valuable than others. Even orbs from the same color can have serious differences in quality, so buying an orb is always a bit of a gamble.<br><br>
		';
    echo 'I have the following orbs in stock for you.</i>"<br><br>';
    $sql = "SELECT * FROM orbs WHERE cost>0 ORDER BY cost ASC, rarity_mod ASC";
    $result = $db->query($sql);
    while ($row = $db->fetch_array($result)) {
        echo '
Ejemplo n.º 3
0
        $orderrow = $db->fetch_array($result);
    } else {
        echo 'Here you can order a Castle Quest 2 t-shirt. This service is for Belgium only right now. If you live otuside of Belgium and want a t-shirt, contact me personally and maybe we can sort something out. You will have to donate �18 to my bank account and then I will send the t-shirt of your choice to your address. Once you have ordered your t-shirt you have one week to donate the money. If you haven\'t done so after one week, the t-shirt will be sold to someone else.<br><br>';
        $sql = "SELECT count(*) AS aantal, type FROM tshirt WHERE status != '2' GROUP BY type";
        $result = $db->query($sql);
        while ($row = $db->fetch_array($result)) {
            $left[$row["type"]] = $max[$row["type"]] - $row["aantal"];
        }
        while (list($key, $value) = each($max)) {
            if (!isset($left[$key])) {
                $left[$key] = $value;
            }
        }
        fTitle("index.php?page=tshirt&action=order");
        $array = array(array("name" => "Large (" . $left["L"] . " left)", "value" => "L"), array("name" => "Extra Large (" . $left["XL"] . " left)", "value" => "XL"), array("name" => "Extra Extra Large (" . $left["XXL"] . " left)", "value" => "XXL"));
        fRadio("T-shirt size:", "type", $array, 0);
        fText("Real name:", "realname");
        fText("Street + number:", "street");
        fText("Postcode:", "postcode");
        fText("Town:", "town");
        fEnd("Order");
    }
}
if ($action == "order") {
    if (!in_array($type, array("L", "XL", "XXL"))) {
        echo 'Invalid t-shirt size.<br>';
        $no = 1;
    } else {
        $sql = "SELECT count(*) FROM tshirt WHERE account = '{$acc['id']}'";
        $result = $db->query($sql);
        $numrows = $db->result($result, 0);
Ejemplo n.º 4
0
     fCheckbox("display item enchantments", "enchantmentdisplay", $acc["enchantmentdisplay"]);
 }
 $array = array(array("name" => "order creatures by name", "value" => 0), array("name" => "order creatures by strength", "value" => 1), array("name" => "custom creatures order", "value" => 2), array("name" => "order creatures by experience", "value" => 3));
 fRadio("Primary creature sort key:", "creatureorder", $array, $acc["creatureorder"]);
 $array = array(array("name" => "order creatures by name", "value" => 0), array("name" => "order creatures by strength", "value" => 1), array("name" => "custom creatures order", "value" => 2), array("name" => "order creatures by experience", "value" => 3));
 fRadio("Secondary creature sort key:", "creatureorder2", $array, $acc["creatureorder2"]);
 reset($gdGenders);
 unset($array);
 while (list($key, $row) = each($gdGenders)) {
     if ($acc["gender"]["name"] == $row["name"]) {
         $default = count($array);
     }
     $array[count($array)] = $row;
     $array[count($array) - 1]["value"] = $key;
 }
 fRadio("Gender:", "gender", $array, $default);
 unset($array);
 for ($m = 0; $m < count($gdColorSettings); $m++) {
     if ($acc["colorsetting"] == $gdColorSettings[$m]["value"]) {
         $default = $m;
     }
 }
 fSelect("Color setting:", "colorsetting", $gdColorSettings, $default);
 fEnd("Change");
 tEnd();
 tBegin("Add a group");
 fTitle("index.php?page=options&action=addgroup");
 fText("Group name (max 10 characters):", "groupname", "", 20, false, 10);
 fEnd("Create group");
 tEnd();
 tBegin("Manage groups");
Ejemplo n.º 5
0
    fText("Topic:", "topic", "", 40);
    fTextarea("Text:", "text");
    if ($type == 1) {
        //marketplace
        if (is_null($acc[x]) && is_null($acc[y]) && !$gdSpecialKingdoms[$acc["kingdom"]]) {
            $array = array(array("name" => "allied (only visible for kingdom members and allies)", "value" => 1), array("name" => "private (only visible for kingdom members)", "value" => 2));
            fRadio("Visibility:", "private", $array, 0);
        }
    } else {
        //pub
        if (is_null($acc[x]) && is_null($acc[y]) && !$gdSpecialKingdoms[$acc["kingdom"]]) {
            $array = array(array("name" => "public (everyone can read this topic)", "value" => 0), array("name" => "allied (only visible for kingdom members and allies)", "value" => 1), array("name" => "private (only visible for kingdom members)", "value" => 2));
            fRadio("Visibility:", "private", $array, 0);
        } elseif ($acc["tkdrelation"] == 2) {
            $array = array(array("name" => "public (everyone can read this topic)", "value" => 0), array("name" => "allied (only visible for kingdom members and allies)", "value" => 1));
            fRadio("Visibility:", "private", $array, 0);
        }
    }
    fEnd("Post");
    echo '
		<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0"><tr><td width="35%"></td><td width="65%">
		Tags:<br>
		[b]bold[/b] -> <b>bold</b><br>
		[i]italic[/i] -> <i>italic</i><br>
		[u]underlined[/u] -> <u>underlined</u><br>
		[url]', $cq2url, '[/url] -> <a href="', $cq2url, '">', $cq2url, '</a><br>
		[img]image-url[/img] -> image<br>
		[quote]quote[/quote] -> quote
		</td></tr></table>
		';
}
Ejemplo n.º 6
0
        echo 'Your bet: ' . $hometeam . ' ' . $row['homescore'] . ' - ' . $row['awayscore'] . ' ' . $awayteam . ' with the first goal scored by ' . $firstteam . ' after ' . $minutesaddon;
    }
} else {
    if ($hometeam && $awayteam) {
        $array = array(array("value" => "H", "name" => $hometeam), array("value" => "A", "name" => $awayteam));
        echo 'We are currently trying to predict the result of the game between ' . $hometeam . ' and ' . $awayteam . '.<p>
			
			You have to bet ' . $betamount . ' resources, and you\'re only allowed to wager once on each game.<br>
			In the form below you can enter the score, who scores first and in which minute this will happen.<br>
			If you predict a 0-0 result, enter which team will get a yellow card first and again in which minute this will happen.<br>
			For more information and rules, check the <a href=index.php?page=help&topic=Football%20gambling>help</a>.<p><br>';
        fTitle("index.php?page=lotto&action=gamble");
        fText("Brimstone:", "brimstone", "0");
        fText("Crystal:", "crystal", "0");
        fText("Essence:", "essence", "0");
        fText("Granite:", "granite", "0");
        echo '<tr><td><br><td></tr>';
        fText($hometeam . " score:", "homescore", "0");
        fText($awayteam . " score:", "awayscore", "0");
        echo '<tr><td><br><td></tr>';
        fRadio("First goal or yellow card:", "firstscore", $array);
        fText("In which minute?", "minute", "0");
        echo '<tr><td><br><td></tr>';
        fEnd("Place bet");
    } else {
        echo 'There is currently no game to bet on.';
    }
}
?>

Ejemplo n.º 7
0
			</tr>
			<tr>
			<td colspan="2">
			', gTags($row["text"]), '
			</td>
			</tr>
			</table>
			
			';
        // convert to report
        if ($acc["admin"]) {
            echo '<br><br>';
            tBegin("Convert to report");
            fTitle("index.php?page=report&action=submit&reporter={$row['aid']}");
            fHidden("description", htmlspecialchars(stripslashes($row["subject"])) . "<br><br>" . addslashes($row["text"]));
            fRadio("Type:", "type", array(array("name" => "Question", "value" => "question"), array("name" => "Bug/Advice Report", "value" => "bug"), array("name" => "Abuse Report", "value" => "abuse")));
            fEnd("Convert");
            tEnd();
        }
    }
}
if ($action == "readallmails") {
    $sql = "UPDATE mails SET receiverstatus = '1' WHERE receiver = '{$acc['id']}' AND receiverstatus = '0'";
    $result = $db->query($sql);
    echo 'All your mails are marked as read now!<br>';
    if (is_null($acc["x"]) || $acc["tkd"]) {
        $action = "postoffice";
    }
}
if ($action == "deleteallmails") {
    $no = 0;