{include file="header.dwt"}
      <div id="list" class="f_l">
		<script type="text/javascript">
		<!--
			  function chk_data()
		{
		  if(edit_form.tbCategory.value==""){
			 alert("Category must be selected!");
			 edit_form.tbCategory.focus();
		  }else if(edit_form.tbTopical.value==""){
			 alert("Topical must be filled!");
			 edit_form.tbTopical.focus();
		  }else if(edit_form.tbDescript.value==""){
			 alert("Description must be filled!");
			 edit_form.tbDescript.focus();
		  }else{
			 return true;
		  }	 
		  return false;
		}
		//-->
		</script>
      <!--{if $act eq 'default'}-->
	      <div class="font_big title" style="margin-top:10px;">General Defection</div>
		  <TABLE width="100%" border="0" align="center" cellSpacing="1" bgcolor="#3E558E" style="margin-top:10px;">
			<TR align="middle" class="tb_title">
			  <TD width="10%">Category</TD>
			  <TD width="25%">Topical</TD>
			  <TD width="55%">Description</TD>
			  <TD width="5%">Delete</TD>
			  <TD width="5%">Modify</TD>
			</TR>
		 
		  <!-- {foreach from=$list_defect item=con} -->
            <TR align="middle" height="30" bgcolor="#ffffff" onMouseOver="this.style.backgroundColor='#E1FFDF'" onMouseOut="this.style.backgroundColor='#ffffff'">
              <TD><div align="center">{$con.tbCategory}</div></TD>
              <TD><div align="left"> &nbsp; {$con.tbTopical}</div></TD>
              <TD><div align="left"> &nbsp; {$con.tbDescript}</div></TD>
			  <TD><div align="center"><a href="defects.php?act=delete&id={$con.tbSN}"><img src="pics/remove.png" width="20" height="20" /></a></div></TD>
			  <TD><div align="center"><a href="defects.php?act=edit&id={$con.tbSN}&isshow=none"><img src="pics/go.jpg" width="20" height="20" /></a></div></TD>
			</TR>
			
          <!-- {/foreach} -->
     	  </TABLE>
		  
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr height="50">
		    <td width="12">&nbsp;  </td>
			<td width="700" class="font_big"><font class="font_green">A:</font> Accepted &nbsp; <font class="font_red">R:</font> Rejected &nbsp; <font class="font_blue">C:</font> Concessible</td>
			<td width="200">Current Page:{$now_page} / {$all_page}</td>
			<td width="64" align="right">Jump To:</td>
			<td width="110" align="right">
			<form name="jump_form" id="jump_form">
			  <select name="menu1" onchange="MM_jumpMenu('parent',this,0)" style="width:100px; margin-right:4px;">
                <option value="">Page {$now_page}</option>
                <option value="">======</option>
                <!-- {foreach from=$all_pages item=per_page} -->
                <option value="defects.php?nowpage={$per_page}&active=5&isshow=none">Page {$per_page}</option>
                <!-- {/foreach} -->
              </select>
			</form>			</td>
		  </tr>
		  </table>
		  
      <!--{elseif $act eq 'edit' || $act eq 'add'}--> 
	  
	  <TABLE width="100%" border="1" cellPadding="4" cellSpacing="1" bordercolor="#5272A9">
	  <!--{if $act eq 'edit'}-->
          <form name="edit_form" method="post" action="defects.php?act=update&isshow=none" id="edit_form" onsubmit="return chk_data()">
	  <!--{/if}-->
	  <!--{if $act eq 'add'}-->
	  	  <form name="edit_form" method="post" action="defects.php?act=insert&isshow=none" id="edit_form" onsubmit="return chk_data()">
	  <!--{/if}-->
		  <TBODY>
            <TR align="middle" class="tb_title">
              <TD width="100%">Defect Description </div></TD>
            </TR>
            <TR>
              <TD><div align="center">
                
                <table width="100%"  border="0" cellpadding="1" cellspacing="1">
				<!--{if $act eq 'edit'}-->
                  <tr>
                    <td width="20%"><div align="right"><strong>SN：</strong></div></td>
                    <td width="80%">
					<div align="left">{$one_defect.tbSN}<input name="tbSN" type="hidden" id="tbSN" value="{$one_defect.tbSN}"></div>
					</td>
                  </tr>
                  <tr>
                    <td><div align="right"><strong>Category ：</strong></div></td>
                    <td><div align="left"><b>{$one_defect.tbCategory}</b></div></td>
                  </tr>
                  <tr>
                    <td><div align="right"><strong>Topical ：</strong></div></td>
                    <td><div align="left">{$one_defect.tbTopical}</div></td>
                  </tr>
                  <tr>
                    <td><div align="right"><strong>Defect Description ：</strong></div></td>
                    <td><div align="left">{$one_defect.tbDescript}</div></td>
                  </tr>
				  <tr>
                    <td colspan="2"><hr /></td>
                  </tr>
				<!--{/if}-->
                  <tr>
                    <td><div align="right"><strong>Category ：</strong></div></td>
                    <td><div align="left">
                        <strong>
                        <select name="tbCategory" id="tbCategory">
                          <option value="{$one_defect.tbCategory}" >{$one_defect.tbCategory}</option>
						  <option value=''>==Select==</option>
                          <option value="Function">Function</option>
                          <option value="Cosmetic">Cosmetic</option>
                          <option value="Packing">Packing</option>
						  <option value="Other">Other</option>
                        </select>
                        </strong>                    
						</div>
					</td>
                  </tr>
                  <tr>
                    <td><div align="right"><strong>Topical ：</strong></div></td>
                    <td><div align="left">
						<input name="tbTopical" type="text" id="tbTopical" value="{$one_defect.tbTopical}" size="85">
						<font class="font_red">*</font> Please don`t input <font class="font_red">& or \ or ' or "</font></div>
					 </td>
                  </tr>
                  <tr>
                    <td><div align="right"><strong>Defect Description ：</strong></div></td>
                    <td><div align="left">
                      <input name="tbDescript" type="text" id="tbDescript" value="{$one_defect.tbDescript}" size="85">
                    <font class="font_red">*</font> Please don`t input <font class="font_red">& or \ or ' or "</font></div></td>
                  </tr>
                </table>
              </div></TD>
            </TR>
            <TR align="middle" class="tb_title">
              <TD bgcolor="#5272A9" colspan="2">
			  <div align="center">
			  <!--{if $act eq 'edit'}-->
			  <input type="submit" name="Submit" value="Modify"> 	  		
			  <!--{else}-->
			  <input type="submit" name="Submit" value="Add">
			  <!--{/if}-->
			  <input name="GoBack" type="button" value="Go Back To Defects List" onclick="location.href='defects.php'" />
			  </div>
			  </TD>
            </TR>
          </TBODY></form>
      </TABLE>
	  <!--{/if}-->
      </div>
	  {include file="footer.dwt"}
</div>
</body>
</html>
