Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: click and display ratings |
|
Author |
|
fifimtwana
Joined: 24 Feb 2011 Posts: 22
|
Posted: Wed 11 May '11 12:00 Post subject: click and display ratings |
|
|
Hey everyone
I'm not really sure how to do this, but I would like to display ratings of each document when the trainer clicks on the document link. here is the code I used
Code: |
Plant Placement Report (PLACEMENT DOCUMENTS)
</TD>
</tr>
</table>
<?PHP
$query90 = "select * from placementdoc where SID='$SID'";
$result90=mysql_query($query90);
$PNO=mysql_numrows($result90);
echo "<BR>";
?>
<table width="1000">
<?PHP
$PNOM = 0;
while($nt90=mysql_fetch_array($result90))
{
$PNOM++;
if($nt90[SIGN4_PM] <> "")
{
$R1 = $R1 + $nt90[S151_01];
$R2 = $R2 + $nt90[S151_02];
$R3 = $R3 + $nt90[S151_03];
$R4 = $R4 + $nt90[S151_04];
if($nt90[S151_05] == ">=97%")
{
$R50++;
}
if($nt90[S151_05] == "<97%")
{
$R51++;
}
if($nt90[S151_06] == ">=97%")
{
$R60++;
}
if($nt90[S151_06] == "<97%")
{
$R61++;
}
$RATINGS++;
}
$R1 = $RATINGS;
$R2 = $RATINGS;
$R3 = $RATINGS;
$R4 = $RATINGS;
?>
<TR>
<TD width=100> <font size="2" face="bmwtyperegular" color="#666666">
<?PHP echo $PNOM; ?>
</TD>
<TD width=100> <font size="2" face="bmwtyperegular" color="#666666">
<a href="indexp10_00placement.php?SID=<?PHP echo $SID?>" target=new> <font size="2" face="bmwtyperegular" color="#666666"> <?PHP echo $nt90[USID]; ?> </a>
</TD>
<td></td>
<TD width=100> <font size="2" face="bmwtyperegular" color="#666666">
<?PHP echo $nt90[SDATE]; ?>
</TD>
<TD width=100> <font size="2" face="bmwtyperegular" color="#666666">
<?PHP echo $nt90[EDATE]; ?>
</TD>
<td width="700">
</td>
</tr>
<?PHP
}
$R1W = $R1 * 100;
$R2W = $R2 * 100;
$R3W = $R3 * 100;
$R4W = $R4 * 100;
$R50W = $R50 * 500;
$R51W = $R51 * 500;
$R60W = $R60 * 500;
$R61W = $R61 * 500;
$R50 = $R50 * 100;
$R51 = $R51 * 100;
$R60 = $R60 * 100;
$R61 = $R61 * 100;
?>
</table>
<table border=0 width=1000>
<tr>
<td>
<HR NOSHADE size="1" color="#eeeeee">
</td>
</tr>
</table>
<img src="./images/scale2.jpg">
<table width="1000">
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
OVERALL APPRAISAL
</td>
<td width="<?php echo $R1W;?>" bgcolor="#000066"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R1;?>
</td>
</tr>
</TABLE>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
LEVEL OF COMPETANCE
</td>
<td width="<?php echo $R2W;?>" bgcolor="#0066CC"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R2;?>
</td>
</tr>
</TABLE>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
ATTITUDE
</td>
<td width="<?php echo $R3W;?>" bgcolor="#3399FF"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R3;?>
</td>
</tr>
</TABLE>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
INITIAVE
</td>
<td width="<?php echo $R4W;?>" bgcolor="#6666FF"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R4;?>
</td>
</tr>
</TABLE>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
ATTENDANCE    >= 97%
</td>
<td width="<?php echo $R50W;?>" bgcolor="#339933"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R50.' %';?>
</td>
</tr>
</TABLE>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
ATTENDANCE    <   97 %
</td>
<td width="<?php echo $R51W;?>" bgcolor="#990066"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R51.' %';?>
</td>
</tr>
</TABLE>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
PUNCTUALITY    >= 97%
</td>
<td width="<?php echo $R60W;?>" bgcolor="#669999"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R60.' %';?>
</td>
</tr>
</table>
<TABLE>
<tr height="20">
<TD width="200"> <font size="2" face="bmwtyperegular" color="#666666">
PUNCTUALITY    <   97 %
</td>
<td width="<?php echo $R61W;?>" bgcolor="#CC0066"> <font size="2" face="bmwtyperegular" color="#666666">
</td>
<td> <font size="1" face="bmwtyperegular" color="#666666">
<?PHP echo $R61.' %';?>
</td>
</tr>
</table>
|
|
|
Back to top |
|
reds88
Joined: 30 Jun 2011 Posts: 3
|
|
Back to top |
|
|
|
|
|
|