<?php
$var = "";
if(isset($_REQUEST['Check']))
{
	session_name("AdminSession");
	session_start();
	
	if (isset($_SESSION['loggedin']) && ($_SESSION['loggedin']==true))
	{
		$id = 0;
		$var = "&Check=1";
	}
	else
	header("location: ../Admin/index.php?msg=YOU ARE NOT LOGGED IN");

}
else
{
	include('../includes/checkSession.php');
	$id = $_SESSION['id'];
	$var = "";
}

include('../includes/con2db.php');	


$WID = $_REQUEST['WID'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include('../includes/headin.php');?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DCanywhere - Document Control/ Archiving System</title>
<style type="text/css">
.a1 {
	font-size: 10px;
	font-family: Verdana, Geneva, sans-serif;
	font-weight: normal;
	font-style: normal;
}
.a2 {
	font-weight: bold;
	font-family: Verdana, Geneva, sans-serif;
	text-transform: uppercase;
	font-size: 10px;
	color: #930;
}
.a3 {
	font-size: 10px;
	font-weight: normal;
	color: #900;
	font-style: normal;
	text-transform: uppercase;
	font-family: Verdana, Geneva, sans-serif;
	font-variant: normal;
}
.a31 {
	font-size: 10px;
	font-weight: normal;
	color: #900;
	font-style: normal;
	font-family: Verdana, Geneva, sans-serif;
	font-variant: normal;
}
.a4 {
	font-size: 10px;
	font-weight: bold;
	font-style: normal;
	font-family: Verdana, Geneva, sans-serif;
}
.a5 {
	font-size: 11px;
	font-weight: normal;
	color: #900;
	font-style: normal;
	font-family: Verdana, Geneva, sans-serif;
	font-variant: normal;
}
.a6 {
	font-size: 12px;
	font-weight: normal;
	color: #900;
	font-style: normal;
	font-family: Verdana, Geneva, sans-serif;
	font-variant: normal;
}
.a7 {
	font-size: 12px;
	font-weight: bold;
	color: #900;
	font-style: normal;
	font-family: Verdana, Geneva, sans-serif;
	font-variant: normal;
}
.a8 {
	font-size: 10px;
	font-weight: italic;
	font-style: italic;
	font-family: Verdana, Geneva, sans-serif;
	font-variant: normal;
}

.aa1 {
	font-size: 16px;
	font-weight: bolder;
	color: #900;
}
table {
 border: none;
 border-collapse: collapse;
}

td { border-bottom: 1px dotted grey;
 margin:0;
 padding: 1px;
}

tr {
 margin:0;
 padding:0;
}

.style7 {font-size: x-small; color: #333333;}
.a21 {	font-weight: bold;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #930;
}
.a21 {	font-weight: bold;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #930;
}
.a11 {	font-size: 10px;
	font-family: Verdana, Geneva, sans-serif;
	text-transform: uppercase;
	font-weight: normal;
	font-style: normal;
}
.a12 {	font-size: 10px;
	font-family: Verdana, Geneva, sans-serif;
	font-weight: normal;
	font-style: normal;
}
.a12 {	font-size: 10px;
	font-family: Verdana, Geneva, sans-serif;
	font-weight: normal;
	font-style: normal;
}
</style>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="../popupjquery/general.css" type="text/css" media="screen" />
<script src="../cookiejs/jquery.cookie.js" type="text/javascript"></script>
<script src="../cookiejs/jquery.session.js" type="text/javascript"></script>
<script src="../popupjquery/popup.js" type="text/javascript"></script>
<script src="../popupjquery/WBSEditpopup.js" type="text/javascript"></script>
<script src="../popupjquery/ITEMEditpopup.js" type="text/javascript"></script>
<script src="../popupjquery/ITEMIpopup.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=Roboto:300|Ubuntu:500' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../Accordi/styles/demo.css" />
        <link href="../Accordi/styles/font-awesome.min.css" rel="stylesheet">
        <link href="../Accordi/styles/animate.css" rel="stylesheet">
        <link href="../Accordi/styles/styles.css" rel="stylesheet">
        
        

<script type="text/javascript">
function LoadItemList(str,str2)
{
if (str=="")
  {
  document.getElementById("itemList").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("itemList").style.display='';
		document.getElementById("itemList").innerHTML=xmlhttp1.responseText;	
	}
  }
  
xmlhttp1.open("GET","../DB/LoadItemList.php?q="+str+"&p="+str2,true);
xmlhttp1.send();

}



function LoadWBSG(str,str2,str3)
{ //alert(str3);
if (str=="")
  {
  document.getElementById("loadWBSbeforeForm").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadWBSbeforeForm").style.display='';
		document.getElementById("loadWBSbeforeForm").innerHTML=xmlhttp1.responseText;	
	}
  }
  
xmlhttp1.open("GET","../DB/loadWBSbeforeForm.php?q="+str+"&p="+str2+"&parent="+str3,true);
xmlhttp1.send();
centerPopup();

		//load popup

		loadPopup();

	

				

	//CLOSING POPUP

	//Click the x event!

	$("#popupContactClose").click(function(){

		disablePopup();

	});

	//Click out event!

	$("#backgroundPopup").click(function(){

		disablePopup();

	});

	//Press Escape event!

	$(document).keypress(function(e){

		if(e.keyCode==27 && popupStatus==1){

			disablePopup();

		}

	});

event.stopPropagation();
}


