Location: PHPKode > projects > Athena Research Assistant > athena-dev-0.1pre-alpha/objects/addresrcFORM.php
<?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 (addresrc.title.value == ""){
		window.alert("Field 'Title' cannot be left blank.");
		return false;
	}
}

	var url;
	var height;
	var width;
	var specs;
	function openwinHELP(url, width, height){
		specs = 'status,resizable,width=' + width + ',height=' + height + ',top=75,left=150'
		popupWin = window.open(url,'pop_tiny',specs);
	}
</script>

	<p class="step">Add a new resource: Step 2 of 2.<br>
	</p>
	<table width="450" border="0" cellspacing="0" cellpadding="1" bgcolor="#333333">
		<tr>
			<td class="cell_heading">ADD A NEW RESOURCE.</td>
		</tr>
		<tr>
			<td align="center">
				<form name="addresrc" action="main.php?act=addresrc" 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="150">ADD TO:</td>
							<td bgcolor="#f0e68c" width="300"><?php include("../includes/show_projects.inc.php"); ?></td>
						</tr>
						<tr>
						<td class="form_right" bgcolor="#f0e68c" width="150">Title:</td>
						<td bgcolor="#f0e68c" width="300"><input type="text" name="title" value='<?php echo($_POST["title"]); ?>' size="40" border="0"></td>
					</tr>
						<tr>
						<td class="form_right" bgcolor="#f0e68c" width="150">Author first name:</td>
						<td bgcolor="#f0e68c" width="300"><input type="text" name="authorfirst" value='<?php echo($_POST["authorfirst"]); ?>' size="40" maxlength="255" border="0"></td>
					</tr>
						<tr>
							<td class="form_right" valign="top" bgcolor="#f0e68c" width="150">Author Last Name:</td>
							<td bgcolor="#f0e68c" width="300"><input type="text" name="authorlast" value='<?php echo($_POST["authorlast"]); ?>' size="40" maxlength="255" border="0"></td>
						</tr>
						<tr>
						<td class="form_right" valign="top" bgcolor="#f0e68c" width="150">Format:</td>
						<td bgcolor="#f0e68c" width="300">
						
						<?php include("../includes/resource_formats_menu.inc.php"); php?>
						
						</td>
					</tr>
						<tr>
							<td class="form_right" bgcolor="#f0e68c" width="150">Category:</td>
							<td bgcolor="#f0e68c" width="300">
							<?php include("../includes/show_categories.inc.php"); ?>
							</td>
						</tr>
						<tr>
						<td class="form_right" bgcolor="#f0e68c" width="150">URL:</td>
						<td bgcolor="#f0e68c" width="300"><input type="text" name="url" value='<?php echo($_POST["url"]); ?>' size="40" maxlength="255" border="0"></td>
					</tr>
					<tr>
						<td class="form_right" bgcolor="#f0e68c" width="150">Year published</td>
						<td bgcolor="#f0e68c" width="300"><input type="text" name="year" value='<?php echo($_POST["year"]); ?>' size="40" maxlength="255" border="0"></td>
					</tr>
					<tr>
						<td class="form_right" bgcolor="#f0e68c" width="150">Lenght</td>
						<td bgcolor="#f0e68c" width="300"><input type="text" name="lenght" value='<?php echo($_POST["lenght"]); ?>' size="40" maxlength="255" border="0"></td>
					</tr>
						<tr>
							<td class="form_right" bgcolor="#f0e68c" width="150">Publisher</td>
							<td bgcolor="#f0e68c" width="300"><input type="text" name="publisher" value='<?php echo($_POST["publisher"]); ?>' size="40" maxlength="255" border="0"></td>
						</tr>
						
						<?php if ($checkUSER["ath_groups_addtoPUBLIC"] == 1): ?>
						<tr>
							<td class="form_right" valign="top" bgcolor="#e9967a" width="150">Add to Public Pool:</td>
							<td bgcolor="#e9967a" width="300"><select name="addtopublic" size="1">
									<option value="1">Yes</option>
									<option selected value="0">No</option>
								</select></td>
						</tr>
						<?php endif; ?>
						
						<tr>
							<td class="form_right" valign="top" bgcolor="#e9967a" width="150">Notes:</td>
							<td bgcolor="#e9967a" width="300"><textarea name="notes" rows="6" cols="40"><?php echo($_POST["notes"]); ?></textarea></td>
						</tr>
						<tr>
					<td class="form_right" bgcolor="#90ee90" width="150">&nbsp;<input type="hidden" name="ownerID" value="<?php echo($_SESSION["UID"]); ?>" border="0"><input type="hidden" name="ownerGROUPID" value='<?php echo($_SESSION["userGROUPID"]); ?>' border="0"><input type="hidden" name="addRESOURCE" value="add" border="0"></td>
					<td bgcolor="#90ee90" width="300"><input type="submit" name="addresource" value="Add Resource" border="0"></td>
				</tr>
			</table>
			</form>
			</td>
		</tr>
	</table>
Return current item: Athena Research Assistant