/
client_payment.php
55 lines (52 loc) · 1.34 KB
/
client_payment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
session_start();
session_set_cookie_params(0, "/");
setcookie('PHPSESSID', session_id(), 0, '/');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<?php
include_once( '../../credentials.php' );
include_once( 'view/view_client_payment.php' );
include_once( 'model/model_client_payment.php' );
include_once( 'controller/controller_auth.php' );
$a = new controller_auth( $username, $password );
$m = new model_page( $username, $password );
$r = new view_page( $username, $password );
include_once( 'template/header.php' );
$a->do_auth( $username, $password );
?>
<?php
if($_SESSION['valid'] == TRUE)
{
//Initialize and set relevant arrays
$ClientPaymentID = $_GET['id'];
$ClientPaymentInformation = $m->get_client_payment_information( $ClientPaymentID );
//Process submitted information.
if (isset($_GET['action']))
{
$action = $_GET['action'];
$m->{$action}($_POST);
}
//Start Main Content Here
echo <<<eos
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Edit Expense</h3>
</div>
<div class="panel-body">
eos;
$r->view_update_client_payment( $ClientPaymentInformation );
echo <<<eos
</div>
</div>
</div>
</div>
</div>
eos;
}
include_once( 'template/footer.php' );
?>