Hello,
I have use the below code. Here the status should be 'Pending Request' where the $arr['ID'] which is equal to $teacherid.
Where and how can check the condition??
$studentid = getLoggedId();
$teacherid = $_COOKIE['id'];
$aRules = mysql_query("SELECT * FROM `RequestForTeacher` WHERE `TeacherID` = $teacherid");
$arr = mysql_fetch_array($aRules);
$adminstatus = $arr['AdminStatus'];
$teacherstatus = $arr['TeacherStatus'];
if($adminstatus=='' && $teacherstatus=='' )
{
$status = 'Invite';
}
elseif($adminstatus==1 && $teacherstatus==1)
{
$status = 'Confirmed';
}
elseif($adminstatus==0 && $teacherstatus==0 )
{
$status = 'Pending Request';
}
else {
$status = 'Pending ';
}
$res = db_res("SELECT * FROM `Profiles` WHERE `Status`='Active' and `Pid` = 0");
while($arr = mysql_fetch_array($res) ) {
$sEachThumb = $GLOBALS['oFunctions']->getMemberThumbnail($arr['ID']);
$aVars = array (
'photo' => $sEachThumb,
'id' => $arr['ID'],
'name' => $arr['NickName'],
'status' =>$status,
);
echo $this->_oTemplate->parseHtmlByName('main', $aVars);
}