Esempio n. 1
0
        foreach ($guild_errors as $guild_error) {
            $main_content .= '<li>' . $guild_error;
        }
        $main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url(' . $layout_name . '/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url(' . $layout_name . '/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url(' . $layout_name . '/images/content/box-frame-edge.gif);" /></div>  </div></div><br>';
        $main_content .= '<br/><center><form action="?subtopic=guilds" METHOD=post><div class="BigButton" style="background-image:url(' . $layout_name . '/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(' . $layout_name . '/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="' . $layout_name . '/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
    }
}
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
if ($action == 'saveranks') {
    $guild_id = (int) $_REQUEST['guild'];
    if (empty($guild_errors)) {
        $guild = new Guild();
        $guild->load($guild_id);
        if (!$guild->isLoaded()) {
            $guild_errors[] = 'Guild with ID <b>' . $guild_id . '</b> doesn\'t exist.';
        }
    }
    if (empty($guild_errors)) {
        if ($logged) {
            $guild_leader_char = $guild->getOwner();
            $rank_list = $guild->getGuildRanksList();
            $guild_leader = FALSE;
            $account_players = $account_logged->getPlayers();
            foreach ($account_players as $player) {
                if ($guild_leader_char->getId() == $player->getId()) {
                    $guild_vice = TRUE;
                    $guild_leader = TRUE;
                    $level_in_guild = 3;
Esempio n. 2
0
<?php

if (!defined('INITIALIZED')) {
    exit;
}
$main_content = "<h1 align=\"center\">Guild Wars</h1>\n!war invite,guild name,fraglimit                              Send an invitation to start a war. Example: !war invite,Black Ninjas,150 <br>\n!war invite,guild name,fraglimit,money,time                   Send an invitation to start a war. <br>\nExample: !war invite,Rexis,150,10000,3 days <br>\n\n<b>!war accept,guild name </b> <u>                                      Accept the invitation to start a war. <br></u>\n<b>!war reject,guild name  </b>    <u>                                  Reject the invitation to start a war. <br></u>\n<b>!war end,guild name    </b>        <u>                               Ends an active war with another guild. <br></u>\n<b>!war cancel,guild name   </b>         <u>                            This will cancel the invitation to the guild Black Ninjas <br></u>\n<b>Talk to banker npc deposit   </b>         <u>                            Command for founder of guilds for pay money<br>\n<b>Talk to banker npc withdraw   </b>         <u>                           Command for founder of guilds for payout money<br></u>\n<br>\n<script type=\"text/javascript\"><!--\nfunction show_hide(flip)\n{\n        var tmp = document.getElementById(flip);\n        if(tmp)\n                tmp.style.display = tmp.style.display == 'none' ? '' : 'none';\n}\n--></script>\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">\n<tr>\n<td style=\"background: " . $config['site']['vdarkborder'] . "\" class=\"white\" width=\"150\"><b>Aggressor</b></td>\n<td style=\"background: " . $config['site']['vdarkborder'] . "\" class=\"white\"><b>Information</b></td>\n<td style=\"background: " . $config['site']['vdarkborder'] . "\" class=\"white\" width=\"150\"><b>Enemy</b></td>\n</tr>";
$count = 0;
foreach ($SQL->query('SELECT * FROM `guild_wars` WHERE `status` IN (0,1,2,3,4,5);') as $war) {
    $a = new Guild();
    $a->load($war['guild_id']);
    if (!$a->isLoaded()) {
        continue;
    }
    $e = new Guild();
    $e->load($war['opponent_id']);
    if (!$e->isLoaded()) {
        continue;
    }
    $count++;
    $main_content .= "<tr style=\"background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\">\n<td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=" . $a->getId() . "\"><img src=\"" . $a->getGuildLogoLink() . "\" width=\"64\" height=\"64\" border=\"0\"/><br />" . htmlspecialchars($a->getName()) . "</a></td>\n<td class=\"white\" align=\"center\">";
    switch ($war['status']) {
        case 4:
            $main_content .= "<b>Pending acceptation</b><br />Invited on " . date("M d Y, H:i:s", $war['declaration_date']) . " for " . ($war['end_date'] > 1471497823 ? ($war['end_date'] - $war['declaration_date']) / 86400 : "unspecified") . " days. The frag limit is set to " . $war['frag_limit'] . " frags, " . ($war['guild_fee'] > 0 ? "with payment of " . $war['guild_fee'] . " gold coins." : "without any payment.") . "<br />Will expire in two days.";
            break;
        case 0:
            $main_content .= "War has almost started the guild leaders have to pay " . $war['guild_fee'] . " gold coins from bank. Will expire in two days.";
            break;
        case 3:
            $main_content .= "<s>Canceled invitation</s><br />Sent invite on " . date("M d Y, H:i:s", $war['declaration_date']) . ", canceled on " . date("M d Y, H:i:s", $war['end_date']) . ".";
            break;
        case 2: