示例#1
0
    public function get_output()
    {
        $content = '
		<table width="100%" border="0" cellspacing="1" cellpadding="2" class="no-borders">
			<tr>
				<td width="40%" align="right"><strong>' . $this->lang['dbtype'] . ':</strong></td>
				<td width="60%">
					<select name="dbtype" class="input">
					';
        // Build the database drop-down
        include_once $this->root_path . 'libraries/dbal/dbal.class.php';
        foreach (dbal::available_dbals() as $db_type => $db_name) {
            $selected = $db_type == $this->dbtype ? ' selected="selected"' : '';
            $content .= '	<option value="' . $db_type . '"' . $selected . '>' . $db_name . '</option>
					';
        }
        $content .= '</select>
				</td>
			</tr>
			<tr>
				<td align="right"><strong>' . $this->lang['dbhost'] . ': </strong></td>
				<td><input type="text" name="dbhost" size="25" value="' . $this->dbhost . '" class="input" /></td>
			</tr>
			<tr>
				<td align="right"><strong>' . $this->lang['dbname'] . ': </strong></td>
				<td><input type="text" name="dbname" size="25" value="' . $this->dbname . '" class="input" /></td>
			</tr>
			<tr>
				<td align="right"><strong>' . $this->lang['dbuser'] . ': </strong></td>
				<td><input type="text" name="dbuser" size="25" value="' . $this->dbuser . '" class="input" /></td>
			</tr>
			<tr>
				<td align="right"><strong>' . $this->lang['dbpass'] . ': </strong></td>
				<td><input type="password" name="dbpass" size="25" value="" class="input" /></td>
			</tr>
			<tr>
				<td align="right"><strong>' . $this->lang['table_prefix'] . ': </strong></td>
				<td><input type="text" name="table_prefix" size="25" value="' . $this->table_prefix . '" class="input" /></td>
			</tr>
		</table>';
        return $content;
    }