[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
simkeu 07072025
/
sia
/
[
Home
]
File: dataMhs.inc.php
<?php $id = ""; $ip = ""; $userf = ""; $pwdf = ""; $buton = "Simpan"; ?> <h1 class="h3 mb-4 text-gray-800">List Mahasiswa</h1> <div class="container-fluid"> <!-- Page Heading --> <?php if(isset($_POST["SYNC"])) { $sql = "delete from f_mhs"; $result = mysqli_query($conn, $sql); include 'feeder_ws.php'; token(); $feeder_token = $_SESSION['feeder_token']; $sync['act']="GetListMahasiswa"; $sync['token']=$feeder_token; $sync['key']=[ "filter"=>"", "order"=>"", "limit"=>"100", "offset"=>"0" ]; $json_array = runWs($sync); $jsonn = json_decode($json_array,true); foreach($jsonn['data'] as $row) { $tbField[0] = "nama_mahasiswa"; $tbField[1] = "nama_program_studi"; $tbField[2] = "nim"; $tbField[3] = "nama_periode_masuk"; $tbField[4] = "tanggal_lahir"; $tbField[5] = "id_mahasiswa"; $tbIsi[0] = "'".addslashes($row['nama_mahasiswa'])."'"; $tbIsi[1] = "'".$row['nama_program_studi']."'"; $tbIsi[2] = "'".$row['nim']."'"; $tbIsi[3] = "'".$row['nama_periode_masuk']."'"; $tbIsi[4] = "'".$row['tanggal_lahir']."'"; $tbIsi[5] = "'".$row['id_mahasiswa']."'"; $nmField = compile_array($tbField); $isiField = compile_array($tbIsi); $sql = "insert into f_mhs (".$nmField.") values (".$isiField.")"; if (mysqli_query($conn, $sql)) { } else { echo "Error: " . $sql . "<br>" . mysqli_error($conn); } } } ?> <!-- DataTales Example --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">DataTables</h6> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>NPM</th> <th>Nama</th> <th>Prodi</th> <th>Tahun Masuk</th> <th>ID</th> </tr> </thead> <tfoot> <tr> <th>NPM</th> <th>Nama</th> <th>Prodi</th> <th>Tahun Masuk</th> <th>ID</th> </tr> </tfoot> <tbody> <?php $sql = "SELECT * FROM m_siswa where siswa_nis <> '' order by siswa_nis desc"; $result = mysqli_query($conn, $sql); if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { ?> <tr> <td><?php echo $row['siswa_nis'];?></td> <td><?php echo $row['siswa_nama'];?></td> <td><?php echo $row['jurusan'];?></td> <td>2022/2023</td> <td><?php echo $row['siswa_id'];?></td> </tr> <?php } } ?> </tbody> </table> </div> </div> </div> </div>