Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo"
- <!DOCTYPE html>
- <html>
- <head>
- <title>Sistem Pengurusan Pendaftaran Peserta Olahraga Rumah Sukan Zubair </title>
- </head>
- <body bgcolor='#FF4646'>
- <table align='center'width='50%''>
- <tr>
- <td><img src='izzham.jpg'</td>
- </tr>
- <tr>
- <td bgcolor='#00FF00' align='left'>";include('masa.php');echo"</td>
- </tr>
- <tr height='180'valign = 'top' align='center'>
- <td>
- ";
- ?>
- <?php require_once('Connections/connection.php'); ?>
- <?php
- $maxRows_q_CARIpeserta = 10;
- $pageNum_q_CARIpeserta = 0;
- if (isset($_GET['pageNum_q_CARIpeserta'])) {
- $pageNum_q_CARIpeserta = $_GET['pageNum_q_CARIpeserta'];
- }
- $startRow_q_CARIpeserta = $pageNum_q_CARIpeserta * $maxRows_q_CARIpeserta;
- mysql_select_db($database_connection, $connection);
- $query_rsAcara="SELECT * FROM acara";
- $rsAcara = mysql_query($query_rsAcara) or die(mysql_error());
- $row_rsAcara= mysql_fetch_assoc($rsAcara);
- $totalRows_rsAcara= mysql_num_rows($rsAcara);
- if ((isset($_POST['btnSelect'])) && ($_POST['btnSelect']=="CARI"))
- {
- $acara= $_POST['acara'];
- if ($acara=="all")
- {
- $query_q_CARIpeserta = "SELECT *
- FROM `daftar_acara`
- INNER JOIN peserta ON daftar_acara.idpeserta = peserta.idpeserta
- INNER JOIN kelas ON peserta.kelas = kelas.idkelas
- INNER JOIN acara ON daftar_acara.kodacara = acara.kodacara
- ORDER BY daftar_acara.kodacara ASC";
- $query_limit_q_CARIpeserta = sprintf("%s LIMIT %d, %d", $query_q_CARIpeserta, $startRow_q_CARIpeserta, $maxRows_q_CARIpeserta);
- $q_CARIpeserta = mysql_query($query_limit_q_CARIpeserta,$connection ) or die(mysql_error());
- $row_q_CARIpeserta = mysql_fetch_assoc($q_CARIpeserta);
- }
- else
- {
- $query_q_CARIpeserta = "SELECT *
- FROM `daftar_acara`
- INNER JOIN peserta ON daftar_acara.idpeserta = peserta.idpeserta
- INNER JOIN kelas ON peserta.kelas = kelas.idkelas
- INNER JOIN acara ON daftar_acara.kodacara = acara.kodacara
- where daftar_acara.kodacara=$acara";
- $query_limit_q_CARIpeserta = sprintf("%s LIMIT %d, %d", $query_q_CARIpeserta, $startRow_q_CARIpeserta, $maxRows_q_CARIpeserta);
- $q_CARIpeserta = mysql_query($query_limit_q_CARIpeserta,$connection ) or die(mysql_error());
- $row_q_CARIpeserta = mysql_fetch_assoc($q_CARIpeserta);
- }
- }
- else
- {
- $acara= "";
- $query_q_CARIpeserta = "SELECT *
- FROM `daftar_acara`
- INNER JOIN peserta ON daftar_acara.idpeserta = peserta.idpeserta
- INNER JOIN kelas ON peserta.kelas = kelas.idkelas
- INNER JOIN acara ON daftar_acara.kodacara = acara.kodacara
- ORDER BY daftar_acara.kodacara ASC";
- $query_limit_q_CARIpeserta = sprintf("%s LIMIT %d, %d", $query_q_CARIpeserta, $startRow_q_CARIpeserta, $maxRows_q_CARIpeserta);
- $q_CARIpeserta = mysql_query($query_limit_q_CARIpeserta,$connection ) or die(mysql_error());
- $row_q_CARIpeserta = mysql_fetch_assoc($q_CARIpeserta);
- }
- if (isset($_GET['totalRows_q_CARIpeserta'])) {
- $totalRows_q_CARIpeserta = $_GET['totalRows_q_CARIpeserta'];
- } else {
- $all_q_CARIpeserta = $q_CARIpeserta;
- $totalRows_q_CARIpeserta = mysql_num_rows($all_q_CARIpeserta);
- }
- $totalPages_q_CARIpeserta = ceil($totalRows_q_CARIpeserta/$maxRows_q_CARIpeserta)-1;
- ?><!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">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Untitled Document</title>
- <style type="text/css">
- <!--
- .style1 {font-size: 18px}
- .style2 {color: #66FF00}
- .style3 {color: #33FF66}
- body {
- background-image: url(bgkelas.jpg);
- }
- .style4 {color: #FFFF00}
- .style5 {color: #00FF33}
- .style6 {color: #FFFFFF}
- -->
- </style>
- </head>
- <body>
- <div align="center" class="style1">
- <p class="style6">SENARAI NAMA PESERTA YANG TELAH DIDAFTAR UNTUK ACARA</p>
- <table width="833" border="1" bordercolor="#FF9999" bgcolor="#666699">
- <tr><td colspan="10"><form name="selectForm" method="post">
- <span class="style3">Acara :</span>
- <select name="acara" id="acara" >
- <option value="all">Select:</option>
- <option value="all">Semua</option>
- <?php
- do {
- ?>
- <option value="<?php echo $row_rsAcara['kodacara']?>"><?php echo ($row_rsAcara['namaacara'])?></option>
- <?php
- } while ($row_rsAcara = mysql_fetch_assoc($rsAcara));
- $rows = mysql_num_rows($rsAcara); ?>
- </select>
- <input type="submit" name="btnSelect" value="CARI" /></form></td></tr>
- <tr>
- <td width="40"><span class="style3">Bil</span></td>
- <td width="144"><span class="style3">Nama</span></td>
- <td width="109"><span class="style3">No.KP </span></td>
- <td width="59"><span class="style3">Kelas</span></td>
- <td width="50"><span class="style3">Acara</span></td>
- <td width="50"><span class="style3">Jenis</span></td>
- <td width="50"><span class="style3">Jantina</span></td>
- <td colspan="3"><div align="center"><a href="daftargame2.php" class="style3">Tambah</a></div></td>
- </tr>
- <tr>
- <?php if ($totalRows_q_CARIpeserta >0)
- { ?>
- <?php $bil = 0 ?>
- <?php do { ?> <tr>
- <?php $bil+=1 ?>
- <td><?php echo $bil ; ?> <span class="style4"></td>
- <td><span class="style4"><?php echo $row_q_CARIpeserta['nama'];; ?></span></td>
- <td><span class="style4"><?php echo $row_q_CARIpeserta['nokp']; ?></span></td>
- <td><span class="style4"><?php echo $row_q_CARIpeserta['namakelas']; ?></span></td>
- <td><span class="style4"><?php echo $row_q_CARIpeserta['namaacara']; ?></span></td>
- <td><span class="style4"><?php echo $row_q_CARIpeserta['jenisacara']; ?></span></td>
- <td><div align="center" class="style4"><?php echo $row_q_CARIpeserta['jantina']; ?></div></td>
- <td width="67"><div align="center"><a href="lihatgame.php?idpeserta=<?php echo $row_q_CARIpeserta['idpeserta']; ?>" class="style3">Lihat</a></div></td>
- <td width="70"><div align="center"><a href="sahpadamgame.php?idpeserta=<?php echo $row_q_CARIpeserta['idpeserta']; ?>" class="style3">Hapus</a></div></td>
- <?php } while ($row_q_CARIpeserta = mysql_fetch_assoc($q_CARIpeserta)); }?></tr>
- </table>
- <p><a href="senaraisemua.php" class="style2">KEMBALI</a> <a href="cetakpeserta.php" class="style5">CETAK</a></p>
- </div>
- </body>
- </html>
- <?php
- mysql_free_result($q_CARIpeserta);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement