2023-03-31 18:42:06 +00:00
< ? php
2023-07-19 12:36:13 +00:00
use Core\Config ;
if ( ! defined ( 'GAME' )) {
die ();
2022-06-06 21:30:34 +00:00
}
2023-07-19 12:36:13 +00:00
$tattack = '' ;
$re = '<b style="color: red">' . $re . '</b>' ;
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
if ( $u -> room [ 'file' ] != 'cp2' ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-07-19 12:36:13 +00:00
if ( date ( " H " ) >= 6 && date ( " H " ) < 22 ) {
$now = 'day' ;
} else {
$now = 'night' ;
2022-06-06 21:30:34 +00:00
}
?>
2023-07-19 12:36:13 +00:00
< 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
}
?>
var no = 20 ; // snow number
var speed = 15 ; // smaller number moves the snow faster
var sp_rel = 1.4 ; //speed relevation
var snowflake1 = " /i/itimeges/snow1.gif " ;
var snowflake2 = " /i/itimeges/snow2.gif " ;
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
var i , doc_width , doc_height ;
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
dx = [];
xp = [];
yp = [];
am = [];
stx = [];
sty = [];
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
Array . prototype . exists = function ( el ) {
for ( var i = 0 ; i < this . length ; i ++ )
if ( this [ i ] == el )
return true ;
return false ;
}
var rooms = [ '0' , '1' ];
function SetVariable ( c ) {
dx [ c ] = 0 ; // set coordinate variables
am [ c ] = Math . random () * 15 ; // set amplitude variables
xp [ c ] = Math . random () * ( doc_width - 35 ) + am [ c ]; // set position variables
yp [ c ] = 0 ;
stx [ c ] = 0.02 + Math . random () / 10 ; // set step variables
sty [ c ] = 0.7 + Math . random (); // set step variables
}
function DrawWeather ( room ) {
doc_width = document . getElementById ( 'ione' ) . width ;
doc_height = document . getElementById ( 'ione' ) . height ;
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
doc_width = 500 ;
doc_height = 268 ;
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
var div = '' ;
for ( i = 0 ; i < no ; ++ i ) {
2022-06-06 21:30:34 +00:00
SetVariable ( i );
2023-07-19 12:36:13 +00:00
div += " <div id= \" dot " + i + " \" style= \" POSITION: absolute; Z-INDEX: 30 " + i + " ; VISIBILITY: visible; TOP: " + 0 + " px; LEFT: " + 0 + " px; \" ><img id= \" im " + i + " \" src= \" " + ( sty [ i ] < sp_rel ? snowflake2 : snowflake1 ) + " \" border= \" 0 \" alt= \" Снежинка \" ></div> " ;
2022-06-06 21:30:34 +00:00
}
2023-07-19 12:36:13 +00:00
document . getElementById ( 'snow' ) . innerHTML = div ;
return 1 ;
}
function WeatherBegin () { // IE main animation function
for ( i = 0 ; i < no ; ++ i ) { // iterate for every dot
yp [ i ] += sty [ i ] < sp_rel ? sty [ i ] / 2 : sty [ i ];
if ( yp [ i ] > doc_height - 40 ) {
SetVariable ( i );
var im = document . getElementById ( 'im' + i );
im . src = ( sty [ i ] < sp_rel ) ? snowflake2 : snowflake1 ;
}
dx [ i ] += stx [ i ];
document . getElementById ( 'dot' + i ) . style . top = yp [ i ] + 'px' ;
document . getElementById ( 'dot' + i ) . style . left = xp [ i ] + am [ i ] * Math . sin ( dx [ i ]) + 'px' ;
}
setTimeout ( 'WeatherBegin()' , speed );
2022-06-06 21:30:34 +00:00
}
</ script >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
2023-07-19 12:36:13 +00:00
< tr >
< td style = " vertical-align: top; width: 250px; " >
< ? php $usee = $u -> getInfoPers ( $u -> info [ 'id' ], 0 );
if ( $usee ) {
echo $usee [ 0 ];
} else {
echo 'information is lost.' ;
} ?>
</ td >
< td style = " padding-top:19px; vertical-align: top; " >< ? php require_once ( 'modules_data/stats_loc.php' ); ?> </td>
< td style = " vertical-align: top; width: 500px; " >
< div style = " text-align: right; " >
< ? = $re ?>
< div style = " position:relative; cursor: pointer; width: 500px; " id = " ione " >
< img src = " <?= Config::img() ?>/city/capitalcity/<?= $now ; ?>/city_capres2.jpg " alt = " " name = " img_ione " width = " 500 " height = " 268 " border = " 1 " id = " img_ione " />
< div id = " buttons_on_image " style = " cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px; " >
< a style = " color:#D8D8D8; cursor: pointer; " onclick = " top.useMagic('Нападение на персонажа','night_atack','pal_button8.gif',1,'main.php?nightatack=1'); " > Напасть </ a >
</ div >
< script >
if ( document . getElementById ( 'ione' )) {
2022-06-06 21:30:34 +00:00
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' ;
2023-07-19 12:36:13 +00:00
} else {
2022-06-06 21:30:34 +00:00
document . getElementById ( 'buttons_on_image' ) . style . display = 'none' ;
}
2023-07-19 12:36:13 +00:00
</ script >
< div style = " position: absolute; left: 28px; top: 86px; width: 73px; height: 47px; z-index: 89; " >
< img < ? php thisInfRm ( '1.180.0.214' ); ?> src="<?= Config::img() ?>/city/capitalcity/day/cp_hostel.gif" width="86" height="90" class="aFilter" alt="">
</ div >
2023-07-31 12:21:05 +00:00
< div style = " position:absolute; left:338px; top:47px; width:122px; height:140px; z-index:94; " >
< img < ? php thisInfRm ( '3.180.0.271' ); ?> src="<?= Config::img() ?>/i/images/300x225/ap_tower3.gif" width="122" height="140" class="aFilter" alt="">
</ div >
2023-07-19 12:36:13 +00:00
< div style = " position:absolute; left:16px; top:155px; width:30px; height:54px; z-index:910; " >
2023-07-31 12:21:05 +00:00
< img < ? php thisInfRm ( '1.180.0.9' ); ?> src="<?= Config::img() ?>/i/images/300x225/capital/3strelka.gif" width="30" height="53" class="aFilter" alt="">
2023-07-19 12:36:13 +00:00
</ div >
< div id = " snow " ></ div >
< ? = $goline ; ?>
</ div >
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
< ? php if ( date ( " H " ) < 6 || date ( " H " ) >= 22 ) : ?>
< div id = " atackDiv " style = " display:none; text-align: center; " >
< div style = " width:300px; padding:3px; margin:7px; background-color:#CCCCCC; border:1px solid #575757; " > Введите логин жертвы :< br />
< form method = " post " action = " /main.php " >
< input name = " atack " type = " text " id = " atack " size = " 35 " maxlength = " 30 " >
< input type = " submit " name = " button " id = " button " class = " btn " value = " OK " >
</ form >
</ div >
</ div >
< ? php endif ; ?>
2022-06-06 21:30:34 +00:00
2023-07-19 12:36:13 +00:00
< 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 = " //img.new-combats.tech/i/move/links.gif " width = " 9 " height = " 7 " alt = " " >& nbsp ;
< a href = " # " id = " greyText " class = " menutop " onclick = " location='main.php?loc=1.180.0.9&rnd=<?= $code ; ?>'; " title = " <?php thisInfRm('1.180.0.9', 1); ?> " >
Центральная Площадь
</ a >
</ span >
< span style = " white-space:nowrap; padding-left:3px; padding-right:3px; height:10px " >
< img src = " //img.new-combats.tech/i/move/links.gif " width = " 9 " height = " 7 " alt = " " >& nbsp ;
< a href = " # " id = " greyText " class = " menutop " onclick = " location='main.php?loc=1.180.0.214&rnd=<?= $code ; ?>'; " title = " <?php thisInfRm('1.180.0.214', 1); ?> " >
Общежитие
</ a >
</ span >
</ div >
< div style = " display:none; height:0; " id = " moveto " ></ div >
< hr >
< ? = $rowonmax ; ?> <BR>
</ div >
</ td >
</ tr >
</ table >