<link rel="stylesheet" href="css/new_mxerp.css">
 <style type="text/css">
* {
	margin: 0;
	padding: 0;
	outline: none;	
}

ul {
	list-style: none;	
}

#navigation {
	margin: 40px 0;	
	font: bold 12px/18px "Helvetica Neue", Helvetica, Arial, sans-serif;
	text-transform: uppercase;
	color: #444;
}

#navigation:after {
	clear: both;
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
}

#navigation ul {	
	float: left;

    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.07);
	-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

#navigation li {
	margin-left:5px;
	float: left;
	border-style: solid; 
	border-width: 1px;
    border-color: #BABABA #BABABA #BABABA #BABABA;
	box-shadow: 0 1px rgba(255,255,255,1) inset;
	-webkit-box-shadow: 0 1px rgba(255,255,255,1) inset;
	background: #F7F7F7; /* Old browsers */
	background: -moz-linear-gradient(top, #F7F7F7 0%, #EDEDED 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F7F7F7), color-stop(100%,#EDEDED)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* IE10+ */
	background: linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F7F7F7', endColorstr='#EDEDED',GradientType=0 ); /* IE6-9 */	
	border-radius: 5px;
	moz-border-radius: 5px;
	webkit-border-radius: 5px;
}

#navigation li:hover, #navigation li.current {
	box-shadow: 0 1px rgba(255,255,255,0.2) inset;
	-webkit-box-shadow: 0 1px rgba(255,255,255,0.2) inset;
	border-color: #262626 !important;
	background: #4D4D4D; /* Old browsers */
	background: -moz-linear-gradient(top, #4D4D4D 0%, #262626 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4D4D4D), color-stop(100%,#262626)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* IE10+ */
	background: linear-gradient(top, #4D4D4D 0%,#262626 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4D4D4D', endColorstr='#262626',GradientType=0 ); /* IE6-9 */
}

#navigation a {
	display: block;
	padding: 10px 12px;
	color: #444;
	text-decoration: none;
	text-shadow: 0 1px #FFF;
}

#navigation a:hover, #navigation li.current a {
	color: #FFF;
	text-shadow: 0 1px #000;
}

#navigation li:first-child {
	border-left-color: #BABABA;
}

#navigation li:last-child {

}
 </style>

<?php 
include('includes/Class_Client.php');

$date=date('Y-m-d');
$back_date=date('Y-m-d', strtotime('-'.$back_days.' day', strtotime($date)));

?>
<?php 
if($_REQUEST['Delete']){
	$del_id = $_POST['tecketid'];
	$count=count($_REQUEST['tecketid']);
	for($i=0;$i<$count;$i++){
		$del_id1 = $del_id[$i];
		
		$condition1="tt_id='".$del_id1."'";
		$s->DeleteRecord('add_service',  $condition1);// DELETE FROM SERVICE TABLE
		
		$condition2="tt_id='".$del_id1."'";
		$s->DeleteRecord('trouble_ticket_creation_details',  $condition2);// DELETE FROM DETAILS TABLE
		
		
		$condition3="id='".$del_id1."'";
		$s->DeleteRecord('trouble_ticket_creation',  $condition3);//DELETE FROM PARANT TABLE
	}
}
?>
<script language="javascript" >
function TicketData()
{	
	myCheckboxArray = document.myform.elements["tecketid[]"];
	var t=myCheckboxArray.length;
	if(document.getElementById('tecketid').checked==true)
	{	
	if(t==undefined)
	document.getElementById('tecketid_'+1).checked=true;		
	for (var i = 1; i <= t; i++)
	{
	document.getElementById('tecketid_'+i).checked=true;	
	}	
	}
	else
	{
	if(t==undefined)		
	document.getElementById('tecketid_'+1).checked=false;		
	for (var i = 1; i <= t; i++)
	{
	document.getElementById('tecketid_'+i).checked=false;	
	}
	}
}
</script>

<div class="body_contain">

  <h1>Complaint Management</h1>
  	
	<table width="100%%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="30"><img src="images/normal_complaint.png" height="25" width="25" /></td>
    <td width="145"><nav id="navigation">
		<ul>
			<li><a href="#">Normal Complaint</a></li>
			
		</ul>
	</nav></td>
    <td width="30"><img src="images/retail_complaint.png" height="25" width="25" /></td>
    <td><nav id="navigation">
		<ul>
			<li><a href="#">Retail Complaint</a></li>
			
		</ul>
	</nav></td>
    
  </tr>
