<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);
 include('dbconnection.php');
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">
     <link href="https://maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome.min.css"
  rel="stylesheet">

    <!-- BEGIN: Vendor CSS-->
   
    <link rel="stylesheet" type="text/css" href="app-assets/css/vendors.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/vendors/css/tables/datatable/dataTables.bootstrap4.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/tables/extensions/rowReorder.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/tables/extensions/responsive.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/forms/icheck/icheck.css">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/forms/icheck/custom.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">
    <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/forms/selects/select2.min.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/plugins/forms/extended/form-extended.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/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">
    <link rel="stylesheet" type="text/css" href="app-assets/css/pages/users.css">
    <!-- END: Page CSS-->

    <!-- BEGIN: Custom CSS-->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">
    <!-- END: Custom CSS-->
    <meta http-equiv="refresh" content="URL=http://localhost/loginsystem/crmstafflist.php" />


</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-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">Personeller</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 Listeme & Düzenleme</a>
                </li>
              </ol>
            </div>
          </div>
        </div>
      </div>
      <div class="content-detached">
        <div class="content-body">
          <section class="row">
            <div class="col-12">
              <div class="card">
                <div class="card-head">
                  <div class="card-header">
                    <h4 class="card-title">All Contacts</h4>
                    <a class="heading-elements-toggle"><i class="la la-ellipsis-h font-medium-3"></i></a>
                    <div class="heading-elements">
                      <button class="btn btn-primary btn-sm"><i class="ft-plus white"></i> Add Contacts</button>
                      <span class="dropdown">
                        <button id="btnSearchDrop1" type="button" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="true" class="btn btn-warning dropdown-toggle dropdown-menu-right btn-sm"><i class="ft-download-cloud white"></i></button>
                        <span aria-labelledby="btnSearchDrop1" class="dropdown-menu mt-1 dropdown-menu-right">
                          <a href="#" class="dropdown-item"><i class="ft-upload"></i> Import</a>
                          <a href="#" class="dropdown-item"><i class="ft-download"></i> Export</a>
                          <a href="#" class="dropdown-item"><i class="ft-shuffle"></i> Find Duplicate</a>
                        </span>
                      </span>
                      <button class="btn btn-default btn-sm"><i class="ft-settings white"></i></button>
                    </div>
                  </div>
                </div>
                <div class="card-content">
                  <div class="card-body">
                    <!-- Task List table -->
                    <div class="table-responsive">
                      <table id="users-contacts" class="table table-white-space table-bordered row-grouping display no-wrap icheck table-middle">
                        <thead>


                          <tr>
                            <th>Sno.</th>
                            <th>İşlemler</th>
                            <th>Ad</th>
                            <th>Soyad</th>
                            <th>Ünvan</th>
                            <th>Tel</th>
                            <th>Mail</th>
                            <th>Departman</th>
                            <th>Açıklama</th>
                          </tr>
                        </thead>

                        <tbody>
                         
 
 <?php


                       $ret=mysqli_query($con,"select * from camstaff");
                       $cnt=1;
                       while($row=mysqli_fetch_array($ret)) 
                        { 
                            $St_id=$row['St_id'];
                            $St_Name=$row['St_Name'];
                            $St_SurName=$row['St_SurName'];
                            $St_Title=$row['St_Title'];
                            $St_Mail=$row['St_Mail'];
                            $St_Phone=$row['St_Phone'];
                            $St_Department=$row['St_Department'];
                            $St_Exp=$row['St_Exp'];


                          ?> 







                          <tr>
                            <td><?php echo $cnt;?></td>
                               <td>
                             <span class="dropdown">
                                <button id="btnSearchDrop2" type="button" data-toggle="dropdown" aria-haspopup="true"
                                aria-expanded="true" class="btn btn-primary dropdown-toggle dropdown-menu-right"><i class="ft-settings"></i></button>
                                <span aria-labelledby="btnSearchDrop2" class="dropdown-menu mt-2 dropdown-menu-right">
                                  <a href="http://localhost/loginsystem/crmstaff.php">
 <button type="button" class="btn btn-outline-success  block btn-lg dropdown-item"><i class="ft-users"></i> Yeni Kayıt</button>
 <a href="crmstaffupdate.php?uid=<?php echo $row['St_id'];?>">
 <button type="button" class="btn btn-outline-info    block btn-lg dropdown-item" data-toggle="modal" data-target="#bootstrap"><i class="ft-edit-2"></i> Güncelle</button>
 <a href="crmstafflist.php?id=<?php echo $row['St_id'];?>">
 <button type="button" class="btn btn-outline-danger  block btn-lg dropdown-item " onClick="return confirm('Do you really want to delete');"> <i class="ft-trash-2"></i> Sil</button>
 
                                </span>
                              </span>
                               </form>

                            </td>
                           
                            
                          
                            <td>
                              <div class="media">
                                <div class="media-left pr-1">
                                  <span class="avatar avatar-sm avatar-online rounded-circle">
                                   <?php echo '<img src="images/'.$row['St_Logo'].'" alt="avatar">';   ?>     
                                                                              
                                  <i></i></span>
                                </div>
                                <div class="media-body media-middle">
                                  <a href="#" class="media-heading"> <?php echo $row['St_Name']; ?>   </a>
                                </div>
                              </div>
                            </td>
                            <td class="text-center"><?php echo $row['St_SurName'];?></td>
                            <td class="text-center"><?php echo $row['St_Title'];?></td>
                            <td class="text-center"><?php echo $row['St_Mail']; ?></td>
                            <td class="text-center"><?php echo $row['St_Phone']; ?></td>
                            <td class="text-center"><?php echo $row['St_Department']; ?></td>
                            <td class="text-center"><?php echo $row['St_Exp']; ?></td>
            

                         
                          </tr>
                              <?php $cnt=$cnt+1; }?>
                      </tbody>
                     </table>
                    </div>
                      <!-- Task List table -->
                  </div>
                </div>
              </div>
            </div>
          </section>
        </div>
      </div>
    </div>


<?php 

if(isset($_GET['id']))
{
$adminid=$_GET['id'];
$msg=mysqli_query($con,"delete from camstaff where St_id='".$adminid."'");
if($msg)
{
echo "<script>alert('Data deleted');</script>";
}
}
 ?>



                                   
  </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/tables/jquery.dataTables.min.js"></script>
  <script src="app-assets/vendors/js/tables/datatable/dataTables.bootstrap4.min.js"></script>
  <script src="app-assets/vendors/js/tables/datatable/dataTables.responsive.min.js"></script>
  <script src="app-assets/vendors/js/tables/datatable/dataTables.rowReorder.min.js"></script>
  <script src="app-assets/vendors/js/forms/icheck/icheck.min.js"></script>
  <script src="app-assets/vendors/js/forms/select/select2.full.min.js"></script>
  <!-- END PAGE VENDOR JS-->
  <!-- BEGIN MODERN 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>

     <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 MODERN JS-->
  <!-- BEGIN PAGE LEVEL JS-->
  <script src="app-assets/js/scripts/pages/users-contacts.js"></script>
  <script src="app-assets/js/scripts/forms/select/form-select2.js"></script>
  <script src="app-assets/js/scripts/modal/components-modal.js"></script>
  <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 LEVEL JS-->
  <script>
      $(function(){
          $('select.styled').customSelect();
      });

  </script>
</body>


<!-- END: Body-->

</html>





