<!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 ("../navigation/header.php");
$page_name = "Production-main";
include ("../navigation/access.php");


$table_name = $_SESSION['db_prefix']."_permissions";
$quote_permission_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Production-edit quote' ";
$quote_permission_result = mySQL_query($quote_permission_query);
$quote_permission_num = mysql_num_rows($quote_permission_result);
if ($quote_permission_num>0) {
	  $quote_permission = 'yes';
}
else {
	$quote_permission = 'no';
}

$table_name = $_SESSION['db_prefix']."_permissions";
$cutting_bill_permission_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Production-edit cutting bill' ";
$cutting_bill_permission_result = mySQL_query($cutting_bill_permission_query);
$cutting_bill_permission_num = mysql_num_rows($cutting_bill_permission_result);
if ($cutting_bill_permission_num>0) {
	  $cutting_bill_permission = 'yes';
}
else {
	$cutting_bill_permission = 'no';
}

$table_name = $_SESSION['db_prefix']."_permissions";
$authorisation_permission_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Production-edit authorisation' ";
$authorisation_permission_result = mySQL_query($authorisation_permission_query);
$authorisation_permission_num = mysql_num_rows($authorisation_permission_result);
if ($authorisation_permission_num>0) {
	  $authorisation_permission = 'yes';
}
else {
	$authorisation_permission = 'no';
}

$table_name = $_SESSION['db_prefix']."_permissions";
$job_details_permission_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Production-edit job details' ";
$job_details_permission_result = mySQL_query($job_details_permission_query);
$job_details_permission_num = mysql_num_rows($job_details_permission_result);
if ($job_details_permission_num>0) {
	  $job_details_permission = 'yes';
}
else {
	$job_details_permission = 'no';
}

$table_name = $_SESSION['db_prefix']."_permissions";
$set_complete_permission_query = "SELECT access_id  FROM  $table_name  WHERE access_id ='". $_SESSION['access_id']."' AND page_name = 'Production-edit set complete' ";
$set_complete_permission_result = mySQL_query($set_complete_permission_query);
$set_complete_permission_num = mysql_num_rows($set_complete_permission_result);
if ($set_complete_permission_num>0) {
	  $set_complete_permission = 'yes';
}
else {
	$set_complete_permission = 'no';
}
?>


<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../jscript/alert_message.js"  type="text/javascript"></script>
<script language="JavaScript" src="../jscript/go_to_url.js"  type="text/javascript"></script> 
</head>
<?php
if ($permission_num==1) {
	include ("../navigation/production_sidebar.php");
?>
<body>

<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>
       <br />
<br /><br />
<br />
<br />
<br />

<div class="page_middle_frame"><br />
  <br />


<label class="label_std">Job content:</label>
<div class="page_inside_frame">
  <input name="job_button" type="button" class="imagebutton" id="job_button" onclick="<?php if ($quote_permission=='yes') {?>MM_goToURL('parent','edit_job_select.php?page=captured_quote');return document.MM_returnValue;<?php  } else { ?> alertMessage(1, '', 'You have no access to this page.<br><br>If you think you should be allowed to do this, please contact the system manager'); <?php } ?>" value="Edit Captured Quote" />
  &nbsp;&nbsp;&nbsp;&nbsp;
  <input name="cash_button" type="button" class="imagebutton" value="Edit Cutting Bill" onclick="<?php if ($cutting_bill_permission=='yes') {?>MM_goToURL('parent','edit_job_select.php?page=cutting_bill');return document.MM_returnValue;<?php  } else { ?> alertMessage(1, '', 'You have no access to this page.<br><br>If you think you should be allowed to do this, please contact the system manager'); <?php } ?>"/>
&nbsp;&nbsp;&nbsp;&nbsp;
<input name="cash_button2" type="button" class="imagebutton" value="Edit Authorisation" onclick="<?php if ($authorisation_permission=='yes') {?>MM_goToURL('parent','edit_job_select.php?page=authorisation');return document.MM_returnValue;<?php  } else { ?> alertMessage(1, '', 'You have no access to this page.<br><br>If you think you should be allowed to do this, please contact the system manager'); <?php } ?>"/>
&nbsp;&nbsp;&nbsp;
</div> 
  <br />
  <br /><br />
<br />
<br />
<br />
<br />
<br />

<label class="label_std">Job details:</label>
<div class="page_inside_frame">
  <input name="cutting_bill_button" type="button" class="imagebutton" id="cutting_bill_button" value="Job Details" onclick="<?php if ($job_details_permission=='yes') {?>MM_goToURL('parent','edit_job_select.php?page=details');return document.MM_returnValue;<?php  } else { ?> alertMessage(1, '', 'You have no access to this page.<br><br>If you think you should be allowed to do this, please contact the system manager'); <?php } ?>"/>
  &nbsp;&nbsp;&nbsp;&nbsp;
<input name="department_button" type="button" class="imagebutton" id="department_button" value="Set job to complete" onclick="<?php if ($set_complete_permission=='yes') {?>MM_goToURL('parent','edit_job_select.php?page=completion');return document.MM_returnValue;<?php  } else { ?> alertMessage(1, '', 'You have no access to this page.<br><br>If you think you should be allowed to do this, please contact the system manager'); <?php } ?>" />
</div> 
  <br /><br />
<br />
<br /><br />
<br />
<br />
&nbsp;&nbsp;Internal cost price:
<div class="page_inside_frame">
  <input name="timber_button" type="button" class="imagebutton" id="timber_button" onclick="MM_goToURL('parent','timber_cost_price_edit.php?sub_cat=Timber');return document.MM_returnValue" value="Timber" />
  &nbsp;&nbsp;&nbsp;&nbsp;
  <input name="mitek_button" type="button" class="imagebutton" value="Mitek products" onclick="MM_goToURL('parent','store_items_cost_price_edit.php?sub_cat=Mitek');return document.MM_returnValue"/>
  &nbsp;&nbsp;&nbsp;
  <input name="sundries_button" type="button" class="imagebutton" value="Sundries" onclick="MM_goToURL('parent','store_items_cost_price_edit.php?sub_cat=Sundries');return document.MM_returnValue"/>
  &nbsp;</div>
<br />
<br />
</div>
    </td>
    </tr>
    </table>
</div>

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


<?php } else {
    $_SESSION['denied_return'] = "production/production_main.php";	
    include ("../navigation/production_sidebar.php");?>
    <?php include ('../navigation/side_bar.php'); ?>
	<body onLoad="accessdenied(); return false">	
	</body>
<?php }
?>
</html>
</body>