echo '<b>At this moment you can only register an account for the new age by using a reactivation key. Every active account at the end of the age received such a key.</b>';
    } else {
        if ($cheat) {
            fTitle("indexnl.php?page=nl_chooseclass&action=submit&key={$key}&cheat={$cheat}");
        } elseif ($key) {
            fTitle("indexnl.php?page=nl_chooseclass&action=submit&key={$key}");
        } else {
            fTitle("indexnl.php?page=nl_chooseclass&action=submit");
        }
        fText("Login Name (15 chars):", "name");
        //fText("If this login name was used in the previous age, please enter the password for that account:", "previousagepassword", "", 20, TRUE);
        fText("E-mail:", "email");
        fText("Repeat E-mail:", "email2");
        fText("Password:"******"password", "", 20, TRUE);
        fText("Repeat Password:"******"password2", "", 20, TRUE);
        fCheckbox("I accept <a href='indexnl.php?page=rules' target='_blank'>the game rules</a><br>", "rules");
        fEnd("Next Step");
    }
    echo '<br><br>Registration spots left: ', $spots, '<br>';
    /*}
      else {
          echo '
          Registration is disabled until the next age starts.<br>
          ';
      }*/
}
if ($action == "reactivate") {
    include_once "functions/gamefunctions.php";
    echo '
		Normally, you should have received a mail with a reactivation code for your account.
		But some people didn\'t receive it because their e-mail account was invalid or they exceeded their maximum storage amount.
Example #2
0
			The image pack allows you to store all the image files on your hard disk so that you don\'t have to receive them from the server anymore.
			We strongly advise every active player to download and use it, because it allows you to load pages much faster and it lowers the traffic to and from the server.<br><br>
			
			To download the image pack, click <a href="docs/imagepack_2003-11-04.zip">here</a> (last updated: 2003-11-04).<br>
			Unzip the page in a folder of your choice and enter the full path to the image directory below (for example: c:\\cq2).
			If you don\'t want to use the pack anymore, just fill in an empty path and the images will be loaded from the server again.<br><br>
			
			<i>Important notice for Mozilla/Firefox users:</i><br>
			Firefox doesn\'t support local javascript loading by default. Because of this, the image pack will not function correctly when using these browsers. To fix this problem, follow <a href="index.php?page=options&action=firefoxinstructions">these instructions</a>.<br><br>
			
			If you enter an invalid path, everything will look ugly. To fix this, you have to enter a correct or empty path below.<br><br>
			';
        fTitle("index.php?page=options&action=changeimagepath");
        fText("Image path:", "imagepath", $acc["imagepath"]);
        echo '<tr height="5"><td></td></tr>';
        fCheckbox("get stylesheet from server (required for some browsers, leave checked if you're not sure)", "stylesheet", $acc["stylesheet"]);
        echo '<tr height="5"><td></td></tr>';
        fEnd("Change Path");
        tEnd();
    }
}
if ($action == "firefoxinstructions") {
    echo '
		Enter about:config in the url bar of firefox. A list of configuration entries should be loaded. Don\'t change anything.<br><br>
		
		Right click somewhere in the window, choose \'new\' and \'string\' (the first option). Then enter the following key in the input box: \'capability.policy.policynames\'. Press ok, and enter the following string in the next input box, as the value of the key: \'localfilelinks\'. Press ok again. It doesn\'t matter if the new key doesn\'t appear in the list.<br><br>
		
		Repeat the previous steps for these other two key and value pairs:<br>
		\'capability.policy.localfilelinks.sites\' = \'', $cq2url, '\'<br>
		\'capability.policy.localfilelinks.checkloaduri.enabled\' = \'allAccess\'<br><br>
		
Example #3
0
<?php

if ($action == "newmessage") {
    fTitle("index.php?page=kingdom&action=submitnewmessage");
    fText("Topic:", "topic");
    fTextarea("Text:", "text");
    fCheckbox("Send mail to every inhabitant", "mail");
    fEnd("Post");
}
if ($action == "submitnewmessage") {
    $no = 0;
    if ($acc["leadertype"] < 1) {
        echo 'Invalid leader.<br>';
        $no = 1;
    }
    if (!trim($text) || !trim($topic)) {
        echo 'You have to fill in all the fields.<br>';
        $no = 1;
    }
    if ($no == 0) {
        $topic = addslashes($topic);
        gNews(1, 8, htmlspecialchars($topic), addslashes("<a href=\"index.php?page=playerinfo&action=viewinfo&aid={$acc['id']}\">{$acc['name']}</a> posted the following news:<br><br>" . gTags($text)), $acc["kingdom"]);
        if ($mail == "on") {
            $sql = "SELECT id FROM accounts WHERE kingdom = '{$acc['kingdom']}' AND id != '{$acc['id']}'";
            $nresult = $db->query($sql);
            $time = time();
            $text = "{$acc['name']} posted the following news:\n\n" . $text;
            while ($row = $db->fetch_array($nresult)) {
                $sql = "INSERT INTO mails (subject, text, sender, receiver, time, senderstatus) VALUES ('Kingdom Message: " . $topic . "', '{$text}', '{$acc['id']}', '{$row['id']}',  '{$time}', '1')";
                $result = $db->query($sql);
            }
		}

		</script>

		

		

		<a href="javascript:void(0);" onclick="fillin(true); return false;">Select all.</a><br>

		<a href="javascript:void(0);" onclick="fillin(false); return false;">Unselect all.</a><br>

		';
    fTitle("index.php?page=kingdom&action=submit{$action}", "gemform");
    while ($row = $db->fetch_array($result)) {
        fCheckbox(gEchoGem($row), "gems[" . $row["id"] . "]");
    }
    fEnd($direction);
}
if ($action == "submitinsertgemdepot" || $action == "submitinsertgembag" || $action == "submitremovegembag") {
    $no = 0;
    if (!$gems) {
        echo 'Invalid data.<br>';
        $no = 1;
    } else {
        if ($action == "submitinsertgemdepot") {
            $message = "gems successfully inserted into gem depot!";
            $origin = "mage";
            $destination = "depot";
            $xtraset = ", target = '{$acc['kingdom']}'";
            $xtrawhere = " target = '{$acc['id']}' AND";
Example #5
0
    $minlevel = $acc["level"] - 1;
    $maxlevel = $acc["level"] + 1;
    echo '<a href="index.php?page=playerinfo&action=randomtarget&type=level">Click here</a> to find a random target of your level.<br>';
    echo '<a href="index.php?page=playerinfo&action=randomtarget&type=onlinelevel">Click here</a> to find a random online target close to your level.<br>';
    echo '<a href="index.php?page=playerinfo&action=randomtarget&type=online">Click here</a> to find a random online target.<br>';
    echo '
		<br><br>
		Specify requirements:<br>
		';
    if ($minlevel < 1) {
        $minlevel = 1;
    }
    fTitle("index.php?page=playerinfo&action=randomtarget");
    fText("Minimum Level:", "minlevel", $minlevel, 5);
    fText("Maximum Level:", "maxlevel", $acc["level"] + 1, 5);
    fCheckbox("Online only", "onlineonly", 1);
    /*fCheckbox("Attacked only once", "attackedonce");*/
    $array = array();
    $array[0] = array("name" => "Any", "value" => 0);
    $sql = "SELECT id, name FROM signs WHERE type='mage' ORDER BY name";
    $result = $db->query($sql);
    while ($sign = $db->fetch_array($result)) {
        $array[] = array("name" => $sign["name"], "value" => $sign["id"]);
    }
    if ($acc["level"] >= gdArcaneLevelMin) {
        fSelect("Birthsign gem:", "bsgem", $array);
    } else {
        echo '<input type="hidden" name="bsgem" value="0"/>';
    }
    $array = array();
    $array[0] = array("name" => "Any", "value" => 0);