Commit 7633eae9 by Andry F. Hutapea

Inprogress

parent 38dde5e1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>TB SILALAHI CENTER</title>
<!-- Bootstrap Core CSS/dipake -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="dist/css/sb-admin-2.css" rel="stylesheet">
<link href="css/animate1.css" rel='stylesheet' type='text/css' />
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<ul class="tp-hd-lft wow fadeInDown animated" data-wow-delay="0.5s">
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="admin.php">Halaman Admin</a>
</div>
<!-- /.navbar-header -->
<ul class="nav navbar-top-links navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="login.php"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
</li>
</ul>
<!-- /.dropdown-user -->
</li>
<!-- /.dropdown -->
</ul>
<!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
<a href="admin.php"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
</li>
<li>
<a href="daftar_komentar.php"></i><i class="fa fa-sign-out fa-fw"></i>Daftar Komentar</a>
</li>
<li>
<a href="koleksi.php"></i><i class="fa fa-sign-out fa-fw"></i>Daftar pengumuman</a>
</li>
<li>
<a href="apply_tiket.php"></i><i class="fa fa-sign-out fa-fw"></i>Daftar Pemesan</a>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Halaman Admin TB SILALAHI CENTER</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="tbc"; // Database name
$tbl_name="fpengumuman"; // Table name
// Connect to server and select database.
$conn = mysqli_connect("$host", "$username", "$password")or die("cannot connect");
mysqli_select_db($conn,"$db_name")or die("cannot select DB");
// get data that sent from form
$topic=$_POST['topic'];
$detail=$_POST['detail'];
$name=$_POST['name'];
$email=$_POST['email'];
$datetime=date("d/m/y h:i:s"); //create date time
$sql="INSERT INTO $tbl_name(topic, detail, name, email, datetime)VALUES('$topic', '$detail', '$name', '$email', '$datetime')";
$result=mysqli_query($conn,$sql);
if($result){
echo "Pengumuman berhasil di Buat !<BR>";
}
else {
echo "ERROR";
}
//mysql_close();
?>
<?php
require_once(dirname(__FILE__).'/main_pengumuman.php');
?>
</div>
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="vendor/metisMenu/metisMenu.min.js"></script>
</ul>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>TB SILALAHI CENTER</title>
<!-- Bootstrap Core CSS/dipake -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="dist/css/sb-admin-2.css" rel="stylesheet">
<link href="css/animate1.css" rel='stylesheet' type='text/css' />
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<ul class="tp-hd-lft wow fadeInDown animated" data-wow-delay="0.5s">
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="admin.php">Halaman Admin</a>
</div>
<!-- /.navbar-header -->
<ul class="nav navbar-top-links navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="login.php"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
</li>
</ul>
<!-- /.dropdown-user -->
</li>
<!-- /.dropdown -->
</ul>
<!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
<a href="admin.php"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
</li>
<li>
<a href="daftar_komentar.php"></i><i class="fa fa-sign-out fa-fw"></i>Daftar Komentar</a>
</li>
<li>
<a href="koleksi.php"></i><i class="fa fa-sign-out fa-fw"></i>Daftar pengumuman</a>
</li>
<li>
<a href="apply_tiket.php"></i><i class="fa fa-sign-out fa-fw"></i>Daftar Pemesan</a>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Halaman Admin TB SILALAHI CENTER</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form id="form1" name="form1" method="post" action="add_new_pengumuman.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3" bgcolor="#E6E6E6"><strong>Create New Topic</strong> </td>
</tr>
<tr>
<td width="14%"><strong>Topic</strong></td>
<td width="2%">:</td>
<td width="84%"><input name="topic" type="text" id="topic" size="50" /></td>
</tr>
<tr>
<td valign="top"><strong>Detail</strong></td>
<td valign="top">:</td>
<td><textarea name="detail" cols="50" rows="3" id="detail"></textarea></td>
</tr>
<tr>
<td><strong>Name</strong></td>
<td>:</td>
<td><input name="name" type="text" id="name" size="50" /></td>
</tr>
<tr>
<td><strong>Email</strong></td>
<td>:</td>
<td><input name="email" type="text" id="email" size="50" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Reset" /></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
</body>
</html>
</div>
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="vendor/metisMenu/metisMenu.min.js"></script>
</ul>
</body>
</html>
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="tbc"; // Database name
$tbl_name="fpengumuman"; // Table name
// Connect to server and select databse.
$conn = mysqli_connect("$host", "$username", "$password")or die("cannot connect");
mysqli_select_db($conn,"$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name ORDER BY id DESC";
// OREDER BY id DESC is order result by descending
$result=mysqli_query($conn,$sql);
$no=0;
?>
<table width="30%" border="2" align="left" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<img src="foto/IMG_20170311_103634.jpg">
</tr>
</table>
<table width="70%" border="0" align="right" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="10%" align="center" bgcolor="#E6E6E6"><strong>No</strong></td>
<td width="53%" align="center" bgcolor="#E6E6E6"><strong>Topic Pengumuman</strong></td>
<td width="13%" align="center" bgcolor="#E6E6E6"><strong>Date/Time</strong></td>
</tr>
<?php
// Start looping table row
while($rows = mysqli_fetch_array($result)){
?>
<tr>
<td align="center" bgcolor="#FFFFFF"><?php echo ++$no;; ?></td>
<td align="center"bgcolor="#FFFFFF"><a href="view_pengumuman.php?id=<?php echo $rows['id']; ?>"><?php echo $rows['topic']; ?></a><BR></td>
<td align="center" bgcolor="#FFFFFF"><?php echo $rows['datetime']; ?></td>
</tr>
<?php
// Exit looping and close connection
}
//mysql_close();
?>
</table>
\ No newline at end of file
<?php
session_start();
include_once('config/koneksi.php');
open_page('booking');
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/metro-bootstrap.css" rel="stylesheet">
<link href="css/metro-bootstrap-responsive.css" rel="stylesheet">
<link href="css/iconFont.css" rel="stylesheet">
<link href="css/docs.css" rel="stylesheet">
<link href="css/animate1.css" rel="stylesheet" type="text/css">
<!-- Load JavaScript Libraries -->
<script src="js/jquery/jquery.min.js"></script>
<script src="js/jquery/jquery.widget.min.js"></script>
<script src="js/jquery/jquery.mousewheel.js"></script>
<!-- Metro UI CSS JavaScript plugins -->
<script src="js/load-metro.js"></script>
<!-- Local JavaScript -->
<script src="js/docs.js"></script>
<title>Booking Paket</title>
</head>
<ul class="tp-hd-lft wow fadeInDown animated" data-wow-delay="0.5s">
<body class="metro">
<header class="bg-darkCobalt" data-load="atasan.php"></header></body>
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="tbc"; // Database name
$tbl_name="fpengumuman"; // Table name
// Connect to server and select databse.
$conn = mysqli_connect("$host", "$username", "$password")or die("cannot connect");
mysqli_select_db($conn,"$db_name")or die("cannot select DB");
// get value of id that sent from address bar
$id=$_GET['id'];
$sql="SELECT * FROM $tbl_name WHERE id='$id'";
$result=mysqli_query($conn,$sql);
$rows=mysqli_fetch_array($result);
?>
<body>
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="1" bgcolor="#ffffff">
</tr>
<tr>
<td bgcolor="#ffffff" style="width:80px"><strong>Nama Pembuat :</strong> <?php echo $rows['name']; ?> <br></td>
<td bgcolor="#ffffff" colspan="2" style="text-align: right">Tanggal pembuatan :<?php echo $rows['datetime']; ?></td>
</tr>
<tr>
<td>
<strong>Email Pembuat : </strong><?php echo $rows['email'];?></td>
</tr>
<tr>
<td colspan="4" bgcolor="#ffffff"><strong>Topic Pengumuman : <?php echo $rows['topic']; ?></strong></td>
</tr>
<tr>
<td colspan="4" bgcolor="#ffffff"><strong>Detail Pengumuman : </strong><?php echo $rows['detail']; ?></td>
</tr>
</table>
<table width="30%" rowspan="2" border="2" align="left" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" style="text-align: right">
<tr>
<img src ="image/taradisitoba.jpg">
</tr>
</table></td></tr></table>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<table width="100%" border="0" align="" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<footer class="dark" data-load="bawahan.php"></footer>
</tr>
</table>
</ul>
</body>
</html>
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