forked from royhodge/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontract_sign.php
More file actions
91 lines (69 loc) · 3.97 KB
/
Copy pathcontract_sign.php
File metadata and controls
91 lines (69 loc) · 3.97 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
session_start();
ob_start();
require_once('check-login.php');
include_once 'header-logged-in.php';
?>
<script type="text/javascript" src="js/contract.js"></script>
<div class="container theme-showcase" role="main">
<header class="page-header">
<h2>PrimeContract</h2>
</header>
<div class="row">
<div class="col-md-10">
<section class="panel panel-primary">
<header class="panel-heading">
<h2 class="panel-title">Sign Contract</h2>
</header>
<div class="panel-body">
<div class="row">
<div class="col-md-11">
<input type="hidden" id="contract_id">
<div id="output_sign1">
<?php
if (isset($_GET['msg']))
{
if ($_GET['msg'] == 1) { echo "<h3 style='color:green'>Signing successful!</h3>"; }
}
?>
</div>
<?php
include_once 'dbhelper.php';
include_once 'resources.php';
$dbHelper = new DBHelper(session_id(), $_SERVER);
$pendingContractsDetails = $dbHelper->getContractsPendingSignature($_SESSION['address']);
if (count($pendingContractsDetails)>0)
{
echo "<h3 style='color:#0066cc'>Contracts pending signature:</h3>";
echo "<p><div class='table-responsive scrollable has-scrollbar scrollable-content ' data-plugin-scrollable><table class='table table-bordered table-hover table-condensed mb-none'>";
echo "<tr><th>".Literals::CONTRACT_DETAILS_FIELD_DESC['title']."</th><th>".Literals::CONTRACT_DETAILS_FIELD_DESC['desc']."</th><th>".Literals::CONTRACT_DETAILS_FIELD_DESC['dou']."</th><th></th><th></th></tr>";
foreach ($pendingContractsDetails as $contractDetails)
{
echo "<tr>";
foreach ($contractDetails as $key => $value)
{
if ($key != Literals::CONTRACT_DETAILS_FIELD_NAMES['FILE_HASH'] && $key != Literals::CONTRACT_DETAILS_FIELD_NAMES['CONTRACT_ID']) {
echo "<td>".$value."</td>";
}
}
echo "<td><a class='mb-xs mt-xs mr-xs btn btn-primary' target='_new' href='contract_upload_details.php?contractid=".$contractDetails[Literals::CONTRACT_DETAILS_FIELD_NAMES['CONTRACT_ID']]."'>View</a></td>";
echo "<td><button class='mb-xs mt-xs mr-xs btn btn-primary' onclick='contract_id.value=\"".$contractDetails[Literals::CONTRACT_DETAILS_FIELD_NAMES['CONTRACT_ID']]."\";signContract(this, contract_id, output_sign1); return false;'>Sign</button></td>";
echo "</tr>";
}
echo "</table></div></p>";
}
else
{
echo "<h3 style='color:green'><b>No contracts pending signature</b></h3>";
}
?>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<?php
include_once 'footer.php';
?>