-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·52 lines (42 loc) · 1.82 KB
/
index.php
File metadata and controls
executable file
·52 lines (42 loc) · 1.82 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
<?php
require_once('bootstrap.php');
$fields = array(
// @TODO: refactor html_class to HTML attributes array
new FormFieldInput(array('name' => 'full_name', 'html_class' => 'name', 'value' => 'From',)),
// new FormFieldInput(array('name' => 'last_name', 'html_class' => 'name', 'value' => 'From (last name)',)),
// new FormFieldInput(array('name' => 'password', 'html_class' => 'password', 'value' => 'Password',)),
new FormFieldSelect(array('name' => 'recipient', 'html_class' => 'recipient name', 'value' => 'To',
'options' => array(
'sales' => 'Sales',
'support' => 'Support',
'manage' => 'Manage',
))),
new FormFieldTextarea(array('name' => 'message', 'html_class' => 'message', )),
new FormFieldSubmit(array('name' => 'submit', 'html_class' => 'submit', 'value' => '',)),
);
$form = new MessageForm($fields);
// Below is the HTML template which will be sent to the client.
?>
<!DOCTYPE html>
<html>
<head>
<title>Gui-Test</title>
<link href="main.css" media="screen" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.6.2.min.js"></script>
<script src="js/main.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="page_wrapper">
<div class="header">
<span class="item">I...</span>
<span class="item">Like...</span>
<span class="item">Messaging!</span>
</div>
<div class="slogan">
It's nice to hear you!
</div>
<? print $form->render(); ?>
</div>
</body>
</html>