Location: PHPKode > projects > Athena Research Assistant > athena-dev-0.1pre-alpha/includes/show_projects.inc.php
<?php
if ($checkUSER["ath_groups_ADMINISTRATE"] == 1){
	
	$GETprojects = mysql_query("SELECT * FROM ath_projects");
	
	if (!$GETprojects){
			echo("<p class=\"red\">GETprojects failed in view show_projects.inc.php");
			exit();
	}
	
}
else{
	
	$thisUSERgroupID = $_SESSION["userGROUPID"];
	
	$GETprojects = mysql_query("SELECT * FROM ath_projects WHERE ath_projects_groupID=$thisUSERgroupID");
	
	if (!$GETprojects){
			echo("<p class=\"red\">GETprojects failed in view show_projects.inc.php");
			exit();
	}
}

echo("<select name=\"WITHproject\">");

	while ($ROWGETprojects = mysql_fetch_array($GETprojects)){
		if ($ROWGETprojects["ath_projects_id"] == $_POST["WITHproject"]){
			echo("<option value=\"" . $ROWGETprojects["ath_projects_id"] . "\" selected>" . $ROWGETprojects["ath_projects_name"] . "</option>");
		}
		else{
			echo("<option value=\"" . $ROWGETprojects["ath_projects_id"] . "\">" . $ROWGETprojects["ath_projects_name"] . "</option>");
		}
	}
echo("</select>");
?>
Return current item: Athena Research Assistant