initital comm

parent 2f43bf4a
<?php include_once 'kepala.php';
$result = mysqli_query($ok->conn(),'Select * from toga');
$result11 = mysqli_query($ok->conn(),'Select * from toga');
?>
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// Load Charts and the corechart package.
google.charts.load('current', {'packages':['corechart']});
// Draw the pie chart for Sarah's pizza when Charts is loaded.
google.charts.setOnLoadCallback(drawSarahChart);
// Draw the pie chart for the Anthony's pizza when Charts is loaded.
google.charts.setOnLoadCallback(drawAnthonyChart);
// Callback that draws the pie chart for Sarah's pizza.
function drawSarahChart() {
// Create the data table for Sarah's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php
while($user_data = mysqli_fetch_array($result)){
extract($user_data);
$ww =$ok->countbeibe($user_data['id_toga']);
echo "['{$nama_toga}',".$ww."],";
}
?>
]);
// Set options for Sarah's pie chart.
var options = {title:'Pie Charts Beibe',
width:530,
height:300};
// Instantiate and draw the chart for Sarah's pizza.
var chart = new google.visualization.PieChart(document.getElementById('Sarah_chart_div'));
chart.draw(data, options);
}
// Callback that draws the pie chart for Anthony's pizza.
function drawAnthonyChart() {
// Create the data table for Anthony's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php
while($user_data = mysqli_fetch_array($result11)){
extract($user_data);
$ww =$ok->count($user_data['id_toga']);
echo "['{$nama_toga}',".$ww."],";
}
?>
]);
// Set options for Anthony's pie chart.
var options = {title:'Pie Charts Marga',
width:530,
height:300};
// Instantiate and draw the chart for Anthony's pizza.
var chart = new google.visualization.PieChart(document.getElementById('Anthony_chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<?php include_once 'kepala.php'; ?>
<?php include_once 'kiri.php'; ?>
<!-- Right Panel -->
<div id="right-panel" class="right-panel">
<!--Table and divs that hold the pie charts-->
<table class="columns">
<tr>
<td><div id="Sarah_chart_div" style="border: 1px solid #ccc"></div></td>
<td><div id="Anthony_chart_div" style="border: 1px solid #ccc"></div></td>
</tr>
</table>
</div>
</body>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="vendors/chart.js/dist/Chart.bundle.min.js"></script>
<script src="assets/js/dashboard.js"></script>
<script src="assets/js/widgets.js"></script>
<script src="vendors/jqvmap/dist/jquery.vmap.min.js"></script>
<script src="vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
<script src="vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
</html>
\ No newline at end of file
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
type: 'pie', type: 'pie',
data: { data: {
datasets: [ { datasets: [ {
data: [ 45, 25, 20, 10 ], data: [ 450, 25, 20, 10 ],
backgroundColor: [ backgroundColor: [
"rgba(0, 123, 255,0.9)", "rgba(0, 123, 255,0.9)",
"rgba(0, 123, 255,0.7)", "rgba(0, 123, 255,0.7)",
......
<?php include_once 'kepala.php';
$result = mysqli_query($ok->conn(),'Select * from toga');
?>
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
</script>
<script type="text/javascript">
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Marga', 'Jumlah'],
<?php
while($user_data = mysqli_fetch_array($result)){
extract($user_data);
$ww =$ok->count($user_data['id_toga']);
echo "['{$nama_toga}',".$ww."],";
}
?>
]);
var options = {
title: 'My Daily Activities',
is3D: true,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="piechart_3d" style="width: 900px; height: 500px;"></div>
</body>
</html>
\ No newline at end of file
...@@ -67,3 +67,15 @@ ...@@ -67,3 +67,15 @@
</div> </div>
</div> </div>
</div> </div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="vendors/chart.js/dist/Chart.bundle.min.js"></script>
<script src="assets/js/dashboard.js"></script>
<script src="assets/js/widgets.js"></script>
<script src="vendors/jqvmap/dist/jquery.vmap.min.js"></script>
<script src="vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
<script src="vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
...@@ -17,10 +17,7 @@ ...@@ -17,10 +17,7 @@
<!-- /.menu-title --> <!-- /.menu-title -->
<li class=""> <li class="">
<a href="inputMarga.php"> <i class="menu-icon fa fa-dashboard"></i>Input Marga & Toga </a> <a href="inputMarga.php"> <i class="menu-icon fa fa-dashboard"></i>Input Marga & Toga </a>
</li>
<li class="">
<a href="TampilMarga.php"> <i class="menu-icon fa fa-dashboard"></i>Edit daftar Toga </a>
</li>
<li class="menu-item-has-children dropdown"> <li class="menu-item-has-children dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-laptop"></i>Edit daftar Marga</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-laptop"></i>Edit daftar Marga</a>
<ul class="sub-menu children dropdown-menu"> <ul class="sub-menu children dropdown-menu">
...@@ -32,57 +29,21 @@ ...@@ -32,57 +29,21 @@
</ul> </ul>
</li> </li>
<li class="menu-item-has-children dropdown"> <li class="menu-item-has-children dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-table"></i>Tables</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-laptop"></i>Tampilkan data User</a>
<ul class="sub-menu children dropdown-menu"> <ul class="sub-menu children dropdown-menu">
<li><i class="fa fa-table"></i><a href="tables-basic.html">Basic Table</a></li> <?php
<li><i class="fa fa-table"></i><a href="tables-data.html">Data Table</a></li> $result = mysqli_query($ok->conn(),'Select * from toga');
while($user_data = mysqli_fetch_array($result)){ ?>
<li><i class="fa fa-puzzle-piece"></i><a href="Tampilmarga.php?<?php echo "marga="; echo $user_data['id_toga']; ?>"><?php echo $user_data['nama_toga']; ?></a></li>
<?php } ?>
</ul> </ul>
</li> </li>
<li class="menu-item-has-children dropdown"> <li class="">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-th"></i>Forms</a> <a href="TampilGraphic.php"> <i class="menu-icon fa fa-dashboard"></i>Tampilkan Grafik</a>
<ul class="sub-menu children dropdown-menu">
<li><i class="menu-icon fa fa-th"></i><a href="forms-basic.html">Basic Form</a></li>
<li><i class="menu-icon fa fa-th"></i><a href="forms-advanced.html">Advanced Form</a></li>
</ul>
</li> </li>
<h3 class="menu-title">Icons</h3><!-- /.menu-title -->
<li class="menu-item-has-children dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-tasks"></i>Icons</a>
<ul class="sub-menu children dropdown-menu">
<li><i class="menu-icon fa fa-fort-awesome"></i><a href="font-fontawesome.html">Font Awesome</a></li>
<li><i class="menu-icon ti-themify-logo"></i><a href="font-themify.html">Themefy Icons</a></li>
</ul>
</li>
<li>
<a href="widgets.html"> <i class="menu-icon ti-email"></i>Widgets </a>
</li>
<li class="menu-item-has-children dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-bar-chart"></i>Charts</a>
<ul class="sub-menu children dropdown-menu">
<li><i class="menu-icon fa fa-line-chart"></i><a href="charts-chartjs.html">Chart JS</a></li>
<li><i class="menu-icon fa fa-area-chart"></i><a href="charts-flot.html">Flot Chart</a></li>
<li><i class="menu-icon fa fa-pie-chart"></i><a href="charts-peity.html">Peity Chart</a></li>
</ul>
</li>
<li class="menu-item-has-children dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-area-chart"></i>Maps</a>
<ul class="sub-menu children dropdown-menu">
<li><i class="menu-icon fa fa-map-o"></i><a href="maps-gmap.html">Google Maps</a></li>
<li><i class="menu-icon fa fa-street-view"></i><a href="maps-vector.html">Vector Maps</a></li>
</ul>
</li>
<h3 class="menu-title">Extras</h3><!-- /.menu-title -->
<li class="menu-item-has-children dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="menu-icon fa fa-glass"></i>Pages</a>
<ul class="sub-menu children dropdown-menu">
<li><i class="menu-icon fa fa-sign-in"></i><a href="page-login.html">Login</a></li>
<li><i class="menu-icon fa fa-sign-in"></i><a href="page-register.html">Register</a></li>
<li><i class="menu-icon fa fa-paper-plane"></i><a href="pages-forget.html">Forget Pass</a></li>
</ul>
</li>
</ul> </ul>
</div><!-- /.navbar-collapse --> </div><!-- /.navbar-collapse -->
</nav> </nav>
......
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Marga', 'Jumlah'],
<?php
while($user_data = mysqli_fetch_array($result)){
extract($user_data);
$ww =$ok->count($user_data['id_toga']);
echo "['{$nama_toga}',".$ww."],";
}
?>
// ['Work', 11],
// ['Eat', 2],
// ['Commute', 2],
// ['Watch TV', 2],
// ['Sleep', 7]
]);
var options = {
title: 'My Daily Activities',
is3D: true,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
\ No newline at end of file
<?php include_once 'kepala.php'; ?>
<?php include_once 'kiri.php'; ?> <?php include_once 'kepala.php'; ?>
<div id="right-panel" class="right-panel"> <?php include_once 'kiri.php'; ?>
<div class="breadcrumbs">
<div class="col-sm-4"> <!-- Right Panel -->
<div class="page-header float-left">
<div class="page-title"> <div id="right-panel" class="right-panel">
<h1></h1> <?php $coneksi = new SudahLogin(); ?>
</div> <?php if(!isset($_GET['marga'])) header('Location: index.php'); $id = $_GET['marga']?>
</div> <?php include_once 'header.php'; ?>
</div> <h1> <?php echo "Toga ".$coneksi->ambilToga($_GET['marga']); ?></h1>
<div class="col-sm-8"> <table class="w3-table w3-striped">
<div class="page-header float-right">
<div class="page-title">
<ol class="breadcrumb text-right">
<li class="active"></li>
</ol>
</div>
</div>
</div>
</div>
<div class="breadcrumbs">
<div class="col-sm-4">
<div class="page-header float-left">
<div class="page-title">
<h1>Daftar Toga</h1>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-lg-12">
<table id="dtBasicExample" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
<thead>
<tr> <tr>
<th class="th-sm">No <th>No </th>
</th> <th>Nama</th>
<th class="th-sm">Nama Toga <th>Marga</th>
</th>
<th class="th-sm">Action
</th>
</tr> </tr>
</thead>
<tbody>
<?php <?php
$a =1; $ok12 =1;
$ok = new data(); $result = mysqli_query($ok->conn(),"Select data_user.nama as ok, marga.marga as mrg from data_user inner join marga where marga.toga = '$id' and marga.id_marga = data_user.marga");
$result = mysqli_query($ok->conn(),'Select * from toga'); while($user_data =$result->fetch_assoc()){
while($user_data = mysqli_fetch_array($result)){ ?> echo "<tr>";
<tr> echo "<td>".$ok12."</td>";
<td><?php echo $a; ?></td> echo "<td>".$user_data['ok']; echo " </td>";
<td> <?php echo $user_data['nama_toga']; $a++; ?></td> echo "<td>".$user_data['mrg']; echo " </td>";
<td> <a href="edit_toga.php?<?php echo md5('edit')."=".$user_data['id_toga'] ?>">Hapus</a> | <a href="hapus.php?id=<?php echo $user_data['id_toga'] ?>">Edit</a></td> echo "<tr>";
</tr> $ok12++;
<?php };?> }
</tbody> ?>
<tfoot>
<tr><th>No</th>
<th>Nama Toga
</th>
</tr>
</tfoot>
</table> </table>
</div> </div>
<br>
</div> <script src="vendors/jquery/dist/jquery.min.js"></script>
<?php include_once('kaki.php') ?> <script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="vendors/chart.js/dist/Chart.bundle.min.js"></script>
<script src="assets/js/dashboard.js"></script>
<script src="assets/js/widgets.js"></script>
<script src="vendors/jqvmap/dist/jquery.vmap.min.js"></script>
<script src="vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
<script src="vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
<script>
(function($) {
"use strict";
jQuery('#vmap').vectorMap({
map: 'world_en',
backgroundColor: null,
color: '#ffffff',
hoverOpacity: 0.7,
selectedColor: '#1de9b6',
enableZoom: true,
showTooltip: true,
values: sample_data,
scaleColors: ['#1de9b6', '#03a9f5'],
normalizeFunction: 'polynomial'
});
})(jQuery);
</script>
</body>
</html>
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities'
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="piechart" style="width: 900px; height: 500px;"></div>
</body>
</html>
<?php include_once 'kepala.php';
$result = mysqli_query($ok->conn(),'Select * from toga');
$result11 = mysqli_query($ok->conn(),'Select * from toga');
?>
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// Load Charts and the corechart package.
google.charts.load('current', {'packages':['corechart']});
// Draw the pie chart for Sarah's pizza when Charts is loaded.
google.charts.setOnLoadCallback(drawSarahChart);
// Draw the pie chart for the Anthony's pizza when Charts is loaded.
google.charts.setOnLoadCallback(drawAnthonyChart);
// Callback that draws the pie chart for Sarah's pizza.
function drawSarahChart() {
// Create the data table for Sarah's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php
while($user_data = mysqli_fetch_array($result)){
extract($user_data);
$ww =$ok->countbeibe($user_data['id_toga']);
echo "['{$nama_toga}',".$ww."],";
}
?>
]);
// Set options for Sarah's pie chart.
var options = {title:'How Much Pizza Sarah Ate Last Night',
width:400,
height:300};
// Instantiate and draw the chart for Sarah's pizza.
var chart = new google.visualization.PieChart(document.getElementById('Sarah_chart_div'));
chart.draw(data, options);
}
// Callback that draws the pie chart for Anthony's pizza.
function drawAnthonyChart() {
// Create the data table for Anthony's pizza.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
<?php
while($user_data = mysqli_fetch_array($result11)){
extract($user_data);
$ww =$ok->count($user_data['id_toga']);
echo "['{$nama_toga}',".$ww."],";
}
?>
]);
// Set options for Anthony's pie chart.
var options = {title:'How Much Pizza Anthony Ate Last Night',
width:400,
height:300};
// Instantiate and draw the chart for Anthony's pizza.
var chart = new google.visualization.PieChart(document.getElementById('Anthony_chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<!--Table and divs that hold the pie charts-->
<table class="columns">
<tr>
<td><div id="Sarah_chart_div" style="border: 1px solid #ccc"></div></td>
<td><div id="Anthony_chart_div" style="border: 1px solid #ccc"></div></td>
</tr>
</table>
</body>
</html>
\ No newline at end of file
This diff is collapsed. Click to expand it.
...@@ -111,71 +111,8 @@ ...@@ -111,71 +111,8 @@
</table> </table>
</div> </div>
</section> </section>
<!-- Service section end -->
<!-- CTA section start -->
<!-- <section class="cta-section pt100 pb50">
<div class="cta-image-box"></div>
<div class="container">
<div class="row">
<div class="col-lg-7 pl-lg-0 offset-lg-5 cta-content">
<h2 class="sp-title">Dare to dream of a modern <span>home</span></h2>
<p>Pellentesque lorem dolor, malesuada eget tortor vitae, tristique lacinia lectus. Pellentesque sed accumsan risus, id aliquam nulla. Integer lorem risus, feugiat at mauris malesuada, accumsan pellentesque ipsum. Nunc dapibus, libero ut pulvinar accumsan, tortor nisl iaculis ligula. Curabitur finibus dolor vel lectus pretium interdum a eget ante. </p>
<div class="cta-icons">
<div class="cta-img-icon">
<img src="img/icon/light/1.png" alt="">
</div>
<div class="cta-img-icon">
<img src="img/icon/light/2.png" alt="">
</div>
<div class="cta-img-icon">
<img src="img/icon/color/3.png" alt="">
</div>
</div>
</div>
</div>
</div>
</section> -->
<!-- CTA section end -->
<!-- Milestones section Start -->
<!-- <section class="milestones-section spad">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>14</h2>
<p>Years <br>of <br>Experience</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>237</h2>
<p>Projects <br>Taken</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>11k</h2>
<p>Twitter <br>Followers</p>
</div>
</div> </div>
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>12</h2>
<p>Awards <br>Won</p>
</div>
</div>
</div>
</div>
</section> -->
<!-- Milestones section end -->
<!-- Projects section start -->
<div class="projects-section pb50"> <div class="projects-section pb50">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
......
...@@ -137,6 +137,14 @@ ...@@ -137,6 +137,14 @@
</table> </table>
</form> </form>
</div> </div>
<form action="fungsi.php" method="post">
<td><h3>Keluhan</h3></td>
<td><h3>:</h3></td>
<input class="w3-input w3-border" type="text" name="keluhan" value="">
<button type="submit" name="button">kirim</button>
</form>
</section> </section>
<div class="projects-section pb50"> <div class="projects-section pb50">
......
<?php
session_start();
include_once 'fungsi.php';
$ok = new data();
if(isset($_GET['status'])){
$ok->logout();
}
if(!isset($_SESSION['login'])){
header('Location: login.php');
}
if(isset($_SESSION['admin'])){
header('Location: admin/admin/index.php');
}
?>
\ No newline at end of file
...@@ -82,14 +82,16 @@ ...@@ -82,14 +82,16 @@
$check = $this->conn()->query("SELECT * from user where username='$username'"); $check = $this->conn()->query("SELECT * from user where username='$username'");
$d = mysqli_fetch_array($check); $d = mysqli_fetch_array($check);
$ID= $d['id']; $ID= $d['id'];
if(mysqli_query($this->conn(),"INSERT INTO `data_user` VALUES (NULL, '$ID', '$nama', '$notset', '$notset', '$ab', '$angkatan', '$prodi', '$ok')")){ if(!mysqli_query($this->conn(),"INSERT INTO `data_user` VALUES (NULL, '$ID', '$nama', '$notset', '$notset', '$ab', '$angkatan', '$prodi', '$ok')")){
$this->sessStart(); $this->sessStart();
$_SESSION['login'] = TRUE; $_SESSION['login'] = TRUE;
$_SESSION['id'] = $ID; $_SESSION['id'] = $ID;
header('Location: index.php'); header('Location: index.php');
echo "Bisa";
} }
else { else {
header('Location: register.php'); header('Location: register.php');
// echo "Gabisa";
} }
} }
} }
...@@ -127,9 +129,9 @@ ...@@ -127,9 +129,9 @@
} }
function header(){ function header(){
echo "<header class='header-area'>"; echo "<header class='header-area'>";
echo "<a href='home.php' class='logo-area'>";
echo "<img src='img/logo.png'>"; echo "<img src='gambar/s1.png'>";
echo "</a>"; echo "</a>";
echo "<div class='nav-switch'>"; echo "<div class='nav-switch'>";
echo " <i class='fa fa-bars'></i>"; echo " <i class='fa fa-bars'></i>";
echo " </div>"; echo " </div>";
...@@ -267,10 +269,20 @@ ...@@ -267,10 +269,20 @@
} }
} }
function count($id){ function count($id){
$result = mysqli_query($this->conn(),"Select count(*) as total from data_user where marga = '$id'"); $result = mysqli_query($this->conn(),"Select count(*) as total from data_user inner join marga where marga.toga = '$id' and marga.id_marga = data_user.marga");
$data= mysqli_fetch_assoc($result);
return $data['total'];
}
function countbeibe($id){
$result = mysqli_query($this->conn(),"Select count(*) as total from data_user inner join marga where marga.toga = '$id' and marga.id_marga = data_user.mamak");
$data= mysqli_fetch_assoc($result); $data= mysqli_fetch_assoc($result);
return $data['total']; return $data['total'];
} }
function TampilUser($id){
$result = mysqli_query($this->conn(),"Select * from data_user inner join marga where marga.toga = '$id' and marga.id_marga = data_user.marga");
$data= mysqli_fetch_assoc($result);
return $data;
}
function jk1($int,$name){ function jk1($int,$name){
$check = $this->conn()->query("SELECT * from data_user where id_nama='$int'"); $check = $this->conn()->query("SELECT * from data_user where id_nama='$int'");
if($check){ if($check){
...@@ -365,5 +377,64 @@ ...@@ -365,5 +377,64 @@
header('Location: profile.php?'); header('Location: profile.php?');
} }
function ambilToga($id){
$check = $this->conn()->query("SELECT * FROM toga WHERE id_toga = '$id'");
$d = mysqli_fetch_array($check);
return $d['nama_toga'];
}
}
class tutur{
var $host = "localhost";
var $uname = "root";
var $pass = "";
var $db = "pabi";
function conn(){
$conn = mysqli_connect($this->host, $this->uname, $this->pass,$this->db);
return $conn;
}
function cari_kelamin($key){
$sql = "SELECT * FROM data_user WHERE id_nama = '$key'";
$check = $this->conn()->query($sql);
$d = mysqli_fetch_array($check);
return $d['Jenis_kelamin'];
}
function dapat_toga($id){
$sql = "SELECT marga.toga as ok from marga INNER JOIN data_user where data_user.id_nama = '$id' and data_user.marga = marga.id_marga";
$check = $this->conn()->query($sql);
$d = mysqli_fetch_array($check);
return $d['ok'];
}
function dapat_toga_mamak($id){
$sql = "SELECT marga.toga as ok from marga INNER JOIN data_user where data_user.id_nama = '$id' and data_user.mamak = marga.id_marga";
$check = $this->conn()->query($sql);
$d = mysqli_fetch_array($check);
return $d['ok'];
}
function tutur1($id,$tutur){
$kelamin = cari_kelamin($id);
$toga = dapat_toga($id);
if(!strcmp($tutur ,'ito')){
$sql = "SELECT data_user.nama as ok, marga.marga as mrg from data_user inner join marga where marga.toga = '$id' and marga.id_marga = data_user.marga and data_user.Jenis_kelamin is not $kelamin";
return $sql;
}
} }
?> }
//
// $conn = mysqli_connect("localhost","root","","pabi");
// $keluhan = $_POST["keluhan"];
// $query ="INSERT INTO keluhan (id,isi_keluhan) VALUES ('', '$keluhan')";
// if(mysqli_query($conn,$query)){
// echo 'berhasil loh kontol'
// ;
// } else {
// echo 'Data gagal disimpan'.mysqli_error($conn);
// }
?>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<meta name="description" content="Arcade - Architecture Template"> <meta name="description" content="Arcade - Architecture Template">
<meta name="keywords" content="arcade, architecture, onepage, creative, html"> <meta name="keywords" content="arcade, architecture, onepage, creative, html">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="img/favicon.ico" rel="shortcut icon"/> <link href="img/favicon.icon" rel="shortcut icon"/>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="css/bootstrap.min.css"/> <link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/font-awesome.min.css"/> <link rel="stylesheet" href="css/font-awesome.min.css"/>
...@@ -32,13 +32,7 @@ ...@@ -32,13 +32,7 @@
<section class="hero-section"> <section class="hero-section">
<div class="left-bar"> <div class="left-bar">
<div class="left-bar-content"> <div class="left-bar-content">
<div class="social-links">
<a href="#"><i class="fa fa-pinterest"></i></a>
<a href="#"><i class="fa fa-linkedin"></i></a>
<a href="#"><i class="fa fa-instagram"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
</div>
</div> </div>
</div> </div>
<!-- hero slider area --> <!-- hero slider area -->
...@@ -179,68 +173,6 @@ Ompu Tuan Situmorang adalah anak dan Ompunta Siraja Lontung dan Ibunya Siboru Pa ...@@ -179,68 +173,6 @@ Ompu Tuan Situmorang adalah anak dan Ompunta Siraja Lontung dan Ibunya Siboru Pa
</div> </div>
</div> </div>
</section> </section>
<!-- Service section end -->
<!-- CTA section start -->
<!-- <section class="cta-section pt100 pb50">
<div class="cta-image-box"></div>
<div class="container">
<div class="row">
<div class="col-lg-7 pl-lg-0 offset-lg-5 cta-content">
<h2 class="sp-title">Dare to dream of a modern <span>home</span></h2>
<p>Pellentesque lorem dolor, malesuada eget tortor vitae, tristique lacinia lectus. Pellentesque sed accumsan risus, id aliquam nulla. Integer lorem risus, feugiat at mauris malesuada, accumsan pellentesque ipsum. Nunc dapibus, libero ut pulvinar accumsan, tortor nisl iaculis ligula. Curabitur finibus dolor vel lectus pretium interdum a eget ante. </p>
<div class="cta-icons">
<div class="cta-img-icon">
<img src="img/icon/light/1.png" alt="">
</div>
<div class="cta-img-icon">
<img src="img/icon/light/2.png" alt="">
</div>
<div class="cta-img-icon">
<img src="img/icon/color/3.png" alt="">
</div>
</div>
</div>
</div>
</div>
</section> -->
<!-- CTA section end -->
<!-- Milestones section Start -->
<!-- <section class="milestones-section spad">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>14</h2>
<p>Years <br>of <br>Experience</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>237</h2>
<p>Projects <br>Taken</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>11k</h2>
<p>Twitter <br>Followers</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="milestone">
<h2>12</h2>
<p>Awards <br>Won</p>
</div>
</div>
</div>
</div>
</section> -->
<!-- Milestones section end -->
<!-- Projects section start --> <!-- Projects section start -->
...@@ -262,7 +194,7 @@ Ompu Tuan Situmorang adalah anak dan Ompunta Siraja Lontung dan Ibunya Siboru Pa ...@@ -262,7 +194,7 @@ Ompu Tuan Situmorang adalah anak dan Ompunta Siraja Lontung dan Ibunya Siboru Pa
</div> --> </div> -->
</div> </div>
</div> </div>
<div id="projects-carousel" class="projects-slider"> <div id="projects-carousel" class="projects-slider">
<div class="single-project set-bg rest" data-setbg="img/projects/1.jpg"> <div class="single-project set-bg rest" data-setbg="img/projects/1.jpg">
<div class="project-content"> <div class="project-content">
<h2>Biggest <br> Restaurations</h2> <h2>Biggest <br> Restaurations</h2>
......
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
$ok = new data(); $ok = new data();
$ok->login($nama,$pass); $ok->login($nama,$pass);
} }
if(isset($_SESSION['login'])){
header('Location: index.php');
}
if(isset($_SESSION['admin'])){
header('Location: admin/admin/index.php');
}
// $chek = new data(); // $chek = new data();
// $chek->redirect(); // $chek->redirect();
?> ?>
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
if(isset($_GET['status'])){ if(isset($_GET['status'])){
$ok->logout(); $ok->logout();
} }
$Ok = new tutur();
$id = $_SESSION['id'];
$kelamin = $Ok->cari_kelamin($id);
?> ?>
...@@ -85,7 +89,7 @@ ...@@ -85,7 +89,7 @@
</div> </div>
<h3>Ito</h3> <h3>Ito</h3>
<p>Untuk sapaan Ito, adalah panggilan bagi laki-laki kepada perempuan dan sebaliknya. Anak perempuan dari Namboru juga dipanggil Ito. Sehari-hari kalau bertemu lawan jenis yang sebaya bisalah dipanggil Ito.</p> <p>Untuk sapaan Ito, adalah panggilan bagi laki-laki kepada perempuan dan sebaliknya. Anak perempuan dari Namboru juga dipanggil Ito. Sehari-hari kalau bertemu lawan jenis yang sebaya bisalah dipanggil Ito.</p>
<?php $ok= md5('ito') ?> <?php $ok= 'ito'; ?>
<?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore'>READ MORE</a>" ?> <?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore'>READ MORE</a>" ?>
</div> </div>
</div> </div>
...@@ -98,7 +102,7 @@ ...@@ -98,7 +102,7 @@
</div> </div>
<h3>Pariban</h3> <h3>Pariban</h3>
<p>Di dalam suku adat batak, pariban itu sebenarnya sepupu. Yang artinya anak laki-laki dari Namboru dan anak perempuan dari Tulang dapat dinikahkan (dipasaut dalam bahasa batak). ... Jadi, pariban merupakan sepupu yang dapat dinikahi.</p> <p>Di dalam suku adat batak, pariban itu sebenarnya sepupu. Yang artinya anak laki-laki dari Namboru dan anak perempuan dari Tulang dapat dinikahkan (dipasaut dalam bahasa batak). ... Jadi, pariban merupakan sepupu yang dapat dinikahi.</p>
<?php $ok= md5('pariban') ?> <?php $ok='pariban'; ?>
<?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?> <?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?>
</div> </div>
</div> </div>
...@@ -109,25 +113,44 @@ ...@@ -109,25 +113,44 @@
<img src="img/icon/dark/3.png" alt=""> <img src="img/icon/dark/3.png" alt="">
</div> </div>
</div> </div>
<h3>Appara</h3> <?php
<p>Appara memiliki makna dalam istilah Batak ialah ‘Dongan Tubu’, jadi kata ‘Appara/Ampara’ digunakan bagi orang Batak yang memiliki marga toga yang sama, misalnya saya memanggil appara dengan teman yang semarga dengan toga saya.</p> if($kelamin == 2){
<?php $ok= md5('appara') ?> echo "<h3>Appiri</h3>";
}else {
echo "<h3>Appara</h3>";
}
?>
<p><?php if($kelamin ==2) echo "Appiri"; else {
echo "Appara";
} ?> memiliki makna dalam istilah Batak ialah ‘Dongan Tubu’, jadi kata <?php if($kelamin ==2) echo "Appiri "; else {
echo "Appara ";
} ?>digunakan bagi orang Batak yang memiliki marga toga yang sama, misalnya saya memanggil appara dengan teman yang semarga dengan toga saya.</p>
<?php $ok='appara'; ?>
<?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?> <?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?>
</div> </div>
</div> </div><?php if($kelamin ==1) {
<div class="col-lg-4 col-md-6">
<div class="service-box"> } ?>
<div class="sb-icon"> <?php
<div class="sb-img-icon"> if ($kelamin == 1) {
<img src="img/icon/dark/4.png" alt=""> echo "<div class='col-lg-4 col-md-6'>";
</div> echo "<div class='service-box'>";
</div> echo "<div class='sb-icon'>";
<h3>Bere</h3> echo "<div class='sb-img-icon'>";
echo "<img src='img/icon/dark/4.png' alt=''>";
echo "</div>
</div>";
echo "<h3>Bere</h3>
<p>Dalam suku batak, bere adalah semua anak (anak laki-laki + Perempuan) dari kakak atau Anak/boru dari adik perempuan kita. Misalnya ada wanita yang ibu nya berboru sama dengan marga saya, maka saya bisa memanggilnya bere.</p> <p>Dalam suku batak, bere adalah semua anak (anak laki-laki + Perempuan) dari kakak atau Anak/boru dari adik perempuan kita. Misalnya ada wanita yang ibu nya berboru sama dengan marga saya, maka saya bisa memanggilnya bere.</p>
<?php $ok= md5('bere') ?> ";
<?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?> $ok='bere';
</div> echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>";
</div> echo "</div>
</div>";
}
?>
<div class="col-lg-4 col-md-6"> <div class="col-lg-4 col-md-6">
<div class="service-box"> <div class="service-box">
<div class="sb-icon"> <div class="sb-icon">
...@@ -135,9 +158,11 @@ ...@@ -135,9 +158,11 @@
<img src="img/icon/dark/5.png" alt=""> <img src="img/icon/dark/5.png" alt="">
</div> </div>
</div> </div>
<h3>Lae</h3> <h3><?php if($kelamin ==2) echo "Dae"; else {
echo "Lae";
} ?></h3>
<p>Bagi orang suku batak (Toba) khusus nya kaum pria, 'lae' dapat dipanggil bila bukan satu marga nya. Dan itu juga berlaku untuk panggilan dari saudara ipar dari pihak istri atau suami jika mempunyai saudara laki - laki</p> <p>Bagi orang suku batak (Toba) khusus nya kaum pria, 'lae' dapat dipanggil bila bukan satu marga nya. Dan itu juga berlaku untuk panggilan dari saudara ipar dari pihak istri atau suami jika mempunyai saudara laki - laki</p>
<?php $ok= md5('lae') ?> <?php $ok= 'lae'; ?>
<?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?> <?php echo "<a href='cari_tutur.php?nama=".$ok." ' class='readmore' >READ MORE</a>" ?>
</div> </div>
</div> </div>
......
...@@ -183,14 +183,6 @@ ...@@ -183,14 +183,6 @@
<h1>Projects</h1> <h1>Projects</h1>
</div> </div>
</div> </div>
<!-- <div class="col-lg-9">
<ul class="projects-filter-nav">
<li class="btn-filter" data-filter="*">All</li>
<li class="btn-filter" data-filter=".rest">Restaurations</li>
<li class="btn-filter" data-filter=".build">Buildings</li>
<li class="btn-filter" data-filter=".apart">Apartments</li>
</ul>
</div> -->
</div> </div>
</div> </div>
<div id="projects-carousel" class="projects-slider"> <div id="projects-carousel" class="projects-slider">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment