<?php

 
require_once('config.php');
//require_login();

$context = context_system::instance();
$PAGE->set_context($context);
$PAGE->set_pagelayout('standard');
$PAGE->set_title("Contact Us");
$PAGE->set_heading("Contact Us");
$PAGE->set_url($CFG->wwwroot . '/contactus.php');
echo $OUTPUT->header();

// Actual content goes here

echo "<div id='prints'>";
     global $CFG, $USER;

?>
<form name="contactform" method="post" action="contactsent.php" ><p align="center" style="font-size:30px"><b>Got a question or concern?</b></p> <br/>
 <br/>
<table width="100%">
 
<tr>
 
 <td valign="top">
 
  <label for="Name">Name*</label>
 
 </td>
 
 
 
 <td valign="top">
 <?php
 	if (isloggedin() && (!isguestuser($USER))) {
        echo fullname($USER); ?>
 		<input hidden name="name" value="<?php echo fullname($USER); ?>" />
 <?php }else{ ?>
	 	<input type="text" name="name" value="" required="required" size="30" />
 <?php } ?>
 
  
 </td>
 
 <td rowspan="4"> </td>
 
</tr>
 
 
<tr>
 
 <td valign="top">
 
  <label for="email">Email Address*</label>
  
 </td>
 
 <td valign="top">
 <?php
 	if (isloggedin() && (!isguestuser($USER))) {
        echo $USER->email; ?>
  <input hidden name="email" value="<?php echo $USER->email; ?>" />
 <?php }else{ ?>
	 	<input type="text" name="email" value="" required="required" size="30" />
 <?php } ?>
  
 </td>
 
</tr>
 
<tr>
 
 <td valign="top">
 
  <label for="subject">Subject*</label>
 
 </td>
 
 <td valign="top">
 
  <input required="required"  type="text" name="subject" maxlength="30" size="30">
 
 </td>
 
</tr>
 
<tr>
 
 <td valign="top">
 
  <label for="comments">Message *</label>
 
 </td>
 
 <td valign="top">
 
  <textarea required="required" name="message" maxlength="1000" cols="50" rows="6"></textarea>
 
 </td>
 
</tr>
 
<tr>
 
 <td colspan="2" style="text-align:center">
 
  <input type="submit" value="Submit">   
 
 </td>
 
</tr>
 
</table>
 
</form>
	 
<?php
    echo "</div>";


echo $OUTPUT->footer();



?>