<?php
session_start();
$user = "educateb_bof-engla";
$pass = "bof-engla.com";
$dbname = "educateb_bof-engla";
$conn = mysqli_connect("localhost", $user, $pass, $dbname);
$sql = "SELECT * FROM site_details";
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {
        while($row = mysqli_fetch_assoc($result)) {
            $email = $row["email"];
            $sitename = $row["site_name"];
            $location = $row["location"];
            $phone = $row["phone"];
            $routing = $row["routing"];
            $swift = $row["swift"];
        }
}
$content = "";
if (!isset($_SESSION["adminuser"])){
    header("Location: login.php");
}
else{
    if($_GET["edit"]){
        $online_id = $_GET["edit"];
        
        
        $sql = "SELECT * FROM accounts WHERE online_id='$online_id'";
        $result = mysqli_query($conn, $sql);
        
        if (mysqli_num_rows($result) > 0) {
            while($row = mysqli_fetch_assoc($result)) {
                $online_id = $row["online_id"];
                $balance = $row["balance"];
                $reg_firstname = $row["reg_firstname"];
                $reg_middlename = $row["reg_middlename"];
                $reg_lastname = $row["reg_lastname"];
                $reg_acc_type = $row["reg_acc_type"];
                $account_no = $row["account_no"];
                $reg_phone1 = $row["reg_phone1"];
                $passport = $row["passport"];
                $reg_nos_firstname = $row["reg_nos_firstname"];
                $reg_nos_middlename = $row["reg_nos_middlename"];
                $reg_nos_lastname = $row["reg_nos_lastname"];
                $reg_suffix = $row["reg_suffix"];
                $reg_dob = $row["reg_dob"];
                $reg_src_income = $row["reg_src_income"];
                $reg_address1 = $row["reg_address1"];
                $reg_city = $row["reg_city"];
                $reg_state = $row["reg_state"];
                $reg_zip = $row["reg_zip"];
                $reg_country = $row["reg_country"];
                $reg_email = $row["reg_email"];
                $reg_nos_address = $row["reg_nos_address"];
                $reg_nos_rel = $row["reg_nos_rel"];
                $reg_nos_phone = $row["reg_nos_phone"];
                $cpasscode = $row['passcode'];
            }
        }
        
    	if(isset($update_error)){
    	    $ustat = $update_error." !";
	    
    	}
    	else{
    	    $ustat = "";
    	}
    	
    	if(isset($success)){
    	    $sstat = $success." !";
    	    
    	}
    	else{
    	    $sstat = "";
    	}
        $mcontent = "<div class=\"w3-container w3-responsive w3-stretch w3-text-theme\" style=\"margin-top:30px\">
            <div class=\"w3-panel w3-pale-red\">".$ustat
              ."
            </div>
            <div class=\"w3-panel w3-pale-blue\">".$sstat."
            </div>
            <form action=\"".htmlspecialchars($_SERVER["PHP_SELF"])."\" method=\"post\">

                <div class=\"w3-theme-d5 w3-large w3-padding bhead\" style=\"\">Edit Profile</div>
            <table class=\"w3-table-all\" style=\"\" >
                <input type='hidden' name='online_id' value='$online_id'>
                    
                    <tr>
                        <td>First Name</td>
                        <td><input class=\"profile_edit\" id=\"firstname\" type=\"text\" value=\"$reg_firstname\" name=\"reg_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"middlename\" type=\"text\" value=\"$reg_middlename\" name=\"reg_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Last Name</td>
                        <td><input class=\"profile_edit\" id=\"lastname\" type=\"text\" value=\"$reg_lastname\" name=\"reg_lastname\"></td>
                    </tr>
                    <tr>
                        <td>Passcode</td>
                        <td><input class=\"profile_edit\" id=\"passcode\" type=\"text\" value=\"$cpasscode\" name=\"passcode\"></td>
                    </tr>

                    <tr>
                        <td>Suffix</td>
                        <td><input class=\"profile_edit\" id=\"reg_suffix\" type=\"text\" value=\"$reg_suffix\" name=\"reg_suffix\"></td>
                    </tr>

            
                    <tr>
                        <td>Date of Birth</td>
                        <td><input class=\"profile_edit\" id=\"reg_dob\" type=\"text\" value=\"$reg_dob\" name=\"reg_dob\"></td>
                    </tr>

                    <tr>
                        <td>Source of Income</td>
                        <td><input class=\"profile_edit\" id=\"reg_src_income\" type=\"text\" value=\"$reg_src_income\" name=\"reg_src_income\"></td>
                    </tr>

                    <tr>
                        <td>Address</td>
                        <td><input class=\"profile_edit\" id=\"reg_address1\" type=\"text\" value=\"$reg_address1\" name=\"reg_address1\"></td>
                    </tr>

                    <tr>
                        <td>City</td>
                        <td><input class=\"profile_edit\" id=\"reg_city\" type=\"text\" value=\"$reg_city\" name=\"reg_city\"></td>
                    </tr>

                    <tr>
                        <td>State</td>
                        <td><input class=\"profile_edit\" id=\"reg_state\" type=\"text\" value=\"$reg_state\" name=\"reg_state\"></td>
                    </tr>

                    <tr>
                        <td>ZIP</td>
                        <td><input class=\"profile_edit\" id=\"reg_zip\" type=\"text\" value=\"$reg_zip\" name=\"reg_zip\"></td>
                    </tr>

                    <tr>
                        <td>Country</td>
                        <td><input class=\"profile_edit\" id=\"reg_country\" type=\"text\" value=\"$reg_country\" name=\"reg_country\"></td>
                    </tr>


                    <tr>
                        <td>Email</td>
                        <td><input class=\"profile_edit\" id=\"email\" type=\"text\" value=\"$reg_email\" name=\"reg_email\"></td>
                    </tr>

                    <tr>
                        <td>Phone Number</td>
                        <td><input class=\"profile_edit\" id=\"phone1\" type=\"text\" value=\"$reg_phone1\" name=\"reg_phone1\"></td>
                    </tr>                       

                    <tr>
                        <td>Next of Kin First Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_firstname\" type=\"text\" value=\"$reg_nos_firstname\" name=\"reg_nos_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_middlename\" type=\"text\" value=\"$reg_nos_middlename\" name=\"reg_nos_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Last Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_lastname\" type=\"text\" value=\"$reg_nos_lastname\" name=\"reg_nos_lastname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Address</td>
                        <td><input class=\"profile_edit\" id=\"nos_address\" type=\"text\" value=\"$reg_nos_address\" name=\"reg_nos_address\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Relationship</td>
                        <td><input class=\"profile_edit\" id=\"nos_rel\" type=\"text\" value=\"$reg_nos_rel\" name=\"reg_nos_rel\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Phone</td>
                        <td><input class=\"profile_edit\" id=\"nos_phone\" type=\"text\" value=\"$reg_nos_phone\" name=\"reg_nos_phone\"></td>
                    </tr>


                    <tr>
                        <th colspan=\"2\">
                            <input type=\"submit\" value=\"Update Profile\" class=\"w3-button w3-blue w3-padding\" name=\"edit1\">
                            <div id=\"update_profile_feedbk\" style=\"color:#189c1f; font-weight:normal;\"></div>
                            <!-- <div id=\"update_profile\" class=\"update_submit\">Update Profile</div>  -->
                        </th>
                    </tr>
                    <!-- <input type=\"submit\" value=\"Update Profile\" class=\"update_submit\"> -->

                </table>
            </form>
        </div>";
    $mcontent1 = "<div class=\"w3-container w3-responsive w3-text-theme\" style=\"margin-top:30px;\">
            <div class=\"w3-container w3-text-red\">".$ustat
              ."
            </div>
            <div class=\"w3-container w3-text-theme\">".$sstat."
            </div>
            

                <div class=\"w3-theme-d5 w3-large w3-padding bhead\" style=\"\">Edit Profile</div>
            <table class=\"w3-table-all\" style=\"\" >

                    <form action=\"".htmlspecialchars($_SERVER[PHP_SELF])."\" method=\"post\">
                    <input type='hidden' name='online_id' value='$online_id'>
                    <tr>
                        <td>First Name</td>
                        <td><input class=\"profile_edit\" id=\"firstname\" type=\"text\" value=\"$reg_firstname\" name=\"reg_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"middlename\" type=\"text\" value=\"$reg_middlename\" name=\"reg_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Last Name</td>
                        <td><input class=\"profile_edit\" id=\"lastname\" type=\"text\" value=\"$reg_lastname\" name=\"reg_lastname\"></td>
                    </tr>
                    <tr>
                        <td>Passcode</td>
                        <td><input class=\"profile_edit\" id=\"passcode\" type=\"text\" value=\"$cpasscode\" name=\"passcode\"></td>
                    </tr>

                    <tr>
                        <td>Suffix</td>
                        <td><input class=\"profile_edit\" id=\"reg_suffix\" type=\"text\" value=\"$reg_suffix\" name=\"reg_suffix\"></td>
                    </tr>

            
                    <tr>
                        <td>Date of Birth</td>
                        <td><input class=\"profile_edit\" id=\"reg_dob\" type=\"text\" value=\"$reg_dob\" name=\"reg_dob\"></td>
                    </tr>

                    <tr>
                        <td>Source of Income</td>
                        <td><input class=\"profile_edit\" id=\"reg_src_income\" type=\"text\" value=\"$reg_src_income\" name=\"reg_src_income\"></td>
                    </tr>

                    <tr>
                        <td>Address</td>
                        <td><input class=\"profile_edit\" id=\"reg_address1\" type=\"text\" value=\"$reg_address1\" name=\"reg_address1\"></td>
                    </tr>

                    <tr>
                        <td>City</td>
                        <td><input class=\"profile_edit\" id=\"reg_city\" type=\"text\" value=\"$reg_city\" name=\"reg_city\"></td>
                    </tr>

                    <tr>
                        <td>State</td>
                        <td><input class=\"profile_edit\" id=\"reg_state\" type=\"text\" value=\"$reg_state\" name=\"reg_state\"></td>
                    </tr>

                    <tr>
                        <td>ZIP</td>
                        <td><input class=\"profile_edit\" id=\"reg_zip\" type=\"text\" value=\"$reg_zip\" name=\"reg_zip\"></td>
                    </tr>

                    <tr>
                        <td>Country</td>
                        <td><input class=\"profile_edit\" id=\"reg_country\" type=\"text\" value=\"$reg_country\" name=\"reg_country\"></td>
                    </tr>


                    <tr>
                        <td>Email</td>
                        <td><input class=\"profile_edit\" id=\"email\" type=\"text\" value=\"$reg_email\" name=\"reg_email\"></td>
                    </tr>

                    <tr>
                        <td>Phone Number</td>
                        <td><input class=\"profile_edit\" id=\"phone1\" type=\"text\" value=\"$reg_phone1\" name=\"reg_phone1\"></td>
                    </tr>                       

                    <tr>
                        <td>Next of Kin First Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_firstname\" type=\"text\" value=\"$reg_nos_firstname\" name=\"reg_nos_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_middlename\" type=\"text\" value=\"$reg_nos_middlename\" name=\"reg_nos_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Last Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_lastname\" type=\"text\" value=\"$reg_nos_lastname\" name=\"reg_nos_lastname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Address</td>
                        <td><input class=\"profile_edit\" id=\"nos_address\" type=\"text\" value=\"$reg_nos_address\" name=\"reg_nos_address\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Relationship</td>
                        <td><input class=\"profile_edit\" id=\"nos_rel\" type=\"text\" value=\"$reg_nos_rel\" name=\"reg_nos_rel\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Phone</td>
                        <td><input class=\"profile_edit\" id=\"nos_phone\" type=\"text\" value=\"$reg_nos_phone\" name=\"reg_nos_phone\"></td>
                    </tr>


                    <tr>
                        <th colspan=\"2\">
                            <input type=\"submit\" value=\"Update Profile\" class=\"w3-button w3-blue w3-padding\" name=\"edit1\">
                            <div id=\"update_profile_feedbk\" style=\"color:#189c1f; font-weight:normal;\"></div>
                            <!-- <div id=\"update_profile\" class=\"update_submit\">Update Profile</div>  -->
                        </th>
                    </tr>
                    <!-- <input type=\"submit\" value=\"Update Profile\" class=\"update_submit\"> -->
                </form>
                </table>
            
        </div>";
        
    }
    elseif(isset($_POST["edit1"])){
	    $reg_firstname = $_POST["reg_firstname"];
        $reg_middlename = $_POST["reg_middlename"];
        $reg_lastname = $_POST["reg_lastname"];
        $reg_phone1 = $_POST["reg_phone1"];
        $reg_nos_firstname = $_POST["reg_nos_firstname"];
        $reg_nos_middlename = $_POST["reg_nos_middlename"];
        $reg_nos_lastname = $_POST["reg_nos_lastname"];
        $reg_suffix = $_POST["reg_suffix"];
        $reg_dob = $_POST["reg_dob"];
        $reg_src_income = $_POST["reg_src_income"];
        $reg_address1 = $_POST["reg_address1"];
        $reg_city = $_POST["reg_city"];
        $reg_state = $_POST["reg_state"];
        $reg_zip = $_POST["reg_zip"];
        $reg_country = $_POST["reg_country"];
        $reg_email = $_POST["reg_email"];
        $reg_nos_address = $_POST["reg_nos_address"];
        $reg_nos_rel = $_POST["reg_nos_rel"];
        $reg_nos_phone = $_POST["reg_nos_phone"];
        $reg_nos_firstname = $_POST["reg_nos_firstname"];
        $cpasscode = $_POST['passcode'];
        $online_id = $_POST['online_id'];

        $sql = "UPDATE accounts SET reg_firstname='$reg_firstname', reg_middlename='$reg_middlename', reg_lastname='$reg_lastname', passcode='$cpasscode', reg_phone1='$reg_phone1', reg_nos_firstname='$reg_nos_firstname', reg_nos_middlename='$reg_nos_middlename', reg_nos_lastname='$reg_nos_lastname', reg_suffix='$reg_suffix', reg_dob='$reg_dob', reg_src_income='$reg_src_income', reg_address1='$reg_address1', reg_city='$reg_city', reg_state='$reg_state', reg_zip='$reg_zip', reg_country='$reg_country', reg_email='$reg_email', reg_nos_address='$reg_nos_address', reg_nos_rel='$reg_nos_rel', reg_nos_phone='$reg_nos_phone' WHERE online_id='$online_id'";

        if (mysqli_query($conn,$sql)){
	        $success = "Profile Updated sucessfully";

	    }
	    else{
		    $update_error = "Error updating profile";

		}
		if(isset($update_error)){
    	    $ustat = $update_error." !";
	    
    	}
    	else{
    	    $ustat = "";
    	}
    	
    	if(isset($success)){
    	    $sstat = $success." !";
    	    
    	}
    	else{
    	    $sstat = "";
    	}
        $mcontent = "<div class=\"w3-container w3-responsive w3-stretch w3-text-theme\" style=\"margin-top:30px\">
            <div class=\"w3-panel w3-pale-red\">".$ustat
              ."
            </div>
            <div class=\"w3-panel w3-pale-blue\">".$sstat."
            </div>
            <form action=\"".htmlspecialchars($_SERVER["PHP_SELF"])."\" method=\"post\">

                <div class=\"w3-theme-d5 w3-large w3-padding bhead\" style=\"\">Edit Profile</div>
            <table class=\"w3-table-all\" style=\"\" >
                    <input type='hidden' name='online_id' value='$online_id'>
                    
                    <tr>
                        <td>First Name</td>
                        <td><input class=\"profile_edit\" id=\"firstname\" type=\"text\" value=\"$reg_firstname\" name=\"reg_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"middlename\" type=\"text\" value=\"$reg_middlename\" name=\"reg_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Last Name</td>
                        <td><input class=\"profile_edit\" id=\"lastname\" type=\"text\" value=\"$reg_lastname\" name=\"reg_lastname\"></td>
                    </tr>
                    <tr>
                        <td>Passcode</td>
                        <td><input class=\"profile_edit\" id=\"passcode\" type=\"text\" value=\"$cpasscode\" name=\"passcode\"></td>
                    </tr>

                    <tr>
                        <td>Suffix</td>
                        <td><input class=\"profile_edit\" id=\"reg_suffix\" type=\"text\" value=\"$reg_suffix\" name=\"reg_suffix\"></td>
                    </tr>

            
                    <tr>
                        <td>Date of Birth</td>
                        <td><input class=\"profile_edit\" id=\"reg_dob\" type=\"text\" value=\"$reg_dob\" name=\"reg_dob\"></td>
                    </tr>

                    <tr>
                        <td>Source of Income</td>
                        <td><input class=\"profile_edit\" id=\"reg_src_income\" type=\"text\" value=\"$reg_src_income\" name=\"reg_src_income\"></td>
                    </tr>

                    <tr>
                        <td>Address</td>
                        <td><input class=\"profile_edit\" id=\"reg_address1\" type=\"text\" value=\"$reg_address1\" name=\"reg_address1\"></td>
                    </tr>

                    <tr>
                        <td>City</td>
                        <td><input class=\"profile_edit\" id=\"reg_city\" type=\"text\" value=\"$reg_city\" name=\"reg_city\"></td>
                    </tr>

                    <tr>
                        <td>State</td>
                        <td><input class=\"profile_edit\" id=\"reg_state\" type=\"text\" value=\"$reg_state\" name=\"reg_state\"></td>
                    </tr>

                    <tr>
                        <td>ZIP</td>
                        <td><input class=\"profile_edit\" id=\"reg_zip\" type=\"text\" value=\"$reg_zip\" name=\"reg_zip\"></td>
                    </tr>

                    <tr>
                        <td>Country</td>
                        <td><input class=\"profile_edit\" id=\"reg_country\" type=\"text\" value=\"$reg_country\" name=\"reg_country\"></td>
                    </tr>


                    <tr>
                        <td>Email</td>
                        <td><input class=\"profile_edit\" id=\"email\" type=\"text\" value=\"$reg_email\" name=\"reg_email\"></td>
                    </tr>

                    <tr>
                        <td>Phone Number</td>
                        <td><input class=\"profile_edit\" id=\"phone1\" type=\"text\" value=\"$reg_phone1\" name=\"reg_phone1\"></td>
                    </tr>                       

                    <tr>
                        <td>Next of Kin First Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_firstname\" type=\"text\" value=\"$reg_nos_firstname\" name=\"reg_nos_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_middlename\" type=\"text\" value=\"$reg_nos_middlename\" name=\"reg_nos_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Last Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_lastname\" type=\"text\" value=\"$reg_nos_lastname\" name=\"reg_nos_lastname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Address</td>
                        <td><input class=\"profile_edit\" id=\"nos_address\" type=\"text\" value=\"$reg_nos_address\" name=\"reg_nos_address\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Relationship</td>
                        <td><input class=\"profile_edit\" id=\"nos_rel\" type=\"text\" value=\"$reg_nos_rel\" name=\"reg_nos_rel\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Phone</td>
                        <td><input class=\"profile_edit\" id=\"nos_phone\" type=\"text\" value=\"$reg_nos_phone\" name=\"reg_nos_phone\"></td>
                    </tr>


                    <tr>
                        <th colspan=\"2\">
                            <input type=\"submit\" value=\"Update Profile\" class=\"w3-button w3-blue w3-padding\" name=\"edit1\">
                            <div id=\"update_profile_feedbk\" style=\"color:#189c1f; font-weight:normal;\"></div>
                            <!-- <div id=\"update_profile\" class=\"update_submit\">Update Profile</div>  -->
                        </th>
                    </tr>
                    <!-- <input type=\"submit\" value=\"Update Profile\" class=\"update_submit\"> -->

                </table>
            </form>
        </div>";
    $mcontent1 = "<div class=\"w3-container w3-responsive w3-text-theme\" style=\"margin-top:30px;\">
            <div class=\"w3-container w3-text-red\">".$ustat
              ."
            </div>
            <div class=\"w3-container w3-text-theme\">".$sstat."
            </div>
            

                <div class=\"w3-theme-d5 w3-large w3-padding bhead\" style=\"\">Edit Profile</div>
            <table class=\"w3-table-all\" style=\"\" >

                    <form action=\"".htmlspecialchars($_SERVER[PHP_SELF])."\" method=\"post\">
                    <input type='hidden' name='online_id' value='$online_id'>
                    <tr>
                        <td>First Name</td>
                        <td><input class=\"profile_edit\" id=\"firstname\" type=\"text\" value=\"$reg_firstname\" name=\"reg_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"middlename\" type=\"text\" value=\"$reg_middlename\" name=\"reg_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Last Name</td>
                        <td><input class=\"profile_edit\" id=\"lastname\" type=\"text\" value=\"$reg_lastname\" name=\"reg_lastname\"></td>
                    </tr>
                    <tr>
                        <td>Passcode</td>
                        <td><input class=\"profile_edit\" id=\"passcode\" type=\"text\" value=\"$cpasscode\" name=\"passcode\"></td>
                    </tr>

                    <tr>
                        <td>Suffix</td>
                        <td><input class=\"profile_edit\" id=\"reg_suffix\" type=\"text\" value=\"$reg_suffix\" name=\"reg_suffix\"></td>
                    </tr>

            
                    <tr>
                        <td>Date of Birth</td>
                        <td><input class=\"profile_edit\" id=\"reg_dob\" type=\"text\" value=\"$reg_dob\" name=\"reg_dob\"></td>
                    </tr>

                    <tr>
                        <td>Source of Income</td>
                        <td><input class=\"profile_edit\" id=\"reg_src_income\" type=\"text\" value=\"$reg_src_income\" name=\"reg_src_income\"></td>
                    </tr>

                    <tr>
                        <td>Address</td>
                        <td><input class=\"profile_edit\" id=\"reg_address1\" type=\"text\" value=\"$reg_address1\" name=\"reg_address1\"></td>
                    </tr>

                    <tr>
                        <td>City</td>
                        <td><input class=\"profile_edit\" id=\"reg_city\" type=\"text\" value=\"$reg_city\" name=\"reg_city\"></td>
                    </tr>

                    <tr>
                        <td>State</td>
                        <td><input class=\"profile_edit\" id=\"reg_state\" type=\"text\" value=\"$reg_state\" name=\"reg_state\"></td>
                    </tr>

                    <tr>
                        <td>ZIP</td>
                        <td><input class=\"profile_edit\" id=\"reg_zip\" type=\"text\" value=\"$reg_zip\" name=\"reg_zip\"></td>
                    </tr>

                    <tr>
                        <td>Country</td>
                        <td><input class=\"profile_edit\" id=\"reg_country\" type=\"text\" value=\"$reg_country\" name=\"reg_country\"></td>
                    </tr>


                    <tr>
                        <td>Email</td>
                        <td><input class=\"profile_edit\" id=\"email\" type=\"text\" value=\"$reg_email\" name=\"reg_email\"></td>
                    </tr>

                    <tr>
                        <td>Phone Number</td>
                        <td><input class=\"profile_edit\" id=\"phone1\" type=\"text\" value=\"$reg_phone1\" name=\"reg_phone1\"></td>
                    </tr>                       

                    <tr>
                        <td>Next of Kin First Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_firstname\" type=\"text\" value=\"$reg_nos_firstname\" name=\"reg_nos_firstname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Middle Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_middlename\" type=\"text\" value=\"$reg_nos_middlename\" name=\"reg_nos_middlename\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Last Name</td>
                        <td><input class=\"profile_edit\" id=\"nos_lastname\" type=\"text\" value=\"$reg_nos_lastname\" name=\"reg_nos_lastname\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Address</td>
                        <td><input class=\"profile_edit\" id=\"nos_address\" type=\"text\" value=\"$reg_nos_address\" name=\"reg_nos_address\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Relationship</td>
                        <td><input class=\"profile_edit\" id=\"nos_rel\" type=\"text\" value=\"$reg_nos_rel\" name=\"reg_nos_rel\"></td>
                    </tr>

                    <tr>
                        <td>Next of Kin Phone</td>
                        <td><input class=\"profile_edit\" id=\"nos_phone\" type=\"text\" value=\"$reg_nos_phone\" name=\"reg_nos_phone\"></td>
                    </tr>


                    <tr>
                        <th colspan=\"2\">
                            <input type=\"submit\" value=\"Update Profile\" class=\"w3-button w3-blue w3-padding\" name=\"edit1\">
                            <div id=\"update_profile_feedbk\" style=\"color:#189c1f; font-weight:normal;\"></div>
                            <!-- <div id=\"update_profile\" class=\"update_submit\">Update Profile</div>  -->
                        </th>
                    </tr>
                    <!-- <input type=\"submit\" value=\"Update Profile\" class=\"update_submit\"> -->
                </form>
                </table>
            
        </div>";
	}
    else{
        header("Location: admin-dash.php");
    }
}
?>

