<?php
session_start();

include("config.inc.php");

$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass'])
		or die("Could not connect to DB");
mysql_select_db($HTTP_SESSION_VARS['dbName'],$connection) or die("Could not find DB");


$query1="select grid_color1,grid_color2 from setup";
$result1=mysql_query($query1,$connection) or die(mysql_error());
while($rows=mysql_fetch_array($result1)){
extract($rows);

}

if(empty($showlist))
$showlist=1;
?>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Set Item </title>
<script type="text/javascript" language="javascript">


</script>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
}
.style1 {
	color: #333333;
	font-weight: bold;
}
.style2 {
	color: #999999;
	font-weight: bold;
}
.style3 {color: #999999}
-->
</style></head>

<body>
<form id="form1" name="form1" method="post" action="">
   <input name="option" type="hidden"   value="<?php echo $option; ?>">
    <input name="mainaction" type="hidden"   value="<?php echo $mainaction; ?>">  
    <input name="item_id" type="hidden"   value="<?php echo $item_id; ?>">  
	
  <table width="800" border="0" align="center">


 
 
<?php if($post=='1'){ ?>
<script type="text/javascript" language="javascript">

if(document.form1.option.value=='1'){
	
	document.form1.mainaction.value='getsequential';
	document.form1.action='Form_Items_Actions.php';
	document.form1.submit();
}

if(document.form1.option.value=='2'){
	
	opener.document.items.action='Form_Items.php';
	opener.document.items.item_attribute.value='1';
	opener.document.items.submit();
	self.close();
}

if(document.form1.option.value=='4'){
	
	opener.document.items.mainaction.value='editmode';
	opener.document.items.item_id.value=document.form1.item_id.value;
	opener.document.items.item_policy.value='S';
	opener.document.items.action='Form_Items.php';
	opener.document.items.submit();
	self.close();
}

if(document.form1.option.value=='3'){
	
	opener.document.items.mainaction.value='insert';
	opener.document.items.item_policy.value='O';
	opener.document.items.item_attribute.value='2';
	opener.document.items.action='Form_Items.php';
	opener.document.items.submit();

	self.close();
}
</script>
<?php } ?>


<?php  ?>

<table border=0 width=100% height=90px bgcolor=#D8D8D8>
<tr bgcolor='#F7F7F7'><td>Please choose your creating Method:</td></tr>
<tr><td align=center><a href='Form_Item_Type.php?post=1&option=1'>Sequential</td></tr>

<tr  bgcolor='#F7F7F7'><td align=center><a href='Form_Item_Type.php?post=1&option=2'>Attribute</td></tr>
<tr><td align=center><a href='Form_Item_Type.php?post=1&option=3'>Other</td></tr></table>


<?php?>

<?php
 echo" </table>
</form>
</body>
</html>";



?>
