<?
	#---------------------------------------------------------------------#
	# This source code is (c)2000 White Pajamas, Inc                      #
	# see http://www.stonekeep.com/license.html for licensing information #
	#---------------------------------------------------------------------#

	#----------------------------------------------------------------------
	# $Id: verutils.php3,v 1.2 2000/12/14 19:14:02 shevett Exp $
	#----------------------------------------------------------------------
	
	Function ChooseProduct($varname,$oldval) {
		Global $sys_selfont;
		?>

			<font size=<? echo $sys_selfont?>>
			<i>Product...</i><br>
				<select name="<? echo $varname?>">
				<option value="0">None.
				<?
					$q = db_query("select * from products");
					while ($row=db_fetch_array($q)) {
						$sel = ($row[prod_name] == $oldval) ? "selected" : "";
						echo "<option value=\"$row[prod_name]\" $sel> $row[prod_desc]\n";
					}
				?>
		
				</select>

		<?
	}

	Function ChooseModule($varname,$oldval) {
		Global $sys_selfont;
		?>

			<font size=<? echo $sys_selfont?>>
			<i>Module...</i><br>
				<select name="<? echo $varname?>">
				<option value="0">None.
				<?
					$q = db_query("select * from modules");
					while ($row=db_fetch_array($q)) {
						$sel = ($row[mod_name] == $oldval) ? "selected" : "";
						echo "<option value=\"$row[mod_name]\" $sel> $row[mod_desc]\n";
					}
				?>
		
				</select>

		<?
	}

	Function ChoosePlatform($varname,$oldval) {
		Global $sys_selfont;
		?>

			<font size=<? echo $sys_selfont?>>
			<i>Platform...</i><br>
				<select name="<? echo $varname?>">
				<option value="0">None.
				<?
					$q = db_query("select * from platforms");
					while ($row=db_fetch_array($q)) {
						$sel = ($row[plat_name] == $oldval) ? "selected" : "";
						echo "<option value=\"$row[plat_name]\" $sel> $row[plat_desc]\n";
					}
				?>
				</select>
		<?
	}

	Function ChooseVersion($varname,$oldval,$ptext) {
		Global $sys_selfont;
		?>
			<font size=<? echo $sys_selfont?>>
			<i><? echo $ptext ?>...</i><br>
				<select name="<? echo $varname ?>">
				<option value="0">None.
				<?
					$q = db_query("select * from versions");
					while ($row=db_fetch_array($q)) {
						$sel = ($row[ver_name] == $oldval) ? "selected" : "";
						echo "<option value=\"$row[ver_name]\" $sel> $row[ver_desc]\n";
					}
				?>
		
				</select>

		<?
	}

	Function ChooseRescode($varname,$oldval) {
		Global $sys_selfont;
		?>
			<font size=<? echo $sys_selfont?>>
			<i>Resolution...</i><br>
				<select name="<? echo $varname ?>">
				<option value="0">None.
				<?
					$q = db_query("select * from rescodes");
					while ($row=db_fetch_array($q)) {
						$sel = ($row[res_code] == $oldval) ? "selected" : "";
						echo "<option value=\"$row[res_code]\" $sel> $row[res_desc]\n";
					}
				?>
		
				</select>

		<?
	}


