This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php ob_start() ?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Blog Admin</title> | |
<link rel="stylesheet" type="text/css" href="../assets/bootstrap-3.3.4/dist/css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="../assets/bootstrap-3.3.4/dist/css/bootstrap-theme.css"> | |
<link rel="stylesheet" type="text/css" href="../assets/font-awesome-4.3.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" type="text/css" href="../assets/summernote-master/dist/summernote.css"> | |
<link rel="stylesheet" type="text/css" href="../assets/summernote-master/dist/summernote-bs3.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Post Page</h1> | |
<ul class="nav nav-tabs"> | |
<li> <a href="#list" data-toggle="tab"><i class="fa fa-newspaper-o"></i> List Posts</a> </li> | |
<li> <a href="#new" data-toggle="tab"><i class=" fa fa-edit"></i> New Post</a></li> | |
</ul> | |
<div class="tab-content"> | |
<div class="tab-pane active" id="list"> | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['submit'])) { | |
include '../config/url_slug.php'; | |
try { | |
$sql = "INSERT INTO post (title, content, url) VALUES (:title, :content, :url)"; | |
$post = $dbh->prepare($sql); | |
$post->bindValue(':title',$_POST['title']); | |
$post->bindValue(':content',$_POST['content']); | |
$post->bindValue(':url',url_slug($_POST['title'])); | |
if ($post->execute()==true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = "localhost"; | |
$db="web_blog"; | |
$user = "root"; | |
$pass = "root"; | |
$dbh = new PDO("mysql:host=$host;dbname=$db", $user, $pass); | |
$dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('#summernote').summernote({ | |
height: "500px" | |
}); | |
}); | |
var postForm = function() { | |
var content = $('textarea[name="content"]').html($('#summernote').code()); | |
}$(document).ready(function() { | |
$('#summernote').summernote({ | |
height: "500px" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> | |
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> | |
<script src="http://cdn.oesmith.co.uk/morris-0.4.1.min.js"></script> | |
<title>Morris.js Chart Example</title> | |
</head> | |
<body onLoad="drawChart()"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include 'header.php' ?> | |
<div class="container"> | |
<?php | |
include 'koneksi.php'; | |
$sql = 'SELECT * FROM mahasiswa'; | |
$results = $mysqli->query($sql) or die($mysqli->error); | |
$rows = $results->fetch_all(MYSQLI_ASSOC); | |
?> | |
<h2>Data Mahasiswa</h2> | |
<a href="input.php" class="pull-right btn btn-sm btn-primary" style="margin-top: -35px;">Isi Data</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function login(){ | |
if ($_POST) { | |
$result = $this->Mahasiswa->login(); | |
if (!empty($result)) { | |
$data = array( | |
'username'=>$result->username, | |
'fullname'=>$result->fullname | |
); | |
$this->session->set_userdata($data); | |
redirect('pendaftaran/data'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'koneksi.php'; | |
if (isset($_POST['submit'])) { | |
$nim = $mysqli->real_escape_string($_POST['nim']); | |
$nama_lengkap = $mysqli->real_escape_string($_POST['nama_lengkap']); | |
$tempat_lahir = $mysqli->real_escape_string($_POST['tempat_lahir']); | |
$tanggal_lahir = $mysqli->real_escape_string($_POST['tanggal_lahir']); | |
$alamat = $mysqli->real_escape_string($_POST['alamat']); | |
$agama = $mysqli->real_escape_string($_POST['agama']); | |
$jurusan = $mysqli->real_escape_string($_POST['jurusan']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include 'header.php' ?> | |
<div class="container center-block"> | |
<div class="panel panel-default center-block" style="max-width:600px;margin-top:70px"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">Login Form</h3> | |
</div> | |
<div class="panel-body"> | |
<form action="" method="POST" class="form-horizontal"> | |
<div class="form-group"> | |
<label for="username" class="col-sm-4 control-label">Username</label> |
OlderNewer