<?PHP
include("../index.cma.db.php");
include("../index.globalconfig.php");
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?PHP echo $satker; ?> | <?PHP echo $alamat; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="../images/index.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--

.style1 {color: #FFFFFF}
body {
	margin-top: 0px;
	background-image: url();
	margin-bottom: 0px;
	background-color: #006600;
}
-->
</style></head>

<body>
<table width="1100"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="200" valign="bottom" background="../themes/camelon_a.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td height="25" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="6" cellpadding="6">
        <tr>
          <td><div align="center"><?PHP echo $satker; ?> | <?PHP echo $alamat; ?></div></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25" bgcolor="#669900"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="50">
        <param name="movie" value="../themes/top_hijau.swf">
        <param name="quality" value="high">
        <embed src="../themes/top_hijau.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="50"></embed>
    </object></td>
  </tr>
</table>
<table width="1100"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="22%" valign="top" bgcolor="#336600"><table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#669900"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><form name="form1" method="post" action="index.auth.php">
                  <table width="300" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td background="../images/bg.jpg"><table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td><a href="index.php" class="menu">BERANDA</a></td>
                        </tr>
                      </table>                        </td>
                    </tr>
                  </table>
                </form></td>
              </tr>
            </table></td>
          </tr>
        </table>
          <table width="300" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="449" valign="top" background="../images/camelon_library.jpg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><form name="form2" method="post" action="perpus_search.php">
                        <table width="80%" border="0" align="center" cellpadding="8" cellspacing="8">
                          <tr>
                            <td><div align="center"></div></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td><div align="center"><span class="style1">PENCARIAN BUKU </span></div></td>
                          </tr>
                          <tr>
                            <td><div align="center">
                                <input name="query" type="text" id="query22">
                            </div></td>
                          </tr>
                          <tr>
                            <td><div align="center">
                                <input type="submit" name="Submit2" value="CARI JUDUL BUKU">
                            </div></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td><a href="index.php" class="menu">KANAL PERPUSTAKAAN</a></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                        </table>
                    </form></td>
                  </tr>
              </table></td>
            </tr>
          </table></td>
        <td width="78%" valign="top" bgcolor="#CCCCCC"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td bgcolor="#FF9900"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                <tr>
                  <td><strong>Selamat datang di sistem perpustakaan, anda membutuhkan literatur, langganan dsb. Gunakan mesin pencarian. </strong></td>
                </tr>
              </table></td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td bgcolor="#FFFFFF"><table width="100%"  border="0" align="center" cellpadding="5" cellspacing="5">
                <tr>
                  <td colspan="3">&nbsp;</td>
                </tr>
                <tr>
                  <td width="60%">Statistik Buku: <b> </b><b> </b></td>
                  <td width="3%">:</td>
                  <td width="37%"><b>
                    <?php

$link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma", $link);
$result = mysql_query("SELECT * FROM perpustakaan", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows"; ?>
                  </b></td>
                </tr>
                <tr>
                  <td>Total Judul buku dalam Koleksi Perpustakaan Kami dan Jumlah buku Total </td>
                  <td width="3%">:</td>
                  <td width="37%"><b>
                    <?php

include("perpus_postdb.php");

$sql = "SELECT SUM(p_jmlh) AS total_sumbangan FROM perpustakaan ";
    $result = mysql_query($sql) or die (mysql_error());
    $t = mysql_fetch_array($result);
echo "<b>Total Jumlah buku " . number_format($t['total_sumbangan']) . " </b>";
?>
                  </b></td>
                </tr>
                <tr>
                  <td colspan="3">&nbsp;</td>
                </tr>
              </table></td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td bgcolor="#FF9900"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td><strong>10 Buku Baru Koleksi Perpustakaan</strong></td>
                  </tr>
              </table></td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td><?

print ('<table width="100%"  border="0" cellspacing="2" cellpadding="2">
<tr bgcolor="#996600">
<td width="50%"><span class="style1"><strong>Judul Buku</strong></span></td>
<td width="30%"><span class="style1"><strong>Pengarang</strong></span></td>
<td width="10%"><span class="style1"><strong>Jml Buku</strong></span></td>
<td width="10%"><span class="style1"><strong>Rak</strong></span></td>
</tr>');
include("perpus_postdb.php");
$SQL = "SELECT * FROM $mytable ORDER BY uid DESC LIMIT 10";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr>');
print ('<td>'.$row['p_judul'] .'</td>');
print ('<td>'.$row['p_pengarang'].'</td>');
print ('<td>'.$row['p_jmlh'].'</td>');
print ('<td>'.$row['p_kat'].'</td>');
print ('</tr>');
}
print ('</table>');
?></td>
            </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="1100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#EEEEEE"><table width="699"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center"></div></td>
      </tr>
      <tr>
        <td><div align="center">(c) 2016 Created By <strong>Chendia Studio</strong></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>


