<?php
 session_start(); 
 require_once('Connections/sistem.php'); ?>
  <style>
input, textarea { 
	padding: 9px; 
	border: solid 1px #E5E5E5; 
	outline: 0; 
	font: normal 13px/100% Verdana, Tahoma, sans-serif; 
	width: 200px; 
	background: #FFFFFF; 
	box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; 
	-moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; 
	-webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; 
	} 
select { 
	padding: 4px; 
	border: solid 1px #E5E5E5; 
	outline: 0; 
	font: normal 13px/100% Verdana, Tahoma, sans-serif; 
	width: 70px; 
	background: #FFFFFF; 
	box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; 
	-moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; 
	-webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; 
	}
	
textarea { 
	width: 300px; 
	max-width: 300px; 
	height: 50px; 
	line-height: 100%; 
	} 
  
input:hover, textarea:hover, 
input:focus, textarea:focus { 
	border-color: #C9C9C9; 
	} 
  
.form label { 
	margin-left: 10px; 
	color: #999999; 
	} 
  
.submit input { 
	width: auto;
	padding: 12px 15px; 
	background: #617798; 
	border: 0; 
	font-size: 10px; 
	color: #FFFFFF; 
	}
	</style>
<?php

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_sistem, $sistem);
$query_menu = "SELECT * FROM menu_tb where modul='$_GET[section]' and level='$_SESSION[level]'";
$menu = mysql_query($query_menu, $sistem) or die(mysql_error());
$row_menu = mysql_fetch_assoc($menu);
$totalRows_menu = mysql_num_rows($menu);

mysql_select_db($database_sistem, $sistem);
$query_rtext = "SELECT * FROM run_text";
$rtext = mysql_query($query_rtext, $sistem) or die(mysql_error());
$row_rtext = mysql_fetch_assoc($rtext);
$totalRows_rtext = mysql_num_rows($rtext);


 ?>


<style type="text/css">
            @import "media/css/demo_table_jui.css";
            @import "media/themes/ui-lightness/jquery-ui-1.8.4.custom.css";
        </style>
        <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
        <script src="media/js/jquery.js"></script>
		<script src="media/js/jquery.dataTables.js"></script>

<link type="text/css" href="css3/style.css" rel="stylesheet"  />
<style>
* {
  box-sizing: border-box;
}

#myInput {
  background-image: url('/css/searchicon.png');
  background-position: 10px 10px;
  background-repeat: no-repeat;
  width: 100%;
  font-size: 16px;
  padding: 12px 20px 12px 40px;
  border: 0px solid #ddd;
  margin-bottom: 5px;
}

#myTable {
  border-collapse: collapse;
  width: 100%;
  border: 0px solid #ddd;
  font-size: 14px;
}

#myTable th, #myTable td {
  text-align: left;
  padding: 4px;
}

#myTable tr {
  border-bottom: 0px solid #ddd;
}

#myTable tr.header, #myTable tr:hover {
  background-color: #f1f1f1;
}
</style>

<style>
* {
  box-sizing: border-box;
}

#myTable1 {
  border-collapse: collapse;
  width: 100%;
  border: 0px solid #ddd;
  font-size: 12px;
}

#myTable1 th, #myTable1 td {
  text-align: center;
  padding: 4px;
}

#myTable1 tr {
  border-bottom: 0px solid #ddd;
}

#myTable1 tr.header, #myTable1 tr:hover {
  background-color: #f1f1f1;
}
</style>

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
  <tr>
    <td width="18%" rowspan="5" align="center" valign="top"><img name="" src="images/wlha.jpg" width="147" height="136" alt=""></td>
    <td><table width="250" border="0" align="left" cellpadding="1" cellspacing="1">
      <tr>
        <td><?php if($_SESSION['level']=='Unit'){
			?>
			<a href="?section=home&module=home"><img name="" src="images/home.png" width="51" height="48" alt=""></a>
            <?php }elseif($_SESSION['level']=='Pusat'){?>
            <a href="?section=homeb&module=homebase"><img name="" src="images/home.png" width="51" height="48" alt=""></a>
            <?php }else{
				
			};?>
            </td>
        <td><a href="?section=Setting&module=Setting"><img name="" src="images/setting.png" width="50" height="51" alt=""></a></td>
        <td><a href="?section=Transaksi&module=Transaksi"><img name="" src="images/transaksi.png" width="52" height="50" alt=""></a></td>
        <td><a href="?section=Report&module=Report"><img name="" src="images/report.png" width="57" height="48" alt=""></a></td>
        <td><a href="?section=Exit&module=Exit"><img name="" src="images/logout.png" width="46" height="48" alt=""></a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="isi_tabel_kecil">Unit : <?php echo $_SESSION['nama'];?> | Bulan Transaksi : <?php echo $_SESSION['bulan'];?> | Tahun Transaksi : <?php echo $_SESSION['tahun'];?> | Level : <?php echo $_SESSION['level'];?></td>
  </tr>
  <tr>
    <td><hr></td>
  </tr>
  <tr>
    <td><marquee>
    <?php 
	if($row_rtext['kode']==$_SESSION['kode']){
	echo $row_rtext['berita'];
	}else{
		echo "-";
	}?>

    </marquee></td>
  </tr>
  <tr>
    <td width="82%" valign="top"><marquee><?php 
	if($row_rtext['kode']=="All"){
	echo $row_rtext['berita'];
	}else{
		echo "-";
	}?></marquee></td>
  </tr>
  <tr>
    <td height="800" valign="top">
    <table width="200" border="0" cellspacing="1" cellpadding="1">
      <?php do { ?>
        <tr>
          <td class="form_body"><a href="<?php echo $row_menu['call_mod'];?>"><?php echo $row_menu['menu'];?></a></td>
        </tr>
        <tr>
          <td class="highlighted"><hr></td>
        </tr>
        <?php } while ($row_menu = mysql_fetch_assoc($menu)); ?>
    </table>

    </td>
    <td width="82%" valign="top"><table width="98%" border="0" align="center" cellpadding="3" cellspacing="3">
      <tr>
        <td valign="top"><?php include 'daftar_isi.php';?></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
<?php
mysql_free_result($menu);
?>
