Exemplo n.º 1
0
function show_preferences()
{
    global $uid;
    global $skin;
    global $PHP_SELF;
    $sth = mysql_query("select * from skins");
    while ($skins = mysql_fetch_array($sth)) {
        $options[$skins["name"]] = $skins["id"];
    }
    $sth = mysql_query("select admin from users where id={$uid}");
    if (!$sth) {
        show_error("Database failuer!");
        return 0;
    }
    $admin = mysql_fetch_array($sth);
    if ($admin["admin"] != "") {
        show_message("<a href='adminarea.php'>Enter Admin Area</a>");
    }
    $map_info = new map_info($uid);
    if ($map_info->has_map_anims() == 1) {
        $checked = "checked";
    }
    echo "<form method=POST action=\"" . $PHP_SELF . "\">";
    table_start("center", "400");
    table_head_text(array("Appearence"), "2");
    table_text(array("&nbsp;"), "", "", "2", "head");
    table_form_select("Skin", "skin_new", $options, $skin, "head", "text");
    table_form_submit("Change", "change_skin", "", "text");
    table_end();
    echo "</form>\n";
    //runelord: map_sizes
    $sth = mysql_query("select map_size from options where uid=" . $uid);
    if (!$sth || !mysql_num_rows($sth)) {
        show_error("oops, DB Failure");
        return 0;
    }
    list($current_map_size) = mysql_fetch_row($sth);
    $map_sizes_output = "<select name=\"map_size\" size=\"1\">";
    $sth = mysql_query("SELECT * FROM map_sizes ORDER BY width ASC");
    if (!$sth || !mysql_num_rows($sth)) {
        show_error("Database Failureeeeerrerererererere");
        return 0;
    }
    while ($map_sizes = mysql_fetch_array($sth)) {
        if ($current_map_size == $map_sizes["id"]) {
            $map_sizes_output .= "<option selected value=\"" . $map_sizes["id"] . "\">" . $map_sizes["width"] . " : " . $map_sizes["height"] . "</option>";
        } else {
            $map_sizes_output .= "<option value=\"" . $map_sizes["id"] . "\">" . $map_sizes["width"] . " : " . $map_sizes["height"] . "</option>";
        }
    }
    $map_sizes_output .= "</select>";
    echo "<form method=POST action=\"" . $PHP_SELF . "\">";
    table_start("center", "400");
    table_head_text(array("Map Settings"), "2");
    table_text(array("&nbsp;"), "", "", "2", "head");
    table_text(array("Map Size"), "", "", "2", "head");
    table_text(array($map_sizes_output), "", "", "2", "text");
    table_form_submit("Change", "change_map_size", "", "text");
    echo "</form>\n";
    echo "<form method=POST action=\"" . $PHP_SELF . "\">";
    table_text(array("&nbsp;"), "", "", "2", "head");
    table_text(array("Animations (KSVG needs disabled animations)", "<input type=\"checkbox\" name=\"animations\" value=\"1\" {$checked}>"), "", "", "", "head");
    table_form_submit("Change", "change_anims", "", "text");
    table_end();
    echo "</form>\n";
    table_start("center", "400");
    echo "<form method=POST action=\"" . $PHP_SELF . "\">";
    table_text(array("Change Password", "&nbsp;"), "", "", "", "head");
    table_text_open();
    table_text_design("Old Password", "300", "left", "", "text");
    table_text_design("<input type=\"password\" align=\"right\" name=\"old\">", "100", "right", "", "text");
    table_text_close();
    table_text_open();
    table_text_design("New Password", "300", "left", "", "text");
    table_text_design("<input type=\"password\" align=\"right\" name=\"new1\">", "100", "right", "", "text");
    table_text_close();
    table_text_open();
    table_text_design("Re-type new Password", "300", "left", "", "text");
    table_text_design("<input type=\"password\" align=\"right\" name=\"new2\">", "100", "right", "", "text");
    table_text_close();
    table_form_submit("Set", "change_pw", "", "text");
    table_end();
    echo "</form>";
}
Exemplo n.º 2
0
                echo "<circle cx=\"0\" cy=\"0\" r=\"" . ($its_radius + 4) . "\" class=\"" . $its_class . "\"/>\n";
            }
            //----------------- Tradingstation
            if (has_tradingstation($planets[$j]["id"])) {
                $planets_tradingstation = draw_tradingstation($planets[$j]["id"], -$its_radius - $abstand);
                echo $planets_tradingstation;
            }
            //----------------- Flotten
            if (is_array($its_fleets)) {
                $p_fleet = draw_fleet($its_fleets, $planets[$j]["id"]);
                echo "<g>\n";
                echo $p_fleet;
                echo "</g>\n\n";
            }
        }
        if ($map_info->has_map_anims()) {
            echo "<animateTransform attributeType=\"XML\" attributeName=\"transform\" type=\"rotate\" values=\"360;0\" dur=\"" . ($j + 1) * 100 . "\" repeatCount=\"indefinite\" begin=\"0;indefinite\" end=\"indefinite\"/>";
        }
        echo "</g>";
        echo "</g>";
        if ($map_info->has_map_anims()) {
            echo "<animateTransform attributeType=\"XML\" attributeName=\"transform\" type=\"rotate\" values=\"0;360\" dur=\"" . ($j + 1) * 100 . "\" repeatCount=\"indefinite\" begin=\"0;indefinite\" end=\"indefinite\" fill=\"freeze\"/>";
        }
        echo "</g>";
    }
    //----------------- Jumpgate
    if (!$fog_mode) {
        draw_jumpgate($sid);
    }
}
if (!$fog_mode) {