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


// 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 teacher, news where teacher.teacher_id = $id ORDER BY news.news_id DESC LIMIT 0,1";
//$result2 = mysql_query($sql2);	
//$myrow2 = mysql_fetch_array($result2);

// 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);


<? 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'>
						  Contact Information:<br>
						   <legend class='fieldset'><?php echo $myrow["title"] ?> <?php echo $myrow["firstname"] ?> <?php echo $myrow["lastname"] ?></legend>
						   Phone Number:  <?php echo $myrow["phone"] ?><br>
						   E-Mail:  <a href="mailto:<?php echo $myrow["email"] ?>"><?php echo $myrow["email"] ?></a>

<? INCLUDE("includes/backend_bottom.php")?>
Return current item: PortalXP - Teacher Edition