├── HMS.sql ├── README.md ├── application ├── .htaccess ├── attachments │ └── newsletter1.txt ├── cache │ ├── .htaccess │ └── index.html ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── email.php │ ├── foreign_chars.php │ ├── hooks.php │ ├── index.html │ ├── migration.php │ ├── mimes.php │ ├── profiler.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ ├── admin_checkin.php │ ├── admin_checkout.php │ ├── admin_customer.php │ ├── admin_dashboard.php │ ├── admin_home.php │ ├── admin_manufacturers.php │ ├── admin_products.php │ ├── admin_report.php │ ├── admin_reservation.php │ ├── admin_room.php │ ├── admin_roomtype.php │ ├── member.php │ ├── member_dashboard.php │ └── user.php ├── core │ └── index.html ├── errors │ ├── error_404.php │ ├── error_db.php │ ├── error_general.php │ ├── error_php.php │ └── index.html ├── helpers │ └── index.html ├── hooks │ └── index.html ├── index.html ├── language │ ├── english │ │ ├── content_lang.php │ │ └── index.html │ └── persian │ │ ├── content_lang.php │ │ └── index.html ├── logs │ └── index.html ├── models │ ├── checkin_model.php │ ├── checkout_model.php │ ├── customer_model.php │ ├── dashboard_model.php │ ├── index.html │ ├── member_model.php │ ├── reservation_model.php │ ├── room_model.php │ ├── roomtype_model.php │ └── users_model.php ├── third_party │ └── index.html └── views │ ├── admin │ ├── checkin │ │ ├── add.php │ │ ├── edit.php │ │ └── list.php │ ├── checkout │ │ └── list.php │ ├── customer │ │ ├── add.php │ │ ├── edit.php │ │ └── list.php │ ├── dashboard │ │ └── index.php │ ├── login.php │ ├── report.php │ ├── reservation │ │ ├── add.php │ │ ├── edit.php │ │ └── list.php │ ├── room │ │ ├── add.php │ │ ├── edit.php │ │ └── list.php │ ├── roomtype │ │ ├── add.php │ │ ├── edit.php │ │ └── list.php │ ├── signup_form.php │ └── signup_successful.php │ ├── home.php │ ├── includes │ ├── footer.php │ ├── header.php │ ├── main_content.php │ └── template.php │ ├── index.html │ └── member │ ├── dashboard │ └── index.php │ ├── footer.php │ ├── header.php │ ├── main_content.php │ └── template.php ├── assets ├── css │ ├── admin │ │ ├── admin.css │ │ ├── admin.min.css │ │ ├── bootstrap-datepicker.min.css │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap-responsive.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.min.css │ │ └── global.css │ ├── bootstrap.css │ ├── global.css │ └── home.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── images │ ├── profile.png │ ├── templatemo_banner_bg.jpg │ ├── templatemo_banner_bg_01.jpg │ ├── templatemo_button_01.jpg │ ├── templatemo_button_02.jpg │ ├── templatemo_content_bottom.jpg │ ├── templatemo_content_top.jpg │ ├── templatemo_header_bg.jpg │ ├── templatemo_horizontal_divider_01.jpg │ ├── templatemo_horizontal_divider_02.jpg │ ├── templatemo_image_01.jpg │ ├── templatemo_image_02.jpg │ ├── templatemo_image_03.jpg │ ├── templatemo_image_04.jpg │ ├── templatemo_image_05.jpg │ ├── templatemo_image_06.jpg │ ├── templatemo_left_column_top.jpg │ ├── templatemo_menu_bg.png │ └── templatemo_special_offer.jpg └── js │ ├── admin.js │ ├── admin.min.js │ ├── bootstrap-datepicker.fa.min.js │ ├── bootstrap-datepicker.min.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── home.js │ ├── jquery-1.11.0.js │ ├── jquery-1.7.1.min.js │ ├── jquery.autocomplete.js │ └── member.js ├── htaccess ├── index.php └── system ├── .htaccess ├── core ├── Benchmark.php ├── CodeIgniter.php ├── Common.php ├── Config.php ├── Controller.php ├── Exceptions.php ├── Hooks.php ├── Input.php ├── Lang.php ├── Loader.php ├── Model.php ├── Output.php ├── Router.php ├── Security.php ├── URI.php ├── Utf8.php └── index.html ├── database ├── DB.php ├── DB_active_rec.php ├── DB_cache.php ├── DB_driver.php ├── DB_forge.php ├── DB_result.php ├── DB_utility.php ├── drivers │ ├── cubrid │ │ ├── cubrid_driver.php │ │ ├── cubrid_forge.php │ │ ├── cubrid_result.php │ │ ├── cubrid_utility.php │ │ └── index.html │ ├── index.html │ ├── mssql │ │ ├── index.html │ │ ├── mssql_driver.php │ │ ├── mssql_forge.php │ │ ├── mssql_result.php │ │ └── mssql_utility.php │ ├── mysql │ │ ├── index.html │ │ ├── mysql_driver.php │ │ ├── mysql_forge.php │ │ ├── mysql_result.php │ │ └── mysql_utility.php │ ├── mysqli │ │ ├── index.html │ │ ├── mysqli_driver.php │ │ ├── mysqli_forge.php │ │ ├── mysqli_result.php │ │ └── mysqli_utility.php │ ├── oci8 │ │ ├── index.html │ │ ├── oci8_driver.php │ │ ├── oci8_forge.php │ │ ├── oci8_result.php │ │ └── oci8_utility.php │ ├── odbc │ │ ├── index.html │ │ ├── odbc_driver.php │ │ ├── odbc_forge.php │ │ ├── odbc_result.php │ │ └── odbc_utility.php │ ├── pdo │ │ ├── index.html │ │ ├── pdo_driver.php │ │ ├── pdo_forge.php │ │ ├── pdo_result.php │ │ └── pdo_utility.php │ ├── postgre │ │ ├── index.html │ │ ├── postgre_driver.php │ │ ├── postgre_forge.php │ │ ├── postgre_result.php │ │ └── postgre_utility.php │ ├── sqlite │ │ ├── index.html │ │ ├── sqlite_driver.php │ │ ├── sqlite_forge.php │ │ ├── sqlite_result.php │ │ └── sqlite_utility.php │ └── sqlsrv │ │ ├── index.html │ │ ├── sqlsrv_driver.php │ │ ├── sqlsrv_forge.php │ │ ├── sqlsrv_result.php │ │ └── sqlsrv_utility.php └── index.html ├── fonts ├── index.html └── texb.ttf ├── helpers ├── array_helper.php ├── captcha_helper.php ├── cookie_helper.php ├── date_helper.php ├── directory_helper.php ├── download_helper.php ├── email_helper.php ├── file_helper.php ├── form_helper.php ├── html_helper.php ├── index.html ├── inflector_helper.php ├── language_helper.php ├── number_helper.php ├── path_helper.php ├── security_helper.php ├── smiley_helper.php ├── string_helper.php ├── text_helper.php ├── typography_helper.php ├── url_helper.php └── xml_helper.php ├── index.html ├── language ├── english │ ├── calendar_lang.php │ ├── date_lang.php │ ├── db_lang.php │ ├── email_lang.php │ ├── form_validation_lang.php │ ├── ftp_lang.php │ ├── imglib_lang.php │ ├── index.html │ ├── migration_lang.php │ ├── number_lang.php │ ├── profiler_lang.php │ ├── unit_test_lang.php │ └── upload_lang.php └── index.html └── libraries ├── Cache ├── Cache.php └── drivers │ ├── Cache_apc.php │ ├── Cache_dummy.php │ ├── Cache_file.php │ └── Cache_memcached.php ├── Calendar.php ├── Cart.php ├── Driver.php ├── Email.php ├── Encrypt.php ├── Form_validation.php ├── Ftp.php ├── Image_lib.php ├── Javascript.php ├── Log.php ├── Migration.php ├── Pagination.php ├── Parser.php ├── Profiler.php ├── Session.php ├── Sha1.php ├── Table.php ├── Trackback.php ├── Typography.php ├── Unit_test.php ├── Upload.php ├── User_agent.php ├── Xmlrpc.php ├── Xmlrpcs.php ├── Zip.php ├── index.html └── javascript └── Jquery.php /README.md: -------------------------------------------------------------------------------- 1 | Hotel Management System (HMS) developed for managing small hotel's or guess house in Web Base and written in PHP with admin panel and customer dashboard 2 | 3 | PHP 5.1.6 or newer
4 | Mysql
5 | Codeignither 2.1.2
6 | Bootstrap 3.0
7 | jquery 1.7
8 | 9 | 10 | 11 |

What HMS can do ? :

12 | 20 | 21 | ### Screenshot 22 | Customer Dashboard: 23 | ![hotel management system](https://cloud.githubusercontent.com/assets/6250203/20296819/2d7731f6-ab22-11e6-9863-d485b39c5e17.png) 24 | ![hotel management system-1](https://cloud.githubusercontent.com/assets/6250203/20296829/407c3698-ab22-11e6-869c-ec82d992320b.png) 25 | 26 | Admin Dashboard: 27 | ![selection_034](https://cloud.githubusercontent.com/assets/6250203/9320485/0b92a0e8-4570-11e5-8d75-9ec4e365939e.png) 28 | ![hotel management system-2](https://cloud.githubusercontent.com/assets/6250203/20296838/4b6868ce-ab22-11e6-85bb-3bc118658c23.png) 29 | ![hotel management system-3](https://cloud.githubusercontent.com/assets/6250203/20296849/5b46792a-ab22-11e6-9f57-1793d3276e1c.png) 30 | ![hotel management system-4](https://cloud.githubusercontent.com/assets/6250203/20296852/65c41a9c-ab22-11e6-84a0-e31ecc9e7a2f.png) 31 | 32 | -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/attachments/newsletter1.txt: -------------------------------------------------------------------------------- 1 | First newsletter crap goes here. -------------------------------------------------------------------------------- /application/cache/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/autoload.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 */ -------------------------------------------------------------------------------- /application/config/email.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 */ -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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/config/profiler.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 */ -------------------------------------------------------------------------------- /application/controllers/admin_dashboard.php: -------------------------------------------------------------------------------- 1 | load->helper('language'); 21 | $this->lang->load("content", $this->session->userdata('language')); 22 | 23 | $this->load->model('dashboard_model'); 24 | 25 | if(!$this->session->userdata('is_logged_in')){ 26 | redirect('admin/login'); 27 | } 28 | } 29 | 30 | /** 31 | * Load the main view with all the current model model's data. 32 | * @return void 33 | */ 34 | public function index() 35 | { 36 | 37 | 38 | $data['customer_count'] = $this->dashboard_model->count_customer(); 39 | $data['today_reserv'] = $this->dashboard_model->count_today_reserv(); 40 | $data['today_checkout'] = $this->dashboard_model->count_today_checkout(); 41 | $data['not_verifued'] = $this->dashboard_model->count_not_verifyed(); 42 | //load the view 43 | $data['main_content'] = 'admin/dashboard/index'; 44 | $this->load->view('includes/template', $data); 45 | 46 | }//index 47 | 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /application/controllers/admin_home.php: -------------------------------------------------------------------------------- 1 | load->helper('language'); 15 | 16 | 17 | } 18 | 19 | /** 20 | * Load the main view with all the current model model's data. 21 | * @return void 22 | */ 23 | public function index() 24 | { 25 | 26 | $this->load->view('home'); 27 | 28 | }//index 29 | 30 | 31 | 32 | } -------------------------------------------------------------------------------- /application/controllers/admin_report.php: -------------------------------------------------------------------------------- 1 | load->model('customer_model'); 10 | $this->load->model('checkin_model'); 11 | $this->load->model('checkout_model'); 12 | $this->load->model('room_model'); 13 | 14 | //Load language Content 15 | $this->load->helper('language'); 16 | $this->lang->load("content", $this->session->userdata('language')); 17 | 18 | 19 | if(!$this->session->userdata('is_logged_in')){ 20 | redirect('admin/login'); 21 | } 22 | } 23 | 24 | 25 | function index() 26 | { 27 | if($this->session->userdata('is_logged_in')){ 28 | redirect('admin/dashboard/'); 29 | }else{ 30 | $this->load->view('admin/login'); 31 | } 32 | } 33 | 34 | 35 | 36 | function customer_report() 37 | { 38 | 39 | 40 | $data['fields'] = $this->customer_model->get_fields(); 41 | $data['data'] = $this->customer_model->get_customer(); 42 | 43 | 44 | $data['main_content'] = 'admin/report'; 45 | $this->load->view('includes/template', $data); 46 | 47 | } 48 | 49 | 50 | function checkin_report() 51 | { 52 | 53 | 54 | $data['fields'] = $this->checkin_model->get_fields(); 55 | $data['data'] = $this->checkin_model->get_checkin(); 56 | 57 | 58 | $data['main_content'] = 'admin/report'; 59 | $this->load->view('includes/template', $data); 60 | 61 | } 62 | 63 | 64 | function checkout_report() 65 | { 66 | 67 | 68 | $data['fields'] = $this->checkout_model->get_fields(); 69 | $data['data'] = $this->checkout_model->get_checkout(); 70 | 71 | 72 | $data['main_content'] = 'admin/report'; 73 | $this->load->view('includes/template', $data); 74 | 75 | } 76 | 77 | function today_checkin() 78 | { 79 | 80 | 81 | $data['fields'] = $this->checkin_model->get_fields(); 82 | $data['data'] = $this->checkin_model->today_checkin(); 83 | 84 | 85 | $data['main_content'] = 'admin/report'; 86 | $this->load->view('includes/template', $data); 87 | 88 | } 89 | 90 | function last_week_checkin() 91 | { 92 | 93 | 94 | $data['fields'] = $this->checkin_model->get_fields(); 95 | $data['data'] = $this->checkin_model->last_week_checkin(); 96 | 97 | 98 | $data['main_content'] = 'admin/report'; 99 | $this->load->view('includes/template', $data); 100 | 101 | } 102 | 103 | function today_checkout() 104 | { 105 | 106 | 107 | $data['fields'] = $this->checkout_model->get_fields(); 108 | $data['data'] = $this->checkout_model->today_checkout(); 109 | 110 | 111 | $data['main_content'] = 'admin/report'; 112 | $this->load->view('includes/template', $data); 113 | 114 | } 115 | 116 | function last_week_checkout() 117 | { 118 | 119 | 120 | $data['fields'] = $this->checkout_model->get_fields(); 121 | $data['data'] = $this->checkout_model->last_week_checkout(); 122 | 123 | 124 | $data['main_content'] = 'admin/report'; 125 | $this->load->view('includes/template', $data); 126 | 127 | } 128 | 129 | 130 | function room_report() 131 | { 132 | 133 | 134 | $data['fields'] = $this->room_model->get_fields(); 135 | $data['data'] = $this->room_model->get_room(); 136 | 137 | 138 | $data['main_content'] = 'admin/report'; 139 | $this->load->view('includes/template', $data); 140 | 141 | } 142 | 143 | function free_room() 144 | { 145 | 146 | 147 | $data['fields'] = $this->room_model->get_fields(); 148 | $data['data'] = $this->room_model->get_free_room(); 149 | 150 | 151 | $data['main_content'] = 'admin/report'; 152 | $this->load->view('includes/template', $data); 153 | 154 | } 155 | 156 | function busy_room() 157 | { 158 | 159 | 160 | $data['fields'] = $this->room_model->get_fields(); 161 | $data['data'] = $this->room_model->get_busy_room(); 162 | 163 | 164 | $data['main_content'] = 'admin/report'; 165 | $this->load->view('includes/template', $data); 166 | 167 | } 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | } -------------------------------------------------------------------------------- /application/controllers/member.php: -------------------------------------------------------------------------------- 1 | load->model('member_model'); 15 | 16 | $this->load->library('form_validation'); 17 | 18 | //Load language Content 19 | $this->load->helper('language'); 20 | $this->lang->load("content", $this->session->userdata('language')); 21 | 22 | 23 | } 24 | 25 | 26 | function index() 27 | { 28 | if($this->session->userdata('is_logged_in')){ 29 | redirect('admin/dashboard/'); 30 | }else{ 31 | $this->load->view('admin/login'); 32 | } 33 | } 34 | 35 | /** 36 | * encript the password 37 | * @return mixed 38 | */ 39 | function __encrip_password($password) { 40 | return md5($password); 41 | } 42 | 43 | /** 44 | * check the username and the password with the database 45 | * @return void 46 | */ 47 | function validate_credentials() 48 | { 49 | 50 | $user_name = $this->input->post('user_name'); 51 | $password = $this->__encrip_password($this->input->post('password')); 52 | 53 | $is_valid = $this->member_model->validate($user_name, $password); 54 | 55 | if($is_valid) 56 | { 57 | $data = array( 58 | 'user_name' => $user_name, 59 | 'is_member' => true, 60 | 'logged_in' => true, 61 | 62 | ); 63 | $this->session->set_userdata($data); 64 | redirect('member/dashboard/'); 65 | } 66 | else // incorrect username or password 67 | { 68 | $data['login'] = TRUE; 69 | $this->load->view('home', $data); 70 | } 71 | } 72 | 73 | /** 74 | * The method just loads the signup view 75 | * @return void 76 | */ 77 | 78 | public function signup() 79 | { 80 | 81 | 82 | 83 | // field name, error message, validation rules 84 | $this->form_validation->set_rules('Name', 'Name', 'trim|required'); 85 | $this->form_validation->set_rules('Family', 'Last Name', 'trim|required'); 86 | $this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email'); 87 | $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]'); 88 | $this->form_validation->set_rules('password_confirmation', 'Password Confirmation', 'trim|required|matches[password]'); 89 | $this->form_validation->set_error_delimiters('
×', '
'); 90 | 91 | if($this->form_validation->run() == TRUE) 92 | { 93 | 94 | $email = $this->input->post('email') ; 95 | $data_to_store = array( 96 | 'Name' => $this->input->post('Name'), 97 | 'Family' => $this->input->post('Family'), 98 | 'credit_card' => $this->input->post('credit_card'), 99 | 'email' => $this->input->post('email'), 100 | 'password' => md5($this->input->post('password')) 101 | ); 102 | //if the insert has returned true then we show the flash message 103 | if($this->member_model->signup($data_to_store , $email)){ 104 | $data['flash_message'] = TRUE; 105 | }else{ 106 | $data['flash_message'] = FALSE; 107 | } 108 | $this->load->view('home',$data); 109 | 110 | }else{ 111 | 112 | $data['flash_message'] = FALSE; 113 | $this->load->view('home',$data); 114 | 115 | } 116 | 117 | 118 | 119 | 120 | } 121 | 122 | 123 | 124 | /** 125 | * Destroy the session, and logout the user. 126 | * @return void 127 | */ 128 | function logout() 129 | { 130 | $this->session->sess_destroy(); 131 | redirect('/'); 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /application/controllers/user.php: -------------------------------------------------------------------------------- 1 | session->userdata('is_logged_in')){ 13 | redirect('admin/dashboard/'); 14 | }else{ 15 | $this->load->view('admin/login'); 16 | } 17 | } 18 | 19 | /** 20 | * encript the password 21 | * @return mixed 22 | */ 23 | function __encrip_password($password) { 24 | return md5($password); 25 | } 26 | 27 | /** 28 | * check the username and the password with the database 29 | * @return void 30 | */ 31 | function validate_credentials() 32 | { 33 | 34 | $this->load->model('Users_model'); 35 | 36 | $user_name = $this->input->post('user_name'); 37 | $password = $this->__encrip_password($this->input->post('password')); 38 | $language = $this->input->post('language'); 39 | 40 | $is_valid = $this->Users_model->validate($user_name, $password); 41 | 42 | if($is_valid) 43 | { 44 | $data = array( 45 | 'user_name' => $user_name, 46 | 'is_logged_in' => true, 47 | 'is_member' => false, 48 | 'language' => $language 49 | 50 | ); 51 | $this->session->set_userdata($data); 52 | redirect('admin/dashboard/'); 53 | } 54 | else // incorrect username or password 55 | { 56 | $data['message_error'] = TRUE; 57 | $this->load->view('admin/login', $data); 58 | } 59 | } 60 | 61 | /** 62 | * The method just loads the signup view 63 | * @return void 64 | */ 65 | function signup() 66 | { 67 | $this->load->view('admin/signup_form'); 68 | } 69 | 70 | 71 | /** 72 | * Create new user and store it in the database 73 | * @return void 74 | */ 75 | function create_member() 76 | { 77 | $this->load->library('form_validation'); 78 | 79 | // field name, error message, validation rules 80 | $this->form_validation->set_rules('first_name', 'Name', 'trim|required'); 81 | $this->form_validation->set_rules('last_name', 'Last Name', 'trim|required'); 82 | $this->form_validation->set_rules('email_address', 'Email Address', 'trim|required|valid_email'); 83 | $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[4]'); 84 | $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]'); 85 | $this->form_validation->set_rules('password2', 'Password Confirmation', 'trim|required|matches[password]'); 86 | $this->form_validation->set_error_delimiters('
×', '
'); 87 | 88 | if($this->form_validation->run() == FALSE) 89 | { 90 | $this->load->view('admin/signup_form'); 91 | } 92 | 93 | else 94 | { 95 | $this->load->model('Users_model'); 96 | 97 | if($query = $this->Users_model->create_member()) 98 | { 99 | $this->load->view('admin/signup_successful'); 100 | } 101 | else 102 | { 103 | $this->load->view('admin/signup_form'); 104 | } 105 | } 106 | 107 | } 108 | 109 | /** 110 | * Destroy the session, and logout the user. 111 | * @return void 112 | */ 113 | function logout() 114 | { 115 | $this->session->sess_destroy(); 116 | redirect('admin'); 117 | } 118 | 119 | } -------------------------------------------------------------------------------- /application/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/errors/error_404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 404 Page Not Found 5 | 55 | 56 | 57 |
58 |

59 | 60 |
61 | 62 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 |
-------------------------------------------------------------------------------- /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/hooks/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/language/english/content_lang.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/language/persian/content_lang.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/language/persian/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/models/dashboard_model.php: -------------------------------------------------------------------------------- 1 | load->database(); 11 | } 12 | 13 | /** 14 | * Get product by his is 15 | * @param int $product_id 16 | * @return array 17 | */ 18 | public function count_customer() 19 | { 20 | $this->db->select('*'); 21 | $this->db->from('tbl_customer'); 22 | $query = $this->db->get(); 23 | return $query->num_rows(); 24 | } 25 | 26 | public function count_today_reserv() 27 | { 28 | $this->db->select('*'); 29 | $this->db->from('tbl_Reservation'); 30 | $this->db->where('checkin_data',date("m/d/Y")); 31 | $query = $this->db->get(); 32 | return $query->num_rows(); 33 | } 34 | 35 | public function count_today_checkout() 36 | { 37 | $this->db->select('*'); 38 | $this->db->from('tbl_Checkin'); 39 | $this->db->where('date_out <= "' . date("m/d/Y") . '" OR date_out = "' . date("m/d/Y") . '"' ); 40 | $query = $this->db->get(); 41 | return $query->num_rows(); 42 | } 43 | 44 | 45 | public function count_not_verifyed() 46 | { 47 | $this->db->select('*'); 48 | $this->db->from('tbl_customer'); 49 | $this->db->where('verifyed',0); 50 | $query = $this->db->get(); 51 | return $query->num_rows(); 52 | } 53 | 54 | 55 | 56 | } 57 | ?> 58 | -------------------------------------------------------------------------------- /application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/models/member_model.php: -------------------------------------------------------------------------------- 1 | load->database(); 11 | } 12 | 13 | 14 | function signup($new_member_insert_data,$email) 15 | { 16 | 17 | $this->db->where('email', $email); 18 | $query = $this->db->get('tbl_customer'); 19 | 20 | if($query->num_rows > 0){ 21 | echo '
×'; 22 | echo "Username already taken"; 23 | echo '
'; 24 | }else{ 25 | $insert = $this->db->insert('tbl_customer', $new_member_insert_data); 26 | return $insert; 27 | } 28 | 29 | }//create_member 30 | 31 | function validate($user_name, $password) 32 | { 33 | $this->db->where('email', $user_name); 34 | $this->db->where('password', $password); 35 | $this->db->where('verifyed',1); 36 | $query = $this->db->get('tbl_customer'); 37 | 38 | if($query->num_rows == 1) 39 | { 40 | return true; 41 | } 42 | } 43 | 44 | 45 | function Search_room($checkin,$checkout,$adult,$child) 46 | { 47 | 48 | $sql = "SELECT * FROM tbl_RoomType WHERE adult = '" . $adult . "' AND child = '" . $child . "'" ; 49 | $query = $this->db->query($sql); 50 | $type = $query->result_array() ; 51 | foreach ($query->result_array() as $row) 52 | { 53 | $sql ="SELECT 54 | tbl_room.room_no, 55 | tbl_room.type_id, 56 | tbl_RoomType.type , 57 | tbl_RoomType.price, 58 | tbl_RoomType.note, 59 | tbl_room.id, 60 | 61 | tr.id as reserv_status 62 | 63 | FROM tbl_room 64 | 65 | LEFT JOIN tbl_Reservation tr ON tbl_room.id = tr.room_id AND 66 | ( 67 | (tr.checkin_data <= '" . $checkin . "' AND tr.checkout_data >= '" . $checkin . "') 68 | OR 69 | (tr.checkin_data <= '" . $checkout . "' AND tr.checkout_data >= '" . $checkout . "') 70 | ) 71 | LEFT JOIN tbl_RoomType ON tbl_room.type_id = tbl_RoomType.id 72 | WHERE tbl_room.type_id = '" . $row['id'] . "' AND tr.id IS NULL" ; 73 | $room_query = $this->db->query($sql); 74 | } 75 | 76 | return $room_query->result_array(); 77 | } 78 | 79 | 80 | function get_profile($email) 81 | { 82 | $this->db->select('*'); 83 | $this->db->where('email', $email); 84 | $query = $this->db->get('tbl_customer'); 85 | 86 | return $query->result_array(); 87 | } 88 | 89 | function get_reservations($email) 90 | { 91 | 92 | $this->db->select('id'); 93 | $this->db->where('email', $email); 94 | $query = $this->db->get('tbl_customer'); 95 | 96 | $customer = $query->result_array(); 97 | 98 | 99 | $this->db->select('*'); 100 | $this->db->where('Customer_id', $customer[0]['id']); 101 | $query = $this->db->get('tbl_Reservation'); 102 | 103 | return $query->result_array(); 104 | 105 | 106 | } 107 | 108 | function add_reserve($data) 109 | 110 | { 111 | 112 | $insert = $this->db->insert('tbl_Reservation', $data); 113 | return $insert; 114 | 115 | } 116 | 117 | function cancel_reserve($id){ 118 | $this->db->where('id', $id); 119 | $this->db->delete('tbl_Reservation'); 120 | } 121 | 122 | function update_profile ($id , $data) 123 | { 124 | 125 | $this->db->where('id', $id); 126 | $this->db->update('tbl_customer', $data); 127 | $report = array(); 128 | $report['error'] = $this->db->_error_number(); 129 | $report['message'] = $this->db->_error_message(); 130 | if($report !== 0){ 131 | return true; 132 | }else{ 133 | return false; 134 | } 135 | 136 | 137 | } 138 | 139 | 140 | } 141 | ?> 142 | -------------------------------------------------------------------------------- /application/models/roomtype_model.php: -------------------------------------------------------------------------------- 1 | load->database(); 11 | } 12 | 13 | /** 14 | * Get roomtype by his is 15 | * @param int $roomtype_id 16 | * @return array 17 | */ 18 | public function get_roomtype_by_id($id) 19 | { 20 | $this->db->select('*'); 21 | $this->db->from('tbl_RoomType'); 22 | $this->db->where('id', $id); 23 | $query = $this->db->get(); 24 | return $query->result_array(); 25 | } 26 | 27 | 28 | /** 29 | * Get free roomtype 30 | * @return array 31 | */ 32 | public function get_roomtype_all() 33 | { 34 | $this->db->select('*'); 35 | $this->db->from('tbl_RoomType'); 36 | $query = $this->db->get(); 37 | return $query->result_array(); 38 | } 39 | 40 | /** 41 | * Fetch roomtype data from the database 42 | * possibility to mix search, filter and order 43 | * @param string $search_string 44 | * @param strong $order 45 | * @param string $order_type 46 | * @param int $limit_start 47 | * @param int $limit_end 48 | * @return array 49 | */ 50 | public function get_roomtype($search_string=null, $order=null, $order_type='Asc', $limit_start=null, $limit_end=null) 51 | { 52 | 53 | $this->db->select('*'); 54 | 55 | 56 | $this->db->from('tbl_RoomType'); 57 | 58 | 59 | if($search_string){ 60 | $this->db->like('type', $search_string); 61 | } 62 | $this->db->group_by('tbl_RoomType.id'); 63 | 64 | $this->db->order_by('tbl_RoomType.id', $order_type); 65 | 66 | 67 | if($limit_start && $limit_end){ 68 | $this->db->limit($limit_start, $limit_end); 69 | } 70 | 71 | if($limit_start != null){ 72 | $this->db->limit($limit_start, $limit_end); 73 | } 74 | 75 | $query = $this->db->get(); 76 | 77 | return $query->result_array(); 78 | } 79 | 80 | /** 81 | * Count the number of rows 82 | * @param int $search_string 83 | * @param int $order 84 | * @return int 85 | */ 86 | function count_roomtype($search_string=null, $order=null) 87 | { 88 | $this->db->select('*'); 89 | $this->db->from('tbl_RoomType'); 90 | if($search_string){ 91 | $this->db->like('type', $search_string); 92 | } 93 | 94 | $this->db->order_by('tbl_RoomType.id', 'Asc'); 95 | 96 | $query = $this->db->get(); 97 | return $query->num_rows(); 98 | } 99 | 100 | /** 101 | * Store the new item into the database 102 | * @param array $data - associative array with data to store 103 | * @return boolean 104 | */ 105 | function store_roomtype($data) 106 | { 107 | $insert = $this->db->insert('tbl_RoomType', $data); 108 | return $insert; 109 | } 110 | 111 | /** 112 | * Update roomtype 113 | * @param array $data - associative array with data to store 114 | * @return boolean 115 | */ 116 | function update_roomtype($id, $data) 117 | { 118 | $this->db->where('id', $id); 119 | $this->db->update('tbl_RoomType', $data); 120 | $report = array(); 121 | $report['error'] = $this->db->_error_number(); 122 | $report['message'] = $this->db->_error_message(); 123 | if($report !== 0){ 124 | return true; 125 | }else{ 126 | return false; 127 | } 128 | } 129 | 130 | /** 131 | * Delete roomtyper 132 | * @param int $id - roomtype id 133 | * @return boolean 134 | */ 135 | function delete_roomtype($id){ 136 | $this->db->where('id', $id); 137 | $this->db->delete('tbl_RoomType'); 138 | } 139 | 140 | } 141 | ?> 142 | -------------------------------------------------------------------------------- /application/models/users_model.php: -------------------------------------------------------------------------------- 1 | db->where('user_name', $user_name); 14 | $this->db->where('pass_word', $password); 15 | $query = $this->db->get('tbl_employee'); 16 | 17 | if($query->num_rows == 1) 18 | { 19 | return true; 20 | } 21 | } 22 | 23 | /** 24 | * Serialize the session data stored in the database, 25 | * store it in a new array and return it to the controller 26 | * @return array 27 | */ 28 | function get_db_session_data() 29 | { 30 | $query = $this->db->select('user_data')->get('ci_sessions'); 31 | $user = array(); /* array to store the user data we fetch */ 32 | foreach ($query->result() as $row) 33 | { 34 | $udata = unserialize($row->user_data); 35 | /* put data in array using username as key */ 36 | $user['user_name'] = $udata['user_name']; 37 | $user['is_logged_in'] = $udata['is_logged_in']; 38 | } 39 | return $user; 40 | } 41 | 42 | /** 43 | * Store the new user's data into the database 44 | * @return boolean - check the insert 45 | */ 46 | function create_member() 47 | { 48 | 49 | $this->db->where('user_name', $this->input->post('username')); 50 | $query = $this->db->get('tbl_employee'); 51 | 52 | if($query->num_rows > 0){ 53 | echo '
×'; 54 | echo "Username already taken"; 55 | echo '
'; 56 | }else{ 57 | 58 | $new_member_insert_data = array( 59 | 'first_name' => $this->input->post('first_name'), 60 | 'last_name' => $this->input->post('last_name'), 61 | 'email_addres' => $this->input->post('email_address'), 62 | 'user_name' => $this->input->post('username'), 63 | 'pass_word' => md5($this->input->post('password')) 64 | ); 65 | $insert = $this->db->insert('membership', $new_member_insert_data); 66 | return $insert; 67 | } 68 | 69 | }//create_member 70 | } 71 | 72 | -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/views/admin/checkout/list.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 13 | 14 | 20 | 21 |
22 |
23 |
24 | 25 | 'form-inline reset-margin', 'id' => 'myform'); 28 | 29 | //save the columns names in a array that we will use as filter 30 | $options_checkout = array(); 31 | foreach ($checkout as $array) { 32 | foreach ($array as $key => $value) { 33 | $options_checkout[$key] = $key; 34 | } 35 | break; 36 | } 37 | 38 | echo form_open('admin/checkout', $attributes); 39 | 40 | echo form_label('Search:', 'search_string'); 41 | echo form_input('search_string', $search_string_selected); 42 | 43 | echo form_label('Order by:', 'order'); 44 | echo form_dropdown('order', $options_checkout, $order, 'class="span2"'); 45 | 46 | $data_submit = array('name' => 'mysubmit', 'class' => 'btn btn-sm btn-primary', 'value' => 'Go'); 47 | 48 | $options_order_type = array('Asc' => 'Asc', 'Desc' => 'Desc'); 49 | echo form_dropdown('order_type', $options_order_type, $order_type_selected, 'class="span1"'); 50 | 51 | echo form_submit($data_submit); 52 | 53 | echo form_close(); 54 | ?> 55 | 56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | '; 77 | echo ''; 78 | echo ''; 79 | echo ''; 80 | echo ''; 81 | echo ''; 82 | echo ''; 83 | echo ''; 84 | echo ''; 85 | echo ''; 88 | echo ''; 89 | } 90 | ?> 91 | 92 |
#Checkin IDCustomerDate InDate OutRoom NumberStayingUser
'.$row['id'].''.$row['customer_id'].''.$row['date_in'].''.$row['date_out'].''.$row['room_no'].''.$row['staying'].''.$row['user'].' 86 | 87 |
93 | 94 | '.$this->pagination->create_links().'
'; ?> 95 | 96 |
97 |
-------------------------------------------------------------------------------- /application/views/admin/login.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hotel Management System 5 | 6 | 7 | 8 | 9 |
10 | 'form-signin'); 12 | echo form_open('admin/login/validate_credentials', $attributes); 13 | echo '

Login

'; 14 | echo form_input('user_name', '', 'placeholder="Username" class = "form-control input-sm"'); 15 | echo form_password('password', '', 'placeholder="Password" class = "form-control input-sm"'); 16 | $options_langugage = array('english' => 'English' , 'persian' => 'Persian'); 17 | echo form_dropdown('language', $options_langugage, 'class="span1"'); 18 | 19 | if(isset($message_error) && $message_error){ 20 | echo '
'; 21 | echo '×'; 22 | echo 'Oh snap! Change a few things up and try submitting again.'; 23 | echo '
'; 24 | } 25 | echo "
"; 26 | echo "
"; 27 | echo "
"; 28 | echo form_submit('submit', 'Login', 'class="btn btn-large btn-danger"'); 29 | echo form_close(); 30 | ?> 31 |
32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /application/views/admin/report.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 9 |
10 | 11 |
12 | 16 |
17 | uri->segment(3)) . ' ' . ucfirst($this->uri->segment(2));?> 18 |
19 |
20 |
21 |
22 | 23 | 24 | 25 | 26 | ' . $field . ' ' ; 30 | } 31 | ?> 32 | 33 | 34 | 35 | '; 39 | foreach ($fields as $field) 40 | { 41 | echo ''; 42 | } 43 | echo ''; 44 | } 45 | ?> 46 | 47 | 48 |
'.$row[$field].'
49 |
50 | 51 |
52 | 53 | -------------------------------------------------------------------------------- /application/views/admin/room/add.php: -------------------------------------------------------------------------------- 1 | ""); 4 | foreach ($room_type as $row) { 5 | $option_room_type[$row['id']] = $row['type']; 6 | 7 | 8 | $option_floor = array ( 9 | 'Ground Floor' => "Ground Floor" , 10 | 'Second Floor' => "Second Floor" 11 | ) ; 12 | } 13 | 14 | 15 | ?> 16 | 17 | 18 |
19 | 20 | 35 | 36 | 41 | 42 | '; 48 | echo '×'; 49 | echo 'Well done! New Room Success add to database'; 50 | echo '
'; 51 | }else{ 52 | echo '
'; 53 | echo '×'; 54 | echo 'Oh snap! change a few things up and try submitting again.'; 55 | echo '
'; 56 | } 57 | } 58 | ?> 59 | 60 | 'form-horizontal', 'id' => ''); 63 | 64 | //form validation 65 | echo validation_errors(); 66 | 67 | echo form_open('admin/room/add', $attributes); 68 | ?> 69 |
70 | 71 |
72 | 73 |
74 |
75 | 76 |
77 | 78 |
79 |
80 |
81 | 82 |
83 |
84 | 85 |
86 | 89 |
90 |
91 |
92 | 93 |
94 |
95 | 96 |
97 | 100 |
101 |
102 |
103 | 104 | 105 |
106 |
107 |
108 | 109 | 110 | 111 |
112 | 113 | 114 |
115 |
116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /application/views/admin/room/edit.php: -------------------------------------------------------------------------------- 1 | ""); 4 | foreach ($room_type as $row) { 5 | $option_room_type[$row['id']] = $row['type']; 6 | 7 | 8 | $option_floor = array ( 9 | 'Ground Floor' => "Ground Floor" , 10 | 'Second Floor' => "Second Floor" 11 | ) ; 12 | } 13 | 14 | 15 | ?> 16 | 17 | 18 |
19 | 20 | 35 | 36 | 41 | 42 | '; 48 | echo '×'; 49 | echo 'Well done!Room Success Updated'; 50 | echo '
'; 51 | }else{ 52 | echo '
'; 53 | echo '×'; 54 | echo 'Oh snap! change a few things up and try submitting again.'; 55 | echo '
'; 56 | } 57 | } 58 | ?> 59 | 60 | 'form-horizontal', 'id' => ''); 63 | 64 | //form validation 65 | echo validation_errors(); 66 | 67 | echo form_open('admin/room/update/'.$this->uri->segment(4).'', $attributes); 68 | ?> 69 |
70 | 71 |
72 | 73 |
74 |
75 | 76 |
77 | 78 |
79 |
80 |
81 | 82 |
83 |
84 | 85 |
86 | 89 |
90 |
91 |
92 | 93 |
94 |
95 | 96 |
97 | 100 |
101 |
102 |
103 | 104 | 105 |
106 |
107 |
108 | 109 | 110 | 111 |
112 | 113 | 114 |
115 |
116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /application/views/admin/room/list.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 14 | 15 | 21 | 22 |
23 |
24 |
25 | 26 | 'form-inline reset-margin', 'id' => 'myform'); 29 | 30 | // save the columns names in a array that we will use as filter 31 | $options_room = array(); 32 | foreach ($room as $array) { 33 | foreach ($array as $key => $value) { 34 | $options_room[$key] = $key; 35 | } 36 | break; 37 | } 38 | 39 | echo form_open('admin/room', $attributes); 40 | 41 | echo form_label('Search:', 'search_string'); 42 | echo form_input('search_string', $search_string_selected); 43 | 44 | echo form_label('Order by:', 'order'); 45 | echo form_dropdown('order', $options_room, $order, 'class="span2"'); 46 | 47 | $data_submit = array('name' => 'mysubmit', 'class' => 'btn btn-sm btn-primary', 'value' => 'Go'); 48 | 49 | $options_order_type = array('Asc' => 'Asc', 'Desc' => 'Desc'); 50 | echo form_dropdown('order_type', $options_order_type, $order_type_selected, 'class="span1"'); 51 | 52 | echo form_submit($data_submit); 53 | 54 | echo form_close(); 55 | ?> 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | '; 75 | echo ''; 76 | echo ''; 77 | echo ''; 78 | echo ''; 79 | if ($row['status']=='b') 80 | { 81 | echo ''; 82 | }else if ($row['status']=='f') { 83 | echo ''; 84 | } 85 | echo ''; 89 | echo ''; 90 | } 91 | ?> 92 | 93 |
#Room NoTypeFloorSStatus
'.$row['id'].''.$row['room_no'].''.$row['type'].''.$row['floor'].'BussyFree 86 | 87 | 88 |
94 | 95 | '.$this->pagination->create_links().'
'; ?> 96 | 97 |
98 |
-------------------------------------------------------------------------------- /application/views/admin/roomtype/add.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 18 | 19 | 24 | 25 | '; 31 | echo '×'; 32 | echo 'Well done! New Customer Success add to database'; 33 | echo '
'; 34 | }else{ 35 | echo '
'; 36 | echo '×'; 37 | echo 'Oh snap! change a few things up and try submitting again.'; 38 | echo '
'; 39 | } 40 | } 41 | ?> 42 | 43 | 'form-horizontal', 'id' => ''); 46 | 47 | //form validation 48 | echo validation_errors(); 49 | 50 | echo form_open('admin/roomtype/add', $attributes); 51 | ?> 52 |
53 | 54 |
55 | 56 |
57 |
58 | 59 |
60 | 61 |
62 |
63 |
64 | 65 |
66 |
67 | 68 |
69 | 70 |
71 |
72 |
73 | 74 |
75 | 76 |
77 | 78 |
79 |
80 | 81 |
82 | 83 |
84 |
85 |
86 | 87 |
88 |
89 | 90 |
91 | 92 |
93 |
94 |
95 | 96 |
97 | 98 |
99 | 100 |
101 |
102 | 103 |
104 | 105 |
106 |
107 |
108 | 109 | 110 |
111 | 112 | 113 |
114 |
115 | 116 | 117 |
118 |
119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /application/views/admin/roomtype/list.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 14 | 15 | 21 | 22 |
23 |
24 |
25 | 26 | 'form-inline reset-margin', 'id' => 'myform'); 29 | 30 | // save the columns names in a array that we will use as filter 31 | $options_roomtype = array(); 32 | foreach ($roomtype as $array) { 33 | foreach ($array as $key => $value) { 34 | $options_roomtype[$key] = $key; 35 | } 36 | break; 37 | } 38 | 39 | echo form_open('admin/roomtype', $attributes); 40 | 41 | echo form_label('Search:', 'search_string'); 42 | echo form_input('search_string', $search_string_selected); 43 | 44 | echo form_label('Order by:', 'order'); 45 | echo form_dropdown('order', $options_roomtype, $order, 'class="span2"'); 46 | 47 | $data_submit = array('name' => 'mysubmit', 'class' => 'btn btn-sm btn-primary', 'value' => 'Go'); 48 | 49 | $options_order_type = array('Asc' => 'Asc', 'Desc' => 'Desc'); 50 | echo form_dropdown('order_type', $options_order_type, $order_type_selected, 'class="span1"'); 51 | 52 | echo form_submit($data_submit); 53 | 54 | echo form_close(); 55 | ?> 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | '; 75 | echo ''; 76 | echo ''; 77 | echo ''; 78 | echo ''; 79 | echo ''; 80 | echo ''; 84 | echo ''; 85 | } 86 | ?> 87 | 88 |
#RoomTypePriceAdultChild
'.$row['id'].''.$row['type'].''.$row['price'].''.$row['adult'].''.$row['child'].' 81 | 82 | 83 |
89 | 90 | '.$this->pagination->create_links().'
'; ?> 91 | 92 |
93 |
-------------------------------------------------------------------------------- /application/views/admin/signup_form.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CodeIgniter Admin Sample Project 5 | 6 | 7 | 8 | 9 | 13 |
14 | 'form-signin'); 16 | echo form_open('admin/create_member', $attributes); 17 | echo '

Create an account

'; 18 | echo form_input('first_name', set_value('first_name'), 'placeholder="First name"'); 19 | echo form_input('last_name', set_value('last_name'), 'placeholder="Last name"'); 20 | echo form_input('email_address', set_value('email_address'), 'placeholder="Email"'); 21 | 22 | echo form_input('username', set_value('username'), 'placeholder="Username"'); 23 | echo form_password('password', '', 'placeholder="Password"'); 24 | echo form_password('password2', '', 'placeholder="Password confirm"'); 25 | 26 | echo form_submit('submit', 'submit', 'class="btn btn-large btn-primary"'); 27 | echo form_close(); 28 | ?> 29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /application/views/admin/signup_successful.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CodeIgniter Admin Sample Project 5 | 6 | 7 | 8 | 9 |
10 |

Congrats!

11 |

Your account has now been created.

12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /application/views/includes/footer.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /application/views/includes/main_content.php: -------------------------------------------------------------------------------- 1 | main content goes here. -------------------------------------------------------------------------------- /application/views/includes/template.php: -------------------------------------------------------------------------------- 1 | load->view('includes/header'); ?> 2 | 3 | load->view($main_content); ?> 4 | 5 | load->view('includes/footer'); ?> -------------------------------------------------------------------------------- /application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/views/member/footer.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

Back to top

6 |

7 |

8 |
9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /application/views/member/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hotel Management System 5 | 6 | 7 | 8 | 19 | 20 | 21 | 22 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /application/views/member/main_content.php: -------------------------------------------------------------------------------- 1 | main content goes here. -------------------------------------------------------------------------------- /application/views/member/template.php: -------------------------------------------------------------------------------- 1 | load->view('member/header'); ?> 2 | 3 | load->view($main_content); ?> 4 | 5 | load->view('member/footer'); ?> -------------------------------------------------------------------------------- /assets/css/admin/admin.min.css: -------------------------------------------------------------------------------- 1 | html.login,html.login body{background-color:#888}html.login form{margin-bottom:0}html.login div.modal{position:relative;margin:48px auto;top:0;left:0}#modal-recovery{display:none}.dropdown-menu{display:none}.container.top{margin-top:60px}.center{text-align:center}form.search{margin:0}.list-page h2 a{float:right}.crud-actions{width:158px}#footer{margin:30px 0 30px 0;background-color:#fff;background-repeat:no-repeat}body.login #footer hr{display:none}#footer p a{font-weight:bold}#footer p{margin-bottom:0}#footer p.right{float:right}.navbar-fixed-top .brand{color:#000;float:right;font-weight:bold;margin-left:20px;padding-left:0;padding-right:0;text-shadow:0 1px 0 rgba(255,255,255,0.1),0 0 30px rgba(255,255,255,0.125)}.plain-form{margin:0}.progress-form-file{margin:18px 0;width:260px}.users-header a{float:right} .pagination{text-align: center;} .reset-margin{margin: 0;} label{margin: 0 20px;} form label:first-child{margin: 0 20px 0 12px;} input[type="submit"]{margin-left: 20px;} -------------------------------------------------------------------------------- /assets/css/admin/global.css: -------------------------------------------------------------------------------- 1 | @import url(bootstrap.css); 2 | @import url(admin.css); 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/css/global.css: -------------------------------------------------------------------------------- 1 | @import url(bootstrap.css); 2 | @import url(admin/admin.css); 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | .btn-nav { 11 | background-color: #fff; 12 | border: 1px solid #e0e1db; 13 | -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ 14 | -moz-box-sizing: border-box; /* Firefox, other Gecko */ 15 | box-sizing: border-box; /* Opera/IE 8+ */ 16 | } 17 | .btn-nav:hover { 18 | color: #e92d00; 19 | cursor: pointer; 20 | -webkit-transition: color 1s; /* For Safari 3.1 to 6.0 */ 21 | transition: color 1s; 22 | } 23 | .btn-nav.active { 24 | color: #e92d00; 25 | padding: 2px; 26 | border-top: 6px solid #e92d00; 27 | border-bottom: 6px solid #e92d00; 28 | border-left: 0; 29 | border-right: 0; 30 | box-sizing:border-box; 31 | -moz-box-sizing:border-box; 32 | -webkit-box-sizing:border-box; 33 | -webkit-transition: border 0.3s ease-out, color 0.3s ease 0.5s; 34 | -moz-transition: border 0.3s ease-out, color 0.3s ease 0.5s; 35 | -ms-transition: border 0.3s ease-out, color 0.3s ease 0.5s; /* IE10 is actually unprefixed */ 36 | -o-transition: border 0.3s ease-out, color 0.3s ease 0.5s; 37 | transition: border 0.3s ease-out, color 0.3s ease 0.5s; 38 | -webkit-animation: pulsate 1.2s linear infinite; 39 | animation: pulsate 1.2s linear infinite; 40 | } 41 | .btn-nav.active:before { 42 | content: ''; 43 | position: absolute; 44 | border-style: solid; 45 | border-width: 6px 6px 0; 46 | border-color: #e92d00 transparent; 47 | display: block; 48 | width: 0; 49 | z-index: 1; 50 | margin-left: -6px; 51 | top: 0; 52 | left: 50%; 53 | } 54 | .btn-nav .glyphicon { 55 | padding-top: 16px; 56 | font-size: 40px; 57 | } 58 | .btn-nav.active p { 59 | margin-bottom: 8px; 60 | } 61 | @-webkit-keyframes pulsate { 62 | 50% { color: #000; } 63 | } 64 | @keyframes pulsate { 65 | 50% { color: #000; } 66 | } 67 | @media (max-width: 480px) { 68 | .btn-group { 69 | display: block !important; 70 | float: none !important; 71 | width: 100% !important; 72 | max-width: 100% !important; 73 | } 74 | } 75 | @media (max-width: 600px) { 76 | .btn-nav .glyphicon { 77 | padding-top: 12px; 78 | font-size: 26px; 79 | } 80 | } -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /assets/images/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/profile.png -------------------------------------------------------------------------------- /assets/images/templatemo_banner_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_banner_bg.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_banner_bg_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_banner_bg_01.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_button_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_button_01.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_button_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_button_02.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_content_bottom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_content_bottom.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_content_top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_content_top.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_header_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_header_bg.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_horizontal_divider_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_horizontal_divider_01.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_horizontal_divider_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_horizontal_divider_02.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_image_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_image_01.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_image_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_image_02.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_image_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_image_03.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_image_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_image_04.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_image_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_image_05.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_image_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_image_06.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_left_column_top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_left_column_top.jpg -------------------------------------------------------------------------------- /assets/images/templatemo_menu_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_menu_bg.png -------------------------------------------------------------------------------- /assets/images/templatemo_special_offer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/assets/images/templatemo_special_offer.jpg -------------------------------------------------------------------------------- /assets/js/admin.min.js: -------------------------------------------------------------------------------- 1 | var Admin={toggleLoginRecovery:function(){var a=$("#modal-login").is(":visible");(a?$("#modal-login"):$("#modal-recovery")).slideUp(300,function(){(a?$("#modal-recovery"):$("#modal-login")).slideDown(300,function(){$(this).find("input:text:first").focus()})})}};$(function(){$(".toggle-login-recovery").click(function(a){Admin.toggleLoginRecovery();a.preventDefault()})}); -------------------------------------------------------------------------------- /assets/js/home.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $('.button-checkbox').each(function () { 3 | 4 | // Settings 5 | var $widget = $(this), 6 | $button = $widget.find('button'), 7 | $checkbox = $widget.find('input:checkbox'), 8 | color = $button.data('color'), 9 | settings = { 10 | on: { 11 | icon: 'glyphicon glyphicon-check' 12 | }, 13 | off: { 14 | icon: 'glyphicon glyphicon-unchecked' 15 | } 16 | }; 17 | 18 | // Event Handlers 19 | $button.on('click', function () { 20 | $checkbox.prop('checked', !$checkbox.is(':checked')); 21 | $checkbox.triggerHandler('change'); 22 | updateDisplay(); 23 | }); 24 | $checkbox.on('change', function () { 25 | updateDisplay(); 26 | }); 27 | 28 | // Actions 29 | function updateDisplay() { 30 | var isChecked = $checkbox.is(':checked'); 31 | 32 | // Set the button's state 33 | $button.data('state', (isChecked) ? "on" : "off"); 34 | 35 | // Set the button's icon 36 | $button.find('.state-icon') 37 | .removeClass() 38 | .addClass('state-icon ' + settings[$button.data('state')].icon); 39 | 40 | // Update the button's color 41 | if (isChecked) { 42 | $button 43 | .removeClass('btn-default') 44 | .addClass('btn-' + color + ' active'); 45 | } 46 | else { 47 | $button 48 | .removeClass('btn-' + color + ' active') 49 | .addClass('btn-default'); 50 | } 51 | } 52 | 53 | // Initialization 54 | function init() { 55 | 56 | updateDisplay(); 57 | 58 | // Inject the icon if applicable 59 | if ($button.find('.state-icon').length == 0) { 60 | $button.prepend(''); 61 | } 62 | } 63 | init(); 64 | }); 65 | }); 66 | -------------------------------------------------------------------------------- /htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine on 2 | RewriteCond %{REQUEST_FILENAME} !-f 3 | RewriteCond %{REQUEST_FILENAME} !-d 4 | RewriteRule .* index.php/$0 [PT,L] 5 | -------------------------------------------------------------------------------- /system/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /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 */ -------------------------------------------------------------------------------- /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 */ -------------------------------------------------------------------------------- /system/core/Lang.php: -------------------------------------------------------------------------------- 1 | is_loaded, TRUE)) 77 | { 78 | return; 79 | } 80 | 81 | $config =& get_config(); 82 | 83 | if ($idiom == '') 84 | { 85 | $deft_lang = ( ! isset($config['language'])) ? 'english' : $config['language']; 86 | $idiom = ($deft_lang == '') ? 'english' : $deft_lang; 87 | } 88 | 89 | // Determine where the language file is and load it 90 | if ($alt_path != '' && file_exists($alt_path.'language/'.$idiom.'/'.$langfile)) 91 | { 92 | include($alt_path.'language/'.$idiom.'/'.$langfile); 93 | } 94 | else 95 | { 96 | $found = FALSE; 97 | 98 | foreach (get_instance()->load->get_package_paths(TRUE) as $package_path) 99 | { 100 | if (file_exists($package_path.'language/'.$idiom.'/'.$langfile)) 101 | { 102 | include($package_path.'language/'.$idiom.'/'.$langfile); 103 | $found = TRUE; 104 | break; 105 | } 106 | } 107 | 108 | if ($found !== TRUE) 109 | { 110 | show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile); 111 | } 112 | } 113 | 114 | 115 | if ( ! isset($lang)) 116 | { 117 | log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile); 118 | return; 119 | } 120 | 121 | if ($return == TRUE) 122 | { 123 | return $lang; 124 | } 125 | 126 | $this->is_loaded[] = $langfile; 127 | $this->language = array_merge($this->language, $lang); 128 | unset($lang); 129 | 130 | log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile); 131 | return TRUE; 132 | } 133 | 134 | // -------------------------------------------------------------------- 135 | 136 | /** 137 | * Fetch a single line of text from the language array 138 | * 139 | * @access public 140 | * @param string $line the language line 141 | * @return string 142 | */ 143 | function line($line = '') 144 | { 145 | $value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line]; 146 | 147 | // Because killer robots like unicorns! 148 | if ($value === FALSE) 149 | { 150 | log_message('error', 'Could not find the language line "'.$line.'"'); 151 | } 152 | 153 | return $value; 154 | } 155 | 156 | } 157 | // END Language Class 158 | 159 | /* End of file Lang.php */ 160 | /* Location: ./system/core/Lang.php */ 161 | -------------------------------------------------------------------------------- /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 */ -------------------------------------------------------------------------------- /system/core/Utf8.php: -------------------------------------------------------------------------------- 1 | item('charset') == 'UTF-8' // Application charset must be UTF-8 48 | ) 49 | { 50 | log_message('debug', "UTF-8 Support Enabled"); 51 | 52 | define('UTF8_ENABLED', TRUE); 53 | 54 | // set internal encoding for multibyte string functions if necessary 55 | // and set a flag so we don't have to repeatedly use extension_loaded() 56 | // or function_exists() 57 | if (extension_loaded('mbstring')) 58 | { 59 | define('MB_ENABLED', TRUE); 60 | mb_internal_encoding('UTF-8'); 61 | } 62 | else 63 | { 64 | define('MB_ENABLED', FALSE); 65 | } 66 | } 67 | else 68 | { 69 | log_message('debug', "UTF-8 Support Disabled"); 70 | define('UTF8_ENABLED', FALSE); 71 | } 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Clean UTF-8 strings 78 | * 79 | * Ensures strings are UTF-8 80 | * 81 | * @access public 82 | * @param string 83 | * @return string 84 | */ 85 | function clean_string($str) 86 | { 87 | if ($this->_is_ascii($str) === FALSE) 88 | { 89 | $str = @iconv('UTF-8', 'UTF-8//IGNORE', $str); 90 | } 91 | 92 | return $str; 93 | } 94 | 95 | // -------------------------------------------------------------------- 96 | 97 | /** 98 | * Remove ASCII control characters 99 | * 100 | * Removes all ASCII control characters except horizontal tabs, 101 | * line feeds, and carriage returns, as all others can cause 102 | * problems in XML 103 | * 104 | * @access public 105 | * @param string 106 | * @return string 107 | */ 108 | function safe_ascii_for_xml($str) 109 | { 110 | return remove_invisible_characters($str, FALSE); 111 | } 112 | 113 | // -------------------------------------------------------------------- 114 | 115 | /** 116 | * Convert to UTF-8 117 | * 118 | * Attempts to convert a string to UTF-8 119 | * 120 | * @access public 121 | * @param string 122 | * @param string - input encoding 123 | * @return string 124 | */ 125 | function convert_to_utf8($str, $encoding) 126 | { 127 | if (function_exists('iconv')) 128 | { 129 | $str = @iconv($encoding, 'UTF-8', $str); 130 | } 131 | elseif (function_exists('mb_convert_encoding')) 132 | { 133 | $str = @mb_convert_encoding($str, 'UTF-8', $encoding); 134 | } 135 | else 136 | { 137 | return FALSE; 138 | } 139 | 140 | return $str; 141 | } 142 | 143 | // -------------------------------------------------------------------- 144 | 145 | /** 146 | * Is ASCII? 147 | * 148 | * Tests if a string is standard 7-bit ASCII or not 149 | * 150 | * @access public 151 | * @param string 152 | * @return bool 153 | */ 154 | function _is_ascii($str) 155 | { 156 | return (preg_match('/[^\x00-\x7F]/S', $str) == 0); 157 | } 158 | 159 | // -------------------------------------------------------------------- 160 | 161 | } 162 | // End Utf8 Class 163 | 164 | /* End of file Utf8.php */ 165 | /* Location: ./system/core/Utf8.php */ -------------------------------------------------------------------------------- /system/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/cubrid/cubrid_utility.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 */ -------------------------------------------------------------------------------- /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/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/mssql/mssql_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @mssql_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | while ($field = mssql_fetch_field($this->result_id)) 67 | { 68 | $field_names[] = $field->name; 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | while ($field = mssql_fetch_field($this->result_id)) 88 | { 89 | $F = new stdClass(); 90 | $F->name = $field->name; 91 | $F->type = $field->type; 92 | $F->max_length = $field->max_length; 93 | $F->primary_key = 0; 94 | $F->default = ''; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_resource($this->result_id)) 112 | { 113 | mssql_free_result($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | return mssql_data_seek($this->result_id, $n); 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return mssql_fetch_assoc($this->result_id); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return mssql_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file mssql_result.php */ 169 | /* Location: ./system/database/drivers/mssql/mssql_result.php */ -------------------------------------------------------------------------------- /system/database/drivers/mssql/mssql_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/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/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/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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/database/drivers/odbc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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 */ -------------------------------------------------------------------------------- /system/database/drivers/pdo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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/postgre/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/postgre/postgre_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @pg_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | for ($i = 0; $i < $this->num_fields(); $i++) 67 | { 68 | $field_names[] = pg_field_name($this->result_id, $i); 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | for ($i = 0; $i < $this->num_fields(); $i++) 88 | { 89 | $F = new stdClass(); 90 | $F->name = pg_field_name($this->result_id, $i); 91 | $F->type = pg_field_type($this->result_id, $i); 92 | $F->max_length = pg_field_size($this->result_id, $i); 93 | $F->primary_key = 0; 94 | $F->default = ''; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_resource($this->result_id)) 112 | { 113 | pg_free_result($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | return pg_result_seek($this->result_id, $n); 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return pg_fetch_assoc($this->result_id); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return pg_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file postgre_result.php */ 169 | /* Location: ./system/database/drivers/postgre/postgre_result.php */ -------------------------------------------------------------------------------- /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/sqlite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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/database/drivers/sqlsrv/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/sqlsrv_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @sqlsrv_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field) 67 | { 68 | $field_names[] = $field['Name']; 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field) 88 | { 89 | $F = new stdClass(); 90 | $F->name = $field['Name']; 91 | $F->type = $field['Type']; 92 | $F->max_length = $field['Size']; 93 | $F->primary_key = 0; 94 | $F->default = ''; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_resource($this->result_id)) 112 | { 113 | sqlsrv_free_stmt($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | // Not implemented 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return sqlsrv_fetch_array($this->result_id, SQLSRV_FETCH_ASSOC); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return sqlsrv_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file mssql_result.php */ 169 | /* Location: ./system/database/drivers/mssql/mssql_result.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/database/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 | -------------------------------------------------------------------------------- /system/fonts/texb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N3TC4T/Hotel-Management-System/d5c13bee740a5e85839d496ada1a9c663e4cbc82/system/fonts/texb.ttf -------------------------------------------------------------------------------- /system/helpers/array_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/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 */ -------------------------------------------------------------------------------- /system/helpers/download_helper.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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/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 */ -------------------------------------------------------------------------------- /system/helpers/path_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/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 */ -------------------------------------------------------------------------------- /system/helpers/xml_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/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/libraries/Cache/drivers/Cache_apc.php: -------------------------------------------------------------------------------- 1 | $time + $ttl, 121 | 'mtime' => $time, 122 | 'data' => $data 123 | ); 124 | } 125 | 126 | // ------------------------------------------------------------------------ 127 | 128 | /** 129 | * is_supported() 130 | * 131 | * Check to see if APC is available on this system, bail if it isn't. 132 | */ 133 | public function is_supported() 134 | { 135 | if ( ! extension_loaded('apc') OR ini_get('apc.enabled') != "1") 136 | { 137 | log_message('error', 'The APC PHP extension must be loaded to use APC Cache.'); 138 | return FALSE; 139 | } 140 | 141 | return TRUE; 142 | } 143 | 144 | // ------------------------------------------------------------------------ 145 | 146 | 147 | } 148 | // End Class 149 | 150 | /* End of file Cache_apc.php */ 151 | /* Location: ./system/libraries/Cache/drivers/Cache_apc.php */ 152 | -------------------------------------------------------------------------------- /system/libraries/Cache/drivers/Cache_dummy.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/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | --------------------------------------------------------------------------------