<?php
session_start();
ob_start();
if(!isset($_SESSION['logner_bot']) && $_SESSION['logner_bot'] == '' && !isset($_SESSION['lgnids'])){
	header("Location: ../");
	exit();
}else{
include_once("hooks/common_func.php");
include_once("extended/commonextended.php");
include_once("hooks/_config_.php");

$conf = new config();
ini_set("include_path", '/home/kmilmrcdc544/php:' . ini_get("include_path") );
ini_set('post_max_size', '200M');
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>System Dashboard</title>

    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="assets/css/bootstrap.css">
	<link rel="stylesheet" href="assets/vendors/summernote/summernote-lite.min.css">
    <link rel="stylesheet" href="assets/vendors/iconly/bold.css">
    <link rel="stylesheet" href="assets/vendors/toastify/toastify.css">
<link href="https://unpkg.com/filepond/dist/filepond.css" rel="stylesheet">
<link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css" rel="stylesheet">

    <link rel="stylesheet" href="assets/vendors/perfect-scrollbar/perfect-scrollbar.css">
    <link rel="stylesheet" href="assets/vendors/bootstrap-icons/bootstrap-icons.css">
    <link rel="stylesheet" href="assets/css/app.css">
	
	
    <link rel="shortcut icon" href="assets/images/favicon.svg" type="image/x-icon">
</head>

<body>
    <div id="app">
		<!-- aparent left -->
		<?php include_once("assets/resources/side-includer.php"); ?>
        <!-- aparent right -->
		<?php include_once("assets/resources/top_navigator.php"); ?>
		<div id="main">
		<?php
		if(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addpage" ) {
		include_once("hooks/ax_adnewpage.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addcategories"){
		include_once("hooks/al-categoryx.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addcategories"){
		include_once("hooks/al-categoryx.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "fetchdashboard"){
		include_once("hooks/dashboad_state.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addcoupon") {
		include_once("hooks/addcoupon.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addstore") {
		include_once("hooks/addstore.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addnetw") {
		include_once("hooks/addnetw.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "metatag") {
		include_once("hooks/metatag.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "profile") {
		include_once("hooks/profile.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "createmember"  && $_SESSION['lgnids'] == 0) {
		include_once("hooks/admn_crtusr.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "addnetwork") {
		include_once("hooks/addnetw.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "invoice") {
		include_once("hooks/invoice.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "paymentsummary") {
		include_once("hooks/paymtsum.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "paymentsetting") {
		include_once("hooks/paymntsetting.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "apiaccess") {
		include_once("hooks/tool.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "programs") {
		include_once("hooks/program.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "myprograms") {
		include_once("hooks/myprogram.php");
		}elseif(isset($_GET['mdwrt']) && $_GET['mdwrt'] == "pendingprograms") {
		include_once("hooks/pendingpro.php");
		} // end if 
		// update
		if(isset($_GET['vcv']) && $_GET['vcv'] != '') {	
		include_once("hooks/m_view_hooks.php");
		}elseif(isset($_GET['cpnuk']) && isset($_GET['cpfk'])) {
include_once("hooks/addcoupon.php");
			}
			if(isset($_GET['edtuk']) && isset($_GET['rfk'])) {

include_once("hooks/addstore.php");
}
if(isset($_GET['ntwuqk']) && isset($_GET['ntwrkfrk'])) {
include_once("hooks/addnetw.php");
}
if(isset($_GET['amnsfrk']) && $_SESSION['lgnids'] == 0) {
include_once("hooks/admn_crtusr.php");
}


		?>
		

		
<?php

if(isset($_GET['confirmdelete']) && $_GET['confirmdelete'] != '') {
				
		if($_SESSION['lgnids'] == 0 || $_SESSION['lgnids'] == 1) {
		echo "<br>";
		echo "<ul><div class='col-sm-7 p-3 bg-white m-auto' style='color:#ff0000; border-radius: 20px;'>";
	   echo  "<div class='col-3 m-auto text-center align-center'>";
        echo  "<i class='bi bi-x-circle m-auto text-center align-center' style='font-size: 56px;'></i>";
		echo "</div>";
		echo "<p class='text-center' style='font-size: 25px;'>"."Are You Sure?"."</p>";
		echo "<p class='text-center' style='font-size: 19px; color: #000;'>"."Do You Really Want To Delete This Record.This Action Is Permanentilly Delete This Record. "."</p>";
		
	    echo "<div class='col-12 pb-4 pt-3 text-center align-center m-auto'><a href='".$_SERVER['PHP_SELF']."?confirm=yes&fq=".$_GET['confirmdelete']."' class='col-4 bg-info m-auto p-3 text-center align-center' style='border-radius: 15px; color: #fff;'>Confirm Delete</a></div>";
		echo "</div></ul>";
		
		
		
	}/*elseif($_SESSION['lgnids'] == 1) {	
		
		echo "<br>";
		echo "<ul><p style='color:#ff0000;'>Sorry User is not allowed to Delete Record. Contact To Admin.</p></ul>";
		} // end inner f
		*/	

	}else{
	//echo "Blank Variable";
	}

		
		if(isset($_GET['confirm']) && $_GET['confirm'] == "yes" && isset($_GET['fq'])) {
			
			echo "<ul><div class='col-sm-7 p-3 bg-white m-auto' style='color:#ff0000; border-radius: 20px;'>";
	   echo  "<div class='col-3 m-auto pt-4 text-center align-center'>";
        echo  "<i class='bi bi-check-circle m-auto text-center align-center' style='font-size: 56px; color: #38ab25;'></i>";
		echo "</div>";
		echo "<div class='text-center pb-4' style='font-size: 20px;'>".$view->process($_GET['fq'])."</div>";
		
	  
		echo "</div></ul>";
			
			$err->logHandler(" Record Deleted By: '".$_SESSION['logner_bot']."' on ".date("d-m-Y")." ".date("H:i:s",time())." {Page: Views}  ) <--> ( ", "cerr.php");
			//header("Location: ".$_SERVER['REQUEST_URI']."");
			//exit();
			echo "</br>";
			//echo "<p><a href='".$_SERVER['REQUEST_URI']."'>Back</a></p>";
		} // end inner if
		
?>



		<?php include_once("assets/resources/footer_includer.php"); ?>
        </div>
    </div>
    <script src="assets/vendors/perfect-scrollbar/perfect-scrollbar.min.js"></script>
    <script src="assets/js/bootstrap.bundle.min.js"></script>

    <script src="assets/vendors/apexcharts/apexcharts.js"></script>
    <script src="assets/js/pages/dashboard.js"></script>
    <script src="assets/vendors/toastify/toastify.js"></script>
    <script src="assets/js/extensions/toastify.js"></script>
    <script src="https://unpkg.com/filepond/dist/filepond.js"></script>
	 <script src="assets/vendors/jquery/jquery.min.js"></script>
    <script src="assets/vendors/summernote/summernote-lite.min.js"></script>
	 <script>
        $('#summernote').summernote({
            tabsize: 2,
            height: 120,
					    toolbar: [
        ['style', ['style']],
 
        ['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear']],
        ['fontname', ['fontname']],
        ['fontsize', ['fontsize']],
        ['color', ['color']],
        ['para', ['ul', 'ol', 'paragraph']],
        ['height', ['height']],
        ['table', ['table']],
        ['insert', ['link', 'picture', 'hr']],
        ['view', ['fullscreen', 'codeview']],
       
      ]
        })
        $("#hint").summernote({
            height: 100,
            toolbar: false,
            placeholder: 'type with apple, orange, watermelon and lemon',
            hint: {
                words: ['apple', 'orange', 'watermelon', 'lemon'],
                match: /\b(\w{1,})$/,
                search: function (keyword, callback) {
                    callback($.grep(this.words, function (item) {
                        return item.indexOf(keyword) === 0;
                    }));
                }
            }
        });
/////
    // Filepond: With Validation
    FilePond.create( document.querySelector('.with-validation-filepond'), { 
        allowImagePreview: false,
        allowMultiple: true,
        allowFileEncode: false,
        required: true,
        acceptedFileTypes: ['image/png'],
        fileValidateTypeDetectType: (source, type) => new Promise((resolve, reject) => {
            // Do custom type detection here and return with promise
            resolve(type);
        })
    });
    </script>
   
	<script src="assets/js/main.js"></script>
</body>
</html>
<?php
} // end session trach
?>