├── system ├── .htaccess ├── fonts │ ├── texb.ttf │ └── index.html ├── index.html ├── core │ ├── index.html │ ├── Model.php │ ├── Controller.php │ └── Benchmark.php ├── database │ ├── index.html │ └── drivers │ │ ├── index.html │ │ ├── pdo │ │ ├── index.html │ │ └── pdo_utility.php │ │ ├── cubrid │ │ ├── index.html │ │ └── cubrid_utility.php │ │ ├── mssql │ │ ├── index.html │ │ └── mssql_utility.php │ │ ├── mysql │ │ └── index.html │ │ ├── mysqli │ │ ├── index.html │ │ └── mysqli_utility.php │ │ ├── oci8 │ │ ├── index.html │ │ └── oci8_utility.php │ │ ├── odbc │ │ ├── index.html │ │ └── odbc_utility.php │ │ ├── postgre │ │ ├── index.html │ │ └── postgre_utility.php │ │ ├── sqlite │ │ ├── index.html │ │ └── sqlite_utility.php │ │ └── sqlsrv │ │ ├── index.html │ │ └── sqlsrv_utility.php ├── helpers │ ├── index.html │ ├── language_helper.php │ ├── email_helper.php │ ├── path_helper.php │ ├── xml_helper.php │ ├── number_helper.php │ ├── directory_helper.php │ ├── typography_helper.php │ ├── cookie_helper.php │ ├── array_helper.php │ ├── download_helper.php │ └── security_helper.php ├── language │ ├── index.html │ └── english │ │ ├── index.html │ │ ├── number_lang.php │ │ ├── migration_lang.php │ │ ├── unit_test_lang.php │ │ ├── profiler_lang.php │ │ ├── ftp_lang.php │ │ ├── calendar_lang.php │ │ ├── upload_lang.php │ │ ├── email_lang.php │ │ ├── form_validation_lang.php │ │ ├── imglib_lang.php │ │ ├── db_lang.php │ │ └── date_lang.php └── libraries │ ├── index.html │ ├── Log.php │ └── Cache │ └── drivers │ └── Cache_dummy.php ├── application ├── .htaccess ├── cache │ ├── .htaccess │ └── index.html ├── views │ ├── view_vehicle.php │ ├── view_success.php │ ├── index.html │ ├── view_book_crash.php │ ├── admin_footer.php │ ├── footer.php │ ├── view_login.php │ ├── view_admin_user.php │ ├── view_admin_update_charge.php │ ├── view_schedule_details.php │ ├── view_admin_schedule_details.php │ ├── view_admin_vehicle.php │ ├── view_register.php │ ├── view_add_vehicle.php │ ├── view_admin_schedule.php │ ├── view_admin_add_vehicle.php │ └── view_schedule.php ├── index.html ├── core │ └── index.html ├── hooks │ └── index.html ├── logs │ └── index.html ├── config │ ├── index.html │ ├── hooks.php │ ├── profiler.php │ ├── doctypes.php │ ├── migration.php │ ├── constants.php │ ├── routes.php │ ├── foreign_chars.php │ ├── database.php │ ├── smileys.php │ └── autoload.php ├── errors │ ├── index.html │ ├── error_php.php │ ├── error_db.php │ ├── error_general.php │ └── error_404.php ├── helpers │ └── index.html ├── libraries │ ├── index.html │ └── MY_Form_validation.php ├── models │ ├── index.html │ ├── model_gallery.php │ └── model_user.php ├── controllers │ ├── index.html │ ├── home.php │ ├── login.php │ ├── register.php │ └── profile.php ├── third_party │ └── index.html └── language │ └── english │ └── index.html ├── .travis.yml ├── public ├── car │ ├── 1.jpg │ ├── 10.jpg │ ├── 11.jpg │ ├── 12.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ ├── 9.jpg │ └── default.jpg ├── img │ └── pattern.png ├── calendar │ ├── img │ │ ├── tick.png │ │ ├── dark_wood.png │ │ └── slide-bg.png │ ├── less │ │ ├── calendar.less │ │ ├── week.less │ │ ├── variables.less │ │ ├── day.less │ │ ├── month.less │ │ ├── events.less │ │ └── grid.less │ ├── components │ │ ├── bootstrap3 │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ └── jstimezonedetect │ │ │ └── LICENCE.txt │ ├── tmpls │ │ ├── week-days.html │ │ ├── events-list.html │ │ ├── month-day.html │ │ ├── year-month.html │ │ ├── modal.html │ │ ├── week.html │ │ ├── month.html │ │ ├── year.html │ │ └── day.html │ ├── events.php │ └── js │ │ └── app.js ├── upload │ └── profile │ │ ├── 1 │ │ └── pic1.jpg │ │ ├── 2 │ │ └── pic1.jpg │ │ ├── 3 │ │ └── pic1.jpg │ │ ├── 5 │ │ └── pic1.jpg │ │ └── default.jpg ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── css │ ├── custom.css │ ├── admin_custom.css │ └── home_custom.css ├── .gitignore ├── .htaccess ├── charge.sql ├── reservation.sql ├── users.sql ├── vehicle.sql ├── license.txt └── database.php /system/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/cache/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /application/views/view_vehicle.php: -------------------------------------------------------------------------------- 1 | coming soon -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | except: 3 | - 2.1-stable 4 | - master -------------------------------------------------------------------------------- /public/car/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/1.jpg -------------------------------------------------------------------------------- /public/car/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/10.jpg -------------------------------------------------------------------------------- /public/car/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/11.jpg -------------------------------------------------------------------------------- /public/car/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/12.jpg -------------------------------------------------------------------------------- /public/car/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/2.jpg -------------------------------------------------------------------------------- /public/car/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/3.jpg -------------------------------------------------------------------------------- /public/car/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/4.jpg -------------------------------------------------------------------------------- /public/car/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/5.jpg -------------------------------------------------------------------------------- /public/car/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/6.jpg -------------------------------------------------------------------------------- /public/car/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/7.jpg -------------------------------------------------------------------------------- /public/car/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/8.jpg -------------------------------------------------------------------------------- /public/car/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/9.jpg -------------------------------------------------------------------------------- /public/car/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/car/default.jpg -------------------------------------------------------------------------------- /public/img/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/img/pattern.png -------------------------------------------------------------------------------- /system/fonts/texb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/system/fonts/texb.ttf -------------------------------------------------------------------------------- /public/calendar/img/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/calendar/img/tick.png -------------------------------------------------------------------------------- /public/calendar/img/dark_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/calendar/img/dark_wood.png -------------------------------------------------------------------------------- /public/calendar/img/slide-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/calendar/img/slide-bg.png -------------------------------------------------------------------------------- /public/upload/profile/1/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/upload/profile/1/pic1.jpg -------------------------------------------------------------------------------- /public/upload/profile/2/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/upload/profile/2/pic1.jpg -------------------------------------------------------------------------------- /public/upload/profile/3/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/upload/profile/3/pic1.jpg -------------------------------------------------------------------------------- /public/upload/profile/5/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/upload/profile/5/pic1.jpg -------------------------------------------------------------------------------- /public/upload/profile/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/upload/profile/default.jpg -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /system/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/views/view_success.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Successfully Added

5 |
6 |
7 |
-------------------------------------------------------------------------------- /system/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/fonts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/hooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/logs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/language/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/cubrid/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/mssql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/mysql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/mysqli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/odbc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/postgre/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | application/cache/* 4 | !application/cache/index.html 5 | !application/cache/.htaccess 6 | 7 | application/logs/* 8 | !application/logs/index.html 9 | !application/logs/.htaccess -------------------------------------------------------------------------------- /public/calendar/less/calendar.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "grid.less"; 3 | @import "month.less"; 4 | @import "week.less"; 5 | @import "day.less"; 6 | @import "events.less"; 7 | @import "theme.less"; 8 | -------------------------------------------------------------------------------- /public/calendar/components/bootstrap3/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/calendar/components/bootstrap3/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/calendar/components/bootstrap3/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/calendar/components/bootstrap3/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/calendar/components/bootstrap3/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laxxers/car-rental-management-system/HEAD/public/calendar/components/bootstrap3/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /system/language/english/number_lang.php: -------------------------------------------------------------------------------- 1 | img { 11 | display: block; 12 | height: 150px; /* add this */ 13 | margin-left: auto; 14 | margin-right: auto; 15 | max-width: 100%; 16 | } -------------------------------------------------------------------------------- /application/errors/error_php.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |

A PHP Error was encountered

4 | 5 |

Severity:

6 |

Message:

7 |

Filename:

8 |

Line Number:

9 | 10 |
-------------------------------------------------------------------------------- /public/calendar/tmpls/week-days.html: -------------------------------------------------------------------------------- 1 | <% _.each(events, function(event){ %> 2 |
3 |
4 | <%= event.title %> 5 |
6 |
7 | <% }); %> 8 | -------------------------------------------------------------------------------- /public/calendar/tmpls/events-list.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 13 |
14 | -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | "> 2 | <%= day %> 3 | <% if (events.length > 0) { %> 4 |
5 | <% _.each(events, function(event) { %> 6 | 9 | <% }); %> 10 |
11 | <% } %> 12 | 13 | -------------------------------------------------------------------------------- /public/calendar/tmpls/year-month.html: -------------------------------------------------------------------------------- 1 | <%= month_name %> 2 | <% if (events.length > 0) { %> 3 | <%= events.length %> 4 |
5 | <% _.each(events, function(event) { %> 6 | 9 | <% }); %> 10 |
11 | <% } %> 12 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading 4 | # slashes. 5 | # If your page resides at 6 | # http://www.example.com/mypage/test1 7 | # then use 8 | # RewriteBase /mypage/test1/ 9 | RewriteBase /Share2 10 | 11 | RewriteCond %{REQUEST_FILENAME} !-f 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteRule ^(.*)$ index.php?/$1 [L] 14 | 15 | 16 | 17 | # If we don't have mod_rewrite installed, all 404's 18 | # can be sent to index.php, and everything works as normal. 19 | # Submitted by: ElliotHaughin 20 | 21 | ErrorDocument 404 /index.php 22 | -------------------------------------------------------------------------------- /application/views/view_book_crash.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 7 |
8 | 9 |
10 |
11 |

Error Crash

12 |

Vehicle is not available during:

13 | 14 | " . strftime("%d %b %Y", strtotime($tuple[0])) . " to "; 19 | echo "" . strftime("%d %b %Y", strtotime($tuple[1])) . "
"; 20 | } 21 | ?> 22 |

