<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);
session_start();
include("checklogin.php");
check_login();




    
	
?>
<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr">
<!-- BEGIN: Head-->

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="CRM">
    <title>CAM YAPI</title>
    <link rel="apple-touch-icon" href="images/logo.png">
    <link rel="shortcut icon" type="image/x-icon" href="images/logo.png">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i%7CQuicksand:300,400,500,700" rel="stylesheet">

    <!-- BEGIN: Vendor CSS-->
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/vendors.min.css">
    <!-- END: Vendor CSS-->

    <!-- BEGIN: Theme CSS-->
    <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap-extended.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/colors.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/components.css">
    <!-- END: Theme CSS-->

    <!-- BEGIN MODERN CSS-->
    <link rel="stylesheet" type="text/css" href="app-assets/css/app.css">
    <!-- END MODERN CSS-->


    <!-- BEGIN: Page CSS-->
    <link rel="stylesheet" type="text/css" href="app-assets/css/core/menu/menu-types/vertical-menu-modern.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/core/colors/palette-gradient.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/plugins/forms/extended/form-extended.css">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/charts/jquery-jvectormap-2.0.3.css">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/charts/morris.css">
    <link rel="stylesheet" type="text/css" href="app-assets/fonts/simple-line-icons/style.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/core/colors/palette-gradient.css">
    <!-- END: Page CSS-->
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    

    <!-- BEGIN: Custom CSS-->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">
    <!-- END: Custom CSS-->
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
</script>
<script src="js/jquery.min"></script>
<script src="js/easyResponsiveTabs.js" type="text/javascript"></script>
                <script type="text/javascript">
                    $(document).ready(function () {
                        $('#horizontalTab').easyResponsiveTabs({
                            type: 'default',       
                            width: 'auto', 
                            fit: true 
                        });
                    });
                   </script>
<script src="include/3b-script.js"></script>
</head>
<!-- END: Head-->

<!-- BEGIN: Body-->

