/** * Create select box for attachment filetype * * @param mixed $value Value of input * @param string $key Key name * @param int $module_id Module ID * * @return string Forum select box HTML */ public function select_currency($value, $key, $module_id) { $currencies = $selected = array(); foreach ($this->currencies as $currency) { $currencies[] = array('title' => $this->user->lang($currency), 'value' => $currency); if ($currency === $this->config['board3_pay_default_' . $module_id]) { $selected[] = $currency; } } return $this->helper->generate_select_box($key, $currencies, $selected); }
/** * Create select box for attachment filetype * * @param mixed $value Value of input * @param string $key Key name * @param int $module_id Module ID * * @return string Forum select box HTML */ public function select_filetype($value, $key, $module_id) { $extensions = array(); // Get extensions $sql = 'SELECT * FROM ' . EXTENSIONS_TABLE . ' ORDER BY extension ASC'; $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { $extensions[] = array('value' => $row['extension'], 'title' => $row['extension']); } $this->db->sql_freeresult($result); $selected = $this->get_selected_filetypes($module_id); return $this->helper->generate_select_box($key, $extensions, $selected, true); }