<?
global $db;
//if($_REQUEST['account_id'])$arr[]="(account_id='".$_REQUEST['account_id']."')";
//if($_REQUEST['exchange_rate_id'])$arr[]="exchange_rate_id like '".$_REQUEST['exchange_rate_id']."'";
//$where="where ".@implode(" and ",$arr);

  $z="select id,name from ecmdevices ".$where." order by name asc";
  //print $z;
  $result = $db->query($z);
  $pbs='<select id="pricebook_id" name="pricebook_id"><option value="">standard</option>';
  $i=0;
  $stop=0;
  while(($row=$db->fetchByAssoc($result))!=null)
  {
	  $pbs.='<option value="'.$row['id'].'"';
	  if($_GET['pricebook_id']==$row['id'] && $stop==0){
	  	$pbs.=' selected';
		$stop=1;
	  }
	  $pbs.='>'.$row['name'].'</option>';
	  $i++;
  }
  $pbs.='</select>';
  print $pbs;
?>