<!DOCTYPE html>
<html>
<head>
<title><?php echo $sitename; ?> | Admin Panel</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<style>
body,h1,h2,h3,h4,h5,h6 {font-family: "Lato", sans-serif}
.w3-bar,h1,button {font-family: "Montserrat", sans-serif}
.w3-theme-l5 {color:#000 !important; background-color:#efefff !important}
.w3-theme-l4 {color:#000 !important; background-color:#cacaff !important}
.w3-theme-l3 {color:#fff !important; background-color:#9595ff !important}
.w3-theme-l2 {color:#fff !important; background-color:#6060ff !important}
.w3-theme-l1 {color:#fff !important; background-color:#2b2bff !important}
.w3-theme-d1 {color:#fff !important; background-color:#0000dc !important}
.w3-theme-d2 {color:#fff !important; background-color:#0000c4 !important}
.w3-theme-d3 {color:#fff !important; background-color:#0000ab !important}
.w3-theme-d4 {color:#fff !important; background-color:#000093 !important}
.w3-theme-d5 {color:#fff !important; background-color:#00007a !important}

.w3-theme-light {color:#000 !important; background-color:#efefff !important}
.w3-theme-dark {color:#fff !important; background-color:#00007a !important}
.w3-theme-action {color:#fff !important; background-color:#00007a !important}

.w3-theme {color:#fff !important; background-color:#0000f4 !important}
.w3-text-theme {color:#0000f4 !important}
.w3-border-theme {border-color:#0000f4 !important}

.w3-hover-theme:hover {color:#fff !important; background-color:#0000f4 !important}
.w3-hover-text-theme:hover {color:#0000f4 !important}
.w3-hover-border-theme:hover {border-color:#0000f4 !important}
.bhead{font-weight:bold;border-top-right-radius: 5px; border-top-left-radius: 5px;background-image: linear-gradient(#f12a2a, #4b0505)}
.button1{background-image: linear-gradient(#f12a2a, #4b0505);color:lightgray;}
.button2{background-image: linear-gradient(#f12a2a, #3e0404);color:lightgray;}
</style>
</head>
<body>
    <div class="w3-container w3-theme-d2">
        <div class="w3-bar w3-theme-d2">
            <a class="w3-bar-item w3-xlarge w3-hide-small" href="/"><img src="/images/logo.png" style="height:50px;"></a>
            <a class="w3-bar-item w3-button w3-hover-none w3-margin-left w3-hide-small w3-text-white w3-small" style="margin-top:20px" href="#"><i class='fa fa-map-marker-alt w3-large'></i> &nbsp; <?php echo $location;?></a>
            <a class="w3-bar-item w3-button w3-hover-none w3-margin-left w3-hide-small w3-text-white w3-small" style="margin-top:20px" href="mailto:<?php echo $email;?>"><i class='fa fa-envelope-open w3-large'></i> &nbsp; <?php echo $email;?></a>
            <a class="w3-bar-item w3-button w3-hover-none w3-margin-left w3-hide-small w3-text-white w3-small" style="margin-top:20px" href="whatsapp://send/?phone=<?php echo $phone;?>"><i class='fa fa-phone w3-large'></i>&nbsp;<?php echo $phone;?></a>
        </div>
        <div class="w3-container w3-center w3-theme-d2 w3-hide-medium w3-hide-large">
            <h3 class="w3-left" ><a href="/"><img src="/images/logo.png" style="height:50px;"></a></h3>
            <p class="w3-right w3-margin-top">Admin Panel</p>
        </div>
        <div class="w3-cotainer w3-center w3-theme-d2 w3-hide-medium w3-hide-large">
            <a class="w3-button w3-hover-none w3-margin-left w3-text-yellow w3-small" href="#"><i class='fa fa-map-marker-alt w3-large'></i></a>
            <a class="w3-button w3-hover-none w3-margin-left w3-text-yellow w3-small" href="#"><i class='fa fa-envelope-open w3-large'></i></a>
            <a class="w3-button w3-hover-none w3-margin-left w3-text-yellow w3-small" href="#"><i class='fa fa-phone w3-large'></i></a>
        </div>
    </div>
    
    <div class="w3-container  w3-theme-l1 w3-card-4">    
        <div class="w3-bar w3-theme-l1 w3-left-align w3-large">
            <a class="w3-bar-item w3-button w3-hide-medium w3-hide-large w3-left w3-padding-large w3-hover-white w3-large" href="javascript:void(0);" onclick="myFunction()" title="Toggle Navigation Menu"><i class="fa fa-bars"></i>Menu</a>
            <a href="/index.php" class="w3-bar-item w3-button w3-padding-large w3-hide-small">Home</a>
            <a href="/business.php" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-none">Business</a>
            <div class="w3-dropdown-hover">
                <a class="w3-button w3-hide-small w3-padding-large w3-hover-none">Services <i class='fa fa-caret-down'></i></a>
                <div class="w3-dropdown-content w3-bar-block w3-border">
                  <a href="/loans.php" class="w3-bar-item w3-button">Loans</a>
                  <a href="/career.php" class="w3-bar-item w3-button">Career</a>
                  <a href="/investments.php" class="w3-bar-item w3-button">Investments</a>
                  <a href="/community.php" class="w3-bar-item w3-button">Community</a>
                  <a href="/personal.php" class="w3-bar-item w3-button">Personal</a>
                </div>
            </div>
            <a href="/investments.php" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-none">Investments</a>
            <a href="/loans.php" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-none">Loan</a>
            <a href="/signup.php" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-none">Register</a>
            <a href="/contact.php" class="w3-bar-item w3-button w3-hide-small w3-padding-large w3-hover-none">Contact</a>
            <form action='sign_out.php' method='post'><button type="submit" class="w3-bar-item w3-button w3-padding-large w3-hover-none w3-right">Logout <i class='fa fa-sign-out-alt w3-text-red'></i></button></form>
        </div>
        <!-- Navbar on small screens -->
        <div id="navDemo" class="w3-bar-block w3-white w3-hide w3-hide-large w3-hide-medium w3-large">
            
                <a href="admin-dash.php" class="w3-bar-item w3-button">Active Accounts</a>
                
                  <a href="pending.php" class="w3-bar-item w3-button">Pending Aprovals</a>
                  <a href="password-change.php" class="w3-bar-item w3-button">Change Password</a>
                  <a href="suspended.php" class="w3-bar-item w3-button">supended</a>
                  <a class="w3-bar-item w3-button" href="addtransfer.php">Add Transaction</a>
                  
                  <a class="w3-bar-item w3-button" href="sendemail.php">Send Mail</a>
                  
            
            
            
        </div>
    </div>
    
<div class="w3-cell-row w3-hide-small">
    <div class="w3-cell w3-hide-small w3-theme-d4 " style="width:25%">
        <div class="w3-bar-block">
        
            <a class="w3-bar-item w3-button w3-large w3-margin-bottom" href="admin-dash.php">Active Accounts</a>
        
            <a class="w3-bar-item w3-button w3-large w3-margin-bottom" href="pending.php">Pending Aprovals</a>
        
            <a class="w3-bar-item w3-button w3-large w3-margin-bottom" href="password-change.php">Change Password</a>
            <a class="w3-bar-item w3-button w3-large w3-margin-bottom" href="suspended.php">Suspended</a>
            <a class="w3-bar-item w3-button" href="addtransfer.php">Add Transaction</a>
            
            <a class="w3-bar-item w3-button" href="sendemail.php">Send Mail</a>
        
            
        </div>
        
        
    </div>
    
    <div class="w3-cell w3-theme-l5">
        
        
        <div class="w3-container w3-responsive w3-text-theme" style="margin-bottom:200px;">
            <h3>Admin Panel</h3>
			

			<div class="w3-content" style="width:550px">
            <?php echo $mcontent; ?>
            </div>
        </div>
    </div>
</div>
<div class="w3-conatiner w3-hide-large w3-hide-medium w3-responsive w3-text-theme" style="margin-bottom:200px;">
    <h3>Admin Panel</h3>
			

			
            <?php echo $mcontent1; ?>
</div>

<?php include 'footer.php';?>

<script>
// Used to toggle the menu on small screens when clicking on the menu button
function myFunction() {
  var x = document.getElementById("navDemo");
  if (x.className.indexOf("w3-show") == -1) {
    x.className += " w3-show";
  } else { 
    x.className = x.className.replace(" w3-show", "");
  }
}

function myFunc() {
  var x = document.getElementById("navDemo1");
  if (x.className.indexOf("w3-show") == -1) {
    x.className += " w3-show";
  } else { 
    x.className = x.className.replace(" w3-show", "");
  }
}
</script>
</body>
</html>