<?php
include('../includes/checkSession.php');
$id = $_SESSION['id'];
$WBSIDG=$_GET["q"];
$WID = $_GET["p"];
$parent = $_REQUEST["parent"];
include('../includes/con2db.php');	

	  $result = mysql_query("SELECT * FROM globalwbs where gwbslist_id = '$WID' && companyID = '$id' ORDER BY WBSIDA ASC,WBSIDA ASC,WBSIDB ASC,WBSIDC ASC,WBSIDD ASC,WBSIDE ASC");
	  $count =0;
		
   		while($row = mysql_fetch_array($result , MYSQL_ASSOC))
  		{
			$WBSID = $row["WBSID"];
			
			if($WBSIDG==$WBSID){
					echo "<option selected='selected' value='$WBSID'>".$row["WBSIDA"].".".$row["WBSIDB"].".".$row["WBSIDC"].".".$row["WBSIDD"].".".$row["WBSIDE"]." - ".$row["description"]."</option>";
			}
			else
			{
					echo "<option value='$WBSID'>".$row["WBSIDA"].".".$row["WBSIDB"].".".$row["WBSIDC"].".".$row["WBSIDD"].".".$row["WBSIDE"]." - ".$row["description"]."</option>";
				}
		}			

?>