Location: PHPKode > projects > PortalXP - Teacher Edition > PortalXP/PortalXP/assignments.php


if ($assignment_id) {

// query the DB for School Name & District Name
$sql = "select * from teacher, school, district where teacher.teacher_id = $id and school.school_id = teacher.school_id and district.district_id = teacher.district_id";
$result = mysql_query($sql);	
$myrow = mysql_fetch_array($result);

// query the DB for Latest News Item
$sql2 = "select * from news where news.teacher_id = $id ORDER BY news.news_id";
$result2 = mysql_query($sql2);	

// query the DB for Class Schedule
$sql3 = "select * from periods where periods.teacher_id = $id ORDER BY periodorder";
$result3 = mysql_query($sql3);	

// query the DB for Links
$sql4 = "select * from links where links.teacher_id = $id ORDER BY links.links_id DESC LIMIT 0,5";
$result4 = mysql_query($sql4);

// query the DB for Theme Information
$sql5 = "SELECT topname, topaddress, toprow, classrow, linksrow, contentrow, bottomrow, sidemenu FROM teacher, theme WHERE teacher.teacher_id = $id and teacher.theme_id = theme.theme_id";
$result5 = mysql_query($sql5);	
$myrow5 = mysql_fetch_array($result5);

// query the DB for Assignment Information
$sql6 = "select * from assignments where assignments_id = $assignment_id";
$result6 = mysql_query($sql6);
$myrow6 = mysql_fetch_array($result6);

// query the DB for download file
$sql7 = "select * from downloads, assignments where assignments.assignments_id = $assignment_id and downloads.download_id = assignments.download_id";
$result7 = mysql_query($sql7);
$myrow7 = mysql_fetch_array($result7);


<? INCLUDE("portalxp.php")?>

    COLOR: #ff3333;
<? INCLUDE("includes/backend_top.php")?>

<!-- Content Area -->	

					  <table width='425px' BORDER="0" CELLSPACING="0" CELLPADDING="0">
					  	  <td bgcolor='<?php echo $myrow5["contentrow"] ?>'>
						  <div class='fontwhite'>
						  Assignment Details<br>
						  Assignment: <?php echo $myrow6["shortname"] ?><br>
						  Description: <?php echo $myrow6["description"] ?><br>
						  Points Possible: <?php echo $myrow6["points"] ?><br>
						  Due Date: <?php echo $myrow6["datedue"] ?><br>
						  Download: <a href="http://www.portalxp.org/uploads/<?php echo $myrow7["teacher_id"] ?>-<?php echo $myrow7["filename"] ?>"><?php echo $myrow7["filename"] ?></a><br>

<? INCLUDE("includes/backend_bottom.php")?>

} else {

// Display PortalXP front page

You have reached this page in error.  Please visit the front page for help.




Return current item: PortalXP - Teacher Edition