<body class="vertical-layout vertical-menu-modern vertical-collapsed-menu 2-columns   menu-collapsed fixed-navbar" data-open="click" data-menu="vertical-menu-modern" data-col="2-columns">

    <!-- BEGIN: Header-->
    <nav class="header-navbar navbar-expand-lg navbar navbar-with-menu navbar-without-dd-arrow fixed-top navbar-semi-dark navbar-shadow">
        <div class="navbar-wrapper">
            <div class="navbar-header">
                <ul class="nav navbar-nav flex-row">
                    <li class="nav-item mobile-menu d-lg-none mr-auto"><a class="nav-link nav-menu-main menu-toggle hidden-xs" href="#"><i class="ft-menu font-large-1"></i></a></li>
                    <li class="nav-item mr-auto"><a class="navbar-brand" href="crmindex.php"><img class="brand-logo" alt="CRM admin logo" src="images/logo.png">
                            <h3 class="brand-text">CAM YAPI</h3>
                        </a></li>
                    <li class="nav-item d-none d-lg-block nav-toggle"><a class="nav-link modern-nav-toggle pr-0" data-toggle="collapse"><i class="toggle-icon ft-toggle-right font-medium-3 white" data-ticon="ft-toggle-right"></i></a></li>
                    <li class="nav-item d-lg-none"><a class="nav-link open-navbar-container" data-toggle="collapse" data-target="#navbar-mobile"><i class="la la-ellipsis-v"></i></a></li>
                </ul>
            </div>
            <div class="navbar-container content">
                <div class="collapse navbar-collapse" id="navbar-mobile">
                    <ul class="nav navbar-nav mr-auto float-left">
                        <li class="nav-item d-none d-lg-block"><a class="nav-link nav-link-expand" href="#"><i class="ficon ft-maximize"></i></a></li>
                        <li class="dropdown nav-item mega-dropdown d-none d-lg-block"><a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">CAM YAPI</a>
                          
                        </li>
                    </ul>
                    <ul class="nav navbar-nav float-right">
                        <li class="dropdown dropdown-user nav-item"><a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown"><span class="mr-1 user-name text-bold-700"><?php echo $_SESSION['dp_userName'];?></span><span class="avatar avatar-online"><img src="app-assets/images/portrait/small/avatar-s-19.png" alt="avatar"><i></i></span></a>
                            <div class="dropdown-menu dropdown-menu-right"><a class="dropdown-item" href="user-profile.html"><i class="ft-user"></i> Edit Profile</a><a class="dropdown-item" href="app-kanban.html"><i class="ft-clipboard"></i> Todo</a><a class="dropdown-item" href="user-cards.html"><i class="ft-check-square"></i> Task</a>
                                <div class="dropdown-divider"></div><a class="dropdown-item" href="login-with-bg-image.html"><i class="ft-power"></i> Logout</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </nav>
    <!-- END: Header-->


    <!-- BEGIN: Main Menu-->

    <div class="main-menu menu-fixed menu-dark menu-accordion menu-shadow" data-scroll-to-active="true">
        <div class="main-menu-content">
            <ul class="navigation navigation-main" id="main-menu-navigation" data-menu="menu-navigation">
                <li class=" nav-item"><a href="index.html"><i class="la la-home"></i><span class="menu-title" data-i18n="Dashboard">Dashboard</span><span class="badge badge badge-info badge-pill float-right mr-2">1</span></a>
                    <ul class="menu-content">
                        </li>
                         
                 <li><a class="menu-item" href="#"><i>Firma İşlemleri</i><span data-i18n="current"></span></a>

                   <ul class="menu-content">
                        <li><a class="menu-item" href="crmcari.php"><i class="la la-bars">&emsp;</i><span data-i18n="eCommerce">Firma Kayıt</span></a></li>
                        <li><a class="menu-item" href="crmcarilist.php"><i class="la la-industry">&emsp;</i><span data-i18n="eCommerce">Firma Listeleme</span></a></li> </ul> 
                 </li>
                  <li><a class="menu-item" href="#"><i>Personel İşlemleri</i><span data-i18n="current"></span></a>

                   <ul class="menu-content">
                    <li><a class="menu-item" href="crmcompany.php"><i class="la la-user">&emsp;</i><span data-i18n="eCommerce">Personel Kayıt</span></a></li>
                    <li><a class="menu-item" href="crmcompanylist.php"><i class="la la-users">&emsp;</i><span data-i18n="eCommerce">Personel Listeleme</span></a></li>  
                    </ul> 
                 </li>
                <li><a class="menu-item" href="#"><i>Teklif Personel İşlemleri</i><span data-i18n="current"></span></a>

                   <ul class="menu-content">
                    <li><a class="menu-item" href="crmstaff.php"><i class="la la-user">&emsp;</i><span data-i18n="eCommerce">Personel Kayıt</span></a></li>
                    <li><a class="menu-item" href="crmstafflist.php"><i class="la la-users">&emsp;</i><span data-i18n="eCommerce">Personel Listeleme</span></a></li>  
                    </ul> 
                 </li>
                  <li><a class="menu-item" href="#"><i>Teklif İşlemleri</i><span data-i18n="current"></span></a>
                   <ul class="menu-content">
                    <li><a class="menu-item" href="crmoffer.php"><i class="la la-check-square">&emsp;</i><span data-i18n="eCommerce">Teklif Kayıt</span></a></li>
                    <li><a class="menu-item" href="#"><i class="la la-edit">&emsp;</i><span data-i18n="eCommerce">Teklif Listeleme</span></a></li> 

                    </ul> 
                    <a class="menu-item" href="crmcurrent.php"><i>Rapor</i><span data-i18n="current"></span></a>
                 </li>
 
               </ul>
        </div>
    </div>

    <!-- END: Main Menu-->
    <!-- BEGIN: Content-->
    <div class="app-content content">
        <div class="content-overlay"></div>
        <div class="content-wrapper">
            <div class="content-header row">
           <div class="content-header-left col-md-6 col-12 mb-2 breadcrumb-new">
          <h3 class="content-header-title mb-0 d-inline-block">Cam Yapı Personel Kayıt</h3>
          <div class="row breadcrumbs-top d-inline-block">
            <div class="breadcrumb-wrapper col-12">
              <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="index.html">Personel İşlemleri</a>
                </li>
                <li class="breadcrumb-item"><a href="#">Personel Kayıt</a>
                </li>
              </ol>
            </div>
          </div>
        </div>
            </div>


<!-- ------------------------>
 <div class="content-body">
