<?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_okey = "SELECT * FROM verivikasi_tb where kode_unit='$_SESSION[kode]' and tahun='$tahun' order by id asc";
$okey = mysql_query($query_okey, $sistem) or die(mysql_error());
$row_okey = mysql_fetch_assoc($okey);
$totalRows_okey = mysql_num_rows($okey);


?>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5">
  <tr>
    <td><h3 style="color:#033">Data Transaksi Yang Terverifikasi</h3></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="2" class="form_body">
      <tr align="center" style="background:url(images/bg2.png)">
        <td height="35">Kode Unit</td>
        <td>Bulan</td>
        <td>Tahun</td>
        <td>Register</td>
        <td>Verifikator</td>
        <td>Waktu Catat</td>
        </tr>
      <tr>
        <td colspan="6"><hr></td>
      </tr>
      <?php do { ?>
      <tr align="center">
        <td height="30"><?php echo $row_okey['kode_unit'];?></td>
        <td><?php echo $row_okey['bulan'];?></td>
        <td><?php echo $row_okey['tahun'];?></td>
        <td><?php echo $row_okey['key_register'];?></td>
        <td><?php echo $row_okey['verifikator'];?></td>
        <td><?php echo $row_okey['waktu'];?></td>
        </tr>
      <tr>
        <td colspan="6">&nbsp;</td>
      </tr>
      <?php } while ($row_okey = mysql_fetch_assoc($okey)); ?>
    </table></td>
  </tr>
</table>
<p>&nbsp;</p>
<?php
mysql_free_result($okey);
?>