function LoadWBStable(str,str2)
{
if (str=="")
  {
  document.getElementById("loadWBStable").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadWBStable").style.display='';
		document.getElementById("loadWBStable").innerHTML=xmlhttp1.responseText;
		
$(function(){
                
                $("#default_accordion").bwlAccordion({
                    theme: 'theme-blue',
                    highlight_bg: 'red'
                });
                
            });

	}
  }
xmlhttp1.open("GET","../DB/loadWBStable.php?WID="+str+"&p="+str2,true);
xmlhttp1.send();

}
//loadWBSEditform

function LoadWBSEditForm(str,str2)
{
if (str=="")
  {
  document.getElementById("loadWBSEditForm").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadWBSEditForm").style.display='';
		document.getElementById("loadWBSEditForm").innerHTML=xmlhttp1.responseText;	
		
	}
  }
xmlhttp1.open("GET","../DB/loadWBSEditForm.php?EditW="+str+"&WID="+str2,true);
xmlhttp1.send();

WEcenterPopup();

		//load popup

		WEloadPopup();

	

				

	//CLOSING POPUP

	//Click the x event!

	$("#WEpopupContactClose").click(function(){

		WEdisablePopup();

	});

	//Click out event!

	$("#WEbackgroundPopup").click(function(){

		WEdisablePopup();

	});

	//Press Escape event!

	$(document).keypress(function(e){

		if(e.keyCode==27 && WEpopupStatus==1){

			WEdisablePopup();

		}

	});


event.stopPropagation();

}


//loadITEMEditform

function LoadITEMEditForm(str,str2)
{ //alert("i");
if (str=="")
  {
  document.getElementById("loadITEMEditForm").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadITEMEditForm").style.display='';
		document.getElementById("loadITEMEditForm").innerHTML=xmlhttp1.responseText;	
	}
  }
xmlhttp1.open("GET","../DB/loadITEMEditForm.php?EditI="+str+"&WID="+str2,true);
xmlhttp1.send();

IEcenterPopup();

		//load popup

		IEloadPopup();

	

				

	//CLOSING POPUP

	//Click the x event!

	$("#IEpopupContactClose").click(function(){

		IEdisablePopup();

	});

	//Click out event!

	$("#IEbackgroundPopup").click(function(){

		IEdisablePopup();

	});

	//Press Escape event!

	$(document).keypress(function(e){

		if(e.keyCode==27 && IEpopupStatus==1){

			IEdisablePopup();

		}

	});



event.stopPropagation();

}

</script>

<script type="text/javascript">
function PNodeLoadItem(str)
{
if (str=="")
  {
  document.getElementById("itemList1").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
			
		document.getElementById("itemList1").style.display='';
		document.getElementById("itemList1").innerHTML=xmlhttp1.responseText;
		
	}
  }
xmlhttp1.open("GET","../DB/LoadItemWBS.php?q="+str,true);
xmlhttp1.send();

}


//loadITEMEditform
/*
function LoadITEMEditForm(str,str2)
{
if (str=="")
  {
  document.getElementById("loadITEMEditForm").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadITEMEditForm").style.display='';
		document.getElementById("loadITEMEditForm").innerHTML=xmlhttp1.responseText;	
	}
  }
xmlhttp1.open("GET","../DB/loadITEMEditForm.php?EditI="+str+"&WID="+str2,true);
xmlhttp1.send();

}

*/
//loadITEMInsertform

