示例#1
0
} else {
    echo '<span class="notok">' . $i10nMan->translate('No') . '</span>';
    $canrun = false;
}
if (versionCompare(PHP_VERSION, '4.1.0', '<') and versionCompare(PHP_VERSION, '4.0.0', '>=')) {
    echo ' <span class="warning"> ' . $i10nMan->translate('MorgOS is untested on PHP lower than PHP 4.1.0, if you encouter problems please report this. ') . '</span>';
}
?>
			</p>
			<p><?php 
echo $i10nMan->translate('Databases available');
?>
</p>
			<?php 
$DBMan = new genericDatabase($i10nMan);
$supported = $DBMan->getAllSupportedDatabases();
$db = false;
echo '<ul>';
foreach ($supported as $key => $support) {
    $db = true;
    echo '<li>' . $key . '</li>';
}
echo '</ul>';
if ($db == false) {
    echo '<span class="notok">' . $i10nMan->translate('No database detected, please install a database plugin.') . '</span>';
    $canrun = false;
}
?>
			<h2><?php 
echo $i10nMan->translate('Optional');
?>
示例#2
0
?>
"/> <br />
				<h2><?php 
echo $i10nMan->translate('Database options');
?>
 </h2>
				<?php 
echo $i10nMan->translate('Database type');
?>
: 
					<select name="database-type">
						<?php 
include_once 'core/compatible.php';
include_once 'core/database.class.php';
$DBMan = new genericDatabase();
$types = $DBMan->getAllSupportedDatabases();
foreach ($types as $key => $type) {
    if ($key == getParam('database-type')) {
        //echo $key;
        echo '<option value="' . $key . '" selected="selected">' . $key . '</option>';
    } else {
        echo '<option value="' . $key . '">' . $key . '</option>';
    }
}
?>
					</select> <br />
				<?php 
echo $i10nMan->translate('Database host');
?>
: <input type="text" name="database-host" value="<?php 
echo getParam('database-host');
$this->vars['VAR_NAVIGATION'] = $this->getNavigator();
$this->vars['VAR_SITE_TITLE'] = $this->config->getConfigItem('/general/sitename', TYPE_STRING);
$this->vars['TINYMCE'] = 'skins/default/tinymce/jscripts/tiny_mce/tiny_mce.js';
$this->vars['VAR_TO_REGISTER_USER'] = '******';
$this->vars['SIDEBAR'] = $this->getSidebarHTML();
$this->vars['SUBBAR'] = $this->getSubbarHTML();
$this->vars['MORGOS_COPYRIGHT'] = $this->i10nMan->translate('Powered By MorgOS &copy; 2006');
$this->vars['TO_POSTNEW_NEWSITEMFORM'] = 'index.php?module=formpostnews';
if (substr($this->module, 0, 5) == 'admin') {
    $this->vars['VAR_ADMIN_NAVIGATION'] = $this->getAdminNavigator();
    $this->vars['VAR_ADMIN_LINK_INDEX'] = 'admin.php';
    $this->vars['VAR_ADMIN_LINK_GENERAL'] = 'admin.php?module=general';
    if ($this->module == 'admin/databases') {
        $DBTypeOptions = NULL;
        $DBManager = new genericDatabase();
        foreach ($DBManager->getAllSupportedDatabases() as $key => $supported) {
            if ($this->config->getConfigItem('/database/type', TYPE_STRING) == $key) {
                $DBTypeOptions .= ' ADMIN_DATABASE_TYPE_OPTION_SELECTED (' . $key . ')';
            } else {
                $DBTypeOptions .= ' ADMIN_DATABASE_TYPE_OPTION (' . $key . ')';
            }
        }
        $this->vars['VAR_ADMIN_DATABASE_FORM_DATABASE_TYPE_OPTIONS'] = $DBTypeOptions;
        $this->vars['VAR_ADMIN_DATABASE_FORM_ACTION'] = './admin.php?module=databasesave';
        $this->vars['VAR_ADMIN_DATABASE_FORM_NAME_HOST'] = '/database/host';
        $this->vars['VAR_ADMIN_DATABASE_FORM_NAME_DATABASE_TYPE'] = '/database/type';
        $this->vars['VAR_ADMIN_DATABASE_FORM_NAME_DBNAME'] = '/database/name';
        $this->vars['VAR_ADMIN_DATABASE_FORM_NAME_USER'] = '******';
        $this->vars['VAR_ADMIN_DATABASE_FORM_NAME_PASSWORD'] = '******';
        $this->vars['VAR_ADMIN_DATABASE_FORM_VALUE_HOST'] = $this->config->getConfigItem('/database/host', TYPE_STRING);
        $this->vars['VAR_ADMIN_DATABASE_FORM_VALUE_DBNAME'] = $this->config->getConfigItem('/database/name', TYPE_STRING);