@@ 18-29 (lines=12) @@ | ||
15 | /** |
|
16 | * {@inheritDoc} |
|
17 | */ |
|
18 | public function effectively_installed() |
|
19 | { |
|
20 | $sql = 'SELECT module_id |
|
21 | FROM ' . $this->table_prefix . "modules |
|
22 | WHERE module_class = 'acp' |
|
23 | AND module_langname = 'ACP_ADMANAGEMENT_TITLE'"; |
|
24 | $result = $this->db->sql_query($sql); |
|
25 | $module_id = (int) $this->db->sql_fetchfield('module_id'); |
|
26 | $this->db->sql_freeresult($result); |
|
27 | ||
28 | return $module_id; |
|
29 | } |
|
30 | ||
31 | /** |
|
32 | * {@inheritDoc} |
@@ 89-98 (lines=10) @@ | ||
86 | * |
|
87 | * @return array List of all ads |
|
88 | */ |
|
89 | public function get_all_ads() |
|
90 | { |
|
91 | $sql = 'SELECT ad_id, ad_name, ad_enabled, ad_end_date |
|
92 | FROM ' . $this->ads_table; |
|
93 | $result = $this->db->sql_query($sql); |
|
94 | $data = $this->db->sql_fetchrowset($result); |
|
95 | $this->db->sql_freeresult($result); |
|
96 | ||
97 | return $data; |
|
98 | } |
|
99 | ||
100 | /** |
|
101 | * Insert new advertisement to the database |