<? include("header.php");


//session_start();
//error_reporting(0);

include "checksession.php";

include ("include/db-connect.php");


if(isset($_REQUEST['submit']))
 {
	 
	 $category_name=$_REQUEST['category_name'];
	 
			       
     $insert=("insert into category(code,category_name) values('1','$category_name')");
 
   $exce=mysql_query($insert);
  // header("location:view_user.php?add=success"); 

      ?>
      <script>
	  window.location='view_cat.php?add=success';
	  </script>
      <?
	 
	 // header("location:view_offer.php?edit=success"); 
}
?>
<div id="content">
  <div class="breadcrumb">
       <!-- <a href="http://amarasudhan.com/admin/index.php?route=common/home&amp;token=b735cc089ec2d51abb9a8e1901f501fb">Home</a>-->
      </div>
              <div class="box">
    <div class="heading">
      <h1><img src="view/image/home.png" alt="" />Add Category</h1>
    </div>
    <div class="content">
      <div class="overview" style="width:50%; margin-left:300px;">
        <div class="dashboard-heading"> Product Category</div>
        <div class="dashboard-content">
        
 
   <?php 
 $sel="select * from ".$MAIL_CON." where id=1";
 $run=mysql_query($sel);
 $array=mysql_fetch_array($run);
 $name=$array['image_name'];
  
 ?>
 
 <?php if($_REQUEST['ed']=='su'){ echo "<div class='alert_succes'>Contact Edited Successfully</div>"; } else { echo "";}?>

 <form method="post" id="client" enctype="multipart/form-data">
 <!-- <script type="text/javascript" src="../prototype.js"></script> 
  <script type="text/javascript" src="../validation.js"></script>
  -->
            <div class="mainrow" style="margin-left:100px;">
                <div class="maintext" style="width:200px;">Category Name <font color="#FF0000"><b> *</b></font> </div>
                <div class="maintextbox" ><input type="text" name="category_name" size="36" class="required"></div> <br />
                
               
            </div>
                  <br />

            <div class="mainrow" style="margin-left:100px;">

             <div class="maintext" style="width:200px;"> </div>

              <div class="maintextbox"><input  id="Submit" type="submit" value="Submit" name="submit" /></div>

            </div>			        

   </form>
        </div>
      </div>
      
      
    </div>
  </div>
</div>
<!--[if IE]>
<script type="text/javascript" src="view/javascript/jquery/flot/excanvas.js"></script>
<![endif]--> 
<script type="text/javascript" src="view/javascript/jquery/flot/jquery.flot.js"></script> 
<script type="text/javascript"><!--
function getSalesChart(range) {
	$.ajax({
		type: 'get',
		url: 'index.php?route=common/home/chart&token=b735cc089ec2d51abb9a8e1901f501fb&range=' + range,
		dataType: 'json',
		async: false,
		success: function(json) {
			var option = {	
				shadowSize: 0,
				lines: { 
					show: true,
					fill: true,
					lineWidth: 1
				},
				grid: {
					backgroundColor: '#FFFFFF'
				},	
				xaxis: {
            		ticks: json.xaxis
				}
			}

			$.plot($('#report'), [json.order, json.customer], option);
		}
	});
}

getSalesChart($('#range').val());
//--></script> 
</div>
<?  include("footer.php"); ?>