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 = '127.0.0.1'; // ini merupakan hostnya | |
$db = 'databasenya'; | |
$user = 'sa'; // user sql server | |
$pwd = 'sa'; // password sql server | |
//$dsn = "Driver={SQL Native Client};Server=$host;Database=$db; Uid=$user;Pwd=$pwd;"; | |
// This is a more generic one I use with to dev with, Windows 7 and SQL Server 2008 | |
$dsn = "Driver={SQL Server};Server=$host;Database=$db; Uid=$user;Pwd=$pwd;"; // only for dev. purposes | |
try{ |
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 lang="en"> | |
<head> | |
<title>..:: Buku Tamu ::..</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Bootstrap --> | |
<link href="<?php echo $this->config->item('assets_url');?>css/bootstrap.css" rel="stylesheet" media="screen"> | |
<script type="text/javascript" src="<?php echo base_url();?>js/jquery-1.8.2.js"></script> | |
<script type="text/javascript" src="<?php echo base_url();?>js/bootstrap.js"></script> | |
<script type="text/javascript"> |
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 | |
class Tamu_model extends CI_Model | |
{ | |
function __construct() | |
{ | |
parent::__construct(); | |
} | |
function cariTamu($namaTamu, $limit) | |
{ |
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 | |
class Tamu extends CI_Controller | |
{ | |
public $data; | |
function __construct() | |
{ | |
parent::__construct(); | |
} |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package ulang.springservice; | |
import id.web.rohman.ulangspringservice.model.Tamu; | |
import id.web.rohman.ulangspringservice.service.api.TamuService; | |
import java.sql.Connection; | |
import java.sql.SQLException; |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package id.web.rohman.ulangspringservice.service.impl; | |
import id.web.rohman.ulangspringservice.model.Tamu; | |
import id.web.rohman.ulangspringservice.service.api.TamuService; | |
import java.util.List; | |
import org.hibernate.SessionFactory; |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package id.web.rohman.ulangspringservice.service.api; | |
import id.web.rohman.ulangspringservice.model.Tamu; | |
import java.util.List; | |
/** |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package id.web.rohman.ulangspringservice.model; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Table; |
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
# To change this template, choose Tools | Templates | |
# and open the template in the editor. | |
hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect | |
jdbc.driver = com.mysql.jdbc.Driver | |
jdbc.url = jdbc:mysql://localhost/belajar?zeroDateTimeBehavior=convertToNull | |
jdbc.username = belajar | |
jdbc.password = belajar |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="hibernate.show_sql">true</property> | |
<property name="hibernate.hbm2ddl.auto">update</property> | |
<property name="hibernate.dialect"> | |
org.hibernate.dialect.MySQL5InnoDBDialect | |
</property> | |
<mapping class="id.web.rohman.ulangspringservice.model.Tamu" /> |