Esempio n. 1
0
				<!--
				<label for="description">Description : </label>
								<textarea name="description" id="description"><?php 
echo $product["Description"];
?>
</textarea>
								<br />-->
				
				<!--
				<input name="role" id="role" type="text"
								tabindex="2" />-->				
				
				<label for="type">Type : </label>	
				<select name="type" id="type">
				<?php 
$roles = ProductController::GetProductTypes();
for ($i = 0; $i < count($roles); $i++) {
    if ($roles[$i]['ID'] == $product["Type"]) {
        //select first option
        echo "<option  selected='selected' value='" . $roles[$i]["ID"] . "'>" . $roles[$i]["Type"] . "</option>";
    } else {
        echo "<option  value='" . $roles[$i]["ID"] . "'>" . $roles[$i]["Type"] . "</option>";
    }
}
?>
				</select>		
				<br />
				<label for="sub_type">Sub_Type : </label>	
				<select name="sub_type" id="sub_type">
					<?php 
$roles = ProductController::GetProductSubTypes();
Esempio n. 2
0
	<script type="text/javascript">
		function doFilter(type) {
			window.location='product-list.php?type=' + type;
		}
	</script>
			<?php 
$typeList = ProductController::GetProductTypes();
$selectedSubtype = 0;
if (!$_GET['type'] == '0') {
    $selectedSubtype = $_GET['type'];
}
if (isset($product_detail)) {
    $selectedSubtype = $product_detail['Type'];
}
function isSelected($selectedType1, $type1)
{
    if ($selectedType1 == $type1) {
        echo 'selected';
    } else {
        echo '';
    }
}
?>
			<div class="left-menu">
				<div class="category-label"><div>Category</div></div>
				<div class="sub-menu">
				<?php 
foreach ($typeList as $type) {
    ?>
					<div  class="<?php 
    isSelected($selectedSubtype, $type["ID"]);