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 : 18.226.166.207
<?php
//lib16107 lib16103
ini_set('display_errors', 'on');
ini_set('memory_limit','900M');
ini_set('max_execution_time',0);
$servername = "97.74.228.93";
$username = "logisys3_logu";
$password = "Logisys@2106";
/*$servername = "localhost";
$username = "root";
$password = "";*/
$conn = new mysqli($servername,$username,$password);
if(!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$admdb = "logisys3_bnu";
$query = "select DATE_FORMAT(sysdate(), '%M %d %Y, %h : %m %p') as ftime, funivname from {$admdb}.control";
$result = mysqli_query($conn,$query);
while($row = mysqli_fetch_assoc($result))
{
$ftime=$row['ftime'];
$funivname=$row['funivname'];
}
$query = "select c.fcollcode, concat(c.fcollname, ', ', c.ftown) as fcollname, c.fmobile, c.fphone, c.femail, ifnull(fcount,0) + ifnull(fenterednb,0) as fcount,
ifnull(factive,0) as factive,
IFNULL(finsubdone,0) AS ffinsubdone,
ifnull(fcount,0) + ifnull(fenterednb,0)-IFNULL(finsubdone,0) as fadmpend,
IFNULL(fackdone,0) AS fackdone,
ifnull(fcount,0) + ifnull(fenterednb,0)-IFNULL(fackdone,0) as fackpend
from {$admdb}.college c
LEFT JOIN(SELECT COUNT(fmobileno) AS fcount, SUM(IF(IFNULL(factive,'') = 'T',1,0)) AS factive, fcollcode
from {$admdb}.collstud
WHERE ifnull(fdeleted,'') <> 'T'
group by fcollcode) s
ON c.fcollcode = s.fcollcode
LEFT JOIN (SELECT COUNT(fappno) AS fenterednb, fcollcode
from {$admdb}.studadm
WHERE ifnull(fcontact_no,'') in(select fid from {$admdb}.collstudnb)
and ifnull(fdeleted,'') <> 'T'
group by fcollcode
) g ON c.fcollcode = g.fcollcode
LEFT JOIN (SELECT COUNT(fappno) AS finsubdone, fcollcode
from {$admdb}.studadm
WHERE IFNULL(ffinsub,'') = 'T' and ifnull(fdeleted,'') <> 'T'
group by fcollcode
) e ON c.fcollcode = e.fcollcode
LEFT JOIN (SELECT IFNULL(COUNT(fappno),0) AS fackdone, fcollcode
from {$admdb}.studadm WHERE IFNULL(ffinsub,'') = 'T'
AND IFNULL(fappstatus,'') = 'verified' and ifnull(fdeleted,'') <> 'T'
group by fcollcode
) f ON c.fcollcode = f.fcollcode
WHERE ifnull(c.fdeleted,'') <> 'T'
GROUP BY c.fcollcode
order by c.fcollcode";
$result = mysqli_query($conn,$query);
$count = mysqli_num_rows($result);
if($count >0)
{
$i = 0;
$y = 1;
$nodata=0;
$c1=0;
$c2=0;
$c3=0;
$c4=0;
$c5=0;
$c6=0;
$table = '<center><h2>'.$funivname.'</h2>
<h2>Admission Statistics as on '.$ftime.'</h2>';
echo $table;
$table = '
<style>
table{
width:100%;
table-layout: fixed;
}
</style>
<table style="text-align: left;width: 100%;" border="1" cellpadding="10" cellspacing="0">
<thead style = "">
<tr style = "background-color:#7bad8b">
<th width="5%" align="center"><b>Sl. No.</b></th>
<th width="8%" align="center"><b>College Code</b></th>
<th width="35%" align="left"><b>College Name</b></th>
<th width="10%" align="center"><b>College No.</b></th>
<th align="center"><b>No. of Students</b></th>
<th align="center"><b>Students Registered</b></th>
<th align="center"><b>Adm. Uploaded</b></th>
<th align="center"><b>Adm. Pending</b></th>
<th align="center"><b>Ack. Done</b></th>
<th align="center"><b>Ack. Pending</b></th>
</tr>
</thead>
</table>
<table style="text-align: left;width: 100%;" border="1" cellpadding="10" cellspacing="0">
<tbody >';
echo $table;
while($row = mysqli_fetch_assoc($result))
{
$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'];
$ltr='<tr>';
if($fcount > 0)
{
if(($fackpend * 100/intval($row ['fcount'])) < 10)
{
$ltr='<tr style = "background-color:#8acc51">';
}
}
else
{
$ltr='<tr style = "background-color:#f4a442">';
}
$table = ''.$ltr.'
<td width="5%" align="center">'.$y.'</td>
<td width="8%" align="center">'.$fcollcode.'</td>
<td width="35%" align="left">'.$fcollname.'</td>
<td width="10%" 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>
</tr>';
echo $table;
$y++;
$c1=$c1+$fcount;
$c2=$c2+$factive;
$c3=$c3+$ffinsubdone;
$c4=$c4+$fadmpend;
$c5=$c5+$fackdone;
$c6=$c6+$fackpend;
}
$table = ''.$ltr.'
<td width="5%" align="center"></td>
<td width="8%" align="center"></td>
<td width="35%" align="left">Total</td>
<td width="10%" align="center"></td>
<td align="center">'.$c1.'</td>
<td align="center">'.$c2.'</td>
<td align="center">'.$c3.'</td>
<td align="center">'.$c4.'</td>
<td align="center">'.$c5.'</td>
<td align="center">'.$c6.'</td>
</tr>';
echo $table;
}
?>
|