<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$system->config['language']?>" lang="<?=$system->config['language']?>">
<head>                                                        
    <title><?rcms_show_element('title')?></title>
    <?rcms_show_element('meta')?> 
<link href="<?=CUR_SKIN_PATH?>style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body> 
	<div id="header">
		<div id="logo">
			<h1><a href="http://ubilling.net.ua"><img src="skins/logo.png" height="32" border="0"></a> Ubilling</h1> 
                        <p><?=file_get_contents('RELEASE')?></p>
                        <form name="lang_select" method="post" action=""><?=user_lang_select('lang_form', $system->language, 'font-size: 90%; width: 100px;', 'onchange="document.forms[\'lang_select\'].submit()" title="' . __('Lang') . '"')?></form>
                        <form name="skin_select" method="post" action=""><?=user_skin_select(SKIN_PATH, 'user_selected_skin', $system->skin, 'font-size: 90%; width: 100px;', 'onchange="document.forms[\'skin_select\'].submit()" title="' . __('Skin') . '"')?>
                        </form>
                        <?=web_HelpIconShow();?>  <? if (XHPROF) { print($xhprof_link); } ?> <?=zb_IdleAutologoutRun(); ?>
            <div class="notificationArea">
                 <?php 
                    if (LOGGED_IN) {
                        $notifyArea=new DarkVoid();
                        print($notifyArea->render());
                    }
                    ?>
            </div> 
		</div> <? if (LOGGED_IN) {  ?>  
          <form action="" method="POST">
	  <input name="logout_form" value="1" type="hidden">
              <input value="<?=__('Log out').' '.whoami();?>" type="submit">
      	  </form> 
         
	<div id="menu">
		<ul>
				<?rcms_show_element('navigation', '<li><a href="{link}" target="{target}" id="{id}">{title}</a></li>')?>
		</ul>
            
	</div>
	<center>
<table style="text-align: left; width: 90%;" border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
  <tbody>
    <tr>
      <td class="post">
        <?rcms_show_element('menu_point', 'up_center@window')?>
        <?rcms_show_element('main_point', $module . '@window')?>
      </td>
    </tr>
  </tbody>
</table>
</center>
			
      
		
	<div style="clear: both;">&nbsp;</div>
        
	<?php
        if ((LOGGED_IN) AND (!file_exists('I_HATE_NEW_YEAR'))) {
        $dateny = time();
        $monthny = date('m');

        $date_startny = null;
        $date_stopny  = null;

        switch ($monthny) {
                case '12':
                        $date_startny = strtotime (date('Y') . '-12-25');
                        $date_stopny  = strtotime ((date('Y') + 1) . '-1-05');
                        break;
                case '1':
                        $date_startny = strtotime ((date('Y') - 1) . '-12-25');
                        $date_stopny  = strtotime (date('Y') . '-1-05');
                        break;
        }

             if ( $dateny >= $date_startny && $dateny < $date_stopny ) {
                    print(file_get_contents('skins/ubny.txt')); 
                    }
                    
                }
                
        ?>
	<div id="footer">
		<p><?rcms_show_element('copyright')?> 
		<?php    	
  // Page gentime end
  $mtime = explode(' ', microtime());
  $totaltime = $mtime[0] + $mtime[1] - $starttime;
  print(__('GT:').round($totaltime,2));
  print(' QC: '.$query_counter);
 ?></p>
            
            <? } else { 
                     $ubLoginForm=new LoginForm();
		     print($ubLoginForm->render());
		  }?>	

	</div>
	</body>
</html>
