<?php 
$PageSecurity = 4;
include('includes/session.inc');
include('includes/DefineSuppTransClass.php');
//echo "Select locationname from locations where loccode ='".$_GET['site']."'";
$result=DB_query("Select locationname from locations where loccode ='".$_GET['site']."'",$db);
$myrow=DB_fetch_array($result);
$data1='';
$data2='';
$data1.="<input name='sitename' type='text' id='sitename'  value='".$myrow['locationname']."' size='20' readonly='true'/><input type='hidden' name='hidden_site' id='hidden_site' value='".$_GET['site']."'/>";
$data2.="<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
      $data2.="<tr>";
		$data2.="<td>";	
		 $sql_store = "select id, StoreCode, StoreName from storetype where Store_Site='".$_GET['site']."'";
		$resultStkLocs = DB_query($sql_store,$db);
		
		$data2.="<select id='to_storecode' name='to_storecode'  style='width:100%'>";
		$data2.="<option value='000'>Select</option>"; 
		
		while ($myrow=DB_fetch_array($resultStkLocs))
		{
				$p='';
				if($storecode==$myrow['id'])
				$p="selected";
		
		$data2.="<option Value=".$myrow['id']." ".$p." >".$myrow['StoreName']."</option>";
		 }
		
		$data2.="</select>		</td>";
        //$data2.="<td><div id='txtid'><input type='text' name='storename' id='storename' size='20' readonly='true' value='".$storename."'></div></td>";
      $data2.="</tr></table>";
 echo  $data=$data1."__".$data2;    