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.116.85.96
Current Path : /var/www/html/dud/ |
| Current File : /var/www/html/dud/admcollsumdudexam.php |
<?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_dud";
$query = "select DATE_FORMAT(sysdate(), '%M %d %Y, %h : %m %p') as ftime, funivname, funivcode from {$admdb}.control";
$result = mysqli_query($conn,$query);
while($row = mysqli_fetch_assoc($result))
{
$ftime=$row['ftime'];
$funivname=$row['funivname'];
}
/*
//admission api
$query = "select c.fcollcode, concat(c.fcollname, ', ', c.ftown) as fcollname, c.fmobile, c.fphone, c.femail,
IFNULL(fackdone,0) AS fackdone, IFNULL(fackdonexls,0) AS fackdonexls
from {$admdb}.college c
LEFT JOIN (SELECT IFNULL(COUNT(fappno),0) AS fackdone, fcollcode
from {$admdb}.studadm WHERE IFNULL(ffinsub,'') = 'T' and ifnull(fcreateuser,'') <> 'XLS'
AND IFNULL(fappstatus,'') = 'verified' and ifnull(fdeleted,'') <> 'T'
group by fcollcode
) f ON c.fcollcode = f.fcollcode
LEFT JOIN (SELECT IFNULL(COUNT(fappno),0) AS fackdonexls, fcollcode
from {$admdb}.studadm WHERE IFNULL(ffinsub,'') = 'T' and fcreateuser = 'XLS'
AND IFNULL(fappstatus,'') = 'verified' and ifnull(fdeleted,'') <> 'T'
group by fcollcode
) g ON c.fcollcode = g.fcollcode
WHERE ifnull(c.fdeleted,'') <> 'T'
GROUP BY c.fcollcode
order by c.fcollcode";
*/
$query = "select c.fcollcode, concat(c.fcollname, ', ', c.ftown) as fcollname, c.fmobile, c.fphone, c.femail,
IFNULL(ftotcnt,0) AS ftotcnt, IFNULL(fabscnt,0) AS fabscnt, IFNULL(fmpcnt,0) AS fmpcnt
from {$admdb}.college c
LEFT JOIN (SELECT IFNULL(COUNT(a.fregno),0) AS ftotcnt, a.fcollcode
from {$admdb}.canddet a, {$admdb}.candsum b
where a.fdegree = b.fdegree and a.fregno = b.fregno and a.fpresent = 'P'
and ifnull(b.frecptdate,'') <> '' and ifnull(b.ftotalfee,0) > 0
group by a.fcollcode
) f ON c.fcollcode = f.fcollcode
LEFT JOIN (SELECT IFNULL(COUNT(a.fregno),0) AS fabscnt, a.fcollcode
from {$admdb}.absent a, {$admdb}.candsum b
where a.fregno = b.fregno and a.fabstype = 'QpA'
and ifnull(b.frecptdate,'') <> '' and ifnull(b.ftotalfee,0) > 0
group by a.fcollcode
) g ON c.fcollcode = g.fcollcode
LEFT JOIN (SELECT IFNULL(COUNT(a.fregno),0) AS fmpcnt, a.fcollcode
from {$admdb}.absent a, {$admdb}.candsum b
where a.fregno = b.fregno and a.fabstype = 'QpM'
and ifnull(frecptdate,'') <> '' and ifnull(ftotalfee,0) > 0
group by fcollcode
) h ON c.fcollcode = h.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;
$apprready=0;
$c1=0;
$c2=0;
$c3=0;
$c4=0;
$c5=0;
$c6=0;
$c7=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: 70%;" border="1" cellpadding="10" cellspacing="0">
<thead style = "">
<tr style = "background-color:#8acc51">
<th width="5%" align="center"><b>Sl. No.</b></th>
<th width="5%" align="center"><b>Coll. Code</b></th>
<th width="30%" align="left"><b>College Name</b></th>
<th width="10%" align="center"><b>College Contact No.</b></th>
<th width="30%" align="left"><b>College Email</b></th>
<th width="5%" align="center"><b>Tot. Stud.</b></th>
<th width="5%" align="center"><b>Ab. Count</b></th>
<th width="5%" align="center"><b>M.P. Count</b></th>
<th width="5%" align="center"><b>Pr. Count</b></th>
</tr>
</thead>
</table>
<table style="text-align: left;width: 70%;" 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";
$ftotcnt = $row['ftotcnt'];
$ftotcntxls = $row['ftotcntxls'];
$ltr='<tr>';
if($ftotcnt > 0 || $ftotcntxls > 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="10%" align="center">'.$fmobile.' /'.$fphone.'</td>
<td width="30%" align="left">'.$femail.'</td>
<td width="5%" align="center">'.$ftotcnt.'</td>
<td width="5%" align="center">'.$fabcnt.'</td>
<td width="5%" align="center">'.$fmpcnt.'</td>
<td width="5%" align="center">'.$fprcnt.'</td>
</tr>';
echo $table;
$y++;
$c1=$c1+$ftotcnt;
$c2=$c2+$fabcnt;
$c3=$c3+$fmpcnt;
$c4=$c4+$fadmpend;
$c5=$c5+$fprcnt;
}
$ltr='<tr style = "background-color:#8acc51">';
$table = ''.$ltr.'
<td width="5%" align="center"></td>
<td width="8%" align="center"></td>
<td width="35%" align="left"><b>Total</b></td>
<td width="10%" align="center"></td>
<td width="8%" align="center"><b>'.$c5.'</b></td>
<td width="8%" align="center"><b>'.$c6.'</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>Admission in Progress</b></td>
<td width="10%" align="center"><b>'.$apprready.'</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;
$c7=$c5 + $c6;
$table = '
<td width="40%" align="left"><b>Total Adm. Made</b></td>
<td width="10%" align="center"><b>'.$c7.'</b></td>
</tr>';
echo $table;
}
?>
|