function LoadIITEMForm(str,str2)
{ //alert("Item");
if (str=="")
  {
  document.getElementById("loadITEMIForm").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadITEMIForm").style.display='';
		document.getElementById("loadITEMIForm").innerHTML=xmlhttp1.responseText;

	}
  }
xmlhttp1.open("GET","../DB/loadITEMIForm.php?WBSID="+str+"&WID="+str2,true);
xmlhttp1.send();

IIcenterPopup();

		//load popup

		IIloadPopup();

	

				

	//CLOSING POPUP

	//Click the x event!

	$("#IIpopupContactClose").click(function(){

		IIdisablePopup();

	});

	//Click out event!

	$("#IIbackgroundPopup").click(function(){

		IIdisablePopup();

	});

	//Press Escape event!

	$(document).keypress(function(e){

		if(e.keyCode==27 && IIpopupStatus==1){

			IIdisablePopup();

		}

	});

event.stopPropagation();
}



//loadSubITEMInsertform

function LoadSIITEMForm(str,str3,str2)
{
if (str=="")
  {
  document.getElementById("loadITEMIForm").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
		document.getElementById("loadITEMIForm").style.display='';
		document.getElementById("loadITEMIForm").innerHTML=xmlhttp1.responseText;	
	}
  }
xmlhttp1.open("GET","../DB/loadITEMIForm.php?WBSID="+str+"&WID="+str2+"&pItem="+str3,true);
xmlhttp1.send();

IIcenterPopup();

		//load popup

		IIloadPopup();

	

				

	//CLOSING POPUP

	//Click the x event!

	$("#IIpopupContactClose").click(function(){

		IIdisablePopup();

	});

	//Click out event!

	$("#IIbackgroundPopup").click(function(){

		IIdisablePopup();

	});

	//Press Escape event!

	$(document).keypress(function(e){

		if(e.keyCode==27 && IIpopupStatus==1){

			IIdisablePopup();

		}

	});

event.stopPropagation();

}

</script>

<script type="text/javascript">
function PNodeLoadItem(str)
{
if (str=="")
  {
  document.getElementById("itemList1").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
			
		document.getElementById("itemList1").style.display='';
		document.getElementById("itemList1").innerHTML=xmlhttp1.responseText;
		
	}
  }
xmlhttp1.open("GET","../DB/LoadItemWBS.php?q="+str,true);
xmlhttp1.send();

}

function call_del_DB(str,str2)
{ 

var answer = confirm ("This deleted information cannot be retrieved. Press OK to Delete.")
if (!answer){
	event.stopPropagation();
return ;}
if (str=="")
  {
  document.getElementById("loadWBStable").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
			
		document.getElementById("loadWBStable").style.display='';
		document.getElementById("loadWBStable").innerHTML=xmlhttp1.responseText;
		$(function(){
                
                $("#default_accordion").bwlAccordion({
                    theme: 'theme-blue',
                    highlight_bg: 'red'
                });
                
            });
	}
  }
xmlhttp1.open("GET","../DB/GWBSDB-G.php?del="+str+"&WID="+str2,true);
xmlhttp1.send();

}