23 |
24 |
-------------------------------------------------------------------------------- /system/language/english/migration_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/calendar/tmpls/modal.html: -------------------------------------------------------------------------------- 1 | <% event.date_start = new Date(parseInt(event.start)); 2 | event.date_end = new Date(parseInt(event.end)); %> 3 |
4 | Starts on <%= event.date_start.getDate() %> <%= calendar.locale["m" + event.date_start.getMonth()] %> <%= event.date_start.getFullYear() %>, at <%= event.date_start.getHours() %>:<%= event.date_start.getMinutes() %>
5 | Ends on <%= event.date_end.getDate() %> <%= calendar.locale["m" + event.date_end.getMonth()] %> <%= event.date_end.getFullYear() %> at <%= event.date_end.getHours() %>:<%= event.date_end.getMinutes() %>
6 |
7 | 8 |
9 | More info 10 |
11 | -------------------------------------------------------------------------------- /application/views/footer.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 30 | -------------------------------------------------------------------------------- /public/calendar/tmpls/week.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | <% _.each(months, function(name) { %> 10 |
<%= name %>
11 | <%= start.getDate() %> <%= cal.locale['ms' + start.getMonth()] %> 12 |
13 | <% start.setDate(start.getDate() + 1); %> 14 | <% }) %> 15 |
16 |
17 | <%= cal._week() %> 18 |
19 | -------------------------------------------------------------------------------- /system/language/english/unit_test_lang.php: -------------------------------------------------------------------------------- 1 | index(); 10 | break; 11 | case 'logout': 12 | $this->logout(); 13 | break; 14 | default: 15 | show_404();; 16 | break; 17 | } 18 | } 19 | 20 | public function index() { 21 | // $this->load->view('header'); 22 | $session = $this->session->userdata("loggedIn"); 23 | if($session) { 24 | $this->load->view('header'); 25 | $this->load->view('view_profile'); 26 | $this->load->view('footer'); 27 | } else { 28 | $this->load->view('view_home'); 29 | } 30 | 31 | // $this->load->view('footer'); 32 | } 33 | 34 | public function logout() { 35 | $this->session->sess_destroy(); 36 | redirect(base_url()); 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /public/calendar/tmpls/month.html: -------------------------------------------------------------------------------- 1 |
2 | <% _.each(months, function(name){ %> 3 |
<%= name %>
4 | <% }) %> 5 |
6 |
7 | <% for(i = 0; i < 6; i++) { %> 8 | <% if(cal.stop_cycling == true) break; %> 9 |
10 |
<%= cal._day(i, day++) %>
11 |
<%= cal._day(i, day++) %>
12 |
<%= cal._day(i, day++) %>
13 |
<%= cal._day(i, day++) %>
14 |
<%= cal._day(i, day++) %>
15 |
<%= cal._day(i, day++) %>
16 |
<%= cal._day(i, day++) %>
17 |
18 | <% } %> 19 |
-------------------------------------------------------------------------------- /public/calendar/less/week.less: -------------------------------------------------------------------------------- 1 | .cal-week-box { 2 | position: relative; 3 | [data-event-class] { 4 | white-space: nowrap; 5 | height: 30px; 6 | margin: 1px 1px; 7 | line-height: 30px; 8 | text-overflow: ellipsis; 9 | overflow: hidden; 10 | padding-left: 10px; 11 | } 12 | .cal-column { 13 | position: absolute; 14 | height: 100%; 15 | z-index: -1; 16 | } 17 | .arrow-before, 18 | .arrow-after { 19 | position: relative; 20 | } 21 | .arrow-after:after { 22 | content:""; 23 | position: absolute; 24 | top: 0px; 25 | width: 0; 26 | height: 0; 27 | right: 0; 28 | border-top: 15px solid #ffffff; 29 | border-left: 8px solid; 30 | border-bottom: 15px solid #FFFFFF; 31 | } 32 | .arrow-before:before { 33 | content:""; 34 | position: absolute; 35 | top: 0px; 36 | width: 0; 37 | height: 0; 38 | left: 1px; 39 | border-top: 15px solid transparent; 40 | border-left: 8px solid #FFFFFF; 41 | border-bottom: 15px solid transparent; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /public/css/admin_custom.css: -------------------------------------------------------------------------------- 1 | /* Global Styles */ 2 | 3 | /* ------------------------------- */ 4 | 5 | body { 6 | background-color: #f8f8f8; 7 | padding-top: 100px; 8 | } 9 | 10 | @media(min-width:768px) { 11 | body { 12 | padding-top: 50px; 13 | } 14 | } 15 | 16 | /* Wrappers */ 17 | 18 | /* ------------------------------- */ 19 | 20 | #wrapper { 21 | width: 100%; 22 | } 23 | 24 | #page-wrapper { 25 | padding: 0 15px; 26 | min-height: 568px; 27 | background-color: #fff; 28 | } 29 | 30 | @media(min-width:768px) { 31 | #page-wrapper { 32 | position: inherit; 33 | margin: 0 0 0 250px; 34 | padding: 0 30px; 35 | min-height: 800px; 36 | border-left: 1px solid #e7e7e7; 37 | } 38 | } 39 | 40 | .navbar-static-side ul li { 41 | border-bottom: 1px solid #e7e7e7; 42 | } 43 | 44 | 45 | /* Sidebar Menu Styles */ 46 | 47 | @media(min-width:768px) { 48 | .navbar-static-side { 49 | z-index: 1; 50 | position: absolute; 51 | width: 250px; 52 | margin-top: 51px; 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /public/calendar/events.php: -------------------------------------------------------------------------------- 1 | $row['res_id'], 28 | 'title' => "vehicle with id : " . $row['vehicle_id'], 29 | 'url'=> 'schedule_details/' . $row['pickup'] . "/". $row['dropoff']. "/". $row['vehicle_id'], 30 | 'class' => $color[$count], 31 | 'start' => $ms_phpdate1, 32 | 'end' => $ms_phpdate2 33 | ); 34 | 35 | $count++; 36 | if($count % 5 == 0) 37 | $count = 0; 38 | 39 | 40 | } 41 | 42 | echo json_encode(array('success' => 1, 'result' => $out)); 43 | ?> -------------------------------------------------------------------------------- /application/config/doctypes.php: -------------------------------------------------------------------------------- 1 | '', 5 | 'xhtml1-strict' => '', 6 | 'xhtml1-trans' => '', 7 | 'xhtml1-frame' => '', 8 | 'html5' => '', 9 | 'html4-strict' => '', 10 | 'html4-trans' => '', 11 | 'html4-frame' => '' 12 | ); 13 | 14 | /* End of file doctypes.php */ 15 | /* Location: ./application/config/doctypes.php */ -------------------------------------------------------------------------------- /public/calendar/less/variables.less: -------------------------------------------------------------------------------- 1 | @rowHeightMonth: 100px; 2 | @rowHeightYear: 60px; 3 | 4 | // Events 5 | 6 | @eventStandardColor: #c3c3c3; 7 | @eventImportantColor: #ad2121; 8 | @eventInfoColor: dodgerblue; 9 | @eventWarningColor: #e3bc08; 10 | @eventSuccessColor: darkgreen; 11 | @eventInverseColor: #1b1b1b; 12 | @eventSpecialColor: #800080; 13 | 14 | @eventHiliteStandart: #dddddd; 15 | @eventHiliteImportant: lighten(@eventImportantColor, 53%); 16 | @eventHiliteInfo: lighten(@eventInfoColor, 35%); 17 | @eventHiliteWarning: lighten(@eventWarningColor, 40%); 18 | @eventHiliteSuccess: lighten(@eventSuccessColor, 70%); 19 | @eventHiliteInverse: lighten(@eventInverseColor, 65%); 20 | @eventHiliteSpecial: lighten(@eventSpecialColor, 70%); 21 | 22 | // MONTH 23 | @rowHover: #fafafa; 24 | @dayHover: darken(@rowHover, 5%); 25 | @borderColor: darken(@rowHover, 10%); 26 | @borderSize: 1px; 27 | @borderSizehoriz: 1px; 28 | @borderSizevert: 1px; 29 | @borderStyle: solid; 30 | 31 | @eventBorderSize: 1px; 32 | @eventBorderColor: #ffffff; 33 | @eventBorderRadius:8px; 34 | @eventMargin: 2px; 35 | @eventSize: 12px; 36 | 37 | @calendarImagesPath: "../img"; -------------------------------------------------------------------------------- /system/language/english/profiler_lang.php: -------------------------------------------------------------------------------- 1 | 3 |
4 | 'login', 'class' => 'form-signin well', 'role' => 'form')); 6 | if($msg != NULL) { 7 | echo '
8 | 9 | ' . $msg . '
'; 10 | } 11 | 12 | echo form_label('Username', 'username'); 13 | echo form_input(array('name' => 'username', 'class' => 'form-control', 'value' => set_value('username'), 'placeholder' => 'Username', 'required' => 'required', 'autofocus' => 'autofocus')); 14 | echo '
'; 15 | echo form_label('Password', 'password'); 16 | echo form_password(array('name' => 'password', 'class' => 'form-control', 'value' => set_value('password'), 'placeholder' => 'Password', 'required' => 'required')); 17 | echo '
'; 18 | echo form_submit(array('name' => 'submit', 'class' => 'btn btn-default', 'value' => 'Login')); 19 | echo '  or '; 20 | echo anchor('/register', 'create an account'); 21 | echo form_close(); 22 | 23 | ?> 24 |
25 | -------------------------------------------------------------------------------- /public/calendar/components/jstimezonedetect/LICENCE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012 Jon Nylander, project maintained at 4 | https://bitbucket.org/pellepim/jstimezonedetect 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | of the Software, and to permit persons to whom the Software is furnished to 11 | do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /system/language/english/ftp_lang.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
<%= cal._month(0) %>
4 |
<%= cal._month(1) %>
5 |
<%= cal._month(2) %>
6 |
<%= cal._month(3) %>
7 |
8 |
9 |
<%= cal._month(4) %>
10 |
<%= cal._month(5) %>
11 |
<%= cal._month(6) %>
12 |
<%= cal._month(7) %>
13 |
14 |
15 |
<%= cal._month(8) %>
16 |
<%= cal._month(9) %>
17 |
<%= cal._month(10) %>
18 |
<%= cal._month(11) %>
19 |
20 | 21 | -------------------------------------------------------------------------------- /application/controllers/login.php: -------------------------------------------------------------------------------- 1 | index(); 10 | break; 11 | case 'session': 12 | $this->session(); 13 | break; 14 | default: 15 | show_404();; 16 | break; 17 | } 18 | } 19 | 20 | public function index($msg = NULL) { 21 | $data['msg'] = $msg; 22 | $this->load->view('header'); 23 | $this->load->view('view_login', $data); 24 | $this->load->view('footer'); 25 | 26 | } 27 | 28 | public function session() { 29 | $this->load->library('form_validation'); 30 | $this->form_validation->set_rules('username', 'Username', 'required|xss_clean'); 31 | $this->form_validation->set_rules('password', 'Password', 'required|xss_clean'); 32 | 33 | if($this->form_validation->run() == FALSE) { 34 | $msg = validation_errors(); 35 | $this->index($msg); 36 | } else { 37 | $this->load->model('model_user'); 38 | $query = $this->model_user->validate(); 39 | 40 | if($query) { 41 | redirect(base_url() . "profile"); 42 | } else { 43 | $msg = "Invalid combination.
"; 44 | $this->index($msg); 45 | } 46 | } 47 | } 48 | } 49 | 50 | ?> -------------------------------------------------------------------------------- /charge.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.0.4 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- Host: localhost 6 | -- Generation Time: May 09, 2014 at 07:19 AM 7 | -- Server version: 5.6.12-log 8 | -- PHP Version: 5.4.12 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8 */; 18 | 19 | -- 20 | -- Database: `car_rental` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Table structure for table `charge` 27 | -- 28 | 29 | CREATE TABLE IF NOT EXISTS `charge` ( 30 | `charge_id` int(11) NOT NULL AUTO_INCREMENT, 31 | `name` varchar(25) NOT NULL, 32 | `cost` int(25) NOT NULL, 33 | PRIMARY KEY (`charge_id`) 34 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; 35 | 36 | -- 37 | -- Dumping data for table `charge` 38 | -- 39 | 40 | INSERT INTO `charge` (`charge_id`, `name`, `cost`) VALUES 41 | (1, 'Facility Charge', 5), 42 | (2, 'Processing Fee', 2), 43 | (3, 'Gov Tax (6%)', 6); 44 | 45 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 46 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 47 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 48 | -------------------------------------------------------------------------------- /application/errors/error_db.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Database Error 5 | 55 | 56 | 57 |
58 |

59 | 60 |
61 | 62 | -------------------------------------------------------------------------------- /application/errors/error_general.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Error 5 | 55 | 56 | 57 |
58 |

59 | 60 |
61 | 62 | -------------------------------------------------------------------------------- /system/core/Model.php: -------------------------------------------------------------------------------- 1 | $key; 52 | } 53 | } 54 | // END Model Class 55 | 56 | /* End of file Model.php */ 57 | /* Location: ./system/core/Model.php */ -------------------------------------------------------------------------------- /application/errors/error_404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 404 Page Not Found 5 | 55 | 56 | 57 |
58 |

59 | 60 |
61 | 62 | -------------------------------------------------------------------------------- /application/config/migration.php: -------------------------------------------------------------------------------- 1 | migration->latest() this is the version that schema will 21 | | be upgraded / downgraded to. 22 | | 23 | */ 24 | $config['migration_version'] = 0; 25 | 26 | 27 | /* 28 | |-------------------------------------------------------------------------- 29 | | Migrations Path 30 | |-------------------------------------------------------------------------- 31 | | 32 | | Path to your migrations folder. 33 | | Typically, it will be within your application path. 34 | | Also, writing permission is required within the migrations path. 35 | | 36 | */ 37 | $config['migration_path'] = APPPATH . 'migrations/'; 38 | 39 | 40 | /* End of file migration.php */ 41 | /* Location: ./application/config/migration.php */ -------------------------------------------------------------------------------- /application/views/view_admin_user.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 |
13 |

User Management

14 | 15 |

Found Users

16 | 17 |
18 | 19 | 20 | $field_display){ ?> 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | $field_display){ ?> 35 | 38 | 39 | 40 | 41 | 42 | 43 |
> 22 | 26 | 27 |
36 | $field_name; ?> 37 |
44 |
45 | 46 | 47 |

48 | Pages: 49 |

50 | 51 |
52 |
53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /reservation.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 3.5.1 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- Host: localhost 6 | -- Generation Time: May 07, 2014 at 04:47 PM 7 | -- Server version: 5.5.24-log 8 | -- PHP Version: 5.3.13 9 | 10 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8 */; 18 | 19 | -- 20 | -- Database: `car_rental` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Table structure for table `reservation` 27 | -- 28 | 29 | CREATE TABLE IF NOT EXISTS `reservation` ( 30 | `res_id` int(11) NOT NULL AUTO_INCREMENT, 31 | `vehicle_id` int(11) NOT NULL, 32 | `phone` int(11) NOT NULL, 33 | `location` varchar(25) NOT NULL, 34 | `pickup` date NOT NULL, 35 | `pickuptime` varchar(25) NOT NULL, 36 | `dropoff` date NOT NULL, 37 | `dropofftime` varchar(25) NOT NULL, 38 | `user_id` int(11) NOT NULL, 39 | `status` varchar(25) NOT NULL, 40 | PRIMARY KEY (`res_id`), 41 | KEY `user_id` (`user_id`) 42 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; 43 | 44 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 45 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 46 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 47 | -------------------------------------------------------------------------------- /system/helpers/language_helper.php: -------------------------------------------------------------------------------- 1 | lang->line($line); 46 | 47 | if ($id != '') 48 | { 49 | $line = '"; 50 | } 51 | 52 | return $line; 53 | } 54 | } 55 | 56 | // ------------------------------------------------------------------------ 57 | /* End of file language_helper.php */ 58 | /* Location: ./system/helpers/language_helper.php */ -------------------------------------------------------------------------------- /system/language/english/calendar_lang.php: -------------------------------------------------------------------------------- 1 | uri->segment(3); 3 | 4 | $sql = mysql_query("SELECT * FROM charge WHERE charge_id= $id_update"); 5 | $count = mysql_num_rows($sql); 6 | 7 | if ($count > 1) { 8 | echo "There is no vehicle with that id here."; 9 | exit(); 10 | } 11 | while($row = mysql_fetch_array($sql)) 12 | { 13 | $name = $row["name"]; 14 | $cost = $row["cost"]; 15 | } 16 | 17 | ?> 18 | 19 |
20 |
21 |
22 |

Update Charge Information

23 |
24 |
25 |
26 |
27 | 31 | 32 | " . validation_errors() . " 33 |
"; 34 | } 35 | 36 | echo form_open("admin/update_charge/$id_update", array('id' => 'edit', 'class' => 'form-signin', 'role' => 'form')); 37 | echo form_label('Name', 'name'); 38 | echo form_input(array('name' => 'name', 'class' => 'form-control', 'value' => $name, 'placeholder' => 'Type of charge', 'required' => 'required', 'autofocus' => 'autofocus')); 39 | echo '
'; 40 | echo form_label('Cost (%)', 'cost'); 41 | 42 | echo form_input(array('name' => 'cost', 'class' => 'form-control', 'value' => $cost, 'placeholder' => 'Cost in percentage (%)', 'required' => 'required')); 43 | echo '
'; 44 | echo form_submit(array('name' => 'submit', 'class' => 'btn btn-primary', 'value' => 'Update')); 45 | echo form_close(); 46 | ?> 47 |
48 |
49 | -------------------------------------------------------------------------------- /system/core/Controller.php: -------------------------------------------------------------------------------- 1 | $class) 45 | { 46 | $this->$var =& load_class($class); 47 | } 48 | 49 | $this->load =& load_class('Loader', 'core'); 50 | 51 | $this->load->initialize(); 52 | 53 | log_message('debug', "Controller Class Initialized"); 54 | } 55 | 56 | public static function &get_instance() 57 | { 58 | return self::$instance; 59 | } 60 | } 61 | // END Controller class 62 | 63 | /* End of file Controller.php */ 64 | /* Location: ./system/core/Controller.php */ -------------------------------------------------------------------------------- /application/config/foreign_chars.php: -------------------------------------------------------------------------------- 1 | 'ae', 12 | '/ö|œ/' => 'oe', 13 | '/ü/' => 'ue', 14 | '/Ä/' => 'Ae', 15 | '/Ü/' => 'Ue', 16 | '/Ö/' => 'Oe', 17 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A', 18 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a', 19 | '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', 20 | '/ç|ć|ĉ|ċ|č/' => 'c', 21 | '/Ð|Ď|Đ/' => 'D', 22 | '/ð|ď|đ/' => 'd', 23 | '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E', 24 | '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e', 25 | '/Ĝ|Ğ|Ġ|Ģ/' => 'G', 26 | '/ĝ|ğ|ġ|ģ/' => 'g', 27 | '/Ĥ|Ħ/' => 'H', 28 | '/ĥ|ħ/' => 'h', 29 | '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I', 30 | '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i', 31 | '/Ĵ/' => 'J', 32 | '/ĵ/' => 'j', 33 | '/Ķ/' => 'K', 34 | '/ķ/' => 'k', 35 | '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L', 36 | '/ĺ|ļ|ľ|ŀ|ł/' => 'l', 37 | '/Ñ|Ń|Ņ|Ň/' => 'N', 38 | '/ñ|ń|ņ|ň|ʼn/' => 'n', 39 | '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O', 40 | '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o', 41 | '/Ŕ|Ŗ|Ř/' => 'R', 42 | '/ŕ|ŗ|ř/' => 'r', 43 | '/Ś|Ŝ|Ş|Š/' => 'S', 44 | '/ś|ŝ|ş|š|ſ/' => 's', 45 | '/Ţ|Ť|Ŧ/' => 'T', 46 | '/ţ|ť|ŧ/' => 't', 47 | '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U', 48 | '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u', 49 | '/Ý|Ÿ|Ŷ/' => 'Y', 50 | '/ý|ÿ|ŷ/' => 'y', 51 | '/Ŵ/' => 'W', 52 | '/ŵ/' => 'w', 53 | '/Ź|Ż|Ž/' => 'Z', 54 | '/ź|ż|ž/' => 'z', 55 | '/Æ|Ǽ/' => 'AE', 56 | '/ß/'=> 'ss', 57 | '/IJ/' => 'IJ', 58 | '/ij/' => 'ij', 59 | '/Œ/' => 'OE', 60 | '/ƒ/' => 'f' 61 | ); 62 | 63 | /* End of file foreign_chars.php */ 64 | /* Location: ./application/config/foreign_chars.php */ -------------------------------------------------------------------------------- /vehicle.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 3.5.1 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- Host: localhost 6 | -- Generation Time: May 06, 2014 at 10:47 AM 7 | -- Server version: 5.5.24-log 8 | -- PHP Version: 5.3.13 9 | 10 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8 */; 18 | 19 | -- 20 | -- Database: `car_rental` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Table structure for table `vehicle` 27 | -- 28 | 29 | CREATE TABLE IF NOT EXISTS `vehicle` ( 30 | `type` varchar(25) NOT NULL, 31 | `name` varchar(25) NOT NULL, 32 | `transmission` varchar(25) NOT NULL, 33 | `daily` int(11) NOT NULL, 34 | `capacity` int(11) NOT NULL, 35 | `luggage` int(11) NOT NULL, 36 | `ac` enum('1','0') NOT NULL, 37 | `vehicle_id` int(11) NOT NULL AUTO_INCREMENT, 38 | PRIMARY KEY (`vehicle_id`) 39 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; 40 | 41 | -- 42 | -- Dumping data for table `vehicle` 43 | -- 44 | 45 | INSERT INTO `vehicle` (`type`, `name`, `transmission`, `daily`, `capacity`, `luggage`, `ac`, `vehicle_id`) VALUES 46 | ('Compact', 'Perodua Viva', 'Auto', 150, 4, 2, '1', 1), 47 | ('Standard', 'Toyota Vios', 'Auto', 250, 5, 4, '1', 2), 48 | ('Luxury', 'Honda Accord', 'Auto', 550, 5, 5, '1', 3), 49 | ('MPV', 'Toyota Avanza', 'Auto', 450, 8, 4, '1', 4), 50 | ('Van', 'Toyota HiAce', 'Auto', 300, 12, 6, '0', 5); 51 | 52 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 53 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 54 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 55 | -------------------------------------------------------------------------------- /public/calendar/less/month.less: -------------------------------------------------------------------------------- 1 | .cal-row-head [class*="cal-cell"]:first-child, 2 | .cal-row-head [class*="cal-cell"] { 3 | min-height: auto; 4 | overflow: hidden; 5 | text-overflow: ellipsis; 6 | } 7 | .cal-events-num { 8 | margin-top: 20px; 9 | } 10 | .cal-month-day { 11 | position: relative; 12 | display: block; 13 | width: 100%; 14 | } 15 | 16 | #cal-week-box { 17 | position: absolute; 18 | width: 70px; 19 | left: -71px; 20 | top: -1px; 21 | padding: 8px 5px; 22 | cursor: pointer; 23 | } 24 | 25 | #cal-day-tick { 26 | position: absolute; 27 | right: 50%; 28 | bottom: -21px; 29 | padding: 0px 5px; 30 | cursor: pointer; 31 | z-index: 5; 32 | text-align: center; 33 | width: 26px; 34 | margin-right: -17px; 35 | } 36 | .cal-year-box #cal-day-tick { 37 | margin-right: -7px; 38 | } 39 | 40 | #cal-slide-box { 41 | position: relative; 42 | } 43 | 44 | #cal-slide-tick { 45 | position: absolute; 46 | width: 16px; 47 | margin-left: -7px; 48 | height: 9px; 49 | top: -1px; 50 | z-index: 1; 51 | } 52 | #cal-slide-tick.tick-month1 { 53 | left: 12.5%; 54 | } 55 | #cal-slide-tick.tick-month2 { 56 | left: 37.5%; 57 | } 58 | #cal-slide-tick.tick-month3 { 59 | left: 62.5%; 60 | } 61 | #cal-slide-tick.tick-month4 { 62 | left: 87.5%; 63 | } 64 | 65 | #cal-slide-tick.tick-day1 { 66 | left: 7.14285714285715%; 67 | } 68 | #cal-slide-tick.tick-day2 { 69 | left: 21.42857142857143%; 70 | } 71 | #cal-slide-tick.tick-day3 { 72 | left: 35.71428571428572%; 73 | } 74 | #cal-slide-tick.tick-day4 { 75 | left: 50%; 76 | } 77 | #cal-slide-tick.tick-day5 { 78 | left: 64.2857142857143%; 79 | } 80 | #cal-slide-tick.tick-day6 { 81 | left: 78.57142857142859%; 82 | } 83 | #cal-slide-tick.tick-day7 { 84 | left: 92.85714285714285%; 85 | } 86 | .events-list { 87 | position: absolute; 88 | bottom: 0; 89 | left: 0; 90 | overflow: hidden; 91 | } 92 | #cal-slide-content ul.unstyled { 93 | margin-bottom: 0; 94 | } 95 | -------------------------------------------------------------------------------- /system/language/english/form_validation_lang.php: -------------------------------------------------------------------------------- 1 | ' + val.title + '') 21 | .appendTo(list); 22 | }); 23 | }, 24 | onAfterViewLoad: function(view) { 25 | $('.page-header h3').text(this.getTitle()); 26 | $('.btn-group button').removeClass('active'); 27 | $('button[data-calendar-view="' + view + '"]').addClass('active'); 28 | }, 29 | classes: { 30 | months: { 31 | general: 'label' 32 | } 33 | } 34 | }; 35 | 36 | var calendar = $('#calendar').calendar(options); 37 | 38 | $('.btn-group button[data-calendar-nav]').each(function() { 39 | var $this = $(this); 40 | $this.click(function() { 41 | calendar.navigate($this.data('calendar-nav')); 42 | }); 43 | }); 44 | 45 | $('.btn-group button[data-calendar-view]').each(function() { 46 | var $this = $(this); 47 | $this.click(function() { 48 | calendar.view($this.data('calendar-view')); 49 | }); 50 | }); 51 | 52 | $('#first_day').change(function(){ 53 | var value = $(this).val(); 54 | value = value.length ? parseInt(value) : null; 55 | calendar.setOptions({first_day: value}); 56 | calendar.view(); 57 | }); 58 | 59 | $('#language').change(function(){ 60 | calendar.setLanguage($(this).val()); 61 | calendar.view(); 62 | }); 63 | 64 | $('#events-in-modal').change(function(){ 65 | var val = $(this).is(':checked') ? $(this).val() : null; 66 | calendar.setOptions({modal: val}); 67 | }); 68 | $('#events-modal .modal-header, #events-modal .modal-footer').click(function(e){ 69 | //e.preventDefault(); 70 | //e.stopPropagation(); 71 | }); 72 | }(jQuery)); -------------------------------------------------------------------------------- /application/controllers/register.php: -------------------------------------------------------------------------------- 1 | index(); 10 | break; 11 | case 'create_user': 12 | $this->create_user(); 13 | break; 14 | default: 15 | show_404();; 16 | break; 17 | } 18 | } 19 | 20 | public function index($msg = NULL) 21 | { 22 | //$data['main_content'] = 'register'; 23 | $data['msg'] = $msg; 24 | $this->load->view('header'); 25 | $this->load->view('view_register', $data); 26 | $this->load->view('footer'); 27 | } 28 | 29 | function create_user() 30 | { 31 | $this->load->library('form_validation'); 32 | $this->form_validation->set_rules('first_name', 'First Name', 'trim|required|alpha'); 33 | $this->form_validation->set_rules('last_name', 'Last Name', 'trim|required|name_space'); 34 | $this->form_validation->set_rules('gender', 'Gender', 'trim|required'); 35 | $this->form_validation->set_rules('email_address', 'Email Address', 'trim|required|valid_email'); 36 | $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[4]'); 37 | $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]|strong_pass[3]'); 38 | $this->form_validation->set_rules('password2', 'Password Confirmation', 'trim|required|matches[password]'); 39 | 40 | if($this->form_validation->run() == FALSE) 41 | { 42 | $data['msg'] = NULL; 43 | $this->load->view('header'); 44 | $this->load->view('view_register', $data); 45 | $this->load->view('footer'); 46 | } 47 | else 48 | { 49 | $this->load->model('model_user'); 50 | 51 | if($query = $this->model_user->create_user()) 52 | { 53 | redirect(base_url() . 'login'); 54 | } 55 | else 56 | { 57 | $msg = "Username already in use, please choose another."; 58 | $this->index($msg); 59 | } 60 | } 61 | 62 | } 63 | } -------------------------------------------------------------------------------- /application/libraries/MY_Form_validation.php: -------------------------------------------------------------------------------- 1 | CI->form_validation->set_message('strong_pass', 13 | 'This %s is not strong enough (hint: need combination of digit, char, special char)'); 14 | 15 | $score = 0; 16 | //digit 17 | if(preg_match('!\d!',$value)){ 18 | $score++; 19 | } 20 | //char 21 | if(preg_match('![A-z]!',$value)){ 22 | $score++; 23 | } 24 | //special char 25 | if(preg_match('!\W!',$value)){ 26 | $score++; 27 | } 28 | if(strlen($value)>=8){ 29 | $score++; 30 | } 31 | 32 | if($score < $params){ 33 | return false; 34 | } 35 | 36 | return true; 37 | } 38 | 39 | function ic_no($value){ 40 | 41 | $this->CI->form_validation->set_message('ic_no', 42 | 'This %s is not ic number (hint: 123456-12-1234) '); 43 | 44 | if(preg_match('/^\d{6}\-\d{2}\-\d{4}$/',$value)){ 45 | return true ; 46 | } 47 | else 48 | { 49 | return false; 50 | } 51 | } 52 | 53 | function li_no($value){ 54 | 55 | $this->CI->form_validation->set_message('li_no', 56 | 'This %s is not License number (hint: 123456) '); 57 | 58 | if(preg_match('/^\d{6}$/',$value)){ 59 | return true ; 60 | } 61 | else 62 | { 63 | return false; 64 | } 65 | } 66 | 67 | function name_space($value){ 68 | 69 | $this->CI->form_validation->set_message('name_space', 70 | 'The Name field may only contain alphabetical and space characters.'); 71 | 72 | if(preg_match('/^[a-zA-Z\s]+$/',$value)){ 73 | return true ; 74 | } 75 | else 76 | { 77 | return false; 78 | } 79 | } 80 | 81 | function phone($value){ 82 | 83 | $this->CI->form_validation->set_message('phone', 84 | 'The %s should be in this format 123-1324567'); 85 | 86 | if(preg_match('/^\d{3}\-\d{7}$/',$value)){ 87 | return true ; 88 | } 89 | else 90 | { 91 | return false; 92 | } 93 | } 94 | 95 | } -------------------------------------------------------------------------------- /system/helpers/path_helper.php: -------------------------------------------------------------------------------- 1 | ","\"", "'", "-"), 53 | array("&", "<", ">", """, "'", "-"), 54 | $str); 55 | 56 | // Decode the temp markers back to entities 57 | $str = preg_replace("/$temp(\d+);/","&#\\1;",$str); 58 | 59 | if ($protect_all === TRUE) 60 | { 61 | $str = preg_replace("/$temp(\w+);/","&\\1;", $str); 62 | } 63 | 64 | return $str; 65 | } 66 | } 67 | 68 | // ------------------------------------------------------------------------ 69 | 70 | /* End of file xml_helper.php */ 71 | /* Location: ./system/helpers/xml_helper.php */ -------------------------------------------------------------------------------- /system/language/english/imglib_lang.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |
6 |

