All pastes #447955 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-19 12:10 UTC
rendered paste body
$PId = $_REQUEST["Id"];
      echo "<!-- Content start -->";
      echo "<div id='H2'>Product</div>";
      $Array = SqlFetch("select * from product where product.Id = $PId");
      for ($i = 0; $i < sizeof($Array); $i++)
      {
        extract($Array[$i]);
      }
      echo "<form name='create' action=". $_SERVER['PHP_SELF'] ." method='post' onSubmit='return formValidationProduct(this);'>";
      $Array = SqlFetch("select ServicePack, ReleaseId from servicepack where servicepack.Id = $ServicePackId");
      for ($i = 0; $i < sizeof($Array); $i++)
      {
        extract($Array[$i]);
      }
      $Array = SqlFetch("select `Release` from releases where releases.`Id` = $ReleaseId");
      for ($i = 0; $i < sizeof($Array); $i++)
      {
        extract($Array[$i]);
      }
      $Array = SqlFetch("SELECT productinfo.`Name` FROM productinfo where productinfo.Id = $Product");
      for ($i = 0; $i < sizeof($Array); $i++)
      {
        extract($Array[$i]);
      }
      echo "<table class='formtable'><tr><td colspan='2'>";
      echo "<font> \\ $Release \\ $ServicePack \\ $Name - $RState</font>";
      echo "</td></tr><tr><td width='130px'>";
      echo "Name:";
      echo "</td><td>";
      echo"<select name='Product' class='input'>";
      $q = SqlFetch("SELECT `Id`, `Name` FROM productinfo");
      for ($i = 0; $i < sizeof($q); $i++)
      {
        extract($q[$i]);
        $selected = ($Id == $Product)? "SELECTED":"";
        echo"<option value=\"".$Id."\"". $selected." >".$Name."</option>";
      }
      echo"</select><br>";
      echo "<input type='hidden' id='Id' name='Id' value=".$PId." class='input'>";
      echo "</td></tr>";
	  
	  
	  
	  
	  echo "<tr><td>";
	  echo "<div id='AT'>";
	  
      echo "AutoTest:";
      echo "</td><td>";
      
	  // we need somekind of dynamic checking of the checkbox.
	  
	  $checked = ($AutoTest == 1)? "CHECKED":"";
	  
      echo "<input type='checkbox' name='AutoTest' value='1' ".$checked." onclick='checkBoxClicked()'>";
	  
	  
	  
	  
	  
	  
	  echo "</div>";
	  echo "</td></tr>";