
    <main>
        <section id="user-information">
            <div class="container">
                <div class="user__info-wrapper row">
			<?php include(__ROOT__."/public/panel/sidebar.php"); ?>
			
						<?php if(@$_GET["i"]=="bas"){
							echo '<div class="alert alert-success">Destek talebi başarıyla oluşturuldu.</div>';
						}
						?>
                     <div class="form__wrapper invoice">
                            <span><i class="ri-hand-heart-line"></i> Destek Taleplerim</span>
                            <div class="cart-details-main-block">
                                <div class="cart-product cart-product-title d-flex flex-wrap d-none d-lg-flex align-items-center justify-content-between">
                                    <div class="ticket-name item_">
                                        <h3>Başlık</h3>
                                    </div>
                                    <div class="ticket-date item_">
                                        <h3 class="text-center">Oluşturma</h3>
                                    </div>
                                    <div class="ticket-detail item_">
                                        <h3 class="text-center">Durum</h3>
                                    </div>
                                    <div class="ticket-url item_">
                                    </div>
                                </div>
                                <div class="product-cart-all-acrd-items">
									<?php 
											$query = $db->query("SELECT * FROM destek where user='".$puser["id"]."' ORDER BY id DESC"); 
                while ($data = $query->fetch(PDO::FETCH_OBJ)) { ?>
                                    <div class="cart-product cart-product-body d-flex flex-wrap cart-item  overflow-hidden position-relative">
                                        <div class="ticket-name item_ d-flex align-items-center">
                                            <div class="d-flex align-items-center">
                                                <h4><a href="<?=$site;?>panel/ticket-view?id=<?=$data->id;?>"><?=$data->baslik;?></a></h4>
                                            </div>
                                        </div>
                                        <div class="ticket-date item_ d-flex align-items-center  justify-content-center">
                                            <span class="bekliyor"><?=explode(" ",$data->tarih)[1];?></span>
                                        </div>
                                        <div class="ticket-detail item_ d-flex align-items-center justify-content-center">
                                            <div class="d-flex align-items-center w-100">
				<?php if($data->durum=="0"){ ?>
                                                <span class="bekliyor w-100">Cevap Bekliyor</span>
				<?php } ?>
				<?php if($data->durum=="1"){ ?>
                                                <span class="yanitlandi w-100">Yanıtlandı</span>
				<?php } ?>
				<?php if($data->durum=="2"){ ?>
                                                <span class="cozumlendi w-100">Çözümlendi</span>
				<?php } ?>
				<?php if($data->durum=="3"){ ?>
                                                <span class="islemde w-100">İşlemde</span>
				<?php } ?>
                                            </div>
                                        </div>
                                        <div class="ticket-url item_ d-flex align-items-center justify-content-end">
                                            <div class="d-flex align-items-center justify-content-end w-100">
                                                <a href="<?=$site;?>panel/ticket-view?id=<?=$data->id;?>" class="cross-btn-positioning"><i class="ri-external-link-line"></i></a>
                                            </div>
                                        </div>
                                        <div class="hide-desktop w-100">
                                            <h5 class="detail-mobile" onclick="toggleClass()">Detaylar <i class="ri-arrow-down-s-line"></i></h5>
                                            <ul id="detail-content" class="mobil__zero">
                                                <li>
                                                    <h4>Tarih:</h4>
                                                    <span><?=explode(" ",$data->tarih)[1];?></span>
                                                </li>
                                                <li>
                                                    <h4>Detay:</h4>
                                                    <span>
                                                        İncele
                                                        <a href="<?=$site;?>panel/ticket-view?id=<?=$data->id;?>" class="cross-btn-positioning"><i class="ri-external-link-line"></i></a>
                                                    </span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
				<?php } ?>
                                </div>
                            </div>
                        </div>
                       </div>
                </div>
            </div>
        </section>
    </main>
