-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert_party.php
80 lines (62 loc) · 2.04 KB
/
insert_party.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
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
<?php
require(__DIR__.'/source/main.php');
require($_SERVER['DOCUMENT_ROOT'].'/libraries/php/classes/database/main.php');
class class_filter_control
{
private $data_common = NULL;
private $name_like = NULL;
public function __construct()
{
$this->data_common = new \data\Common();
}
// Accessors
public function get_data_common()
{
return $this->data_common;
}
public function get_name_like()
{
return $this->name_like;
}
// Mutators
public function set_name_like($value)
{
$this->name_like = $value;
}
public function populate_from_request()
{
$this->data_common->populate_from_request();
}
}
$filter_control = new class_filter_control();
$filter_control->set_name_like('bar');
echo $filter_control->get_name_like();
// Start page cache.
$page_obj = new \dc\cache\PageCache();
$yukon_database->set_sql('{call account_list(@page_current = ?,
@page_rows = ?,
@sort_field = ?,
@sort_order = ?,
@filter_like = ?)}');
$params = array(array(-1, SQLSRV_PARAM_IN), // No paging.
array(NULL, SQLSRV_PARAM_IN), // No page limit.
array(2, SQLSRV_PARAM_IN), // Last name.
array(0, SQLSRV_PARAM_IN), // Ascending.
array($filter_control->get_name_like(), SQLSRV_PARAM_IN));
$yukon_database->set_param_array($params);
$yukon_database->query_run();
$yukon_database->get_line_config()->set_class_name('\data\Account');
$_obj_data_main_list = $yukon_database->get_line_object_list();
if(is_object($_obj_data_main_list) === TRUE)
{
for($_obj_data_main_list->rewind(); $_obj_data_main_list->valid(); $_obj_data_main_list->next())
{
$_obj_data_main = $_obj_data_main_list->current();
?>
<option value = "<?php echo $_obj_data_main->get_account(); ?>"><?php if($_obj_data_main->get_name_l()) echo $_obj_data_main->get_name_l().', '.$_obj_data_main->get_name_f(); ?></option>
<?php
}
}
// Collect and output page markup.
echo $page_obj->markup_and_flush();
?>