├── ci
├── application
│ ├── .htaccess
│ ├── cache
│ │ ├── .htaccess
│ │ └── index.html
│ ├── views
│ │ ├── errors
│ │ │ ├── cli
│ │ │ │ ├── error_404.php
│ │ │ │ ├── error_general.php
│ │ │ │ ├── error_db.php
│ │ │ │ ├── index.html
│ │ │ │ ├── error_php.php
│ │ │ │ └── error_exception.php
│ │ │ ├── index.html
│ │ │ └── html
│ │ │ │ ├── index.html
│ │ │ │ ├── error_php.php
│ │ │ │ ├── error_exception.php
│ │ │ │ ├── error_general.php
│ │ │ │ ├── error_db.php
│ │ │ │ └── error_404.php
│ │ ├── index.html
│ │ ├── daerah.php
│ │ └── welcome_message.php
│ ├── index.html
│ ├── core
│ │ └── index.html
│ ├── hooks
│ │ └── index.html
│ ├── logs
│ │ └── index.html
│ ├── config
│ │ ├── index.html
│ │ ├── hooks.php
│ │ ├── profiler.php
│ │ ├── memcached.php
│ │ ├── routes.php
│ │ ├── doctypes.php
│ │ ├── foreign_chars.php
│ │ ├── migration.php
│ │ ├── smileys.php
│ │ ├── autoload.php
│ │ ├── constants.php
│ │ ├── database.php
│ │ ├── user_agents.php
│ │ ├── mimes.php
│ │ └── config.php
│ ├── helpers
│ │ └── index.html
│ ├── language
│ │ ├── index.html
│ │ └── english
│ │ │ └── index.html
│ ├── libraries
│ │ └── index.html
│ ├── models
│ │ ├── index.html
│ │ └── Daerah_model.php
│ ├── controllers
│ │ ├── index.html
│ │ ├── Welcome.php
│ │ └── Daerah.php
│ └── third_party
│ │ └── index.html
├── .gitignore
├── .htaccess
├── ajax_daerah.js
└── index.php
├── .gitattributes
├── koneksi.php
├── select_daerah.php
├── index.php
├── db_wilayah_to_db_daerah.sql
├── README.md
└── ajax_daerah.js
/ci/application/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Require all denied
3 |
4 |
5 | Deny from all
6 |
--------------------------------------------------------------------------------
/ci/application/cache/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Require all denied
3 |
4 |
5 | Deny from all
6 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.php linguist-detectable=true
2 | *.sql linguist-detectable=true
3 | *.js linguist-detectable=false
4 | *.html linguist-detectable=false
5 | *.xml linguist-detectable=false
6 |
--------------------------------------------------------------------------------
/ci/application/views/errors/cli/error_404.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/views/errors/cli/error_db.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/core/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/hooks/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/logs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/views/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/config/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/helpers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/language/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/libraries/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/models/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/controllers/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/third_party/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/views/errors/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/language/english/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/views/errors/cli/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ci/application/views/errors/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 403 Forbidden
5 |
6 |
7 |
8 | Directory access is forbidden.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/koneksi.php:
--------------------------------------------------------------------------------
1 | getMessage();
11 | }
--------------------------------------------------------------------------------
/ci/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | system/*
4 |
5 | application/cache/*
6 | !application/cache/index.html
7 | !application/cache/.htaccess
8 |
9 | application/logs/*
10 | !application/logs/index.html
11 | !application/logs/.htaccess
12 |
13 | # IDE Files
14 | #-------------------------
15 | /nbproject/
16 | .idea/*
17 |
18 | ## Sublime Text cache files
19 | *.tmlanguage.cache
20 | *.tmPreferences.cache
21 | *.stTheme.cache
22 | *.sublime-workspace
23 | *.sublime-project
24 |
--------------------------------------------------------------------------------
/ci/application/config/hooks.php:
--------------------------------------------------------------------------------
1 | array(
15 | 'hostname' => '127.0.0.1',
16 | 'port' => '11211',
17 | 'weight' => '1',
18 | ),
19 | );
20 |
--------------------------------------------------------------------------------
/ci/.htaccess:
--------------------------------------------------------------------------------
1 | Options -Indexes
2 |
3 |
4 |
5 | RewriteEngine On
6 | RewriteBase /daerah/ci
7 |
8 | # Force to exclude the trailing slash
9 | RewriteCond %{REQUEST_FILENAME} !-d
10 | RewriteCond %{REQUEST_URI} (.*)/$
11 | RewriteRule ^(.+)/$ $1 [R=307,L]
12 |
13 | # Restrict php files direct access
14 | RewriteCond %{THE_REQUEST} ^.+?\ [^?]+\.php[?\ ]
15 | RewriteRule \.php$ - [F]
16 |
17 | # Allow any files or directories that exist to be displayed directly
18 | RewriteCond %{REQUEST_FILENAME} !-f
19 | RewriteCond %{REQUEST_FILENAME} !-d
20 |
21 | RewriteRule ^(.*)$ index.php?$1 [QSA,L]
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ci/application/controllers/Welcome.php:
--------------------------------------------------------------------------------
1 |
19 | * @see http://codeigniter.com/user_guide/general/urls.html
20 | */
21 | public function index()
22 | {
23 | $this->load->view('welcome_message');
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ci/application/views/errors/cli/error_php.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | A PHP Error was encountered
4 |
5 | Severity:
6 | Message:
7 | Filename:
8 | Line Number:
9 |
10 |
11 |
12 | Backtrace:
13 |
14 |
15 | File:
16 | Line:
17 | Function:
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ci/application/views/errors/cli/error_exception.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | An uncaught Exception was encountered
4 |
5 | Type:
6 | Message:
7 | Filename: getFile(), "\n"; ?>
8 | Line Number: getLine(); ?>
9 |
10 |
11 |
12 | Backtrace:
13 | getTrace() as $error): ?>
14 |
15 | File:
16 | Line:
17 | Function:
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ci/application/views/errors/html/error_php.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
A PHP Error was encountered
8 |
9 |
Severity:
10 |
Message:
11 |
Filename:
12 |
Line Number:
13 |
14 |
15 |
16 |
Backtrace:
17 |
18 |
19 |
20 |
21 |
22 | File:
23 | Line:
24 | Function:
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ci/application/models/Daerah_model.php:
--------------------------------------------------------------------------------
1 | db->query($sql);
14 | return $query->result();
15 | }
16 |
17 | public function getKab($id_prov)
18 | {
19 | $sql="SELECT * FROM kabupaten WHERE id_prov={$id_prov} ORDER BY nama";
20 | $query=$this->db->query($sql);
21 | return $query->result();
22 | }
23 |
24 | public function getKec($id_kab)
25 | {
26 | $sql="SELECT * FROM kecamatan WHERE id_kab={$id_kab} ORDER BY nama";
27 | $query=$this->db->query($sql);
28 | return $query->result();
29 | }
30 |
31 | public function getKel($id_kec)
32 | {
33 | $sql="SELECT * FROM kelurahan WHERE id_kec={$id_kec} ORDER BY nama";
34 | $query=$this->db->query($sql);
35 | return $query->result();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ci/application/views/errors/html/error_exception.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
An uncaught Exception was encountered
8 |
9 |
Type:
10 |
Message:
11 |
Filename: getFile(); ?>
12 |
Line Number: getLine(); ?>
13 |
14 |
15 |
16 |
Backtrace:
17 | getTrace() as $error): ?>
18 |
19 |
20 |
21 |
22 | File:
23 | Line:
24 | Function:
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/select_daerah.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT * FROM kabupaten WHERE id_prov=:prop ORDER BY nama");
6 | $query->execute(array(':prop'=>$_GET['prop']));
7 | echo"";
8 | while($d = $query->fetchObject()){
9 | echo "";
10 | }
11 | }
12 | }
13 | if (!empty($_GET['kab'])){
14 | if (ctype_digit($_GET['kab'])) {
15 | $query = $db->prepare("SELECT * FROM kecamatan WHERE id_kab=:kab ORDER BY nama");
16 | $query->execute(array(':kab'=>$_GET['kab']));
17 | echo"";
18 | while($d = $query->fetchObject()){
19 | echo "";
20 | }
21 | }
22 | }
23 | if (!empty($_GET['kec'])){
24 | if (ctype_digit($_GET['kec'])) {
25 | $query = $db->prepare("SELECT * FROM kelurahan WHERE id_kec=:kec ORDER BY nama");
26 | $query->execute(array(':kec'=>$_GET['kec']));
27 | echo"";
28 | while($d = $query->fetchObject()){
29 | echo "";
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/ci/application/controllers/Daerah.php:
--------------------------------------------------------------------------------
1 | load->model('Daerah_model','daerah');
10 | $this->load->database();
11 | }
12 |
13 | public function index()
14 | {
15 | $data['provinsi']=$this->daerah->getProv();
16 | $this->load->view('daerah',$data);
17 | }
18 |
19 | public function getKab($id_prov)
20 | {
21 | $kab=$this->daerah->getKab($id_prov);
22 | echo"";
23 | foreach($kab as $k){
24 | echo "";
25 | }
26 | }
27 |
28 | public function getKec($id_kab)
29 | {
30 | $kec=$this->daerah->getKec($id_kab);
31 | echo"";
32 | foreach($kec as $k){
33 | echo "";
34 | }
35 | }
36 |
37 | public function getKel($id_kec)
38 | {
39 | $kel=$this->daerah->getKel($id_kec);
40 | echo"";
41 | foreach($kel as $k){
42 | echo "";
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/ci/application/views/errors/html/error_general.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Error
8 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/ci/application/views/errors/html/error_db.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Database Error
8 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/ci/application/views/errors/html/error_404.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | 404 Page Not Found
8 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/ci/application/views/daerah.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Daerah
5 |
10 |
11 |
12 |
13 |
14 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Daerah
5 |
10 |
11 |
12 |
13 |
14 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/ci/application/config/routes.php:
--------------------------------------------------------------------------------
1 | my_controller/index
50 | | my-controller/my-method -> my_controller/my_method
51 | */
52 | $route['default_controller'] = 'welcome';
53 | $route['404_override'] = '';
54 | $route['translate_uri_dashes'] = FALSE;
55 |
--------------------------------------------------------------------------------
/db_wilayah_to_db_daerah.sql:
--------------------------------------------------------------------------------
1 | -- KONVERSI DARI DB wilayah KE DB daerah
2 | -- created by CAHYA DSN 2022-06-17
3 |
4 | -- [1] CREATE dan INSERT tabel `wilayah` dari repo https://github.com/cahyadsn/wilayah/blob/master/wilayah.sql
5 | -- [2] Jalankan query berikut:
6 |
7 | DROP TABLE IF EXISTS provinsi;
8 | CREATE TABLE IF NOT EXISTS provinsi (
9 | id_prov char(2) NOT NULL,
10 | nama tinytext NOT NULL,
11 | PRIMARY KEY (id_prov)
12 | );
13 |
14 | -- TRUNCATE TABLE provinsi;
15 | INSERT INTO provinsi(id_prov,nama)
16 | SELECT
17 | kode AS id_prov,
18 | nama
19 | FROM wilayah
20 | WHERE LENGTH(kode)=2
21 | ORDER BY kode;
22 |
23 | DROP TABLE IF EXISTS kabupaten;
24 | CREATE TABLE IF NOT EXISTS kabupaten (
25 | id_kab char(4) NOT NULL,
26 | id_prov char(2) NOT NULL,
27 | nama tinytext NOT NULL,
28 | id_jenis int(11) NOT NULL,
29 | PRIMARY KEY (id_kab)
30 | );
31 |
32 | -- TRUNCATE TABLE kabupaten;
33 | INSERT INTO kabupaten (id_kab, id_prov, nama, id_jenis)
34 | SELECT
35 | REPLACE(kode,'.','') AS id_kab,
36 | LEFT(kode,2) AS id_prov,
37 | nama,
38 | IF(SUBSTR(kode,4,1)='7',2,1) AS id_jenis
39 | FROM wilayah
40 | WHERE LENGTH(kode)=5
41 | ORDER BY kode;
42 |
43 | DROP TABLE IF EXISTS kecamatan;
44 | CREATE TABLE IF NOT EXISTS kecamatan (
45 | id_kec char(6) NOT NULL,
46 | id_kab char(4) NOT NULL,
47 | nama tinytext NOT NULL,
48 | PRIMARY KEY (id_kec)
49 | );
50 |
51 | -- TRUNCATE TABLE kecamatan;
52 | INSERT INTO kecamatan (id_kec, id_kab, nama)
53 | SELECT
54 | REPLACE(kode,'.','') AS id_kec,
55 | REPLACE(LEFT(kode,5),'.','') AS id_kab,
56 | nama
57 | FROM wilayah
58 | WHERE LENGTH(kode)=8
59 | ORDER BY kode;
60 |
61 | DROP TABLE IF EXISTS kelurahan;
62 | CREATE TABLE IF NOT EXISTS kelurahan (
63 | id_kel char(10) NOT NULL,
64 | id_kec char(6) DEFAULT NULL,
65 | nama tinytext,
66 | id_jenis int(11) NOT NULL,
67 | PRIMARY KEY (id_kel)
68 | );
69 |
70 | -- TRUNCATE TABLE kelurahan;
71 | INSERT INTO kelurahan (id_kel, id_kec, nama, id_jenis)
72 | SELECT
73 | REPLACE(kode,'.','') AS id_kel,
74 | REPLACE(LEFT(kode,8),'.','') AS id_kec,
75 | nama,
76 | IF(SUBSTR(kode,10,1)='2',3,4) AS id_jenis
77 | FROM wilayah
78 | WHERE LENGTH(kode)=13
79 | ORDER BY kode;
80 |
--------------------------------------------------------------------------------
/ci/application/views/welcome_message.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | Welcome to CodeIgniter
8 |
9 |
67 |
68 |
69 |
70 |
71 |
Welcome to CodeIgniter!
72 |
73 |
74 |
The page you are looking at is being generated dynamically by CodeIgniter.
75 |
76 |
If you would like to edit this page you'll find it located at:
77 |
application/views/welcome_message.php
78 |
79 |
The corresponding controller for this page is found at:
80 |
application/controllers/Welcome.php
81 |
82 |
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/ci/application/config/doctypes.php:
--------------------------------------------------------------------------------
1 | '',
6 | 'xhtml1-strict' => '',
7 | 'xhtml1-trans' => '',
8 | 'xhtml1-frame' => '',
9 | 'xhtml-basic11' => '',
10 | 'html5' => '',
11 | 'html4-strict' => '',
12 | 'html4-trans' => '',
13 | 'html4-frame' => '',
14 | 'mathml1' => '',
15 | 'mathml2' => '',
16 | 'svg10' => '',
17 | 'svg11' => '',
18 | 'svg11-basic' => '',
19 | 'svg11-tiny' => '',
20 | 'xhtml-math-svg-xh' => '',
21 | 'xhtml-math-svg-sh' => '',
22 | 'xhtml-rdfa-1' => '',
23 | 'xhtml-rdfa-2' => ''
24 | );
25 |
--------------------------------------------------------------------------------
/ci/application/config/foreign_chars.php:
--------------------------------------------------------------------------------
1 | 'ae',
14 | '/ö|œ/' => 'oe',
15 | '/ü/' => 'ue',
16 | '/Ä/' => 'Ae',
17 | '/Ü/' => 'Ue',
18 | '/Ö/' => 'Oe',
19 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
20 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
21 | '/Б/' => 'B',
22 | '/б/' => 'b',
23 | '/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
24 | '/ç|ć|ĉ|ċ|č/' => 'c',
25 | '/Д/' => 'D',
26 | '/д/' => 'd',
27 | '/Ð|Ď|Đ|Δ/' => 'Dj',
28 | '/ð|ď|đ|δ/' => 'dj',
29 | '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
30 | '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
31 | '/Ф/' => 'F',
32 | '/ф/' => 'f',
33 | '/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
34 | '/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
35 | '/Ĥ|Ħ/' => 'H',
36 | '/ĥ|ħ/' => 'h',
37 | '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
38 | '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
39 | '/Ĵ/' => 'J',
40 | '/ĵ/' => 'j',
41 | '/Ķ|Κ|К/' => 'K',
42 | '/ķ|κ|к/' => 'k',
43 | '/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
44 | '/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
45 | '/М/' => 'M',
46 | '/м/' => 'm',
47 | '/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
48 | '/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
49 | '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
50 | '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
51 | '/П/' => 'P',
52 | '/п/' => 'p',
53 | '/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
54 | '/ŕ|ŗ|ř|ρ|р/' => 'r',
55 | '/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
56 | '/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
57 | '/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T',
58 | '/ț|ţ|ť|ŧ|т/' => 't',
59 | '/Þ|þ/' => 'th',
60 | '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
61 | '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
62 | '/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
63 | '/ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
64 | '/В/' => 'V',
65 | '/в/' => 'v',
66 | '/Ŵ/' => 'W',
67 | '/ŵ/' => 'w',
68 | '/Ź|Ż|Ž|Ζ|З/' => 'Z',
69 | '/ź|ż|ž|ζ|з/' => 'z',
70 | '/Æ|Ǽ/' => 'AE',
71 | '/ß/' => 'ss',
72 | '/IJ/' => 'IJ',
73 | '/ij/' => 'ij',
74 | '/Œ/' => 'OE',
75 | '/ƒ/' => 'f',
76 | '/ξ/' => 'ks',
77 | '/π/' => 'p',
78 | '/β/' => 'v',
79 | '/μ/' => 'm',
80 | '/ψ/' => 'ps',
81 | '/Ё/' => 'Yo',
82 | '/ё/' => 'yo',
83 | '/Є/' => 'Ye',
84 | '/є/' => 'ye',
85 | '/Ї/' => 'Yi',
86 | '/Ж/' => 'Zh',
87 | '/ж/' => 'zh',
88 | '/Х/' => 'Kh',
89 | '/х/' => 'kh',
90 | '/Ц/' => 'Ts',
91 | '/ц/' => 'ts',
92 | '/Ч/' => 'Ch',
93 | '/ч/' => 'ch',
94 | '/Ш/' => 'Sh',
95 | '/ш/' => 'sh',
96 | '/Щ/' => 'Shch',
97 | '/щ/' => 'shch',
98 | '/Ъ|ъ|Ь|ь/' => '',
99 | '/Ю/' => 'Yu',
100 | '/ю/' => 'yu',
101 | '/Я/' => 'Ya',
102 | '/я/' => 'ya'
103 | );
104 |
--------------------------------------------------------------------------------
/ci/application/config/migration.php:
--------------------------------------------------------------------------------
1 | migration->current() this is the version that schema will
69 | | be upgraded / downgraded to.
70 | |
71 | */
72 | $config['migration_version'] = 0;
73 |
74 | /*
75 | |--------------------------------------------------------------------------
76 | | Migrations Path
77 | |--------------------------------------------------------------------------
78 | |
79 | | Path to your migrations folder.
80 | | Typically, it will be within your application path.
81 | | Also, writing permission is required within the migrations path.
82 | |
83 | */
84 | $config['migration_path'] = APPPATH.'migrations/';
85 |
--------------------------------------------------------------------------------
/ci/application/config/smileys.php:
--------------------------------------------------------------------------------
1 | array('grin.gif', '19', '19', 'grin'),
21 | ':lol:' => array('lol.gif', '19', '19', 'LOL'),
22 | ':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
23 | ':)' => array('smile.gif', '19', '19', 'smile'),
24 | ';-)' => array('wink.gif', '19', '19', 'wink'),
25 | ';)' => array('wink.gif', '19', '19', 'wink'),
26 | ':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
27 | ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
28 | ':-S' => array('confused.gif', '19', '19', 'confused'),
29 | ':wow:' => array('surprise.gif', '19', '19', 'surprised'),
30 | ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
31 | ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
32 | '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
33 | ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
34 | ':P' => array('raspberry.gif', '19', '19', 'raspberry'),
35 | ':blank:' => array('blank.gif', '19', '19', 'blank stare'),
36 | ':long:' => array('longface.gif', '19', '19', 'long face'),
37 | ':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
38 | ':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
39 | ':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
40 | '8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
41 | ':down:' => array('downer.gif', '19', '19', 'downer'),
42 | ':red:' => array('embarrassed.gif', '19', '19', 'red face'),
43 | ':sick:' => array('sick.gif', '19', '19', 'sick'),
44 | ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
45 | ':-/' => array('hmm.gif', '19', '19', 'hmmm'),
46 | '>:(' => array('mad.gif', '19', '19', 'mad'),
47 | ':mad:' => array('mad.gif', '19', '19', 'mad'),
48 | '>:-(' => array('angry.gif', '19', '19', 'angry'),
49 | ':angry:' => array('angry.gif', '19', '19', 'angry'),
50 | ':zip:' => array('zip.gif', '19', '19', 'zipper'),
51 | ':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
52 | ':ahhh:' => array('shock.gif', '19', '19', 'shock'),
53 | ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
54 | ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
55 | ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
56 | ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
57 | ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
58 | ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
59 | ':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
60 | ':snake:' => array('snake.gif', '19', '19', 'snake'),
61 | ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
62 | ':question:' => array('question.gif', '19', '19', 'question')
63 |
64 | );
65 |
--------------------------------------------------------------------------------
/ci/application/config/autoload.php:
--------------------------------------------------------------------------------
1 | 'ua');
60 | */
61 | $autoload['libraries'] = array();
62 |
63 | /*
64 | | -------------------------------------------------------------------
65 | | Auto-load Drivers
66 | | -------------------------------------------------------------------
67 | | These classes are located in system/libraries/ or in your
68 | | application/libraries/ directory, but are also placed inside their
69 | | own subdirectory and they extend the CI_Driver_Library class. They
70 | | offer multiple interchangeable driver options.
71 | |
72 | | Prototype:
73 | |
74 | | $autoload['drivers'] = array('cache');
75 | */
76 | $autoload['drivers'] = array();
77 |
78 | /*
79 | | -------------------------------------------------------------------
80 | | Auto-load Helper Files
81 | | -------------------------------------------------------------------
82 | | Prototype:
83 | |
84 | | $autoload['helper'] = array('url', 'file');
85 | */
86 | $autoload['helper'] = array();
87 |
88 | /*
89 | | -------------------------------------------------------------------
90 | | Auto-load Config files
91 | | -------------------------------------------------------------------
92 | | Prototype:
93 | |
94 | | $autoload['config'] = array('config1', 'config2');
95 | |
96 | | NOTE: This item is intended for use ONLY if you have created custom
97 | | config files. Otherwise, leave it blank.
98 | |
99 | */
100 | $autoload['config'] = array();
101 |
102 | /*
103 | | -------------------------------------------------------------------
104 | | Auto-load Language files
105 | | -------------------------------------------------------------------
106 | | Prototype:
107 | |
108 | | $autoload['language'] = array('lang1', 'lang2');
109 | |
110 | | NOTE: Do not include the "_lang" part of your file. For example
111 | | "codeigniter_lang.php" would be referenced as array('codeigniter');
112 | |
113 | */
114 | $autoload['language'] = array();
115 |
116 | /*
117 | | -------------------------------------------------------------------
118 | | Auto-load Models
119 | | -------------------------------------------------------------------
120 | | Prototype:
121 | |
122 | | $autoload['model'] = array('first_model', 'second_model');
123 | |
124 | | You can also supply an alternative model name to be assigned
125 | | in the controller:
126 | |
127 | | $autoload['model'] = array('first_model' => 'first');
128 | */
129 | $autoload['model'] = array();
130 |
--------------------------------------------------------------------------------
/ci/application/config/constants.php:
--------------------------------------------------------------------------------
1 | db->last_query() and profiling of DB queries.
62 | | When you run a query, with this setting set to TRUE (default),
63 | | CodeIgniter will store the SQL statement for debugging purposes.
64 | | However, this may cause high memory usage, especially if you run
65 | | a lot of SQL queries ... disable this to avoid that problem.
66 | |
67 | | The $active_group variable lets you choose which connection group to
68 | | make active. By default there is only one group (the 'default' group).
69 | |
70 | | The $query_builder variables lets you determine whether or not to load
71 | | the query builder class.
72 | */
73 | $active_group = 'default';
74 | $query_builder = TRUE;
75 |
76 | $db['default'] = array(
77 | 'dsn' => '',
78 | 'hostname' => 'localhost',
79 | 'username' => 'root',
80 | 'password' => '',
81 | 'database' => 'db_daerah',
82 | 'dbdriver' => 'mysqli',
83 | 'dbprefix' => '',
84 | 'pconnect' => FALSE,
85 | 'db_debug' => (ENVIRONMENT !== 'production'),
86 | 'cache_on' => FALSE,
87 | 'cachedir' => '',
88 | 'char_set' => 'utf8',
89 | 'dbcollat' => 'utf8_general_ci',
90 | 'swap_pre' => '',
91 | 'encrypt' => FALSE,
92 | 'compress' => FALSE,
93 | 'stricton' => FALSE,
94 | 'failover' => array(),
95 | 'save_queries' => TRUE
96 | );
97 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | daerah
2 | ======
3 | > repo ini sudah deprecated, versi yang sudah sesuai dengan Kepmendagri No 100.1.1-6117 tahun 2022 ada di https://github.com/cahyadsn/wilayah
4 |
5 | )* karena adanya perbedaan struktur db/table antara repo wilayah [https://github.com/cahyadsn/wilayah] dengan struktur tabel di repo daerah ini, maka ditambahkan query untuk konversinya di file db_wilayah_to_db_daerah.sql (konversi dari data wilayah ke daerah)
6 |
7 | Menampilkan data provinsi,kota/kabupaten,kecamatan dan desa/kelurahan menggunakan AjAX
8 |
9 | [](LICENSE)
10 | [](https://github.com/cahyadsn/daerah/issues)
11 | [](https://github.com/cahyadsn/daerah/network)
12 | [](https://github.com/cahyadsn/daerah/stargazers)
13 |
14 | Database Data dan Kode Wilayah Administrasi Pemerintahan sesuai Permendagri No 58 Tahun 2021 dengan revisi berdasarkan Kepmendagrin No 050-145 Tahun 2022
15 |
16 | | id_prov | nama | kab | kota | kec | kel | desa | pulau |
17 | |---------|---------------------------|-----:|-----:|-----|-----:|-----:|------:|
18 | | 11 | Aceh* | 18 | 5 | 290 | 0 | 6497 | 363 |
19 | | 12 | Sumatera Utara* | 25 | 8 | 455 | 693 | 5417 | 229 |
20 | | 13 | Sumatera Barat* | 12 | 7 | 179 | 230 | 929 | 218 |
21 | | 14 | Riau* | 10 | 2 | 172 | 271 | 1591 | 144 |
22 | | 15 | Jambi* | 9 | 2 | 144 | 165 | 1399 | 14 |
23 | | 16 | Sumatera Selatan* | 13 | 4 | 241 | 395 | 2853 | 24 |
24 | | 17 | Bengkulu* | 9 | 1 | 129 | 172 | 1341 | 9 |
25 | | 18 | Lampung* | 13 | 2 | 229 | 205 | 2435 | 172 |
26 | | 19 | Kepulauan Bangka Belitung*| 6 | 1 | 47 | 84 | 309 | 507 |
27 | | 21 | Kepulauan Riau* | 5 | 2 | 76 | 142 | 275 | 2025 |
28 | | 31 | DKI Jakarta | 1 | 5 | 44 | 267 | 0 | 113 |
29 | | 32 | Jawa Barat | 18 | 9 | 627 | 645 | 5312 | 30 |
30 | | 33 | Jawa Tengah | 29 | 6 | 576 | 753 | 7809 | 71 |
31 | | 34 | DI Yogyakarta | 4 | 1 | 78 | 46 | 392 | 33 |
32 | | 35 | Jawa Timur | 29 | 9 | 666 | 777 | 7724 | 504 |
33 | | 36 | Banten* | 4 | 4 | 155 | 314 | 1238 | 81 |
34 | | 51 | Bali | 8 | 1 | 57 | 80 | 636 | 34 |
35 | | 52 | Nusa Tenggara Barat | 8 | 2 | 117 | 145 | 1005 | 403 |
36 | | 53 | Nusa Tenggara Timur* | 21 | 1 | 315 | 327 | 3026 | 600 |
37 | | 61 | Kalimantan Barat | 12 | 2 | 174 | 99 | 2031 | 249 |
38 | | 62 | Kalimantan Tengah* | 13 | 1 | 136 | 139 | 1432 | 69 |
39 | | 63 | Kalimantan Selatan* | 11 | 2 | 156 | 144 | 1864 | 158 |
40 | | 64 | Kalimantan Timur* | 7 | 3 | 105 | 197 | 841 | 243 |
41 | | 65 | Kalimantan Utara* | 4 | 1 | 55 | 35 | 447 | 196 |
42 | | 71 | Sulawesi Utara | 11 | 4 | 171 | 332 | 1507 | 329 |
43 | | 72 | Sulawesi Tengah | 12 | 1 | 175 | 175 | 1842 | 1572 |
44 | | 73 | Sulawesi Selatan* | 21 | 3 | 311 | 793 | 2255 | 355 |
45 | | 74 | Sulawesi Tenggara* | 15 | 2 | 220 | 378 | 1908 | 590 |
46 | | 75 | Gorontalo | 5 | 1 | 77 | 72 | 657 | 127 |
47 | | 76 | Sulawesi Barat | 6 | 0 | 69 | 73 | 575 | 69 |
48 | | 81 | Maluku | 9 | 2 | 118 | 35 | 1198 | 1337 |
49 | | 82 | Maluku Utara* | 8 | 2 | 118 | 118 | 1063 | 837 |
50 | | 91 | Papua* | 28 | 1 | 566 | 110 | 5411 | 547 |
51 | | 92 | Papua Barat | 12 | 1 | 218 | 95 | 1742 | 4514 |
52 | | | TOTAL* | 416 | 98 |7266 | 8506 |74961 | 16772 |
53 |
54 | )* data mengalami perubahan dari data sebelumnya (data permendagri No 72 Tahun 2019/Kepmendagri No.146.1-4717 Tahun 2020)
55 |
56 | ) ** Jumlah pulau termasuk 6 pulau besar ( Sumatera, Jawa, Kalimantan, Sulawesi, Timor, dan Papua
57 |
58 | link demo tidak tersedia, demo untuk __wilayah__ (https://github.com/cahyadsn/wilayah) bisa dilihat [di sini]
59 |
60 | penambahan versi codeigniter memakai codeigniter 3.0
61 |
62 |
63 | ## DONASI
64 | untuk donasi via [paypal], atau bank syariah indonesia (BSI) 821 342 5550
65 |
66 |
67 | [paypal]: https://paypal.me/cahyadwiana
68 | [di sini]: http://wilayah.cahyadsn.com/v2.4/
69 |
--------------------------------------------------------------------------------
/ci/ajax_daerah.js:
--------------------------------------------------------------------------------
1 | var ajaxku=buatajax();
2 | function ajaxkota(id){
3 | var url="daerah/getKab/"+id+"/"+Math.random();
4 | ajaxku.onreadystatechange=stateChanged;
5 | ajaxku.open("GET",url,true);
6 | ajaxku.send(null);
7 | }
8 |
9 | function ajaxkec(id){
10 | var url="daerah/getKec/"+id+"/"+Math.random();
11 | ajaxku.onreadystatechange=stateChangedKec;
12 | ajaxku.open("GET",url,true);
13 | ajaxku.send(null);
14 | }
15 |
16 | function ajaxkel(id){
17 | var url="daerah/getKel/"+id+"/"+Math.random();
18 | ajaxku.onreadystatechange=stateChangedKel;
19 | ajaxku.open("GET",url,true);
20 | ajaxku.send(null);
21 | }
22 |
23 | function buatajax(){
24 | if (window.XMLHttpRequest){
25 | return new XMLHttpRequest();
26 | }
27 | if (window.ActiveXObject){
28 | return new ActiveXObject("Microsoft.XMLHTTP");
29 | }
30 | return null;
31 | }
32 | function stateChanged(){
33 | var data;
34 | if (ajaxku.readyState==4){
35 | data=ajaxku.responseText;
36 | if(data.length>=0){
37 | document.getElementById("kota").innerHTML = data
38 | }else{
39 | document.getElementById("kota").value = "";
40 | }
41 | document.getElementById("kab_box").style.display='table-row';
42 | document.getElementById("kec_box").style.display='none';
43 | document.getElementById("kel_box").style.display='none';
44 | document.getElementById("lat_box").style.display='none';
45 | document.getElementById("lng_box").style.display='none';
46 | }
47 | }
48 |
49 | function stateChangedKec(){
50 | var data;
51 | if (ajaxku.readyState==4){
52 | data=ajaxku.responseText;
53 | if(data.length>=0){
54 | document.getElementById("kec").innerHTML = data
55 | }else{
56 | document.getElementById("kec").value = "";
57 | }
58 | document.getElementById("kec_box").style.display='table-row';
59 | document.getElementById("kel_box").style.display='none';
60 | document.getElementById("lat_box").style.display='none';
61 | document.getElementById("lng_box").style.display='none';
62 | }
63 | }
64 |
65 | function stateChangedKel(){
66 | var data;
67 | if (ajaxku.readyState==4){
68 | data=ajaxku.responseText;
69 | if(data.length>=0){
70 | document.getElementById("kel").innerHTML = data
71 | }else{
72 | document.getElementById("kel").value = "";
73 | }
74 | document.getElementById("kel_box").style.display='table-row';
75 | document.getElementById("lat_box").style.display='none';
76 | document.getElementById("lng_box").style.display='none';
77 | }
78 | }
79 |
80 | var map;
81 | var geocoder;
82 | var marker;
83 | var markersArray = [];
84 | function initialize() {
85 | geocoder = new google.maps.Geocoder();
86 | var myLatlng =new google.maps.LatLng(-6.176655999999999, 106.83058389999997);
87 | var mapOptions = {
88 | center: myLatlng,
89 | zoom: 14
90 | };
91 | map = new google.maps.Map(document.getElementById('map-canvas'),mapOptions);
92 | marker = new google.maps.Marker({
93 | position: myLatlng,
94 | map: map,
95 | title: 'Jakarta'
96 | });
97 | markersArray.push(marker);
98 | google.maps.event.addListener(marker,"click",function(){});
99 | }
100 |
101 | function clearOverlays() {
102 | for (var i = 0; i < markersArray.length; i++ ) {
103 | markersArray[i].setMap(null);
104 | }
105 | markersArray.length = 0;
106 | }
107 |
108 | function showCoordinate(){
109 | var prop = document.getElementById("prop");
110 | var kab = document.getElementById("kota");
111 | var kec = document.getElementById("kec");
112 | var kel = document.getElementById("kel");
113 | var s = kel.options[kel.selectedIndex].text
114 | +', '
115 | +kec.options[kec.selectedIndex].text;
116 | s2= s
117 | +', '
118 | +kab.options[kab.selectedIndex].text
119 | +', '
120 | +prop.options[prop.selectedIndex].text;
121 | geocoder.geocode( { 'address': s}, function(results, status) {
122 | document.getElementById("lat_box").style.display='table-row';
123 | document.getElementById("lng_box").style.display='table-row';
124 | if (status == google.maps.GeocoderStatus.OK) {
125 | clearOverlays();
126 | var position=results[0].geometry.location;
127 | document.getElementById("lat").value=position.lat();
128 | document.getElementById("lng").value=position.lng();
129 | map.setCenter(results[0].geometry.location);
130 | marker = new google.maps.Marker({
131 | map: map,
132 | position: results[0].geometry.location,
133 | title:s2
134 | });
135 | markersArray.push(marker);
136 | google.maps.event.addListener(marker,"click",function(){});
137 | } else {
138 | alert('Geocode was not successful for the following reason: ' + status);
139 | }
140 | });
141 | }
142 | google.maps.event.addDomListener(window, 'load', initialize);
--------------------------------------------------------------------------------
/ajax_daerah.js:
--------------------------------------------------------------------------------
1 | var ajaxku=buatajax();
2 | function ajaxkota(id){
3 | var url="select_daerah.php?prop="+id+"&sid="+Math.random();
4 | ajaxku.onreadystatechange=stateChanged;
5 | ajaxku.open("GET",url,true);
6 | ajaxku.send(null);
7 | }
8 |
9 | function ajaxkec(id){
10 | var url="select_daerah.php?kab="+id+"&sid="+Math.random();
11 | ajaxku.onreadystatechange=stateChangedKec;
12 | ajaxku.open("GET",url,true);
13 | ajaxku.send(null);
14 | }
15 |
16 | function ajaxkel(id){
17 | var url="select_daerah.php?kec="+id+"&sid="+Math.random();
18 | ajaxku.onreadystatechange=stateChangedKel;
19 | ajaxku.open("GET",url,true);
20 | ajaxku.send(null);
21 | }
22 |
23 | function buatajax(){
24 | if (window.XMLHttpRequest){
25 | return new XMLHttpRequest();
26 | }
27 | if (window.ActiveXObject){
28 | return new ActiveXObject("Microsoft.XMLHTTP");
29 | }
30 | return null;
31 | }
32 | function stateChanged(){
33 | var data;
34 | if (ajaxku.readyState==4){
35 | data=ajaxku.responseText;
36 | if(data.length>=0){
37 | document.getElementById("kota").innerHTML = data
38 | }else{
39 | document.getElementById("kota").value = "";
40 | }
41 | document.getElementById("kab_box").style.display='table-row';
42 | document.getElementById("kec_box").style.display='none';
43 | document.getElementById("kel_box").style.display='none';
44 | document.getElementById("lat_box").style.display='none';
45 | document.getElementById("lng_box").style.display='none';
46 | }
47 | }
48 |
49 | function stateChangedKec(){
50 | var data;
51 | if (ajaxku.readyState==4){
52 | data=ajaxku.responseText;
53 | if(data.length>=0){
54 | document.getElementById("kec").innerHTML = data
55 | }else{
56 | document.getElementById("kec").value = "";
57 | }
58 | document.getElementById("kec_box").style.display='table-row';
59 | document.getElementById("kel_box").style.display='none';
60 | document.getElementById("lat_box").style.display='none';
61 | document.getElementById("lng_box").style.display='none';
62 | }
63 | }
64 |
65 | function stateChangedKel(){
66 | var data;
67 | if (ajaxku.readyState==4){
68 | data=ajaxku.responseText;
69 | if(data.length>=0){
70 | document.getElementById("kel").innerHTML = data
71 | }else{
72 | document.getElementById("kel").value = "";
73 | }
74 | document.getElementById("kel_box").style.display='table-row';
75 | document.getElementById("lat_box").style.display='none';
76 | document.getElementById("lng_box").style.display='none';
77 | }
78 | }
79 |
80 | var map;
81 | var geocoder;
82 | var marker;
83 | var markersArray = [];
84 | function initialize() {
85 | geocoder = new google.maps.Geocoder();
86 | var myLatlng =new google.maps.LatLng(-6.176655999999999, 106.83058389999997);
87 | var mapOptions = {
88 | center: myLatlng,
89 | zoom: 14
90 | };
91 | map = new google.maps.Map(document.getElementById('map-canvas'),mapOptions);
92 | marker = new google.maps.Marker({
93 | position: myLatlng,
94 | map: map,
95 | title: 'Jakarta'
96 | });
97 | markersArray.push(marker);
98 | google.maps.event.addListener(marker,"click",function(){});
99 | }
100 |
101 | function clearOverlays() {
102 | for (var i = 0; i < markersArray.length; i++ ) {
103 | markersArray[i].setMap(null);
104 | }
105 | markersArray.length = 0;
106 | }
107 |
108 | function showCoordinate(){
109 | var prop = document.getElementById("prop");
110 | var kab = document.getElementById("kota");
111 | var kec = document.getElementById("kec");
112 | var kel = document.getElementById("kel");
113 | var s = kel.options[kel.selectedIndex].text
114 | +', '
115 | +kec.options[kec.selectedIndex].text;
116 | s2= s
117 | +', '
118 | +kab.options[kab.selectedIndex].text
119 | +', '
120 | +prop.options[prop.selectedIndex].text;
121 | geocoder.geocode( { 'address': s}, function(results, status) {
122 | document.getElementById("lat_box").style.display='table-row';
123 | document.getElementById("lng_box").style.display='table-row';
124 | if (status == google.maps.GeocoderStatus.OK) {
125 | clearOverlays();
126 | var position=results[0].geometry.location;
127 | document.getElementById("lat").value=position.lat();
128 | document.getElementById("lng").value=position.lng();
129 | map.setCenter(results[0].geometry.location);
130 | marker = new google.maps.Marker({
131 | map: map,
132 | position: results[0].geometry.location,
133 | title:s2
134 | });
135 | markersArray.push(marker);
136 | google.maps.event.addListener(marker,"click",function(){});
137 | } else {
138 | alert('Geocode was not successful for the following reason: ' + status);
139 | }
140 | });
141 | }
142 | google.maps.event.addDomListener(window, 'load', initialize);
--------------------------------------------------------------------------------
/ci/application/config/user_agents.php:
--------------------------------------------------------------------------------
1 | 'Windows 10',
15 | 'windows nt 6.3' => 'Windows 8.1',
16 | 'windows nt 6.2' => 'Windows 8',
17 | 'windows nt 6.1' => 'Windows 7',
18 | 'windows nt 6.0' => 'Windows Vista',
19 | 'windows nt 5.2' => 'Windows 2003',
20 | 'windows nt 5.1' => 'Windows XP',
21 | 'windows nt 5.0' => 'Windows 2000',
22 | 'windows nt 4.0' => 'Windows NT 4.0',
23 | 'winnt4.0' => 'Windows NT 4.0',
24 | 'winnt 4.0' => 'Windows NT',
25 | 'winnt' => 'Windows NT',
26 | 'windows 98' => 'Windows 98',
27 | 'win98' => 'Windows 98',
28 | 'windows 95' => 'Windows 95',
29 | 'win95' => 'Windows 95',
30 | 'windows phone' => 'Windows Phone',
31 | 'windows' => 'Unknown Windows OS',
32 | 'android' => 'Android',
33 | 'blackberry' => 'BlackBerry',
34 | 'iphone' => 'iOS',
35 | 'ipad' => 'iOS',
36 | 'ipod' => 'iOS',
37 | 'os x' => 'Mac OS X',
38 | 'ppc mac' => 'Power PC Mac',
39 | 'freebsd' => 'FreeBSD',
40 | 'ppc' => 'Macintosh',
41 | 'linux' => 'Linux',
42 | 'debian' => 'Debian',
43 | 'sunos' => 'Sun Solaris',
44 | 'beos' => 'BeOS',
45 | 'apachebench' => 'ApacheBench',
46 | 'aix' => 'AIX',
47 | 'irix' => 'Irix',
48 | 'osf' => 'DEC OSF',
49 | 'hp-ux' => 'HP-UX',
50 | 'netbsd' => 'NetBSD',
51 | 'bsdi' => 'BSDi',
52 | 'openbsd' => 'OpenBSD',
53 | 'gnu' => 'GNU/Linux',
54 | 'unix' => 'Unknown Unix OS',
55 | 'symbian' => 'Symbian OS'
56 | );
57 |
58 |
59 | // The order of this array should NOT be changed. Many browsers return
60 | // multiple browser types so we want to identify the sub-type first.
61 | $browsers = array(
62 | 'OPR' => 'Opera',
63 | 'Flock' => 'Flock',
64 | 'Edge' => 'Spartan',
65 | 'Chrome' => 'Chrome',
66 | // Opera 10+ always reports Opera/9.80 and appends Version/ to the user agent string
67 | 'Opera.*?Version' => 'Opera',
68 | 'Opera' => 'Opera',
69 | 'MSIE' => 'Internet Explorer',
70 | 'Internet Explorer' => 'Internet Explorer',
71 | 'Trident.* rv' => 'Internet Explorer',
72 | 'Shiira' => 'Shiira',
73 | 'Firefox' => 'Firefox',
74 | 'Chimera' => 'Chimera',
75 | 'Phoenix' => 'Phoenix',
76 | 'Firebird' => 'Firebird',
77 | 'Camino' => 'Camino',
78 | 'Netscape' => 'Netscape',
79 | 'OmniWeb' => 'OmniWeb',
80 | 'Safari' => 'Safari',
81 | 'Mozilla' => 'Mozilla',
82 | 'Konqueror' => 'Konqueror',
83 | 'icab' => 'iCab',
84 | 'Lynx' => 'Lynx',
85 | 'Links' => 'Links',
86 | 'hotjava' => 'HotJava',
87 | 'amaya' => 'Amaya',
88 | 'IBrowse' => 'IBrowse',
89 | 'Maxthon' => 'Maxthon',
90 | 'Ubuntu' => 'Ubuntu Web Browser'
91 | );
92 |
93 | $mobiles = array(
94 | // legacy array, old values commented out
95 | 'mobileexplorer' => 'Mobile Explorer',
96 | // 'openwave' => 'Open Wave',
97 | // 'opera mini' => 'Opera Mini',
98 | // 'operamini' => 'Opera Mini',
99 | // 'elaine' => 'Palm',
100 | 'palmsource' => 'Palm',
101 | // 'digital paths' => 'Palm',
102 | // 'avantgo' => 'Avantgo',
103 | // 'xiino' => 'Xiino',
104 | 'palmscape' => 'Palmscape',
105 | // 'nokia' => 'Nokia',
106 | // 'ericsson' => 'Ericsson',
107 | // 'blackberry' => 'BlackBerry',
108 | // 'motorola' => 'Motorola'
109 |
110 | // Phones and Manufacturers
111 | 'motorola' => 'Motorola',
112 | 'nokia' => 'Nokia',
113 | 'palm' => 'Palm',
114 | 'iphone' => 'Apple iPhone',
115 | 'ipad' => 'iPad',
116 | 'ipod' => 'Apple iPod Touch',
117 | 'sony' => 'Sony Ericsson',
118 | 'ericsson' => 'Sony Ericsson',
119 | 'blackberry' => 'BlackBerry',
120 | 'cocoon' => 'O2 Cocoon',
121 | 'blazer' => 'Treo',
122 | 'lg' => 'LG',
123 | 'amoi' => 'Amoi',
124 | 'xda' => 'XDA',
125 | 'mda' => 'MDA',
126 | 'vario' => 'Vario',
127 | 'htc' => 'HTC',
128 | 'samsung' => 'Samsung',
129 | 'sharp' => 'Sharp',
130 | 'sie-' => 'Siemens',
131 | 'alcatel' => 'Alcatel',
132 | 'benq' => 'BenQ',
133 | 'ipaq' => 'HP iPaq',
134 | 'mot-' => 'Motorola',
135 | 'playstation portable' => 'PlayStation Portable',
136 | 'playstation 3' => 'PlayStation 3',
137 | 'playstation vita' => 'PlayStation Vita',
138 | 'hiptop' => 'Danger Hiptop',
139 | 'nec-' => 'NEC',
140 | 'panasonic' => 'Panasonic',
141 | 'philips' => 'Philips',
142 | 'sagem' => 'Sagem',
143 | 'sanyo' => 'Sanyo',
144 | 'spv' => 'SPV',
145 | 'zte' => 'ZTE',
146 | 'sendo' => 'Sendo',
147 | 'nintendo dsi' => 'Nintendo DSi',
148 | 'nintendo ds' => 'Nintendo DS',
149 | 'nintendo 3ds' => 'Nintendo 3DS',
150 | 'wii' => 'Nintendo Wii',
151 | 'open web' => 'Open Web',
152 | 'openweb' => 'OpenWeb',
153 |
154 | // Operating Systems
155 | 'android' => 'Android',
156 | 'symbian' => 'Symbian',
157 | 'SymbianOS' => 'SymbianOS',
158 | 'elaine' => 'Palm',
159 | 'series60' => 'Symbian S60',
160 | 'windows ce' => 'Windows CE',
161 |
162 | // Browsers
163 | 'obigo' => 'Obigo',
164 | 'netfront' => 'Netfront Browser',
165 | 'openwave' => 'Openwave Browser',
166 | 'mobilexplorer' => 'Mobile Explorer',
167 | 'operamini' => 'Opera Mini',
168 | 'opera mini' => 'Opera Mini',
169 | 'opera mobi' => 'Opera Mobile',
170 | 'fennec' => 'Firefox Mobile',
171 |
172 | // Other
173 | 'digital paths' => 'Digital Paths',
174 | 'avantgo' => 'AvantGo',
175 | 'xiino' => 'Xiino',
176 | 'novarra' => 'Novarra Transcoder',
177 | 'vodafone' => 'Vodafone',
178 | 'docomo' => 'NTT DoCoMo',
179 | 'o2' => 'O2',
180 |
181 | // Fallback
182 | 'mobile' => 'Generic Mobile',
183 | 'wireless' => 'Generic Mobile',
184 | 'j2me' => 'Generic Mobile',
185 | 'midp' => 'Generic Mobile',
186 | 'cldc' => 'Generic Mobile',
187 | 'up.link' => 'Generic Mobile',
188 | 'up.browser' => 'Generic Mobile',
189 | 'smartphone' => 'Generic Mobile',
190 | 'cellphone' => 'Generic Mobile'
191 | );
192 |
193 | // There are hundreds of bots but these are the most common.
194 | $robots = array(
195 | 'googlebot' => 'Googlebot',
196 | 'msnbot' => 'MSNBot',
197 | 'baiduspider' => 'Baiduspider',
198 | 'bingbot' => 'Bing',
199 | 'slurp' => 'Inktomi Slurp',
200 | 'yahoo' => 'Yahoo',
201 | 'ask jeeves' => 'Ask Jeeves',
202 | 'fastcrawler' => 'FastCrawler',
203 | 'infoseek' => 'InfoSeek Robot 1.0',
204 | 'lycos' => 'Lycos',
205 | 'yandex' => 'YandexBot',
206 | 'mediapartners-google' => 'MediaPartners Google',
207 | 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
208 | 'adsbot-google' => 'AdsBot Google',
209 | 'feedfetcher-google' => 'Feedfetcher Google',
210 | 'curious george' => 'Curious George'
211 | );
212 |
--------------------------------------------------------------------------------
/ci/application/config/mimes.php:
--------------------------------------------------------------------------------
1 | array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
14 | 'cpt' => 'application/mac-compactpro',
15 | 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
16 | 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
17 | 'dms' => 'application/octet-stream',
18 | 'lha' => 'application/octet-stream',
19 | 'lzh' => 'application/octet-stream',
20 | 'exe' => array('application/octet-stream', 'application/x-msdownload'),
21 | 'class' => 'application/octet-stream',
22 | 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
23 | 'so' => 'application/octet-stream',
24 | 'sea' => 'application/octet-stream',
25 | 'dll' => 'application/octet-stream',
26 | 'oda' => 'application/oda',
27 | 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
28 | 'ai' => array('application/pdf', 'application/postscript'),
29 | 'eps' => 'application/postscript',
30 | 'ps' => 'application/postscript',
31 | 'smi' => 'application/smil',
32 | 'smil' => 'application/smil',
33 | 'mif' => 'application/vnd.mif',
34 | 'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
35 | 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
36 | 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
37 | 'wbxml' => 'application/wbxml',
38 | 'wmlc' => 'application/wmlc',
39 | 'dcr' => 'application/x-director',
40 | 'dir' => 'application/x-director',
41 | 'dxr' => 'application/x-director',
42 | 'dvi' => 'application/x-dvi',
43 | 'gtar' => 'application/x-gtar',
44 | 'gz' => 'application/x-gzip',
45 | 'gzip' => 'application/x-gzip',
46 | 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
47 | 'php4' => 'application/x-httpd-php',
48 | 'php3' => 'application/x-httpd-php',
49 | 'phtml' => 'application/x-httpd-php',
50 | 'phps' => 'application/x-httpd-php-source',
51 | 'js' => array('application/x-javascript', 'text/plain'),
52 | 'swf' => 'application/x-shockwave-flash',
53 | 'sit' => 'application/x-stuffit',
54 | 'tar' => 'application/x-tar',
55 | 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
56 | 'z' => 'application/x-compress',
57 | 'xhtml' => 'application/xhtml+xml',
58 | 'xht' => 'application/xhtml+xml',
59 | 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
60 | 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
61 | 'mid' => 'audio/midi',
62 | 'midi' => 'audio/midi',
63 | 'mpga' => 'audio/mpeg',
64 | 'mp2' => 'audio/mpeg',
65 | 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
66 | 'aif' => array('audio/x-aiff', 'audio/aiff'),
67 | 'aiff' => array('audio/x-aiff', 'audio/aiff'),
68 | 'aifc' => 'audio/x-aiff',
69 | 'ram' => 'audio/x-pn-realaudio',
70 | 'rm' => 'audio/x-pn-realaudio',
71 | 'rpm' => 'audio/x-pn-realaudio-plugin',
72 | 'ra' => 'audio/x-realaudio',
73 | 'rv' => 'video/vnd.rn-realvideo',
74 | 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
75 | 'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
76 | 'gif' => 'image/gif',
77 | 'jpeg' => array('image/jpeg', 'image/pjpeg'),
78 | 'jpg' => array('image/jpeg', 'image/pjpeg'),
79 | 'jpe' => array('image/jpeg', 'image/pjpeg'),
80 | 'png' => array('image/png', 'image/x-png'),
81 | 'tiff' => 'image/tiff',
82 | 'tif' => 'image/tiff',
83 | 'css' => array('text/css', 'text/plain'),
84 | 'html' => array('text/html', 'text/plain'),
85 | 'htm' => array('text/html', 'text/plain'),
86 | 'shtml' => array('text/html', 'text/plain'),
87 | 'txt' => 'text/plain',
88 | 'text' => 'text/plain',
89 | 'log' => array('text/plain', 'text/x-log'),
90 | 'rtx' => 'text/richtext',
91 | 'rtf' => 'text/rtf',
92 | 'xml' => array('application/xml', 'text/xml', 'text/plain'),
93 | 'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
94 | 'mpeg' => 'video/mpeg',
95 | 'mpg' => 'video/mpeg',
96 | 'mpe' => 'video/mpeg',
97 | 'qt' => 'video/quicktime',
98 | 'mov' => 'video/quicktime',
99 | 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
100 | 'movie' => 'video/x-sgi-movie',
101 | 'doc' => array('application/msword', 'application/vnd.ms-office'),
102 | 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
103 | 'dot' => array('application/msword', 'application/vnd.ms-office'),
104 | 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
105 | 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
106 | 'word' => array('application/msword', 'application/octet-stream'),
107 | 'xl' => 'application/excel',
108 | 'eml' => 'message/rfc822',
109 | 'json' => array('application/json', 'text/json'),
110 | 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
111 | 'p10' => array('application/x-pkcs10', 'application/pkcs10'),
112 | 'p12' => 'application/x-pkcs12',
113 | 'p7a' => 'application/x-pkcs7-signature',
114 | 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
115 | 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
116 | 'p7r' => 'application/x-pkcs7-certreqresp',
117 | 'p7s' => 'application/pkcs7-signature',
118 | 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
119 | 'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
120 | 'der' => 'application/x-x509-ca-cert',
121 | 'kdb' => 'application/octet-stream',
122 | 'pgp' => 'application/pgp',
123 | 'gpg' => 'application/gpg-keys',
124 | 'sst' => 'application/octet-stream',
125 | 'csr' => 'application/octet-stream',
126 | 'rsa' => 'application/x-pkcs7',
127 | 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
128 | '3g2' => 'video/3gpp2',
129 | '3gp' => array('video/3gp', 'video/3gpp'),
130 | 'mp4' => 'video/mp4',
131 | 'm4a' => 'audio/x-m4a',
132 | 'f4v' => 'video/mp4',
133 | 'webm' => 'video/webm',
134 | 'aac' => 'audio/x-acc',
135 | 'm4u' => 'application/vnd.mpegurl',
136 | 'm3u' => 'text/plain',
137 | 'xspf' => 'application/xspf+xml',
138 | 'vlc' => 'application/videolan',
139 | 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
140 | 'au' => 'audio/x-au',
141 | 'ac3' => 'audio/ac3',
142 | 'flac' => 'audio/x-flac',
143 | 'ogg' => 'audio/ogg',
144 | 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
145 | 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
146 | 'ics' => 'text/calendar',
147 | 'ical' => 'text/calendar',
148 | 'zsh' => 'text/x-scriptzsh',
149 | '7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
150 | 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
151 | 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
152 | 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
153 | 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
154 | 'vcf' => 'text/x-vcard',
155 | 'srt' => array('text/srt', 'text/plain'),
156 | 'vtt' => array('text/vtt', 'text/plain'),
157 | 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
158 | );
159 |
--------------------------------------------------------------------------------
/ci/index.php:
--------------------------------------------------------------------------------
1 | ='))
77 | {
78 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
79 | }
80 | else
81 | {
82 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
83 | }
84 | break;
85 |
86 | default:
87 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
88 | echo 'The application environment is not set correctly.';
89 | exit(1); // EXIT_ERROR
90 | }
91 |
92 | /*
93 | *---------------------------------------------------------------
94 | * SYSTEM FOLDER NAME
95 | *---------------------------------------------------------------
96 | *
97 | * This variable must contain the name of your "system" folder.
98 | * Include the path if the folder is not in the same directory
99 | * as this file.
100 | */
101 | $system_path = 'system';
102 |
103 | /*
104 | *---------------------------------------------------------------
105 | * APPLICATION FOLDER NAME
106 | *---------------------------------------------------------------
107 | *
108 | * If you want this front controller to use a different "application"
109 | * folder than the default one you can set its name here. The folder
110 | * can also be renamed or relocated anywhere on your server. If
111 | * you do, use a full server path. For more info please see the user guide:
112 | * http://codeigniter.com/user_guide/general/managing_apps.html
113 | *
114 | * NO TRAILING SLASH!
115 | */
116 | $application_folder = 'application';
117 |
118 | /*
119 | *---------------------------------------------------------------
120 | * VIEW FOLDER NAME
121 | *---------------------------------------------------------------
122 | *
123 | * If you want to move the view folder out of the application
124 | * folder set the path to the folder here. The folder can be renamed
125 | * and relocated anywhere on your server. If blank, it will default
126 | * to the standard location inside your application folder. If you
127 | * do move this, use the full server path to this folder.
128 | *
129 | * NO TRAILING SLASH!
130 | */
131 | $view_folder = '';
132 |
133 |
134 | /*
135 | * --------------------------------------------------------------------
136 | * DEFAULT CONTROLLER
137 | * --------------------------------------------------------------------
138 | *
139 | * Normally you will set your default controller in the routes.php file.
140 | * You can, however, force a custom routing by hard-coding a
141 | * specific controller class/function here. For most applications, you
142 | * WILL NOT set your routing here, but it's an option for those
143 | * special instances where you might want to override the standard
144 | * routing in a specific front controller that shares a common CI installation.
145 | *
146 | * IMPORTANT: If you set the routing here, NO OTHER controller will be
147 | * callable. In essence, this preference limits your application to ONE
148 | * specific controller. Leave the function name blank if you need
149 | * to call functions dynamically via the URI.
150 | *
151 | * Un-comment the $routing array below to use this feature
152 | */
153 | // The directory name, relative to the "controllers" folder. Leave blank
154 | // if your controller is not in a sub-folder within the "controllers" folder
155 | // $routing['directory'] = '';
156 |
157 | // The controller class file name. Example: mycontroller
158 | // $routing['controller'] = '';
159 |
160 | // The controller function you wish to be called.
161 | // $routing['function'] = '';
162 |
163 |
164 | /*
165 | * -------------------------------------------------------------------
166 | * CUSTOM CONFIG VALUES
167 | * -------------------------------------------------------------------
168 | *
169 | * The $assign_to_config array below will be passed dynamically to the
170 | * config class when initialized. This allows you to set custom config
171 | * items or override any default config values found in the config.php file.
172 | * This can be handy as it permits you to share one application between
173 | * multiple front controller files, with each file containing different
174 | * config values.
175 | *
176 | * Un-comment the $assign_to_config array below to use this feature
177 | */
178 | // $assign_to_config['name_of_config_item'] = 'value of config item';
179 |
180 |
181 |
182 | // --------------------------------------------------------------------
183 | // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
184 | // --------------------------------------------------------------------
185 |
186 | /*
187 | * ---------------------------------------------------------------
188 | * Resolve the system path for increased reliability
189 | * ---------------------------------------------------------------
190 | */
191 |
192 | // Set the current directory correctly for CLI requests
193 | if (defined('STDIN'))
194 | {
195 | chdir(dirname(__FILE__));
196 | }
197 |
198 | if (($_temp = realpath($system_path)) !== FALSE)
199 | {
200 | $system_path = $_temp.'/';
201 | }
202 | else
203 | {
204 | // Ensure there's a trailing slash
205 | $system_path = rtrim($system_path, '/').'/';
206 | }
207 |
208 | // Is the system path correct?
209 | if ( ! is_dir($system_path))
210 | {
211 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
212 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
213 | exit(3); // EXIT_CONFIG
214 | }
215 |
216 | /*
217 | * -------------------------------------------------------------------
218 | * Now that we know the path, set the main path constants
219 | * -------------------------------------------------------------------
220 | */
221 | // The name of THIS file
222 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
223 |
224 | // Path to the system folder
225 | define('BASEPATH', str_replace('\\', '/', $system_path));
226 |
227 | // Path to the front controller (this file)
228 | define('FCPATH', dirname(__FILE__).'/');
229 |
230 | // Name of the "system folder"
231 | define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
232 |
233 | // The path to the "application" folder
234 | if (is_dir($application_folder))
235 | {
236 | if (($_temp = realpath($application_folder)) !== FALSE)
237 | {
238 | $application_folder = $_temp;
239 | }
240 |
241 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR);
242 | }
243 | else
244 | {
245 | if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
246 | {
247 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
248 | echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
249 | exit(3); // EXIT_CONFIG
250 | }
251 |
252 | define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR);
253 | }
254 |
255 | // The path to the "views" folder
256 | if ( ! is_dir($view_folder))
257 | {
258 | if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
259 | {
260 | $view_folder = APPPATH.$view_folder;
261 | }
262 | elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
263 | {
264 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
265 | echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
266 | exit(3); // EXIT_CONFIG
267 | }
268 | else
269 | {
270 | $view_folder = APPPATH.'views';
271 | }
272 | }
273 |
274 | if (($_temp = realpath($view_folder)) !== FALSE)
275 | {
276 | $view_folder = $_temp.DIRECTORY_SEPARATOR;
277 | }
278 | else
279 | {
280 | $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR;
281 | }
282 |
283 | define('VIEWPATH', $view_folder);
284 |
285 | /*
286 | * --------------------------------------------------------------------
287 | * LOAD THE BOOTSTRAP FILE
288 | * --------------------------------------------------------------------
289 | *
290 | * And away we go...
291 | */
292 | require_once BASEPATH.'core/CodeIgniter.php';
293 |
--------------------------------------------------------------------------------
/ci/application/config/config.php:
--------------------------------------------------------------------------------
1 | ]+$/i
157 | |
158 | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
159 | |
160 | */
161 | $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
162 |
163 | /*
164 | |--------------------------------------------------------------------------
165 | | Enable Query Strings
166 | |--------------------------------------------------------------------------
167 | |
168 | | By default CodeIgniter uses search-engine friendly segment based URLs:
169 | | example.com/who/what/where/
170 | |
171 | | By default CodeIgniter enables access to the $_GET array. If for some
172 | | reason you would like to disable it, set 'allow_get_array' to FALSE.
173 | |
174 | | You can optionally enable standard query string based URLs:
175 | | example.com?who=me&what=something&where=here
176 | |
177 | | Options are: TRUE or FALSE (boolean)
178 | |
179 | | The other items let you set the query string 'words' that will
180 | | invoke your controllers and its functions:
181 | | example.com/index.php?c=controller&m=function
182 | |
183 | | Please note that some of the helpers won't work as expected when
184 | | this feature is enabled, since CodeIgniter is designed primarily to
185 | | use segment based URLs.
186 | |
187 | */
188 | $config['allow_get_array'] = TRUE;
189 | $config['enable_query_strings'] = FALSE;
190 | $config['controller_trigger'] = 'c';
191 | $config['function_trigger'] = 'm';
192 | $config['directory_trigger'] = 'd';
193 |
194 | /*
195 | |--------------------------------------------------------------------------
196 | | Error Logging Threshold
197 | |--------------------------------------------------------------------------
198 | |
199 | | You can enable error logging by setting a threshold over zero. The
200 | | threshold determines what gets logged. Threshold options are:
201 | |
202 | | 0 = Disables logging, Error logging TURNED OFF
203 | | 1 = Error Messages (including PHP errors)
204 | | 2 = Debug Messages
205 | | 3 = Informational Messages
206 | | 4 = All Messages
207 | |
208 | | You can also pass an array with threshold levels to show individual error types
209 | |
210 | | array(2) = Debug Messages, without Error Messages
211 | |
212 | | For a live site you'll usually only enable Errors (1) to be logged otherwise
213 | | your log files will fill up very fast.
214 | |
215 | */
216 | $config['log_threshold'] = 0;
217 |
218 | /*
219 | |--------------------------------------------------------------------------
220 | | Error Logging Directory Path
221 | |--------------------------------------------------------------------------
222 | |
223 | | Leave this BLANK unless you would like to set something other than the default
224 | | application/logs/ directory. Use a full server path with trailing slash.
225 | |
226 | */
227 | $config['log_path'] = '';
228 |
229 | /*
230 | |--------------------------------------------------------------------------
231 | | Log File Extension
232 | |--------------------------------------------------------------------------
233 | |
234 | | The default filename extension for log files. The default 'php' allows for
235 | | protecting the log files via basic scripting, when they are to be stored
236 | | under a publicly accessible directory.
237 | |
238 | | Note: Leaving it blank will default to 'php'.
239 | |
240 | */
241 | $config['log_file_extension'] = '';
242 |
243 | /*
244 | |--------------------------------------------------------------------------
245 | | Log File Permissions
246 | |--------------------------------------------------------------------------
247 | |
248 | | The file system permissions to be applied on newly created log files.
249 | |
250 | | IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
251 | | integer notation (i.e. 0700, 0644, etc.)
252 | */
253 | $config['log_file_permissions'] = 0644;
254 |
255 | /*
256 | |--------------------------------------------------------------------------
257 | | Date Format for Logs
258 | |--------------------------------------------------------------------------
259 | |
260 | | Each item that is logged has an associated date. You can use PHP date
261 | | codes to set your own date formatting
262 | |
263 | */
264 | $config['log_date_format'] = 'Y-m-d H:i:s';
265 |
266 | /*
267 | |--------------------------------------------------------------------------
268 | | Error Views Directory Path
269 | |--------------------------------------------------------------------------
270 | |
271 | | Leave this BLANK unless you would like to set something other than the default
272 | | application/views/errors/ directory. Use a full server path with trailing slash.
273 | |
274 | */
275 | $config['error_views_path'] = '';
276 |
277 | /*
278 | |--------------------------------------------------------------------------
279 | | Cache Directory Path
280 | |--------------------------------------------------------------------------
281 | |
282 | | Leave this BLANK unless you would like to set something other than the default
283 | | application/cache/ directory. Use a full server path with trailing slash.
284 | |
285 | */
286 | $config['cache_path'] = '';
287 |
288 | /*
289 | |--------------------------------------------------------------------------
290 | | Cache Include Query String
291 | |--------------------------------------------------------------------------
292 | |
293 | | Whether to take the URL query string into consideration when generating
294 | | output cache files. Valid options are:
295 | |
296 | | FALSE = Disabled
297 | | TRUE = Enabled, take all query parameters into account.
298 | | Please be aware that this may result in numerous cache
299 | | files generated for the same page over and over again.
300 | | array('q') = Enabled, but only take into account the specified list
301 | | of query parameters.
302 | |
303 | */
304 | $config['cache_query_string'] = FALSE;
305 |
306 | /*
307 | |--------------------------------------------------------------------------
308 | | Encryption Key
309 | |--------------------------------------------------------------------------
310 | |
311 | | If you use the Encryption class, you must set an encryption key.
312 | | See the user guide for more info.
313 | |
314 | | http://codeigniter.com/user_guide/libraries/encryption.html
315 | |
316 | */
317 | $config['encryption_key'] = '';
318 |
319 | /*
320 | |--------------------------------------------------------------------------
321 | | Session Variables
322 | |--------------------------------------------------------------------------
323 | |
324 | | 'sess_driver'
325 | |
326 | | The storage driver to use: files, database, redis, memcached
327 | |
328 | | 'sess_cookie_name'
329 | |
330 | | The session cookie name, must contain only [0-9a-z_-] characters
331 | |
332 | | 'sess_expiration'
333 | |
334 | | The number of SECONDS you want the session to last.
335 | | Setting to 0 (zero) means expire when the browser is closed.
336 | |
337 | | 'sess_save_path'
338 | |
339 | | The location to save sessions to, driver dependent.
340 | |
341 | | For the 'files' driver, it's a path to a writable directory.
342 | | WARNING: Only absolute paths are supported!
343 | |
344 | | For the 'database' driver, it's a table name.
345 | | Please read up the manual for the format with other session drivers.
346 | |
347 | | IMPORTANT: You are REQUIRED to set a valid save path!
348 | |
349 | | 'sess_match_ip'
350 | |
351 | | Whether to match the user's IP address when reading the session data.
352 | |
353 | | WARNING: If you're using the database driver, don't forget to update
354 | | your session table's PRIMARY KEY when changing this setting.
355 | |
356 | | 'sess_time_to_update'
357 | |
358 | | How many seconds between CI regenerating the session ID.
359 | |
360 | | 'sess_regenerate_destroy'
361 | |
362 | | Whether to destroy session data associated with the old session ID
363 | | when auto-regenerating the session ID. When set to FALSE, the data
364 | | will be later deleted by the garbage collector.
365 | |
366 | | Other session cookie settings are shared with the rest of the application,
367 | | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
368 | |
369 | */
370 | $config['sess_driver'] = 'files';
371 | $config['sess_cookie_name'] = 'ci_session';
372 | $config['sess_expiration'] = 7200;
373 | $config['sess_save_path'] = NULL;
374 | $config['sess_match_ip'] = FALSE;
375 | $config['sess_time_to_update'] = 300;
376 | $config['sess_regenerate_destroy'] = FALSE;
377 |
378 | /*
379 | |--------------------------------------------------------------------------
380 | | Cookie Related Variables
381 | |--------------------------------------------------------------------------
382 | |
383 | | 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
384 | | 'cookie_domain' = Set to .your-domain.com for site-wide cookies
385 | | 'cookie_path' = Typically will be a forward slash
386 | | 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
387 | | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
388 | |
389 | | Note: These settings (with the exception of 'cookie_prefix' and
390 | | 'cookie_httponly') will also affect sessions.
391 | |
392 | */
393 | $config['cookie_prefix'] = '';
394 | $config['cookie_domain'] = '';
395 | $config['cookie_path'] = '/';
396 | $config['cookie_secure'] = FALSE;
397 | $config['cookie_httponly'] = FALSE;
398 |
399 | /*
400 | |--------------------------------------------------------------------------
401 | | Standardize newlines
402 | |--------------------------------------------------------------------------
403 | |
404 | | Determines whether to standardize newline characters in input data,
405 | | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
406 | |
407 | | This is particularly useful for portability between UNIX-based OSes,
408 | | (usually \n) and Windows (\r\n).
409 | |
410 | */
411 | $config['standardize_newlines'] = FALSE;
412 |
413 | /*
414 | |--------------------------------------------------------------------------
415 | | Global XSS Filtering
416 | |--------------------------------------------------------------------------
417 | |
418 | | Determines whether the XSS filter is always active when GET, POST or
419 | | COOKIE data is encountered
420 | |
421 | | WARNING: This feature is DEPRECATED and currently available only
422 | | for backwards compatibility purposes!
423 | |
424 | */
425 | $config['global_xss_filtering'] = FALSE;
426 |
427 | /*
428 | |--------------------------------------------------------------------------
429 | | Cross Site Request Forgery
430 | |--------------------------------------------------------------------------
431 | | Enables a CSRF cookie token to be set. When set to TRUE, token will be
432 | | checked on a submitted form. If you are accepting user data, it is strongly
433 | | recommended CSRF protection be enabled.
434 | |
435 | | 'csrf_token_name' = The token name
436 | | 'csrf_cookie_name' = The cookie name
437 | | 'csrf_expire' = The number in seconds the token should expire.
438 | | 'csrf_regenerate' = Regenerate token on every submission
439 | | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
440 | */
441 | $config['csrf_protection'] = FALSE;
442 | $config['csrf_token_name'] = 'csrf_test_name';
443 | $config['csrf_cookie_name'] = 'csrf_cookie_name';
444 | $config['csrf_expire'] = 7200;
445 | $config['csrf_regenerate'] = TRUE;
446 | $config['csrf_exclude_uris'] = array();
447 |
448 | /*
449 | |--------------------------------------------------------------------------
450 | | Output Compression
451 | |--------------------------------------------------------------------------
452 | |
453 | | Enables Gzip output compression for faster page loads. When enabled,
454 | | the output class will test whether your server supports Gzip.
455 | | Even if it does, however, not all browsers support compression
456 | | so enable only if you are reasonably sure your visitors can handle it.
457 | |
458 | | Only used if zlib.output_compression is turned off in your php.ini.
459 | | Please do not use it together with httpd-level output compression.
460 | |
461 | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it
462 | | means you are prematurely outputting something to your browser. It could
463 | | even be a line of whitespace at the end of one of your scripts. For
464 | | compression to work, nothing can be sent before the output buffer is called
465 | | by the output class. Do not 'echo' any values with compression enabled.
466 | |
467 | */
468 | $config['compress_output'] = FALSE;
469 |
470 | /*
471 | |--------------------------------------------------------------------------
472 | | Master Time Reference
473 | |--------------------------------------------------------------------------
474 | |
475 | | Options are 'local' or any PHP supported timezone. This preference tells
476 | | the system whether to use your server's local time as the master 'now'
477 | | reference, or convert it to the configured one timezone. See the 'date
478 | | helper' page of the user guide for information regarding date handling.
479 | |
480 | */
481 | $config['time_reference'] = 'local';
482 |
483 | /*
484 | |--------------------------------------------------------------------------
485 | | Rewrite PHP Short Tags
486 | |--------------------------------------------------------------------------
487 | |
488 | | If your PHP installation does not have short tag support enabled CI
489 | | can rewrite the tags on-the-fly, enabling you to utilize that syntax
490 | | in your view files. Options are TRUE or FALSE (boolean)
491 | |
492 | | Note: You need to have eval() enabled for this to work.
493 | |
494 | */
495 | $config['rewrite_short_tags'] = FALSE;
496 |
497 | /*
498 | |--------------------------------------------------------------------------
499 | | Reverse Proxy IPs
500 | |--------------------------------------------------------------------------
501 | |
502 | | If your server is behind a reverse proxy, you must whitelist the proxy
503 | | IP addresses from which CodeIgniter should trust headers such as
504 | | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
505 | | the visitor's IP address.
506 | |
507 | | You can use both an array or a comma-separated list of proxy addresses,
508 | | as well as specifying whole subnets. Here are a few examples:
509 | |
510 | | Comma-separated: '10.0.1.200,192.168.5.0/24'
511 | | Array: array('10.0.1.200', '192.168.5.0/24')
512 | */
513 | $config['proxy_ips'] = '';
514 |
--------------------------------------------------------------------------------