Current File : /home/inlingua/public_html/icentex/viewcertificate_bck.php |
<?php
include("header.php");
$currentdate=date('Y-m-d');
?>
<script>
function showdiv(certificate)
{
if(document.getElementById(certificate).style.display=="none")
{
document.getElementById(certificate).style.display="block";
//document.getElementById("tblid").style.display="none";
}
else
{
document.getElementById(certificate).style.display="none";
//document.getElementById("tblid").style.display="block";
}
}
function hidediv(certificate)
{
document.getElementById(certificate).style.display="none";
}
</script>
<table id="tblid" style="z-index:-1;">
<tr><td ><h3>Choose EOC report type:</h3></td></tr>
<tr><td ><a href='javascript:showdiv("showcourse")'><b>English (1A, 1B, 1B+,E1S2, E1S2+)</b></a></td></tr>
<tr><td><a href='javascript:showdiv("showcourse1")'><b>English (2A, 2A+, 2B ,2B+, E2-S2 ,E2-S2+, E2-S1 ,E2-S1+)</b></a></td></tr>
<tr><td><a href='javascript:showdiv("showcourse2")'><b>English (3A, 3B, E3-S1, E3-S2)</b></a></td></tr>
<tr><td><a href='javascript:showdiv("showcourse3")'><b>English (4)</b></a></td></tr>
<tr><td><a href='javascript:showdiv("showcourse4")'><b>English (5)</b></a></td></tr>
<tr><td><a href='javascript:showdiv("showcourse5")'><b>English/Hindi(Private)</b></a></td></tr>
<tr><td>French</td></tr>
<tr><td>German</td></tr>
<tr><td>Spanish</td></tr>
</table>
<div id='showcourse' style="display:none; z-index:99;border:#FEBF01 solid 1px; width:700px; height:200px; overflow:auto; background-color:#FED354; margin-top:-110px; position:relative;" >
<div style='width:100%; float:right;'>
<div style='width:40%; text-align:right; float:right; '><a href='javascript:showdiv("showcourse")'><img src="images/close.gif" /></a></div>
<div style='width:60%; text-align:right; float:right;'><b>English (1A, 1B, 1B+,E1S2, E1S2+) Course ID</b></div>
</div>
<?php
$c_div="";
$e_div="";
$dateafter3months=mktime(0,0,0,date("m")-3,date("d"),date("Y"));
$dateafter3months1=date("Y-m-d",$dateafter3months);
$query="select DISTINCT courseId,startDate,endDate from level_1 where createdBy='".$_SESSION[id]."' && createDate>='".$dateafter3months1."' ";
$result=mysqli_query($conn,$query);
while($num=mysqli_fetch_array($result))
{
if($num[endDate]>$currentdate)
{
$c_div .="<div style='width:33%; margin:5px; float:left'><a href='level_1.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
else
{
$e_div .="<div style='width:33%; margin:5px; float:left'><a href='level_1.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
}
if($c_div!="")
{
echo"<div style='border-bottom:#cccccc dashed 1px;float:left;width:100%'> Current Courses<br>";
echo $c_div;
echo"</div>";
}
if($e_div!="")
{
echo"<div style='border-top:#cccccc dashed 1px;float:left; width:100%'> Finished Courses<br>";
echo $e_div;
echo"</div>";
}
?>
</div>
<div id='showcourse1' style="display:none; z-index:99;border:#FEBF01 solid 1px; height:200px; overflow:auto; width:700px; background-color:#FED354; margin-top:-110px; position:relative;" >
<div style='width:100%; float:right;'>
<div style='width:40%; text-align:right; float:right; '><a href='javascript:showdiv("showcourse1")'><img src="images/close.gif" /></a></div>
<div style='width:60%; text-align:right; float:right;'><b>English (2A, 2A+, 2B, 2B+, E2-S2 ,E2-S2+,E2-S1,E2-S1+) Course ID</b></div>
</div>
<?php
$c_div="";
$e_div="";
$query="select DISTINCT courseId,startDate,endDate from level_2 where createdBy='".$_SESSION['id']."' and createDate>='".$dateafter3months1."'";
$result=mysqli_query($conn,$query);
//echo "TOTTT--->".$tot=mysqli_fetch_array($result);
while($num=mysqli_fetch_array($result))
{
if($num['endDate']>$currentdate)
{
$c_div .="<div style='width:33%; margin:5px; float:left'><a href='level_2.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
else
{
$e_div .="<div style='width:33%; margin:5px; float:left'><a href='level_2.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
}
if($c_div!="")
{
echo"<div style='border-bottom:#cccccc dashed 1px;float:left;width:100%'> Current Courses<br>";
echo $c_div;
echo"</div>";
}
if($e_div!="")
{
echo"<div style='border-top:#cccccc dashed 1px;float:left; width:100%'> Finished Courses<br>";
echo $e_div;
echo"</div>";
}
?>
<br><br><br><br><br><br>
</div>
<div id='showcourse2' style="display:none; z-index:99;border:#FEBF01 solid 1px; height:200px; overflow:auto; width:700px; background-color:#FED354; margin-top:-110px; position:relative;" >
<div style='width:100%; float:right;'>
<div style='width:40%; text-align:right; float:right; '><a href='javascript:showdiv("showcourse2")'><img src="images/close.gif" /></a></div>
<div style='width:60%; text-align:right; float:right;'><b>English (3A, 3B, E3-S1, E3-S2) Course ID</b></div>
</div>
<?php
$c_div="";
$e_div="";
//&& createDate>='".$dateafter3months1."'
$query="select DISTINCT courseId,startDate,endDate from level_3 where createdBy='".$_SESSION[id]."' ";
$result=mysqli_query($conn,$query);
while($num=mysqli_fetch_array($result))
{
if($num[endDate]>$currentdate)
{
$c_div .="<div style='width:33%; margin:5px; float:left'><a href='level_3.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
else
{
$e_div .="<div style='width:33%; margin:5px; float:left'><a href='level_3.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
}
if($c_div!="")
{
echo"<div style='border-bottom:#cccccc dashed 1px;float:left; width:100%'> Current Courses<br>";
echo $c_div;
echo"</div>";
}
if($e_div!="")
{
echo"<div style='border-top:#cccccc dashed 1px;float:left; width:100%'> Finished Courses<br>";
echo $e_div;
echo"</div>";
}?>
<br><br><br><br><br><br>
</div>
<div id='showcourse3' style="display:none; z-index:99;border:#FEBF01 solid 1px; height:200px; overflow:auto; width:700px; background-color:#FED354; margin-top:-110px; position:relative;" >
<div style='width:100%; float:right;'>
<div style='width:40%; text-align:right; float:right; '><a href='javascript:showdiv("showcourse3")'><img src="images/close.gif" /></a></div>
<div style='width:60%; text-align:right; float:right;'><b>English (4) Course ID</b></div>
</div>
<?php
$c_div="";
$e_div="";
$query="select DISTINCT courseId,startDate,endDate from level_4 where createdBy='".$_SESSION[id]."' && createDate>='".$dateafter3months1."' ";
$result=mysqli_query($conn,$query);
while($num=mysqli_fetch_array($result))
{
if($num[endDate]>$currentdate)
{
$c_div .="<div style='width:33%; margin:5px; float:left'><a href='level_4.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
else
{
$e_div .="<div style='width:33%; margin:5px; float:left'><a href='level_4.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
}
if($c_div!="")
{
echo"<div style='border-bottom:#cccccc dashed 1px;float:left;width:100%'> Current Courses<br>";
echo $c_div;
echo"</div>";
}
if($e_div!="")
{
echo"<div style='border-top:#cccccc dashed 1px;float:left; width:100%'> Finished Courses<br>";
echo $e_div;
echo"</div>";
}
?>
<br><br><br><br><br><br>
</div>
<div id='showcourse4' style="display:none; z-index:99;border:#FEBF01 solid 1px; height:200px; overflow:auto; width:700px; background-color:#FED354; margin-top:-110px; position:relative;" >
<div style='width:100%; float:right;'>
<div style='width:40%; text-align:right; float:right; '><a href='javascript:showdiv("showcourse4")'><img src="images/close.gif" /></a></div>
<div style='width:60%; text-align:right; float:right;'><b>English (5) Course ID</b></div>
</div>
<?php
$c_div="";
$e_div="";
$query="select DISTINCT courseId,startDate,endDate from level_5 where createdBy='".$_SESSION[id]."' && createDate>='".$dateafter3months1."' ";
$result=mysqli_query($conn,$query);
while($num=mysqli_fetch_array($result))
{
if($num[endDate]>$currentdate)
{
$c_div .="<div style='width:33%; margin:5px; float:left'><a href='level_5.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
else
{
$e_div .="<div style='width:33%; margin:5px; float:left'><a href='level_5.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[startDate].' to '.$num[endDate].") </a></div>";
}
}
if($c_div!="")
{
echo"<div style='border-bottom:#cccccc dashed 1px;float:left;width:100%'> Current Courses<br>";
echo $c_div;
echo"</div>";
}
if($e_div!="")
{
echo"<div style='border-top:#cccccc dashed 1px;float:left; width:100%'> Finished Courses<br>";
echo $e_div;
echo"</div>";
}
?>
<br><br><br><br><br><br>
</div>
<div id='showcourse5' style="display:none; z-index:99;border:#FEBF01 solid 1px; height:200px; overflow:auto; width:700px; background-color:#FED354; margin-top:-110px; position:relative;" >
<div style='width:100%; float:right;'>
<div style='width:40%; text-align:right; float:right; '><a href='javascript:showdiv("showcourse5")'><img src="images/close.gif" /></a></div>
<div style='width:60%; text-align:right; float:right;'><b>English/Hindi (Private) Course ID</b></div>
</div>
<?php
$c_div="";
$e_div="";
$query="select a.*,b.startdate as sDate,b.enddate as eDate from level_private a left join ingl_course b on a.courseId=b.courseid where a.createdBy='".$_SESSION[id]."' && a.createDate>='".$dateafter3months1."' group by a.courseId";
$result=mysqli_query($conn,$query);
while($num=mysqli_fetch_array($result))
{
if($num[sDate]>$currentdate)
{
$c_div .="<div style='width:33%; margin:5px; float:left'><a href='level_Private.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[sDate].' to '.$num[eDate].") </a></div>";
}
else
{
$e_div .="<div style='width:33%; margin:5px; float:left'><a href='level_Private.select.php?courseId=".$num[courseId]."'><b>".$num[courseId]."</b> (".$num[sDate].' to '.$num[eDate].") </a></div>";
}
}
if($c_div!="")
{
echo"<div style='border-bottom:#cccccc dashed 1px;float:left;width:100%'> Current Courses<br>";
echo $c_div;
echo"</div>";
}
if($e_div!="")
{
echo"<div style='border-top:#cccccc dashed 1px;float:left; width:100%'> Finished Courses<br>";
echo $e_div;
echo"</div>";
}
?>
<br><br><br><br><br><br>
</div>
<?php
include("footer-certificate.php");
?>