// call del item
function call_del_IDB(str,str2)
{ 

var answer = confirm ("This deleted information cannot be retrieved. Press OK to Delete.")
if (!answer)
return ;
if (str=="")
  {
  document.getElementById("loadWBStable").innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  
  xmlhttp1=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp1.onreadystatechange=function()
  {
  if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
    {
			
		document.getElementById("loadWBStable").style.display='';
		document.getElementById("loadWBStable").innerHTML=xmlhttp1.responseText;
		
		$(function(){
                
                $("#default_accordion").bwlAccordion({
                    theme: 'theme-blue',
                    highlight_bg: 'red'
                });
                
            });
		
	}
  }
xmlhttp1.open("GET","../DB/GWBSITEMDB-G.php?del="+str+"&WID="+str2,true);
xmlhttp1.send();

}

</script>

<script src="http://malsup.github.com/jquery.form.js"></script>

        <script src="../Accordi/js/jquery.bwlaccordion.js"></script> 

</head>

<body class="a1">
<?php if(isset($_SESSION['UserName'])) include('../includes/menuin.php'); else {?><a href="../Admin/Admin-WBS-List.php"><img src="../images/icon-home.jpg" width="15" height="15" border="0" /></a><?php } ?><br/>


<div id="popupContact">
<div id="loadWBSbeforeForm"></div>
</div>
<div id="backgroundPopup"></div>


<div id="WBSEditpopupContact">
<div id="loadWBSEditForm"></div>
</div>
<div id="WEbackgroundPopup"></div>


<div id="ITEMEditpopupContact">
<div id="loadITEMEditForm"></div>
</div>
<div id="IEbackgroundPopup"></div>

<div id="ITEMIpopupContact">
<div id="loadITEMIForm"></div>
</div>
<div id="IIbackgroundPopup"></div>


<span class="a2"><span class="a21"><img src="../images/bulletbox.gif" width="12" height="13" alt="*" /></span> Create WBS/ Work Packages for <?php 
$resultWBSname = mysql_query("SELECT WBSList_code FROM wbslist where WBSList_id='$WID'");
$rowWBSname = mysql_fetch_array($resultWBSname , MYSQL_ASSOC); 
echo $rowWBSname['WBSList_code'];
		?> 
	  
</span><br />
<br />


  <?php if(!isset($_REQUEST['EditW'])){?>

<form id="form1" name="form1" method="post" action="../DB/GWBSDB-G.php?WID=<?php echo $WID.$var ?>">
  <table width="100%" border="0">
    <tr>
      <th width="12%" align="left" valign="top" class="a1" scope="col">WBS Level Code:</th>
      <th width="29%" align="left" valign="top" class="a1"><span class="style7">
        <select class="a1" name="PNode" id="PNodeI" >
          <?php



	  $result = mysql_query("SELECT * FROM globalwbs where companyID = '$id' && gwbslist_id='$WID' ORDER BY WBSIDA ASC,WBSIDA ASC,WBSIDB ASC,WBSIDC ASC,WBSIDD ASC,WBSIDE ASC");

	  $count =0;

		echo "<option value='0.0.0.0.0'>0.0.0.0.0 - ROOT</option>";

   		while($row = mysql_fetch_array($result , MYSQL_ASSOC))

  		{

			$WBSIDA = $row["WBSIDA"];

	  		$WBSIDB = $row["WBSIDB"];

	  		$WBSIDC = $row["WBSIDC"];

	  		$WBSIDD = $row["WBSIDD"];

	  		$WBSIDE = $row["WBSIDE"];

			$WBSID = $row["WBSID"];
			$WBSdes = $row["description"];
			

	  /*

			if(!isset($WBSIDA))

			$WBSIDA="0";

			if(!isset($WBSIDB))

			$WBSIDB="0";

			if(!isset($WBSIDC))

			$WBSIDC="0";

			if(!isset($WBSIDD))

			$WBSIDD="0";

			if(!isset($WBSIDE))

			$WBSIDE="0";*/

		$count ++;	

			

			if ($WBSIDE==0)

			

  		 echo "<option value='$WBSID'>".$WBSIDA.".".$WBSIDB.".".$WBSIDC.".".$WBSIDD.".".$WBSIDE." - ".$WBSdes."</option>";

		}		

?>
        </select>
        </span>
        </td>
      </th>
      <th width="11%" align="left" valign="top" class="a1" scope="row">&nbsp;</th>
      <th width="48%" align="left" valign="top" class="a1">&nbsp;</th>
    </tr>
    <tr>
      <th align="left" valign="top" class="a1" scope="col"><span class="a11">WBS Description:</span></th>
      <th colspan="3" align="left" valign="top" class="a1"><span class="a11">
        <input class="a1" name="description" type="text" id="description" size="165" />
      </span></th>
    </tr>
    <tr>
      <th align="left" valign="top" class="a1" scope="col"><span id="yui_3_16_0_1_1399697912155_2982">Notes</span> (if any):</th>
      <th colspan="3" align="left" valign="top" class="a1"><label for="writeupwbs"></label>
      <textarea name="writeupwbs" cols="165" rows="3" class="a1" id="writeupwbs"></textarea>
      <span class="a11">
      <input type="image" src="../images/icon-save.png"  width="15" height="15"  />
      <!--<input id="button" name="button" type="image" value="INSERT WBS" src="../images/icon-insert.jpg" onclick="return false" />-->
      <a href="../qsinfo/WBS-ITEM-G.php?WID=<?php echo $WID.$var ?>"> <img src="../images/icon-ITEMS.png" width="15" height="15" border="0" /></a></span></th>
    </tr>
  </table>
</form>
<?php } else { ?>


<?php } ?>
<br />
<hr />
<!--<br />

<span class="a2"><img src="../images/bulletbox.gif" width="12" height="13" alt="*" /> Create a  List of Items/ Activities for <span class="a21">
<?php 
$resultWBSname = mysql_query("SELECT WBSList_code FROM wbslist where WBSList_id='$WID'");
$rowWBSname = mysql_fetch_array($resultWBSname , MYSQL_ASSOC); 
echo $rowWBSname['WBSList_code'];
		?>
</span></span><br />
<!--<?php if(!isset($_REQUEST['EditI'])){?>
<form id="form1" name="form1" method="post" action="../DB/GWBSITEMDB-G.php?WID=<?php echo $WID.$var ?>">
  <table width="100%" border="0">
    <tr>
      <th width="12%" align="left" valign="top" class="a1" scope="col">&nbsp;</th>
      <th width="38%" align="left" valign="top" class="a1">&nbsp;</th>
      <th width="50%" align="left" valign="top" class="a1">&nbsp;</th>
    </tr>
    <tr>
      <th colspan="1" align="left" valign="top" class="a1" scope="col"><div align="left">WBS Work Package:
      </div>        <label for="wbsselect3"></label>
      </th>
        <th>
          <div align="left">
            <select class="a11" name="PNode" id="PNodeII" onchange="PNodeLoadItem(this.value)">
              <option>Select</option>
              <?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"];
	
			$count ++;	
			echo "<option value='$WBSID'>".$row["WBSIDA"].".".$row["WBSIDB"].".".$row["WBSIDC"].".".$row["WBSIDD"].".".$row["WBSIDE"]." - ".$row["description"]."</option>";
		
		}		
?>
            </select>
        </span></span></div></th>
        <th align="left"><div id="itemList1"></div></th>
    </tr>
    <tr>
      <th align="left" valign="top" class="a1" scope="col">Item or Sub-item:      </th>
      <th colspan="2" align="left" valign="top" class="a11" scope="col">
        <input class="a11" name="description" type="text" id="description" size="165" />
      </th>
    </tr>
    <tr>
      <th align="left" valign="top" class="a1" scope="col"><span id="yui_3_16_0_1_1399697912155_2982">Notes</span> (if any):</th>
      <th colspan="2" align="left" valign="top" class="a11">
        <textarea name="writeupitem" cols="165" rows="3" class="a11" id="writeupitem"></textarea>
      
        <input type="image" src="../images/icon-save.png"  width="15" height="15"  />
      <a href="../qsinfo/WBS-ITEM-G.php?WID=<?php echo $WID.$var; ?>"><img src="../images/icon-WBS.jpg" width="15" height="15" border="0" /></a></th>
    </tr>
    <tr>
      <th align="left" valign="top" class="a1" scope="col">&nbsp;</th>
      <th align="left" valign="top" class="a1">&nbsp;</th>
      <th align="left" valign="top" class="a1">&nbsp;</th>
    </tr>
  </table>
</form>

<?php }?>
<hr />
<br />-->


