Skip to content

Instantly share code, notes, and snippets.

View sakukode's full-sized avatar

Rizqi Maulana sakukode

View GitHub Profile
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
if (!function_exists('indonesian_date')) {
function indonesian_date($date)
{
// fungsi atau method untuk mengubah tanggal ke format indonesia
// variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan
$indonesian_month = array("Januari", "Februari", "Maret",
"April", "Mei", "Juni",
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->helper('indonesian_date');
$date = date("Y-m-d");
//menampilkan tanggal dengan format tanggal indonesia
<?php
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'demo-tutorial',
$autoload['libraries'] = array('database');
<?php if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
class People_model extends CI_Model
{
protected $table = 'peoples'; // you MUST mention the table name
protected $primary_key = 'id'; // you MUST mention the primary key
public function get_all($limit, $page)
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Welcome extends CI_Controller
{
public function index($page = 1)
{
//load model
$this->load->model('people_model');
<!DOCTYPE html>
<html>
<head>
<title>Demo Codeigniter Pagination with Bootstrap CSS Style</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
body {
margin-top: 50px;
}
</style>
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Welcome extends CI_Controller
{
/*
* Method untuk meload view form
*/
public function index()
{
<!DOCTYPE html>
<html>
<head>
<title>Validation Form using Jquery Validate</title>
<style type="text/css">
body {
margin-top: 50px;
margin-left: 30px;
}
</style>
<!DOCTYPE html>
<html>
<head>
<title>Demo Memasang Disqus Pada Halaman Web</title>
<style type="text/css">
.container {
padding: 10px;
}
</style>
</head>