Example #1
0
 function product_edit()
 {
     $this->check_login();
     $id = $this->uri->segment(3);
     $data = array('obj' => Product::getproduct($id));
     $this->load->view('admin/product_edit', $data);
 }
Example #2
0
<?php

include 'head.php';
include 'product.php';
$product = new Product();
$result = $product->getproduct($_GET['id']);
?>
<style>
	.table-responsive{width:600px; margin:auto; margin-top:10px;}	
</style>

<script>
	$(function(){
		

	$("#dedit").click(function(event) {
			$("#ediscount").show();
			$("#editdiscount").show();
		});

		$("#editdiscount").click(function(event) {
			var data={};
			data.ediscount = $("#ediscount").val();
			data.id=$("#pid").val();
			$.ajax
			({
				url: 'server.php?action=editDiscount',
				type: 'POST',
				data: data,
				success: function (response) 
				{