<section id="number-tabs">
          <div class="row">
            <div class="col-12">
              <div class="card">
                <div class="card-header">
                  <h4 class="card-title">Personel Kayıt İşlemleri</h4>
                  <a class="heading-elements-toggle"><i class="la la-ellipsis-h font-medium-3"></i></a>
                  <div class="heading-elements">
                    <ul class="list-inline mb-0">
                      <li><a data-action="collapse"><i class="ft-minus"></i></a></li>
                      <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                      <li><a data-action="expand"><i class="ft-maximize"></i></a></li>
                      <li><a data-action="close"><i class="ft-x"></i></a></li>
                    </ul>
                  </div>
                </div>
                <div class="card-content collapse show">
                  <div class="card-body">

<?php
include('dbconnection.php');


if(isset($_POST['signup']))
{
    $St_Name=$_POST['St_Name'];
    $St_SurName=$_POST['St_SurName'];
    $St_Title=$_POST['St_Title'];
    $St_Mail=$_POST['St_Mail'];
    $St_Phone=$_POST['St_Phone'];
    $St_Department=$_POST['St_Department'];
    $St_Exp=$_POST['St_Exp'];


        $name = $_FILES['St_Logo']['name'];
        $target_dir = "images/";
        $target_file = $target_dir . basename($_FILES["St_Logo"]["name"]);

        // Select file type
        $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));

        // Valid file extensions
        $extensions_arr = array("jpg","jpeg","png","gif");

        // Check extension
        if( in_array($imageFileType,$extensions_arr) )
        {
            
            // Upload file
            if(move_uploaded_file($_FILES['St_Logo']['tmp_name'],'images/'.$name))
            {
                // Convert to base64 
                $image_base64 = base64_encode(file_get_contents('images/'.$name) );
                $image = 'data:image/'.$imageFileType.';base64,'.$image_base64;
    
            
             }

        }


        $msg=mysqli_query($con,"insert into camstaff(St_Name,St_SurName,St_Title,St_Mail,St_Phone,St_Department,St_Exp,St_Logo)

            values


            ('$St_Name','$St_SurName','$St_Title','$St_Mail','$St_Phone','$St_Department','$St_Exp','".$name."')");
         // Company veritabanına ekleme
     
        if($msg)
        {
        echo "<script>alert('Kayıt Başarılı');</script>"; // başarılı mesajı
        }


    
}

?>



                    <form name="registration" action="" id="registration" method="post" enctype="multipart/form-data" class="number-tab-steps wizard-notification wizard clearfix">
                        <div class="content clearfix">

                      <!-- Firma -->
                      
                      <h4 class="form-section"><i class="ft-user"></i> Cam Yapı Personel Bilgileri</h4>
                      <fieldset id="steps-uid-0-p-0" role="tabpanel" aria-labelledby="steps-uid-0-h-0" class="body current" aria-hidden="false">
                        <div class="row">
                          <div class="col-md-2">
                            <div class="form-group">
                              <label for="firstName1">Ad</label>
                              <input type="text" class="form-control" name="St_Name" id="St_Name" placeholder="Personel Ad">
                            </div>
                          </div>
                          <div class="col-md-2">
                            <div class="form-group">
                              <label for="lastName1">Soyad</label>
                              <input type="text" class="form-control" name="St_SurName" id="St_SurName" placeholder="Personel Soyad">
                            </div>
                          </div>
                         <div class="col-md-2">
                            <div class="form-group">
                              <label for="lastName1">Ünvan</label>
                              <input type="text" class="form-control" name="St_Title" id="St_Title" placeholder="Personel Ünvan">
                            </div>
                          </div>
                          <div class="col-md-2">
                            <div class="form-group">
                              <label for="firstName1">Telefon</label>
                              <input type="text" class="form-control phone-formatter" name="St_Phone" id="St_Phone" placeholder="Telefon No" maxlength="10">
                            </div>
                          </div>
                          <div class="col-md-2">
                            <div class="form-group">
                              <label for="lastName1">Mail</label>
                              <input type="text" class="form-control email-inputmask" name="St_Mail" id="St_Mail" placeholder="Email Address">
                            </div>
                          </div>
                          <div class="col-md-2">
                            <div class="form-group">
                              <label for="lastName1">Departman</label>
                              <input type="text" class="form-control" name="St_Department" id="St_Department" placeholder="Departman">
                            </div>
                          </div>



                        </div>
                    <!-- Firma İletişim -->


                        <div class="row">



                            <div class="col-md-6">
                             <div class="form-group">
                                <h4 class="card-title">Fotoğraf</h4>
                            <div class="custom-file">
                        <input type="file" class="custom-file-input" id="St_Logo" name="St_Logo" >
                        <label class="custom-file-label" for="inputGroupFile01">Fotoğraf  yükleyiniz.</label>
                            </div>
                         </div>
                          </div>

                         
                          <div class="col-md-6">
                            <div class="form-group">
                            <label for="basicTextarea">Açıklama</label> 
                             <textarea class="form-control" id="St_Exp" name="St_Exp" placeholder="Not" rows="3" style="margin-top: 0px; margin-bottom: 0px; height: 106px;"></textarea>
                            </div>
                          </div>
                         </div>
                        </div>

                      </fieldset>
                    <!-- <i class="ft-x"></i> <input type="submit" name="signup"  class="btn btn-primary float-right"value="KAYIT">-->
                 <button type="submit" name="signup" class="btn btn-primary btn-min-width mr-1 mb-1 float-right"><i class="la la-check-square-o"></i> Kayıt</button>
                      <button type="button" class="btn btn-warning btn-min-width mr-1 mb-1 float-right"><i class="ft-x"></i> İptal</button>
                      <button type="button" class="btn btn-danger btn-min-width mr-1 mb-1 float-right">Temizle</button>
                         
                    </div>
                </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </section>
