<?php
$getGROUPS = mysql_query("SELECT * FROM ath_groups"); //GET GROUPS
if (!$getGROUPS){
echo("<p class=\"red\">adduserFORM.php COULD NOT GET GROUP INFO");
}
?>
<script language="JavaScript">
function check(){
if (adduser.username.value == ""){
window.alert("Username field cannot be left blank.");
return false;
}
if (adduser.password.value != adduser.password_confirm.value){
window.alert("Please make sure that Passwword and Password Confirmation are typed Correctly.");
return false;
}
if (adduser.password.value == ""){
window.alert("Password field cannot be left blank.");
return false;
}
}
</script>
<body><table border="0" cellspacing="0" cellpadding="1" bgcolor="#333333">
<tr>
<td class="cell_heading">ADD A NEW PROJECT</td>
</tr>
<tr>
<td>
<form name="adduser" action="main.php?act=addproject" method="post" onSubmit="return check(this)">
<table width="450" border="0" cellspacing="0" cellpadding="2" bgcolor="white">
<tr>
<td class="form_right" bgcolor="#f0e68c" width="200">Project Name:</td>
<td bgcolor="#f0e68c" width="150"><input type="text" name="projectname" value='<?php echo($_POST["projectname"]); ?>' size="40" border="0"></td>
</tr>
<tr>
<td class="form_right" bgcolor="#f0e68c" width="200">Short Description (255 chars. max)</td>
<td bgcolor="#f0e68c" width="150"><input type="text" name="shortdescription" value='<?php echo($_POST["shortdescription"]); ?>' size="40" maxlength="255" border="0"></td>
</tr>
<tr>
<td class="form_right" bgcolor="#f0e68c" width="200">Category:</td>
<td bgcolor="#f0e68c" width="150"><?php include("../includes/show_categories.inc.php"); ?></td>
</tr>
<tr>
<td class="form_right" bgcolor="#e9967a" width="200">Keywords:</td>
<td bgcolor="#e9967a" width="150"><input type="text" name="keywords" value='<?php echo($_POST["keywords"]); ?>' size="40" border="0"></td>
</tr>
<tr>
<td class="form_right" valign="top" bgcolor="#e9967a" width="200">Project details:</td>
<td bgcolor="#e9967a" width="150"><textarea name="details" rows="8" cols="40"><?php echo($_POST["details"]); ?></textarea></td>
</tr>
<tr>
<td class="form_right" bgcolor="#90ee90" width="200"> <input type="hidden" name="contributorID" value='<?php echo($_SESSION["UID"]); ?>' border="0"><input type="hidden" name="groupID" value='<?php echo($_SESSION["userGROUPID"]); ?>' border="0"></td>
<td bgcolor="#90ee90" width="150"><input type="submit" name="addproject" value="Add Project" border="0"></td>
</tr>
</table>
</form>
</td>
</tr>
</table></body>