@@ 44-57 (lines=14) @@ | ||
41 | } |
|
42 | } |
|
43 | ||
44 | private function load() |
|
45 | { |
|
46 | $db = new DB_Sql; |
|
47 | $db->query("SELECT * FROM accounting_year_end WHERE year_id = " . $this->year->get('id') . " AND intranet_id =" . $this->year->kernel->intranet->get('id')); |
|
48 | if (!$db->nextRecord()) { |
|
49 | return 0; |
|
50 | } |
|
51 | $this->value['id'] = $db->f('id'); |
|
52 | $this->value['step_key'] = $db->f('step_key'); |
|
53 | $this->value['step'] = $db->f('step_key'); |
|
54 | $this->value['result_account_reset_voucher_id'] = $db->f('result_account_reset_voucher_id'); |
|
55 | $this->value['operating_reset_voucher_id'] = $db->f('operating_reset_voucher_id'); |
|
56 | return $db->f('id'); |
|
57 | } |
|
58 | ||
59 | function start() |
|
60 | { |
@@ 97-112 (lines=16) @@ | ||
94 | } |
|
95 | ||
96 | ||
97 | function load() |
|
98 | { |
|
99 | $db = new DB_Sql; |
|
100 | $db->query("SELECT id, name, site_id, identifier, for_page_type FROM cms_template WHERE intranet_id = " . $this->cmssite->kernel->intranet->get('id') . " AND id = " . $this->id); |
|
101 | ||
102 | if (!$db->nextRecord()) { |
|
103 | return 0; |
|
104 | } |
|
105 | $this->value['id'] = $db->f('id'); |
|
106 | $this->value['name'] = $db->f('name'); |
|
107 | $this->value['site_id'] = $db->f('site_id'); |
|
108 | $this->value['identifier'] = $db->f('identifier'); |
|
109 | $this->value['for_page_type'] = $db->f('for_page_type'); |
|
110 | ||
111 | return 1; |
|
112 | } |
|
113 | ||
114 | function validate($var) |
|
115 | { |