MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.221.68.196
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/ppcad7no/automationpowersolutions.com/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/automationpowersolutions.com/admin/profile.php
<?php

if(isset($_POST['btnAddMore'])) 
{
    include "config.php";

    $b_image = $_FILES['image'];
    move_uploaded_file($_FILES['image']['tmp_name'],'./img/'.$_FILES['image']['name']);
    $upload_image = $_FILES['image']['name'];    
    $sid = $_POST['id'];

    if($_FILES['image']['name'] === ''){
        header('location:profile.php');
    }else{
        $sql= "UPDATE `tb1_admin` SET `admin_image`='$upload_image' WHERE `id`='$sid'";
        $result = mysqli_query($db, $sql) or die("Query unsuccessful");
   if($result){
      header('location:profile.php');
    //   echo "Update Successfully";
      mysqli_close($db);
   }else{
    //   header('location:slider-update.php');
    echo "Query unsuccessful";
   }
}
}
?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin-Profile</title>

    <!-- Custom fonts for this template-->
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">
        <link href="css/adminprofile.css" rel="stylesheet" type="text/css">

    <!-- Custom styles for this template-->
    <link href="css/sb-admin-2.min.css" rel="stylesheet">

</head>

<body id="page-top">

    <!-- Page Wrapper -->
    <div id="wrapper">

       <?php include_once('side-bar.php')?>

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <?php include_once('topbar.php')?>
                <!-- End of Topbar -->

                <!-- Begin Page Content -->
                <div class="container-fluid">
                <div class="container emp-profile">
                
            <form method="POST" action="<?php $_PHP_SELF?>" enctype="multipart/form-data">
            <?php
                    // $sid = $_GET['id'];
                    $sql = "SELECT * FROM tb1_admin";
                    $run = mysqli_query($db,$sql) or die("Query Not run");
                    while($data = mysqli_fetch_assoc($run)){
                        if(mysqli_num_rows($run) > 0){
                ?>
                <div class="row">
                    <div class="col-md-4">
                    <input type="text" hidden name="id" value="<?php echo $data['id'];?>"/>
                        <div class="profile-img">
                            <img src="img/<?php echo $data['admin_image'];?>" alt="Profile Pic"/>
                            <div class="file btn btn-lg btn-primary">
                                Change Photo
                                <input type="file" name="image"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="profile-head">
                                    <h5>
                                    <?php echo $data['admin_name'];?>
                                    </h5>
                                    <h6>
                                        Web Developer and Designer
                                    </h6>
                                    <br><br>
                            <ul class="nav nav-tabs" id="myTab" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">About</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Timeline</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-md-2">
                        <input type="submit" class="profile-update-btn" name="btnAddMore" value="Update Profile"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">
                        <div class="profile-work">
                            <!-- <p>WORK LINK</p> -->
                            <a href="http://localhost/ayaan.digital/index.php">Website Link</a>
                            <!-- <br/>
                            <a href="">Bootsnipp Profile</a><br/>
                            <a href="">Bootply Profile</a>
                            <p>SKILLS</p>
                            <a href="">Web Designer</a><br/>
                            <a href="">Web Developer</a><br/>
                            <a href="">WordPress</a><br/>
                            <a href="">WooCommerce</a><br/>
                            <a href="">PHP, .Net</a><br/> -->
                        </div>
                    </div>
                    <div class="col-md-8">
                        <div class="tab-content profile-tab" id="myTabContent">
                            <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>User Id</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p><?php echo $data['admin_email'];?></p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Name:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p><?php echo $data['admin_name'];?></p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Email:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p><?php echo $data['admin_email'];?></p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Phone:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p><?php echo $data['admin_phone'];?></p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Profession:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>Web Developer and Designer</p>
                                            </div>
                                        </div>
                                    </div>
                                  <div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Experience:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>6 Months</p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Hourly Rate:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>10$/hr</p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Total Projects:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>10</p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>English Level:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>Expert</p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Availability:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>6 months</p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-6">
                                                <label>Your Bio:</label>
                                            </div>
                                            <div class="col-md-6">
                                                <p>Innallaha Ma'as Sabireen</p>
                                            </div>
                                        </div>
                                    </div>
                        </div>
                    </div>
                </div>
            </form>  
            <?php }
            } ?>         
        </div>

                    <!-- Page Heading -->
                    
                </div>
                <!-- /.container-fluid -->

            </div>
            <!-- End of Main Content -->
            
            <!-- Footer -->
            <?php include_once('footer.php')?>

</body>

</html>

MMCT - 2023