</div>











<!-- ------------------------>
        </div>
    </div>
    <!-- END: Content-->

    <div class="sidenav-overlay"></div>
    <div class="drag-target"></div>

    <!-- BEGIN: Footer-->
    <footer class="footer footer-static footer-light navbar-border navbar-shadow">
        <p class="clearfix blue-grey lighten-2 text-sm-center mb-0 px-2"><span class="float-md-left d-block d-md-inline-block">Copyright &copy; 2021 <a class="text-bold-800 grey darken-2" href="https://www.doganetwork.com/" target="_blank">DOĞA NETWORK</a></span></p>
    </footer>
    <!-- END: Footer-->


    <!-- BEGIN: Vendor JS-->
    <script src="app-assets/vendors/js/vendors.min.js"></script>
    <!-- BEGIN Vendor JS-->

    <!-- BEGIN: Page Vendor JS-->
    <script src="app-assets/vendors/js/charts/chart.min.js"></script>
    <script src="app-assets/vendors/js/charts/raphael-min.js"></script>
    <script src="app-assets/vendors/js/charts/morris.min.js"></script>
    <script src="app-assets/vendors/js/charts/jvector/jquery-jvectormap-2.0.3.min.js"></script>
    <script src="app-assets/vendors/js/charts/jvector/jquery-jvectormap-world-mill.js"></script>
    <script src="app-assets/data/jvector/visitor-data.js"></script>

    <script src="app-assets/vendors/js/forms/extended/typeahead/typeahead.bundle.min.js"></script>
    <script src="app-assets/vendors/js/forms/extended/typeahead/bloodhound.min.js"></script>
    <script src="app-assets/vendors/js/forms/extended/typeahead/handlebars.js"></script>
    <script src="app-assets/vendors/js/forms/extended/inputmask/jquery.inputmask.bundle.min.js"></script>
    <script src="app-assets/vendors/js/forms/extended/formatter/formatter.min.js"></script>
    <script src="app-assets/vendors/js/forms/extended/maxlength/bootstrap-maxlength.js"></script>
    <script src="app-assets/vendors/js/forms/extended/card/jquery.card.js"></script>

    <!-- END: Page Vendor JS-->

    <!-- BEGIN: Theme JS-->
    <script src="app-assets/js/core/app-menu.js"></script>
    <script src="app-assets/js/core/app.js"></script>
    <script src="app-assets/js/scripts/customizer.js"></script>
    <!-- END: Theme JS-->

    <!-- BEGIN: Page JS-->
    <script src="app-assets/js/scripts/pages/dashboard-sales.js"></script>
    <script src="app-assets/js/scripts/forms/extended/form-typeahead.js"></script>
    <script src="app-assets/js/scripts/forms/extended/form-inputmask.js"></script>
    <script src="app-assets/js/scripts/forms/extended/form-formatter.js"></script>
    <script src="app-assets/js/scripts/forms/extended/form-maxlength.js"></script>
    <script src="app-assets/js/scripts/forms/extended/form-card.js"></script>
    <!-- END: Page JS-->


</body>
<!-- END: Body-->
</html>





