<?php
  require('includes/application_top.php');
?>
<style type="text/css">
<!--
.style1 {
	font-size: 12px;
	font-weight: bold;
}
.style2 {font-size: 10px}
-->
</style>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //--> 
  
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="2%" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
   <td>
		<table width="100%"  border="0">
			<?php echo tep_draw_form('status', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=update_order_status'); ?>
			  <tr>
				<td><table border="0" cellspacing="0" cellpadding="2">
				  <tr>
					<td><table border="0" cellspacing="0" cellpadding="2">
					  <tr>
						<td class="main"><b>Enter order id</b></td>
					  </tr>
					  <tr>
						<td colspan="2" class="main"><input name="orderid" type="text" id="orderid" onKeyPress="javascript:checkdigone();"></td>
					  </tr>
					  <tr>
						<td class="style1">Status:
							<select name="orderstatus" id="orderstatus">
							  <option value="2">In Process</option>
							  <option value="3">Shipped</option>
						    </select></td>
						<td class="style1" align="left"><input name="autochange1" type="checkbox" id="autochange1" value="1"  checked>
						Auto change into shipped(only for In process)</td>
					  </tr>
					  <tr>
						<td class="style1" colspan="2"><input type="checkbox" name="cbmail1" value="on"  checked>
						Enter notify customer</td>
					  </tr>
					  <tr>
						<td class="style1" colspan="2"><input type="checkbox" name="cbcomment1" value="on"  checked>
						Enter notify comments</td>
					  </tr>
					  <tr>
						<td colspan="2" class="main"><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
					  </tr>			  
					</table></td>
				  </tr>
				  <tr>
				  <td valign="top"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></td>
				  </tr>
				</table></td>
			  </form></tr>
		</table>
		<hr>
		<table width="100%"  border="0">
			  <tr>
				<td class="main"><b>Enter order id list</b></td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
			  </tr>
			  <tr><?php echo tep_draw_form('status2', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=update_order_statuslist'); ?>
				<td class="main"><textarea name="orderlist" rows="10" id="orderlist" onKeyPress="javascript:checkdig();"></textarea></td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
			  </tr>
			  <tr>
				<td><table border="0" cellspacing="0" cellpadding="2">
				  <tr>
					<td><table border="0" cellspacing="0" cellpadding="2">
					  <tr>
						<td class="style1">Status:
							<select name="orderstatus2" id="orderstatus2">
							  <option value="2">In Process</option>
							  <option value="3">Shipped</option>
						    </select></td>
						<td class="style1" align="left"><input type="checkbox" name="autochange2" value="1"  checked>
						Auto change into shipped(only for In process)</td>
					  </tr>
					  <tr>
						<td class="style1" colspan="2"><input type="checkbox" name="cbmail2" value="on" checked>
						Notify customer</td>
					  </tr>
					</table></td>
				  </tr>
				  <tr>
				  <td valign="top"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></td>
				  </tr>
				</table></td>
			  </form></tr>
		</table>   
   </td>
<!-- body_text //-->
  </tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
<script language="javascript"> 
	function checkdigone() {
		 if(event.keyCode<48 || event.keyCode>57) event.returnValue=false;  
	}  
	function checkdig() {
		 if (event.keyCode==13) event.returnValue=true;
		 else  
		 if(event.keyCode<48 || event.keyCode>57) event.returnValue=false;  
	}  
	function checkdigdate() {
		 if(event.keyCode==45) event.returnValue=true;
		 else  
		 if(event.keyCode<48 || event.keyCode>57) event.returnValue=false;  
	}
	
	
function check_form(form_name) {
  error = false;
  form = form_name;
  error_message = "";

									  if (form.elements["orderid"] && (form.elements["orderid"].type != "hidden")) 
									  {
											var field_value = form.elements["orderid"].value;										
											if (field_value == '') 
											{
											  error_message = error_message  + "please input order id" + "\n";
											  error = true;
											  form.elements["orderid"].focus();
											}
									  }
  if (error == true) {
    alert(error_message);
    return false;
  } else {
    submitted = true;
    return true;
  }
}	
</script>