Ejemplo n.º 1
0
			return false;
		}
		if(paid_date == null || paid_date == ""){
			alert("paid_date can't be empty");
			return false;
		}

		return true;
	}
</script>
<?php 
session_start();
include "header.php";
include "class.invoice.dao.php";
include "class.customer.dao.php";
$daoCustomer = new DAOcustomer();
$customer_detail = $daoCustomer->getCustomers($_SESSION['uid']);
?>
<center>
	<h3>Add Invoice</h3>
<form name = "frmInvoice" method="POST" action="save.invoice.php"  onsubmit = "return validateInvoice();">
	<table cellspacing="5" cellpadding="5">
		<?php 
if (isset($_GET["id"])) {
    $dao = new DAOinvoice();
    $vo = $dao->get($_GET["id"]);
    ?>
			<tr>
				<td> Customer Name </td>
				<td><select name = "customer" style="width:198px" value = "<?php 
    echo $vo->customer;
Ejemplo n.º 2
0
<?php

session_start();
include "class.customer.dao.php";
include_once "header.php";
$dao = new DAOcustomer();
?>
<center><b><u><font face ="Britannic Bold"><h1>Customer</h1></font></u></b></center><br>
<a href="form.customer.php" class="btn btn-info">Add customer</a><br>
<table class="table table-striped">
	<tr class ="info">
		<td>#</td>
		<td>Name</td>
		<td>Firm Name</td>
		<td>Address</td>
		<td>Phone</td>
		<td>Email</td>
		<td><b>Edit</b></td>
		<td><b>Delete</b></td>
	</tr>

<?php 
$rec_per_page = 10;
if (isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    $page = 1;
}
$limit1 = ($page - 1) * $rec_per_page;
$limit2 = $page * $rec_per_page;
$total_recs = $dao->getCount();
Ejemplo n.º 3
0
<?php

include "db.php";
include "class.customer.dao.php";
$dao = new DAOcustomer();
if (isset($_GET["id"])) {
    $vo = $dao->get($_GET["id"]);
    $dao->del($vo);
}
header("Location: customer.php");
Ejemplo n.º 4
0
		}

		return true;
	}
</script>
<?php 
include "header.php";
include "class.customer.dao.php";
?>
<center>
	<h3>Add Customer</h3>
<form name = "frmCustomer" method="POST" action="save.customer.php"  onsubmit = "return validateCustomer();">
	<table cellspacing="5" cellpadding="5">
		<?php 
if (isset($_GET["id"])) {
    $dao = new DAOcustomer();
    $vo = $dao->get($_GET["id"]);
    ?>
			<tr>
				<td> Customer Name </td>
				<td><input type = "text" name = "name" value= "<?php 
    echo $vo->name;
    ?>
 "/></td>
			</tr>
			<tr>
				<td> Firm Name </td>
				<td><input type = "text" name = "firm_name" value= "<?php 
    echo $vo->firm_name;
    ?>
 "/></td>
Ejemplo n.º 5
0
<?php

session_start();
include "db.php";
include "class.customer.dao.php";
$dao = new DAOcustomer();
$vo = new customer($_SESSION["uid"], $_POST["name"], $_POST["firm_name"], $_POST["address"], $_POST["phone"], $_POST["email"]);
if (isset($_POST["cust_id"])) {
    $vo->cust_id = $_POST["cust_id"];
}
$dao->save($vo);
header("Location: customer.php");