<!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=utf-8" />

<?php
include('../include/session.php');
?>

<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
</script>
</head>
<body>
<?php
include ("../navigation/header.php");
$page_name = "Sales-main";
include ("../navigation/access.php");
if ($permission_num==1) {
	include ("../navigation/sales_sidebar.php");
?>

<div class="main_frame">
<table width="630" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="52" colspan="4" align="left" valign="top"><div class="page_head_frame">
        <table width="630" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="385"><label class="label_page_head">Edit select</label></td>
            <td align="right">&nbsp;</td>
          </tr>
        </table>
      </div>
      <div class="page_middle_frame"><br />
<?php
$table_name = $_SESSION['db_prefix']."_permissions";
$edit_quote_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Quote-edit' ";
$edit_quote_result = mySQL_query($edit_quote_query);
$edit_quote_num = mysql_num_rows($edit_quote_result);

$table_name = $_SESSION['db_prefix']."_permissions";
$edit_enquiry_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Enquiry-edit' ";
$edit_enquiry_result = mySQL_query($edit_enquiry_query);
$edit_enquiry_num = mysql_num_rows($edit_enquiry_result);

$table_name = $_SESSION['db_prefix']."_permissions";
$edit_customer_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Customer-edit' ";
$edit_customer_result = mySQL_query($edit_customer_query);
$edit_customer_num = mysql_num_rows($edit_customer_result);
?>
<link rel="stylesheet" type="text/css" href="../css/tabs.css" />
<ul class="tabs">
    <li>
      <input type="radio" checked name="tabs" id="tab1">
      <label for="tab1">Quotations</label>
      <div id="tab-content1" class="tab-content animated fadeIn">
     <?php if ($edit_enquiry_num!=0) { ?>
  <input name="enquiry_button" type="button" class="imagebutton" id="enquiry_button" onclick="MM_goToURL('parent','edit_sales_select.php?page=enquiry');return document.MM_returnValue" value="Enquiry" />
<?php } else { ?>
  <input name="enquiry_button" type="button" class="dis_imagebutton" id="enquiry_button"  value="Enquiry" />
 <?php } ?>
  &nbsp;&nbsp;&nbsp;&nbsp;
<?php if ($edit_quote_num!=0) { ?>  
<input name="quote_button" type="button" class="imagebutton" id="quote_button" onclick="MM_goToURL('parent','edit_sales_select.php?page=quotation');return document.MM_returnValue" value="Quotation" />
<?php } else { ?>
  <input name="quote_button" type="button" class="dis_imagebutton" id="quote_button"  value="Quotation" />
 <?php } ?>
  &nbsp;&nbsp; 
      </div>
    </li>
    <li>
      <input type="radio" name="tabs" id="tab2">
      <label for="tab2">Customers</label>
      <div id="tab-content2" class="tab-content animated fadeIn">
  &nbsp;&nbsp;
<?php if ($edit_customer_num!=0) { ?> 
  <input name="customer_button" type="button" class="imagebutton" value="Customer details" onclick="MM_goToURL('parent','edit_sales_select.php?page=customer');return document.MM_returnValue"/>
<?php } else { ?> 
  <input name="customer_button" type="button" class="dis_imagebutton" value="Customer details" >
<?php } ?>   
&nbsp;    
      </div>
    </li>  
  </ul>
<br />
  <br /><br />
<br />
<br />
<br />
<br />
<br />
<br /><br />
<br />
<br />
<br />
<br />
<br />
</div>
    </td>
    </tr>
    </table>
</div>

<?php include ('../navigation/side_bar.php'); ?>


<?php } else {
    $_SESSION['denied_return'] = "sales/sales_main.php?date=0";	
    include ("../navigation/sales_sidebar.php");?>
    <?php include ('../navigation/side_bar.php'); ?>
	<body onLoad="accessdenied(); return false">	
	</body>
<?php }
?>
</html>
</body>