Membuat ruang admin toko online
Membuat ruang admin toko online
. langkah pertama membuat folder admin didalam folder toko online
. langkah kedua membuat folder admin, bayar, beli, css, image, info, kategori, kota, menu, pemesanan, produk, provinsi, slide, status, sub, tapel, testimoni. semua folder disimpan dalam folder admin .
. langkah ketiga membuat desain css untuk tampilan ruang admin. silahkan copy script css dibawah ini lalu simpan dengan nama css_admin.css dalam folder css
/* CSS Document */
body{
background:url(../image/back6.png) center top;
padding:0;
margin:0;
}
.bersihkandiv{
clear:both;
border-top:1px;
width:100%;
}
.rangka{
width:900px;
margin-left:auto;
margin-top:10px;
margin-right:auto;
background:#dbdbdb;
border:1px solid #333;
}
.header{
display:inline-block;
width:900px;
background:rgb(51,51,51);
color:#FFF;
background:rgb(204,0,0);
}
.menu {
position: relative;
float: left;
left: 0px;
width: 140px;
border:1px solid #999;
margin-left:0px;
background-color: #F2F2F2;
}
.menu ul {
list-style: none;
margin: 0px;
padding: 0;
}
.menu li {
width: 135px;
margin: 0;
font-size: 14px;
vertical-align: bottom;
border:1px solid #999;
}
.menu li a, .menu a:visited {
display: block;
border-right: 1px solid #99000;
color: #000;
padding:5px;
text-decoration: none;
}
.menu a:hover {
color: #990000;
}
.h-kiri{
float: left;
text-align: left;
width: 550;
font-size: 14px;
margin:5px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
.h-kanan{
float:right;
text-align:right;
width:300;
margin:5px;
font-size:14px;
}
.h-kanan a
{color:rgb(255,255,255);
text-decoration:none;
}
.konten{
min-height:150px;
}
.konten-kanan{
float:right;
padding:10px;
width:740px;
}
h2{
font-size:14px;
margin:0;
padding:0;
color:rgb(204,0,0);
}
table {
font-family: Tahoma;
font-size: 12px;
border-width: 1px;
border-style: solid;
border-color: #999999;
border-collapse: collapse;
margin: 10px 0px;
max-width:100%;
}
th{
color: #000000;
font-size: 7pt;
text-transform: uppercase;
text-align: center;
padding: 0.5em;
border-width: 1px;
border-style: solid;
border-color: #969BA5;
border-collapse: collapse;
background-color: #DF8522;
}
td{
padding: 0.5em;
vertical-align: top;
border-width: 1px;
border-style: solid;
border-color: #969BA5;
border-collapse: collapse;
}
.konten-kiri{
float:left;
width:140px;
}
.footer{
font-size: 12px;
color: rgb(255,255,255);
background-color: rgb(0,0,0);
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
text-align: center;
background:rgb(153,0,0);
}
#toTop {
width: 100px;
border: 2px solid rgb(153, 153, 153);
background-color: rgb(18, 18, 18);
opacity: 0.9;
color: rgb(255, 255, 255);
text-align: center;
padding: 5px;
position: fixed;
bottom: 10px;
right: 10px;
cursor: pointer;
font-family: verdana;
font-size: 11px;
border-radius: 5px 5px 5px 5px;
z-index: 999;
}
body{
background:url(../image/back6.png) center top;
padding:0;
margin:0;
}
.bersihkandiv{
clear:both;
border-top:1px;
width:100%;
}
.rangka{
width:900px;
margin-left:auto;
margin-top:10px;
margin-right:auto;
background:#dbdbdb;
border:1px solid #333;
}
.header{
display:inline-block;
width:900px;
background:rgb(51,51,51);
color:#FFF;
background:rgb(204,0,0);
}
.menu {
position: relative;
float: left;
left: 0px;
width: 140px;
border:1px solid #999;
margin-left:0px;
background-color: #F2F2F2;
}
.menu ul {
list-style: none;
margin: 0px;
padding: 0;
}
.menu li {
width: 135px;
margin: 0;
font-size: 14px;
vertical-align: bottom;
border:1px solid #999;
}
.menu li a, .menu a:visited {
display: block;
border-right: 1px solid #99000;
color: #000;
padding:5px;
text-decoration: none;
}
.menu a:hover {
color: #990000;
}
.h-kiri{
float: left;
text-align: left;
width: 550;
font-size: 14px;
margin:5px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
.h-kanan{
float:right;
text-align:right;
width:300;
margin:5px;
font-size:14px;
}
.h-kanan a
{color:rgb(255,255,255);
text-decoration:none;
}
.konten{
min-height:150px;
}
.konten-kanan{
float:right;
padding:10px;
width:740px;
}
h2{
font-size:14px;
margin:0;
padding:0;
color:rgb(204,0,0);
}
table {
font-family: Tahoma;
font-size: 12px;
border-width: 1px;
border-style: solid;
border-color: #999999;
border-collapse: collapse;
margin: 10px 0px;
max-width:100%;
}
th{
color: #000000;
font-size: 7pt;
text-transform: uppercase;
text-align: center;
padding: 0.5em;
border-width: 1px;
border-style: solid;
border-color: #969BA5;
border-collapse: collapse;
background-color: #DF8522;
}
td{
padding: 0.5em;
vertical-align: top;
border-width: 1px;
border-style: solid;
border-color: #969BA5;
border-collapse: collapse;
}
.konten-kiri{
float:left;
width:140px;
}
.footer{
font-size: 12px;
color: rgb(255,255,255);
background-color: rgb(0,0,0);
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
text-align: center;
background:rgb(153,0,0);
}
#toTop {
width: 100px;
border: 2px solid rgb(153, 153, 153);
background-color: rgb(18, 18, 18);
opacity: 0.9;
color: rgb(255, 255, 255);
text-align: center;
padding: 5px;
position: fixed;
bottom: 10px;
right: 10px;
cursor: pointer;
font-family: verdana;
font-size: 11px;
border-radius: 5px 5px 5px 5px;
z-index: 999;
}
. langkah ke empat membuat index / form login untuk admin.
copy script dibawah ini lalu simpan dengan nama index.php simpan didalam folder admin
<?php
include"../koneksi.php";
if(!isset($_SESSION))
session_start();
if(!empty($_SESSION['nm_admin']))
echo "<meta http-equiv='refresh' content='0; url=utama.php'>";
else
{
if (isset($_POST['Login']))
{
$pass=md5($_POST['pass_admin']);
$login=mysql_query("SELECT * FROM admin WHERE nm_admin='$_POST[nm_admin]' AND pass_admin='$pass'");
$ketemu=mysql_num_rows($login);
$r=mysql_fetch_array($login);
// Apabila username dan password ditemukan
if ($ketemu > 0)
{
$_SESSION['id_admin'] = $r['id_admin'];
$_SESSION['nm_admin'] = $r['nm_admin'];
$_SESSION['pass_admin'] = $r['pass_admin'];
echo "<meta http-equiv='refresh' content='0; url=utama.php'>";
}
else
{
print "<script type='text/javascript'>
alert('Username atau Password Anda tidak benar.')
window.location=('index.php')
</script>";
}
}
?>
<html>
<head>
<body OnLoad="document.login.username.focus();">
<title>login Admin</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<style>
body{
background:#CCC;
}
table{
margin-top:150px;
background:url(image/DarkBlue.jpg) center;
color:#fff;
padding:10px;
width:300px;
height:170px
}
</style>
<body>
<center>
<form method="post" action="">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="19" colspan="3" align="center" valign="middle">Administrator</td>
</tr>
<tr>
<td align="right" valign="middle">Username </td>
<td width="10"> </td>
<td valign="middle"> <input name="nm_admin" type="text" size="20"></td>
</tr>
<tr>
<td align="right" valign="middle">Password </td>
<td> </td>
<td valign="middle"> <input name="pass_admin" type="password" size="20" /></td>
</tr>
<tr>
<td></td>
<td> </td>
<td valign="middle">
<input type="submit" name="Login" value="Login">
<input type="reset" name="Reset" value="Batal" /></td>
</tr>
</table>
</form>
</center>
</body>
</html>
<?php } ?>
include"../koneksi.php";
if(!isset($_SESSION))
session_start();
if(!empty($_SESSION['nm_admin']))
echo "<meta http-equiv='refresh' content='0; url=utama.php'>";
else
{
if (isset($_POST['Login']))
{
$pass=md5($_POST['pass_admin']);
$login=mysql_query("SELECT * FROM admin WHERE nm_admin='$_POST[nm_admin]' AND pass_admin='$pass'");
$ketemu=mysql_num_rows($login);
$r=mysql_fetch_array($login);
// Apabila username dan password ditemukan
if ($ketemu > 0)
{
$_SESSION['id_admin'] = $r['id_admin'];
$_SESSION['nm_admin'] = $r['nm_admin'];
$_SESSION['pass_admin'] = $r['pass_admin'];
echo "<meta http-equiv='refresh' content='0; url=utama.php'>";
}
else
{
print "<script type='text/javascript'>
alert('Username atau Password Anda tidak benar.')
window.location=('index.php')
</script>";
}
}
?>
<html>
<head>
<body OnLoad="document.login.username.focus();">
<title>login Admin</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<style>
body{
background:#CCC;
}
table{
margin-top:150px;
background:url(image/DarkBlue.jpg) center;
color:#fff;
padding:10px;
width:300px;
height:170px
}
</style>
<body>
<center>
<form method="post" action="">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="19" colspan="3" align="center" valign="middle">Administrator</td>
</tr>
<tr>
<td align="right" valign="middle">Username </td>
<td width="10"> </td>
<td valign="middle"> <input name="nm_admin" type="text" size="20"></td>
</tr>
<tr>
<td align="right" valign="middle">Password </td>
<td> </td>
<td valign="middle"> <input name="pass_admin" type="password" size="20" /></td>
</tr>
<tr>
<td></td>
<td> </td>
<td valign="middle">
<input type="submit" name="Login" value="Login">
<input type="reset" name="Reset" value="Batal" /></td>
</tr>
</table>
</form>
</center>
</body>
</html>
<?php } ?>
. Langkah kelima membuat halaman utama ruang admin.
copy script dibawah lalu simpan dengan nama utama.php didalam folder admin
<?php
session_start();
include "../koneksi.php";
$profil=mysql_fetch_array(mysql_query("select *from profil"))
?>
<html>
<head>
<link href="css/css_admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
<link href="../ckeditor/contents.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="rangka">
<div class="header">
<div class="h-kiri"><?=$profil['nm_situs']?> | Panel Administrator</div>
<div class="h-kanan"><a href="../index.php" target="_blank">lihat website</a> | <a href="logout.php">log out</a></div>
</div>
<div class="bersihkandiv"></div>
<div class="konten">
<div class="konten-kiri"><?php include"menu.php";?> </div>
<div class="konten-kanan">
<?php
$page = (isset($_GET['page']))? $_GET['page'] : "main";
switch ($page)
{
case 'edit_kategori' : include "kategori/edit_kategori.php"; break;
case 'hapus_kategori' : include "kategori/hapus_kategori.php"; break;
case 'input_kategori' : include "kategori/input_kategori.php"; break;
case 'lihat_kategori' : include "kategori/lihat_kategori.php"; break;
case 'edit_produk' : include "produk/edit_produk.php"; break;
case 'hapus_produk' : include "produk/hapus_produk.php"; break;
case 'input_produk' : include "produk/input_produk.php"; break;
case 'lihat_produk' : include "produk/lihat_produk.php"; break;
case 'edit_beli' : include "beli/edit_beli.php"; break;
case 'hapus_beli' : include "beli/hapus_beli.php"; break;
case 'detail_beli' : include "beli/detail_beli.php"; break;
case 'lihat_beli' : include "beli/lihat_beli.php"; break;
case 'detail_pemesanan' : include "pemesanan/detail_pemesanan.php"; break;
case 'edit_pemesanan' : include "pemesanan/edit_pemesanan.php"; break;
case 'hapus_pemesanan' : include "pemesanan/hapus_pemesanan.php"; break;
case 'input_pemesanan' : include "pemesanan/input_pemesanan.php"; break;
case 'lihat_pemesanan' : include "pemesanan/lihat_pemesanan.php"; break;
case 'edit_status' : include "status/edit_status.php"; break;
case 'hapus_status' : include "status/hapus_status.php"; break;
case 'input_status' : include "status/input_status.php"; break;
case 'lihat_status' : include "status/lihat_status.php"; break;
case 'edit_bayar' : include "bayar/edit_bayar.php"; break;
case 'hapus_bayar' : include "bayar/hapus_bayar.php"; break;
case 'input_bayar' : include "bayar/input_bayar.php"; break;
case 'lihat_bayar' : include "bayar/lihat_bayar.php"; break;
case 'edit_ajaran' : include "ajaran/edit_ajaran.php"; break;
case 'hapus_ajaran' : include "ajaran/hapus_ajaran.php"; break;
case 'input_ajaran' : include "ajaran/input_ajaran.php"; break;
case 'lihat_ajaran' : include "ajaran/lihat_ajaran.php"; break;
case 'edit_info' : include "info/edit_info.php"; break;
case 'hapus_info' : include "info/hapus_info.php"; break;
case 'input_info' : include "info/input_info.php"; break;
case 'lihat_info' : include "info/lihat_info.php"; break;
case 'edit_galeri' : include "galeri/edit_galeri.php"; break;
case 'hapus_galeri' : include "galeri/hapus_galeri.php"; break;
case 'input_galeri' : include "galeri/input_galeri.php"; break;
case 'lihat_galeri' : include "galeri/lihat_galeri.php"; break;
case 'edit_foto' : include "foto/edit_foto.php"; break;
case 'hapus_foto' : include "foto/hapus_foto.php"; break;
case 'input_foto' : include "foto/input_foto.php"; break;
case 'lihat_foto' : include "foto/lihat_foto.php"; break;
case 'edit_bukutamu' : include "bukutamu/edit_bukutamu.php"; break;
case 'hapus_bukutamu' : include "bukutamu/hapus_bukutamu.php"; break;
case 'lihat_bukutamu' : include "bukutamu/lihat_bukutamu.php"; break;
case 'edit_berita' : include "berita/edit_berita.php"; break;
case 'hapus_berita' : include "berita/hapus_berita.php"; break;
case 'input_berita' : include "berita/input_berita.php"; break;
case 'lihat_berita' : include "berita/lihat_berita.php"; break;
case 'edit_info' : include "info/edit_info.php"; break;
case 'hapus_info' : include "info/hapus_info.php"; break;
case 'input_info' : include "info/input_info.php"; break;
case 'lihat_info' : include "info/lihat_info.php"; break;
case 'edit_sub' : include "sub/edit_sub.php"; break;
case 'hapus_sub' : include "sub/hapus_sub.php"; break;
case 'input_sub' : include "sub/input_sub.php"; break;
case 'lihat_sub' : include "sub/lihat_sub.php"; break;
case 'edit_menu' : include "menu/edit_menu.php"; break;
case 'hapus_menu' : include "menu/hapus_menu.php"; break;
case 'input_menu' : include "menu/input_menu.php"; break;
case 'lihat_menu' : include "menu/lihat_menu.php"; break;
case 'edit_slide' : include "slide/edit_slide.php"; break;
case 'hapus_slide' : include "slide/hapus_slide.php"; break;
case 'input_slide' : include "slide/input_slide.php"; break;
case 'lihat_slide' : include "slide/lihat_slide.php"; break;
case 'edit_admin' : include "admin/edit_admin.php"; break;
case 'hapus_admin' : include "admin/hapus_admin.php"; break;
case 'input_admin' : include "admin/input_admin.php"; break;
case 'lihat_admin' : include "admin/lihat_admin.php"; break;
case 'edit_kota' : include "kota/edit_kota.php"; break;
case 'hapus_kota' : include "kota/hapus_kota.php"; break;
case 'input_kota' : include "kota/input_kota.php"; break;
case 'lihat_kota' : include "kota/lihat_kota.php"; break;
case 'edit_provinsi' : include "provinsi/edit_provinsi.php"; break;
case 'hapus_provinsi' : include "provinsi/hapus_provinsi.php"; break;
case 'input_provinsi' : include "provinsi/input_provinsi.php"; break;
case 'lihat_provinsi' : include "provinsi/lihat_provinsi.php"; break;
case 'edit_testimoni' : include "testimoni/edit_testimoni.php"; break;
case 'hapus_testimoni' : include "testimoni/hapus_testimoni.php"; break;
case 'input_testimoni' : include "testimoni/input_testimoni.php"; break;
case 'lihat_testimoni' : include "testimoni/lihat_testimoni.php"; break;
case 'profil' : include "profil.php"; break;
case 'main';
default : include 'home.php';
}
?>
</div>
</div>
<div class="bersihkandiv"></div>
<div class="footer">Copyright © <?=$profil['nm_situs']?> </div>
</div>
</body>
</html>
session_start();
include "../koneksi.php";
$profil=mysql_fetch_array(mysql_query("select *from profil"))
?>
<html>
<head>
<link href="css/css_admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
<link href="../ckeditor/contents.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="rangka">
<div class="header">
<div class="h-kiri"><?=$profil['nm_situs']?> | Panel Administrator</div>
<div class="h-kanan"><a href="../index.php" target="_blank">lihat website</a> | <a href="logout.php">log out</a></div>
</div>
<div class="bersihkandiv"></div>
<div class="konten">
<div class="konten-kiri"><?php include"menu.php";?> </div>
<div class="konten-kanan">
<?php
$page = (isset($_GET['page']))? $_GET['page'] : "main";
switch ($page)
{
case 'edit_kategori' : include "kategori/edit_kategori.php"; break;
case 'hapus_kategori' : include "kategori/hapus_kategori.php"; break;
case 'input_kategori' : include "kategori/input_kategori.php"; break;
case 'lihat_kategori' : include "kategori/lihat_kategori.php"; break;
case 'edit_produk' : include "produk/edit_produk.php"; break;
case 'hapus_produk' : include "produk/hapus_produk.php"; break;
case 'input_produk' : include "produk/input_produk.php"; break;
case 'lihat_produk' : include "produk/lihat_produk.php"; break;
case 'edit_beli' : include "beli/edit_beli.php"; break;
case 'hapus_beli' : include "beli/hapus_beli.php"; break;
case 'detail_beli' : include "beli/detail_beli.php"; break;
case 'lihat_beli' : include "beli/lihat_beli.php"; break;
case 'detail_pemesanan' : include "pemesanan/detail_pemesanan.php"; break;
case 'edit_pemesanan' : include "pemesanan/edit_pemesanan.php"; break;
case 'hapus_pemesanan' : include "pemesanan/hapus_pemesanan.php"; break;
case 'input_pemesanan' : include "pemesanan/input_pemesanan.php"; break;
case 'lihat_pemesanan' : include "pemesanan/lihat_pemesanan.php"; break;
case 'edit_status' : include "status/edit_status.php"; break;
case 'hapus_status' : include "status/hapus_status.php"; break;
case 'input_status' : include "status/input_status.php"; break;
case 'lihat_status' : include "status/lihat_status.php"; break;
case 'edit_bayar' : include "bayar/edit_bayar.php"; break;
case 'hapus_bayar' : include "bayar/hapus_bayar.php"; break;
case 'input_bayar' : include "bayar/input_bayar.php"; break;
case 'lihat_bayar' : include "bayar/lihat_bayar.php"; break;
case 'edit_ajaran' : include "ajaran/edit_ajaran.php"; break;
case 'hapus_ajaran' : include "ajaran/hapus_ajaran.php"; break;
case 'input_ajaran' : include "ajaran/input_ajaran.php"; break;
case 'lihat_ajaran' : include "ajaran/lihat_ajaran.php"; break;
case 'edit_info' : include "info/edit_info.php"; break;
case 'hapus_info' : include "info/hapus_info.php"; break;
case 'input_info' : include "info/input_info.php"; break;
case 'lihat_info' : include "info/lihat_info.php"; break;
case 'edit_galeri' : include "galeri/edit_galeri.php"; break;
case 'hapus_galeri' : include "galeri/hapus_galeri.php"; break;
case 'input_galeri' : include "galeri/input_galeri.php"; break;
case 'lihat_galeri' : include "galeri/lihat_galeri.php"; break;
case 'edit_foto' : include "foto/edit_foto.php"; break;
case 'hapus_foto' : include "foto/hapus_foto.php"; break;
case 'input_foto' : include "foto/input_foto.php"; break;
case 'lihat_foto' : include "foto/lihat_foto.php"; break;
case 'edit_bukutamu' : include "bukutamu/edit_bukutamu.php"; break;
case 'hapus_bukutamu' : include "bukutamu/hapus_bukutamu.php"; break;
case 'lihat_bukutamu' : include "bukutamu/lihat_bukutamu.php"; break;
case 'edit_berita' : include "berita/edit_berita.php"; break;
case 'hapus_berita' : include "berita/hapus_berita.php"; break;
case 'input_berita' : include "berita/input_berita.php"; break;
case 'lihat_berita' : include "berita/lihat_berita.php"; break;
case 'edit_info' : include "info/edit_info.php"; break;
case 'hapus_info' : include "info/hapus_info.php"; break;
case 'input_info' : include "info/input_info.php"; break;
case 'lihat_info' : include "info/lihat_info.php"; break;
case 'edit_sub' : include "sub/edit_sub.php"; break;
case 'hapus_sub' : include "sub/hapus_sub.php"; break;
case 'input_sub' : include "sub/input_sub.php"; break;
case 'lihat_sub' : include "sub/lihat_sub.php"; break;
case 'edit_menu' : include "menu/edit_menu.php"; break;
case 'hapus_menu' : include "menu/hapus_menu.php"; break;
case 'input_menu' : include "menu/input_menu.php"; break;
case 'lihat_menu' : include "menu/lihat_menu.php"; break;
case 'edit_slide' : include "slide/edit_slide.php"; break;
case 'hapus_slide' : include "slide/hapus_slide.php"; break;
case 'input_slide' : include "slide/input_slide.php"; break;
case 'lihat_slide' : include "slide/lihat_slide.php"; break;
case 'edit_admin' : include "admin/edit_admin.php"; break;
case 'hapus_admin' : include "admin/hapus_admin.php"; break;
case 'input_admin' : include "admin/input_admin.php"; break;
case 'lihat_admin' : include "admin/lihat_admin.php"; break;
case 'edit_kota' : include "kota/edit_kota.php"; break;
case 'hapus_kota' : include "kota/hapus_kota.php"; break;
case 'input_kota' : include "kota/input_kota.php"; break;
case 'lihat_kota' : include "kota/lihat_kota.php"; break;
case 'edit_provinsi' : include "provinsi/edit_provinsi.php"; break;
case 'hapus_provinsi' : include "provinsi/hapus_provinsi.php"; break;
case 'input_provinsi' : include "provinsi/input_provinsi.php"; break;
case 'lihat_provinsi' : include "provinsi/lihat_provinsi.php"; break;
case 'edit_testimoni' : include "testimoni/edit_testimoni.php"; break;
case 'hapus_testimoni' : include "testimoni/hapus_testimoni.php"; break;
case 'input_testimoni' : include "testimoni/input_testimoni.php"; break;
case 'lihat_testimoni' : include "testimoni/lihat_testimoni.php"; break;
case 'profil' : include "profil.php"; break;
case 'main';
default : include 'home.php';
}
?>
</div>
</div>
<div class="bersihkandiv"></div>
<div class="footer">Copyright © <?=$profil['nm_situs']?> </div>
</div>
</body>
</html>
. Langkah keenam membuat home di halaman utama.
copy script dibawah lalu simpan dengan nama home.php didalam folder admin
<?php
if(!isset($_SESSION))
session_start();
if (empty($_SESSION['nm_admin']) AND empty($_SESSION['pass_admin'])){
echo "<link href='style.css' rel='stylesheet' type='text/css'>
<center>Untuk mengakses halaman ini, Anda harus login dulu<br>";
echo "<a href=index.php><b>LOGIN</b></a></center>";
}
else{?><html>
<head><title>Lihat Berita</title>
</head>
<style>
#kepala{
text-align:center;
size:14px;
}
</style>
<body>
<center><b><p>Selamat datang di halaman administrator <?=$profil['nm_situs']?>.<br>
Silahkan klik menu pilihan yang berada di sebelah kiri untuk mengelola website.</b></p>
<img src="./../image/<?=$profil['logo_situs']?>" width="200px"/>
<p>Terima kasih</p> </center>
</body>
</html>
<?php }?>
if(!isset($_SESSION))
session_start();
if (empty($_SESSION['nm_admin']) AND empty($_SESSION['pass_admin'])){
echo "<link href='style.css' rel='stylesheet' type='text/css'>
<center>Untuk mengakses halaman ini, Anda harus login dulu<br>";
echo "<a href=index.php><b>LOGIN</b></a></center>";
}
else{?><html>
<head><title>Lihat Berita</title>
</head>
<style>
#kepala{
text-align:center;
size:14px;
}
</style>
<body>
<center><b><p>Selamat datang di halaman administrator <?=$profil['nm_situs']?>.<br>
Silahkan klik menu pilihan yang berada di sebelah kiri untuk mengelola website.</b></p>
<img src="./../image/<?=$profil['logo_situs']?>" width="200px"/>
<p>Terima kasih</p> </center>
</body>
</html>
<?php }?>
. Langkah ketujuh membuat menu navigasi di ruang utama admin.
copy script dibawah lalu simpan dengan nama menu.php didalam folder admin
<div class="menu">
<ul>
<li><a href="utama.php?page=home">» Home</a></li>
<li><a href="utama.php?page=lihat_menu">» Menu Utama</a></li>
<li><a href="utama.php?page=lihat_sub">» Sub Menu</a></li>
<li><a href="utama.php?page=lihat_kota">» Kota</a></li>
<li><a href="utama.php?page=lihat_provinsi">» Provinsi</a></li>
<li><a href="utama.php?page=lihat_produk">» Produk</a></li>
<li><a href="utama.php?page=lihat_kategori">» Kategori</a></li>
<li><a href="utama.php?page=lihat_beli">» Pembeli</a></li>
<li><a href="utama.php?page=lihat_pemesanan">» Pemesanan</a></li>
<li><a href="utama.php?page=lihat_testimoni">» testimoni</a></li>
<li><a href="utama.php?page=lihat_status">» Status Pesan</a></li>
<li><a href="utama.php?page=lihat_bayar">» Pembayaran</a></li>
<li><a href="utama.php?page=lihat_info">» Informasi</a></li>
<li><a href="utama.php?page=lihat_slide">» Slide Show</a></li>
<li><a href="utama.php?page=lihat_admin">» Admin</a></li>
<li><a href="utama.php?page=profil">» Profil</a></li>
</ul>
</div>
<ul>
<li><a href="utama.php?page=home">» Home</a></li>
<li><a href="utama.php?page=lihat_menu">» Menu Utama</a></li>
<li><a href="utama.php?page=lihat_sub">» Sub Menu</a></li>
<li><a href="utama.php?page=lihat_kota">» Kota</a></li>
<li><a href="utama.php?page=lihat_provinsi">» Provinsi</a></li>
<li><a href="utama.php?page=lihat_produk">» Produk</a></li>
<li><a href="utama.php?page=lihat_kategori">» Kategori</a></li>
<li><a href="utama.php?page=lihat_beli">» Pembeli</a></li>
<li><a href="utama.php?page=lihat_pemesanan">» Pemesanan</a></li>
<li><a href="utama.php?page=lihat_testimoni">» testimoni</a></li>
<li><a href="utama.php?page=lihat_status">» Status Pesan</a></li>
<li><a href="utama.php?page=lihat_bayar">» Pembayaran</a></li>
<li><a href="utama.php?page=lihat_info">» Informasi</a></li>
<li><a href="utama.php?page=lihat_slide">» Slide Show</a></li>
<li><a href="utama.php?page=lihat_admin">» Admin</a></li>
<li><a href="utama.php?page=profil">» Profil</a></li>
</ul>
</div>
. Langkah kedelapan membuat log out dari ruang admin.
copy script dibawah lalu simpan dengan nama logout.php didalam folder admin
<?php
session_start();
isset($_SESSION['id_admin']);
session_destroy();
echo"<meta http-equiv='refresh' content='0; url=index.php'>";
?>
session_start();
isset($_SESSION['id_admin']);
session_destroy();
echo"<meta http-equiv='refresh' content='0; url=index.php'>";
?>
. Langkah kesembilan silahkan download file dibawah ini untuk membuat edit lihat tambah menu navigasi web,sub menu web,kota,provinsi,produk,kategori,pembeli,pemesanan,testimoni,status pesanan,pembayaran,informasi,slideshow,admin,profil.
Setelah download silahkan ekstrak file lalu simpan di folder admin.
0 Response to "Membuat ruang admin toko online"
Posting Komentar