<?= $this->extend("layout/base"); ?>

<?= $this->section("content"); ?>

<div class="card shadow mb-4">
            <div class="card-header py-3">
              <h6 class="m-0 font-weight-bold text-primary">Persoanl Information</h6>
            </div>
            <div class="row justify-content-center">

            <div class="col-xl-10 col-lg-12 col-md-9">
            <div class="card-body">
              <form class="user" action = "<?= base_url('staff/insert_personal_details') ?>" method = "post">
              <?php $page_session = \Config\Services::session(); ?>
                  <?php

                  if($page_session->getTempdata('personalError')):       
                  ?>
                  <div class = "alert alert-danger">
                       <?= $page_session->getTempdata('personalError'); ?>
                  </div>
                  <?php 
                  endif;
                  ?>

                <?php

                if($page_session->getTempdata('personalSuccess')):       
                    ?>
                <div class = "alert alert-success">
                  <?= $page_session->getTempdata('personalSuccess'); ?>
                </div>
                <?php 
                    endif;
                  ?>

              <div class="form-group">
              <label for="maritalstatus">Date of Birth:<font style="color:#F00">*</font></label>
                      <input type="date" name = "dob" value = "<?= $detail['dob']; ?>"  class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp" placeholder="" required>
                    </div>
                    <div class="form-group">
              <label for="maritalstatus">Gender:<font style="color:#F00">*</font></label>
              <select class="form-control" name = "gender">
              <?php $gender =  $detail['gender'];
													             $list = array('Male', 'Female');
													
                                            	              echo '<option  value="">Select Gender</option>';
												              forEach($list as $q){?>
													         <option value = '<?php echo $q; ?>' <?php if($q == $gender) echo 'selected'; ?> ><?php echo $q; ?></option>
												<?php } ?>
                        </select>
                    </div>
					<div class="form-group">
              <label for="maritalstatus">Marital Status:<font style="color:#F00">*</font></label>
              <select class="form-control" name = "marital_status">
              <?php $marital_status =  $detail['marital_status'];
													             $list = array('Single', 'Married','Divorced');
													
                                            	              echo '<option  value="">Select Marital Status</option>';
												              forEach($list as $q){?>
													         <option value = '<?php echo $q; ?>' <?php if($q == $marital_status) echo 'selected'; ?> ><?php echo $q; ?></option>
												<?php } ?>
                        </select>
                    </div>
					
                    <div class="form-group">
                    <label for="maritalstatus">Email Address:<font style="color:#F00">*</font></label>
                      <input type="text" name = "email" value = "<?= $detail['email']; ?>"  class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp" placeholder="" required>
                     </div>
                    <div class="form-group">
                    <label for="maritalstatus">Phone Number:<font style="color:#F00">*</font></label>
                      <input type="text" name = "phone_number" value = "<?= $detail['phone_number']; ?>"  class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp" placeholder="" required>
                     </div>
                     <div class="form-group">
              <label for="nationality">Nationality:<font style="color:#F00">*</font></label>
              <select class="form-control" name = "nationality">
              <?php $num =  $detail['nationality'];
													           $list =   array('Afghanistan', 'Åland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina',
                                     'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados',
                                     'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina',
                                     'Botswana', 'Bouvet Island', 'Brazil', 'British Indian Ocean Territory', 'Brunei Darussalam', 'Bulgaria',
                                     'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic',
                                     'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo, The Democratic Republic of The',
                                     'Cook Islands', 'Costa Rica', 'Cote D\'ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica',
                                     'Dominican Republic', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands (Malvinas)',
                                     'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', 'Gabon', 'Gambia',
                                     'Georgia', 'Germany', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey',
                                     'Guinea', 'Guinea-bissau', 'Guyana', 'Haiti', 'Heard Island and Mcdonald Islands', 'Holy See (Vatican City State)', 'Honduras',
                                     'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy',
                                     'Jamaica', 'Japan', 'Jersey', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati',  
                                     'Kuwait', 'Kyrgyzstan', 'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya',
                                     'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives',
                                     'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova',
                                     'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru',
                                     'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Nigeria', 'Niger', 'Niue',
                                     'Norfolk Island', 'North Korea', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestine', 'Panama',
                                     'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar',
                                     'Reunion', 'Romania', 'Russia', 'Rwanda', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Pierre and Miquelon',
                                     'Saint Vincent and The Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal',
                                     'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia',
                                     'South Africa', 'South Georgia and The South Sandwich Islands', 'South korea', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname',
                                     'Svalbard and Jan Mayen', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Taiwan',
                                     'Tajikistan', 'Tanzania', 'Thailand', 'Timor-leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago',
                                     'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates',
                                     'United Kingdom', 'United States', 'United States Minor Outlying Islands', 'Uruguay', 'Uzbekistan', 'Vanuatu',
                                     'Venezuela', 'Viet Nam', 'Virgin Islands, British', 'Virgin Islands, U.S.', 'Wallis and Futuna',
                                     'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe');
                                     
													
                                            	              echo '<option  value="">Select Nationality</option>';
												              forEach($list as $q){?>
													         <option value = '<?php echo $q; ?>' <?php if($q == $num) echo 'selected'; ?> ><?php echo $q; ?></option>
												<?php } ?>
                        </select>
                    </div>
                    <div class="form-group">
              <label for="nationality">State:<font style="color:#F00">*</font></label>
              <select class="form-control" name = "nationality">
              <?php $num =  $detail['nationality'];
													           $list =   array('Afghanistan', 'Åland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina',
                                     'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados',
                                     'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina',
                                     'Botswana', 'Bouvet Island', 'Brazil', 'British Indian Ocean Territory', 'Brunei Darussalam', 'Bulgaria',
                                     'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic',
                                     'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo, The Democratic Republic of The',
                                     'Cook Islands', 'Costa Rica', 'Cote D\'ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica',
                                     'Dominican Republic', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands (Malvinas)',
                                     'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', 'Gabon', 'Gambia',
                                     'Georgia', 'Germany', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey',
                                     'Guinea', 'Guinea-bissau', 'Guyana', 'Haiti', 'Heard Island and Mcdonald Islands', 'Holy See (Vatican City State)', 'Honduras',
                                     'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy',
                                     'Jamaica', 'Japan', 'Jersey', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati',  
                                     'Kuwait', 'Kyrgyzstan', 'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya',
                                     'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives',
                                     'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova',
                                     'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru',
                                     'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Nigeria', 'Niger', 'Niue',
                                     'Norfolk Island', 'North Korea', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestine', 'Panama',
                                     'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar',
                                     'Reunion', 'Romania', 'Russia', 'Rwanda', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Pierre and Miquelon',
                                     'Saint Vincent and The Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal',
                                     'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia',
                                     'South Africa', 'South Georgia and The South Sandwich Islands', 'South korea', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname',
                                     'Svalbard and Jan Mayen', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Taiwan',
                                     'Tajikistan', 'Tanzania', 'Thailand', 'Timor-leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago',
                                     'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates',
                                     'United Kingdom', 'United States', 'United States Minor Outlying Islands', 'Uruguay', 'Uzbekistan', 'Vanuatu',
                                     'Venezuela', 'Viet Nam', 'Virgin Islands, British', 'Virgin Islands, U.S.', 'Wallis and Futuna',
                                     'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe');
                                     
													
                                            	              echo '<option  value="">Select State</option>';
												              forEach($list as $q){?>
													         <option value = '<?php echo $q; ?>' <?php if($q == $num) echo 'selected'; ?> ><?php echo $q; ?></option>
												<?php } ?>
                        </select>
                    </div>
                    <div class="form-group">
              <label for="nationality">Local Government:<font style="color:#F00">*</font></label>
              <select class="form-control" name = "nationality">
              <?php $num =  $detail['nationality'];
													           $list =   array('Afghanistan', 'Åland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina',
                                     'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados',
                                     'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina',
                                     'Botswana', 'Bouvet Island', 'Brazil', 'British Indian Ocean Territory', 'Brunei Darussalam', 'Bulgaria',
                                     'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic',
                                     'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo, The Democratic Republic of The',
                                     'Cook Islands', 'Costa Rica', 'Cote D\'ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica',
                                     'Dominican Republic', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands (Malvinas)',
                                     'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', 'Gabon', 'Gambia',
                                     'Georgia', 'Germany', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey',
                                     'Guinea', 'Guinea-bissau', 'Guyana', 'Haiti', 'Heard Island and Mcdonald Islands', 'Holy See (Vatican City State)', 'Honduras',
                                     'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy',
                                     'Jamaica', 'Japan', 'Jersey', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati',  
                                     'Kuwait', 'Kyrgyzstan', 'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya',
                                     'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives',
                                     'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova',
                                     'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru',
                                     'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Nigeria', 'Niger', 'Niue',
                                     'Norfolk Island', 'North Korea', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestine', 'Panama',
                                     'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar',
                                     'Reunion', 'Romania', 'Russia', 'Rwanda', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Pierre and Miquelon',
                                     'Saint Vincent and The Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal',
                                     'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia',
                                     'South Africa', 'South Georgia and The South Sandwich Islands', 'South korea', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname',
                                     'Svalbard and Jan Mayen', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Taiwan',
                                     'Tajikistan', 'Tanzania', 'Thailand', 'Timor-leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago',
                                     'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates',
                                     'United Kingdom', 'United States', 'United States Minor Outlying Islands', 'Uruguay', 'Uzbekistan', 'Vanuatu',
                                     'Venezuela', 'Viet Nam', 'Virgin Islands, British', 'Virgin Islands, U.S.', 'Wallis and Futuna',
                                     'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe');
                                     
													
                                            	              echo '<option  value="">Select Local Government</option>';
												              forEach($list as $q){?>
													         <option value = '<?php echo $q; ?>' <?php if($q == $num) echo 'selected'; ?> ><?php echo $q; ?></option>
												<?php } ?>
                        </select>
                    </div>
                    <div class="form-group">
                    <label for="address">Address:<font style="color:#F00">*</font></label>
                      <input type="text" name = "address" value = "<?= $detail['phone_number']; ?>"  class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp" placeholder="" required>
                     </div>
                    <button class="btn btn-primary btn-user btn-block">
                      Save
                    </button>
              </form>
            </div>
          </div>

<?= $this->endSection() ?>