<?php
if (!defined('GAME')) {
    die();
}
$tattack = '';

$tattack = '<a style="color:#D8D8D8" style="cursor:pointer" onclick="top.useMagic(\'Нападение на персонажа\',\'night_atack\',\'pal_button8.gif\',1,\'main.php?nightatack=1\');">Напасть</a> &nbsp; ';
if ($u->room['file'] == 'cp4') {
    if (date("H") >= 6 && date("H") < 22) {
        $now = 'day';
    } else {
        $now = 'night';
    }
    ?>
    <script>
        <?php
        if (date("H") < 6 || date("H") >= 22) {
            ?>
        function AtackNoWindow() {
            var dt = document.getElementById('atackDiv');
            if (dt.style.display == 'none') {
                dt.style.display = '';
            } else {
                dt.style.display = 'none';
            }
        }
            <?php
        }
        ?>
    </script>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td width="250" valign="top">
                <?php $usee = $u->getInfoPers($u->info['id'], 0);
                if ($usee != false) {
                    echo $usee[0];
                } else {
                    echo 'information is lost.';
                } ?>
            </td>
            <td width="230" valign="top" style="padding-top:19px;"><?php include('modules_data/stats_loc.php'); ?></td>
            <td valign="top">
                <div align="right">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr align="right" valign="top">
                            <td>
                                <?php if ($re != '') {
                                    echo '<font color="red"><b>' . $re . '</b></font>';
                                } ?>
                                <table width="590" border="0" cellspacing="0" cellpadding="0">
                                    <?php if ($u->error != '') { ?>
                                        <font color=red><b>
                                            <?php echo $u->error; ?></font></b>
                                    <?php } ?>
                                    <tr>
                                        <td>
                                            <div style="position:relative; cursor: pointer; width: 590;" id="ione"><img
                                                        src="/static/img/loca/leg_loc/big_park/bg_park_day<?php if (date('H') >= 22 || date('H') < 6) {
                                                            echo 'night';
                                                                                                                   } ?>.png" id="img_ione" width="590" height="250" border="1"/>
                                                <div id="buttons_on_image" style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
                                                    <?php echo $tattack; ?>
                                                    &nbsp;
                                                    <!-- <span onMouseMove="this.runtimeStyle.color = 'white';" onMouseOut="this.runtimeStyle.color = this.parentElement.style.color;" onclick="window.open('/forum', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Форум</span> &nbsp;-->
                                                </div>
                                                <script>
                                                    <!--
                                                    cap_hk_palace
                                                    if (document.getElementById('ione')) {
                                                        document.getElementById('ione').appendChild(document.getElementById('buttons_on_image'));
                                                        document.getElementById('buttons_on_image').style.position = 'absolute';
                                                        document.getElementById('buttons_on_image').style.bottom = '8px';
                                                        document.getElementById('buttons_on_image').style.right = '23px';
                                                    } else {
                                                        document.getElementById('buttons_on_image').style.display = 'none';
                                                    }
                                                    -->
                                                </script>
                                                <div style="position: absolute; left: 33px; top: 126px; width: 134px; height: 84px; z-index: 91;">
                                                    <img <?php thisInfRm('1.180.0.214'); ?> src="/static/img/loca/leg_loc/big_park/obshaga.png" width="134" height="84" title=""
                                                                                            class="aFilter"/>
                                                </div>
                                                <div style="position: absolute; left: 396px; top: 144px; width: 86px; height: 64px; z-index: 90;">
                                                    <img <?php thisInfRm('1.180.0.222'); ?> src="/static/img/loca/leg_loc/big_park/znahar.png" width="86" height="64" title=""
                                                                                            class="aFilter"/>
                                                </div>
                                                <div style="position: absolute; left: 236px; top: 96px; width: 84px; height: 58px; z-index: 90;">
                                                    <img <?php thisInfRm('3.180.0.271'); ?> src="/static/img/loca/leg_loc/big_park/hram.png" width="84" height="116" title="" class="aFilter"/>
                                                </div>
                                                <div style="position: absolute; left: 372px; top: 173px; width: 20px; height: 41px; z-index: 92;"><img
                                                            src="/static/img/loca/leg_loc/big_park/1sk.png" width="26" height="20"/></div>
                                                <div style="position: absolute; left: 315px; top: 189px; width: 20px; height: 41px; z-index: 92;"><img
                                                            src="/static/img/loca/leg_loc/big_park/2sk.png" width="49" height="35"/></div>
                                                <div style="position: absolute; left: 477px; top: 193px; width: 20px; height: 41px; z-index: 92;"><img
                                                            src="/static/img/loca/leg_loc/big_park/3sk.png" width="59" height="39"/></div>
                                                <div style="position: absolute; left: 536px; top: 184px; width: 29px; height: 41px; z-index: 91;"><img <?php thisInfRm('1.180.0.9'); ?>
                                                            src="/static/img/loca/cp11/arr_right.png" width="29" height="41" title="" class="aFilter"/></div>
                                                <div style="position: absolute; left: 24px; top: 184px; width: 20px; height: 41px; z-index: 92;"><img
                                                            src="/static/img/loca/leg_loc/big_park/arr_stop.png" width="20" height="46" title="Проход не существует"/></div>
                                                <div id="snow"></div>
                                                <?php echo $goline; ?>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                                <?php
                                if (date("H") < 6 || date("H") >= 22) {
                                    ?>
                                    <div align="center" id="atackDiv" style="display:none;">
                                        <form method="post" action="main.php">
                                            <table width="300" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <div style="width:300px; padding:3px; margin:7px; background-color:#CCCCCC; border:1px solid #575757;"> Введите логин жертвы:<br/>
                                                            <input name="atack" type="text" id="atack" size="35" maxlength="30"/>
                                                            <input type="submit" name="button" id="button" class="btn" value="OK"/>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </div>
                                    <?php
                                }
                                ?>

                                <!--
        <div style="width:500px; text-align:left; background-color:#D3D3D3;">
        <span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="/static/img/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" class="menutop" <?php thisInfRm('1.180.0.9'); ?>>Центральная площадь</a></span>
        <span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="/static/img/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" class="menutop" <?php thisInfRm('1.180.0.14'); ?>>Вокзал</a></span>
        <!--<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="/static/img/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" class="menutop" <?php thisInfRm('1.180.0.412'); ?>>Руины Старого Замка</a></span>
        <span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="/static/img/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" class="menutop" <?php thisInfRm('1.180.0.404'); ?>>Призовой Магазин</a></span>
        <!--<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="/static/img/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" class="menutop" <?php thisInfRm('1.180.0.409'); ?>>Ледяной Каток</a></span>
        </div>
         -->
                                <div style="display:none; height:0 " id="moveto"></div>
                            </td>
                            <td>
                                <!-- <br /><span class="menutop"><nobr>Комната для новичков</nobr></span>-->
                            </td>
                        </tr>
                    </table>
                    <small>
                        <HR>
                        <INPUT id="forum" class="btn btn-inverse"
                               onclick="window.open('/news/', 'news', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')" value="Новости"
                               type="button" name="forum">
                        <INPUT onclick="location.href='main.php?zayvka=<?php echo $code; ?>';" class="btn btn-inverse" value="Поединки" type="button" name="combats">
                        <?php $hgo = $u->testHome();
                        if (!isset($hgo['id'])) {
                            ?><INPUT onclick="location.href='main.php?homeworld=<?php echo $code; ?>';" class="btn btn-inverse" value="Возврат" type="button"
                                                           name="combats2">
                        <?php }
                        unset($hgo); ?>
                        <INPUT id="forum" class="btn btn-inverse"
                               onclick="window.open('/forum/', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')" value="Форум"
                               type="button" name="forum">
                        <br/>
                        <!--<strong>Внимание!</strong> Никогда и никому не говорите пароль от своего персонажа. Не вводите пароль на других сайтах, типа "новый город", "лотерея", "там, где все дают на халяву". Пароль не нужен ни паладинам, ни кланам, ни администрации, <U>только взломщикам</U> для кражи вашего героя.<BR>
                        <em>Администрация.</em></small> <BR>-->
                        <?php echo $rowonmax; ?><BR>

                </div>
            </td>
        </tr>
    </table>
    <?php
}

?>