Vehicle with id (" . $row->vehicle_id . ")
"; ?>

7 | 8 | 9 |
10 | vehicle_id; 12 | $sql = mysql_query("SELECT * FROM vehicle WHERE vehicle_id ='$vehicle_id'"); 13 | $row_vehicle = mysql_fetch_array($sql); 14 | echo "

Vehicle Details:

"; 15 | echo "
  • Type: " . $row_vehicle['type'] . "
  • "; 16 | echo "
  • Name: " . $row_vehicle['name'] . "
  • "; 17 | echo "
  • Transmission: " . $row_vehicle['transmission'] . "
  • "; 18 | echo "
  • Daily Price: RM " . $row_vehicle['daily'] . "
  • "; 19 | ?> 20 | 21 | Reservation Details: "; 23 | echo "
  • Location: " . $row->location . "
  • "; 24 | echo "
  • Phone Number: " . $row->phone . "
  • "; 25 | echo "
  • User ID: " . $row->user_id . "
  • "; 26 | ?> 27 | 28 | user_id; 30 | 31 | $sql = mysql_query("SELECT * FROM users WHERE user_id = '$user_id'"); 32 | $row_user = mysql_fetch_array($sql); 33 | echo "

    User Details:

    "; 34 | echo "
  • Name: " . $row_user['first_name'] . " " . $row_user['last_name'] . "
  • "; 35 | echo "
  • Gender: " . $row_user['gender'] . "
  • "; 36 | echo "
  • Email Address: " . $row_user['email_address'] . "
  • "; 37 | ?> 38 | 39 |
    40 | 41 |
    42 | 43 | 46 |
    47 | 48 |
    49 | -------------------------------------------------------------------------------- /system/helpers/number_helper.php: -------------------------------------------------------------------------------- 1 | lang->load('number'); 43 | 44 | if ($num >= 1000000000000) 45 | { 46 | $num = round($num / 1099511627776, $precision); 47 | $unit = $CI->lang->line('terabyte_abbr'); 48 | } 49 | elseif ($num >= 1000000000) 50 | { 51 | $num = round($num / 1073741824, $precision); 52 | $unit = $CI->lang->line('gigabyte_abbr'); 53 | } 54 | elseif ($num >= 1000000) 55 | { 56 | $num = round($num / 1048576, $precision); 57 | $unit = $CI->lang->line('megabyte_abbr'); 58 | } 59 | elseif ($num >= 1000) 60 | { 61 | $num = round($num / 1024, $precision); 62 | $unit = $CI->lang->line('kilobyte_abbr'); 63 | } 64 | else 65 | { 66 | $unit = $CI->lang->line('bytes'); 67 | return number_format($num).' '.$unit; 68 | } 69 | 70 | return number_format($num, $precision).' '.$unit; 71 | } 72 | } 73 | 74 | 75 | /* End of file number_helper.php */ 76 | /* Location: ./system/helpers/number_helper.php */ -------------------------------------------------------------------------------- /application/views/view_admin_schedule_details.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Schedule Details

    4 |
    5 | 6 |
    7 | 8 |
    9 |
    10 |

    Vehicle with id (" . $row->vehicle_id . ")
    "; ?>

    11 | 12 | 13 |
    14 | vehicle_id; 16 | $sql = mysql_query("SELECT * FROM vehicle WHERE vehicle_id ='$vehicle_id'"); 17 | $row_vehicle = mysql_fetch_array($sql); 18 | echo "

    Vehicle Details:

    "; 19 | echo "
  • Type: " . $row_vehicle['type'] . "
  • "; 20 | echo "
  • Name: " . $row_vehicle['name'] . "
  • "; 21 | echo "
  • Transmission: " . $row_vehicle['transmission'] . "
  • "; 22 | echo "
  • Daily Price: RM " . $row_vehicle['daily'] . "
  • "; 23 | ?> 24 | 25 | Reservation Details: "; 27 | echo "
  • Location: " . $row->location . "
  • "; 28 | echo "
  • Phone Number: " . $row->phone . "
  • "; 29 | echo "
  • User ID: " . $row->user_id . "
  • "; 30 | ?> 31 | 32 | user_id; 34 | 35 | $sql = mysql_query("SELECT * FROM users WHERE user_id = '$user_id'"); 36 | $row_user = mysql_fetch_array($sql); 37 | echo "

    User Details:

    "; 38 | echo "
  • Name: " . $row_user['first_name'] . " " . $row_user['last_name'] . "
  • "; 39 | echo "
  • Gender: " . $row_user['gender'] . "
  • "; 40 | echo "
  • Email Address: " . $row_user['email_address'] . "
  • "; 41 | ?> 42 | 43 |
    44 | 45 |
    46 | 47 | 50 |
    51 | 52 |
    53 |
    -------------------------------------------------------------------------------- /system/database/drivers/postgre/postgre_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | } 85 | 86 | 87 | /* End of file postgre_utility.php */ 88 | /* Location: ./system/database/drivers/postgre/postgre_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/oci8/oci8_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | } 85 | 86 | /* End of file oci8_utility.php */ 87 | /* Location: ./system/database/drivers/oci8/oci8_utility.php */ -------------------------------------------------------------------------------- /system/language/english/db_lang.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | 85 | } 86 | 87 | /* End of file mssql_utility.php */ 88 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/mysqli/mysqli_utility.php: -------------------------------------------------------------------------------- 1 | db->_escape_identifiers($table); 52 | } 53 | 54 | // -------------------------------------------------------------------- 55 | 56 | /** 57 | * Repair table query 58 | * 59 | * Generates a platform-specific query so that a table can be repaired 60 | * 61 | * @access private 62 | * @param string the table name 63 | * @return object 64 | */ 65 | function _repair_table($table) 66 | { 67 | return "REPAIR TABLE ".$this->db->_escape_identifiers($table); 68 | } 69 | 70 | // -------------------------------------------------------------------- 71 | 72 | /** 73 | * MySQLi Export 74 | * 75 | * @access private 76 | * @param array Preferences 77 | * @return mixed 78 | */ 79 | function _backup($params = array()) 80 | { 81 | // Currently unsupported 82 | return $this->db->display_error('db_unsuported_feature'); 83 | } 84 | } 85 | 86 | /* End of file mysqli_utility.php */ 87 | /* Location: ./system/database/drivers/mysqli/mysqli_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/sqlsrv_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | 85 | } 86 | 87 | /* End of file mssql_utility.php */ 88 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */ -------------------------------------------------------------------------------- /system/helpers/directory_helper.php: -------------------------------------------------------------------------------- 1 | 0) && @is_dir($source_dir.$file)) 61 | { 62 | $filedata[$file] = directory_map($source_dir.$file.DIRECTORY_SEPARATOR, $new_depth, $hidden); 63 | } 64 | else 65 | { 66 | $filedata[] = $file; 67 | } 68 | } 69 | 70 | closedir($fp); 71 | return $filedata; 72 | } 73 | 74 | return FALSE; 75 | } 76 | } 77 | 78 | 79 | /* End of file directory_helper.php */ 80 | /* Location: ./system/helpers/directory_helper.php */ -------------------------------------------------------------------------------- /public/calendar/tmpls/day.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    <%= cal.locale.time %>
    4 |
    <%= cal.locale.events %>
    5 |
    6 | <% if(all_day.length) {%> 7 |
    8 |
    <%= cal.locale.all_day %>
    9 |
    10 | <% _.each(all_day, function(event){ %> 11 |
    12 | <%= event.title %> 13 |
    14 | <% }); %> 15 |
    16 |
    17 | <% }; %> 18 | <% if(before_time.length) {%> 19 |
    20 |
    <%= cal.locale.before_time %>
    21 |
    22 | <% _.each(before_time, function(event){ %> 23 |
    24 | <%= event.end_hour %> 25 | <%= event.title %> 26 |
    27 | <% }); %> 28 |
    29 |
    30 | <% }; %> 31 |
    32 | <% _.each(by_hour, function(event){ %> 33 |
    34 | <%= event.start_hour %> - <%= event.end_hour %> 35 | <%= event.title %> 36 |
    37 | <% }); %> 38 | 39 |
    40 | <% for(i = 0; i < hours; i++){ %> 41 |
    42 | <% for(l = 0; l < in_hour; l++){ %> 43 |
    44 |
    <%= cal._hour(i, l) %>
    45 |
    46 |
    47 | <% }; %> 48 |
    49 | <% }; %> 50 |
    51 |
    52 | <% if(after_time.length) {%> 53 |
    54 |
    <%= cal.locale.after_time %>
    55 |
    56 | <% _.each(after_time, function(event){ %> 57 |
    58 | <%= event.start_hour %> 59 | <%= event.title %> 60 |
    61 | <% }); %> 62 |
    63 |
    64 | <% }; %> 65 |
    -------------------------------------------------------------------------------- /application/models/model_gallery.php: -------------------------------------------------------------------------------- 1 | db->query("SELECT * FROM vehicle"); 6 | if($query->num_rows() > 0) { 7 | foreach($query->result() as $row) { 8 | $data[] = $row; 9 | } 10 | return $data; 11 | } 12 | } 13 | 14 | function search() { 15 | $size = $this->input->post('size'); 16 | $query = $this->db->get_where('vehicle', array('type' => $size)); 17 | if($query->num_rows() > 0) { 18 | foreach($query->result() as $row) { 19 | $data[] = $row; 20 | } 21 | return $data; 22 | } 23 | } 24 | 25 | function booking() { 26 | $vehicle_id = $this->uri->segment(3); 27 | $query = $this->db->get_where('vehicle', array('vehicle_id' => $vehicle_id)); 28 | if($query->num_rows() > 0) { 29 | foreach($query->result() as $row) { 30 | $data[] = $row; 31 | } 32 | return $data; 33 | } 34 | } 35 | 36 | function reserve_vehicle() 37 | { 38 | 39 | $pickup = date('Y-m-d', strtotime($this->input->post('pickup'))); 40 | $dropoff = date('Y-m-d', strtotime($this->input->post('dropoff'))); 41 | $vehicle_id = $this->uri->segment(3); 42 | 43 | $sql_check_availability = mysql_query( 44 | "SELECT * 45 | FROM reservation 46 | WHERE (pickup <= '$pickup' AND dropoff >= '$dropoff') 47 | AND (vehicle_id = '$vehicle_id') 48 | LIMIT 1" 49 | ); 50 | $res_check = mysql_num_rows($sql_check_availability); 51 | 52 | $sql_check_availability2 = mysql_query( 53 | "SELECT * 54 | FROM reservation 55 | WHERE (pickup <= '$pickup' AND dropoff >= '$pickup' AND dropoff <= '$dropoff') 56 | AND (vehicle_id = '$vehicle_id') 57 | LIMIT 1" 58 | ); 59 | $res_check2 = mysql_num_rows($sql_check_availability2); 60 | 61 | 62 | if ($res_check > 0 || $res_check2>0){ 63 | return false; 64 | } 65 | else 66 | { 67 | $insert_reservation_data = array( 68 | 'vehicle_id' => $vehicle_id, 69 | 'status' => $this->input->post('status'), 70 | 'phone' => $this->input->post('phone'), 71 | 'user_id' => $this->input->post('user_id'), 72 | 'location' => $this->input->post('location'), 73 | 'pickup' => $pickup, 74 | 'pickuptime' => $this->input->post('pickuptime'), 75 | 'dropoff' => $dropoff, 76 | 'dropofftime' => $this->input->post('dropofftime') 77 | 78 | ); 79 | $insert = $this->db->insert('reservation', $insert_reservation_data); 80 | return $insert; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite/sqlite_utility.php: -------------------------------------------------------------------------------- 1 | db_debug) 41 | { 42 | return $this->db->display_error('db_unsuported_feature'); 43 | } 44 | return array(); 45 | } 46 | 47 | // -------------------------------------------------------------------- 48 | 49 | /** 50 | * Optimize table query 51 | * 52 | * Is optimization even supported in SQLite? 53 | * 54 | * @access private 55 | * @param string the table name 56 | * @return object 57 | */ 58 | function _optimize_table($table) 59 | { 60 | return FALSE; 61 | } 62 | 63 | // -------------------------------------------------------------------- 64 | 65 | /** 66 | * Repair table query 67 | * 68 | * Are table repairs even supported in SQLite? 69 | * 70 | * @access private 71 | * @param string the table name 72 | * @return object 73 | */ 74 | function _repair_table($table) 75 | { 76 | return FALSE; 77 | } 78 | 79 | // -------------------------------------------------------------------- 80 | 81 | /** 82 | * SQLite Export 83 | * 84 | * @access private 85 | * @param array Preferences 86 | * @return mixed 87 | */ 88 | function _backup($params = array()) 89 | { 90 | // Currently unsupported 91 | return $this->db->display_error('db_unsuported_feature'); 92 | } 93 | } 94 | 95 | /* End of file sqlite_utility.php */ 96 | /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ -------------------------------------------------------------------------------- /system/helpers/typography_helper.php: -------------------------------------------------------------------------------- 1 | load->library('typography'); 44 | 45 | return $CI->typography->nl2br_except_pre($str); 46 | } 47 | } 48 | 49 | // ------------------------------------------------------------------------ 50 | 51 | /** 52 | * Auto Typography Wrapper Function 53 | * 54 | * 55 | * @access public 56 | * @param string 57 | * @param bool whether to allow javascript event handlers 58 | * @param bool whether to reduce multiple instances of double newlines to two 59 | * @return string 60 | */ 61 | if ( ! function_exists('auto_typography')) 62 | { 63 | function auto_typography($str, $strip_js_event_handlers = TRUE, $reduce_linebreaks = FALSE) 64 | { 65 | $CI =& get_instance(); 66 | $CI->load->library('typography'); 67 | return $CI->typography->auto_typography($str, $strip_js_event_handlers, $reduce_linebreaks); 68 | } 69 | } 70 | 71 | 72 | // -------------------------------------------------------------------- 73 | 74 | /** 75 | * HTML Entities Decode 76 | * 77 | * This function is a replacement for html_entity_decode() 78 | * 79 | * @access public 80 | * @param string 81 | * @return string 82 | */ 83 | if ( ! function_exists('entity_decode')) 84 | { 85 | function entity_decode($str, $charset='UTF-8') 86 | { 87 | global $SEC; 88 | return $SEC->entity_decode($str, $charset); 89 | } 90 | } 91 | 92 | /* End of file typography_helper.php */ 93 | /* Location: ./system/helpers/typography_helper.php */ -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008 - 2011, EllisLab, Inc. 2 | All rights reserved. 3 | 4 | This license is a legal agreement between you and EllisLab Inc. for the use 5 | of CodeIgniter Software (the "Software"). By obtaining the Software you 6 | agree to comply with the terms and conditions of this license. 7 | 8 | PERMITTED USE 9 | You are permitted to use, copy, modify, and distribute the Software and its 10 | documentation, with or without modification, for any purpose, provided that 11 | the following conditions are met: 12 | 13 | 1. A copy of this license agreement must be included with the distribution. 14 | 15 | 2. Redistributions of source code must retain the above copyright notice in 16 | all source code files. 17 | 18 | 3. Redistributions in binary form must reproduce the above copyright notice 19 | in the documentation and/or other materials provided with the distribution. 20 | 21 | 4. Any files that have been modified must carry notices stating the nature 22 | of the change and the names of those who changed them. 23 | 24 | 5. Products derived from the Software must include an acknowledgment that 25 | they are derived from CodeIgniter in their documentation and/or other 26 | materials provided with the distribution. 27 | 28 | 6. Products derived from the Software may not be called "CodeIgniter", 29 | nor may "CodeIgniter" appear in their name, without prior written 30 | permission from EllisLab, Inc. 31 | 32 | INDEMNITY 33 | You agree to indemnify and hold harmless the authors of the Software and 34 | any contributors for any direct, indirect, incidental, or consequential 35 | third-party claims, actions or suits, as well as any related expenses, 36 | liabilities, damages, settlements or fees arising from your use or misuse 37 | of the Software, or a violation of any terms of this license. 38 | 39 | DISCLAIMER OF WARRANTY 40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR 41 | IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, 42 | NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 43 | 44 | LIMITATIONS OF LIABILITY 45 | YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. 46 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE 47 | FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION 48 | WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE 49 | APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING 50 | BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF 51 | DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. 52 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/pdo_utility.php: -------------------------------------------------------------------------------- 1 | db->db_debug) 37 | { 38 | return $this->db->display_error('db_unsuported_feature'); 39 | } 40 | return FALSE; 41 | } 42 | 43 | // -------------------------------------------------------------------- 44 | 45 | /** 46 | * Optimize table query 47 | * 48 | * Generates a platform-specific query so that a table can be optimized 49 | * 50 | * @access private 51 | * @param string the table name 52 | * @return object 53 | */ 54 | function _optimize_table($table) 55 | { 56 | // Not a supported PDO feature 57 | if ($this->db->db_debug) 58 | { 59 | return $this->db->display_error('db_unsuported_feature'); 60 | } 61 | return FALSE; 62 | } 63 | 64 | // -------------------------------------------------------------------- 65 | 66 | /** 67 | * Repair table query 68 | * 69 | * Generates a platform-specific query so that a table can be repaired 70 | * 71 | * @access private 72 | * @param string the table name 73 | * @return object 74 | */ 75 | function _repair_table($table) 76 | { 77 | // Not a supported PDO feature 78 | if ($this->db->db_debug) 79 | { 80 | return $this->db->display_error('db_unsuported_feature'); 81 | } 82 | return FALSE; 83 | } 84 | 85 | // -------------------------------------------------------------------- 86 | 87 | /** 88 | * PDO Export 89 | * 90 | * @access private 91 | * @param array Preferences 92 | * @return mixed 93 | */ 94 | function _backup($params = array()) 95 | { 96 | // Currently unsupported 97 | return $this->db->display_error('db_unsuported_feature'); 98 | } 99 | 100 | } 101 | 102 | /* End of file pdo_utility.php */ 103 | /* Location: ./system/database/drivers/pdo/pdo_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/odbc/odbc_utility.php: -------------------------------------------------------------------------------- 1 | db->db_debug) 37 | { 38 | return $this->db->display_error('db_unsuported_feature'); 39 | } 40 | return FALSE; 41 | } 42 | 43 | // -------------------------------------------------------------------- 44 | 45 | /** 46 | * Optimize table query 47 | * 48 | * Generates a platform-specific query so that a table can be optimized 49 | * 50 | * @access private 51 | * @param string the table name 52 | * @return object 53 | */ 54 | function _optimize_table($table) 55 | { 56 | // Not a supported ODBC feature 57 | if ($this->db->db_debug) 58 | { 59 | return $this->db->display_error('db_unsuported_feature'); 60 | } 61 | return FALSE; 62 | } 63 | 64 | // -------------------------------------------------------------------- 65 | 66 | /** 67 | * Repair table query 68 | * 69 | * Generates a platform-specific query so that a table can be repaired 70 | * 71 | * @access private 72 | * @param string the table name 73 | * @return object 74 | */ 75 | function _repair_table($table) 76 | { 77 | // Not a supported ODBC feature 78 | if ($this->db->db_debug) 79 | { 80 | return $this->db->display_error('db_unsuported_feature'); 81 | } 82 | return FALSE; 83 | } 84 | 85 | // -------------------------------------------------------------------- 86 | 87 | /** 88 | * ODBC Export 89 | * 90 | * @access private 91 | * @param array Preferences 92 | * @return mixed 93 | */ 94 | function _backup($params = array()) 95 | { 96 | // Currently unsupported 97 | return $this->db->display_error('db_unsuported_feature'); 98 | } 99 | 100 | } 101 | 102 | /* End of file odbc_utility.php */ 103 | /* Location: ./system/database/drivers/odbc/odbc_utility.php */ -------------------------------------------------------------------------------- /application/models/model_user.php: -------------------------------------------------------------------------------- 1 | input->post('username'); 6 | $password = md5($this->input->post('password')); 7 | $query = $this->db->get_where('users', array('username' => $username, 'password' => $password)); 8 | 9 | if($query->num_rows() > 0) { 10 | $row = $query->row(); 11 | $data = array( 12 | 'user_id' => $row->user_id, 13 | 'username' => $row->username, 14 | 'admin' => $row->admin, 15 | 'password' => $row->password, 16 | 'loggedIn' => true 17 | ); 18 | $this->session->set_userdata($data); 19 | return true; 20 | } 21 | return false; 22 | } 23 | 24 | function create_user() 25 | { 26 | $username = $this->input->post('username'); 27 | $sql_username_check = mysql_query("SELECT user_id FROM users WHERE username= '$username' LIMIT 1"); 28 | $username_check = mysql_num_rows($sql_username_check); 29 | 30 | if ($username_check > 0 ){ 31 | return false; 32 | } 33 | else 34 | { 35 | $new_member_insert_data = array( 36 | 'first_name' => $this->input->post('first_name'), 37 | 'last_name' => $this->input->post('last_name'), 38 | 'gender' => $this->input->post('gender'), 39 | 'email_address' => $this->input->post('email_address'), 40 | 'username' => $this->input->post('username'), 41 | 'password' => md5($this->input->post('password')), 42 | 'password2' => md5($this->input->post('password2')), 43 | 'accounttype' => $this->input->post('accounttype'), 44 | 'verified' => $this->input->post('verified'), 45 | 'signupdate' => date("Y-m-d H:i:s") 46 | ); 47 | 48 | 49 | $insert = $this->db->insert('users', $new_member_insert_data); 50 | return $insert; 51 | } 52 | } 53 | 54 | function edit_user() 55 | { 56 | $user_id = $this->session->userdata('user_id'); 57 | 58 | $new_first_name = $this->input->post('first_name'); 59 | $new_last_name = $this->input->post('last_name'); 60 | $new_email_address = $this->input->post('email_address'); 61 | 62 | $sql_update = $this->db->query("UPDATE users 63 | SET first_name = '$new_first_name', 64 | last_name = '$new_last_name' , 65 | email_address = '$new_email_address' 66 | WHERE user_id = $user_id "); 67 | return $sql_update; 68 | } 69 | 70 | function verify_user() 71 | { 72 | $user_id = $this->session->userdata('user_id'); 73 | 74 | $ic_no = $this->input->post('ic_no'); 75 | $li_no = $this->input->post('li_no'); 76 | 77 | $sql_add = $this->db->query("UPDATE users 78 | SET ic_no = '$ic_no', 79 | li_no = '$li_no', 80 | verified = '1' 81 | WHERE user_id = $user_id "); 82 | 83 | 84 | return $sql_add; 85 | 86 | } 87 | } -------------------------------------------------------------------------------- /system/helpers/cookie_helper.php: -------------------------------------------------------------------------------- 1 | input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); 52 | } 53 | } 54 | 55 | // -------------------------------------------------------------------- 56 | 57 | /** 58 | * Fetch an item from the COOKIE array 59 | * 60 | * @access public 61 | * @param string 62 | * @param bool 63 | * @return mixed 64 | */ 65 | if ( ! function_exists('get_cookie')) 66 | { 67 | function get_cookie($index = '', $xss_clean = FALSE) 68 | { 69 | $CI =& get_instance(); 70 | 71 | $prefix = ''; 72 | 73 | if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '') 74 | { 75 | $prefix = config_item('cookie_prefix'); 76 | } 77 | 78 | return $CI->input->cookie($prefix.$index, $xss_clean); 79 | } 80 | } 81 | 82 | // -------------------------------------------------------------------- 83 | 84 | /** 85 | * Delete a COOKIE 86 | * 87 | * @param mixed 88 | * @param string the cookie domain. Usually: .yourdomain.com 89 | * @param string the cookie path 90 | * @param string the cookie prefix 91 | * @return void 92 | */ 93 | if ( ! function_exists('delete_cookie')) 94 | { 95 | function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') 96 | { 97 | set_cookie($name, '', '', $domain, $path, $prefix); 98 | } 99 | } 100 | 101 | 102 | /* End of file cookie_helper.php */ 103 | /* Location: ./system/helpers/cookie_helper.php */ -------------------------------------------------------------------------------- /system/helpers/array_helper.php: -------------------------------------------------------------------------------- 1 | '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4'); 34 | 35 | /** 36 | * Constructor 37 | */ 38 | public function __construct() 39 | { 40 | $config =& get_config(); 41 | 42 | $this->_log_path = ($config['log_path'] != '') ? $config['log_path'] : APPPATH.'logs/'; 43 | 44 | if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path)) 45 | { 46 | $this->_enabled = FALSE; 47 | } 48 | 49 | if (is_numeric($config['log_threshold'])) 50 | { 51 | $this->_threshold = $config['log_threshold']; 52 | } 53 | 54 | if ($config['log_date_format'] != '') 55 | { 56 | $this->_date_fmt = $config['log_date_format']; 57 | } 58 | } 59 | 60 | // -------------------------------------------------------------------- 61 | 62 | /** 63 | * Write Log File 64 | * 65 | * Generally this function will be called using the global log_message() function 66 | * 67 | * @param string the error level 68 | * @param string the error message 69 | * @param bool whether the error is a native PHP error 70 | * @return bool 71 | */ 72 | public function write_log($level = 'error', $msg, $php_error = FALSE) 73 | { 74 | if ($this->_enabled === FALSE) 75 | { 76 | return FALSE; 77 | } 78 | 79 | $level = strtoupper($level); 80 | 81 | if ( ! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold)) 82 | { 83 | return FALSE; 84 | } 85 | 86 | $filepath = $this->_log_path.'log-'.date('Y-m-d').'.php'; 87 | $message = ''; 88 | 89 | if ( ! file_exists($filepath)) 90 | { 91 | $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n"; 92 | } 93 | 94 | if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE)) 95 | { 96 | return FALSE; 97 | } 98 | 99 | $message .= $level.' '.(($level == 'INFO') ? ' -' : '-').' '.date($this->_date_fmt). ' --> '.$msg."\n"; 100 | 101 | flock($fp, LOCK_EX); 102 | fwrite($fp, $message); 103 | flock($fp, LOCK_UN); 104 | fclose($fp); 105 | 106 | @chmod($filepath, FILE_WRITE_MODE); 107 | return TRUE; 108 | } 109 | 110 | } 111 | // END Log Class 112 | 113 | /* End of file Log.php */ 114 | /* Location: ./system/libraries/Log.php */ -------------------------------------------------------------------------------- /system/helpers/download_helper.php: -------------------------------------------------------------------------------- 1 | security->xss_clean($str, $is_image); 44 | } 45 | } 46 | 47 | // ------------------------------------------------------------------------ 48 | 49 | /** 50 | * Sanitize Filename 51 | * 52 | * @access public 53 | * @param string 54 | * @return string 55 | */ 56 | if ( ! function_exists('sanitize_filename')) 57 | { 58 | function sanitize_filename($filename) 59 | { 60 | $CI =& get_instance(); 61 | return $CI->security->sanitize_filename($filename); 62 | } 63 | } 64 | 65 | // -------------------------------------------------------------------- 66 | 67 | /** 68 | * Hash encode a string 69 | * 70 | * @access public 71 | * @param string 72 | * @return string 73 | */ 74 | if ( ! function_exists('do_hash')) 75 | { 76 | function do_hash($str, $type = 'sha1') 77 | { 78 | if ($type == 'sha1') 79 | { 80 | return sha1($str); 81 | } 82 | else 83 | { 84 | return md5($str); 85 | } 86 | } 87 | } 88 | 89 | // ------------------------------------------------------------------------ 90 | 91 | /** 92 | * Strip Image Tags 93 | * 94 | * @access public 95 | * @param string 96 | * @return string 97 | */ 98 | if ( ! function_exists('strip_image_tags')) 99 | { 100 | function strip_image_tags($str) 101 | { 102 | $str = preg_replace("##", "\\1", $str); 103 | $str = preg_replace("##", "\\1", $str); 104 | 105 | return $str; 106 | } 107 | } 108 | 109 | // ------------------------------------------------------------------------ 110 | 111 | /** 112 | * Convert PHP tags to entities 113 | * 114 | * @access public 115 | * @param string 116 | * @return string 117 | */ 118 | if ( ! function_exists('encode_php_tags')) 119 | { 120 | function encode_php_tags($str) 121 | { 122 | return str_replace(array(''), array('<?php', '<?PHP', '<?', '?>'), $str); 123 | } 124 | } 125 | 126 | 127 | /* End of file security_helper.php */ 128 | /* Location: ./system/helpers/security_helper.php */ -------------------------------------------------------------------------------- /system/libraries/Cache/drivers/Cache_dummy.php: -------------------------------------------------------------------------------- 1 | conn_id) 41 | { 42 | return "SELECT '" . $this->database . "'"; 43 | } 44 | else 45 | { 46 | return FALSE; 47 | } 48 | } 49 | 50 | // -------------------------------------------------------------------- 51 | 52 | /** 53 | * Optimize table query 54 | * 55 | * Generates a platform-specific query so that a table can be optimized 56 | * 57 | * @access private 58 | * @param string the table name 59 | * @return object 60 | * @link http://www.cubrid.org/manual/840/en/Optimize%20Database 61 | */ 62 | function _optimize_table($table) 63 | { 64 | // No SQL based support in CUBRID as of version 8.4.0. Database or 65 | // table optimization can be performed using CUBRID Manager 66 | // database administration tool. See the link above for more info. 67 | return FALSE; 68 | } 69 | 70 | // -------------------------------------------------------------------- 71 | 72 | /** 73 | * Repair table query 74 | * 75 | * Generates a platform-specific query so that a table can be repaired 76 | * 77 | * @access private 78 | * @param string the table name 79 | * @return object 80 | * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency 81 | */ 82 | function _repair_table($table) 83 | { 84 | // Not supported in CUBRID as of version 8.4.0. Database or 85 | // table consistency can be checked using CUBRID Manager 86 | // database administration tool. See the link above for more info. 87 | return FALSE; 88 | } 89 | 90 | // -------------------------------------------------------------------- 91 | /** 92 | * CUBRID Export 93 | * 94 | * @access private 95 | * @param array Preferences 96 | * @return mixed 97 | */ 98 | function _backup($params = array()) 99 | { 100 | // No SQL based support in CUBRID as of version 8.4.0. Database or 101 | // table backup can be performed using CUBRID Manager 102 | // database administration tool. 103 | return $this->db->display_error('db_unsuported_feature'); 104 | } 105 | } 106 | 107 | /* End of file cubrid_utility.php */ 108 | /* Location: ./system/database/drivers/cubrid/cubrid_utility.php */ -------------------------------------------------------------------------------- /application/config/database.php: -------------------------------------------------------------------------------- 1 | 2 | .sort_asc:after { 3 | content: "\25b2"; 4 | } 5 | .sort_desc:after { 6 | content: "\25bc"; 7 | } 8 | 9 | 10 |
    11 |
    12 |
    13 |

    Vehicle Inventory

    14 | Add New 15 |
    16 |
    17 | 18 |
    19 |
    20 | 21 |

    Found Vehicles

    22 | 23 |
    24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 50 | 53 | 56 | 59 | 62 | 65 | 71 | 72 | 73 | 74 | 75 |
    vehicle_id . '"'; ?> tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> 76 | 93 |
    94 | 95 |
    IDTypeNameTransmissionDailyCapacityLuggageACActions
    42 | vehicle_id; ?> 43 | 45 | type; ?> 46 | 48 | name; ?> 49 | 51 | transmission; ?> 52 | 54 | daily; ?> 55 | 57 | capacity; ?> 58 | 60 | luggage; ?> 61 | 63 | ac; ?> 64 | 66 | vehicle_id ?>" class="btn btn-default" role="button"> 67 | Edit 68 | 69 | 70 |
    96 |
    97 |
    98 |
    99 | 100 |
    101 | -------------------------------------------------------------------------------- /database.php: -------------------------------------------------------------------------------- 1 | array('grin.gif', '19', '19', 'grin'), 20 | ':lol:' => array('lol.gif', '19', '19', 'LOL'), 21 | ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), 22 | ':)' => array('smile.gif', '19', '19', 'smile'), 23 | ';-)' => array('wink.gif', '19', '19', 'wink'), 24 | ';)' => array('wink.gif', '19', '19', 'wink'), 25 | ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), 26 | ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), 27 | ':-S' => array('confused.gif', '19', '19', 'confused'), 28 | ':wow:' => array('surprise.gif', '19', '19', 'surprised'), 29 | ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), 30 | ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), 31 | '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), 32 | ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), 33 | ':P' => array('raspberry.gif', '19', '19', 'raspberry'), 34 | ':blank:' => array('blank.gif', '19', '19', 'blank stare'), 35 | ':long:' => array('longface.gif', '19', '19', 'long face'), 36 | ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), 37 | ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), 38 | ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), 39 | '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), 40 | ':down:' => array('downer.gif', '19', '19', 'downer'), 41 | ':red:' => array('embarrassed.gif', '19', '19', 'red face'), 42 | ':sick:' => array('sick.gif', '19', '19', 'sick'), 43 | ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), 44 | ':-/' => array('hmm.gif', '19', '19', 'hmmm'), 45 | '>:(' => array('mad.gif', '19', '19', 'mad'), 46 | ':mad:' => array('mad.gif', '19', '19', 'mad'), 47 | '>:-(' => array('angry.gif', '19', '19', 'angry'), 48 | ':angry:' => array('angry.gif', '19', '19', 'angry'), 49 | ':zip:' => array('zip.gif', '19', '19', 'zipper'), 50 | ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), 51 | ':ahhh:' => array('shock.gif', '19', '19', 'shock'), 52 | ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), 53 | ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), 54 | ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), 55 | ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), 56 | ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), 57 | ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), 58 | ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), 59 | ':snake:' => array('snake.gif', '19', '19', 'snake'), 60 | ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'), 61 | ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item 62 | 63 | ); 64 | 65 | /* End of file smileys.php */ 66 | /* Location: ./application/config/smileys.php */ -------------------------------------------------------------------------------- /system/core/Benchmark.php: -------------------------------------------------------------------------------- 1 | marker[$name] = microtime(); 54 | } 55 | 56 | // -------------------------------------------------------------------- 57 | 58 | /** 59 | * Calculates the time difference between two marked points. 60 | * 61 | * If the first parameter is empty this function instead returns the 62 | * {elapsed_time} pseudo-variable. This permits the full system 63 | * execution time to be shown in a template. The output class will 64 | * swap the real value for this variable. 65 | * 66 | * @access public 67 | * @param string a particular marked point 68 | * @param string a particular marked point 69 | * @param integer the number of decimal places 70 | * @return mixed 71 | */ 72 | function elapsed_time($point1 = '', $point2 = '', $decimals = 4) 73 | { 74 | if ($point1 == '') 75 | { 76 | return '{elapsed_time}'; 77 | } 78 | 79 | if ( ! isset($this->marker[$point1])) 80 | { 81 | return ''; 82 | } 83 | 84 | if ( ! isset($this->marker[$point2])) 85 | { 86 | $this->marker[$point2] = microtime(); 87 | } 88 | 89 | list($sm, $ss) = explode(' ', $this->marker[$point1]); 90 | list($em, $es) = explode(' ', $this->marker[$point2]); 91 | 92 | return number_format(($em + $es) - ($sm + $ss), $decimals); 93 | } 94 | 95 | // -------------------------------------------------------------------- 96 | 97 | /** 98 | * Memory Usage 99 | * 100 | * This function returns the {memory_usage} pseudo-variable. 101 | * This permits it to be put it anywhere in a template 102 | * without the memory being calculated until the end. 103 | * The output class will swap the real value for this variable. 104 | * 105 | * @access public 106 | * @return string 107 | */ 108 | function memory_usage() 109 | { 110 | return '{memory_usage}'; 111 | } 112 | 113 | } 114 | 115 | // END CI_Benchmark class 116 | 117 | /* End of file Benchmark.php */ 118 | /* Location: ./system/core/Benchmark.php */ -------------------------------------------------------------------------------- /application/views/view_register.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Create an Account

    4 | 8 | 9 | " . validation_errors() . " 10 |
    "; 11 | } 12 | 13 | if($msg != NULL) { 14 | echo " 15 |
    16 | 17 | " . $msg . " 18 |
    "; 19 | } 20 | ?> 21 | 22 |
    23 | Personal Information 24 | 'personal_info', 'class' => 'form-signin', 'role' => 'form')); 26 | echo form_label('First Name', 'first_name'); 27 | echo form_input(array('name' => 'first_name', 'class' => 'form-control', 'value' => set_value('first_name'), 'placeholder' => 'First Name', 'required' => 'required', 'autofocus' => 'autofocus')); 28 | echo '
    '; 29 | echo form_label('Last Name', 'last_name'); 30 | echo form_input(array('name' => 'last_name', 'class' => 'form-control', 'value' => set_value('last_name'), 'placeholder' => 'Last Name', 'required' => 'required')); 31 | echo '
    '; 32 | echo form_label('Gender', 'gender'); 33 | echo '
    '; 34 | echo ""; 38 | echo ""; 42 | echo '

    '; 43 | echo form_label('Email Address', 'email_address'); 44 | echo form_input(array('name' => 'email_address', 'class' => 'form-control', 'value' => set_value('email_address'), 'placeholder' => 'Email Address', 'required' => 'required')); 45 | echo '
    '; 46 | ?> 47 |
    48 | 49 |
    50 | Login Info 51 | 'login_info', 'class' => 'form-signin', 'role' => 'form')); 53 | echo form_input(array('name' => 'accounttype', 'class' => 'hidden', 'value' => 'user')); 54 | echo form_input(array('name' => 'verified', 'class' => 'hidden', 'value' => '0')); 55 | //echo 'Account Type:'; 56 | //$options = array( 57 | // 'admin' => 'Admin', 58 | // 'user' => 'User' 59 | //); 60 | //echo form_dropdown('accounttype', $options, 'admin'); 61 | echo form_label('Username', 'username'); 62 | echo form_input(array('name' => 'username', 'class' => 'form-control', 'value' => set_value('username'), 'placeholder' => 'Username', 'required' => 'required')); 63 | echo '
    '; 64 | echo form_label('Password', 'password'); 65 | echo form_password(array('name' => 'password', 'class' => 'form-control', 'value' => set_value('password'), 'placeholder' => 'Password', 'required' => 'required')); 66 | echo '
    '; 67 | echo form_label(' Password Confirmation', 'password2'); 68 | echo form_password(array('name' => 'password2', 'class' => 'form-control', 'value' => set_value('password2'), 'placeholder' => 'Password Confirmation', 'required' => 'required')); 69 | echo '
    '; 70 | echo form_submit(array('name' => 'submit', 'class' => 'btn btn-primary', 'value' => 'Sign up!')); 71 | ?> 72 |
    73 |
    74 | 75 | -------------------------------------------------------------------------------- /application/views/view_add_vehicle.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    Add New Vehicle

    5 |
    6 |
    7 | 8 | 12 | 13 | " . validation_errors() . " 14 |
    "; 15 | } 16 | 17 | if($msg != NULL) { 18 | echo " 19 |
    20 | 21 | " . $msg . " 22 |
    "; 23 | } 24 | ?> 25 | 26 |
    27 |
    28 | 'edit', 'class' => 'form-signin', 'role' => 'form')); 30 | 31 | // picture 32 | $q = $this->db->query('SELECT id FROM vehicle'); 33 | $id = $q->last_row()->id; 34 | $path = base_url() . "public/car/" . $id+1 . ".jpg"; 35 | 36 | if(!file_exists($path)) { 37 | $display = base_url() . "public/car/default.jpg"; 38 | } else { 39 | $display = $path; 40 | } 41 | echo "Car Picture"; 42 | echo '
    '; 43 | echo form_input(array('name' => 'userfile', 'type' => 'file')); 44 | echo '
    '; 45 | // picture 46 | echo form_label('Type', 'type'); 47 | $options = array( 48 | 'Compact'=>'Compact', 49 | 'Standard'=>'Standard', 50 | 'Luxury'=>'Luxury', 51 | 'MPV'=>'MPV', 52 | 'Van'=>'Van' 53 | ); 54 | echo form_dropdown('type', $options,'','class="form-control"'); 55 | echo '
    '; 56 | echo form_label('Name', 'name'); 57 | echo form_input(array('name' => 'name', 'class' => 'form-control', 'value' => set_value('name'), 'placeholder' => 'Eg: Perodua Viva', 'required' => 'required', 'autofocus' => 'autofocus')); 58 | echo '
    '; 59 | echo form_label('Transmission', 'transmission'); 60 | $options = array( 61 | 'Auto'=>'Auto', 62 | 'Manual'=>'Manual' 63 | ); 64 | echo form_dropdown('transmission', $options,'','class="form-control"'); 65 | echo '
    '; 66 | echo form_label('Air Conditioning', 'ac'); 67 | $options = array( 68 | '1'=>'Yes', 69 | '0'=>'No' 70 | ); 71 | echo form_dropdown('ac', $options,'','class="form-control"'); 72 | echo '
    '; 73 | echo form_label('Capacity', 'capacity'); 74 | echo form_input(array('name' => 'capacity', 'class' => 'form-control', 'value' => set_value('capacity'), 'placeholder' => 'Number of Passenger', 'required' => 'required', 'autofocus' => 'autofocus')); 75 | echo '
    '; 76 | echo form_label('Luggage', 'luggage'); 77 | echo form_input(array('name' => 'luggage', 'class' => 'form-control', 'value' => set_value('luggage'), 'placeholder' => 'Number of Luggage', 'required' => 'required', 'autofocus' => 'autofocus')); 78 | echo '
    '; 79 | echo form_label('Daily', 'daily'); 80 | echo form_input(array('name' => 'daily', 'class' => 'form-control', 'value' => set_value('daily'), 'placeholder' => 'Daily Price', 'required' => 'required', 'autofocus' => 'autofocus')); 81 | echo '
    '; 82 | echo form_submit(array('name' => 'submit', 'class' => 'btn btn-primary', 'value' => 'Add')); 83 | echo form_close(); 84 | ?> 85 |
    86 |
    87 | -------------------------------------------------------------------------------- /application/views/view_admin_schedule.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Car Rental Management System 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 | 29 |
    30 |
    31 | 32 | 33 | 37 | 38 |
    39 |
    40 |
    41 | 42 | 43 | 44 |
    45 |
    46 | 47 | 48 | 49 | 50 |
    51 |
    52 |
    53 |
    54 |
    55 | 56 |
    57 | 58 |
    59 |

    60 | 61 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
    88 |
    89 | 90 | 91 | -------------------------------------------------------------------------------- /application/config/autoload.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |

    Add New Vehicle

    5 |
    6 |
    7 | 8 | 12 | 13 | " . validation_errors() . " 14 | "; 15 | } 16 | 17 | if($msg != NULL) { 18 | echo " 19 |
    20 | 21 | " . $msg . " 22 |
    "; 23 | } 24 | ?> 25 | 26 |
    27 |
    28 | 'edit', 'class' => 'form-signin', 'role' => 'form')); 30 | // picture 31 | $next = $this->db->query("SHOW TABLE STATUS LIKE 'vehicle'"); 32 | $next = $next->row(0); 33 | $vehicle_id = $next->Auto_increment; 34 | $path = base_url() . "public/car/" . $vehicle_id . ".jpg"; 35 | 36 | if(!file_exists($path)) { 37 | $display = base_url() . "public/car/default.jpg"; 38 | } else { 39 | $display = $path; 40 | } 41 | echo "Car Picture"; 42 | echo '
    '; 43 | echo form_input(array('name' => 'userfile', 'type' => 'file')); 44 | echo '
    '; 45 | // picture 46 | echo form_label('Type', 'type'); 47 | $options = array( 48 | 'Compact'=>'Compact', 49 | 'Standard'=>'Standard', 50 | 'Luxury'=>'Luxury', 51 | 'MPV'=>'MPV', 52 | 'Van'=>'Van' 53 | ); 54 | echo form_dropdown('type', $options,'','class="form-control"'); 55 | echo '
    '; 56 | echo form_label('Name', 'name'); 57 | echo form_input(array('name' => 'name', 'class' => 'form-control', 'value' => set_value('name'), 'placeholder' => 'Eg: Perodua Viva', 'required' => 'required', 'autofocus' => 'autofocus')); 58 | echo '
    '; 59 | echo form_label('Transmission', 'transmission'); 60 | $options = array( 61 | 'Auto'=>'Auto', 62 | 'Manual'=>'Manual' 63 | ); 64 | echo form_dropdown('transmission', $options,'','class="form-control"'); 65 | echo '
    '; 66 | echo form_label('Air Conditioning', 'ac'); 67 | $options = array( 68 | '1'=>'Yes', 69 | '0'=>'No' 70 | ); 71 | echo form_dropdown('ac', $options,'','class="form-control"'); 72 | echo '
    '; 73 | echo form_label('Capacity', 'capacity'); 74 | echo form_input(array('name' => 'capacity', 'class' => 'form-control', 'value' => set_value('capacity'), 'placeholder' => 'Number of Passenger', 'required' => 'required', 'autofocus' => 'autofocus')); 75 | echo '
    '; 76 | echo form_label('Luggage', 'luggage'); 77 | echo form_input(array('name' => 'luggage', 'class' => 'form-control', 'value' => set_value('luggage'), 'placeholder' => 'Number of Luggage', 'required' => 'required', 'autofocus' => 'autofocus')); 78 | echo '
    '; 79 | echo form_label('Daily', 'daily'); 80 | echo form_input(array('name' => 'daily', 'class' => 'form-control', 'value' => set_value('daily'), 'placeholder' => 'Daily Price', 'required' => 'required', 'autofocus' => 'autofocus')); 81 | echo '
    '; 82 | echo form_submit(array('name' => 'submit', 'class' => 'btn btn-primary', 'value' => 'Add')); 83 | echo form_close(); 84 | ?> 85 |
    86 |
    87 | -------------------------------------------------------------------------------- /application/views/view_schedule.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Twitter Bootstrap jQuery Calendar component 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 | 29 |
    30 |
    31 | 32 | 33 | 37 | 38 |
    39 |
    40 |
    41 | 42 | 43 | 44 |
    45 |
    46 | 47 | 48 | 49 | 50 |
    51 |
    52 |
    53 |
    54 |
    55 | 56 |
    57 | 58 |
    59 |

    60 | 61 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
    88 |
    89 | 90 | 91 | -------------------------------------------------------------------------------- /application/controllers/profile.php: -------------------------------------------------------------------------------- 1 | session->userdata("loggedIn"); 7 | 8 | if($session ) 9 | { 10 | switch( $method ) 11 | { 12 | case 'index': 13 | $this->index(); 14 | break; 15 | case 'settings': 16 | $this->settings(); 17 | break; 18 | case 'do_upload': 19 | $this->do_upload(); 20 | break; 21 | case 'edit': 22 | $this->edit(); 23 | break; 24 | case 'verify': 25 | $this->verify(); 26 | break; 27 | default: 28 | show_404();; 29 | break; 30 | } 31 | } 32 | else 33 | { 34 | echo 'No direct access allowed (Do not acces in this way)'; 35 | } 36 | } 37 | 38 | function index() 39 | { 40 | $this->load->view('header'); 41 | $this->load->view('view_profile'); 42 | $this->load->view('footer'); 43 | } 44 | 45 | function settings($msg = NULL) { 46 | $data['msg'] = $msg; 47 | $this->load->view('header'); 48 | $this->load->view('view_settings', $data); 49 | $this->load->view('footer'); 50 | } 51 | 52 | function do_upload() 53 | { 54 | $user_id = $this->session->userdata('user_id'); 55 | $pathToUpload = './public/upload/profile/' . $user_id; 56 | 57 | $config['file_name'] = 'pic1.jpg'; 58 | $config['upload_path'] = $pathToUpload; 59 | $config['allowed_types'] = 'gif|jpg|png'; 60 | $config['max_size'] = '5000'; 61 | $config['overwrite'] = True; 62 | 63 | if ( ! file_exists($pathToUpload) ) 64 | { 65 | $create = mkdir($pathToUpload, DIR_WRITE_MODE); 66 | if ( ! $create ) 67 | return; 68 | } 69 | 70 | $this->load->library('upload', $config); 71 | if ( ! $this->upload->do_upload()) 72 | { 73 | $this->settings($this->upload->display_errors()); 74 | } 75 | else 76 | { 77 | $data = array('upload_data' => $this->upload->data()); 78 | $this->settings("Successfully uploaded!"); 79 | } 80 | } 81 | 82 | function edit() 83 | { 84 | $this->load->library('form_validation'); 85 | $this->form_validation->set_rules('first_name', 'First Name', 'trim|required|alpha'); 86 | $this->form_validation->set_rules('last_name', 'Last Name', 'trim|required|name_space'); 87 | $this->form_validation->set_rules('email_address', 'Email Address', 'trim|required|valid_email'); 88 | 89 | if($this->form_validation->run() == FALSE) 90 | { 91 | $this->settings(NULL); 92 | } 93 | else 94 | { 95 | $this->load->model('model_user'); 96 | 97 | if($query = $this->model_user->edit_user()) 98 | { 99 | $this->settings("Successfully updated!"); 100 | } 101 | else 102 | { 103 | $this->load->view('header'); 104 | $this->load->view('view_settings'); 105 | $this->load->view('footer'); 106 | } 107 | } 108 | 109 | } 110 | 111 | function verify() 112 | { 113 | $this->load->library('form_validation'); 114 | $this->form_validation->set_rules('ic_no', 'Identification Card Number', 'trim|required|ic_no'); 115 | $this->form_validation->set_rules('li_no', 'Driving License Number', 'trim|required|li_no'); 116 | 117 | if($this->form_validation->run() == FALSE) 118 | { 119 | $this->settings(NULL); 120 | } 121 | else 122 | { 123 | $this->load->model('model_user'); 124 | 125 | if($query = $this->model_user->verify_user()) 126 | { 127 | $this->settings("Verified Successfully"); 128 | } 129 | else 130 | { 131 | $this->load->view('header'); 132 | $this->load->view('view_settings'); 133 | $this->load->view('footer'); 134 | } 135 | } 136 | } 137 | } 138 | 139 | --------------------------------------------------------------------------------