<?php include 'loader.php'; ?>
<?php include 'inc/config.php'; ?>
<?php include 'inc/template_start.php'; ?>
<?php include 'inc/page_head.php'; ?>


    <!-- Page content -->
    <div id="page-content">
        <!-- eCommerce Orders Header -->
        <div class="content-header">
            <ul class="nav-horizontal text-center">
                <li >
                    <a href="<?php echo SITE_ADMIN; ?>index.php"><i class="gi gi-shop_window"></i> Anasayfa</a>
                </li>
                <li >
                    <a href="<?php echo SITE_ADMIN; ?>rooms.php"><i class="gi gi-notes_2"></i> Daireler</a>
                </li>
                <li >
                    <a href="<?php echo SITE_ADMIN; ?>projects.php"><i class="gi gi-settings"></i> Projeler</a>
                </li>
                <li >
                    <a href="<?php echo SITE_ADMIN; ?>customers.php"><i class="fa fa-user"></i> Müşteriler</a>
                </li>
                <li >
                    <a href="<?php echo SITE_ADMIN; ?>forms.php"><i class="gi gi-certificate"></i> Formlar</a>
                </li>
                <li >
                    <a href="<?php echo SITE_ADMIN; ?>crm.php"><i class="gi gi-notes"></i> Crm</a>
                </li>
                <li class="active">
                    <a href="<?php echo SITE_ADMIN; ?>danisman.php"><i class="gi gi-stopwatch"></i> Danışmanlar</a>
                </li>
            </ul>
        </div>
        <!-- END eCommerce Orders Header -->

        <!-- All Orders Block -->
        <div class="block full">
            <!-- All Orders Title -->
            <div class="block-title">
                <div class="block-options pull-right">
                    <!--    <a href="<?php echo SITE_ADMIN; ?>new_user.php" class="btn btn-sm btn-primary"><i class="fa fa-floppy-o"></i> Personel Ekle</a>-->
                </div>
                <h2><strong>Tüm</strong> Danışmanlar</h2>

            </div>
            <!-- END All Orders Title -->

            <!-- All Orders Content -->
            <table id="ecom-orders" class="table table-bordered table-striped table-vcenter">
                <thead>
                <tr>
                    <th class="text-center" style="width: 100px;">ID</th>
                    <th class="visible-lg">Firma Adı</th>
                    <th class="visible-lg">Adı/Soyadı</th>
                    <th class="visible-lg">Telefon</th>
                    <th class="visible-lg">Email</th>
                    <th class="visible-lg">Mesaj</th>
                    <th class="text-center">Tarih</th>
                    <th class="text-center">Eylem</th>
                </tr>
                </thead>
                <tbody>
                <?php
                $orders = $db->query("SELECT * FROM ".DBPREFIX."danisman ");
                ?>
                <?php foreach($orders->rows as $order) { ?>
                    <tr id="user_id_<?php echo $order['id']; ?>">
                        <td class="text-center"><strong><?php echo $order['id']; ?></strong></td>
                        <td class="visible-lg"><a href="javascript:void(0)"><?php echo $order['company_name']; ?></a></td>
                        <td class="text-left"><?php echo $order['name']; ?></td>
                        <td class="text-left"><?php echo $order['phone']; ?></td>
                        <td class="text-left"><?php echo $order['email']; ?></td>
                        <td class="text-left"><?php echo $order['message']; ?></td>
                        <td class="text-center"><?php echo $order['insert_date']; ?></td>
                        <td class="text-center">

                            <div class="btn-group btn-group-xs">

                                <a href="<?php echo SITE_ADMIN; ?>danisman_edit.php?id=<?php echo $order['id']; ?>" data-toggle="tooltip" title="View" class="btn btn-default"><i class="fa fa-eye"></i></a>
                                <a href="javascript:void(0)" onclick="itemDelete('danisman',<?php echo $order['id']; ?>);" data-toggle="tooltip" title="Delete" class="btn btn-xs btn-danger"><i class="fa fa-times"></i></a>
                            </div>
                        </td>
                    </tr>
                <?php } ?>
                </tbody>
            </table>
            <!-- END All Orders Content -->
        </div>
        <!-- END All Orders Block -->
    </div>
    <!-- END Page Content -->

<?php include 'inc/page_footer.php'; ?>
<?php include 'inc/template_scripts.php'; ?>

    <!-- Load and execute javascript code used only in this page -->
    <script src="js/pages/ecomOrders.js"></script>
    <script>$(function(){ EcomOrders.init(); });</script>

<?php include 'inc/template_end.php'; ?>