/** * createFile creates the new Config file * @return bool Returns true on good file write */ function createFile() { global $ourDBType; $inc_dir = dirname(realpath(__FILE__)) . '/../includes/'; $str = ' <?php /** Settings file created as part of the conversion process **/ define(\'CONVERTED\', TRUE); define(\'MYSERVER\', \'' . MYSERVER . '\'); define(\'MYLOGIN\', \'' . MYLOGIN . '\'); define(\'MYPASSWORD\', \'' . MYPASSWORD . '\'); define(\'MYDATABASE\', \'' . MYDATABASE . '\'); $databaseType = \'' . $ourDBType . '\'; /** EOF **/ ?>'; //Attemp to write the new file.. $fh = fopen($inc_dir . 'settings-new.php', 'a+'); if (!$fh) { showInfoBox("Could not create file, make sure you have permissions...\nYou can also replace your settings.php file with this:\n<textarea rows=10 cols=80>{$str}</textarea>", ' :: ERROR ::'); } else { fwrite($fh, $str); fclose($fh); return true; } return false; }
</div> </div> <div id="footer"></div> </div> <?php echo showInfoBox($showInfoBox); /* Meldungen ausgeben */ ?> <div><span id="rfooter" style="color:#666; width:820px; margin-left:auto; margin-right:auto; height:55px; text-align:center; font-size:80%; text-decoration:none"> <span title="<?php echo I18N::getBrowserLanguage(); ?> "><?php echo _('Sprache:'); ?> </span> <a rel="nofollow" href="/?setLocale=de_DE">Deutsch</a> · <a rel="nofollow" href="/?setLocale=en_US">English</a> · <a rel="nofollow" href="/?setLocale=es_ES">Español</a><br /> <a href="/regeln.php#regeln" rel="nofollow"><?php echo _('Regeln'); ?> </a> · <?php if (!is_null(CONFIG_ANDROID_APP_URL)) { echo '<a href="' . htmlspecialchars(CONFIG_ANDROID_APP_URL) . '">' . _('Android-App') . '</a> ·'; } ?> <a href="/impressum.php" rel="nofollow"><?php echo _('Impressum'); ?> </a> · <a href="/regeln.php#datenschutz" rel="nofollow"><?php echo _('Datenschutz');