</table>
</td>
  </tr>
  
  <tr>
    <td align="left" valign="top"><table width="100%%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="35">Staff</td>
    <td width="160">
	<select>
	  <option>-Select-</option>
	
	</select></td>
    <td width="70">Complaint No.</td>
    <td width="120"><input type="text" /></td>
    <td width="57">Date Time</td>
    <td><input type="text" class="datepicker"/></td>
  </tr>
</table>
</td>
  </tr>
   <tr>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">
	<fieldset style="padding:10px;">
	<legend class="search-haiding"><strong>Contact Detail</strong></legend>
	
	<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#999999 solid 1px;">
        <tr class="row1">
          <td class="tabledata1">Name<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
            <input type="text" style="width:150px;" name="ticket_number" readonly="readonly" />          </td>
          <td class="tabledata1">Contact No.<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;"><input type="text" style="width:150px;" name="ticket_number" readonly="readonly" />          </td>
        </tr>
        <tr class="row1">
          <td class="tabledata1">Address<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
            <input type="text" style="width:150px;" name="ticket_number" readonly="readonly" />          </td>
          <td class="tabledata1">Location<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
		
		  
            <select name="product_name" id="productId" style="width:150px;" onchange="getInvoice(this.value)">
              <option selected Value="">Selection your option</option>
            </select> 

			<input name="product_name1" id="productId1" style="display:none;" value="" readonly="readonly" />
			<input name="product_name" id="productId2" style="visibility:hidden; height:1px;" value="" />			         </td>
        </tr>
		<tr class="row1">
          <td class="tabledata1">Item<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
		  
            <select name="invoiceNo" id="invoiceNo" style="width:150px;"  onchange="showInvoiceDetails(this.value)" >
              <option selected Value="">Select your option</option>
            </select>         
			
		
		<input name="invoiceNo1" id="invoiceNo1" style="display:none;" value="" readonly="readonly" />
		<input name="invoiceNo" id="invoiceNo2" style="visibility:hidden; height:1px;" value="" readonly="readonly" />			 </td>
			 <td class="tabledata1">Invoice No. <label><font color="#FF0000"> *</font></label></td>
          	 <td style="padding-left:3px;"><select name="product_name" id="productId" style="width:150px;" onchange="getInvoice(this.value)">
              <option selected Value="">Selection your option</option>
             
            </select></td>
        </tr>
		<tr class="row1">
			<td class="tabledata1">Serial No.<label><font color="#FF0000"> *</font></label></td>
			<td style="padding-left:3px;"><select name="product_name" id="productId" style="width:150px;" onchange="getInvoice(this.value)">
              <option selected Value="">Selection your option</option>
             
            </select></td>
			<td class="tabledata1">Status<label><font color="#FF0000"> *</font></label></td>
			<td style="padding-left:3px;"><input name="closer_date" id="closerDate" value="" readonly="readonly" class="datepicker" style="width:150px;" /></td>
		</tr>
        <tr class="row1">
          <td class="tabledata1">Nature<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;"><select name="prority" style="width:150px;">
              <option Value="">Select your option</option>
              <option Value="1">Low</option>
              <option Value="2">Intermediate</option>
              <option Value="3">High</option>
              <option Value="4">Urgent</option>
            </select>          </td>
          <td class="tabledata1">Type</td>
          <td style="padding-left:3px;"><select name="category" style="width:150px;">
              <option Value="">Select your option</option>
              <option Value="1">Big Fault</option>
              <option Value="2">Small Fault</option>
              <option Value="3">Other Fault</option>
            </select>          </td>
        </tr>
        <tr class="row1">
          <td class="tabledata1">Subtype<label><font color="#FF0000"> *</font></label></td>
          <td colspan="3" style="padding-left:3px;"><select name="scope_compaint" style="width:150px;">
              <option value="">Select your option</option>
              <option value="1">Complaint</option>
              <option value="2">Installation</option>
              <option value="3">De-Installation</option>
              <option value="4">Re-Installation</option>
              <option value="5">Preventive</option>
              <option value="6">Service</option>
              <option value="7">Site Survey</option>
            </select>          </td>
          </tr>
        
        <tr class="row1">
          <td class="tabledata1" scope="row">Remarks<label><font color="#FF0000"> *</font></label></td>
          <td colspan="3" style="padding:3px;"><input name="prob_desc" type="text" id="prob_desc" value="" style="width:80%; height:50px;"></td>
        </tr>
        <!--<tr>
          <td class="tabledata1" scope="row">&nbsp;</td>
          <td colspan="3">
		  	<select name="z" id="order_type" style="width:206px;"   onchange="getorder(this.value)">
			  <option value="Consolidate">Spare Parts</option>
			  <option value="MRP_Item">Add Service</option>
			</select>
		  </td>
        </tr>-->
      </table>
	</fieldset>
	
	</td>
  </tr>
     <tr>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top"><fieldset style="padding:10px;">
	<legend class="search-haiding"><strong>Assign to</strong></legend>
	
	<table width="100%" border="1" cellspacing="0" cellpadding="3" style="border:#999999 solid 1px;">
        <tr class="row1">
          <td class="tabledata1">Staff<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
            <select name="product_name" id="productId" style="width:150px;" onchange="getInvoice(this.value)">
              <option selected Value="">Selection your option</option>
            </select>          </td>
          <td class="tabledata1">Contact No.<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;"><input type="text" style="width:150px;" name="ticket_number" readonly="readonly" />          </td>
        </tr>
        <tr class="row1">
          <td class="tabledata1">Visit Date<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
            <input type="text" style="width:150px;" name="ticket_number" readonly="readonly" class="datepicker"/>          </td>
          <td class="tabledata1">Closure Date<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
		
		  
            <input type="text" style="width:150px;" name="ticket_number" readonly="readonly" class="datepicker"/> 

			<input name="product_name1" id="productId1" style="display:none;" value="" readonly="readonly" />
			<input name="product_name" id="productId2" style="visibility:hidden; height:1px;" value="" />			         </td>
        </tr>
		<tr class="row1">
          <td class="tabledata1">Alert Date<label><font color="#FF0000"> *</font></label></td>
          <td style="padding-left:3px;">
		  
            <input type="text" style="width:150px;" name="ticket_number" readonly="readonly" class="datepicker"/>         
			
		
		<input name="invoiceNo1" id="invoiceNo1" style="display:none;" value="" readonly="readonly" />
		<input name="invoiceNo" id="invoiceNo2" style="visibility:hidden; height:1px;" value="" readonly="readonly" />			 </td>
			 <td class="tabledata1">Status <label><font color="#FF0000"> *</font></label></td>
          	 <td style="padding-left:3px;"><select name="product_name" id="productId" style="width:150px;" onchange="getInvoice(this.value)">
              <option selected Value="">Selection your option</option>
             
            </select></td>
        </tr>
		
        
        
        
        <tr class="row1">
          <td colspan="4" align="center" valign="middle"><div id="navigation" style="margin-left:430px; margin-top:5px; margin-bottom:5px;">
		<ul>
			<li><a href="#">Allocate</a></li>
			
		</ul>
	</div></td>
          </tr>
        <!--<tr>
          <td class="tabledata1" scope="row">&nbsp;</td>
          <td colspan="3">
		  	<select name="z" id="order_type" style="width:206px;"   onchange="getorder(this.value)">
			  <option value="Consolidate">Spare Parts</option>
			  <option value="MRP_Item">Add Service</option>
			</select>
		  </td>
        </tr>-->
      </table>
	</fieldset></td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top"><table width="100%" border="1" cellpadding="3" cellspacing="0">
<tr>
<td width="10%" class="tabledata">Complaint No.</td>
<td width="20%" class="tabledata">Name</td>
<td width="10%" class="tabledata">Contact No.</td>
<td width="15%" class="tabledata">Item</td>
<td width="10%" class="tabledata">Clouser Date</td>
<td width="10%" class="tabledata">Delay By</td>
<td class="tabledata">Status</td>
</tr>

<tr class="row1">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>

</table></td>
  </tr>
</table>



</div>
