MMCT TEAM
Server IP : 217.21.85.138  /  Your IP : 216.73.216.103
Web Server : LiteSpeed
System : Linux in-mum-web906.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
User : u915722082 ( 915722082)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u915722082/.nvm/../public_html/at/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u915722082/.nvm/../public_html/at/index.php
<?php 
	session_start(); 
	require_once 'sae-admin/_config.php'; 
	// error_reporting(E_ALL);
// ini_set('display_errors', '1');
	
	if($_SERVER["REQUEST_METHOD"]=='POST'){
		$_POST=filter_input_array(INPUT_POST,FILTER_SANITIZE_STRING);
		$mail=mysqli_real_escape_string($con,$_POST["mail"]);
		$password=mysqli_real_escape_string($con,$_POST["password"]);
		
		$sql="select * from tbl_user where mail='{$mail}' and password='{$password}'";
		$res=$con->query($sql);
		if($res->num_rows>0){
			$row=$res->fetch_assoc();
			$_SESSION["logs"]=$row;
			$_SESSION["roll"]=$row["roll"];
			$rw = single($con,"select * from  financial_years where fyear='{$_POST["fyear"]}'");
			$_SESSION["fyear"]=$_POST["fyear"];
			$_SESSION["fname"]=$rw["dyear"]; 
			if($row["roll"]=="ADMIN"){
				redirect("sae-admin/category.php");
			}else{
				
				$sql = "truncate temp_tbl_category";
				$con->query($sql);
				
				$sql = "truncate temp_tbl_products";
				$con->query($sql);
				
				$sql = "truncate temp_tbl_sales";
				$con->query($sql);
				
				$sql = "truncate temp_tbl_stock";
				$con->query($sql);
				
				$sql = "truncate temp_tbl_transactions";
				$con->query($sql);
				
				$sql = "truncate temp_purchase";
				$con->query($sql);
				
				$sql = "truncate temp_tbl_supplier";
				$con->query($sql);
				
				
				$sql = "insert into temp_tbl_category  select * from tbl_category";
				$con->query($sql);
				
				$sql = "insert into temp_tbl_products  select * from tbl_products";
				$con->query($sql); 
				
				
				$sql = "insert into temp_tbl_supplier  select * from tbl_supplier";
				$con->query($sql); 
				
				$sql = "insert into temp_purchase  select * from `{$_SESSION["fyear"]}_purchase`";
				$con->query($sql); 
				
				$sql = "insert into temp_tbl_sales  select * from `{$_SESSION["fyear"]}_tbl_sales`";
				$con->query($sql); 
				
				$sql = "insert into temp_tbl_stock  select * from `{$_SESSION["fyear"]}_tbl_stock`";
				$con->query($sql);
				
				$sql = "insert into temp_tbl_transactions  select * from `{$_SESSION["fyear"]}_tbl_transactions`";
				$con->query($sql);
				
				
				$_SESSION["fyear"] = "temp";
				
				
				redirect("sae/category.php"); 
			}
			
		}else{
			flashN('login','Login Status','Invalid login details. Try Again','danger');
		}
	}

?>

