Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include "head.php"; ?>
- <!-- Body -->
- <!-- Link Menu -->
- <?php include "menu.php"; ?>
- </div>
- <br />
- <div id="content">
- <!-- Page title -->
- <div class="page-title">
- <h5><i class="fa fa-desktop"></i> Halaman Admin</h5>
- </div>
- <!-- /page title -->
- <!-- Right labels -->
- <form class="form-horizontal" action="mahasiswa_tambah.php" method="post" role="form">
- <div class="panel panel-default">
- <div class="panel-heading"><h6 class="panel-title">Calon Atlet Terpilih</h6></div>
- <div class="panel-body">
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Id Calon Atlet:</label>
- <div class="col-sm-5">
- <input type="text" name="id_mhs" class="form-control" value="<?php echo kdauto('calonatlet','CAS-'); ?>" readonly="true" required>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Nama Calon Atlet:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input nama'){this.value = '';}" value = "input nama" name="nama_mhs" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Sprint 300 Meter:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input waktu yang ditempuh dalah satuan detik'){this.value = '';}" value = "input waktu yang ditempuh dalah satuan detik" name="nilai" required class="form-control">
- </br><input type="submit" name="submit" value="Konversi" /> </br>
- </form>
- </br>
- <?php
- if(isset($_POST['submit'])){
- $nilai=$_POST['nilai'];
- $hm='Sangat Kurang';
- $nm='1';
- $nm1='2';
- $c1=$nm;
- $hm1='Kurang';
- if ($nilai>60.04)
- {
- echo "Nilai $nm </br>";
- echo "Keterangan $hm";
- (KALAU TERPILIH KONDIS INI GIMANA MASUKIN $nm KE DATABASENY?)
- }
- else if($nilai>57.47)
- {
- echo "Nilai $nm1 </br>";
- echo "Keterangan $hm1";
- (KALAU TERPILIH KONDIS INI GIMANA MASUKIN $nm1 KE DATABASENY?)
- }
- }
- ?>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Bleep Test:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input level yang ditempuh'){this.value = '';}" value = "input level yang ditempuh" name="c2" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Sit Up:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input jumlah'){this.value = '';}" value = "input jumlah" name="c3" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Back Up:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input jumlah'){this.value = '';}" value = "input jumlah" name="c4" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Sprint 40 Meter:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input waktu yang ditempuh dalam satuan detik'){this.value = '';}" value = "input waktu yang ditempuh dalam satuan detik" name="c5" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Side Split:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input lebar jarak dalam cm'){this.value = '';}" value = "input lebar jarak dalam cm" name="c6" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Standing Triple Jump:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input lebar jarak dalam cm'){this.value = '';}" value = "input lebar jarak dalam cm" name="c7" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Push Up:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input jumlah'){this.value = '';}" value = "input jumlah" name="c8" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">Shutle Run:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input waktu yang ditempuh dalam satuan detik'){this.value = '';}" value = "input waktu yang ditempuh dalam satuan detik" name="c9" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">kelas bobot:</label>
- <div class="col-sm-5">
- <input type="text" onfocus="if(this.value == 'input berat badan dalam Kg'){this.value = '';}" value = "input berat badan dalam Kg" name="kelas" required class="form-control">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label text-right">kontingen team:</label>
- <div class="col-sm-10">
- <input type="text" onfocus="if(this.value == 'input kontingen'){this.value = '';}" value = "input kontingen" name="team" required class="form-control">
- </div>
- </div>
- <div class="form-actions text-right">
- <input type="submit" name="simpan" value="Simpan" class="btn btn-primary">
- <input type="button" name="kembali" value="Kembali" onClick="javascript:history.back()" class="btn btn-default">
- </div>
- </div>
- </div>
- </form>
- <?php
- if(isset($_POST['simpan'])){
- $id_mhs = $_POST['id_mhs'];
- $nama_mhs = $_POST['nama_mhs'];
- $c1 = $_POST['c1'];
- //$id_klasifikasi = $_POST['id_klasifikasi'];
- $c2 = $_POST['c2'];
- $c3 = $_POST['c3'];
- $c4 = $_POST['c4'];
- $c5 = $_POST['c5'];
- $c6 = $_POST['c6'];
- $c7 = $_POST['c7'];
- $c8 = $_POST['c8'];
- $c9 = $_POST['c9'];
- $kelas = $_POST['kelas'];
- $team = $_POST['team'];
- $nilairanking = $_POST['nilairanking'];
- (KALAU TERPILIH KONDIS INI GIMANA MASUKIN $nm KE DATABASENY?)
- $sql="insert into calonatlet values
- ('$id_mhs','$nama_mhs','$c1','$c2','$c3','$c4','$c5','$c6','$c7','$c8','$c9','$kelas','$team','$nilairanking')";
- $query= mysql_query($sql) or die(mysql_error());
- if($query) {
- echo "<script>window.alert('Calon atlet berhasil ditambah');
- window.location=(href='mahasiswa.php')</script>";
- }}
- ?>
- <!-- /right labels -->
- <?php include "footer.php";?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement