├── views ├── footer.php ├── images │ ├── Thumbs.db │ ├── blank.gif │ ├── chat6.png │ ├── del.png │ ├── edit.png │ ├── active.png │ ├── search2.png │ ├── btn_tile.gif │ ├── ico-back.png │ ├── ico-files.png │ ├── ico-images.png │ ├── ico-links.png │ ├── ico-units.png │ ├── ico-videos.png │ ├── imgs_2x2.png │ ├── imgs_2x3.png │ ├── imgs_2x4.png │ ├── imgs_2x5.png │ ├── imgs_2x6.png │ ├── imgs_2x7.png │ ├── notactive.png │ ├── subnav_btn.gif │ ├── topnav_bg.gif │ ├── ico-projects.png │ ├── topnav_hover.gif │ └── dropdown_linkbg.gif ├── index.html ├── login_loader.php ├── side_panel.php ├── welcome_message.php ├── preloader.php ├── warning.php ├── header.php ├── login_success.php ├── loader[spliter].php ├── top_menu.php ├── add_country.php ├── login.php ├── add_city.php ├── add_area.php ├── add_class.php ├── classes.php ├── loader.php ├── images.php ├── units.php ├── files.php ├── videos.php ├── areas.php ├── countries.php ├── cities.php ├── projects.php ├── users.php ├── add_user.php ├── add_images.php ├── add_files.php ├── add_videos.php ├── add_project.php └── add_unit.php ├── README.doc ├── Realestate_Demo_Full_Source.zip ├── models ├── index.html ├── login_model.php ├── classes_model.php ├── areas_model.php ├── units_model.php ├── cities_model.php ├── users_model.php ├── projects_model.php ├── countries_model.php └── media_model.php ├── controllers ├── index.html ├── welcome.php ├── test.php ├── login.php ├── countries.php ├── projects.php ├── classes.php ├── units.php ├── users.php ├── areas.php ├── cities.php └── media.php └── README /views/footer.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /README.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/README.doc -------------------------------------------------------------------------------- /views/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/Thumbs.db -------------------------------------------------------------------------------- /views/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/blank.gif -------------------------------------------------------------------------------- /views/images/chat6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/chat6.png -------------------------------------------------------------------------------- /views/images/del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/del.png -------------------------------------------------------------------------------- /views/images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/edit.png -------------------------------------------------------------------------------- /views/images/active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/active.png -------------------------------------------------------------------------------- /views/images/search2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/search2.png -------------------------------------------------------------------------------- /views/images/btn_tile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/btn_tile.gif -------------------------------------------------------------------------------- /views/images/ico-back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-back.png -------------------------------------------------------------------------------- /views/images/ico-files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-files.png -------------------------------------------------------------------------------- /views/images/ico-images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-images.png -------------------------------------------------------------------------------- /views/images/ico-links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-links.png -------------------------------------------------------------------------------- /views/images/ico-units.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-units.png -------------------------------------------------------------------------------- /views/images/ico-videos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-videos.png -------------------------------------------------------------------------------- /views/images/imgs_2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/imgs_2x2.png -------------------------------------------------------------------------------- /views/images/imgs_2x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/imgs_2x3.png -------------------------------------------------------------------------------- /views/images/imgs_2x4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/imgs_2x4.png -------------------------------------------------------------------------------- /views/images/imgs_2x5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/imgs_2x5.png -------------------------------------------------------------------------------- /views/images/imgs_2x6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/imgs_2x6.png -------------------------------------------------------------------------------- /views/images/imgs_2x7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/imgs_2x7.png -------------------------------------------------------------------------------- /views/images/notactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/notactive.png -------------------------------------------------------------------------------- /views/images/subnav_btn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/subnav_btn.gif -------------------------------------------------------------------------------- /views/images/topnav_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/topnav_bg.gif -------------------------------------------------------------------------------- /views/images/ico-projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/ico-projects.png -------------------------------------------------------------------------------- /views/images/topnav_hover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/topnav_hover.gif -------------------------------------------------------------------------------- /Realestate_Demo_Full_Source.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/Realestate_Demo_Full_Source.zip -------------------------------------------------------------------------------- /views/images/dropdown_linkbg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsamirdev/PHP-Codeigniter-code-sample/HEAD/views/images/dropdown_linkbg.gif -------------------------------------------------------------------------------- /models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /views/login_loader.php: -------------------------------------------------------------------------------- 1 | load->view("header"); ?> 2 |
3 | load->view($main_content); ?> 4 | load->view("footer"); ?> 5 | -------------------------------------------------------------------------------- /controllers/welcome.php: -------------------------------------------------------------------------------- 1 | load->view('welcome_message'); 13 | echo base_url(); 14 | } 15 | } 16 | 17 | /* End of file welcome.php */ 18 | /* Location: ./system/application/controllers/welcome.php */ -------------------------------------------------------------------------------- /views/side_panel.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /models/login_model.php: -------------------------------------------------------------------------------- 1 | db->select('userid, accountid , name, is_admin'); 7 | $this->db->where("email ='".$_POST['email']."' AND pass ='".md5($_POST['pass'])."' AND status =1"); 8 | $query = $this->db->get('users'); 9 | if ($query->num_rows() > 0){ 10 | return $query->row_array(); 11 | }else 12 | return FALSE; 13 | } 14 | 15 | } 16 | ?> -------------------------------------------------------------------------------- /controllers/test.php: -------------------------------------------------------------------------------- 1 | load->view('add_files'); 13 | } 14 | 15 | function tt(){ 16 | $this->load->helper('resize_image'); 17 | dodo(); 18 | } 19 | 20 | function out($m=null,$n=null){ 21 | echo $m; 22 | echo $n; 23 | } 24 | } 25 | ?> -------------------------------------------------------------------------------- /views/welcome_message.php: -------------------------------------------------------------------------------- 1 |

Welcome to CodeIgniter!

2 | 3 |

The page you are looking at is being generated dynamically by CodeIgniter.

4 | 5 |

If you would like to edit this page you'll find it located at:

6 | system/application/views/welcome_message.php 7 | 8 |

The corresponding controller for this page is found at:

9 | system/application/controllers/welcome.php 10 | 11 |

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

12 | 13 | 14 |


Page rendered in {elapsed_time} seconds

15 | -------------------------------------------------------------------------------- /views/preloader.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
-------------------------------------------------------------------------------- /views/warning.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 |
16 |
Warning
17 |
18 |

19 |
20 |
21 |
22 | 25 | 26 | 27 | 30 | -------------------------------------------------------------------------------- /views/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Real Estate Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | PHP-Codeigniter code sample 2 | 3 | 4 | This is an underdevelopment demo for a Realestate sample portal using PHP-Codeigniter MVC framework. 5 | The demo provides a cool experience of a Full-Ajax form load and instant ajax form validation without using any iframes nor page reloads. 6 | 7 | 8 | A live demo for the control panel: 9 | User email : himalking@hotmail.com 10 | Password : hima1234 11 | http://estore.net76.net/realestate/ 12 | 13 | 14 | A GLIMPSE: 15 | Once you create a Project you can define Units in it and update its data, images, videos, files, and links. 16 | Same goes for Units. 17 | 18 | 19 | NOTE: 20 | You may encounter a decreased performance due to using FREE hosting along with the difference between the database hosting server (db4free.net) and the control panel hosting server (000webhost.com). 21 | However in "Realestate_Demo_Full_Source.zip" you will find the full source for the demo along with a readme file describing how to configure and deploy the files on your localhost or publishing server. 22 | -------------------------------------------------------------------------------- /views/login_success.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 18 |
19 |
Login Successful
20 |

21 |
22 | welcome:

23 | You are loged in as: 24 | 25 |
26 |
27 | You can now proceed to Admin control panel.
28 |
29 |
30 |
31 | 34 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /models/classes_model.php: -------------------------------------------------------------------------------- 1 | db->insert('classes',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 12 | $this->db->update('classes',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 19 | $this->db->delete('classes'); 20 | } 21 | 22 | function get_class_data($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 24 | $query = $this->db->get('classes'); 25 | if ($query->num_rows() > 0){ 26 | return $query->row_array(); 27 | } 28 | else 29 | return FALSE; 30 | } 31 | 32 | function get_classes($entity_type){ 33 | $this->db->where("accountid ='".sess_var('accountid')."' AND entitytype =".$entity_type); 34 | $query = $this->db->get('classes'); 35 | if ($query->num_rows() > 0) 36 | { 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | } 46 | ?> -------------------------------------------------------------------------------- /views/loader[spliter].php: -------------------------------------------------------------------------------- 1 | load->view($main_content); 6 | exit; 7 | } 8 | ?> 9 | 10 | load->view("header"); ?> 11 | 12 | 30 |
31 |
32 | load->view("side_panel"); ?> 33 |
34 |
35 | load->view("preloader"); ?> 36 |
37 | load->view('welcome_message'); ?> 38 |
39 |
40 |
41 | load->view("footer"); ?> -------------------------------------------------------------------------------- /controllers/login.php: -------------------------------------------------------------------------------- 1 | uri->uri_to_assoc(3); 12 | //$ref = $this->uri->assoc_to_uri($ref); 13 | //$this->load->view("loader",array('main_content'=>"login", 'ref'=>$ref)); 14 | 15 | $this->load->view("login_loader",array('main_content'=>"login")); 16 | } 17 | 18 | function logout() 19 | { 20 | $this->session->sess_destroy(); 21 | redirect('login'); 22 | } 23 | 24 | function submit(){ 25 | 26 | if ( ! $this->validate_login()){ 27 | //ajax data array 28 | $data = array( 29 | 'is_valid' => 0 30 | ); 31 | echo json_encode($data); 32 | } 33 | else{ 34 | //view data array 35 | $data = array( 36 | 'email' => $_POST['email'] 37 | ); 38 | $content = $this->load->view("login_success",$data,TRUE); 39 | //ajax data array 40 | $data = array( 41 | 'is_valid' => 1, 42 | 'content' => $content 43 | ); 44 | echo json_encode($data); 45 | } 46 | } 47 | 48 | function validate_login(){ 49 | $this->load->model('login_model'); 50 | $result = $this->login_model->validate_login(); 51 | if($result === FALSE){ 52 | return FALSE; 53 | }else{ 54 | $result['logged_in'] = TRUE; 55 | $this->session->set_userdata($result); 56 | return TRUE; 57 | } 58 | } 59 | } 60 | ?> -------------------------------------------------------------------------------- /models/areas_model.php: -------------------------------------------------------------------------------- 1 | db->insert('areas',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 12 | $this->db->update('areas',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 19 | return $this->db->delete('areas'); 20 | } 21 | 22 | function get_area($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 24 | $query = $this->db->get('areas'); 25 | if ($query->num_rows() > 0) 26 | { 27 | return $query->row_array(); 28 | } 29 | else 30 | return FALSE; 31 | } 32 | 33 | function get_areas($city_id){ 34 | $this->db->where("accountid ='".sess_var('accountid')."' AND cityid =".$city_id); 35 | $query = $this->db->get('areas'); 36 | if ($query->num_rows() > 0){ 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | function get_areas_table(){ 46 | $this->db->where("accountid ='".sess_var('accountid')."'"); 47 | $query = $this->db->get('areas'); 48 | if ($query->num_rows() > 0) 49 | { 50 | $this->load->library('table'); 51 | return $this->table->generate($query); 52 | } 53 | } 54 | 55 | } 56 | ?> -------------------------------------------------------------------------------- /models/units_model.php: -------------------------------------------------------------------------------- 1 | db->insert('units',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 12 | $this->db->update('units',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 19 | return $this->db->delete('units'); 20 | } 21 | 22 | function get_unit($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 24 | $query = $this->db->get('units'); 25 | if ($query->num_rows() > 0) 26 | { 27 | return $query->row_array(); 28 | } 29 | else 30 | return FALSE; 31 | } 32 | 33 | function get_units($project_id){ 34 | $this->db->where("accountid ='".sess_var('accountid')."' AND projectid =".$project_id); 35 | $query = $this->db->get('units'); 36 | if ($query->num_rows() > 0){ 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | function get_units_table(){ 46 | $this->db->where("accountid ='".sess_var('accountid')."'"); 47 | $query = $this->db->get('units'); 48 | if ($query->num_rows() > 0) 49 | { 50 | $this->load->library('table'); 51 | return $this->table->generate($query); 52 | } 53 | } 54 | 55 | } 56 | ?> -------------------------------------------------------------------------------- /models/cities_model.php: -------------------------------------------------------------------------------- 1 | db->insert('cities',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 12 | $this->db->update('cities',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 19 | return $this->db->delete('cities'); 20 | } 21 | 22 | function get_city($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 24 | $query = $this->db->get('cities'); 25 | if ($query->num_rows() > 0) 26 | { 27 | return $query->row_array(); 28 | } 29 | else 30 | return FALSE; 31 | } 32 | 33 | function get_cities($country_id){ 34 | $this->db->where("accountid ='".sess_var('accountid')."' AND countryid =".$country_id); 35 | $query = $this->db->get('cities'); 36 | if ($query->num_rows() > 0){ 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | function get_cities_table(){ 46 | $this->db->where("accountid ='".sess_var('accountid')."'"); 47 | $query = $this->db->get('cities'); 48 | if ($query->num_rows() > 0) 49 | { 50 | $this->load->library('table'); 51 | return $this->table->generate($query); 52 | } 53 | } 54 | 55 | } 56 | ?> -------------------------------------------------------------------------------- /models/users_model.php: -------------------------------------------------------------------------------- 1 | db->insert('users',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND userid =".$id); 12 | $this->db->update('users',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND userid =".$id); 19 | return $this->db->delete('users'); 20 | } 21 | 22 | function get_user($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND userid =".$id); 24 | $query = $this->db->get('users'); 25 | if ($query->num_rows() > 0){ 26 | return $query->row_array(); 27 | } 28 | else 29 | return FALSE; 30 | } 31 | 32 | function get_users(){ 33 | $this->db->where("accountid ='".sess_var('accountid')."'"); 34 | $query = $this->db->get('users'); 35 | if ($query->num_rows() > 0) 36 | { 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | function get_users_table(){ 46 | $this->db->select('name , email'); 47 | $this->db->where("accountid ='".sess_var('accountid')."'"); 48 | $query = $this->db->get('users'); 49 | if ($query->num_rows() > 0){ 50 | $this->load->library('table'); 51 | $this->table->set_heading('Name', 'Email'); 52 | 53 | return $this->table->generate($query); 54 | } 55 | } 56 | 57 | } 58 | ?> -------------------------------------------------------------------------------- /models/projects_model.php: -------------------------------------------------------------------------------- 1 | db->insert('projects',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 12 | $this->db->update('projects',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 19 | $this->db->delete('projects'); 20 | } 21 | 22 | function get_project($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 24 | $query = $this->db->get('projects'); 25 | if ($query->num_rows() > 0){ 26 | return $query->row_array(); 27 | } 28 | else 29 | return FALSE; 30 | } 31 | 32 | function get_projects(){ 33 | $this->db->where("accountid ='".sess_var('accountid')."'"); 34 | $query = $this->db->get('projects'); 35 | if ($query->num_rows() > 0) 36 | { 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | function get_projects_table(){ 46 | $this->db->where("accountid ='".sess_var('accountid')."'"); 47 | $query = $this->db->get('projects'); 48 | if ($query->num_rows() > 0) 49 | { 50 | $this->load->library('table'); 51 | return $this->table->generate($query); 52 | } 53 | } 54 | 55 | function select_fields($id, $fields='id'){ 56 | $this->db->select($fields); 57 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 58 | $query = $this->db->get('projects'); 59 | if ($query->num_rows() > 0) 60 | { 61 | return $query->row_array(); 62 | } 63 | } 64 | 65 | } 66 | ?> -------------------------------------------------------------------------------- /models/countries_model.php: -------------------------------------------------------------------------------- 1 | db->insert('countries',$_POST); 6 | 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($id){ 11 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 12 | $this->db->update('countries',$_POST); 13 | 14 | return $this->db->_error_number(); 15 | } 16 | 17 | function delete($id){ 18 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 19 | $this->db->delete('countries'); 20 | } 21 | 22 | function get_country($id){ 23 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 24 | $query = $this->db->get('countries'); 25 | if ($query->num_rows() > 0){ 26 | return $query->row_array(); 27 | } 28 | else 29 | return FALSE; 30 | } 31 | 32 | function get_countries(){ 33 | $this->db->where("accountid ='".sess_var('accountid')."'"); 34 | $query = $this->db->get('countries'); 35 | if ($query->num_rows() > 0) 36 | { 37 | foreach($query->result() as $row) 38 | { 39 | $result[] = $row; 40 | } 41 | return $result; 42 | } 43 | } 44 | 45 | function get_countries_table(){ 46 | $this->db->where("accountid ='".sess_var('accountid')."'"); 47 | $query = $this->db->get('countries'); 48 | if ($query->num_rows() > 0) 49 | { 50 | $this->load->library('table'); 51 | return $this->table->generate($query); 52 | } 53 | } 54 | 55 | function select_fields($id, $fields='id'){ 56 | $this->db->select($fields); 57 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 58 | $query = $this->db->get('countries'); 59 | if ($query->num_rows() > 0) 60 | { 61 | return $query->row_array(); 62 | } 63 | } 64 | 65 | } 66 | ?> -------------------------------------------------------------------------------- /models/media_model.php: -------------------------------------------------------------------------------- 1 | db->insert($media_type,$_POST); 7 | return $this->db->_error_number(); 8 | } 9 | 10 | function update($media_type, $id) 11 | { 12 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 13 | $this->db->update($media_type,$_POST); 14 | 15 | return $this->db->_error_number(); 16 | } 17 | 18 | function delete($media_type, $id) 19 | { 20 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 21 | return $this->db->delete($media_type); 22 | } 23 | 24 | function get_media($media_type, $id) 25 | { 26 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 27 | $query = $this->db->get($media_type); 28 | if ($query->num_rows() > 0) 29 | { 30 | return $query->row_array(); 31 | } 32 | else 33 | return FALSE; 34 | } 35 | 36 | //get media name (used in update to delete old file) 37 | function get_name($media_type, $id) 38 | { 39 | $this->db->select('name'); 40 | if($media_type == 'videos') 41 | { 42 | $this->db->select('thumb'); 43 | } 44 | $this->db->where("accountid ='".sess_var('accountid')."' AND id =".$id); 45 | $query = $this->db->get($media_type); 46 | if ($query->num_rows() > 0) 47 | { 48 | return $query->row_array(); 49 | } 50 | else 51 | return FALSE; 52 | } 53 | 54 | function get_media_list($media_type, $entity_type, $entity_id) 55 | { 56 | $this->db->where("accountid ='".sess_var('accountid')."' AND entitytype =$entity_type AND entityid =$entity_id"); 57 | $query = $this->db->get($media_type); 58 | if ($query->num_rows() > 0){ 59 | foreach($query->result() as $row) 60 | { 61 | $result[] = $row; 62 | } 63 | return $result; 64 | } 65 | } 66 | 67 | function get_media_table($media_type, $entity_type, $entity_id) 68 | { 69 | $this->db->where("accountid ='".sess_var('accountid')."' AND entitytype =$entity_type AND entityid =$entity_id"); 70 | $query = $this->db->get($media_type); 71 | if ($query->num_rows() > 0) 72 | { 73 | $this->load->library('table'); 74 | return $this->table->generate($query); 75 | } 76 | } 77 | } 78 | ?> -------------------------------------------------------------------------------- /views/top_menu.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/add_country.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | 68 | 69 |
70 | 71 |
72 | 73 | 74 |    75 | 76 |
77 |
78 |
79 |
80 |
81 | 84 | 85 | 86 | 89 | -------------------------------------------------------------------------------- /views/login.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 56 | 57 |
58 |
59 |
Admin Login
60 |
61 |
62 |
63 |
64 | 65 | 66 |
67 | 68 |
69 | 70 | 71 |
72 | 73 |
74 | 75 |
76 |
77 |
78 |
79 |
80 | 83 | 84 | 85 | 88 | -------------------------------------------------------------------------------- /views/add_city.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | 68 | 69 |
70 | 71 |
72 | 73 | 74 |    75 | 76 |
77 |
78 |
79 |
80 |
81 | 84 | 85 | 86 | 89 | -------------------------------------------------------------------------------- /views/add_area.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | 68 | 69 |
70 | 71 |
72 | 73 | 74 |    75 | 76 |
77 |
78 |
79 |
80 |
81 | 84 | 85 | 86 | 89 | -------------------------------------------------------------------------------- /controllers/countries.php: -------------------------------------------------------------------------------- 1 | load->model('countries_model'); 10 | } 11 | 12 | function index() 13 | { 14 | //$this->get_countries(); 15 | }//END INDEX 16 | 17 | function get_countries(){ 18 | $result = $this->countries_model->get_countries(); 19 | $data = array( 20 | 'main_content' => 'countries', 21 | 'countries' => $result 22 | ); 23 | $this->load->view("loader", $data); 24 | }//END GET_COUNTRIES 25 | 26 | function add(){ 27 | $this->load->view("loader",array('main_content'=>"add_country")); 28 | }//END ADD 29 | 30 | function edit($id=''){ 31 | if( ! $id) 32 | { 33 | echo "Country Id required"; 34 | return; 35 | } 36 | $result = $this->countries_model->get_country($id); 37 | if( ! $result) 38 | { 39 | echo "Nothing to edit"; 40 | return; 41 | } 42 | $result['main_content'] = "add_country"; 43 | $this->load->view("loader",$result); 44 | }//END EDIT 45 | 46 | function delete($id=''){ 47 | if($id){ 48 | $this->load->model('cities_model'); 49 | if($this->cities_model->get_cities($id)) 50 | { 51 | $msg = "Country NOT empty!

Please delete all cities in this country before delete"; 52 | $this->load->view("warning",array('msg'=>$msg)); 53 | return; 54 | } 55 | 56 | $this->countries_model->delete($id); 57 | $this->get_countries(); 58 | }else 59 | echo "Country Id required"; 60 | }//END DELETE 61 | 62 | function submit($id=''){ 63 | $_POST['accountid'] = sess_var('accountid'); 64 | 65 | //validate form 66 | $this->load->library('form_validation'); 67 | $this->form_validation->set_rules('name', 'Name', 'trim|required'); 68 | 69 | if ($this->form_validation->run() == FALSE){ 70 | //ajax data array 71 | $data = array( 72 | 'server_validation' => validation_errors() 73 | ); 74 | echo json_encode($data); 75 | } 76 | else{ 77 | if($id){ 78 | $result = $this->countries_model->update($id); 79 | $content = "Country has been UPDATED successfully"; 80 | } 81 | else{ 82 | $result = $this->countries_model->add(); 83 | $content = "Country has been CREATED successfully"; 84 | } 85 | //if duplicate key 86 | if($result == 1062){ 87 | //ajax data array 88 | $data = array( 89 | 'is_valid' => 0 90 | ); 91 | echo json_encode($data); 92 | }else{ 93 | //ajax data array 94 | $data = array( 95 | 'is_valid' => 1, 96 | 'content' => $content 97 | ); 98 | echo json_encode($data); 99 | } 100 | }//end ELSE form valid 101 | }//END SUBMIT 102 | } 103 | ?> -------------------------------------------------------------------------------- /controllers/projects.php: -------------------------------------------------------------------------------- 1 | load->model('projects_model'); 11 | } 12 | 13 | function index() 14 | { 15 | //$this->get_projects(); 16 | }//END INDEX 17 | 18 | function get_projects(){ 19 | $result = $this->projects_model->get_projects(); 20 | $data = array( 21 | 'main_content' => 'projects', 22 | 'projects' => $result 23 | ); 24 | $this->load->view("loader", $data); 25 | }//END GET_PROJECTS 26 | 27 | function add(){ 28 | $this->load->view("loader",array('main_content'=>"add_project")); 29 | }//END ADD 30 | 31 | function edit($id=''){ 32 | if( ! $id) 33 | { 34 | echo "Project Id required"; 35 | return; 36 | } 37 | $result = $this->projects_model->get_project($id); 38 | if( ! $result) 39 | { 40 | echo "Nothing to edit"; 41 | return; 42 | } 43 | $result['main_content'] = "add_project"; 44 | $this->load->view("loader",$result); 45 | }//END EDIT 46 | 47 | function delete($id=''){ 48 | if($id){ 49 | $this->load->model('units_model'); 50 | if($this->units_model->get_units($id)) 51 | { 52 | $msg = "Project NOT empty!

Please delete all the units in this project before delete"; 53 | $this->load->view("warning",array('msg'=>$msg)); 54 | return; 55 | } 56 | 57 | $this->projects_model->delete($id); 58 | $this->get_projects(); 59 | }else 60 | echo "Project Id required"; 61 | }//END DELETE 62 | 63 | function submit($id=''){ 64 | $_POST['accountid'] = sess_var('accountid'); 65 | 66 | //validate form 67 | $this->load->library('form_validation'); 68 | $this->form_validation->set_rules('name', 'Name', 'trim|required|min_length[4]'); 69 | 70 | if ($this->form_validation->run() == FALSE){ 71 | //ajax data array 72 | $data = array( 73 | 'server_validation' => validation_errors() 74 | ); 75 | echo json_encode($data); 76 | } 77 | else{ 78 | if($id){ 79 | $result = $this->projects_model->update($id); 80 | $content = "Project has been UPDATED successfully"; 81 | } 82 | else{ 83 | $result = $this->projects_model->add(); 84 | $content = "Project has been CREATED successfully"; 85 | } 86 | //if duplicate key 87 | if($result == 1062){ 88 | //ajax data array 89 | $data = array( 90 | 'is_valid' => 0 91 | ); 92 | echo json_encode($data); 93 | }else{ 94 | //ajax data array 95 | $data = array( 96 | 'is_valid' => 1, 97 | 'content' => $content 98 | ); 99 | echo json_encode($data); 100 | } 101 | }//end ELSE form valid 102 | }//END SUBMIT 103 | } 104 | ?> -------------------------------------------------------------------------------- /views/add_class.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 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 | 89 | 90 | 91 | 94 | -------------------------------------------------------------------------------- /views/classes.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 26 |
27 |
28 |
29 |
+ Add
30 | Unit Type
31 |
32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 48 | "> 49 | 52 | 53 | 54 | 55 | 58 | 59 | 60 | 61 | 62 | 63 |
NameEditDelete
64 | 68 |
No Classes defined. Please add one.
69 | 72 |
73 |
74 | 77 | 78 | 79 | 82 | -------------------------------------------------------------------------------- /views/loader.php: -------------------------------------------------------------------------------- 1 | load->view($main_content); 6 | exit; 7 | } 8 | ?> 9 | 10 | load->view("header"); ?> 11 | load->view("top_menu"); ?> 12 | 13 | 74 |
75 |
76 | load->view("side_panel"); ?> 77 |
78 |
79 | load->view("preloader"); ?> 80 |
81 | load->view($main_content); ?> 82 |
83 |
84 |
85 | load->view("footer"); ?> -------------------------------------------------------------------------------- /views/images.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 27 |
28 |
29 | IMAGES
30 |
31 |
32 | Add Image 33 | 34 |
35 |
36 | 39 | 40 | 41 | 42 | 47 | "> 48 | 49 | 52 | 53 | 54 | 55 | 56 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
size?> KB
67 | 70 |
71 |
72 | 75 | 76 | 77 | 80 | -------------------------------------------------------------------------------- /views/units.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 |
16 |
17 |
18 |
19 |
+ Add
20 | units
21 |
22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 40 | "> 41 | 43 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
Statusunit Name EditDelete
42 | status?"src='images/active.png' title='Active'":"src='images/notactive.png' title='Not Active'"?> width="16" height="16" />
59 | 63 |
No Units defined in this project
64 | 67 |
68 |
69 | 72 | 73 | 74 | 77 | -------------------------------------------------------------------------------- /views/files.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 27 |
28 |
29 | FILES
30 |
31 |
32 | Add File 33 | 34 |
35 |
36 | 39 | 40 | 41 | 42 | 47 | "> 48 | 49 | 54 | 55 | 56 | 57 | 58 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
status?"src='images/active.png' title='Active'":"src='images/notactive.png' title='Not Active'"?> width="16" height="16" /> 50 | 53 |
69 | 72 |
73 |
74 | 77 | 78 | 79 | 82 | -------------------------------------------------------------------------------- /views/videos.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 27 |
28 |
29 | VIDEOS
30 |
31 |
32 | Add Video 33 | 34 |
35 |
36 | 39 | 40 | 41 | 42 | 47 | "> 48 | 49 | 54 | 55 | 56 | 57 | 58 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
status?"src='images/active.png' title='Active'":"src='images/notactive.png' title='Not Active'"?> width="16" height="16" /> 50 | 53 |
69 | 72 |
73 |
74 | 77 | 78 | 79 | 82 | -------------------------------------------------------------------------------- /views/areas.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 26 |
27 |
28 |
29 |
30 |
+ Add
31 | AREAS
32 |
33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | "> 51 | 54 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 65 |
Area NameEditDelete
66 | 70 |
No Areas defined in this City
71 | 74 |
75 |
76 | 79 | 80 | 81 | 84 | -------------------------------------------------------------------------------- /views/countries.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 26 |
27 |
28 |
29 |
+ Add
30 | COUNTRIES
31 |
32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 49 | "> 50 | 53 | 54 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
Country NameCitiesEditDelete
67 | 71 |
No Countries defined. Please add one.
72 | 75 |
76 |
77 | 80 | 81 | 82 | 85 | -------------------------------------------------------------------------------- /controllers/classes.php: -------------------------------------------------------------------------------- 1 | load->model('classes_model'); 10 | } 11 | 12 | function index() 13 | { 14 | //$this->get_classes(); 15 | }//END INDEX 16 | 17 | function get_classes($entity_type=''){ 18 | if( ! $entity_type) 19 | { 20 | echo "Entity type required"; 21 | return; 22 | } 23 | $result = $this->classes_model->get_classes($entity_type); 24 | $data = array( 25 | 'main_content' => 'classes', 26 | 'entity_type' => $entity_type, 27 | 'classes' => $result 28 | ); 29 | $this->load->view("loader", $data); 30 | }//END GET_CLASSES 31 | 32 | function add($entity_type='') 33 | { 34 | if( ! $entity_type) 35 | { 36 | echo "Entity type required"; 37 | return; 38 | } 39 | $data = array( 40 | 'main_content' => 'add_class', 41 | 'entity_type' => $entity_type 42 | ); 43 | $this->load->view("loader",$data); 44 | }//END ADD 45 | 46 | function edit($entity_type='', $id=''){ 47 | if( ! $entity_type || ! $id) 48 | { 49 | echo "missing data, Class Id required"; 50 | return; 51 | } 52 | $result = $this->classes_model->get_class_data($id); 53 | if( ! $result) 54 | { 55 | echo "Nothing to edit"; 56 | return; 57 | } 58 | $result['main_content'] = "add_class"; 59 | $result['entity_type'] = $entity_type; 60 | $this->load->view("loader",$result); 61 | }//END EDIT 62 | 63 | function delete($entity_type='', $id=''){ 64 | if( ! $entity_type || ! $id) 65 | { 66 | echo "missing data, Class Id required"; 67 | return; 68 | } 69 | $this->classes_model->delete($id); 70 | $this->get_classes($entity_type); 71 | }//END DELETE 72 | 73 | function submit($entity_type='', $id=''){ 74 | $_POST['accountid'] = sess_var('accountid'); 75 | if( ! $id) //if not edit (i.e. add) 76 | { 77 | $_POST['entitytype'] = $entity_type; 78 | } 79 | 80 | //validate form 81 | $this->load->library('form_validation'); 82 | $this->form_validation->set_rules('name', 'Name', 'trim|required'); 83 | 84 | if ($this->form_validation->run() == FALSE){ 85 | //ajax data array 86 | $data = array( 87 | 'server_validation' => validation_errors() 88 | ); 89 | echo json_encode($data); 90 | } 91 | else{ 92 | if($id){ 93 | $result = $this->classes_model->update($id); 94 | $content = "Class has been UPDATED successfully"; 95 | } 96 | else{ 97 | $result = $this->classes_model->add(); 98 | $content = "Class has been CREATED successfully"; 99 | } 100 | //if duplicate key 101 | if($result == 1062){ 102 | //ajax data array 103 | $data = array( 104 | 'is_valid' => 0 105 | ); 106 | echo json_encode($data); 107 | }else{ 108 | //ajax data array 109 | $data = array( 110 | 'is_valid' => 1, 111 | 'content' => $content 112 | ); 113 | echo json_encode($data); 114 | } 115 | }//end ELSE form valid 116 | }//END SUBMIT 117 | } 118 | ?> -------------------------------------------------------------------------------- /controllers/units.php: -------------------------------------------------------------------------------- 1 | load->model('units_model'); 10 | } 11 | 12 | function index() 13 | { 14 | 15 | }//END INDEX 16 | 17 | function get_units($project_id=0) 18 | { 19 | $result = $this->units_model->get_units($project_id); 20 | $data = array( 21 | 'main_content' => 'units', 22 | 'units' => $result, 23 | 'project_id' => $project_id 24 | ); 25 | $this->load->view("loader", $data); 26 | }//END GET_UNITS 27 | 28 | function add($project_id=0) 29 | { 30 | $data = array( 31 | 'main_content' => 'add_unit', 32 | 'project_id' => $project_id 33 | ); 34 | $this->load->view("loader",$data); 35 | }//END ADD 36 | 37 | function edit($project_id=0, $id='') 38 | { 39 | if( ! $id) 40 | { 41 | echo "Unit Id required"; 42 | return; 43 | } 44 | $result = $this->units_model->get_unit($id); 45 | if( ! $result) 46 | { 47 | echo "Nothing to edit"; 48 | return; 49 | } 50 | $result['main_content'] = "add_unit"; 51 | $result['project_id'] = $project_id; 52 | $this->load->view("loader",$result); 53 | }//END EDIT 54 | 55 | function delete($id='') 56 | { 57 | if(! $id) 58 | { 59 | echo "Id required"; 60 | return; 61 | } 62 | if($this->units_model->delete($id)) 63 | { 64 | //ajax data array 65 | $data = array( 66 | 'is_valid' => 1, 67 | 'content' => "Unit deleted successfully" 68 | ); 69 | echo json_encode($data); 70 | } 71 | else{ 72 | $data = array( 73 | 'is_valid' => 0 74 | ); 75 | echo json_encode($data); 76 | } 77 | }//END DELETE 78 | 79 | function submit($project_id=0, $id='') 80 | { 81 | //prep form data 82 | $_POST['accountid'] = sess_var('accountid'); 83 | if( ! $id) //if not edit (i.e. add) 84 | { 85 | $_POST['projectid'] = $project_id; 86 | } 87 | //validate form [perform validation server-side to make sure of fields] 88 | $this->load->library('form_validation'); 89 | $this->form_validation->set_rules('name', 'Name', 'trim|required'); 90 | 91 | if ($this->form_validation->run() == FALSE){ 92 | //ajax data array 93 | $data = array( 94 | 'server_validation' => validation_errors() 95 | ); 96 | echo json_encode($data); 97 | } 98 | else{ 99 | if($id){ 100 | $result = $this->units_model->update($id); 101 | $content = "Unit has been UPDATED successfully"; 102 | } 103 | else{ 104 | $result = $this->units_model->add(); 105 | $content = "Unit has been CREATED successfully"; 106 | } 107 | //if duplicate key 108 | if($result == 1062){ 109 | //ajax data array 110 | $data = array( 111 | 'is_valid' => 0 112 | ); 113 | echo json_encode($data); 114 | }else{ 115 | //ajax data array 116 | $data = array( 117 | 'is_valid' => 1, 118 | 'content' => $content 119 | ); 120 | echo json_encode($data); 121 | } 122 | }//end ELSE form valid 123 | }//END SUBMIT 124 | } 125 | ?> -------------------------------------------------------------------------------- /controllers/users.php: -------------------------------------------------------------------------------- 1 | load->model('users_model'); 10 | } 11 | 12 | function index() 13 | { 14 | $this->get_users(); 15 | }//END INDEX 16 | 17 | function get_users() 18 | { 19 | $result = $this->users_model->get_users(); 20 | $data = array( 21 | 'main_content' => 'users', 22 | 'users' => $result 23 | ); 24 | $this->load->view("loader", $data); 25 | }//END GET_USERS 26 | 27 | function add() 28 | { 29 | $this->load->view("loader",array('main_content'=>"add_user")); 30 | }//END ADD 31 | 32 | function edit($id='') 33 | { 34 | if(! $id) 35 | { 36 | echo "User Id required"; 37 | return; 38 | } 39 | $result = $this->users_model->get_user($id); 40 | if( ! $result) 41 | { 42 | echo "Nothing to edit"; 43 | return; 44 | } 45 | $result['main_content'] = "add_user"; 46 | $this->load->view("loader",$result); 47 | }//END EDIT 48 | 49 | function delete($id='') 50 | { 51 | if(! $id) 52 | { 53 | echo "Id required"; 54 | return; 55 | } 56 | $this->users_model->delete($id); 57 | $this->get_users(); 58 | }//END DELETE 59 | 60 | function submit($id='') 61 | { 62 | $_POST['accountid'] = sess_var('accountid'); 63 | 64 | //validate form [perform validation server-side to make sure of fields] 65 | $this->load->library('form_validation'); 66 | $this->form_validation->set_rules('name', 'Name', 'trim|required|min_length[4]'); 67 | $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email'); 68 | if($id){ 69 | $this->form_validation->set_rules('pass', 'Password', 'min_length[6]|max_length[32]|matches[repass]'); 70 | }else{ 71 | $this->form_validation->set_rules('pass', 'Password', 'required|min_length[6]|max_length[32]|matches[repass]'); 72 | } 73 | $this->form_validation->set_rules('repass', 'Password Confirmation', ''); 74 | 75 | if ($this->form_validation->run() == FALSE){ 76 | //ajax data array 77 | $data = array( 78 | 'server_validation' => validation_errors() 79 | ); 80 | echo str_replace('\\/', '/', json_encode($data)); 81 | } 82 | else{ 83 | //prep form data 84 | //remove unwanted elements from the form POST (to be inserted properly) 85 | unset($_POST['repass']); 86 | //the following is intended when UPDATE 87 | if($_POST['pass']){ 88 | $_POST['pass'] = md5($_POST['pass']); 89 | }else{ 90 | unset($_POST['pass']); 91 | } 92 | 93 | if($id){ 94 | $result = $this->users_model->update($id); 95 | $content = "User has been UPDATED successfully"; 96 | } 97 | else{ 98 | $result = $this->users_model->add(); 99 | $content = "User has been CREATED successfully"; 100 | } 101 | //if duplicate key 102 | if($result == 1062){ 103 | //ajax data array 104 | $data = array( 105 | 'is_valid' => 0 106 | ); 107 | echo json_encode($data); 108 | }else{ 109 | //ajax data array 110 | $data = array( 111 | 'is_valid' => 1, 112 | 'content' => $content 113 | ); 114 | echo json_encode($data); 115 | } 116 | }//end ELSE form valid 117 | }//END SUBMIT 118 | } 119 | ?> -------------------------------------------------------------------------------- /views/cities.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 26 |
27 |
28 |
29 |
30 |
+ Add
31 | CITIES
32 |
33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 51 | "> 52 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
City Name AreasEditDelete
69 | 73 |
No Cities defined in this Country
74 | 77 |
78 |
79 | 82 | 83 | 84 | 87 | -------------------------------------------------------------------------------- /controllers/areas.php: -------------------------------------------------------------------------------- 1 | load->model('areas_model'); 10 | } 11 | 12 | function index() 13 | { 14 | 15 | }//END INDEX 16 | 17 | function get_areas($country_id='', $city_id='') 18 | { 19 | if( ! $country_id || ! $city_id) 20 | { 21 | echo "missing data, City Id required"; 22 | return; 23 | } 24 | $result = $this->areas_model->get_areas($city_id); 25 | $data = array( 26 | 'main_content' => 'areas', 27 | 'areas' => $result, 28 | 'country_id' => $country_id, 29 | 'city_id' => $city_id 30 | ); 31 | $this->load->view("loader", $data); 32 | }//END GET_AREAS 33 | 34 | function add($country_id='', $city_id='') 35 | { 36 | if( ! $country_id || ! $city_id) 37 | { 38 | echo "missing data, City Id required"; 39 | return; 40 | } 41 | $data = array( 42 | 'main_content' => 'add_area', 43 | 'country_id' => $country_id, 44 | 'city_id' => $city_id 45 | ); 46 | $this->load->view("loader",$data); 47 | }//END ADD 48 | 49 | function edit($country_id='', $city_id='', $id='') 50 | { 51 | if( ! $country_id || ! $city_id || ! $id) 52 | { 53 | echo "missing data, Area Id required"; 54 | return; 55 | } 56 | $result = $this->areas_model->get_area($id); 57 | if( ! $result) 58 | { 59 | echo "Nothing to edit"; 60 | return; 61 | } 62 | $result['main_content'] = "add_area"; 63 | $result['country_id'] = $country_id; 64 | $result['city_id'] = $city_id; 65 | $this->load->view("loader",$result); 66 | }//END EDIT 67 | 68 | function delete($country_id='', $city_id='', $id='') 69 | { 70 | if( ! $country_id || ! $city_id || ! $id) 71 | { 72 | echo "missing data, Area Id required"; 73 | return; 74 | } 75 | $this->areas_model->delete($id); 76 | $this->get_areas($country_id, $city_id); 77 | }//END DELETE 78 | 79 | function submit($city_id='', $id='') 80 | { 81 | //prep form data 82 | $_POST['accountid'] = sess_var('accountid'); 83 | if( ! $id) //if not edit (i.e. add) 84 | { 85 | $_POST['cityid'] = $city_id; 86 | } 87 | //validate form [perform validation server-side to make sure of fields] 88 | $this->load->library('form_validation'); 89 | $this->form_validation->set_rules('name', 'Name', 'trim|required'); 90 | 91 | if ($this->form_validation->run() == FALSE){ 92 | //ajax data array 93 | $data = array( 94 | 'server_validation' => validation_errors() 95 | ); 96 | echo json_encode($data); 97 | } 98 | else{ 99 | if($id){ 100 | $result = $this->areas_model->update($id); 101 | $content = "Area has been UPDATED successfully"; 102 | } 103 | else{ 104 | $result = $this->areas_model->add(); 105 | $content = "Area has been CREATED successfully"; 106 | } 107 | //if duplicate key 108 | if($result == 1062){ 109 | //ajax data array 110 | $data = array( 111 | 'is_valid' => 0 112 | ); 113 | echo json_encode($data); 114 | }else{ 115 | //ajax data array 116 | $data = array( 117 | 'is_valid' => 1, 118 | 'content' => $content 119 | ); 120 | echo json_encode($data); 121 | } 122 | }//end ELSE form valid 123 | }//END SUBMIT 124 | } 125 | ?> -------------------------------------------------------------------------------- /views/projects.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 26 |
27 |
28 |
29 |
+ Add
30 | PROJECTS
31 |
32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | "> 51 | 53 | 56 | 57 | 58 | 59 | 60 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
StatusProject Name UnitsEditDelete
52 | status?"src='images/active.png' title='Active'":"src='images/notactive.png' title='Not Active'"?> width="16" height="16" />
71 | 75 |
No Projects defined. Please add one.
76 | 79 |
80 |
81 | 84 | 85 | 86 | 89 | -------------------------------------------------------------------------------- /controllers/cities.php: -------------------------------------------------------------------------------- 1 | load->model('cities_model'); 10 | } 11 | 12 | function index() 13 | { 14 | 15 | }//END INDEX 16 | 17 | function get_cities($country_id='') 18 | { 19 | if( ! $country_id) 20 | { 21 | echo "Country Id required"; 22 | return; 23 | } 24 | $result = $this->cities_model->get_cities($country_id); 25 | $data = array( 26 | 'main_content' => 'cities', 27 | 'cities' => $result, 28 | 'country_id' => $country_id 29 | ); 30 | $this->load->view("loader", $data); 31 | }//END GET_CITIES 32 | 33 | function add($country_id='') 34 | { 35 | if( ! $country_id) 36 | { 37 | echo "Country Id required"; 38 | return; 39 | } 40 | $data = array( 41 | 'main_content' => 'add_city', 42 | 'country_id' => $country_id 43 | ); 44 | $this->load->view("loader",$data); 45 | }//END ADD 46 | 47 | function edit($country_id='', $id='') 48 | { 49 | if( ! $country_id || ! $id) 50 | { 51 | echo "missing data, City Id required"; 52 | return; 53 | } 54 | $result = $this->cities_model->get_city($id); 55 | if( ! $result) 56 | { 57 | echo "Nothing to edit"; 58 | return; 59 | } 60 | $result['main_content'] = "add_city"; 61 | $result['country_id'] = $country_id; 62 | $this->load->view("loader",$result); 63 | }//END EDIT 64 | 65 | function delete($country_id='', $id=''){ 66 | if( ! $country_id || ! $id) 67 | { 68 | echo "missing data, City Id required"; 69 | return; 70 | } 71 | $this->load->model('areas_model'); 72 | if($this->areas_model->get_areas($id)) 73 | { 74 | $msg = "Country NOT empty!

Please delete all Areas in this City before delete"; 75 | $this->load->view("warning",array('msg'=>$msg)); 76 | return; 77 | } 78 | 79 | $this->cities_model->delete($id); 80 | $this->get_cities($country_id); 81 | }//END DELETE 82 | 83 | function submit($country_id='', $id='') 84 | { 85 | //prep form data 86 | $_POST['accountid'] = sess_var('accountid'); 87 | if( ! $id) //if not edit (i.e. add) 88 | { 89 | $_POST['countryid'] = $country_id; 90 | } 91 | //validate form [perform validation server-side to make sure of fields] 92 | $this->load->library('form_validation'); 93 | $this->form_validation->set_rules('name', 'Name', 'trim|required'); 94 | 95 | if ($this->form_validation->run() == FALSE){ 96 | //ajax data array 97 | $data = array( 98 | 'server_validation' => validation_errors() 99 | ); 100 | echo json_encode($data); 101 | } 102 | else{ 103 | if($id){ 104 | $result = $this->cities_model->update($id); 105 | $content = "City has been UPDATED successfully"; 106 | } 107 | else{ 108 | $result = $this->cities_model->add(); 109 | $content = "City has been CREATED successfully"; 110 | } 111 | //if duplicate key 112 | if($result == 1062){ 113 | //ajax data array 114 | $data = array( 115 | 'is_valid' => 0 116 | ); 117 | echo json_encode($data); 118 | }else{ 119 | //ajax data array 120 | $data = array( 121 | 'is_valid' => 1, 122 | 'content' => $content 123 | ); 124 | echo json_encode($data); 125 | } 126 | }//end ELSE form valid 127 | }//END SUBMIT 128 | } 129 | ?> -------------------------------------------------------------------------------- /views/users.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 37 |
38 |
39 |
40 |
+ Add
41 | USERS
42 |
43 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 61 | "> 62 | 64 | 68 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
StatusName EmailEditDelete
63 | status?"src='images/active.png' title='Active'":"src='images/notactive.png' title='Not Active'"?> width="16" height="16" /> 65 | 69 |
70 | email?> 71 |
72 |
87 | 91 |
No Users defined.
92 | 95 |
96 |
97 | 100 | 101 | 102 | 105 | -------------------------------------------------------------------------------- /views/add_user.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 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 | 99 |
100 | 101 |
102 | 103 | 104 |    105 | 106 |
107 |
108 |
109 |
110 |
111 | 114 | 115 | 116 | 119 | -------------------------------------------------------------------------------- /views/add_images.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 77 | 78 |
79 |
80 |
81 |
82 |
83 | 84 | 85 |
86 | 87 |
88 | 89 | 90 |
91 | 92 |
93 | 94 | 95 |
96 | 97 |
98 | 99 | 100 |
(*.jpg, *.png, *.gif) [3MB]
101 |
102 | 103 |
104 | 105 | 106 |    107 | 108 |
109 |
110 |
111 |
112 | 113 | 116 | 117 | 118 | 121 | -------------------------------------------------------------------------------- /views/add_files.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 22 | 23 | 24 | 25 | 84 | 85 |
86 |
87 |
88 |
89 |
90 | 91 | 92 |
93 | 94 |
95 | 96 | 97 |
98 |
99 | 100 | 104 |
105 |
106 | 107 | 111 |
112 |
113 | 114 | 115 |
116 | 117 |
118 | 119 | 120 |
(any file) [16MB]
121 |
122 | 123 |
124 | 125 | 126 |    127 | 128 |
129 |
130 |
131 |
132 | 133 | 136 | 137 | 138 | 141 | -------------------------------------------------------------------------------- /views/add_videos.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 22 | 23 | 24 | 25 | 87 | 88 |
89 |
90 |
91 |
92 |
93 | 94 | 95 |
96 | 97 |
98 | 99 | 100 |
101 |
102 | 103 | 107 |
108 |
109 | 110 | 111 |
112 | 113 |
114 | 115 | 116 |
(*.flv, *.mp4, *.mov) [16MB]
117 |
118 | 119 |
120 | 121 | 122 |
(*.jpg, *.png, *.gif) [1MB]
123 |
124 |
125 | 126 | 127 |    128 | 129 |
130 |
131 |
132 |
133 | 134 | 137 | 138 | 139 | 142 | -------------------------------------------------------------------------------- /views/add_project.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 74 | 75 |
76 | 79 |
80 |
81 |
82 | 85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 | 93 | 94 |
95 | 96 |
97 | 98 | 99 |
100 | 101 |
102 | 103 | 107 |
108 | 109 |
110 | 111 | 112 |    113 | 114 |
115 |
116 |
117 |
118 |
119 | 120 | 121 | 122 |
123 | 126 | 127 | 128 | 131 | -------------------------------------------------------------------------------- /controllers/media.php: -------------------------------------------------------------------------------- 1 | load->model('media_model'); 12 | } 13 | 14 | function index() 15 | { 16 | }//END INDEX 17 | 18 | function get_media($media_type='', $entity_type='', $entity_id='') 19 | { 20 | if( ! $media_type || ! $entity_type || !$entity_id) 21 | { 22 | echo "missing data"; 23 | return; 24 | } 25 | $result = $this->media_model->get_media_list($media_type, $entity_type, $entity_id); 26 | $data = array( 27 | 'main_content' => $media_type, 28 | 'entity_type' => $entity_type, 29 | 'entity_id' => $entity_id, 30 | "$media_type" => $result 31 | ); 32 | $this->load->view("loader",$data); 33 | }//END GET_MEDIA 34 | 35 | function add($media_type='', $entity_type='', $entity_id='') 36 | { 37 | if( ! $media_type || ! $entity_type || !$entity_id) 38 | { 39 | echo "missing data"; 40 | return; 41 | } 42 | $data = array( 43 | 'main_content' => 'add_'.$media_type, 44 | 'entity_type' => $entity_type, 45 | 'entity_id' => $entity_id 46 | ); 47 | $this->load->view('loader',$data); 48 | }//END ADD 49 | 50 | function edit($media_type='', $entity_type=0, $entity_id=0, $id='') 51 | { 52 | if( ! $media_type || ! $id) 53 | { 54 | echo "missing data, Media Id required"; 55 | return; 56 | } 57 | $result = $this->media_model->get_media($media_type, $id); 58 | if( ! $result) 59 | { 60 | echo "nothing to edit"; 61 | return; 62 | } 63 | $result['main_content'] = 'add_'.$media_type; 64 | $result['entity_type'] = $entity_type; 65 | $result['entity_id'] = $entity_id; 66 | 67 | $this->load->view("loader",$result); 68 | }//END EDIT 69 | 70 | function delete($media_type='', $id='') 71 | { 72 | if( ! $media_type || ! $id) 73 | { 74 | echo "missing data, Media Id required"; 75 | return; 76 | } 77 | //get old file name 78 | $result = $this->media_model->get_name($media_type, $id); 79 | $file_path = 'resources/'.$media_type.'/'; 80 | 81 | if($this->media_model->delete($media_type, $id)) 82 | { 83 | if(is_file($file_path.$result['name']))unlink($file_path.$result['name']); 84 | if($media_type == "images") 85 | { 86 | if(is_file($file_path."thumbs/".$result['name']))unlink($file_path."thumbs/".$result['name']); 87 | if(is_file($file_path."med/".$result['name']))unlink($file_path."med/".$result['name']); 88 | } 89 | else 90 | if($media_type == "videos") 91 | { 92 | if(is_file($file_path."thumbs/".$result['thumb']))unlink($file_path."thumbs/".$result['thumb']); 93 | } 94 | //ajax data array 95 | $data = array( 96 | 'is_valid' => 1, 97 | 'content' => "file deleted successfully" 98 | ); 99 | echo json_encode($data); 100 | } 101 | else{ 102 | $data = array( 103 | 'is_valid' => 0 104 | ); 105 | echo json_encode($data); 106 | } 107 | }//END DELETE 108 | 109 | function upload_media($media_type, $entity_type='', $entity_id='', $id='') 110 | { 111 | //prep form data 112 | $_POST['accountid'] = sess_var('accountid'); 113 | if( ! $id) //if not edit (i.e. add) 114 | { 115 | $_POST['entitytype'] = $entity_type; 116 | $_POST['entityid'] = $entity_id; 117 | } 118 | 119 | //if not edit (i.e add) or there is upload file then upload else just insert 120 | if( !$id || $_FILES['userfile']['name']) 121 | { 122 | $config['upload_path'] = 'resources/'.$media_type.'/'; 123 | switch ($media_type) 124 | { 125 | case "files": 126 | $allowed_types = "*"; 127 | $max_size = "16384"; 128 | break; 129 | case "images": 130 | $allowed_types = "jpg|png|gif"; 131 | $max_size = "3072"; 132 | break; 133 | case "videos": 134 | $allowed_types = "flv|mp4|mov"; 135 | $max_size = "16384"; 136 | break; 137 | } 138 | $config['allowed_types']= $allowed_types; 139 | $config['max_size'] = $max_size; 140 | 141 | $this->load->library('upload', $config); 142 | 143 | //if error upload return error 144 | if ( ! $this->upload->do_upload()) 145 | { 146 | //ajax data array 147 | $data = array( 148 | 'is_valid' => 0, 149 | 'error' => $this->upload->display_errors() 150 | ); 151 | //echo str_replace('\\/', '/', json_encode($data)); 152 | echo json_encode($data); 153 | return; 154 | } 155 | else 156 | { 157 | $file_data = $this->upload->data(); 158 | $_POST['path'] = base_url().$config['upload_path']; 159 | $_POST['name'] = $file_data['file_name']; 160 | $_POST['size'] = $file_data['file_size']; 161 | 162 | //reize images 163 | $this->load->helper("resize_image"); 164 | if($media_type == "images") 165 | { 166 | resizeimage($file_data['full_path'], 136, 102, 80, "crop", $config['upload_path']."thumbs/".$_POST['name']); 167 | //so that not to enlarge the image in medium version 168 | if($file_data['image_width']> 800 || $file_data['image_height']> 600) 169 | resizeimage($file_data['full_path'], 800, 600, 80, "scale", $config['upload_path']."med/".$_POST['name']); 170 | else 171 | copy($file_data['full_path'], $config['upload_path']."med/".$_POST['name']); 172 | } 173 | else 174 | if($media_type == "videos" && $_FILES['userfile2']['name']) 175 | { 176 | $config2['upload_path'] = 'resources/videos/thumbs/'; 177 | $config2['allowed_types'] = 'jpg|png|gif'; 178 | $config2['max_size'] = '1024'; 179 | 180 | $this->upload->initialize($config2); 181 | //if error upload return error 182 | if ( ! $this->upload->do_upload('userfile2')) 183 | { 184 | //ajax data array 185 | $data = array( 186 | 'is_valid' => 0, 187 | 'error2' => $this->upload->display_errors() 188 | ); 189 | echo json_encode($data); 190 | //delete the video file if it was uploaded 191 | if(is_file($config['upload_path'].'/'.$_POST['name']))unlink($config['upload_path'].'/'.$_POST['name']); 192 | return; 193 | } 194 | else 195 | { 196 | $file_data = $this->upload->data(); 197 | $_POST['thumb'] = $file_data['file_name']; 198 | //resize thumbnail image 199 | resizeimage($file_data['full_path'], 90, 65, 80, "crop", $file_data['full_path']); 200 | } 201 | } 202 | 203 | //if edit (get old file name then delete after the insert) 204 | if($id) 205 | { 206 | $result = $this->media_model->get_name($media_type, $id); 207 | $file_name = $result['name']; 208 | $thumb = $result['thumb']; 209 | } 210 | } 211 | }//end if 212 | 213 | /*********** insert record into database ***********/ 214 | //if edit 215 | if($id){ 216 | $error = $this->media_model->update($media_type, $id); 217 | $content = $media_type." has been UPDATED successfully"; 218 | } 219 | else{ 220 | $error = $this->media_model->add($media_type); 221 | $content = $media_type." has been ADDED successfully"; 222 | } 223 | if( ! $error){ 224 | //if edit then delete old file 225 | if($id && $_FILES['userfile']['name']) 226 | { 227 | if(is_file($config['upload_path'].$file_name))unlink($config['upload_path'].$file_name); 228 | if($media_type == "images") 229 | { 230 | if(is_file($config['upload_path']."thumbs/".$file_name))unlink($config['upload_path']."thumbs/".$file_name); 231 | if(is_file($config['upload_path']."med/".$file_name))unlink($config['upload_path']."med/".$file_name); 232 | } 233 | if($media_type == "videos" && $_FILES['userfile2']['name']) 234 | { 235 | if(is_file($config['upload_path']."thumbs/".$thumb))unlink($config['upload_path']."thumbs/".$thumb); 236 | } 237 | } 238 | //ajax data array 239 | $data = array( 240 | 'is_valid' => 1, 241 | 'content' => $content 242 | ); 243 | echo json_encode($data); 244 | } 245 | }//END UPLOAD_IMAGE 246 | } 247 | ?> -------------------------------------------------------------------------------- /views/add_unit.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 80 | 81 |
82 | 85 |
86 |
87 |
88 | 91 |
92 |
93 |
94 | 95 |
96 |
97 |
98 |
99 |
100 | 101 | 102 |
103 |
104 | 105 | 109 |
110 |
111 | 112 | 118 |
119 |
120 | 121 | 122 |
123 |
124 | 125 | 131 |
132 |
133 | 134 | 139 |
140 |
141 | 142 | 147 |
148 |
149 | 150 | 151 |
152 |
153 | 154 | 155 |
156 |
157 | 158 | 159 |
160 |
161 | 162 | 163 |
164 |
165 | 166 | 167 |
168 |
169 | 170 | 172 |
173 |
174 | 175 | 176 |    177 | 178 |
179 |
180 |
181 |
182 |
183 | 184 | 185 | 186 |
187 | 190 | 191 | 192 | 195 | --------------------------------------------------------------------------------