Files
spota-dev/mahasiswa/_header.php
Power BI Dev efdb11db3f Add SPOTA core PHP application
Add the main admin, dosen, mahasiswa, API, and service code needed to run the core legacy application with configurable upload storage.
2026-05-02 10:08:52 +07:00

137 lines
4.5 KiB
PHP

<?php
$db=new dB($dbsetting);
$sqlIdent="SELECT * FROM tbmhs WHERE idmhs='".$_SESSION['login-mhs']['id']."'";
$dataIdent=$db->runQuery($sqlIdent);
$rowIdent =$db->dbFetch($dataIdent);
$noHPIdent = $rowIdent['noHP'];
$noHPIdentOrtu = $rowIdent['noHPOrtu'];
$bolehUploadDraft = $rowIdent['bolehUploadDraft'];
if(empty($noHPIdent) || empty($noHPIdentOrtu)){
if($_GET['menu'] != 'my-profile'){
echo "<script>window.location = `dashboard.php?page=user&menu=my-profile&kosong`;</script>";
exit;
}
}
if($noHPIdent == $noHPIdentOrtu){
if($_GET['menu'] != 'my-profile'){
echo "<script>window.location = `dashboard.php?page=user&menu=my-profile&sama`;</script>";
exit;
}
}
$idUser = $_SESSION['login-mhs']['id'];
$e = "SELECT * FROM tbmhs WHERE idmhs != '$idUser' AND (noHP = '$noHPIdent' OR noHPOrtu = '$noHPIdent' OR noHP = '$noHPIdentOrtu' OR noHPOrtu = '$noHPIdentOrtu')";
$db->runQuery($e);
if ($db->dbRows() > 0) {
if($_GET['menu'] != 'my-profile'){
echo "<script>window.location = `dashboard.php?page=user&menu=my-profile&terdaftar`;</script>";
exit;
}
}
if(strlen($noHPIdent) < 8 || strlen($noHPIdentOrtu) < 8){
if($_GET['menu'] != 'my-profile'){
echo "<script>window.location = `dashboard.php?page=user&menu=my-profile&pendek`;</script>";
exit;
}
}
?>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="clip-list-2"></span>
</button>
<a class="navbar-brand" href="dashboard.php">
MAHASISWA - SPOTA UNTAN
<?php
if (isset($_SESSION['login-mhs']['nmprodi'])){
echo strtoupper("(".$_SESSION['login-mhs']['nama_lengkap'].")");
}
?>
</a>
<!-- end: LOGO -->
</div>
<div class="navbar-tools">
<!-- start: TOP NAVIGATION MENU -->
<ul class="nav navbar-right" style="padding:0">
<?php
$Q_notif_review="SELECT tnr.*
FROM tmp_notif_r tnr
LEFT JOIN tbpraoutline tp ON(tp.id=tnr.idkonten)
WHERE tp.id=(SELECT id FROM tbpraoutline WHERE nim='".$_SESSION['login-mhs']['nim']."' ORDER BY id DESC LIMIT 1)
AND tnr.read = 'N'
AND tnr.jns_usr = 'M'
AND tnr.user = '".$_SESSION['login-mhs']['nim']."'
AND tnr.idProdi = '".$_SESSION['login-mhs']['prodi']."'";
//echo $Q_notif_review;
$notif_review=$db->runQuery($Q_notif_review);
$jlh_notif_review=$db->dbRows($notif_review);
?>
<li class="dropdown">
<a class="dropdown-toggle" href="?page=praoutline&menu=pemberitahuan" title="Tanggapan/ Review">
<i class="clip-notification-2"></i>
<?php
if($jlh_notif_review>0){
echo '<span class="badge">'.$jlh_notif_review.'</span>';
$_SESSION['new_review_mhs']=array();
while($rev=$db->dbFetch($notif_review)){
$_SESSION['new_review_mhs'][]=$rev['id'];
}
}
?>
</a>
</li>
<!-- end: NOTIFICATION DROPDOWN -->
<!-- start: MESSAGE DROPDOWN -->
<?php
$qpengumuan="SELECT COUNT(id) as jlh FROM tbpengumuman WHERE id NOT IN(SELECT idkonten FROM tmp_notif WHERE iduser='".$_SESSION['login-mhs']['id']."' AND typeuser='M' AND jenis='P') AND idProdi='".$_SESSION['login-mhs']['prodi']."' AND tujuan IN ('A','M')";
$notif_pengumuman=$db->runQuery($qpengumuan);
$rpengumuman=$db->dbFetch($notif_pengumuman);
$jlh_notif_pengumuman=$rpengumuman['jlh'];
?>
<li class="dropdown">
<a class="dropdown-toggle" href="?page=pengumuman" title="Pengumuman">
<i class="clip-list-5"></i>
<?php if($jlh_notif_pengumuman>0){ ?><span class="badge"> <?php echo $jlh_notif_pengumuman;?></span><?php } ?>
</a>
</li>
<li class="dropdown current-user">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<!-- <img src="assets/images/avatar-1-small.jpg" class="circle-img" alt=""> -->
<i class="clip-user"></i>
<span class="username"><?php echo $_SESSION['login-mhs']['nama_lengkap'];?></span>
<i class="clip-chevron-down"></i>
</a>
<ul class="dropdown-menu">
<li>
<a href="?page=user&menu=my-profile">
<i class="clip-user-2"></i>
&nbsp;Profil
</a>
</li>
<li>
<a href="#" id="btnLogout">
<i class="clip-exit"></i>
&nbsp;Log Out
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>