View site source code
index.php | header.inc | leftside.inc | rightside.inc | footer.inc | style.css | Account tools | Logout page | Email page | Create account | File upload | Schedule | View code | Forgot password | View homework | Project details | Monthly Poll Form Ajax files => Display uploads | Change password | Create account | Login code | New password | Send email | View comments | Display HW | Show grades | Display assigns | show_poll_results.php
Source code of view_comment_ajax.php
<?php
if( isset( $_POST['caller'] ) )
{
require_once( '../main_includes/.htpasswd' );
if( $_POST['caller'] == "comment" )
{
$comment_query = "select * from homework_comments where idnum=". mysql_real_escape_string( $_POST['comment_id'] );
$comment_result = mysql_query( $comment_query )
or die( 'Could not connect: '. mysql_error() );
$comment_row = mysql_fetch_row( $comment_result );
echo "<div style=\"border:1px #397D02 solid;color:#2E0854;margin:4px;padding:3px;background:#F0F3EF;\">";
echo "<b>Comment was made by Prof. Ganson on ". date( 'm/d/y h:i:sa', $comment_row[4] ) ."</b><br />";
echo nl2br( htmlentities( $comment_row[3] ) );
echo "</div>";
}
else
{
$id_assign_query = "select description from master_assigns where idnum=". mysql_real_escape_string( $_POST['assign'] );
$id_assign_result = mysql_query( $id_assign_query )
or die( 'Could not connect: '. mysql_error() );
$id_assign_row = mysql_fetch_row( $id_assign_result );
echo "<div style=\"border:1px #C70808 solid;color:#000000;margin:4px;padding:3px;background:#FFF0F0;\">";
echo "The due date for ". $id_assign_row[0] ." has passed.";
echo " You did not submit or, if requested, re-submit your work prior to the due date and time.";
echo "</div>";
}
}
?>

You must be logged in to view this content.
