[Pemprograman Berbasis KK] Tugas 2
Nitama Nurlingga Yotifa
05111740000059
Source Code file application/controllers/welcome.php yang merupakan sebuah controller yang digunakan untuk me-load halaman
Source Code file application/views/about.php yang akan ditampilkan pada halaman about
Source Code file application/views/contact.php yang akan ditampilkan pada halaman about
05111740000059
Pengenalan Framework Code Igniter
Souce code file application/views/welcome_message.php yang akan ditampilkan pada halaman index
1: <?php
2: defined('BASEPATH') OR exit('No direct script access allowed');
3: ?><!DOCTYPE html>
4: <html lang="en">
5: <head>
6: <meta charset="utf-8">
7: <title>Nana Jaya Tours and Travel</title>
8: <style type="text/css">
9: ::selection { background-color: #E13300; color: white; }
10: ::-moz-selection { background-color: #E13300; color: white; }
11: body {
12: background-color: #fff;
13: margin: 40px;
14: font: 13px/20px normal Helvetica, Arial, sans-serif;
15: color: #4F5155;
16: }
17: a {
18: color: #003399;
19: background-color: transparent;
20: font-weight: normal;
21: }
22: h1 {
23: color: #444;
24: background-color: transparent;
25: border-bottom: 1px solid #D0D0D0;
26: font-size: 19px;
27: font-weight: normal;
28: margin: 0 0 14px 0;
29: padding: 14px 15px 10px 15px;
30: }
31: code {
32: font-family: Consolas, Monaco, Courier New, Courier, monospace;
33: font-size: 12px;
34: background-color: #f9f9f9;
35: border: 1px solid #D0D0D0;
36: color: #002166;
37: display: block;
38: margin: 14px 0 14px 0;
39: padding: 12px 10px 12px 10px;
40: }
41: #body {
42: margin: 0 15px 0 15px;
43: }
44: p.footer {
45: text-align: right;
46: font-size: 11px;
47: border-top: 1px solid #D0D0D0;
48: line-height: 32px;
49: padding: 0 10px 0 10px;
50: margin: 20px 0 0 0;
51: }
52: #container {
53: margin: 10px;
54: border: 1px solid #D0D0D0;
55: box-shadow: 0 0 8px #D0D0D0;
56: }
57: </style>
58: </head>
59: <body>
60: <div id="container">
61: <h1>Selamat datang di Nana Jaya Tours and Travel</h1>
62: <div id="body">
63: <h3>Nana Jaya Tours and Travel melayani :</h3>
64: <ul>
65: <li>Biro Perjalanan Wisata</li>
66: <li>Homestay</li>
67: <li>Rental Transportation</li>
68: <li>Rent Minivan with Driver</li>
69: <li>Rental Motorbike</li>
70: <li>Travel Shuttle</li>
71: <li>Driver Freelance</li>
72: </ul>
73: <br><br>
74: <table>
75: <thead>
76: </thead>
77: <tbody>
78: <tr>
79: <td>Developed by</td>
80: <td>:</td>
81: <td>Nitama Nurlingga Yotifa</td>
82: </tr>
83: <tr>
84: <td>NRP</td>
85: <td>:</td>
86: <td>05111740000059</td>
87: </tr>
88: <tr>
89: <td>Kelas</td>
90: <td>:</td>
91: <td>PBKK - B</td>
92: </tr>
93: </tbody>
94: </table>
95: </div>
96: <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
97: </div>
98: </body>
99: </html>
Tampilan Halaman Index |
Source Code file application/controllers/welcome.php yang merupakan sebuah controller yang digunakan untuk me-load halaman
1: <?php
2: defined('BASEPATH') OR exit('No direct script access allowed');
3: class Welcome extends CI_Controller {
4: /**
5: * Index Page for this controller.
6: *
7: * Maps to the following URL
8: * http://example.com/index.php/welcome
9: * - or -
10: * http://example.com/index.php/welcome/index
11: * - or -
12: * Since this controller is set as the default controller in
13: * config/routes.php, it's displayed at http://example.com/
14: *
15: * So any other public methods not prefixed with an underscore will
16: * map to /index.php/welcome/<method_name>
17: * @see https://codeigniter.com/user_guide/general/urls.html
18: */
19: public function index()
20: {
21: $this->load->view('welcome_message');
22: }
23: public function about()
24: {
25: $this->load->view('about');
26: }
27: public function contact()
28: {
29: $this->load->view('contact');
30: }
31: }
Source Code file application/views/about.php yang akan ditampilkan pada halaman about
1: <?php
2: defined('BASEPATH') OR exit('No direct script access allowed');
3: ?><!DOCTYPE html>
4: <html lang="en">
5: <head>
6: <meta charset="utf-8">
7: <title>Nana Jaya Tours and Travel</title>
8: <style type="text/css">
9: ::selection { background-color: #E13300; color: white; }
10: ::-moz-selection { background-color: #E13300; color: white; }
11: body {
12: background-color: #fff;
13: margin: 40px;
14: font: 13px/20px normal Helvetica, Arial, sans-serif;
15: color: #4F5155;
16: }
17: a {
18: color: #003399;
19: background-color: transparent;
20: font-weight: normal;
21: }
22: h1 {
23: color: #444;
24: background-color: transparent;
25: border-bottom: 1px solid #D0D0D0;
26: font-size: 19px;
27: font-weight: normal;
28: margin: 0 0 14px 0;
29: padding: 14px 15px 10px 15px;
30: }
31: code {
32: font-family: Consolas, Monaco, Courier New, Courier, monospace;
33: font-size: 12px;
34: background-color: #f9f9f9;
35: border: 1px solid #D0D0D0;
36: color: #002166;
37: display: block;
38: margin: 14px 0 14px 0;
39: padding: 12px 10px 12px 10px;
40: }
41: #body {
42: margin: 0 15px 0 15px;
43: }
44: p.footer {
45: text-align: right;
46: font-size: 11px;
47: border-top: 1px solid #D0D0D0;
48: line-height: 32px;
49: padding: 0 10px 0 10px;
50: margin: 20px 0 0 0;
51: }
52: #container {
53: margin: 10px;
54: border: 1px solid #D0D0D0;
55: box-shadow: 0 0 8px #D0D0D0;
56: }
57: .tanggal{
58: float: left;
59: }
60: </style>
61: </head>
62: <body>
63: <div id="container">
64: <h1>About Nana Jaya Tours and Travel</h1>
65: <div id="body">
66: <h3>Tentang Perusahaan</h3>
67: <p>Nana Jaya Tours and Travel merupakan perusahaan Berlegalitas dan BerPPN dibidang Jasa Pariwisata, Biro Wisata, Agen Tour Travel, Driver Freelance dan Rental Transportation.</p>
68: <br>
69: <p>Head office : Surabaya</p>
70: <p>Branch Office : Malang | Madiun | Solo | Yogyakarta | Semarang</p>
71: <p class="tanggal">Tanggal pembuatan : 19 Februari 2020</p>
72: </div>
73: <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
74: </div>
75: </body>
76: </html>
Tampilan Halaman About |
Source Code file application/views/contact.php yang akan ditampilkan pada halaman about
1: <?php
2: defined('BASEPATH') OR exit('No direct script access allowed');
3: ?><!DOCTYPE html>
4: <html lang="en">
5: <head>
6: <meta charset="utf-8">
7: <title>Nana Jaya Tours and Travel</title>
8: <style type="text/css">
9: ::selection { background-color: #E13300; color: white; }
10: ::-moz-selection { background-color: #E13300; color: white; }
11: body {
12: background-color: #fff;
13: margin: 40px;
14: font: 13px/20px normal Helvetica, Arial, sans-serif;
15: color: #4F5155;
16: }
17: a {
18: color: #003399;
19: background-color: transparent;
20: font-weight: normal;
21: }
22: h1 {
23: color: #444;
24: background-color: transparent;
25: border-bottom: 1px solid #D0D0D0;
26: font-size: 19px;
27: font-weight: normal;
28: margin: 0 0 14px 0;
29: padding: 14px 15px 10px 15px;
30: }
31: code {
32: font-family: Consolas, Monaco, Courier New, Courier, monospace;
33: font-size: 12px;
34: background-color: #f9f9f9;
35: border: 1px solid #D0D0D0;
36: color: #002166;
37: display: block;
38: margin: 14px 0 14px 0;
39: padding: 12px 10px 12px 10px;
40: }
41: #body {
42: margin: 0 15px 0 15px;
43: }
44: p.footer {
45: text-align: right;
46: font-size: 11px;
47: border-top: 1px solid #D0D0D0;
48: line-height: 32px;
49: padding: 0 10px 0 10px;
50: margin: 20px 0 0 0;
51: }
52: #container {
53: margin: 10px;
54: border: 1px solid #D0D0D0;
55: box-shadow: 0 0 8px #D0D0D0;
56: }
57: </style>
58: </head>
59: <body>
60: <div id="container">
61: <h1>Contact Nana Jaya Tours and Travel</h1>
62: <div id="body">
63: <h3>Contact Us</h3>
64: <table>
65: <thead>
66: </thead>
67: <tbody>
68: <tr>
69: <td>Nama</td>
70: <td>:</td>
71: <td>Nitama Nurlingga Yotifa</td>
72: </tr>
73: <tr>
74: <td>Email</td>
75: <td>:</td>
76: <td>nurlingganitama@gmail.com</td>
77: </tr>
78: <tr>
79: <td>HP / WA</td>
80: <td>:</td>
81: <td>085735662849</td>
82: </tr>
83: <tr>
84: <td>Web/Homepage</td>
85: <td>:</td>
86: <td>nitamanurlingga.blogspot.com</td>
87: </tr>
88: </tbody>
89: </table>
90: </div>
91: <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
92: </div>
93: </body>
94: </html>
Tampilan Halaman Contact |
Komentar
Posting Komentar