| Current Path : /var/www/cesa.co.za/cesanet/ |
| Current File : /var/www/cesa.co.za/cesanet/templates.php |
<?php
include("inc_functions.php");
if (!isset($_SESSION["StudentID"]) || empty($_SESSION["StudentID"])) header("Location: /cesanet/login.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CESAnet</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
-->
</style></head>
<body class="twoColFixLtHdr">
<div id="container">
<?php include("inc_header.php"); ?>
<?php include("inc_sidebar.php"); ?>
<div id="mainContent">
<h1> Templates</h1>
<table border="0" cellspacing="0" cellpadding="5">
<tr><td><b>Assignment Reference</b></td><td><b>Template Name</b></td><td> </td></tr>
<?php
$sql = "SELECT * FROM CCETemplates ";
if (CurrentStudent()) {
$sql.=" WHERE Archived=0";
} else {
$sql.=" WHERE (Archived=0 OR ArchiveYear=".$_SESSION["StudentYear"].")";
}
$sql.=" ORDER BY RefNum, TemplateName";
$rec=mysql_query($sql);
$iNumCol=0;
while ($row=mysql_fetch_assoc($rec)) {
?>
<tr><td><?php echo $row["RefNum"]; ?></td><td><a href="/cceadmin/templates/<?php echo $row["TemplateFile"]; ?>" target="_blank"><?php echo $row["TemplateName"]; ?></a></td><td><a href="/cceadmin/templates/<?php echo $row["TemplateFile"]; ?>" target="_blank">Download Template</a></td></tr>
<?php
}
?>
</table>
<p> </p>
<p> </p>
</div>
<?php include("inc_footer.php"); ?>
</div>
</body>
</html>