| Current Path : /var/www/cesa.co.za/relay/include/reporting/ |
| Current File : /var/www/cesa.co.za/relay/include/reporting/final_report.php |
<?php
$bgcnt=1;
$link = mysql_connect('localhost','ssidhvcc_nova','qtN0L]o;rHiP');
if ($link) {
$db=mysql_select_db('ssidhvcc_ssisite');
if (!db) {
die("Could not select db - ".mysql_error());
}
}
$result = mysql_query("SELECT * FROM saace_teammembers ORDER BY team_id DESC");
echo "<table border='0' cellspacing='0' cellpadding='0'>
<tr><h1> Report </h1></tr>
<tr>
<th style='text-align:left;'>Name</th>
<th style='text-align:left;'>ID number</th>
<th style='text-align:left;'>Team ID</th>
</tr>";
while($row = mysql_fetch_array($result))
{
if ($row['name'] != NULL){
echo "<tr";
if ($bgcnt%2==0) {
echo " class='odd'";
} else {
echo " class='even'";
}
echo ">\n";
//echo "<td width='150px;'>" .$row['ID_num']. "</td>";
echo "<td>" . $row['name']."</td>";
echo "<td>" . $row['ID_num']."</td>";
echo "<td>" . $row['team_id']."</td>";
echo "</tr>";
$bgcnt++;
}
}
$bgcnt=1;
$link = mysql_connect('localhost','ssidhvcc_matthew','shareb');
if ($link) {
$db=mysql_select_db('ssidhvcc_ssisite');
if (!db) {
die("Could not select db - ".mysql_error());
}
}
$result = mysql_query("SELECT * FROM saace_team ORDER BY id DESC");
echo "<table border='0' cellspacing='0' cellpadding='0'>
<tr><h1> Report </h1></tr>
<tr>
<th style='text-align:left;'>Name</th>
<th style='text-align:left;'>ID number</th>
<th style='text-align:left;'>Team ID</th>
</tr>";
while($row = mysql_fetch_array($result))
{
if ($row['name'] != NULL){
echo "<tr";
if ($bgcnt%2==0) {
echo " class='odd'";
} else {
echo " class='even'";
}
echo ">\n";
echo "<td>" . $row['name']."</td>";
echo "<td>" . $row['comp_id']."</td>";
echo "<td>" . $row['id']."</td>";
echo "<td>" . $row['type']." "."</td>";
if ($row['type'] == "1") {
echo "<td> running team</td>";
} else
if ($row['type'] == "2") {
echo "<td> walking team</td>";
} else
if ($row['type'] == "3") {
echo "<td> cycling team</td>";
} else
if ($row['type'] == "4") {
echo "<td> tug of war</td>";
}
echo "<td>" ." ". $row['team_type']."</td>";
echo "</tr>";
$bgcnt++;
}
}
?>