<span class="a2"><img src="../images/bulletbox.gif" width="12" height="13" alt="*" /> WBS/ Items/ Activities for <span class="a21">
<?php 
echo $rowWBSname['WBSList_code'];
		?>
</span></span>&nbsp;(<a href="ITEM-NamesgPV.php?WID=<?php echo $WID; ?>" target="_blank">Print View with Notes</a>)<span class="a2"> <span class="a12">(</span></span><a href="ITEM-NamesgPV2.php?WID=<?php echo $WID; ?>" target="_blank">Print View without Notes</a><span class="a2"><span class="a12">)</span><br />
<br />
</span>
<table width="100%" border="0" id="loadWBStable">

</table>
<script>LoadWBStable("<?php echo $WID; ?>","<?php echo $id; ?>");
 var myAry=  new Array();
 $.session.set('name',"");
 function setcookiefunc(id){
     $("#d"+id).removeClass('displayblock');
        var storedAry = new Array();
       storedAry = $.session.get('name')?JSON.parse($.session.get('name')):[]; 
//          storedAry = ['abs','sdc','ds'];
       count = storedAry.length;
     
            var s = "d"+id;
          myAry[count] = id;  
          console.log(myAry);
        
          $.session.set('name', JSON.stringify(myAry));
         $.post("setaccordisession.php", {"id": myAry});
            }
</script>
</body>
</html>
