[go: up one dir, main page]

Menu

[r10]: / clients.php  Maximize  Restore  History

Download this file

89 lines (77 with data), 4.8 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
<?php
$pageRef='Clients';
include('includes/header.php');
?>
<script>
function createNewClient(){
window.location.href = 'http://127.0.0.1/Oreste/newClient.php';
}
function showClientDetails(elem){
var args = elem.name.split("_");
var clientId = args[0];
window.location.href = 'http://127.0.0.1/Oreste/viewClientDetailed.php?cl='+clientId;
}
function setClientEventHandlers(){
setTimeout("$$('a.aClientNominative').each(function(s){Event.observe(s,'click',function(){showClientDetails(s);})})", 1);
}
</script>
<div id="qResult" class="OpResult"></div>
<div class="Columns">
<div class="Column1">
<!-- *********************************************************** -->
<!-- * Menu tab * -->
<!-- *********************************************************** -->
<div class="Block"><div class="BlockBL"><div></div></div><div class="BlockBR"><div></div></div><div class="BlockTL"></div><div class="BlockTR"><div></div></div><div class="BlockT"></div><div class="BlockR"><div></div></div><div class="BlockB"><div></div></div><div class="BlockL"></div><div class="BlockC"></div><div class="BlockContent"><span class="BlockHeader"><span><?php echo _T("Actions") ?></span></span><div class="BlockContentBorder">
<ul>
<?php echo "<li><a href=\"javascript:createNewClient();\">" . _T("New client") . "</a></li>"; ?>
</ul>
</div>
</div>
</div>
<!-- *********************************************************** -->
<!-- * Search tab * -->
<!-- *********************************************************** -->
<div class="Block"><div class="BlockBL"><div></div></div><div class="BlockBR"><div></div></div><div class="BlockTL"></div><div class="BlockTR"><div></div></div><div class="BlockT"></div><div class="BlockR"><div></div></div><div class="BlockB"><div></div></div><div class="BlockL"></div><div class="BlockC"></div><div class="BlockContent"><span class="BlockHeader"><span><?php echo _T("Search for client") ?></span></span><div class="BlockContentBorder">
<table style="width:100%; font-size:0.8em;">
<tr><td style="width:10%;"><?php echo _T("Name") ?></td> <td style="align:center; width:90%;"><input style="width:80%;" name="sName" id="sName" type="text"/></td></tr>
<tr><td style="width:10%;"><?php echo _T("Surname") ?></td> <td style="align:center; width:90%;"><input style="width:80%;" name="sSurname" id="sSurname" type="text"/></td></tr>
<tr><td style="width:10%;"><?php echo _T("Town") ?></td> <td style="align:center; width:90%;"><input style="width:80%;" name="sCity" id="sCity" type="text"/></td></tr>
</table>
</div>
</div>
</div>
</div>
<div class="MainColumn">
<!-- *********************************************************** -->
<!-- * Clients table * -->
<!-- *********************************************************** -->
<div class="Block"><div class="BlockBL"><div></div></div><div class="BlockBR"><div></div></div><div class="BlockTL"></div><div class="BlockTR"><div></div></div><div class="BlockT"></div><div class="BlockR"><div></div></div><div class="BlockB"><div></div></div><div class="BlockL"></div><div class="BlockC"></div><div class="BlockContent"><span class="BlockHeader"><span><?php echo _T("Customer list") ?></span></span><div class="BlockContentBorder" id="clientTable">
</div>
</div>
</div>
</div>
</div>
<script>
// ************************************************************
// * Observe window load event to call the init page function *
// ************************************************************
Event.observe(window, 'load', function(){
// *****************************************
// * Load clients table for the first time *
// *****************************************
OL_clientTableLoad('', '', '', {elementToFill: 'clientTable', onSuccess: setClientEventHandlers});
// **************************
// * Install event handlers *
// **************************
Event.observe('sName', 'keyup', function(){OL_clientTableLoad($F('sName'), $F('sSurname'), $F('sCity'), {elementToFill: 'clientTable', onSuccess: setClientEventHandlers});});
Event.observe('sSurname', 'keyup', function(){OL_clientTableLoad($F('sName'), $F('sSurname'), $F('sCity'), {elementToFill: 'clientTable', onSuccess: setClientEventHandlers});});
Event.observe('sCity', 'keyup', function(){OL_clientTableLoad($F('sName'), $F('sSurname'), $F('sCity'), {elementToFill: 'clientTable', onSuccess: setClientEventHandlers});});
Event.observe('qResult', 'mouseover', function(){OL_makeThisElementInvisible('qResult');});
});
</script>
<!-- tags opened in the header -->
</div>
</div>
</div>
</body>
</html>