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.219.23.150
Current Path : /var/www/html/bnu/src/ |
| Current File : /var/www/html/bnu/src/getMessages_29012019.php |
<?php
function getMessages($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = "select ffadm, ffexapp, ffval, ffrv, ffgen, ffcntr,ffpgcntr from control";
$enable_flags = $aobj_context->mobj_db->GetRow($query);
// var_dump($enable_flags);
$messages = array();
if($enable_flags['ffgen'] == 'T')
{
$query = "SELECT message FROM message_board
where current_date() between display_from
and display_to and college_code = 'flash'";
$lobj_messages = $aobj_context->mobj_db->GetAll($query);
foreach($lobj_messages as $k => $v)
{
$messages[] = $v['message'];
}
}
if($enable_flags['ffadm'] == 'T')
{
}
if($enable_flags['ffcntr'] == 'T')
{
$query = "select distinct fcollcode, concat(fcollname, ', ',ftown) as fcollname,
fmobile, ifnull(fthcntr,'F') as fthcntr from college where fcollcode = '{$_SESSION['FCOLLCODE']}'";
$results = $aobj_context->mobj_db->GetRow($query);
$cntr = $results['fthcntr'];
$flag = 'T';
if($cntr != 'F')
{
$table .= '
<h2>UG Theory Center Details</h2>';
if($results['fthcntr'] == $results['fcollcode'])
{
$flag = 'C';
$table .= '<table style="margin-left:2px;text-align: left;width: 100%" border="1" cellpadding="10" cellspacing="0" >
<thead>
<tr style = "background-color:#8acc51">
<th align="center" colspan="3"><b>Examination Center</b></th>
</tr>
</thead>
<tbody>
<tr>
<td width="10%" align="left"><b>'.$results['fcollcode'].'</b></td>
<td width="70%" align="left"><b>'.$results['fcollname'].'</b></td>
<td width="20%" align="left"><b>'.$results['fmobile'].'</b></td>
</tr></tbody></table>';
$query = "select distinct fcollcode, concat(fcollname, ', ',ftown) as fcollname,
fmobile,fthcntr from college
where fthcntr = '{$_SESSION['FCOLLCODE']}'
and fcollcode <> fthcntr";
$results = $aobj_context->mobj_db->GetAll($query);
$table .= '<br><br>
<table style="margin-left:2px;text-align: left;width: 100%" border="1" cellpadding="10" cellspacing="0" >
<thead>
<tr style = "background-color:#8acc51">
<th align="center" colspan="3"><b>Tagged Colleges</b></th>
</tr>
</thead><tbody>';
foreach ($results as $key => $value)
{
$table .= '<tr>
<td width="10%" align="left"><b>'.$value['fcollcode'].'</b></td>
<td width="70%" align="left"><b>'.$value['fcollname'].'</b></td>
<td width="20%" align="left"><b>'.$value['fmobile'].'</b></td>
</tr>';
}
$table .= '</tbody></table>';
}
else
{
$query = "select distinct fcollcode, concat(fcollname, ', ',ftown) as fcollname, fmobile,fthcntr from college where fcollcode = '{$cntr}'";
$results = $aobj_context->mobj_db->GetRow($query);
$table .= '<table style="margin-left:2px;text-align: left;width: 100%" border="1" cellpadding="10" cellspacing="0" >
<thead>
<tr style = "background-color:#8acc51">
<th align="center" colspan="3"><b>Examination Center</b></th>
</tr>
</thead>
<tbody>
<tr>
<td width="10%" align="left"><b>'.$results['fcollcode'].'</b></td>
<td width="70%" align="left"><b>'.$results['fcollname'].'</b></td>
<td width="20%" align="left"><b>'.$results['fmobile'].'</b></td>
</tr></tbody></table>';
}
// $table .="<br><span class='remodal-cancel' onclick='admcollegesum(\"".$flag."\")'>Continue</span>";
// $lobj_messages.push($table);
$messages[] = $table;
}
}
if($enable_flags['ffpgcntr'] == 'T')
{
$query = "select distinct fcollcode, concat(fcollname, ', ',ftown) as fcollname,
fmobile, ifnull(fpgthcntr,'F') as fpgthcntr from college where fcollcode = '{$_SESSION['FCOLLCODE']}'";
$results = $aobj_context->mobj_db->GetRow($query);
$cntr = $results['fpgthcntr'];
if($cntr != 'F')
{
$table = "";
$table .= '
<h2>PG Theory Center Details</h2>';
$flag = 'T';
if($results['fpgthcntr'] == $results['fcollcode'])
{
$flag = 'C';
$table .= '<table style="margin-left:2px;text-align: left;width: 100%" border="1" cellpadding="10" cellspacing="0" >
<thead>
<tr style = "background-color:#8acc51">
<th align="center" colspan="3"><b>Examination Center</b></th>
</tr>
</thead>
<tbody>
<tr>
<td width="10%" align="left"><b>'.$results['fcollcode'].'</b></td>
<td width="70%" align="left"><b>'.$results['fcollname'].'</b></td>
<td width="20%" align="left"><b>'.$results['fmobile'].'</b></td>
</tr></tbody></table>';
$query = "select distinct fcollcode, concat(fcollname, ', ',ftown) as fcollname,
fmobile,fpgthcntr from college
where fpgthcntr = '{$_SESSION['FCOLLCODE']}'
and fcollcode <> fpgthcntr";
$results = $aobj_context->mobj_db->GetAll($query);
$table .= '<br><br>
<table style="margin-left:2px;text-align: left;width: 100%" border="1" cellpadding="10" cellspacing="0" >
<thead>
<tr style = "background-color:#8acc51">
<th align="center" colspan="3"><b>Tagged Colleges</b></th>
</tr>
</thead><tbody>';
foreach ($results as $key => $value)
{
$table .= '<tr>
<td width="10%" align="left"><b>'.$value['fcollcode'].'</b></td>
<td width="70%" align="left"><b>'.$value['fcollname'].'</b></td>
<td width="20%" align="left"><b>'.$value['fmobile'].'</b></td>
</tr>';
}
$table .= '</tbody></table>';
}
else
{
$query = "select distinct fcollcode, concat(fcollname, ', ',ftown) as fcollname, fmobile,fpgthcntr from college where fcollcode = '{$cntr}'";
$results = $aobj_context->mobj_db->GetRow($query);
$table .= '<table style="margin-left:2px;text-align: left;width: 100%" border="1" cellpadding="10" cellspacing="0" >
<thead>
<tr style = "background-color:#8acc51">
<th align="center" colspan="3"><b>Examination Center</b></th>
</tr>
</thead>
<tbody>
<tr>
<td width="10%" align="left"><b>'.$results['fcollcode'].'</b></td>
<td width="70%" align="left"><b>'.$results['fcollname'].'</b></td>
<td width="20%" align="left"><b>'.$results['fmobile'].'</b></td>
</tr></tbody></table>';
}
$messages[] = $table;
}
// $table .="<br><span class='remodal-cancel' onclick='admcollegesum(\"".$flag."\")'>Continue</span>";
// $lobj_messages.push($table);
}
echo $aobj_context->mobj_output->ToJSONEnvelope($messages);
}
?>
|