Location: PHPKode > projects > PortalXP - Teacher Edition > PortalXP/PortalXP/index.php
<?php

require('admin/config.php');
require('admin/connect.php');
include('admin/outputlib.php');

if (isset($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 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);

?>

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

<META NAME="author" CONTENT="Da Who Software">
<META NAME="keywords" CONTENT="free web pages, sites for teachers, portalxp.org, online hosting, web sites for teachers"> 
<META NAME="description" CONTENT="PortalXP.org is an free, non-profit online web hosting for teachers."> 

<STYLE>
A:hover
{
    COLOR: #ff3333;
    TEXT-DECORATION: none
}
</STYLE>
</HEAD>

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

<!-- Content Area -->	
	
					  <table width='425px' BORDER="0" CELLSPACING="0" CELLPADDING="0">
					  <tr>
					  	  <td bgcolor='<?php echo $myrow5["contentrow"] ?>'>
						  <div class='fontwhite'>
						  News Section - Latest News<br>
						  </div>
						  </td>
					  </tr>
					  <tr>	  
						  <td>
						  <fieldset>
						  <legend class="fieldset">
						  <?php print_output($myrow2["subject"]) ?>
						  </legend>
						  <?php print_output($myrow2["message"]) ?>
						  </fieldset>
						  </td>
					  </tr>
					  </table>
	
<? INCLUDE("includes/backend_bottom.php")?>
<?php

} else {

  // Display PortalXP front page

$result5 = mysql_query("select * from teacher ORDER BY lastname, firstname",$db);

?>

<HEAD>
<title>PortalXP.org - Free web hosting for teachers</title>

<link REL="stylesheet" TYPE="text/css" HREF="portalxp.css">

<META NAME="author" CONTENT="Da Who Software">
<META NAME="keywords" CONTENT="free web pages, sites for teachers, portalxp.org, online hosting, web sites for teachers"> 
<META NAME="description" CONTENT="PortalXP.org is an free, non-profit online web hosting for teachers."> 

<STYLE>
A:hover
{
    COLOR: #ff3333;
    TEXT-DECORATION: none
}
</STYLE>
</HEAD>

<div class='topname'>
PortalXP
</div>

<div class='topaddress'>
Linking teachers and students on the web
</div>

<div class='spacer'>
<img src="images/spacer.gif">
</div>

<div style="POSITION: absolute; TOP: 50px; LEFT: 0px; Z-INDEX: 25; WIDTH: 700px">
<table width='700px' BORDER="0" CELLSPACING="0" CELLPADDING="0">
<tr>
	<td colspan=4 bgcolor='#349601'>
	&nbsp;
	</td>
</tr>
<tr>
	<td width='150px' bgcolor='#85BA69' valign='top'>
	<div class='sidelink'>
	<hr>
	Why PortalXP?
	<hr>
	<a href="overview.php">Overview</a>
	<hr>
	Benefits
	<hr>
	Demo Teacher
	<hr>
	<a href="contactxp.php">Contact Us</a>
	<hr>
	<a href="signup.php">Sign-up</a>
	<hr>
	<a href="support.php">Tech Support</a>
	<hr>
	<a href="index.php">Home</a>
	<hr>
	</div>
	</td>
	<td colspan='2' width='350px' valign='top'>
	<p>&nbsp;
	<p>
	&nbsp;&nbsp;As a teacher the demands of each day continue 
	&nbsp;&nbsp;to build.  It is becoming increasing difficult with 
	&nbsp;&nbsp;state regulations, mandatory testing and new 
	&nbsp;&nbsp;intervention.  PortalXP helps you fill a gap in your 
	&nbsp;&nbsp;day.  Imagine being able to quickly communicate 
	&nbsp;&nbsp;with students and parents with only one click of 
	&nbsp;&nbsp;the mouse.  PortalXP allows you to do this, by 
	&nbsp;&nbsp;allowing you to create a professional webpage in 
	&nbsp;&nbsp;minutes, and best of all, its free.
	
	</td>
	<td width='250px' valign='top' background="images/table-background.gif">
	<br>
	<font color='red'>
	<img src="images/sign-up.gif">
	<form method='post' action='signup.php'>
	&nbsp;Enter E-Mail:  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="text" name="email"><br>
	&nbsp;<input type='hidden' name='submit' value='Sign-up'>
	&nbsp;<input type='Submit' name='submit' value='Sign-up'>
	</form>

	<img src="images/table-header.gif">
	<form method='post' action='admin/index.php'>
	<!--&nbsp;Select Name:  &nbsp;&nbsp;&nbsp;&nbsp;<select name="menu1">
	<option value='noname'>Select Name</option>
	<?php
	while ($myrow = mysql_fetch_array($result5)) {
	printf("<option value='%s'>%s, %s</option>\n", $myrow["teacher_id"], $myrow["lastname"], $myrow["firstname"]);
	}
	?>
	</select>-->
	&nbsp;Enter E-Mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="text" name="email">
	<br>
	&nbsp;Enter Password:  <input type="password" id="text" name="teacherpass">
	&nbsp;<input type='hidden' name='submit' value='Select Name'>
	<input type='Submit' name='submit' value='Select Name'>
	</form>
	</font>
	</td>
</tr>
<tr>
	<td colspan=4 bgcolor='#349601'>
	&nbsp;
	</td>
</tr>
<tr>
	<td colspan=4>
	<center>
	©2002 Da Who Software - PortalXP Version <?php echo $versionnumber ?>
	</center>
	</td>
</tr>
</table>
</div>

<?php

}

?>

Return current item: PortalXP - Teacher Edition