<!DOCTYPE html>
<html lang="en">
	<!--begin::Head-->
	<head><base href="./"/>
		<title>Admin Panel</title>
		<meta charset="utf-8" />
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<meta property="og:locale" content="en_US" />
		<meta property="og:type" content="article" />
		<meta property="og:title" content="" />
	
		<!--begin::Fonts(mandatory for all pages)-->
		<link rel="icon" type="image/x-icon" href="sae-admin/assets/images/default-dark-icon.png"> 
		<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
		<!--end::Fonts-->
		<!--begin::Global Stylesheets Bundle(mandatory for all pages)-->
		<link href="sae-admin/assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
		<link href="sae-admin/assets/css/style.bundle.css" rel="stylesheet" type="text/css" />
		<!--end::Global Stylesheets Bundle-->
	</head>
	<!--end::Head-->
	<!--begin::Body-->
	<body id="kt_body" class="app-blank app-blank">
		<!--begin::Theme mode setup on page load-->
		<script>var defaultThemeMode = "light"; var themeMode; if ( document.documentElement ) { if ( document.documentElement.hasAttribute("data-theme-mode")) { themeMode = document.documentElement.getAttribute("data-theme-mode"); } else { if ( localStorage.getItem("data-theme") !== null ) { themeMode = localStorage.getItem("data-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-theme", themeMode); }</script>
		<!--end::Theme mode setup on page load-->
		<!--begin::Root-->
		<div class="d-flex flex-column flex-root" id="kt_app_root">
			<!--begin::Authentication - Sign-in -->
			<div class="d-flex flex-column flex-lg-row flex-column-fluid">
				<!--begin::Body-->
				<div class="d-flex flex-column flex-lg-row-fluid w-lg-50 p-10 order-2 order-lg-1">
					<!--begin::Form-->
					<div class="d-flex flex-center flex-column flex-lg-row-fluid">
						<!--begin::Wrapper-->
						<div class="w-lg-500px p-10">
							<!--begin::Form-->
							<?php flashN("logout"); ?>
							<form class="form w-100"   action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method='POST' >
								<!--begin::Heading-->
								<div class="text-center mb-11">
									<!--begin::Title-->
									<h1 class="text-dark fw-bolder mb-3">Sign In</h1>
									<!--end::Title-->
									<!--begin::Subtitle-->
									<!--<div class="text-gray-500 fw-semibold fs-6">Your Social Campaigns</div>-->
									<!--end::Subtitle=-->
								</div>
								<!--begin::Heading-->
								<!--begin::Login options-->
								<!--<div class="row g-3 mb-9">
									
									<div class="col-md-6">
										
										<a href="#" class="btn btn-flex btn-outline btn-text-gray-700 btn-active-color-primary bg-state-light flex-center text-nowrap w-100">
										<img alt="Logo" src="assets/media/svg/brand-logos/google-icon.svg" class="h-15px me-3" />Sign in with Google</a>
										
									</div>
									
									<div class="col-md-6">
										
										<a href="#" class="btn btn-flex btn-outline btn-text-gray-700 btn-active-color-primary bg-state-light flex-center text-nowrap w-100">
										<img alt="Logo" src="assets/media/svg/brand-logos/apple-black.svg" class="theme-light-show h-15px me-3" />
										<img alt="Logo" src="assets/media/svg/brand-logos/apple-black-dark.svg" class="theme-dark-show h-15px me-3" />Sign in with Apple</a>
										
									</div>
									
								</div>-->
								<!--end::Login options-->
								<!--begin::Separator-->
								<!--<div class="separator separator-content my-14">
									<span class="w-125px text-gray-500 fw-semibold fs-7">Or with email</span>
								</div>-->
								<!--end::Separator-->
								<!--begin::Input group=-->
								<div class="fv-row mb-8">
									<!--begin::Email-->
									<input type="text" placeholder="Email" name="mail" autocomplete="off" class="form-control bg-transparent"  required />
									<!--end::Email-->
								</div>
								<!--end::Input group=-->
								<div class="fv-row mb-8">
									<!--begin::Password-->
									<input type="password" placeholder="Password" name="password" autocomplete="off" class="form-control bg-transparent" required />
									<!--end::Password-->
								</div>
								
								<div class="fv-row mb-3">
									<select class="form-control bg-transparent" required name='fyear'>
										<?php echo loadSelect($con,"select * from  financial_years","fyear","dyear","2024_2025"); ?>
									</select>
								</div>
								
								<!--end::Input group=-->
								<!--begin::Wrapper-->
								<div class="d-flex flex-stack flex-wrap gap-3 fs-base fw-semibold mb-8">
									<div></div>
									<!--begin::Link-->
									<a href="#" class="link-primary">Forgot Password ?</a>
									<!--end::Link-->
								</div>
								<!--end::Wrapper-->
								<!--begin::Submit button-->
								<div class="d-grid mb-10">
									<button type="submit" name='submit'  class="btn btn-primary">
										<!--begin::Indicator label-->
										<span class="indicator-label">Sign In</span>
										
									</button>
								</div>
								<!--end::Submit button-->
								<!--begin::Sign up
								<div class="text-gray-500 text-center fw-semibold fs-6">Not a Member yet?
								<a href="#" class="link-primary">Sign up</a></div>-->
								<?php flashN('login'); ?>
								<!--end::Sign up-->
							</form>
							<!--end::Form-->
						</div>
						<!--end::Wrapper-->
					</div>
					<!--end::Form-->
					<!--begin::Footer-->
					<div class="d-flex flex-center flex-wrap px-5">
						<!--begin::Links-->
						
						<!--end::Links-->
					</div>
					<!--end::Footer-->
				</div>
				<!--end::Body-->
				<!--begin::Aside-->
				<div class="d-flex flex-lg-row-fluid w-lg-50 bgi-size-cover bgi-position-center order-1 order-lg-2" style="background-image: url(sae-admin/assets/media/misc/auth-bg.png)">
					<!--begin::Content-->
					<div class="d-flex flex-column flex-center py-7 py-lg-15 px-5 px-md-15 w-100">
						<!--begin::Logo-->
						<a href="home.php" class="mb-0 mb-lg-12">
							<!--<img alt="Logo" src="assets/media/logos/custom-1.png" class="h-60px h-lg-75px" />-->
						</a>
						<!--end::Logo-->
						<!--begin::Image-->
						<img class="d-none d-lg-block mx-auto w-275px w-md-50 w-xl-500px mb-10 mb-lg-20" src="assets/media/misc/auth-screens.png" alt="" />
						<!--end::Image-->
						<!--begin::Title-->
						<h1 class="d-none d-lg-block text-white fs-2qx fw-bolder text-center mb-7">Admin Panel</h1>
						<!--end::Title-->
						<!--begin::Text-->
						<div class="d-none d-lg-block text-white fs-base text-center">In this kind of post,
						<a href="#" class="opacity-75-hover text-warning fw-bold me-1">the blogger</a>introduces a person they’ve interviewed
						<br />and provides some background information about
						<a href="#" class="opacity-75-hover text-warning fw-bold me-1">the interviewee</a>and their
						<br />work following this is a transcript of the interview.</div>
						<!--end::Text-->
					</div>
					<!--end::Content-->
				</div>
				<!--end::Aside-->
			</div>
			<!--end::Authentication - Sign-in-->
		</div>
		<!--end::Root-->
		<!--begin::Javascript-->
		<script>var hostUrl = "assets/";</script>
		<!--begin::Global Javascript Bundle(mandatory for all pages)-->
		<script src="sae-admin/assets/plugins/global/plugins.bundle.js"></script>
		<script src="sae-admin/assets/js/scripts.bundle.js"></script>
		<!--end::Global Javascript Bundle-->
		<!--begin::Custom Javascript(used for this page only)-->
		<script src="sae-admin/assets/js/custom/authentication/sign-in/general.js"></script>
		<!--end::Custom Javascript-->
		<!--end::Javascript-->
	</body>
	<!--end::Body-->
</html>

MMCT - 2023